+bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,
+ const wxPoint& pos,
+ const wxSize& size, long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ wxString label(lbl);
+ if (label.empty() && wxIsStockID(id))
+ label = wxGetStockLabel(id);
+
+ if( !CreateControl( parent, id, pos, size, style, validator, name ) )
+ return false;
+ PreCreation();
+
+ wxXmString text( GetLabelText(label) );
+
+ Widget parentWidget = (Widget) parent->GetClientWidget();
+
+ /*
+ * Patch Note (important)
+ * There is no major reason to put a defaultButtonThickness here.
+ * Not requesting it give the ability to put wxButton with a spacing
+ * as small as requested. However, if some button become a DefaultButton,
+ * other buttons are no more aligned -- This is why we set
+ * defaultButtonThickness of ALL buttons belonging to the same wxPanel,
+ * in the ::SetDefaultButton method.
+ */
+ m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",
+ xmPushButtonWidgetClass,
+ parentWidget,
+ wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay(parentWidget)),
+ XmNlabelString, text(),
+ XmNrecomputeSize, False,
+ // See comment for wxButton::SetDefault
+ // XmNdefaultButtonShadowThickness, 1,
+ NULL);
+
+ XtAddCallback ((Widget) m_mainWidget,
+ XmNactivateCallback, (XtCallbackProc) wxButtonCallback,
+ (XtPointer) this);
+
+ wxSize best = GetBestSize();
+ if( size.x != -1 ) best.x = size.x;
+ if( size.y != -1 ) best.y = size.y;
+
+ PostCreation();
+ AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
+ pos.x, pos.y, best.x, best.y);
+
+ return true;
+}
+
+void wxButton::SetDefaultShadowThicknessAndResize()