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

ObjCryst::WXField Class Reference

This is the abstract base class for all fields, wether they contain a floating-point parameter, or a string,... More...

Inheritance diagram for ObjCryst::WXField:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WXField (wxWindow *parent, const string &label, const int field_id)
 Constructor, specifying the label of the field.

void SetLabel (const string &)
 Change the field's label.

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 bool SetForegroundColour (const wxColour &colour)
 Change the colour of the field's title.

virtual void ValidateUserInput ()=0
 This function shall be called when a new value has been entered.

virtual void SetSize (int width, int height)
 Change the size of the field (excluding the title).


Protected Attributes

wxBoxSizer * mpSizer
 The horizontal sizer in which the title, button, fields, are put.

wxStaticText * mpLabel
 The label.

const int mId
 The Id of this field.


Detailed Description

This is the abstract base class for all fields, wether they contain a floating-point parameter, or a string,...

All WXField have a title and an entry field.

Note that WXField::CrystUpdate() and WXField::UpdateUI() should be done from the parent object. Notably using WXField::CrystUpdate(updateui=true) will not trigger an update of the UI.


Constructor & Destructor Documentation

ObjCryst::WXField::WXField wxWindow *  parent,
const string &  label,
const int  field_id
 

Constructor, specifying the label of the field.


Member Function Documentation

virtual void ObjCryst::WXField::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, ...).

Implemented in ObjCryst::WXFieldString, ObjCryst::WXFieldName, ObjCryst::WXFieldParBase, ObjCryst::WXFieldPar< T >, ObjCryst::WXFieldChoice, ObjCryst::WXFieldRefPar, ObjCryst::WXFieldOption, and ObjCryst::WXFieldPar< long >.

virtual bool ObjCryst::WXField::SetForegroundColour const wxColour &  colour  )  [virtual]
 

Change the colour of the field's title.

Can be used (with parcimony) to clarify the interface.

void ObjCryst::WXField::SetLabel const string &   ) 
 

Change the field's label.

virtual void ObjCryst::WXField::SetSize int  width,
int  height
[virtual]
 

Change the size of the field (excluding the title).

Reimplemented in ObjCryst::WXFieldString, and ObjCryst::WXFieldName.

virtual void ObjCryst::WXField::ValidateUserInput  )  [pure virtual]
 

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

Implemented in ObjCryst::WXFieldString, ObjCryst::WXFieldName, ObjCryst::WXFieldParBase, ObjCryst::WXFieldChoice, ObjCryst::WXFieldRefPar, and ObjCryst::WXFieldOption.


Member Data Documentation

const int ObjCryst::WXField::mId [protected]
 

The Id of this field.

wxStaticText* ObjCryst::WXField::mpLabel [protected]
 

The label.

wxBoxSizer* ObjCryst::WXField::mpSizer [protected]
 

The horizontal sizer in which the title, button, fields, are put.


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