MGUI::FORM_EDIT_NUMBER_BASE Class Reference
Base for simple forms contain single numeric field.
More...
#include <mgui/edit.h>
List of all members.
Public Member Functions |
| | FORM_EDIT_NUMBER_BASE () |
| virtual | ~FORM_EDIT_NUMBER_BASE () |
| void | ClearValue (bool notify=true) |
| MGUI::CTRL_EDIT_NUMBER & | GetEditCtrl () |
| const DOUBLE_RANGE & | GetRange () const |
| double | GetValue () |
| bool | HasValue () |
| void | IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniField, bool notify=true) |
| void | IniWrite (INIHANDLE IniHandle, const char *IniGroup, const char *IniField) const |
| void | SetDelegateOnActivate (DELEGATE_VOID_NOPARMS delegate) |
| void | SetDelegateOnChangeValue (DELEGATE_VOID_NOPARMS delegate) |
| void | SetDelegateOnUserEdit (DELEGATE_VOID_NOPARMS delegate) |
| void | SetFormat (MGUI::CTRL_EDIT_NUMBER::FORMAT format, int places=-1, bool notify=true) |
| bool | SetRange (double minimum, double maximum, bool notify=true, MGUI::CTRL_EDIT_NUMBER::FLAGS flags=MGUI::CTRL_EDIT_NUMBER::FLAG_Default) |
| bool | SetRange (const DOUBLE_RANGE &range, bool notify=true, MGUI::CTRL_EDIT_NUMBER::FLAGS flags=MGUI::CTRL_EDIT_NUMBER::FLAG_Default) |
| void | SetReadOnly (bool ReadOnly=true) |
| void | SetUnitConversion (const UNITCONV &unitconv) |
| void | SetValue (double value, bool notify=true) |
Detailed Description
Base for simple forms contain single numeric field.
Use GetEditCtrl() to access the CTRL_EDIT_NUMBER control and set delegates, etc on it.
Constructor & Destructor Documentation
| MGUI::FORM_EDIT_NUMBER_BASE::FORM_EDIT_NUMBER_BASE |
( |
|
) |
|
| virtual MGUI::FORM_EDIT_NUMBER_BASE::~FORM_EDIT_NUMBER_BASE |
( |
|
) |
[virtual] |
Member Function Documentation
| void MGUI::FORM_EDIT_NUMBER_BASE::ClearValue |
( |
bool |
notify = true |
) |
[inline] |
Clear the value.
- Parameters:
-
| notify | Call OnChangeValue() if control has already been created |
Retrieve string "edit" control for form.
| const DOUBLE_RANGE& MGUI::FORM_EDIT_NUMBER_BASE::GetRange |
( |
|
) |
const [inline] |
Get allowed numeric range.
- Returns:
- Allowed range.
| double MGUI::FORM_EDIT_NUMBER_BASE::GetValue |
( |
|
) |
[inline] |
| bool MGUI::FORM_EDIT_NUMBER_BASE::HasValue |
( |
|
) |
[inline] |
Determine if has valid value.
| void MGUI::FORM_EDIT_NUMBER_BASE::IniRead |
( |
INIHANDLE |
IniHandle, |
|
|
const char * |
IniGroup, |
|
|
const char * |
IniField, |
|
|
bool |
notify = true | |
|
) |
| | [inline] |
Read value from INI file.
If Create() has already been performed the control's state will be updated.
- Parameters:
-
| IniHandle | Handle to INI file to read from, 0 for default |
| IniGroup | INI group to read from |
| IniField | INI field to read from |
| notify | Call OnChangeValue() if control has already been created |
| void MGUI::FORM_EDIT_NUMBER_BASE::IniWrite |
( |
INIHANDLE |
IniHandle, |
|
|
const char * |
IniGroup, |
|
|
const char * |
IniField | |
|
) |
| | const [inline] |
Write current value to INI file.
- Parameters:
-
| IniHandle | Handle to INI file to write to, 0 for default |
| IniGroup | INI group to write to |
| IniField | INI field to write to |
Set delegate to call when user presses <Enter> in edit control.
Set delegate to call when value is changed after validation.
If the user modifies the text in the edit control will not be called until the control loses "focus".
Set delegate to call when user modifies the text in the edit control.
The actual value does not get updated until the control loses focus or GetValue() is called.
Set format for showing/entering values.
Setting to Latitude, Longitude or DegMinSec will also adjust range.
- Parameters:
-
| places | Decimal places for FORMAT_Decimal or FORMAT_Exponential, -1 to leave unchanged |
| bool MGUI::FORM_EDIT_NUMBER_BASE::SetRange |
( |
double |
minimum, |
|
|
double |
maximum, |
|
|
bool |
notify = true, |
|
|
MGUI::CTRL_EDIT_NUMBER::FLAGS |
flags = MGUI::CTRL_EDIT_NUMBER::FLAG_Default | |
|
) |
| | [inline] |
Set allowed range.
- Returns:
- 'true' if resulted in value being modified, 'false' if not.
- Parameters:
-
| minimum | New minimum value |
| maximum | New maximum value |
| notify | Call OnChangeValue() if value adjusted to new range |
| flags | FLAG_NoMin, FLAG_NoMax, FLAG_NoRange |
Set allowed range.
- Returns:
- 'true' if resulted in value being modified, 'false' if not.
- Parameters:
-
| range | New range to set |
| notify | Call OnChangeValue() if value adjusted to new range |
| flags | FLAG_NoMin, FLAG_NoMax, FLAG_NoRange |
| void MGUI::FORM_EDIT_NUMBER_BASE::SetReadOnly |
( |
bool |
ReadOnly = true |
) |
[inline] |
Set whether value is read-only or not.
- Parameters:
-
| ReadOnly | True if read only, false if not |
| void MGUI::FORM_EDIT_NUMBER_BASE::SetUnitConversion |
( |
const UNITCONV & |
unitconv |
) |
[inline] |
Set unit conversion for displayed value.
- Parameters:
-
| unitconv | Unit conversion definition |
| void MGUI::FORM_EDIT_NUMBER_BASE::SetValue |
( |
double |
value, |
|
|
bool |
notify = true | |
|
) |
| | [inline] |
Set current value.
- Parameters:
-
| value | New value to set |
| notify | Call OnChangeValue() if change occurred |
The documentation for this class was generated from the following file: