MGUI::FORM_EDIT_RANGE Class Reference
Form containing pair of numeric edit fields for specifying a range.
More...
#include <mgui/edit.h>
List of all members.
Public Member Functions |
| | FORM_EDIT_RANGE () |
| virtual | ~FORM_EDIT_RANGE () |
| void | ClearValue (bool notify=true) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &label, const DOUBLE_RANGE &dft, double min, double max, double mininterval=0, int places=0, int width=0, CTRL_EDIT_NUMBER::FLAGS flags=CTRL_EDIT_NUMBER::FLAG_Default, CTRL_EDIT_NUMBER::FORMAT format=CTRL_EDIT_NUMBER::FORMAT_Decimal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize, MGUI::CTRL_LABEL::STYLE labelstyle=MGUI::CTRL_LABEL::STYLE_LeftNoWrap) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const DOUBLE_RANGE &dft, double min, double max, double mininterval=0, int places=0, int width=0, CTRL_EDIT_NUMBER::FLAGS flags=CTRL_EDIT_NUMBER::FLAG_Default, CTRL_EDIT_NUMBER::FORMAT format=CTRL_EDIT_NUMBER::FORMAT_Decimal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| MGUI::CTRL_EDIT_NUMBER & | GetEditCtrlMax () |
| MGUI::CTRL_EDIT_NUMBER & | GetEditCtrlMin () |
| MGUI::CTRL_LABEL & | GetLabel () |
| const DOUBLE_RANGE & | GetRange () const |
| DOUBLE_RANGE | GetValue () |
| bool | HasValue () |
| void | SetAutoSwap (bool AutoSwap=true) |
| void | SetDelegateOnChangeValue (DELEGATE_VOID_NOPARMS delegate) |
| void | SetFormat (CTRL_EDIT_NUMBER::FORMAT format, int places=-1) |
| void | SetLabel (const MISTRING &label) |
| bool | SetMinInterval (double MinInterval, bool notify=true) |
| bool | SetRange (double minimum, double maximum, bool notify=true, CTRL_EDIT_NUMBER::FLAGS flags=CTRL_EDIT_NUMBER::FLAG_Default) |
| bool | SetRange (const DOUBLE_RANGE &range, bool notify=true, CTRL_EDIT_NUMBER::FLAGS flags=CTRL_EDIT_NUMBER::FLAG_Default) |
| void | SetReadOnly (bool ReadOnly=true) |
| void | SetUnitConversion (const UNITCONV &unitconv) |
| void | SetUnitLabel (const MISTRING &label) |
| void | SetValue (const DOUBLE_RANGE &value, bool notify=true) |
Detailed Description
Form containing pair of numeric edit fields for specifying a range.
Constructor & Destructor Documentation
| MGUI::FORM_EDIT_RANGE::FORM_EDIT_RANGE |
( |
|
) |
|
| virtual MGUI::FORM_EDIT_RANGE::~FORM_EDIT_RANGE |
( |
|
) |
[virtual] |
Member Function Documentation
| void MGUI::FORM_EDIT_RANGE::ClearValue |
( |
bool |
notify = true |
) |
|
Clear the value.
- Parameters:
-
| notify | Call OnChangeValue() if form has already been created |
| void MGUI::FORM_EDIT_RANGE::Create |
( |
MGUI::LAYOUT_PANE_BASE & |
ParentPane, |
|
|
const MISTRING & |
label, |
|
|
const DOUBLE_RANGE & |
dft, |
|
|
double |
min, |
|
|
double |
max, |
|
|
double |
mininterval = 0, |
|
|
int |
places = 0, |
|
|
int |
width = 0, |
|
|
CTRL_EDIT_NUMBER::FLAGS |
flags = CTRL_EDIT_NUMBER::FLAG_Default, |
|
|
CTRL_EDIT_NUMBER::FORMAT |
format = CTRL_EDIT_NUMBER::FORMAT_Decimal, |
|
|
MGUI::LAYOUT_SIZEALIGN |
sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize, |
|
|
MGUI::CTRL_LABEL::STYLE |
labelstyle = MGUI::CTRL_LABEL::STYLE_LeftNoWrap | |
|
) |
| | |
Create the form with Unicode label.
- Parameters:
-
| ParentPane | Parent pane |
| label | Label |
| dft | Default value |
| min | Minimum value |
| max | Maximum value |
| mininterval | Minimum interval between values |
| places | Number of decimal places to show |
| width | Width in "characters", 0 to automatically determine based on min/max/places |
| flags | Flags |
| format | Format |
Create form with no label.
- Parameters:
-
| ParentPane | Parent pane |
| dft | Default value |
| min | Minimum value |
| max | Maximum value |
| mininterval | Minimum interval between values |
| places | Number of decimal places to show |
| width | Width in "characters", 0 to automatically determine based on min/max/places |
| flags | Flags |
| format | Format |
Get edit control for maximum value.
Get edit control for minimum value.
Retrieve label control for form.
Usually the label control is only retrieved for alignment purposes.
| const DOUBLE_RANGE& MGUI::FORM_EDIT_RANGE::GetRange |
( |
|
) |
const [inline] |
Get allowed numeric range.
- Returns:
- Allowed range.
| bool MGUI::FORM_EDIT_RANGE::HasValue |
( |
|
) |
[inline] |
Determine if has valid value.
| void MGUI::FORM_EDIT_RANGE::SetAutoSwap |
( |
bool |
AutoSwap = true |
) |
[inline] |
Set whether to automatically swap values if minimum > maximum.
Set delegate to call when either minimum or maximum 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 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 |
| void MGUI::FORM_EDIT_RANGE::SetLabel |
( |
const MISTRING & |
label |
) |
[inline] |
Set label text from Unicode string.
- Parameters:
-
| bool MGUI::FORM_EDIT_RANGE::SetMinInterval |
( |
double |
MinInterval, |
|
|
bool |
notify = true | |
|
) |
| | |
Set minimum allowed interval between minimum and maximum.
- Returns:
- 'true' if resulted in value being modified, 'false' if not.
| bool MGUI::FORM_EDIT_RANGE::SetRange |
( |
double |
minimum, |
|
|
double |
maximum, |
|
|
bool |
notify = true, |
|
|
CTRL_EDIT_NUMBER::FLAGS |
flags = CTRL_EDIT_NUMBER::FLAG_Default | |
|
) |
| | |
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_RANGE::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_RANGE::SetUnitConversion |
( |
const UNITCONV & |
unitconv |
) |
[inline] |
Set unit conversion for displayed value.
| void MGUI::FORM_EDIT_RANGE::SetUnitLabel |
( |
const MISTRING & |
label |
) |
|
| void MGUI::FORM_EDIT_RANGE::SetValue |
( |
const DOUBLE_RANGE & |
value, |
|
|
bool |
notify = true | |
|
) |
| | |
The documentation for this class was generated from the following file: