MGUI::FORM_EDIT_RANGE Class Reference

Form containing pair of numeric edit fields for specifying a range. More...

#include <mgui/ctrl.h>

Inheritance diagram for MGUI::FORM_EDIT_RANGE:

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, 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 char *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)
 FORM_EDIT_RANGE ()
MGUI::CTRL_LABELGetLabel ()
const DOUBLE_RANGEGetRange () const
DOUBLE_RANGE GetValue ()
bool HasValue ()
void SetAutoSwap (bool AutoSwap=true)
void SetFormat (CTRL_EDIT_NUMBER::FORMAT format, int places=-1)
void SetLabel (const MISTRING &label)
void SetLabel (const char *label)
void SetLatLonFormat (DEGTOSTRFLAGS flags)
bool SetMinInterval (double MinInterval, bool notify=true)
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 SetValue (const DOUBLE_RANGE &value, bool notify=true)
virtual ~FORM_EDIT_RANGE ()

Private Member Functions

virtual void OnChangeValue ()

Detailed Description

Form containing pair of numeric edit fields for specifying a range.

Definition at line 1995 of file ctrl.h.


Constructor & Destructor Documentation

MGUI::FORM_EDIT_RANGE::FORM_EDIT_RANGE  ) 
 

Constructor.

virtual MGUI::FORM_EDIT_RANGE::~FORM_EDIT_RANGE  )  [virtual]
 

Destructor.


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

void MGUI::FORM_EDIT_RANGE::Create MGUI::LAYOUT_PANE_BASE ParentPane,
const char *  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 label from resource lookup.

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

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

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

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

Retrieve label control for form.

Usually the label control is only retrieved for alignment purposes.

Definition at line 2064 of file ctrl.h.

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

Get allowed numeric range.

Returns:
Allowed range.

Definition at line 2059 of file ctrl.h.

DOUBLE_RANGE MGUI::FORM_EDIT_RANGE::GetValue  )  [inline]
 

Get current value.

Definition at line 2068 of file ctrl.h.

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

Determine if has valid value.

Definition at line 2072 of file ctrl.h.

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

Called when value is changed after validation.

void MGUI::FORM_EDIT_RANGE::SetAutoSwap bool  AutoSwap = true  )  [inline]
 

Set whether to automatically swap values if minimum > maximum.

Definition at line 2076 of file ctrl.h.

void MGUI::FORM_EDIT_RANGE::SetFormat 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 2082 of file ctrl.h.

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

Set label text from Unicode string.

Parameters:
label  New label text

Definition at line 2096 of file ctrl.h.

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

Set label text using string from resource lookup.

Parameters:
label  New label text

Definition at line 2091 of file ctrl.h.

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

Set format for displaying latitude/longitude values.

Definition at line 2101 of file ctrl.h.

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 const DOUBLE_RANGE range,
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:
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

Definition at line 2124 of file ctrl.h.

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

Set unit conversion for displayed value.

Definition at line 2138 of file ctrl.h.

void MGUI::FORM_EDIT_RANGE::SetValue const DOUBLE_RANGE value,
bool  notify = true
 

Set current value.


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