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{Validator overview
}{validatoroverview
},
\helpref{wxValidator
}{wxvalidator
},
26 \helpref{wxTextValidator
}{wxtextvalidator
}
28 \latexignore{\rtfignore{\wxheading{Members
}}}
30 \membersection{wxGenericValidator::wxGenericValidator
}\label{wxgenericvalidatorconstr
}
32 \func{}{wxGenericValidator
}{\param{const wxGenericValidator\&
}{ validator
}}
36 \func{}{wxGenericValidator
}{\param{bool*
}{ valPtr
}}
38 Constructor taking a bool pointer. This will be used for wxCheckBox and wxRadioButton.
40 \func{}{wxGenericValidator
}{\param{wxString*
}{ valPtr
}}
42 Constructor taking a wxString pointer. This will be used for wxButton, wxComboBox, wxStaticText,
45 \func{}{wxGenericValidator
}{\param{int*
}{ valPtr
}}
47 Constructor taking an integer pointer. This will be used for wxGauge, wxScrollBar, wxRadioBox, wxSpinButton,
50 \func{}{wxGenericValidator
}{\param{wxArrayInt*
}{ valPtr
}}
52 Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox.
54 \wxheading{Parameters
}
56 \docparam{validator
}{Validator to copy.
}
58 \docparam{valPtr
}{A pointer to a variable that contains the value. This variable
59 should have a lifetime equal to or longer than the validator lifetime (which is usually
60 determined by the lifetime of the window).
}
62 \membersection{wxGenericValidator::
\destruct{wxGenericValidator
}}
64 \func{}{\destruct{wxGenericValidator
}}{\void}
68 \membersection{wxGenericValidator::Clone
}\label{wxgenericvalidatorclone
}
70 \constfunc{virtual wxValidator*
}{Clone
}{\void}
72 Clones the generic validator using the copy constructor.
74 \membersection{wxGenericValidator::TransferFromWindow
}\label{wxgenericvalidatortransferfromwindow
}
76 \func{virtual bool
}{TransferToWindow
}{\param{wxWindow*
}{ parent
}}
78 Transfers the value to the window.
80 \membersection{wxGenericValidator::TransferToWindow
}\label{wxgenericvalidatortransfertowindow
}
82 \func{virtual bool
}{TransferToWindow
}{\param{wxWindow*
}{ parent
}}
84 Transfers the window value to the appropriate data type.