]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/radiobut.cpp
normalize the case of the volume names too (patch 925887)
[wxWidgets.git] / src / motif / radiobut.cpp
index a2f222dd0ba9590aea4c31a02370471fecf57e10..b633e9cb20d2f0fa1e805e82889b4907cf1f0398 100644 (file)
 #ifdef __VMS__
 #pragma message disable nosimpint
 #endif
-#include <Xm/Label.h>
-#include <Xm/LabelG.h>
 #include <Xm/ToggleB.h>
 #include <Xm/ToggleBG.h>
-#include <Xm/RowColumn.h>
-#include <Xm/Form.h>
 #ifdef __VMS__
 #pragma message enable nosimpint
 #endif
@@ -53,20 +49,8 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
                            const wxValidator& validator,
                            const wxString& name)
 {
-    SetName(name);
-    SetValidator(validator);
-    m_backgroundColour = parent->GetBackgroundColour();
-    m_foregroundColour = parent->GetForegroundColour();
-    m_font = parent->GetFont();
-
-    if (parent) parent->AddChild(this);
-
-    if ( id == -1 )
-        m_windowId = (int)NewControlId();
-    else
-        m_windowId = id;
-
-    m_windowStyle = style ;
+    if( !CreateControl( parent, id, pos, size, style, validator, name ) )
+        return false;
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
 
@@ -88,14 +72,17 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
         XmNindicatorType, XmONE_OF_MANY, // diamond-shape
         NULL);
 
-    XtAddCallback (radioButtonWidget, XmNvalueChangedCallback, (XtCallbackProc) wxRadioButtonCallback,
-        (XtPointer) this);
+    XtAddCallback (radioButtonWidget,
+                   XmNvalueChangedCallback,
+                   (XtCallbackProc)wxRadioButtonCallback,
+                   (XtPointer)this);
 
     m_mainWidget = (WXWidget) radioButtonWidget;
 
     XtManageChild (radioButtonWidget);
 
-    AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
+    AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
+                  pos.x, pos.y, size.x, size.y);
 
     ChangeBackgroundColour();
 
@@ -150,11 +137,6 @@ void wxRadioButton::Command (wxCommandEvent & event)
     ProcessCommand (event);
 }
 
-void wxRadioButton::ChangeFont(bool keepOriginalSize)
-{
-    wxWindow::ChangeFont(keepOriginalSize);
-}
-
 void wxRadioButton::ChangeBackgroundColour()
 {
     wxWindow::ChangeBackgroundColour();
@@ -167,11 +149,6 @@ void wxRadioButton::ChangeBackgroundColour()
           NULL);
 }
 
-void wxRadioButton::ChangeForegroundColour()
-{
-    wxWindow::ChangeForegroundColour();
-}
-
 void wxRadioButtonCallback (Widget w, XtPointer clientData,
                             XmToggleButtonCallbackStruct * cbs)
 {