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

ObjCryst::WXFieldParBase Class Reference

A field for a parameter. More...

Inheritance diagram for ObjCryst::WXFieldParBase:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WXFieldParBase (wxWindow *parent, const string &label, const int field_id, const int hsize=50)
 Constructor.

void OnEnter (wxCommandEvent &WXUNUSED(event))
 When a new value is entered (must type it and then hit the 'enter' key).

void OnText (wxCommandEvent &WXUNUSED(event))
 Records when text is entered (either from self-updating or user input).

virtual void CrystUpdate (const bool updateUI=false, const bool mutexlock=false)=0
 This gets a new value from the parameter.

virtual void Revert ()=0
 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 ()
 This function shall be called when a new value has been entered.


Protected Member Functions

virtual void ReadNewValue ()=0
 Reads the new value when the Enter key is hit.


Protected Attributes

wxTextCtrl * mpField
 The field in which the value is written.

bool mIsSelfUpdating
 Set to true if the Field is being updated, so that no 'EVT_TEXT' is understood as user input.


Detailed Description

A field for a parameter.

This is a an abstract bas class, which can handle events (the real classes to use is the templated WXFieldPar class). If the parameter is a RefinablePar, use WXFieldRefPar.


Constructor & Destructor Documentation

ObjCryst::WXFieldParBase::WXFieldParBase wxWindow *  parent,
const string &  label,
const int  field_id,
const int  hsize = 50
 

Constructor.


Member Function Documentation

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

This gets a new value from the parameter.

Implements ObjCryst::WXCrystObjBasic.

Implemented in ObjCryst::WXFieldPar< T >, and ObjCryst::WXFieldPar< long >.

void ObjCryst::WXFieldParBase::OnEnter wxCommandEvent &  WXUNUSED(event)  ) 
 

When a new value is entered (must type it and then hit the 'enter' key).

The Field reads the new value, and directly changes the RefinablePar value (contrary to what happens for WXFieldName)by using RefinablePar::SetHumanValue().

void ObjCryst::WXFieldParBase::OnText wxCommandEvent &  WXUNUSED(event)  ) 
 

Records when text is entered (either from self-updating or user input).

virtual void ObjCryst::WXFieldParBase::ReadNewValue  )  [protected, pure virtual]
 

Reads the new value when the Enter key is hit.

Implemented in ObjCryst::WXFieldPar< T >, and ObjCryst::WXFieldPar< long >.

virtual void ObjCryst::WXFieldParBase::Revert  )  [pure 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.

Implemented in ObjCryst::WXFieldPar< T >, and ObjCryst::WXFieldPar< long >.

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

This function shall be called when a new value has been entered.

Implements ObjCryst::WXField.


Member Data Documentation

bool ObjCryst::WXFieldParBase::mIsSelfUpdating [protected]
 

Set to true if the Field is being updated, so that no 'EVT_TEXT' is understood as user input.

wxTextCtrl* ObjCryst::WXFieldParBase::mpField [protected]
 

The field in which the value is written.


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