]> git.saurik.com Git - wxWidgets.git/blob - interface/valgen.h
wxUniv compilation fix for gs_windowHandles assignment
[wxWidgets.git] / interface / valgen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: valgen.h
3 // Purpose: documentation for wxGenericValidator class
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxGenericValidator
11 @wxheader{valgen.h}
12
13 wxGenericValidator performs data transfer (but not validation or filtering) for
14 the following
15 basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton,
16 wxRadioBox,
17 wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl,
18 wxCheckListBox.
19
20 It checks the type of the window and uses an appropriate type for that window.
21 For example,
22 wxButton and wxTextCtrl transfer data to and from a wxString variable;
23 wxListBox uses a
24 wxArrayInt; wxCheckBox uses a bool.
25
26 For more information, please see @ref overview_validatoroverview "Validator
27 overview".
28
29 @library{wxcore}
30 @category{validator}
31
32 @seealso
33 @ref overview_validatoroverview "Validator overview", wxValidator,
34 wxTextValidator
35 */
36 class wxGenericValidator : public wxValidator
37 {
38 public:
39 //@{
40 /**
41 Constructor taking a wxDateTime pointer. This will be
42 used for wxDatePickerCtrl.
43
44 @param validator
45 Validator to copy.
46
47 @param valPtr
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
50 usually
51 determined by the lifetime of the window).
52 */
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);
59 //@}
60
61 /**
62 Destructor.
63 */
64 ~wxGenericValidator();
65
66 /**
67 Clones the generic validator using the copy constructor.
68 */
69 virtual wxValidator* Clone();
70
71 /**
72 Transfers the value from the window to the appropriate data type.
73 */
74 virtual bool TransferFromWindow();
75
76 /**
77 Transfers the value to the window.
78 */
79 virtual bool TransferToWindow();
80 };