]>
git.saurik.com Git - wxWidgets.git/blob - interface/valgen.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxGenericValidator
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
32 @see @ref overview_validatoroverview "Validator overview", wxValidator,
35 class wxGenericValidator
: public wxValidator
40 Constructor taking a wxDateTime pointer. This will be
41 used for wxDatePickerCtrl.
46 A pointer to a variable that contains the value. This variable
47 should have a lifetime equal to or longer than the validator lifetime
49 determined by the lifetime of the window).
51 wxGenericValidator(const wxGenericValidator
& validator
);
52 wxGenericValidator(bool* valPtr
);
53 wxGenericValidator(wxString
* valPtr
);
54 wxGenericValidator(int* valPtr
);
55 wxGenericValidator(wxArrayInt
* valPtr
);
56 wxGenericValidator(wxDateTime
* valPtr
);
62 ~wxGenericValidator();
65 Clones the generic validator using the copy constructor.
67 virtual wxValidator
* Clone() const;
70 Transfers the value from the window to the appropriate data type.
72 virtual bool TransferFromWindow();
75 Transfers the value to the window.
77 virtual bool TransferToWindow();