]>
git.saurik.com Git - wxWidgets.git/blob - interface/valgen.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxGenericValidator class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxGenericValidator
13 wxGenericValidator performs data transfer (but not validation or filtering) for
15 basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton,
17 wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl,
20 It checks the type of the window and uses an appropriate type for that window.
22 wxButton and wxTextCtrl transfer data to and from a wxString variable;
24 wxArrayInt; wxCheckBox uses a bool.
26 For more information, please see @ref overview_validatoroverview "Validator
33 @ref overview_validatoroverview "Validator overview", wxValidator,
36 class wxGenericValidator
: public wxValidator
41 Constructor taking a wxDateTime pointer. This will be
42 used for wxDatePickerCtrl.
48 A pointer to a variable that contains the value. This variable
49 should have a lifetime equal to or longer than the validator lifetime (which is
51 determined by the lifetime of the window).
53 wxGenericValidator(const wxGenericValidator
& validator
);
54 wxGenericValidator(bool* valPtr
);
55 wxGenericValidator(wxString
* valPtr
);
56 wxGenericValidator(int* valPtr
);
57 wxGenericValidator(wxArrayInt
* valPtr
);
58 wxGenericValidator(wxDateTime
* valPtr
);
64 ~wxGenericValidator();
67 Clones the generic validator using the copy constructor.
69 virtual wxValidator
* Clone();
72 Transfers the value from the window to the appropriate data type.
74 virtual bool TransferFromWindow();
77 Transfers the value to the window.
79 virtual bool TransferToWindow();