]>
Commit | Line | Data |
---|---|---|
89c684ef JS |
1 | \section{\class{wxGenericValidator}}\label{wxgenericvalidator} |
2 | ||
3 | wxGenericValidator performs data transfer (but not validation or filtering) for the following | |
4 | basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton, wxRadioBox, | |
5 | wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl, wxCheckListBox. | |
6 | ||
7 | It checks the type of the window and uses an appropriate type for that window. For example, | |
8 | wxButton and wxTextCtrl transfer data to and from a wxString variable; wxListBox uses a | |
9 | wxArrayInt; wxCheckBox uses a bool. | |
10 | ||
11 | For 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 | ||
954b8ae6 JS |
19 | \wxheading{Include files} |
20 | ||
21 | <wx/valgen.h> | |
22 | ||
a7af285d VZ |
23 | \wxheading{Library} |
24 | ||
25 | \helpref{wxCore}{librarieslist} | |
26 | ||
89c684ef JS |
27 | \wxheading{See also} |
28 | ||
76e1c2de | 29 | \helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator}, |
8bb8ab39 | 30 | \helpref{wxTextValidator}{wxtextvalidator} |
89c684ef JS |
31 | |
32 | \latexignore{\rtfignore{\wxheading{Members}}} | |
33 | ||
f0e8a2d0 | 34 | \membersection{wxGenericValidator::wxGenericValidator}\label{wxgenericvalidatorctor} |
89c684ef JS |
35 | |
36 | \func{}{wxGenericValidator}{\param{const wxGenericValidator\&}{ validator}} | |
37 | ||
38 | Copy constructor. | |
39 | ||
40 | \func{}{wxGenericValidator}{\param{bool*}{ valPtr}} | |
41 | ||
c699b458 VZ |
42 | Constructor taking a bool pointer. This will be used for wxCheckBox, |
43 | wxRadioButton, wxToggleButton and wxBitmapToggleButton. | |
89c684ef JS |
44 | |
45 | \func{}{wxGenericValidator}{\param{wxString*}{ valPtr}} | |
46 | ||
c699b458 VZ |
47 | Constructor taking a wxString pointer. This will be used for wxButton, |
48 | wxComboBox, wxStaticText, wxTextCtrl. | |
89c684ef JS |
49 | |
50 | \func{}{wxGenericValidator}{\param{int*}{ valPtr}} | |
51 | ||
c699b458 VZ |
52 | Constructor taking an integer pointer. This will be used for wxChoice, |
53 | wxGauge, wxScrollBar, wxRadioBox, wxSlider, wxSpinButton and | |
54 | wxSpinCtrl. | |
89c684ef JS |
55 | |
56 | \func{}{wxGenericValidator}{\param{wxArrayInt*}{ valPtr}} | |
57 | ||
58 | Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox. | |
59 | ||
22de6a40 VZ |
60 | \func{}{wxGenericValidator}{\param{wxDateTime*}{ valPtr}} |
61 | ||
62 | Constructor taking a \helpref{wxDateTime}{wxdatetime} pointer. This will be | |
63 | used for \helpref{wxDatePickerCtrl}{wxdatepickerctrl}. | |
64 | ||
89c684ef JS |
65 | \wxheading{Parameters} |
66 | ||
67 | \docparam{validator}{Validator to copy.} | |
68 | ||
69 | \docparam{valPtr}{A pointer to a variable that contains the value. This variable | |
70 | should have a lifetime equal to or longer than the validator lifetime (which is usually | |
71 | determined by the lifetime of the window).} | |
72 | ||
f0e8a2d0 | 73 | \membersection{wxGenericValidator::\destruct{wxGenericValidator}}\label{wxgenericvalidatordtor} |
89c684ef JS |
74 | |
75 | \func{}{\destruct{wxGenericValidator}}{\void} | |
76 | ||
77 | Destructor. | |
78 | ||
79 | \membersection{wxGenericValidator::Clone}\label{wxgenericvalidatorclone} | |
80 | ||
81 | \constfunc{virtual wxValidator*}{Clone}{\void} | |
82 | ||
83 | Clones the generic validator using the copy constructor. | |
84 | ||
85 | \membersection{wxGenericValidator::TransferFromWindow}\label{wxgenericvalidatortransferfromwindow} | |
86 | ||
384c9653 | 87 | \func{virtual bool}{TransferFromWindow}{} |
89c684ef | 88 | |
384c9653 | 89 | Transfers the value from the window to the appropriate data type. |
89c684ef JS |
90 | |
91 | \membersection{wxGenericValidator::TransferToWindow}\label{wxgenericvalidatortransfertowindow} | |
92 | ||
76e1c2de | 93 | \func{virtual bool}{TransferToWindow}{} |
89c684ef | 94 | |
384c9653 | 95 | Transfers the value to the window. |
89c684ef | 96 |