$szTitle = "wxtextvalidator"; include "./_header.inc"; ?>
wxtextvalidator validates text controls, providing a variety of filtering behaviours.
for more information, please see validator overview.
derived from
wxvalidator
wxevthandler
wxobject
include files
<wx/valtext.h>
see also
validator overview, wxvalidator, wxgenericvalidator
members
wxtextvalidator::wxtextvalidator
wxtextvalidator::clone
wxtextvalidator::getexcludes
wxtextvalidator::getincludes
wxtextvalidator::getstyle
wxtextvalidator::onchar
wxtextvalidator::setexcludes
wxtextvalidator::setincludes
wxtextvalidator::setstyle
wxtextvalidator::transferfromwindow
wxtextvalidator::transfertowindow
wxtextvalidator::validate
wxtextvalidator(const wxtextvalidator& validator)
copy constructor.
wxtextvalidator(long style = wxfilter_none, wxstring* valptr = null)
constructor, taking a style and optional pointer to a wxstring variable.
parameters
style
wxfilter_none | no filtering takes place. |
wxfilter_ascii | non-ascii characters are filtered out. |
wxfilter_alpha | non-alpha characters are filtered out. |
wxfilter_alphanumeric | non-alphanumeric characters are filtered out. |
wxfilter_numeric | non-numeric characters are filtered out. |
wxfilter_include_list | use an include list. the validator checks if the user input is on the list, complaining if not. see wxtextvalidator::setincludes. |
wxfilter_exclude_list | use an exclude list. the validator checks if the user input is on the list, complaining if it is. see wxtextvalidator::setexcludes. |
wxfilter_include_char_list | use an include list. the validator checks if each input character is in the list (one character per list element), complaining if not. see wxtextvalidator::setincludes. |
wxfilter_exclude_char_list | use an include list. the validator checks if each input character is in the list (one character per list element), complaining if it is. see wxtextvalidator::setexcludes. |
valptr
virtual wxvalidator* clone() const
clones the text validator using the copy constructor.
wxarraystring& getexcludes() const
returns a reference to the exclude list (the list of invalid values).
wxarraystring& getincludes() const
returns a reference to the include list (the list of valid values).
long getstyle() const
returns the validator style.
void onchar(wxkeyevent& event)
receives character input from the window and filters it according to the current validator style.
void setexcludes(const wxarraystring& stringlist)
sets the exclude list (invalid values for the user input).
void setincludes(const wxarraystring& stringlist)
sets the include list (valid values for the user input).
void setstyle(long style)
sets the validator style.
virtual bool transferfromwindow()
transfers the value in the text control to the string.
virtual bool transfertowindow()
transfers the string value to the text control.
virtual bool validate(wxwindow* parent)
validates the window contents against the include or exclude lists, depending on the validator style.
include "./_footer.inc"; ?>