Form consisting of label and string edit field. More...
#include <mgui/edit.h>

Public Member Functions | |
| FORM_EDIT_STRING () | |
| virtual | ~FORM_EDIT_STRING () |
| 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) |
| MGUI::CTRL_EDIT_STRING & | GetEditCtrl () |
| MGUI::CTRL_LABEL & | GetLabel () |
| const MISTRING & | GetValue () |
| bool | HasValue () const |
| 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 | SetDelegateOnActivate (DELEGATE_VOID_NOPARMS delegate) |
| void | SetDelegateOnChangeValue (DELEGATE_VOID_NOPARMS delegate) |
| void | SetDelegateOnUserEdit (DELEGATE_VOID_NOPARMS delegate) |
| void | SetDelegateOnValidate (FastDelegate< bool(MISTRING &)> delegate) |
| void | SetLabel (const MISTRING &label) |
| void | SetSelection (int StartChar=0, int EndChar=-1, bool NoScroll=true) |
| void | SetValidChars (const MIUNICODE *string, bool invert=false) |
| void | SetValue (const MIUNICODE *string, bool notify=true) |
Form consisting of label and string edit field.
Use GetEditCtrl() to access the CTRL_EDIT_STRING control and set delegates, etc on it.
| MGUI::FORM_EDIT_STRING::FORM_EDIT_STRING | ( | ) |
Constructor.
| virtual MGUI::FORM_EDIT_STRING::~FORM_EDIT_STRING | ( | ) | [virtual] |
Destructor.
| void MGUI::FORM_EDIT_STRING::ClearValue | ( | bool | notify = true |
) | [inline] |
Clear to empty string.
| notify | Call OnChangeValue() if control has already been created |
| 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.
| 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.
| MGUI::CTRL_LABEL& MGUI::FORM_EDIT_STRING::GetLabel | ( | ) | [inline] |
Retrieve label control for form.
Usually the label control is only retrieved for alignment purposes.
| const MISTRING& MGUI::FORM_EDIT_STRING::GetValue | ( | ) | [inline] |
Get current string value.
| bool MGUI::FORM_EDIT_STRING::HasValue | ( | ) | const [inline] |
Determine if the edit form control has a value.
| 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.
| 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::FORM_EDIT_STRING::IniWrite | ( | INIHANDLE | IniHandle, | |
| const char * | IniGroup, | |||
| const char * | IniField | |||
| ) | const [inline] |
Write current value to INI file.
| IniHandle | Handle to INI file to write to, 0 for default | |
| IniGroup | INI group to write to | |
| IniField | INI field to write to |
| void MGUI::FORM_EDIT_STRING::SetDelegateOnActivate | ( | DELEGATE_VOID_NOPARMS | delegate | ) | [inline] |
Set delegate to call when user presses <Enter> in edit control.
| void MGUI::FORM_EDIT_STRING::SetDelegateOnChangeValue | ( | DELEGATE_VOID_NOPARMS | delegate | ) | [inline] |
Set delegate to call when value is changed after validation.
If the user modifies the text in the edit control will not be called until the control loses "focus".
| void MGUI::FORM_EDIT_STRING::SetDelegateOnUserEdit | ( | DELEGATE_VOID_NOPARMS | delegate | ) | [inline] |
Set delegate to call when user modifies the text in the edit control.
The actual value does not get updated until the control loses focus or GetValue() is called.
| void MGUI::FORM_EDIT_STRING::SetDelegateOnValidate | ( | FastDelegate< bool(MISTRING &)> | delegate | ) | [inline] |
Set delegate to call to perform validation.
| void MGUI::FORM_EDIT_STRING::SetLabel | ( | const MISTRING & | label | ) | [inline] |
Set label text from Unicode string.
| label | New label text |
| void MGUI::FORM_EDIT_STRING::SetSelection | ( | int | StartChar = 0, |
|
| int | EndChar = -1, |
|||
| bool | NoScroll = true | |||
| ) | [inline] |
Select range of characters in string.
| 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 |
| void MGUI::FORM_EDIT_STRING::SetValidChars | ( | const MIUNICODE * | string, | |
| bool | invert = false | |||
| ) | [inline] |
Set set of 'valid' or 'invalid' characters.
This does not alter the current contents, if any.
| string | Characters valid or invalid to enter | |
| invert | Allow all but specified characters |
| void MGUI::FORM_EDIT_STRING::SetValue | ( | const MIUNICODE * | 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.
| string | New string to set | |
| notify | Call OnChangeValue() if string actually updated |
1.6.1