]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/valtext.tex
wxProcess fixes (Detach() added), cleared/corrected wxExecute() documentation
[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
89c684ef
JS
19\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator},
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.}
49\end{twocollist}
50}
51
52\docparam{valPtr}{A pointer to a wxString variable that contains the value. This variable
53should have a lifetime equal to or longer than the validator lifetime (which is usually
54determined by the lifetime of the window). If NULL, the validator uses its own internal
55storage for the value.}
56
57\membersection{wxTextValidator::\destruct{wxTextValidator}}
58
59\func{}{\destruct{wxTextValidator}}{\void}
60
61Destructor.
62
63\membersection{wxTextValidator::Clone}\label{wxtextvalidatorclone}
64
89c684ef 65\constfunc{virtual wxValidator*}{Clone}{\void}
a660d684
KB
66
67Clones the text validator using the copy constructor.
68
69\membersection{wxTextValidator::GetExcludeList}\label{wxtextvalidatorgetexcludelist}
70
71\constfunc{wxStringList\&}{GetExcludeList}{\void}
72
73Returns a reference to the exclude list (the list of invalid values).
74
75\membersection{wxTextValidator::GetIncludeList}\label{wxtextvalidatorgetincludelist}
76
77\constfunc{wxStringList\&}{GetIncludeList}{\void}
78
79Returns a reference to the include list (the list of valid values).
80
81\membersection{wxTextValidator::GetStyle}\label{wxtextvalidatorgetstyle}
82
83\constfunc{long}{GetStyle}{\void}
84
85Returns the validator style.
86
87\membersection{wxTextValidator::OnChar}\label{wxtextvalidatoronchar}
88
89\func{void}{OnChar}{\param{wxKeyEvent\&}{ event}}
90
91Receives character input from the window and filters it according to the
92current validator style.
93
94\membersection{wxTextValidator::SetExcludeList}\label{wxtextvalidatorsetexcludelist}
95
96\func{void}{SetExcludeList}{\param{const wxStringList\&}{ stringList}}
97
98Sets the exclude list (invalid values for the user input).
99
100\membersection{wxTextValidator::SetIncludeList}\label{wxtextvalidatorsetincludelist}
101
102\func{void}{SetIncludeList}{\param{const wxStringList\&}{ stringList}}
103
104Sets the include list (valid values for the user input).
105
106\membersection{wxTextValidator::SetStyle}\label{wxtextvalidatorsetstyle}
107
108\func{void}{SetStyle}{\param{long}{ style}}
109
110Sets the validator style.
111
112\membersection{wxTextValidator::TransferFromWindow}\label{wxtextvalidatortransferfromwindow}
113
114\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}}
115
116Transfers the string value to the window.
117
118\membersection{wxTextValidator::TransferToWindow}\label{wxtextvalidatortransfertowindow}
119
120\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}}
121
122Transfers the window value to the string.
123
124\membersection{wxTextValidator::Validate}\label{wxtextvalidatorvalidate}
125
126\func{virtual bool}{Validate}{\param{wxWindow*}{ parent}}
127
128Validates the window contents against the include or exclude lists, depending
129on the validator style.
130