]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/valgen.tex
* Stream doc.
[wxWidgets.git] / docs / latex / wx / valgen.tex
CommitLineData
89c684ef
JS
1\section{\class{wxGenericValidator}}\label{wxgenericvalidator}
2
3wxGenericValidator performs data transfer (but not validation or filtering) for the following
4basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton, wxRadioBox,
5wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl, wxCheckListBox.
6
7It checks the type of the window and uses an appropriate type for that window. For example,
8wxButton and wxTextCtrl transfer data to and from a wxString variable; wxListBox uses a
9wxArrayInt; wxCheckBox uses a bool.
10
11For more information, please see \helpref{Validator overview}{validatoroverview}.
12
13\wxheading{Derived from}
14
15\helpref{wxValidator}{wxvalidator}\\
16\helpref{wxEvtHandler}{wxevthandler}\\
17\helpref{wxObject}{wxobject}
18
19\wxheading{See also}
20
21\helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator},
22\helpref{wxTextValidator}{wxTextvalidator}
23
24\latexignore{\rtfignore{\wxheading{Members}}}
25
26\membersection{wxGenericValidator::wxGenericValidator}\label{wxgenericvalidatorconstr}
27
28\func{}{wxGenericValidator}{\param{const wxGenericValidator\&}{ validator}}
29
30Copy constructor.
31
32\func{}{wxGenericValidator}{\param{bool*}{ valPtr}}
33
34Constructor taking a bool pointer. This will be used for wxCheckBox and wxRadioButton.
35
36\func{}{wxGenericValidator}{\param{wxString*}{ valPtr}}
37
38Constructor taking a wxString pointer. This will be used for wxButton, wxComboBox, wxStaticText,
39wxTextCtrl.
40
41\func{}{wxGenericValidator}{\param{int*}{ valPtr}}
42
43Constructor taking an integer pointer. This will be used for wxGauge, wxScrollBar, wxRadioBox, wxSpinButton,
44wxChoice.
45
46\func{}{wxGenericValidator}{\param{wxArrayInt*}{ valPtr}}
47
48Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox.
49
50\wxheading{Parameters}
51
52\docparam{validator}{Validator to copy.}
53
54\docparam{valPtr}{A pointer to a variable that contains the value. This variable
55should have a lifetime equal to or longer than the validator lifetime (which is usually
56determined by the lifetime of the window).}
57
58\membersection{wxGenericValidator::\destruct{wxGenericValidator}}
59
60\func{}{\destruct{wxGenericValidator}}{\void}
61
62Destructor.
63
64\membersection{wxGenericValidator::Clone}\label{wxgenericvalidatorclone}
65
66\constfunc{virtual wxValidator*}{Clone}{\void}
67
68Clones the generic validator using the copy constructor.
69
70\membersection{wxGenericValidator::TransferFromWindow}\label{wxgenericvalidatortransferfromwindow}
71
72\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}}
73
74Transfers the value to the window.
75
76\membersection{wxGenericValidator::TransferToWindow}\label{wxgenericvalidatortransfertowindow}
77
78\func{virtual bool}{TransferToWindow}{\param{wxWindow*}{ parent}}
79
80Transfers the window value to the appropriate data type.
81