]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/valtext.tex
corrected Get/SetFrame() parameter/return type
[wxWidgets.git] / docs / latex / wx / valtext.tex
CommitLineData
a660d684
KB
1\section{\class{wxTextValidator}}\label{wxtextvalidator}
2
3wxTextValidator validates text controls, providing a variety of filtering behaviours.
4
5For more information, please see \helpref{Validator overview}{validatoroverview}.
6
7\wxheading{Derived from}
8
9\helpref{wxValidator}{wxvalidator}\\
10\helpref{wxEvtHandler}{wxevthandler}\\
11\helpref{wxObject}{wxobject}
12
954b8ae6
JS
13\wxheading{Include files}
14
15<wx/valtext.h>
16
a660d684
KB
17\wxheading{See also}
18
76e1c2de 19\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator},
89c684ef 20\helpref{wxGenericValidator}{wxgenericvalidator}
a660d684
KB
21
22\latexignore{\rtfignore{\wxheading{Members}}}
23
24\membersection{wxTextValidator::wxTextValidator}\label{wxtextvalidatorconstr}
25
26\func{}{wxTextValidator}{\param{const wxTextValidator\&}{ validator}}
27
28Copy constructor.
29
eaaa6a06 30\func{}{wxTextValidator}{\param{long}{ style = wxFILTER\_NONE}, \param{wxString* }{valPtr = NULL}}
a660d684
KB
31
32Constructor, taking a style and optional pointer to a wxString variable.
33
34\wxheading{Parameters}
35
36\docparam{style}{A bitlist of flags, which can be:
37
38\twocolwidtha{5cm}
39\begin{twocollist}
40\twocolitem{{\bf wxFILTER\_NONE}}{No filtering takes place.}
41\twocolitem{{\bf wxFILTER\_ASCII}}{Non-ASCII characters are filtered out.}
42\twocolitem{{\bf wxFILTER\_ALPHA}}{Non-alpha characters are filtered out.}
43\twocolitem{{\bf wxFILTER\_ALPHANUMERIC}}{Non-alphanumeric characters are filtered out.}
44\twocolitem{{\bf wxFILTER\_NUMERIC}}{Non-numeric characters are filtered out.}
45\twocolitem{{\bf wxFILTER\_INCLUDE\_LIST}}{Use an include list. The validator
46checks if the user input is on the list, complaining if not.}
47\twocolitem{{\bf wxFILTER\_EXCLUDE\_LIST}}{Use an exclude list. The validator
48checks if the user input is on the list, complaining if it is.}
aaae8296
JS
49\twocolitem{{\bf wxFILTER\_INCLUDE\_CHAR\_LIST}}{Use an include list. The validator
50checks if each input character is in the list (one character per list element), complaining if not.}
387ebd3e 51\twocolitem{{\bf wxFILTER\_EXCLUDE\_CHAR\_LIST}}{Use an include list. The validator
aaae8296 52checks if each input character is in the list (one character per list element), complaining if it is.}
a660d684
KB
53\end{twocollist}
54}
55
56\docparam{valPtr}{A pointer to a wxString variable that contains the value. This variable
57should have a lifetime equal to or longer than the validator lifetime (which is usually
2b5f62a0
VZ
58determined by the lifetime of the window). % If NULL, the validator uses its own internal storage for the value. NOT TRUE
59}
a660d684
KB
60
61\membersection{wxTextValidator::\destruct{wxTextValidator}}
62
63\func{}{\destruct{wxTextValidator}}{\void}
64
65Destructor.
66
67\membersection{wxTextValidator::Clone}\label{wxtextvalidatorclone}
68
89c684ef 69\constfunc{virtual wxValidator*}{Clone}{\void}
a660d684
KB
70
71Clones the text validator using the copy constructor.
72
73\membersection{wxTextValidator::GetExcludeList}\label{wxtextvalidatorgetexcludelist}
74
75\constfunc{wxStringList\&}{GetExcludeList}{\void}
76
77Returns a reference to the exclude list (the list of invalid values).
78
79\membersection{wxTextValidator::GetIncludeList}\label{wxtextvalidatorgetincludelist}
80
81\constfunc{wxStringList\&}{GetIncludeList}{\void}
82
83Returns a reference to the include list (the list of valid values).
84
85\membersection{wxTextValidator::GetStyle}\label{wxtextvalidatorgetstyle}
86
87\constfunc{long}{GetStyle}{\void}
88
89Returns the validator style.
90
91\membersection{wxTextValidator::OnChar}\label{wxtextvalidatoronchar}
92
93\func{void}{OnChar}{\param{wxKeyEvent\&}{ event}}
94
95Receives character input from the window and filters it according to the
96current validator style.
97
98\membersection{wxTextValidator::SetExcludeList}\label{wxtextvalidatorsetexcludelist}
99
100\func{void}{SetExcludeList}{\param{const wxStringList\&}{ stringList}}
101
102Sets the exclude list (invalid values for the user input).
103
104\membersection{wxTextValidator::SetIncludeList}\label{wxtextvalidatorsetincludelist}
105
106\func{void}{SetIncludeList}{\param{const wxStringList\&}{ stringList}}
107
108Sets the include list (valid values for the user input).
109
110\membersection{wxTextValidator::SetStyle}\label{wxtextvalidatorsetstyle}
111
112\func{void}{SetStyle}{\param{long}{ style}}
113
114Sets the validator style.
115
116\membersection{wxTextValidator::TransferFromWindow}\label{wxtextvalidatortransferfromwindow}
117
76e1c2de 118\func{virtual bool}{TransferFromWindow}{}
a660d684
KB
119
120Transfers the string value to the window.
121
122\membersection{wxTextValidator::TransferToWindow}\label{wxtextvalidatortransfertowindow}
123
76e1c2de 124\func{virtual bool}{TransferToWindow}{}
a660d684
KB
125
126Transfers the window value to the string.
127
128\membersection{wxTextValidator::Validate}\label{wxtextvalidatorvalidate}
129
130\func{virtual bool}{Validate}{\param{wxWindow*}{ parent}}
131
132Validates the window contents against the include or exclude lists, depending
133on the validator style.
134