]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/valgen.h
Applied minor documentation corrections to wxRegKey from charles (fixes #10407).
[wxWidgets.git] / interface / wx / valgen.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: valgen.h
e54c96f1 3// Purpose: interface of wxGenericValidator
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxGenericValidator
7c913512 11
fbec75d0
BP
12 wxGenericValidator performs data transfer (but not validation or filtering)
13 for the following basic controls: wxButton, wxCheckBox, wxListBox,
14 wxStaticText, wxRadioButton, wxRadioBox, wxChoice, wxComboBox, wxGauge,
15 wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl, wxCheckListBox.
16
17 It checks the type of the window and uses an appropriate type for that
18 window. For example, wxButton and wxTextCtrl transfer data to and from a
19 wxString variable; wxListBox uses a wxArrayInt; wxCheckBox uses a bool.
20
21 For more information, please see @ref overview_validator.
7c913512 22
23324ae1
FM
23 @library{wxcore}
24 @category{validator}
7c913512 25
fbec75d0 26 @see @ref overview_validator, wxValidator, wxTextValidator
23324ae1
FM
27*/
28class wxGenericValidator : public wxValidator
29{
30public:
23324ae1 31 /**
fbec75d0 32 Copy constructor.
3c4f71cc 33
7c913512 34 @param validator
4cc4bfaf 35 Validator to copy.
fbec75d0
BP
36 */
37 wxGenericValidator(const wxGenericValidator& validator);
38 /**
39 Constructor taking a bool pointer. This will be used for wxCheckBox,
40 wxRadioButton, wxToggleButton and wxBitmapToggleButton.
41
7c913512 42 @param valPtr
4cc4bfaf 43 A pointer to a variable that contains the value. This variable
fbec75d0
BP
44 should have a lifetime equal to or longer than the validator
45 lifetime (which is usually determined by the lifetime of the
46 window).
23324ae1 47 */
7c913512 48 wxGenericValidator(bool* valPtr);
fbec75d0
BP
49 /**
50 Constructor taking a wxString pointer. This will be used for wxButton,
51 wxComboBox, wxStaticText, wxTextCtrl.
52
53 @param valPtr
54 A pointer to a variable that contains the value. This variable
55 should have a lifetime equal to or longer than the validator
56 lifetime (which is usually determined by the lifetime of the
57 window).
58 */
7c913512 59 wxGenericValidator(wxString* valPtr);
fbec75d0
BP
60 /**
61 Constructor taking an integer pointer. This will be used for wxChoice,
62 wxGauge, wxScrollBar, wxRadioBox, wxSlider, wxSpinButton and
63 wxSpinCtrl.
64
65 @param valPtr
66 A pointer to a variable that contains the value. This variable
67 should have a lifetime equal to or longer than the validator
68 lifetime (which is usually determined by the lifetime of the
69 window).
70 */
7c913512 71 wxGenericValidator(int* valPtr);
fbec75d0
BP
72 /**
73 Constructor taking a wxArrayInt pointer. This will be used for
74 wxListBox, wxCheckListBox.
75
76 @param valPtr
77 A pointer to a variable that contains the value. This variable
78 should have a lifetime equal to or longer than the validator
79 lifetime (which is usually determined by the lifetime of the
80 window).
81 */
7c913512 82 wxGenericValidator(wxArrayInt* valPtr);
fbec75d0
BP
83 /**
84 Constructor taking a wxDateTime pointer. This will be used for
85 wxDatePickerCtrl.
86
87 @param valPtr
88 A pointer to a variable that contains the value. This variable
89 should have a lifetime equal to or longer than the validator
90 lifetime (which is usually determined by the lifetime of the
91 window).
92 */
7c913512 93 wxGenericValidator(wxDateTime* valPtr);
23324ae1
FM
94
95 /**
96 Destructor.
97 */
adaaa686 98 virtual ~wxGenericValidator();
23324ae1
FM
99
100 /**
101 Clones the generic validator using the copy constructor.
102 */
43c48e1e 103 virtual wxObject* Clone() const;
23324ae1
FM
104
105 /**
106 Transfers the value from the window to the appropriate data type.
107 */
108 virtual bool TransferFromWindow();
109
110 /**
111 Transfers the value to the window.
112 */
113 virtual bool TransferToWindow();
114};
e54c96f1 115