no changes, just come cleanup and more comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -39,17 +39,19 @@ Copy constructor.
|
|||||||
|
|
||||||
\func{}{wxGenericValidator}{\param{bool*}{ valPtr}}
|
\func{}{wxGenericValidator}{\param{bool*}{ valPtr}}
|
||||||
|
|
||||||
Constructor taking a bool pointer. This will be used for wxCheckBox and wxRadioButton.
|
Constructor taking a bool pointer. This will be used for wxCheckBox,
|
||||||
|
wxRadioButton, wxToggleButton and wxBitmapToggleButton.
|
||||||
|
|
||||||
\func{}{wxGenericValidator}{\param{wxString*}{ valPtr}}
|
\func{}{wxGenericValidator}{\param{wxString*}{ valPtr}}
|
||||||
|
|
||||||
Constructor taking a wxString pointer. This will be used for wxButton, wxComboBox, wxStaticText,
|
Constructor taking a wxString pointer. This will be used for wxButton,
|
||||||
wxTextCtrl.
|
wxComboBox, wxStaticText, wxTextCtrl.
|
||||||
|
|
||||||
\func{}{wxGenericValidator}{\param{int*}{ valPtr}}
|
\func{}{wxGenericValidator}{\param{int*}{ valPtr}}
|
||||||
|
|
||||||
Constructor taking an integer pointer. This will be used for wxGauge, wxScrollBar, wxRadioBox, wxSpinButton,
|
Constructor taking an integer pointer. This will be used for wxChoice,
|
||||||
wxChoice.
|
wxGauge, wxScrollBar, wxRadioBox, wxSlider, wxSpinButton and
|
||||||
|
wxSpinCtrl.
|
||||||
|
|
||||||
\func{}{wxGenericValidator}{\param{wxArrayInt*}{ valPtr}}
|
\func{}{wxGenericValidator}{\param{wxArrayInt*}{ valPtr}}
|
||||||
|
|
||||||
|
@@ -2,9 +2,8 @@
|
|||||||
// Name: valgen.h
|
// Name: valgen.h
|
||||||
// Purpose: wxGenericValidator class
|
// Purpose: wxGenericValidator class
|
||||||
// Author: Kevin Smith
|
// Author: Kevin Smith
|
||||||
// Modified by:
|
|
||||||
// Created: Jan 22 1999
|
// Created: Jan 22 1999
|
||||||
// RCS-ID:
|
// RCS-ID: $Id:$
|
||||||
// Copyright: (c) 1999 Julian Smart (assigned from Kevin)
|
// Copyright: (c) 1999 Julian Smart (assigned from Kevin)
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -18,15 +17,29 @@
|
|||||||
|
|
||||||
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxGenericValidator performs data transfer between many standard controls and
|
||||||
|
// variables of the type corresponding to their values.
|
||||||
|
//
|
||||||
|
// It doesn't do any validation so its name is a slight misnomer.
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxGenericValidator: public wxValidator
|
class WXDLLEXPORT wxGenericValidator: public wxValidator
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxGenericValidator)
|
|
||||||
public:
|
public:
|
||||||
|
// Different constructors: each of them creates a validator which can only
|
||||||
|
// be used with some controls, the comments before each constructor
|
||||||
|
// indicate which ones:
|
||||||
|
// wxCheckBox, wxRadioButton, wx(Bitmap)ToggleButton
|
||||||
wxGenericValidator(bool* val);
|
wxGenericValidator(bool* val);
|
||||||
|
// wxChoice, wxGauge, wxRadioBox, wxScrollBar, wxSlider, wxSpinButton
|
||||||
wxGenericValidator(int* val);
|
wxGenericValidator(int* val);
|
||||||
|
// wxComboBox, wxTextCtrl, wxButton, wxStaticText (read-only)
|
||||||
wxGenericValidator(wxString* val);
|
wxGenericValidator(wxString* val);
|
||||||
|
// wxListBox, wxCheckListBox
|
||||||
wxGenericValidator(wxArrayInt* val);
|
wxGenericValidator(wxArrayInt* val);
|
||||||
#if wxUSE_DATETIME
|
#if wxUSE_DATETIME
|
||||||
|
// wxDatePickerCtrl
|
||||||
wxGenericValidator(wxDateTime* val);
|
wxGenericValidator(wxDateTime* val);
|
||||||
#endif // wxUSE_DATETIME
|
#endif // wxUSE_DATETIME
|
||||||
wxGenericValidator(const wxGenericValidator& copyFrom);
|
wxGenericValidator(const wxGenericValidator& copyFrom);
|
||||||
@@ -40,8 +53,8 @@ public:
|
|||||||
virtual wxObject *Clone() const { return new wxGenericValidator(*this); }
|
virtual wxObject *Clone() const { return new wxGenericValidator(*this); }
|
||||||
bool Copy(const wxGenericValidator& val);
|
bool Copy(const wxGenericValidator& val);
|
||||||
|
|
||||||
// Called when the value in the window must be validated.
|
// Called when the value in the window must be validated: this is not used
|
||||||
// This function can pop up an error message.
|
// by this class
|
||||||
virtual bool Validate(wxWindow * WXUNUSED(parent)) { return true; }
|
virtual bool Validate(wxWindow * WXUNUSED(parent)) { return true; }
|
||||||
|
|
||||||
// Called to transfer data to the window
|
// Called to transfer data to the window
|
||||||
@@ -62,16 +75,10 @@ protected:
|
|||||||
#endif // wxUSE_DATETIME
|
#endif // wxUSE_DATETIME
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Cannot use
|
DECLARE_CLASS(wxGenericValidator)
|
||||||
// DECLARE_NO_COPY_CLASS(wxGenericValidator)
|
DECLARE_NO_ASSIGN_CLASS(wxGenericValidator)
|
||||||
// because copy constructor is explicitly declared above;
|
|
||||||
// but no copy assignment operator is defined, so declare
|
|
||||||
// it private to prevent the compiler from defining it:
|
|
||||||
wxGenericValidator& operator=(const wxGenericValidator&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // wxUSE_VALIDATORS
|
||||||
// wxUSE_VALIDATORS
|
|
||||||
|
|
||||||
#endif
|
#endif // _WX_VALGENH__
|
||||||
// _WX_VALGENH__
|
|
||||||
|
Reference in New Issue
Block a user