A text editing box that only allows numbers to be entered
![]() | minimum Minimum value possible for edit box. |
![]() | PFloatEditBox ( PInteractor * parent, double min = -FLT_MAX, double max = FLT_MAX, double val = 0, double ndg = 1, unsigned decs = 0 ) Create a number edit box for decimal values with the parameters specified, validation to assure the user does not enter values outside the range specified. |
![]() | PFloatEditBox ( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, double * valuePtr ) Create control from interactor layout with the specified control ID. |
![]() | ~PFloatEditBox () Destroy the number edit box. |
![]() | SetValue ( double val ) Set the value of the number edit box control. |
![]() | GetValue () const Get the current contents of the number edit box control as entered by the user, or set via the SetValue() function. |
![]() | GetValuePointer () const Get the current value pointer associated with the control. |
![]() | SetValuePointer ( double * ptr ) Set the current value pointer associated with the control. |
![]() | SetMaximum ( double val ) Set the maximum value that may be entered in the number edit box. |
![]() | GetMaximum () Get the maximum value that may be entered in the number edit box. |
![]() | SetMinimum ( double val ) Set the minimum value that may be entered in the number edit box. |
![]() | GetMinimum () Get the minimum value that may be entered in the number edit box. |
![]() | SetNudge ( double val ) Set the nudge value that will be used by the nudge buttons in the number edit box. |
![]() | GetNudge () Get the nudge value that will be used by the nudge buttons in the number edit box. |
![]() | SetDecimals ( unsigned decs ) Set the number decimals that will be displayed in the number edit box. |
![]() | GetDecimals () Get the number decimals that will be displayed in the number edit box. |
![]() | OnEndInput () The system calls this whenever the system wishes to change focus to another interactor in the same layout or titled window. |
![]() | TransferValue ( int option ) This function transfers the value of the control to or from the variable pointed to by the value pointer member variable. |
![]() | AddNudge () Add the nudge value to the edit box value. |
![]() | New functions for class |
![]() | maximum Minimum value possible for edit box. |
![]() | nudge Amount to change the value with the nudge buttons. |
![]() | decimals Number of decimals for display. |
![]() | OnKeyInput ( const PString & str ) The system calls this whenever a keyboard key was pressed and this interactor had the focus. |
![]() | SubtractNudge () Subtract the nudge value to the edit box value. |
![]() | Overrides from class PInteractor |
![]() | Overrides from class PControl |
![]() | Overrides from class PNumberClass |
![]() | Member variables |
PNotifier codes
Overrides from class PObject
System callback functions.
A text editing box that only allows numbers to be entered
The user may enter in more decimals than specified and they will be
converted, but when a new value is displayed via SetValue() call
or via using the nudge buttons, only this number of decimals will be
displayed.
The user may enter in more decimals than specified and they will be
converted, but when a new value is displayed via SetValue() call
or via using the nudge buttons, only this number of decimals will be
displayed.
PFloatEditBox( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, double * valuePtr )
ctlID - Identifier for the control in the layout.
notify - Function to call when changes state.
valuePtr - Variable to change to the editor value.virtual ~PFloatEditBox()
New functions for class
void SetValue( double val )
double GetValue() const
double* GetValuePointer() const
void SetValuePointer( double * ptr )
void SetMaximum( double val )
double GetMaximum()
void SetMinimum( double val )
double GetMinimum()
void SetNudge( double val )
double GetNudge()
void SetDecimals( unsigned decs )
unsigned GetDecimals()
Overrides from class PInteractor
virtual BOOL OnEndInput()
virtual void OnKeyInput( const PString & str )
Overrides from class PControl
virtual void TransferValue( int option )
Overrides from class PNumberClass
virtual void AddNudge()
virtual void SubtractNudge()
Member variables
double minimum
double maximum
double nudge
Alphabetic index HTML hierarchy of classes or Java