MGUI::CTRL_EDIT_STRING Class Reference

String 'edit' control. More...

#include <mgui/ctrl.h>

Inheritance diagram for MGUI::CTRL_EDIT_STRING:

Inheritance graph
[legend]
List of all members.

Public Types

enum  FLAGS {
  FLAG_Default = 0x0000, FLAG_RightJustify = 0x0001, FLAG_ReadOnly = 0x0002, FLAG_Opaque = 0x0004,
  FLAG_WidthInPixels = 0x0008
}

Public Member Functions

void ClearValue (bool notify=true)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, int maxlen, int width=0, FLAGS flags=FLAG_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedHeight)
 CTRL_EDIT_STRING ()
const MISTRINGGetValue ()
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 SetValue (const MIUNICODE *string, bool notify=true)
virtual ~CTRL_EDIT_STRING ()

Protected Member Functions

virtual bool OnValidate (MISTRING &string)

Detailed Description

String 'edit' control.

Definition at line 1281 of file ctrl.h.


Member Enumeration Documentation

enum MGUI::CTRL_EDIT_STRING::FLAGS
 

Enumeration values:
FLAG_Default 
FLAG_RightJustify  Right-justify value, default is to left-justify.
FLAG_ReadOnly  User cannot change value.
FLAG_Opaque  Show '*'s for password input.
FLAG_WidthInPixels  Width specified in pixels.

Definition at line 1284 of file ctrl.h.


Constructor & Destructor Documentation

MGUI::CTRL_EDIT_STRING::CTRL_EDIT_STRING  ) 
 

Constructor.

virtual MGUI::CTRL_EDIT_STRING::~CTRL_EDIT_STRING  )  [virtual]
 

Destructor.


Member Function Documentation

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

Clear to empty string.

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

void MGUI::CTRL_EDIT_STRING::Create MGUI::LAYOUT_PANE_BASE ParentPane,
int  maxlen,
int  width = 0,
FLAGS  flags = FLAG_Default,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedHeight
 

Create control.

Parameters:
ParentPane  Parent pane
maxlen  Maximum number of characters allowed in string, not including termination
width  Width in 'typical' characters, minimum if can expand based on sizealign

const MISTRING& MGUI::CTRL_EDIT_STRING::GetValue  ) 
 

Get current string value.

void MGUI::CTRL_EDIT_STRING::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_STRING::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 1328 of file ctrl.h.

virtual bool MGUI::CTRL_EDIT_STRING::OnValidate MISTRING string  )  [protected, virtual]
 

Validate the string and alter if possible/necessary.

Derived class must call corresponding base class method BEFORE performing its own processing.

Returns:
'true' if string could be validated, 'false' if not
Parameters:
string  String to be validated

void MGUI::CTRL_EDIT_STRING::SetValue const MIUNICODE string,
bool  notify = true
 

Set current string value with validation.

OnValidate() will be called and if valid, the string will be updated. No comparison is made with the current string value.

Parameters:
string  New string to set
notify  Call OnChangeValue() if string actually updated


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