+void wxRadioBox::ChangeFont(bool keepOriginalSize)
+{
+ wxWindow::ChangeFont(keepOriginalSize);
+
+ for (unsigned int i = 0; i < m_noItems; i++)
+ {
+ WXWidget radioButton = m_radioButtons[i];
+
+ XtVaSetValues ((Widget) radioButton,
+ wxFont::GetFontTag(), m_font.GetFontTypeC(XtDisplay((Widget) GetTopWidget())),
+ NULL);
+ }
+}
+
+void wxRadioBox::ChangeBackgroundColour()
+{
+ wxWindow::ChangeBackgroundColour();
+
+ wxColour colour = *wxBLACK;
+ WXPixel selectPixel = colour.AllocColour(XtDisplay((Widget)m_mainWidget));
+
+ for (unsigned int i = 0; i < m_noItems; i++)
+ {
+ WXWidget radioButton = m_radioButtons[i];
+
+ wxDoChangeBackgroundColour(radioButton, m_backgroundColour, true);
+
+ XtVaSetValues ((Widget) radioButton,
+ XmNselectColor, selectPixel,
+ NULL);
+ }
+}
+
+void wxRadioBox::ChangeForegroundColour()
+{
+ wxWindow::ChangeForegroundColour();
+
+ for (unsigned int i = 0; i < m_noItems; i++)
+ {
+ WXWidget radioButton = m_radioButtons[i];
+
+ wxDoChangeForegroundColour(radioButton, m_foregroundColour);
+ }
+}
+
+void wxRadioBoxCallback (Widget w, XtPointer clientData,
+ XmToggleButtonCallbackStruct * cbs)
+{
+ if (!cbs->set)
+ return;
+
+ wxRadioBox *item = (wxRadioBox *) clientData;
+ int sel = -1;
+ unsigned int i;
+ const wxWidgetArray& buttons = item->GetRadioButtons();
+ for (i = 0; i < item->GetCount(); i++)
+ if (((Widget)buttons[i]) == w)
+ sel = (int)i;
+ item->SetSel(sel);
+
+ if (item->InSetValue())
+ return;
+
+ wxCommandEvent event (wxEVT_COMMAND_RADIOBOX_SELECTED, item->GetId());
+ event.SetInt(sel);
+ event.SetString(item->GetStringSelection());
+ event.SetEventObject(item);
+ item->ProcessCommand (event);
+}