X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32cd189dfcfe96c41e32c3b9827bf67484c60b13..bb996f289574defb0ae4339ae8e46ff3cf6fa54c:/src/motif/radiobut.cpp diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 5a6680e165..d6832a3f6d 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -12,10 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - #include "wx/radiobut.h" #ifndef WX_PRECOMP @@ -36,8 +32,6 @@ void wxRadioButtonCallback (Widget w, XtPointer clientData, XmToggleButtonCallbackStruct * cbs); -IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) - wxRadioButton::wxRadioButton() { } @@ -51,6 +45,7 @@ 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); @@ -80,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 ; @@ -95,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) { @@ -142,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,