add SetCharIncludes and SetCharExcludes utilities to wxTextValidator; use iterators when scanning wxStrings; fix typo in ContainsExcludedCharacters (reversed return values); modify the sample to show wxTextValidator with wxFILTER_EXCLUDE_CHAR_LIST

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-01-31 22:41:51 +00:00
parent c27dce1818
commit fcd209b6a2
5 changed files with 72 additions and 21 deletions

View File

@@ -49,12 +49,12 @@ enum wxTextValidatorStyle
/// Use an include list. The validator checks if each input character is
/// in the list (one character per list element), complaining if not.
/// See wxTextValidator::SetIncludes().
/// See wxTextValidator::SetCharIncludes().
wxFILTER_INCLUDE_CHAR_LIST,
/// Use an include list. The validator checks if each input character is
/// Use an exclude list. The validator checks if each input character is
/// in the list (one character per list element), complaining if it is.
/// See wxTextValidator::SetExcludes().
/// See wxTextValidator::SetCharExcludes().
wxFILTER_EXCLUDE_CHAR_LIST
};
@@ -123,11 +123,29 @@ public:
*/
void SetExcludes(const wxArrayString& stringList);
/**
Breaks the given @a chars strings in single characters and sets the
internal wxArrayString used to store the "excluded" characters
(see SetExcludes()).
This function is mostly useful when @c wxFILTER_EXCLUDE_CHAR_LIST was used.
*/
void SetCharExcludes(const wxString& chars);
/**
Sets the include list (valid values for the user input).
*/
void SetIncludes(const wxArrayString& stringList);
/**
Breaks the given @a chars strings in single characters and sets the
internal wxArrayString used to store the "included" characters
(see SetIncludes()).
This function is mostly useful when @c wxFILTER_INCLUDE_CHAR_LIST was used.
*/
void SetCharIncludes(const wxString& chars);
/**
Sets the validator style.
*/