Support float, double and file name values in wxGenericValidator.
Currently these values can only be read from/written to wxTextCtrl but support for other controls (e.g. wxSpinCtrlDouble for float/double) could be added in the future. Closes #13304. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#if wxUSE_VALIDATORS
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
||||
class WXDLLIMPEXP_FWD_BASE wxFileName;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGenericValidator performs data transfer between many standard controls and
|
||||
@@ -42,6 +43,13 @@ public:
|
||||
// wxDatePickerCtrl
|
||||
wxGenericValidator(wxDateTime* val);
|
||||
#endif // wxUSE_DATETIME
|
||||
// wxTextCtrl
|
||||
wxGenericValidator(wxFileName* val);
|
||||
// wxTextCtrl
|
||||
wxGenericValidator(float* val);
|
||||
// wxTextCtrl
|
||||
wxGenericValidator(double* val);
|
||||
|
||||
wxGenericValidator(const wxGenericValidator& copyFrom);
|
||||
|
||||
virtual ~wxGenericValidator(){}
|
||||
@@ -73,6 +81,9 @@ protected:
|
||||
#if wxUSE_DATETIME
|
||||
wxDateTime* m_pDateTime;
|
||||
#endif // wxUSE_DATETIME
|
||||
wxFileName* m_pFileName;
|
||||
float* m_pFloat;
|
||||
double* m_pDouble;
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxGenericValidator)
|
||||
|
Reference in New Issue
Block a user