contents up previous next

wxtextvalidator

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::wxtextvalidator

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

valptr


wxtextvalidator::clone

virtual wxvalidator* clone() const

clones the text validator using the copy constructor.


wxtextvalidator::getexcludes

wxarraystring& getexcludes() const

returns a reference to the exclude list (the list of invalid values).


wxtextvalidator::getincludes

wxarraystring& getincludes() const

returns a reference to the include list (the list of valid values).


wxtextvalidator::getstyle

long getstyle() const

returns the validator style.


wxtextvalidator::onchar

void onchar(wxkeyevent& event)

receives character input from the window and filters it according to the current validator style.


wxtextvalidator::setexcludes

void setexcludes(const wxarraystring& stringlist)

sets the exclude list (invalid values for the user input).


wxtextvalidator::setincludes

void setincludes(const wxarraystring& stringlist)

sets the include list (valid values for the user input).


wxtextvalidator::setstyle

void setstyle(long style)

sets the validator style.


wxtextvalidator::transferfromwindow

virtual bool transferfromwindow()

transfers the value in the text control to the string.


wxtextvalidator::transfertowindow

virtual bool transfertowindow()

transfers the string value to the text control.


wxtextvalidator::validate

virtual bool validate(wxwindow* parent)

validates the window contents against the include or exclude lists, depending on the validator style.