MGUI::FORM_EDIT_STRING Class Reference

Form consisting of label and string edit field. More...

#include <mgui/ctrl.h>

Inheritance diagram for MGUI::FORM_EDIT_STRING:

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, int maxlen, int width=0, MGUI::CTRL_EDIT_STRING::FLAGS flags=MGUI::CTRL_EDIT_STRING::FLAG_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedHeight, MGUI::CTRL_LABEL::STYLE labelstyle=MGUI::CTRL_LABEL::STYLE_LeftNoWrap)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const char *label, int maxlen, int width=0, MGUI::CTRL_EDIT_STRING::FLAGS flags=MGUI::CTRL_EDIT_STRING::FLAG_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedHeight, MGUI::CTRL_LABEL::STYLE labelstyle=MGUI::CTRL_LABEL::STYLE_LeftNoWrap)
 FORM_EDIT_STRING ()
MGUI::CTRL_EDIT_STRINGGetEditCtrl ()
MGUI::CTRL_LABELGetLabel ()
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 SetLabel (const MISTRING &label)
void SetLabel (const char *label)
void SetSelection (int StartChar=0, int EndChar=-1, bool NoScroll=true)
void SetValidChars (const UNICODE *string, bool invert=false)
void SetValue (const UNICODE *string, bool notify=true)
virtual ~FORM_EDIT_STRING ()

Private Member Functions

virtual void OnChangeValue ()
virtual void OnUserEdit ()
virtual bool OnValidate (MISTRING &string)

Detailed Description

Form consisting of label and string edit field.

Definition at line 1418 of file ctrl.h.


Constructor & Destructor Documentation

MGUI::FORM_EDIT_STRING::FORM_EDIT_STRING  ) 
 

Constructor.

virtual MGUI::FORM_EDIT_STRING::~FORM_EDIT_STRING  )  [virtual]
 

Destructor.


Member Function Documentation

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

Clear to empty string.

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

Definition at line 1429 of file ctrl.h.

void MGUI::FORM_EDIT_STRING::Create MGUI::LAYOUT_PANE_BASE ParentPane,
const MISTRING label,
int  maxlen,
int  width = 0,
MGUI::CTRL_EDIT_STRING::FLAGS  flags = MGUI::CTRL_EDIT_STRING::FLAG_Default,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedHeight,
MGUI::CTRL_LABEL::STYLE  labelstyle = MGUI::CTRL_LABEL::STYLE_LeftNoWrap
 

Create form with Unicode label.

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

void MGUI::FORM_EDIT_STRING::Create MGUI::LAYOUT_PANE_BASE ParentPane,
const char *  label,
int  maxlen,
int  width = 0,
MGUI::CTRL_EDIT_STRING::FLAGS  flags = MGUI::CTRL_EDIT_STRING::FLAG_Default,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedHeight,
MGUI::CTRL_LABEL::STYLE  labelstyle = MGUI::CTRL_LABEL::STYLE_LeftNoWrap
 

Create form with label from resource lookup.

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

MGUI::CTRL_EDIT_STRING& MGUI::FORM_EDIT_STRING::GetEditCtrl  )  [inline]
 

Retrieve string "edit" control for form.

Definition at line 1456 of file ctrl.h.

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

Retrieve label control for form.

Usually the label control is only retrieved for alignment purposes.

Definition at line 1461 of file ctrl.h.

const MISTRING& MGUI::FORM_EDIT_STRING::GetValue  )  [inline]
 

Get current string value.

Definition at line 1465 of file ctrl.h.

void MGUI::FORM_EDIT_STRING::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 1470 of file ctrl.h.

void MGUI::FORM_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 write to, 0 for default
IniGroup  INI group to write to
IniField  INI field to write to

Definition at line 1478 of file ctrl.h.

virtual void MGUI::FORM_EDIT_STRING::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_STRING::OnUserEdit  )  [private, virtual]
 

Called when user modifies the text in the edit control.

virtual bool MGUI::FORM_EDIT_STRING::OnValidate MISTRING string  )  [private, virtual]
 

Validate the string and alter if possible/necessary.

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

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

Set label text from Unicode string.

Parameters:
label  New label text

Definition at line 1490 of file ctrl.h.

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

Set label text using string from resource lookup.

Parameters:
label  New label text

Definition at line 1485 of file ctrl.h.

void MGUI::FORM_EDIT_STRING::SetSelection int  StartChar = 0,
int  EndChar = -1,
bool  NoScroll = true
[inline]
 

Select range of characters in string.

Parameters:
StartChar  Starting character position in string, 0 for beginning
EndChar  Ending character position, -1 for end of string
NoScroll  Indicates whether to scroll caret into view

Definition at line 1495 of file ctrl.h.

void MGUI::FORM_EDIT_STRING::SetValidChars const UNICODE string,
bool  invert = false
[inline]
 

Set set of 'valid' or 'invalid' characters.

This does not alter the current contents, if any.

Parameters:
string  Characters valid or invalid to enter
invert  Allow all but specified characters

Definition at line 1503 of file ctrl.h.

void MGUI::FORM_EDIT_STRING::SetValue const UNICODE string,
bool  notify = true
[inline]
 

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

Definition at line 1511 of file ctrl.h.


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