- long m_validatorStyle;
- wxString * m_stringValue;
- wxStringList m_includeList;
- wxStringList m_excludeList;
-
- bool CheckValidator() const
- {
- wxCHECK_MSG( m_validatorWindow, FALSE,
- _T("No window associated with validator") );
- wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)), FALSE,
- _T("wxTextValidator is only for wxTextCtrl's") );
- wxCHECK_MSG( m_stringValue, FALSE,
- _T("No variable storage for validator") );
-
- return TRUE;
- }
+
+ // returns true if all characters of the given string are present in m_includes
+ bool ContainsOnlyIncludedCharacters(const wxString& val) const;
+
+ // returns true if at least one character of the given string is present in m_excludes
+ bool ContainsExcludedCharacters(const wxString& val) const;
+
+ // returns the error message if the contents of 'val' are invalid
+ virtual wxString IsValid(const wxString& val) const;
+
+protected:
+ long m_validatorStyle;
+ wxString* m_stringValue;
+ wxArrayString m_includes;
+ wxArrayString m_excludes;
+
+private:
+ wxDECLARE_NO_ASSIGN_CLASS(wxTextValidator);
+ DECLARE_DYNAMIC_CLASS(wxTextValidator)
+ DECLARE_EVENT_TABLE()