Add wxIntegerValidator and wxFloatingPointValidator classes.

Add validators for integer and floating point numbers.

Add an example of their use to the validate sample as well as a new unit test
and documentation for them.

Use the new classes instead of wxTextValidator in wxGrid code.

Closes #12166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-01-19 10:48:28 +00:00
parent 0d30c79b44
commit a54cf37118
34 changed files with 1665 additions and 16 deletions

View File

@@ -31,18 +31,13 @@ public:
{
// We need to use a locale with known decimal point and which uses the
// thousands separator for the tests to make sense.
wxLanguage lang;
if ( wxLocale::IsAvailable(wxLANGUAGE_ENGLISH_US) )
lang = wxLANGUAGE_ENGLISH_US;
else if ( wxLocale::IsAvailable(wxLANGUAGE_ENGLISH_UK) )
lang = wxLANGUAGE_ENGLISH_UK;
else
m_locale = new wxLocale(wxLANGUAGE_ENGLISH_UK,
wxLOCALE_DONT_LOAD_DEFAULT);
if ( !m_locale->IsOk() )
{
delete m_locale;
m_locale = NULL;
return;
}
m_locale = new wxLocale(lang, wxLOCALE_DONT_LOAD_DEFAULT);
}
virtual ~NumFormatterTestCase()