1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_RADIOBUT_H_
12 #define _WX_RADIOBUT_H_
14 class WXDLLIMPEXP_CORE wxRadioButton
: public wxControl
16 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
19 virtual ~wxRadioButton() { RemoveFromCycle(); }
21 inline wxRadioButton(wxWindow
*parent
, wxWindowID id
,
22 const wxString
& label
,
23 const wxPoint
& pos
= wxDefaultPosition
,
24 const wxSize
& size
= wxDefaultSize
, long style
= 0,
25 const wxValidator
& validator
= wxDefaultValidator
,
26 const wxString
& name
= wxRadioButtonNameStr
)
28 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
31 bool Create(wxWindow
*parent
, wxWindowID id
,
32 const wxString
& label
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
, long style
= 0,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxRadioButtonNameStr
);
38 virtual void SetValue(bool val
);
39 virtual bool GetValue() const ;
41 void Command(wxCommandEvent
& event
);
44 virtual void ChangeBackgroundColour();
46 // *this function is an implementation detail*
47 // clears the selection in the radiobuttons in the cycle
48 // and returns the old selection (if any)
49 wxRadioButton
* ClearSelections();
51 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
53 wxRadioButton
* AddInCycle(wxRadioButton
* cycle
);
54 void RemoveFromCycle();
55 wxRadioButton
* NextInCycle() { return m_cycle
; }
57 wxRadioButton
*m_cycle
;