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