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