X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31528cd3cac75558beef4bce0ba21fd182a808ab..93d4c1d03b162957dddace3c22f12f0e7b5bbf06:/src/motif/control.cpp diff --git a/src/motif/control.cpp b/src/motif/control.cpp index 06019980d6..310c2c6861 100644 --- a/src/motif/control.cpp +++ b/src/motif/control.cpp @@ -13,18 +13,24 @@ #pragma implementation "control.h" #endif +#include "wx/defs.h" + #include "wx/control.h" #include "wx/panel.h" #include "wx/utils.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif -#if !USE_SHARED_LIBRARY IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) BEGIN_EVENT_TABLE(wxControl, wxWindow) END_EVENT_TABLE() -#endif // Item members wxControl::wxControl() @@ -39,6 +45,23 @@ wxControl::wxControl() m_inSetValue = FALSE; } +bool wxControl::Create( wxWindow *parent, + wxWindowID id, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator& validator, + const wxString &name) +{ + bool ret = wxWindow::Create(parent, id, pos, size, style, name); + +#if wxUSE_VALIDATORS + SetValidator(validator); +#endif + + return ret; +} + wxControl::~wxControl() { // If we delete an item, we should initialize the parent panel, @@ -46,7 +69,7 @@ wxControl::~wxControl() wxPanel *panel = wxDynamicCast(GetParent(), wxPanel); if (panel) { - if (panel->GetDefaultItem() == this) + if ( (wxControl *)panel->GetDefaultItem() == this) panel->SetDefaultItem((wxButton*) NULL); } }