X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95814e4902f412f28940f1db6acc5e06a901f25f..f809133f9eb30d4746c71098bbc14c621b94ef0d:/src/motif/button.cpp?ds=sidebyside diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 610a94ef19..645f99cf44 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -13,20 +13,30 @@ #pragma implementation "button.h" #endif +#ifdef __VMS +#define XtDisplay XTDISPLAY +#endif + +#include "wx/defs.h" + #include "wx/button.h" #include "wx/utils.h" #include "wx/panel.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif #include "wx/motif/private.h" void wxButtonCallback (Widget w, XtPointer clientData, XtPointer ptr); -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif // Button @@ -100,9 +110,8 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, void wxButton::SetDefault() { wxWindow *parent = GetParent(); - wxPanel *panel = wxDynamicCast(parent, wxPanel); - if ( panel ) - panel->SetDefaultItem(this); + if ( parent ) + parent->SetDefaultItem(this); // We initially do not set XmNdefaultShadowThickness, to have small buttons. // Unfortunately, buttons are now mis-aligned. We try to correct this