m_windowStyle = style;
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
parent->AddChild((wxButton *)this);
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
Widget parentWidget = (Widget) parent->GetClientWidget();
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
+
/*
* Patch Note (important)
* There is no major reason to put a defaultButtonThickness here.
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",
xmPushButtonWidgetClass,
parentWidget,
+ XmNfontList, fontList,
XmNlabelString, text,
// XmNdefaultButtonShadowThickness, 1, // See comment for wxButton::SetDefault
NULL);
XtAddCallback ((Widget) m_mainWidget, XmNactivateCallback, (XtCallbackProc) wxButtonCallback,
(XtPointer) this);
-
SetCanAddEventHandler(TRUE);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
- SetFont(* parent->GetFont());
ChangeBackgroundColour();
return TRUE;
ProcessCommand (event);
}
-void wxButtonCallback (Widget w, XtPointer clientData, XtPointer ptr)
+void wxButtonCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr))
{
if (!wxGetWindowFromTable(w))
// Widget has been deleted!
item->ProcessCommand (event);
}
-void wxButton::ChangeFont()
+void wxButton::ChangeFont(bool keepOriginalSize)
{
- // TODO
+ wxWindow::ChangeFont(keepOriginalSize);
}
void wxButton::ChangeBackgroundColour()
{
- // TODO
+ DoChangeBackgroundColour(m_mainWidget, m_backgroundColour, TRUE);
}
void wxButton::ChangeForegroundColour()
{
- // TODO
+ wxWindow::ChangeForegroundColour();
}