#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 <Xm/PushBG.h>
#include <Xm/PushB.h>
+#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
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
// Because it's very hard to find wxButton in the same row,
// correction is straighforward: we set resource for all wxButton
// in this parent (but not sub panels)
- for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ())
+ for (wxWindowList::Node * node = parent->GetChildren().GetFirst ();
+ node; node = node->GetNext ())
{
- wxButton *item = (wxButton *) node->Data ();
- if (item->IsKindOf(CLASSINFO(wxButton)))
+ wxWindow *win = node->GetData ();
+ wxButton *item = wxDynamicCast(win, wxButton);
+ if (item)
{
bool managed = XtIsManaged((Widget) item->GetMainWidget());
if (managed)