1 \section{\class{wxGenericValidator
}}\label{wxgenericvalidator
}
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.
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.
11 For more information, please see
\helpref{Validator overview
}{validatoroverview
}.
13 \wxheading{Derived from
}
15 \helpref{wxValidator
}{wxvalidator
}\\
16 \helpref{wxEvtHandler
}{wxevthandler
}\\
17 \helpref{wxObject
}{wxobject
}
19 \wxheading{Include files
}
25 \helpref{wxCore
}{librarieslist
}
29 \helpref{Validator overview
}{validatoroverview
},
\helpref{wxValidator
}{wxvalidator
},
30 \helpref{wxTextValidator
}{wxtextvalidator
}
32 \latexignore{\rtfignore{\wxheading{Members
}}}
34 \membersection{wxGenericValidator::wxGenericValidator
}\label{wxgenericvalidatorctor
}
36 \func{}{wxGenericValidator
}{\param{const wxGenericValidator\&
}{ validator
}}
40 \func{}{wxGenericValidator
}{\param{bool*
}{ valPtr
}}
42 Constructor taking a bool pointer. This will be used for wxCheckBox,
43 wxRadioButton, wxToggleButton and wxBitmapToggleButton.
45 \func{}{wxGenericValidator
}{\param{wxString*
}{ valPtr
}}
47 Constructor taking a wxString pointer. This will be used for wxButton,
48 wxComboBox, wxStaticText, wxTextCtrl.
50 \func{}{wxGenericValidator
}{\param{int*
}{ valPtr
}}
52 Constructor taking an integer pointer. This will be used for wxChoice,
53 wxGauge, wxScrollBar, wxRadioBox, wxSlider, wxSpinButton and
56 \func{}{wxGenericValidator
}{\param{wxArrayInt*
}{ valPtr
}}
58 Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox.
60 \func{}{wxGenericValidator
}{\param{wxDateTime*
}{ valPtr
}}
62 Constructor taking a
\helpref{wxDateTime
}{wxdatetime
} pointer. This will be
63 used for
\helpref{wxDatePickerCtrl
}{wxdatepickerctrl
}.
65 \wxheading{Parameters
}
67 \docparam{validator
}{Validator to copy.
}
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).
}
73 \membersection{wxGenericValidator::
\destruct{wxGenericValidator
}}\label{wxgenericvalidatordtor
}
75 \func{}{\destruct{wxGenericValidator
}}{\void}
79 \membersection{wxGenericValidator::Clone
}\label{wxgenericvalidatorclone
}
81 \constfunc{virtual wxValidator*
}{Clone
}{\void}
83 Clones the generic validator using the copy constructor.
85 \membersection{wxGenericValidator::TransferFromWindow
}\label{wxgenericvalidatortransferfromwindow
}
87 \func{virtual bool
}{TransferFromWindow
}{}
89 Transfers the value from the window to the appropriate data type.
91 \membersection{wxGenericValidator::TransferToWindow
}\label{wxgenericvalidatortransfertowindow
}
93 \func{virtual bool
}{TransferToWindow
}{}
95 Transfers the value to the window.