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

ObjCryst::WXFieldPar< T > Class Template Reference

A field for a parameter. More...

Inheritance diagram for ObjCryst::WXFieldPar< T >:

Inheritance graph
[legend]
Collaboration diagram for ObjCryst::WXFieldPar< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

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

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

virtual 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, ...).

void SetHumanValueScale (const T s)
 Set Coefficient between the value used by ObjCryst++ and the one to be displayed to the user.


Protected Member Functions

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


Protected Attributes

T * mpValue
 A pointer to the value displayed.

mValue
 The value displayed.

mValueOld
 Last value.

mHumanScale
 Coefficient between the value used by ObjCryst++ and the one to be displayed to the user.


Detailed Description

template<class T>
class ObjCryst::WXFieldPar< T >

A field for a parameter.

Template version. If the parameter is a RefinablePar, use WXFieldRefPar instead.


Constructor & Destructor Documentation

template<class T>
ObjCryst::WXFieldPar< T >::WXFieldPar wxWindow *  parent,
const string &  label,
const int  field_id,
T *  par,
const int  hsize = 50
 

Constructor.


Member Function Documentation

template<class T>
virtual void ObjCryst::WXFieldPar< T >::CrystUpdate const bool  updateUI = false,
const bool  mutexlock = false
[virtual]
 

This gets a new value from the parameter.

Implements ObjCryst::WXFieldParBase.

template<class T>
virtual void ObjCryst::WXFieldPar< T >::ReadNewValue  )  [protected, virtual]
 

Reads the new value when the Enter key is hit.

Implements ObjCryst::WXFieldParBase.

template<class T>
virtual void ObjCryst::WXFieldPar< T >::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::WXFieldParBase.

template<class T>
void ObjCryst::WXFieldPar< T >::SetHumanValueScale const T  s  ) 
 

Set Coefficient between the value used by ObjCryst++ and the one to be displayed to the user.

Typically, 180/pi

template<class T>
virtual void ObjCryst::WXFieldPar< T >::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.


Member Data Documentation

template<class T>
T ObjCryst::WXFieldPar< T >::mHumanScale [protected]
 

Coefficient between the value used by ObjCryst++ and the one to be displayed to the user.

Typically, 180/pi

template<class T>
T* ObjCryst::WXFieldPar< T >::mpValue [protected]
 

A pointer to the value displayed.

template<class T>
T ObjCryst::WXFieldPar< T >::mValue [protected]
 

The value displayed.

template<class T>
T ObjCryst::WXFieldPar< T >::mValueOld [protected]
 

Last value.


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