]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/valtext.tex
added wxMessageQueue class for inter-thread communications
[wxWidgets.git] / docs / latex / wx / valtext.tex
... / ...
CommitLineData
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
13\wxheading{Include files}
14
15<wx/valtext.h>
16
17\wxheading{Library}
18
19\helpref{wxCore}{librarieslist}
20
21\wxheading{See also}
22
23\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator},
24\helpref{wxGenericValidator}{wxgenericvalidator}
25
26\latexignore{\rtfignore{\wxheading{Members}}}
27
28\membersection{wxTextValidator::wxTextValidator}\label{wxtextvalidatorctor}
29
30\func{}{wxTextValidator}{\param{const wxTextValidator\&}{ validator}}
31
32Copy constructor.
33
34\func{}{wxTextValidator}{\param{long}{ style = wxFILTER\_NONE}, \param{wxString* }{valPtr = NULL}}
35
36Constructor, taking a style and optional pointer to a wxString variable.
37
38\wxheading{Parameters}
39
40\docparam{style}{A bitlist of flags, which can be:
41
42\twocolwidtha{5cm}
43\begin{twocollist}
44\twocolitem{{\bf wxFILTER\_NONE}}{No filtering takes place.}
45\twocolitem{{\bf wxFILTER\_ASCII}}{Non-ASCII characters are filtered out.}
46\twocolitem{{\bf wxFILTER\_ALPHA}}{Non-alpha characters are filtered out.}
47\twocolitem{{\bf wxFILTER\_ALPHANUMERIC}}{Non-alphanumeric characters are filtered out.}
48\twocolitem{{\bf wxFILTER\_NUMERIC}}{Non-numeric characters are filtered out.}
49\twocolitem{{\bf wxFILTER\_INCLUDE\_LIST}}{Use an include list. The validator
50checks if the user input is on the list, complaining if not. See
51\helpref{wxTextValidator::SetIncludes}{wxtextvalidatorsetincludes}.}
52\twocolitem{{\bf wxFILTER\_EXCLUDE\_LIST}}{Use an exclude list. The validator
53checks if the user input is on the list, complaining if it is. See
54\helpref{wxTextValidator::SetExcludes}{wxtextvalidatorsetexcludes}.}
55\twocolitem{{\bf wxFILTER\_INCLUDE\_CHAR\_LIST}}{Use an include list. The validator
56checks if each input character is in the list (one character per list element), complaining if not.
57See \helpref{wxTextValidator::SetIncludes}{wxtextvalidatorsetincludes}.}
58\twocolitem{{\bf wxFILTER\_EXCLUDE\_CHAR\_LIST}}{Use an include list. The validator
59checks if each input character is in the list (one character per list element), complaining if it is.
60See \helpref{wxTextValidator::SetExcludes}{wxtextvalidatorsetexcludes}.}
61\end{twocollist}
62}
63
64\docparam{valPtr}{A pointer to a wxString variable that contains the value. This variable
65should have a lifetime equal to or longer than the validator lifetime (which is usually
66determined by the lifetime of the window). % If NULL, the validator uses its own internal storage for the value. NOT true
67}
68
69\membersection{wxTextValidator::Clone}\label{wxtextvalidatorclone}
70
71\constfunc{virtual wxValidator*}{Clone}{\void}
72
73Clones the text validator using the copy constructor.
74
75\membersection{wxTextValidator::GetExcludes}\label{wxtextvalidatorgetexcludes}
76
77\constfunc{wxArrayString\&}{GetExcludes}{\void}
78
79Returns a reference to the exclude list (the list of invalid values).
80
81\membersection{wxTextValidator::GetIncludes}\label{wxtextvalidatorgetincludes}
82
83\constfunc{wxArrayString\&}{GetIncludes}{\void}
84
85Returns a reference to the include list (the list of valid values).
86
87\membersection{wxTextValidator::GetStyle}\label{wxtextvalidatorgetstyle}
88
89\constfunc{long}{GetStyle}{\void}
90
91Returns the validator style.
92
93\membersection{wxTextValidator::OnChar}\label{wxtextvalidatoronchar}
94
95\func{void}{OnChar}{\param{wxKeyEvent\&}{ event}}
96
97Receives character input from the window and filters it according to the
98current validator style.
99
100\membersection{wxTextValidator::SetExcludes}\label{wxtextvalidatorsetexcludes}
101
102\func{void}{SetExcludes}{\param{const wxArrayString\&}{ stringList}}
103
104Sets the exclude list (invalid values for the user input).
105
106\membersection{wxTextValidator::SetIncludes}\label{wxtextvalidatorsetincludes}
107
108\func{void}{SetIncludes}{\param{const wxArrayString\&}{ stringList}}
109
110Sets the include list (valid values for the user input).
111
112\membersection{wxTextValidator::SetStyle}\label{wxtextvalidatorsetstyle}
113
114\func{void}{SetStyle}{\param{long}{ style}}
115
116Sets the validator style.
117
118\membersection{wxTextValidator::TransferFromWindow}\label{wxtextvalidatortransferfromwindow}
119
120\func{virtual bool}{TransferFromWindow}{}
121
122Transfers the value in the text control to the string.
123
124\membersection{wxTextValidator::TransferToWindow}\label{wxtextvalidatortransfertowindow}
125
126\func{virtual bool}{TransferToWindow}{}
127
128Transfers the string value to the text control.
129
130\membersection{wxTextValidator::Validate}\label{wxtextvalidatorvalidate}
131
132\func{virtual bool}{Validate}{\param{wxWindow*}{ parent}}
133
134Validates the window contents against the include or exclude lists, depending
135on the validator style.
136