X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7520f3da332d64a676b6f7d27a56004fabf2db36..13b4df952c77383f50696e51fcbaa2d8bbd3b3b9:/src/motif/radiobut.cpp diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 956e8d65aa..d6832a3f6d 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -12,12 +12,11 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/radiobut.h" -#include "wx/utils.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" +#endif #ifdef __VMS__ #pragma message disable nosimpint @@ -33,8 +32,6 @@ void wxRadioButtonCallback (Widget w, XtPointer clientData, XmToggleButtonCallbackStruct * cbs); -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) - wxRadioButton::wxRadioButton() { } @@ -48,11 +45,12 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, { if( !CreateControl( parent, id, pos, size, style, validator, name ) ) return false; + PreCreation(); Widget parentWidget = (Widget) parent->GetClientWidget(); Display* dpy = XtDisplay(parentWidget); - wxString label1(wxStripMenuCodes(label)); + wxString label1(GetLabelText(label)); wxXmString text( label1 ); @@ -77,11 +75,10 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, XtManageChild (radioButtonWidget); + PostCreation(); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y); - ChangeBackgroundColour(); - //copied from mac/radiobut.cpp (from here till "return true;") m_cycle = this ; @@ -92,7 +89,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, else { /* search backward for last group start */ - wxRadioButton *chief = (wxRadioButton*) NULL; + wxRadioButton *chief = NULL; wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast(); while (node) { @@ -139,7 +136,7 @@ void wxRadioButton::ChangeBackgroundColour() // What colour should this be? wxColour colour = *wxBLACK; - int selectPixel = colour.AllocColour(XtDisplay((Widget)m_mainWidget)); + WXPixel selectPixel = colour.AllocColour(XtDisplay((Widget)m_mainWidget)); XtVaSetValues ((Widget) GetMainWidget(), XmNselectColor, selectPixel,