]> git.saurik.com Git - wxWidgets.git/commitdiff
Refactoring: no real changes.
authorMattia Barbon <mbarbon@cpan.org>
Wed, 13 Aug 2003 21:34:21 +0000 (21:34 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Wed, 13 Aug 2003 21:34:21 +0000 (21:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/motif/radiobut.h
src/motif/radiobut.cpp

index e15aaa6eeddb633c438cc89939adff789fa53d7c..8ccf2dad8725618cdb16d38b2e04e7e4b37ac35e 100644 (file)
 #pragma interface "radiobut.h"
 #endif
 
-#include "wx/control.h"
-
 class WXDLLEXPORT wxRadioButton: public wxControl
 {
     DECLARE_DYNAMIC_CLASS(wxRadioButton)
-protected:
 public:
     wxRadioButton();
     ~wxRadioButton() { RemoveFromCycle(); }
@@ -49,12 +46,10 @@ public:
     void Command(wxCommandEvent& event);
     
     // Implementation
-    virtual void ChangeFont(bool keepOriginalSize = TRUE);
     virtual void ChangeBackgroundColour();
-    virtual void ChangeForegroundColour();
 
     // *this function is an implementation detail*
-    // clears the selection in the readiobuttons in the cycle
+    // clears the selection in the radiobuttons in the cycle
     // and returns the old selection (if any)
     wxRadioButton* ClearSelections();
 private:
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)
 {