MGUI::CTRL_EDIT_NUMBER Class Reference

Number edit control. More...

#include <mgui/ctrl.h>

Inheritance diagram for MGUI::CTRL_EDIT_NUMBER:

Inheritance graph
[legend]
List of all members.

Public Types

enum  FLAGS {
  FLAG_Default = 0x0000, FLAG_NoMin = 0x0001, FLAG_NoMax = 0x0002, FLAG_NoRange = 0x0003,
  FLAG_NoDefault = 0x0004, FLAG_AddOne = 0x0008, FLAG_BlankZero = 0x0020, FLAG_ReadOnly = 0x0040,
  FLAG_LeftJustify = 0x0080
}
enum  FORMAT {
  FORMAT_Decimal, FORMAT_Exponential, FORMAT_Latitude, FORMAT_Longitude,
  FORMAT_DegMinSec
}

Public Member Functions

void ClearValue (bool notify=true)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, double dft, double min, double max, int places=0, int width=0, FLAGS flags=FLAG_Default, FORMAT format=FORMAT_Decimal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize)
 CTRL_EDIT_NUMBER ()
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 (FORMAT format, int places=-1)
void SetLatLonFormat (DEGTOSTRFLAGS flags)
bool SetRange (const DOUBLE_RANGE &range, bool notify=true, FLAGS flags=FLAG_Default)
void SetUnitConversion (const UNITCONV &unitconv)
void SetValue (double value, bool notify=true)
virtual ~CTRL_EDIT_NUMBER ()

Detailed Description

Number edit control.

Definition at line 1599 of file ctrl.h.


Member Enumeration Documentation

enum MGUI::CTRL_EDIT_NUMBER::FLAGS
 

Enumeration values:
FLAG_Default 
FLAG_NoMin  No minimum value enforced.
FLAG_NoMax  No maximum value enforced.
FLAG_NoRange  No range enforcement.
FLAG_NoDefault  No default specified in creation.
FLAG_AddOne  Add 1.0 to value shown to user.
FLAG_BlankZero  Blank the field if value is 0.0.
FLAG_ReadOnly  User cannot change value.
FLAG_LeftJustify  Left-justify value, default is to right-justify.

Definition at line 1602 of file ctrl.h.

enum MGUI::CTRL_EDIT_NUMBER::FORMAT
 

Enumeration values:
FORMAT_Decimal 
FORMAT_Exponential 
FORMAT_Latitude 
FORMAT_Longitude 
FORMAT_DegMinSec 

Definition at line 1614 of file ctrl.h.


Constructor & Destructor Documentation

MGUI::CTRL_EDIT_NUMBER::CTRL_EDIT_NUMBER  ) 
 

Constructor.

virtual MGUI::CTRL_EDIT_NUMBER::~CTRL_EDIT_NUMBER  )  [virtual]
 

Destructor.


Member Function Documentation

void MGUI::CTRL_EDIT_NUMBER::ClearValue bool  notify = true  ) 
 

Clear the value.

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

void MGUI::CTRL_EDIT_NUMBER::Create MGUI::LAYOUT_PANE_BASE ParentPane,
double  dft,
double  min,
double  max,
int  places = 0,
int  width = 0,
FLAGS  flags = FLAG_Default,
FORMAT  format = FORMAT_Decimal,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize
 

Create control.

Parameters:
ParentPane  Parent pane
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

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

Get allowed numeric range.

Returns:
Allowed range.

Definition at line 1650 of file ctrl.h.

double MGUI::CTRL_EDIT_NUMBER::GetValue  ) 
 

Get current value.

bool MGUI::CTRL_EDIT_NUMBER::HasValue  ) 
 

Determine if has valid value.

void MGUI::CTRL_EDIT_NUMBER::IniRead INIHANDLE  IniHandle,
const char *  IniGroup,
const char *  IniField,
bool  notify = true
 

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::CTRL_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 read from, 0 for default
IniGroup  INI group to read from
IniField  INI field to read from

Definition at line 1671 of file ctrl.h.

void MGUI::CTRL_EDIT_NUMBER::SetFormat FORMAT  format,
int  places = -1
 

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::CTRL_EDIT_NUMBER::SetLatLonFormat DEGTOSTRFLAGS  flags  ) 
 

Set format for displaying latitude/longitude values.

bool MGUI::CTRL_EDIT_NUMBER::SetRange const DOUBLE_RANGE range,
bool  notify = true,
FLAGS  flags = 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::CTRL_EDIT_NUMBER::SetUnitConversion const UNITCONV unitconv  ) 
 

Set unit conversion for displayed value.

void MGUI::CTRL_EDIT_NUMBER::SetValue double  value,
bool  notify = true
 

Set current value.


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:20:44 2004 for TNTsdk by  doxygen 1.3.8-20040913