- wxButton *item = (wxButton *) node->Data ();
- if (item->IsKindOf(CLASSINFO(wxButton)))
- {
- bool managed = XtIsManaged((Widget) item->GetMainWidget());
- if (managed)
- XtUnmanageChild ((Widget) item->GetMainWidget());
-
- XtVaSetValues ((Widget) item->GetMainWidget(),
- XmNdefaultButtonShadowThickness, 1,
- NULL);
-
- if (managed)
- XtManageChild ((Widget) item->GetMainWidget());
- }
- } // while
-
-// XtVaSetValues((Widget)handle, XmNshowAsDefault, 1, NULL);
- XtVaSetValues ((Widget) parent->GetMainWidget(), XmNdefaultButton, (Widget) GetMainWidget(), NULL);
+ wxWindow *win = node->GetData ();
+ wxButton *item = wxDynamicCast(win, wxButton);
+ if (item)
+ {
+ bool managed = XtIsManaged((Widget) item->GetMainWidget());
+ if (managed)
+ XtUnmanageChild ((Widget) item->GetMainWidget());
+
+ XtVaSetValues ((Widget) item->GetMainWidget(),
+ XmNdefaultButtonShadowThickness, 1,
+ NULL);
+
+ if (managed)
+ XtManageChild ((Widget) item->GetMainWidget());
+ }
+ } // while
+
+ // XtVaSetValues((Widget)handle, XmNshowAsDefault, 1, NULL);
+ XtVaSetValues ((Widget) parent->GetMainWidget(), XmNdefaultButton, (Widget) GetMainWidget(), NULL);
+}
+
+/* static */
+wxSize wxButton::GetDefaultSize()
+{
+ // TODO: check font size as in wxMSW ? MB
+ //
+ return wxSize(80,26);