1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
15 class WXDLLIMPEXP_CORE wxRadioButton
: public wxControl
17 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
20 virtual ~wxRadioButton() { RemoveFromCycle(); }
22 inline wxRadioButton(wxWindow
*parent
, wxWindowID id
,
23 const wxString
& label
,
24 const wxPoint
& pos
= wxDefaultPosition
,
25 const wxSize
& size
= wxDefaultSize
, long style
= 0,
26 const wxValidator
& validator
= wxDefaultValidator
,
27 const wxString
& name
= wxRadioButtonNameStr
)
29 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
32 bool Create(wxWindow
*parent
, wxWindowID id
,
33 const wxString
& label
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
, long style
= 0,
36 const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxRadioButtonNameStr
);
39 virtual void SetValue(bool val
);
40 virtual bool GetValue() const ;
42 void Command(wxCommandEvent
& event
);
45 virtual void ChangeBackgroundColour();
47 // *this function is an implementation detail*
48 // clears the selection in the radiobuttons in the cycle
49 // and returns the old selection (if any)
50 wxRadioButton
* ClearSelections();
52 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
54 wxRadioButton
* AddInCycle(wxRadioButton
* cycle
);
55 void RemoveFromCycle();
56 wxRadioButton
* NextInCycle() { return m_cycle
; }
58 wxRadioButton
*m_cycle
;