Refactoring: no real changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4410d619c5
commit
f96b10c283
@ -16,12 +16,9 @@
|
||||
#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:
|
||||
|
@ -25,12 +25,8 @@
|
||||
#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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user