X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c913512a4c9f36e11e07ea707002fab1608d324..77da37be726200a3dfbfb2fc8c51280c1e01e40e:/interface/valgen.h diff --git a/interface/valgen.h b/interface/valgen.h index c0a477067d..00ebc56fd4 100644 --- a/interface/valgen.h +++ b/interface/valgen.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: valgen.h -// Purpose: documentation for wxGenericValidator class +// Purpose: interface of wxGenericValidator // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -10,53 +10,88 @@ @class wxGenericValidator @wxheader{valgen.h} - wxGenericValidator performs data transfer (but not validation or filtering) for - the following - basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton, - wxRadioBox, - wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl, - wxCheckListBox. + wxGenericValidator performs data transfer (but not validation or filtering) + for the following basic controls: wxButton, wxCheckBox, wxListBox, + wxStaticText, wxRadioButton, wxRadioBox, wxChoice, wxComboBox, wxGauge, + wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl, wxCheckListBox. - It checks the type of the window and uses an appropriate type for that window. - For example, - wxButton and wxTextCtrl transfer data to and from a wxString variable; - wxListBox uses a - wxArrayInt; wxCheckBox uses a bool. + It checks the type of the window and uses an appropriate type for that + window. For example, wxButton and wxTextCtrl transfer data to and from a + wxString variable; wxListBox uses a wxArrayInt; wxCheckBox uses a bool. - For more information, please see @ref overview_validatoroverview "Validator - overview". + For more information, please see @ref overview_validator. @library{wxcore} @category{validator} - @seealso - @ref overview_validatoroverview "Validator overview", wxValidator, - wxTextValidator + @see @ref overview_validator, wxValidator, wxTextValidator */ class wxGenericValidator : public wxValidator { public: - //@{ /** - Constructor taking a wxDateTime pointer. This will be - used for wxDatePickerCtrl. - + Copy constructor. + @param validator - Validator to copy. - - @param valPtr - A pointer to a variable that contains the value. This variable - should have a lifetime equal to or longer than the validator lifetime (which is - usually - determined by the lifetime of the window). + Validator to copy. */ wxGenericValidator(const wxGenericValidator& validator); + /** + Constructor taking a bool pointer. This will be used for wxCheckBox, + wxRadioButton, wxToggleButton and wxBitmapToggleButton. + + @param valPtr + A pointer to a variable that contains the value. This variable + should have a lifetime equal to or longer than the validator + lifetime (which is usually determined by the lifetime of the + window). + */ wxGenericValidator(bool* valPtr); + /** + Constructor taking a wxString pointer. This will be used for wxButton, + wxComboBox, wxStaticText, wxTextCtrl. + + @param valPtr + A pointer to a variable that contains the value. This variable + should have a lifetime equal to or longer than the validator + lifetime (which is usually determined by the lifetime of the + window). + */ wxGenericValidator(wxString* valPtr); + /** + Constructor taking an integer pointer. This will be used for wxChoice, + wxGauge, wxScrollBar, wxRadioBox, wxSlider, wxSpinButton and + wxSpinCtrl. + + @param valPtr + A pointer to a variable that contains the value. This variable + should have a lifetime equal to or longer than the validator + lifetime (which is usually determined by the lifetime of the + window). + */ wxGenericValidator(int* valPtr); + /** + Constructor taking a wxArrayInt pointer. This will be used for + wxListBox, wxCheckListBox. + + @param valPtr + A pointer to a variable that contains the value. This variable + should have a lifetime equal to or longer than the validator + lifetime (which is usually determined by the lifetime of the + window). + */ wxGenericValidator(wxArrayInt* valPtr); + /** + Constructor taking a wxDateTime pointer. This will be used for + wxDatePickerCtrl. + + @param valPtr + A pointer to a variable that contains the value. This variable + should have a lifetime equal to or longer than the validator + lifetime (which is usually determined by the lifetime of the + window). + */ wxGenericValidator(wxDateTime* valPtr); - //@} /** Destructor. @@ -66,7 +101,7 @@ public: /** Clones the generic validator using the copy constructor. */ - virtual wxValidator* Clone(); + virtual wxValidator* Clone() const; /** Transfers the value from the window to the appropriate data type. @@ -78,3 +113,4 @@ public: */ virtual bool TransferToWindow(); }; +