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:
Vadim Zeitlin
2011-07-09 23:37:28 +00:00
parent 065ba6fb09
commit e96be167e7
4 changed files with 103 additions and 0 deletions

View File

@@ -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)