MGUI::FORM_EDIT_NUMBER Class Reference

Form consisting of label, numeric edit field and optional unit label. More...

#include <mgui/ctrl.h>

Inheritance diagram for MGUI::FORM_EDIT_NUMBER:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void ClearValue (bool notify=true)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &label, double dft, double min, double max, int places=0, int width=0, MGUI::CTRL_EDIT_NUMBER::FLAGS flags=MGUI::CTRL_EDIT_NUMBER::FLAG_Default, MGUI::CTRL_EDIT_NUMBER::FORMAT format=MGUI::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 char *label, double dft, double min, double max, int places=0, int width=0, MGUI::CTRL_EDIT_NUMBER::FLAGS flags=MGUI::CTRL_EDIT_NUMBER::FLAG_Default, MGUI::CTRL_EDIT_NUMBER::FORMAT format=MGUI::CTRL_EDIT_NUMBER::FORMAT_Decimal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize, MGUI::CTRL_LABEL::STYLE labelstyle=MGUI::CTRL_LABEL::STYLE_LeftNoWrap)
 FORM_EDIT_NUMBER ()
MGUI::CTRL_EDIT_NUMBERGetEditCtrl ()
MGUI::CTRL_LABELGetLabel ()
const DOUBLE_RANGEGetRange () 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 SetFormat (MGUI::CTRL_EDIT_NUMBER::FORMAT format, int places=-1)
void SetLabel (const MISTRING &label)
void SetLabel (const char *label)
void SetLatLonFormat (DEGTOSTRFLAGS flags)
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)
virtual ~FORM_EDIT_NUMBER ()

Private Member Functions

virtual void OnChangeValue ()
virtual void OnUserEdit ()

Detailed Description

Form consisting of label, numeric edit field and optional unit label.

Definition at line 1799 of file ctrl.h.


Constructor & Destructor Documentation

MGUI::FORM_EDIT_NUMBER::FORM_EDIT_NUMBER  ) 
 

Constructor.

virtual MGUI::FORM_EDIT_NUMBER::~FORM_EDIT_NUMBER  )  [virtual]
 

Destructor.


Member Function Documentation

void MGUI::FORM_EDIT_NUMBER::ClearValue bool  notify = true  )  [inline]
 

Clear the value.

Parameters:
notify  Call OnChangeValue() if control has already been created

Definition at line 1810 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::Create MGUI::LAYOUT_PANE_BASE ParentPane,
const MISTRING label,
double  dft,
double  min,
double  max,
int  places = 0,
int  width = 0,
MGUI::CTRL_EDIT_NUMBER::FLAGS  flags = MGUI::CTRL_EDIT_NUMBER::FLAG_Default,
MGUI::CTRL_EDIT_NUMBER::FORMAT  format = MGUI::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 control with Unicode label.

Parameters:
ParentPane  Parent pane
label  Label
dft  Default value
min  Minimum value
max  Maximum value
places  Number of decimal places to show
width  Width in "characters", 0 to automatically determine based on min/max/places
flags  Flags
format  Format

void MGUI::FORM_EDIT_NUMBER::Create MGUI::LAYOUT_PANE_BASE ParentPane,
const char *  label,
double  dft,
double  min,
double  max,
int  places = 0,
int  width = 0,
MGUI::CTRL_EDIT_NUMBER::FLAGS  flags = MGUI::CTRL_EDIT_NUMBER::FLAG_Default,
MGUI::CTRL_EDIT_NUMBER::FORMAT  format = MGUI::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 control with label from resource lookup.

Parameters:
ParentPane  Parent pane
label  Label
dft  Default value
min  Minimum value
max  Maximum value
places  Number of decimal places to show
width  Width in "characters", 0 to automatically determine based on min/max/places
flags  Flags
format  Format

MGUI::CTRL_EDIT_NUMBER& MGUI::FORM_EDIT_NUMBER::GetEditCtrl  )  [inline]
 

Retrieve string "edit" control for form.

Definition at line 1845 of file ctrl.h.

MGUI::CTRL_LABEL& MGUI::FORM_EDIT_NUMBER::GetLabel  )  [inline]
 

Retrieve label control for form.

Usually the label control is only retrieved for alignment purposes.

Definition at line 1850 of file ctrl.h.

const DOUBLE_RANGE& MGUI::FORM_EDIT_NUMBER::GetRange  )  const [inline]
 

Get allowed numeric range.

Returns:
Allowed range.

Definition at line 1855 of file ctrl.h.

double MGUI::FORM_EDIT_NUMBER::GetValue  )  [inline]
 

Get current value.

Definition at line 1859 of file ctrl.h.

bool MGUI::FORM_EDIT_NUMBER::HasValue  )  [inline]
 

Determine if has valid value.

Definition at line 1863 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::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

Definition at line 1868 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::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

Definition at line 1876 of file ctrl.h.

virtual void MGUI::FORM_EDIT_NUMBER::OnChangeValue  )  [private, virtual]
 

Called when value is changed after validation.

If the user modifies the text in the edit control this will not be called until the control loses "focus".

virtual void MGUI::FORM_EDIT_NUMBER::OnUserEdit  )  [private, virtual]
 

Called when user modifies the text in the edit control.

void MGUI::FORM_EDIT_NUMBER::SetFormat MGUI::CTRL_EDIT_NUMBER::FORMAT  format,
int  places = -1
[inline]
 

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

Definition at line 1884 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::SetLabel const MISTRING label  )  [inline]
 

Set label text from Unicode string.

Parameters:
label  New label text

Definition at line 1895 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::SetLabel const char *  label  )  [inline]
 

Set label text using string from resource lookup.

Parameters:
label  New label text

Definition at line 1890 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::SetLatLonFormat DEGTOSTRFLAGS  flags  )  [inline]
 

Set format for displaying latitude/longitude values.

Definition at line 1900 of file ctrl.h.

bool MGUI::FORM_EDIT_NUMBER::SetRange const DOUBLE_RANGE range,
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:
range  New range to set
notify  Call OnChangeValue() if value adjusted to new range
flags  FLAG_NoMin, FLAG_NoMax, FLAG_NoRange

Definition at line 1906 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::SetReadOnly bool  ReadOnly = true  )  [inline]
 

Set whether value is read-only or not.

Parameters:
ReadOnly  True if read only, false if not

Definition at line 1913 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::SetUnitConversion const UNITCONV unitconv  )  [inline]
 

Set unit conversion for displayed value.

Parameters:
unitconv  Unit conversion definition

Definition at line 1924 of file ctrl.h.

void MGUI::FORM_EDIT_NUMBER::SetValue double  value,
bool  notify = true
[inline]
 

Set current value.

Parameters:
value  New value to set
notify  Call OnChangeValue() if change occurred

Definition at line 1918 of file ctrl.h.


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:29:54 2006 for TNTsdk by  doxygen 1.3.8-20040913