]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/valgen.tex
add wxDatePickerCtrl support in wxGenericValidator (patch 1870174)
[wxWidgets.git] / docs / latex / wx / valgen.tex
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
19 \wxheading{Include files}
20
21 <wx/valgen.h>
22
23 \wxheading{Library}
24
25 \helpref{wxCore}{librarieslist}
26
27 \wxheading{See also}
28
29 \helpref{Validator overview}{validatoroverview}, \helpref{wxValidator}{wxvalidator},
30 \helpref{wxTextValidator}{wxtextvalidator}
31
32 \latexignore{\rtfignore{\wxheading{Members}}}
33
34 \membersection{wxGenericValidator::wxGenericValidator}\label{wxgenericvalidatorctor}
35
36 \func{}{wxGenericValidator}{\param{const wxGenericValidator\&}{ validator}}
37
38 Copy constructor.
39
40 \func{}{wxGenericValidator}{\param{bool*}{ valPtr}}
41
42 Constructor taking a bool pointer. This will be used for wxCheckBox and wxRadioButton.
43
44 \func{}{wxGenericValidator}{\param{wxString*}{ valPtr}}
45
46 Constructor taking a wxString pointer. This will be used for wxButton, wxComboBox, wxStaticText,
47 wxTextCtrl.
48
49 \func{}{wxGenericValidator}{\param{int*}{ valPtr}}
50
51 Constructor taking an integer pointer. This will be used for wxGauge, wxScrollBar, wxRadioBox, wxSpinButton,
52 wxChoice.
53
54 \func{}{wxGenericValidator}{\param{wxArrayInt*}{ valPtr}}
55
56 Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox.
57
58 \func{}{wxGenericValidator}{\param{wxDateTime*}{ valPtr}}
59
60 Constructor taking a \helpref{wxDateTime}{wxdatetime} pointer. This will be
61 used for \helpref{wxDatePickerCtrl}{wxdatepickerctrl}.
62
63 \wxheading{Parameters}
64
65 \docparam{validator}{Validator to copy.}
66
67 \docparam{valPtr}{A pointer to a variable that contains the value. This variable
68 should have a lifetime equal to or longer than the validator lifetime (which is usually
69 determined by the lifetime of the window).}
70
71 \membersection{wxGenericValidator::\destruct{wxGenericValidator}}\label{wxgenericvalidatordtor}
72
73 \func{}{\destruct{wxGenericValidator}}{\void}
74
75 Destructor.
76
77 \membersection{wxGenericValidator::Clone}\label{wxgenericvalidatorclone}
78
79 \constfunc{virtual wxValidator*}{Clone}{\void}
80
81 Clones the generic validator using the copy constructor.
82
83 \membersection{wxGenericValidator::TransferFromWindow}\label{wxgenericvalidatortransferfromwindow}
84
85 \func{virtual bool}{TransferFromWindow}{}
86
87 Transfers the value from the window to the appropriate data type.
88
89 \membersection{wxGenericValidator::TransferToWindow}\label{wxgenericvalidatortransfertowindow}
90
91 \func{virtual bool}{TransferToWindow}{}
92
93 Transfers the value to the window.
94