1. more warnings fixes in gtk/region.cpp and common/tbarsmpl.cpp

2. wxWindow::Create() always takes a wxValidator parameter, even if
   !wxUSE_VALIDATORS - it is just ignored then, tons of #if wxUSE_VALIDATORS
   removed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-01-06 16:47:48 +00:00
parent a6fc8ae3c2
commit 674ac8b919
21 changed files with 71 additions and 141 deletions

View File

@@ -41,23 +41,9 @@ protected:
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS
const wxValidator& validator, const wxValidator& validator,
#endif
const wxString& name); const wxString& name);
// an overloaded version for the controls without validators
bool CreateControl(wxWindowBase *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
return CreateControl(parent, id, pos, size, style,
wxDefaultValidator, name);
}
// inherit colour and font settings from the parent window // inherit colour and font settings from the parent window
void InheritAttributes(); void InheritAttributes();
}; };

View File

@@ -251,9 +251,7 @@ public:
const wxString &value = "", const wxString &value = "",
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
int style = 0, int style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString &name = "wxListTextCtrlText" ); const wxString &name = "wxListTextCtrlText" );
void OnChar( wxKeyEvent &event ); void OnChar( wxKeyEvent &event );
void OnKillFocus( wxFocusEvent &event ); void OnKillFocus( wxFocusEvent &event );
@@ -379,22 +377,24 @@ class WXDLLEXPORT wxListCtrl: public wxControl
{ {
public: public:
wxListCtrl(); wxListCtrl();
wxListCtrl( wxWindow *parent, wxWindowID id = -1, wxListCtrl( wxWindow *parent,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, wxWindowID id = -1,
#if wxUSE_VALIDATORS const wxPoint &pos = wxDefaultPosition,
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxSize &size = wxDefaultSize,
#endif long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
const wxString &name = "listctrl" ) const wxString &name = "listctrl" )
{ {
Create(parent, id, pos, size, style, validator, name); Create(parent, id, pos, size, style, validator, name);
} }
~wxListCtrl(); ~wxListCtrl();
bool Create( wxWindow *parent, wxWindowID id = -1, bool Create( wxWindow *parent,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, wxWindowID id = -1,
#if wxUSE_VALIDATORS const wxPoint &pos = wxDefaultPosition,
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxSize &size = wxDefaultSize,
#endif long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
const wxString &name = "listctrl" ); const wxString &name = "listctrl" );
bool GetColumn( int col, wxListItem& item ) const; bool GetColumn( int col, wxListItem& item ) const;

View File

@@ -131,9 +131,7 @@ class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl
const wxString &value = wxEmptyString, const wxString &value = wxEmptyString,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
int style = 0, int style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString &name = wxTextCtrlNameStr ); const wxString &name = wxTextCtrlNameStr );
void OnChar( wxKeyEvent &event ); void OnChar( wxKeyEvent &event );
void OnKillFocus( wxFocusEvent &event ); void OnKillFocus( wxFocusEvent &event );
@@ -156,9 +154,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
#if wxUSE_VALIDATORS
const wxValidator &validator = wxDefaultValidator, const wxValidator &validator = wxDefaultValidator,
#endif
const wxString& name = wxTreeCtrlNameStr) const wxString& name = wxTreeCtrlNameStr)
{ {
Create(parent, id, pos, size, style, validator, name); Create(parent, id, pos, size, style, validator, name);
@@ -170,9 +166,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
#if wxUSE_VALIDATORS
const wxValidator &validator = wxDefaultValidator, const wxValidator &validator = wxDefaultValidator,
#endif
const wxString& name = wxTreeCtrlNameStr); const wxString& name = wxTreeCtrlNameStr);
// accessors // accessors

View File

@@ -38,24 +38,16 @@ public:
wxControl(wxWindow *parent, wxWindowID id, wxControl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString& name = wxControlNameStr) const wxString& name = wxControlNameStr)
{ {
Create(parent, id, pos, size, style, Create(parent, id, pos, size, style, validator, name);
#if wxUSE_VALIDATORS
validator,
#endif
name);
} }
bool Create(wxWindow *parent, wxWindowID id, bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString& name = wxControlNameStr); const wxString& name = wxControlNameStr);
// this function will filter out '&' characters and will put the accelerator // this function will filter out '&' characters and will put the accelerator

View File

@@ -38,24 +38,16 @@ public:
wxControl(wxWindow *parent, wxWindowID id, wxControl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString& name = wxControlNameStr) const wxString& name = wxControlNameStr)
{ {
Create(parent, id, pos, size, style, Create(parent, id, pos, size, style, validator, name);
#if wxUSE_VALIDATORS
validator,
#endif
name);
} }
bool Create(wxWindow *parent, wxWindowID id, bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString& name = wxControlNameStr); const wxString& name = wxControlNameStr);
// this function will filter out '&' characters and will put the accelerator // this function will filter out '&' characters and will put the accelerator

View File

@@ -29,14 +29,6 @@ class WXDLLEXPORT wxControl: public wxWindow
public: public:
wxControl(); wxControl();
wxControl( wxWindow *parent,
wxWindowID id,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = 0,
const wxString &name = wxControlNameStr );
#if wxUSE_VALIDATORS
wxControl( wxWindow *parent, wxControl( wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint &pos = wxDefaultPosition, const wxPoint &pos = wxDefaultPosition,
@@ -44,7 +36,7 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString &name = wxControlNameStr ); const wxString &name = wxControlNameStr );
#endif
~wxControl(); ~wxControl();
// simulates the event, returns TRUE if the event was processed // simulates the event, returns TRUE if the event was processed

View File

@@ -30,9 +30,7 @@ public:
wxControl(wxWindow *parent, wxWindowID id, wxControl(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString& name = wxControlNameStr) const wxString& name = wxControlNameStr)
{ {
Create(parent, id, pos, size, style, validator, name); Create(parent, id, pos, size, style, validator, name);
@@ -41,9 +39,7 @@ public:
bool Create(wxWindow *parent, wxWindowID id, bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif
const wxString& name = wxControlNameStr); const wxString& name = wxControlNameStr);
virtual ~wxControl(); virtual ~wxControl();

View File

@@ -16,14 +16,17 @@
#pragma interface "validate.h" #pragma interface "validate.h"
#endif #endif
#include "wx/event.h"
#if defined(wxUSE_VALIDATORS) && !wxUSE_VALIDATORS #if defined(wxUSE_VALIDATORS) && !wxUSE_VALIDATORS
// wxWindows is compiled without support for wxValidator // wxWindows is compiled without support for wxValidator, but we still
// want to be able to pass wxDefaultValidator to the functions which take
// a wxValidator parameter to avoid using "#if wxUSE_VALIDATORS"
// everywhere
class WXDLLEXPORT wxValidator; class WXDLLEXPORT wxValidator;
#define wxDefaultValidator (*((wxValidator *)NULL)) #define wxDefaultValidator (*((wxValidator *)NULL))
#else // wxUSE_VALIDATORS #else // wxUSE_VALIDATORS
#include "wx/event.h"
class WXDLLEXPORT wxWindow; class WXDLLEXPORT wxWindow;
class WXDLLEXPORT wxWindowBase; class WXDLLEXPORT wxWindowBase;

View File

@@ -30,9 +30,7 @@
#include "wx/region.h" #include "wx/region.h"
#include "wx/utils.h" #include "wx/utils.h"
#if wxUSE_VALIDATORS #include "wx/validate.h" // for wxDefaultValidator (always include it)
#include "wx/validate.h" // defines wxDefaultValidator
#endif // wxUSE_VALIDATORS
#if wxUSE_ACCEL #if wxUSE_ACCEL
#include "wx/accel.h" #include "wx/accel.h"
@@ -121,10 +119,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
#if wxUSE_VALIDATORS
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
#endif // wxUSE_VALIDATORS
const wxString& name = wxPanelNameStr); const wxString& name = wxPanelNameStr);
virtual ~wxWindowBase(); virtual ~wxWindowBase();

View File

@@ -75,6 +75,8 @@
#include "wx/dirdlg.h" #include "wx/dirdlg.h"
#include "wx/toolbar.h" #include "wx/toolbar.h"
#include "wx/validate.h" // always include, even if !wxUSE_VALIDATORS
#if wxUSE_VALIDATORS #if wxUSE_VALIDATORS
#include "wx/valtext.h" #include "wx/valtext.h"
#endif // wxUSE_VALIDATORS #endif // wxUSE_VALIDATORS

View File

@@ -42,9 +42,7 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS
const wxValidator& validator, const wxValidator& validator,
#endif
const wxString& name) const wxString& name)
{ {
// even if it's possible to create controls without parents in some port, // even if it's possible to create controls without parents in some port,

View File

@@ -158,9 +158,7 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
const wxPoint& WXUNUSED(pos), const wxPoint& WXUNUSED(pos),
const wxSize& WXUNUSED(size), const wxSize& WXUNUSED(size),
long style, long style,
#if wxUSE_VALIDATORS
const wxValidator& validator, const wxValidator& validator,
#endif
const wxString& name) const wxString& name)
{ {
// m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other // m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other
@@ -174,7 +172,10 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
SetName(name); SetName(name);
SetWindowStyleFlag(style); SetWindowStyleFlag(style);
SetParent(parent); SetParent(parent);
#if wxUSE_VALIDATORS
SetValidator(validator); SetValidator(validator);
#endif // wxUSE_VALIDATORS
return TRUE; return TRUE;
} }

View File

@@ -1027,13 +1027,18 @@ BEGIN_EVENT_TABLE(wxListTextCtrl,wxTextCtrl)
EVT_KILL_FOCUS (wxListTextCtrl::OnKillFocus) EVT_KILL_FOCUS (wxListTextCtrl::OnKillFocus)
END_EVENT_TABLE() END_EVENT_TABLE()
wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id, wxListTextCtrl::wxListTextCtrl( wxWindow *parent,
bool *accept, wxString *res, wxListMainWindow *owner, const wxWindowID id,
const wxString &value, const wxPoint &pos, const wxSize &size, bool *accept,
#if wxUSE_VALIDATORS wxString *res,
int style, const wxValidator& validator, const wxString &name ) : wxListMainWindow *owner,
#endif const wxString &value,
wxTextCtrl( parent, id, value, pos, size, style, validator, name ) const wxPoint &pos,
const wxSize &size,
int style,
const wxValidator& validator,
const wxString &name )
: wxTextCtrl( parent, id, value, pos, size, style, validator, name )
{ {
m_res = res; m_res = res;
m_accept = accept; m_accept = accept;
@@ -2679,9 +2684,7 @@ bool wxListCtrl::Create(wxWindow *parent,
const wxPoint &pos, const wxPoint &pos,
const wxSize &size, const wxSize &size,
long style, long style,
#if wxUSE_VALIDATORS
const wxValidator &validator, const wxValidator &validator,
#endif
const wxString &name) const wxString &name)
{ {
m_imageListNormal = (wxImageList *) NULL; m_imageListNormal = (wxImageList *) NULL;
@@ -2695,19 +2698,7 @@ bool wxListCtrl::Create(wxWindow *parent,
style = style | wxLC_LIST; style = style | wxLC_LIST;
} }
bool ret = wxControl::Create( parent, bool ret = wxControl::Create( parent, id, pos, size, style, validator, name );
id,
pos,
size,
style,
#if wxUSE_VALIDATORS
validator,
#endif
name );
#if wxUSE_VALIDATORS
SetValidator( validator );
#endif
if (style & wxSUNKEN_BORDER) if (style & wxSUNKEN_BORDER)
style -= wxSUNKEN_BORDER; style -= wxSUNKEN_BORDER;

View File

@@ -303,8 +303,8 @@ bool wxToolBarSimple::Realize()
m_lastX = m_xMargin; m_lastX = m_xMargin;
m_lastY += maxToolHeight + m_toolPacking; m_lastY += maxToolHeight + m_toolPacking;
} }
tool->m_x = (m_lastX + (maxToolWidth - tool->GetWidth())/2.0); tool->m_x = (wxCoord)(m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
tool->m_y = (m_lastY + (maxToolHeight - tool->GetHeight())/2.0); tool->m_y = (wxCoord)(m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
m_lastX += maxToolWidth + m_toolPacking; m_lastX += maxToolWidth + m_toolPacking;
} }
@@ -316,8 +316,8 @@ bool wxToolBarSimple::Realize()
m_lastX += (maxToolWidth + m_toolPacking); m_lastX += (maxToolWidth + m_toolPacking);
m_lastY = m_yMargin; m_lastY = m_yMargin;
} }
tool->m_x = (m_lastX + (maxToolWidth - tool->GetWidth())/2.0); tool->m_x = (wxCoord)(m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
tool->m_y = (m_lastY + (maxToolHeight - tool->GetHeight())/2.0); tool->m_y = (wxCoord)(m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
m_lastY += maxToolHeight + m_toolPacking; m_lastY += maxToolHeight + m_toolPacking;
} }

View File

@@ -208,13 +208,18 @@ BEGIN_EVENT_TABLE(wxTreeTextCtrl,wxTextCtrl)
EVT_KILL_FOCUS (wxTreeTextCtrl::OnKillFocus) EVT_KILL_FOCUS (wxTreeTextCtrl::OnKillFocus)
END_EVENT_TABLE() END_EVENT_TABLE()
wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id, wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent,
bool *accept, wxString *res, wxTreeCtrl *owner, const wxWindowID id,
const wxString &value, const wxPoint &pos, const wxSize &size, bool *accept,
#if wxUSE_VALIDATORS wxString *res,
int style, const wxValidator& validator, const wxString &name ) : wxTreeCtrl *owner,
#endif const wxString &value,
wxTextCtrl( parent, id, value, pos, size, style, validator, name ) const wxPoint &pos,
const wxSize &size,
int style,
const wxValidator& validator,
const wxString &name )
: wxTextCtrl( parent, id, value, pos, size, style, validator, name )
{ {
m_res = res; m_res = res;
m_accept = accept; m_accept = accept;
@@ -547,9 +552,7 @@ void wxTreeCtrl::Init()
bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size, const wxPoint& pos, const wxSize& size,
long style, long style,
#if wxUSE_VALIDATORS
const wxValidator &validator, const wxValidator &validator,
#endif
const wxString& name ) const wxString& name )
{ {
Init(); Init();

View File

@@ -31,9 +31,7 @@ bool wxControl::Create( wxWindow *parent,
const wxPoint &pos, const wxPoint &pos,
const wxSize &size, const wxSize &size,
long style, long style,
#if wxUSE_VALIDATORS
const wxValidator& validator, const wxValidator& validator,
#endif
const wxString &name ) const wxString &name )
{ {
bool ret = wxWindow::Create(parent, id, pos, size, style, name); bool ret = wxWindow::Create(parent, id, pos, size, style, name);

View File

@@ -349,22 +349,22 @@ void wxRegionIterator::Reset( const wxRegion& region )
wxRegionIterator::operator bool () const wxRegionIterator::operator bool () const
{ {
return m_current < m_region.GetRectList()->Number(); return m_current < (size_t)m_region.GetRectList()->Number();
} }
bool wxRegionIterator::HaveRects() const bool wxRegionIterator::HaveRects() const
{ {
return m_current < m_region.GetRectList()->Number(); return m_current < (size_t)m_region.GetRectList()->Number();
} }
void wxRegionIterator::operator ++ () void wxRegionIterator::operator ++ ()
{ {
if (m_current < m_region.GetRectList()->Number()) ++m_current; if (m_current < (size_t)m_region.GetRectList()->Number()) ++m_current;
} }
void wxRegionIterator::operator ++ (int) void wxRegionIterator::operator ++ (int)
{ {
if (m_current < m_region.GetRectList()->Number()) ++m_current; if (m_current < (size_t)m_region.GetRectList()->Number()) ++m_current;
} }
wxCoord wxRegionIterator::GetX() const wxCoord wxRegionIterator::GetX() const

View File

@@ -31,9 +31,7 @@ bool wxControl::Create( wxWindow *parent,
const wxPoint &pos, const wxPoint &pos,
const wxSize &size, const wxSize &size,
long style, long style,
#if wxUSE_VALIDATORS
const wxValidator& validator, const wxValidator& validator,
#endif
const wxString &name ) const wxString &name )
{ {
bool ret = wxWindow::Create(parent, id, pos, size, style, name); bool ret = wxWindow::Create(parent, id, pos, size, style, name);

View File

@@ -349,22 +349,22 @@ void wxRegionIterator::Reset( const wxRegion& region )
wxRegionIterator::operator bool () const wxRegionIterator::operator bool () const
{ {
return m_current < m_region.GetRectList()->Number(); return m_current < (size_t)m_region.GetRectList()->Number();
} }
bool wxRegionIterator::HaveRects() const bool wxRegionIterator::HaveRects() const
{ {
return m_current < m_region.GetRectList()->Number(); return m_current < (size_t)m_region.GetRectList()->Number();
} }
void wxRegionIterator::operator ++ () void wxRegionIterator::operator ++ ()
{ {
if (m_current < m_region.GetRectList()->Number()) ++m_current; if (m_current < (size_t)m_region.GetRectList()->Number()) ++m_current;
} }
void wxRegionIterator::operator ++ (int) void wxRegionIterator::operator ++ (int)
{ {
if (m_current < m_region.GetRectList()->Number()) ++m_current; if (m_current < (size_t)m_region.GetRectList()->Number()) ++m_current;
} }
wxCoord wxRegionIterator::GetX() const wxCoord wxRegionIterator::GetX() const

View File

@@ -43,17 +43,6 @@ wxControl::wxControl()
m_inSetValue = FALSE; m_inSetValue = FALSE;
} }
wxControl::wxControl( wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
const wxSize &size,
long style,
const wxString &name )
{
(void)Create(parent, id, pos, size, style, name);
}
#if wxUSE_VALIDATORS
wxControl::wxControl( wxWindow *parent, wxControl::wxControl( wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint &pos, const wxPoint &pos,
@@ -63,9 +52,11 @@ wxControl::wxControl( wxWindow *parent,
const wxString &name) const wxString &name)
{ {
(void)Create(parent, id, pos, size, style, name); (void)Create(parent, id, pos, size, style, name);
#if wxUSE_VALIDATORS
SetValidator(validator); SetValidator(validator);
}
#endif #endif
}
wxControl::~wxControl() wxControl::~wxControl()
{ {

View File

@@ -60,9 +60,7 @@ wxControl::~wxControl()
bool wxControl::Create(wxWindow *parent, wxWindowID id, bool wxControl::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
#if wxUSE_VALIDATORS
const wxValidator& validator, const wxValidator& validator,
#endif
const wxString& name) const wxString& name)
{ {
bool rval = wxWindow::Create(parent, id, pos, size, style, name); bool rval = wxWindow::Create(parent, id, pos, size, style, name);