Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ObjCryst::WXFieldOption Class Reference

WX representation of a RefObj option. This displays the names of the different choices. More...

Inheritance diagram for ObjCryst::WXFieldOption:

Inheritance graph
[legend]
Collaboration diagram for ObjCryst::WXFieldOption:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WXFieldOption (wxWindow *parent, const int field_id, RefObjOpt *option)
virtual ~WXFieldOption ()
void OnUpdateUI (wxUpdateUIEvent &WXUNUSED(event))
void OnChoice (wxCommandEvent &WXUNUSED(event))
 When a new value is entered.

virtual void CrystUpdate (const bool updateUI=false, const bool mutexlock=false)
 Get new values to be displayed from the underlying object, and raise flag if an UI update is necessary.

virtual void UpdateUI (const bool mutexlock=false)
 Update the User Interface, if necessary.

void Revert ()
 After a user entry, this allows to go back to the last value, if for some reason the entry was rejected (because the object is currently busy, ...).

virtual void ValidateUserInput ()
 Does nothing. Any user input is directly validated (OnChoice).


Protected Attributes

int mChoice
int mChoiceOld
RefObjOptmpOption
wxChoice * mpList

Detailed Description

WX representation of a RefObj option. This displays the names of the different choices.


Constructor & Destructor Documentation

ObjCryst::WXFieldOption::WXFieldOption wxWindow *  parent,
const int  field_id,
RefObjOpt option
 

virtual ObjCryst::WXFieldOption::~WXFieldOption  )  [virtual]
 


Member Function Documentation

virtual void ObjCryst::WXFieldOption::CrystUpdate const bool  updateUI = false,
const bool  mutexlock = false
[virtual]
 

Get new values to be displayed from the underlying object, and raise flag if an UI update is necessary.

The actual GUI update is not made here. UpdateUI() should be called separately, from the main thread.

Parameters:
updateUI: if true, this will call UpdateUI, either directly (if in the main thread), or by sending a message.
mutexlock: if true, a Mutex will be used to lock the data shared between main and background thread. The idea is to only use a few Mutexes to lock data from the top objects (wxRefinableObj,...), when calling CrystUpdate() and UpdateUI(). As sub-objects (WXField,...) are only updated from within a top object, the mutex lock in the top object will also lock the data in the sub-objects.

Implements ObjCryst::WXCrystObjBasic.

void ObjCryst::WXFieldOption::OnChoice wxCommandEvent &  WXUNUSED(event)  ) 
 

When a new value is entered.

The Field reads the new value, then forwards the event to its owner, who will take care of anything that must be done.

void ObjCryst::WXFieldOption::OnUpdateUI wxUpdateUIEvent &  WXUNUSED(event)  ) 
 

void ObjCryst::WXFieldOption::Revert  )  [virtual]
 

After a user entry, this allows to go back to the last value, if for some reason the entry was rejected (because the object is currently busy, ...).

Implements ObjCryst::WXField.

virtual void ObjCryst::WXFieldOption::UpdateUI const bool  mutexlock = false  )  [virtual]
 

Update the User Interface, if necessary.

Parameters:
mutexlock: if true, a Mutex will be used to lock the data shared between main and background thread.
The idea is to only use a few Mutexes to lock data from the top objects (wxRefinableObj,...), when calling CrystUpdate() and UpdateUI(). As sub-objects (WXField,...) are only updated from within a top object, the mutex lock in the top object will also lock the data in the sub-objects.

Implements ObjCryst::WXCrystObjBasic.

virtual void ObjCryst::WXFieldOption::ValidateUserInput  )  [virtual]
 

Does nothing. Any user input is directly validated (OnChoice).

Implements ObjCryst::WXField.


Member Data Documentation

int ObjCryst::WXFieldOption::mChoice [protected]
 

int ObjCryst::WXFieldOption::mChoiceOld [protected]
 

wxChoice* ObjCryst::WXFieldOption::mpList [protected]
 

RefObjOpt* ObjCryst::WXFieldOption::mpOption [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:07:55 2006 for ObjCryst++ by doxygen 1.3.6