m_windowStyle = style;
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
if (parent) parent->AddChild(this);
XmString text = XmStringCreateSimple (label1);
Widget parentWidget = (Widget) parent->GetClientWidget();
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
xmToggleButtonWidgetClass, parentWidget,
+ XmNfontList, fontList,
XmNlabelString, text,
NULL);
XmStringFree (text);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
- SetFont(* parent->GetFont());
-
return TRUE;
}
item->ProcessCommand (event);
}
-void wxCheckBox::ChangeFont()
+void wxCheckBox::ChangeFont(bool keepOriginalSize)
{
- // TODO
+ wxWindow::ChangeFont(keepOriginalSize);
}
void wxCheckBox::ChangeBackgroundColour()
{
- // TODO
+ wxComputeColours (XtDisplay((Widget) m_mainWidget), & m_backgroundColour,
+ (wxColour*) NULL);
+
+ XtVaSetValues ((Widget) m_mainWidget,
+ XmNbackground, g_itemColors[wxBACK_INDEX].pixel,
+ XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel,
+ XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel,
+ XmNforeground, g_itemColors[wxFORE_INDEX].pixel,
+ NULL);
+
+ XtVaSetValues ((Widget) m_mainWidget,
+ XmNselectColor, g_itemColors[wxSELE_INDEX].pixel,
+ NULL);
}
void wxCheckBox::ChangeForegroundColour()
{
- // TODO
+ wxWindow::ChangeForegroundColour();
}
-