1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioButton class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
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 inline wxRadioButton() {}
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
);
30 virtual ~wxRadioButton();
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 ;
44 virtual wxInt32
MacControlHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
45 void Command(wxCommandEvent
& event
);
46 wxRadioButton
*AddInCycle(wxRadioButton
*cycle
);
47 void RemoveFromCycle();
48 inline wxRadioButton
*NextInCycle() {return m_cycle
;}
52 wxRadioButton
*m_cycle
;
57 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
59 WXDLLIMPEXP_DATA_CORE(extern const wxChar
) wxBitmapRadioButtonNameStr
[];
61 class WXDLLIMPEXP_CORE wxBitmapRadioButton
: public wxRadioButton
63 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
65 wxBitmap
*theButtonBitmap
;
67 inline wxBitmapRadioButton() { theButtonBitmap
= NULL
; }
68 inline wxBitmapRadioButton(wxWindow
*parent
, wxWindowID id
,
69 const wxBitmap
*label
,
70 const wxPoint
& pos
= wxDefaultPosition
,
71 const wxSize
& size
= wxDefaultSize
, long style
= 0,
72 const wxValidator
& validator
= wxDefaultValidator
,
73 const wxString
& name
= wxBitmapRadioButtonNameStr
)
75 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
78 bool Create(wxWindow
*parent
, wxWindowID id
,
79 const wxBitmap
*label
,
80 const wxPoint
& pos
= wxDefaultPosition
,
81 const wxSize
& size
= wxDefaultSize
, long style
= 0,
82 const wxValidator
& validator
= wxDefaultValidator
,
83 const wxString
& name
= wxBitmapRadioButtonNameStr
);
85 virtual void SetLabel(const wxBitmap
*label
);
86 virtual void SetValue(bool val
) ;
87 virtual bool GetValue() const ;