git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39656
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/control.h"
#include "wx/dc.h"
#include "wx/textctrl.h"
#include "wx/control.h"
#include "wx/dc.h"
#include "wx/textctrl.h"
+ #include "wx/validate.h"
#endif // wxUSE_GUI
#endif
#include "wx/module.h"
#endif // wxUSE_GUI
#endif
#include "wx/module.h"
-#if wxUSE_GUI
- #include "wx/validate.h"
-#if wxUSE_STOPWATCH
+#if wxUSE_GUI && wxUSE_STOPWATCH
#include "wx/stopwatch.h"
#include "wx/stopwatch.h"
-#endif
-#endif // wxUSE_GUI
+#endif // wxUSE_GUI && wxUSE_STOPWATCH
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
// wxWin macros
+#include "wx/validate.h"
+
#ifndef WX_PRECOMP
#include "wx/window.h"
#endif
#ifndef WX_PRECOMP
#include "wx/window.h"
#endif
-#include "wx/validate.h"
-
const wxValidator wxDefaultValidator;
IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)
const wxValidator wxDefaultValidator;
IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/common/valtext.cpp
// Purpose: wxTextValidator
// Author: Julian Smart
// Modified by:
// Purpose: wxTextValidator
// Author: Julian Smart
// Modified by:
#if wxUSE_VALIDATORS && wxUSE_TEXTCTRL
#if wxUSE_VALIDATORS && wxUSE_TEXTCTRL
+#include "wx/valtext.h"
+
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/textctrl.h"
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/textctrl.h"
#include "wx/intl.h"
#endif
#include "wx/intl.h"
#endif
-#include "wx/valtext.h"
-
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
static bool wxIsAlpha(const wxString& val)
{
int i;
static bool wxIsAlpha(const wxString& val)
{
int i;
- for ( i = 0; i < (int)val.Length(); i++)
+ for ( i = 0; i < (int)val.length(); i++)
{
if (!wxIsalpha(val[i]))
return false;
{
if (!wxIsalpha(val[i]))
return false;
static bool wxIsAlphaNumeric(const wxString& val)
{
int i;
static bool wxIsAlphaNumeric(const wxString& val)
{
int i;
- for ( i = 0; i < (int)val.Length(); i++)
+ for ( i = 0; i < (int)val.length(); i++)
{
if (!wxIsalnum(val[i]))
return false;
{
if (!wxIsalnum(val[i]))
return false;
bool wxTextValidator::IsInCharIncludes(const wxString& val)
{
size_t i;
bool wxTextValidator::IsInCharIncludes(const wxString& val)
{
size_t i;
- for ( i = 0; i < val.Length(); i++)
+ for ( i = 0; i < val.length(); i++)
{
if (m_includes.Index((wxString) val[i]) == wxNOT_FOUND)
return false;
{
if (m_includes.Index((wxString) val[i]) == wxNOT_FOUND)
return false;
bool wxTextValidator::IsNotInCharExcludes(const wxString& val)
{
size_t i;
bool wxTextValidator::IsNotInCharExcludes(const wxString& val)
{
size_t i;
- for ( i = 0; i < val.Length(); i++)
+ for ( i = 0; i < val.length(); i++)
{
if (m_excludes.Index((wxString) val[i]) != wxNOT_FOUND)
return false;
{
if (m_excludes.Index((wxString) val[i]) != wxNOT_FOUND)
return false;
static bool wxIsNumeric(const wxString& val)
{
int i;
static bool wxIsNumeric(const wxString& val)
{
int i;
- for ( i = 0; i < (int)val.Length(); i++)
+ for ( i = 0; i < (int)val.length(); i++)
{
// Allow for "," (French) as well as "." -- in future we should
// use wxSystemSettings or other to do better localisation
{
// Allow for "," (French) as well as "." -- in future we should
// use wxSystemSettings or other to do better localisation
#include "wx/intl.h"
#include "wx/stattext.h"
#include "wx/filedlg.h"
#include "wx/intl.h"
#include "wx/stattext.h"
#include "wx/filedlg.h"
+ #include "wx/valtext.h"
#endif // WX_PRECOMP
#include "wx/filename.h"
#endif // WX_PRECOMP
#include "wx/filename.h"
#include "wx/mimetype.h"
#include "wx/statline.h"
#include "wx/mimetype.h"
#include "wx/statline.h"
#ifdef __WXMSW__
#include "wx/evtloop.h" // for SetCriticalWindow()
#ifdef __WXMSW__
#include "wx/evtloop.h" // for SetCriticalWindow()