1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioButton class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
16 #pragma interface "radiobut.h"
19 #include "wx/control.h"
21 WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr
;
23 class WXDLLEXPORT wxRadioButton
: public wxControl
26 inline wxRadioButton() {}
27 inline wxRadioButton(wxWindow
*parent
, wxWindowID id
,
28 const wxString
& label
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
, long style
= 0,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxRadioButtonNameStr
)
34 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
, wxWindowID id
,
38 const wxString
& label
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
, long style
= 0,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxRadioButtonNameStr
);
44 virtual void SetValue(bool val
);
45 virtual bool GetValue() const ;
49 virtual void MacHandleControlClick( ControlHandle control
, SInt16 controlpart
);
50 void Command(wxCommandEvent
& event
);
51 wxRadioButton
*AddInCycle(wxRadioButton
*cycle
);
52 inline wxRadioButton
*NextInCycle() {return m_cycle
;}
54 void OnIdle( wxIdleEvent
&event
);
57 wxRadioButton
*m_cycle
;
61 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
66 class WXDLLEXPORT wxBitmap
;
68 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr
;
70 class WXDLLEXPORT wxBitmapRadioButton
: public wxRadioButton
72 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
74 wxBitmap
*theButtonBitmap
;
76 inline wxBitmapRadioButton() { theButtonBitmap
= NULL
; }
77 inline wxBitmapRadioButton(wxWindow
*parent
, wxWindowID id
,
78 const wxBitmap
*label
,
79 const wxPoint
& pos
= wxDefaultPosition
,
80 const wxSize
& size
= wxDefaultSize
, long style
= 0,
81 const wxValidator
& validator
= wxDefaultValidator
,
82 const wxString
& name
= wxBitmapRadioButtonNameStr
)
84 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
87 bool Create(wxWindow
*parent
, wxWindowID id
,
88 const wxBitmap
*label
,
89 const wxPoint
& pos
= wxDefaultPosition
,
90 const wxSize
& size
= wxDefaultSize
, long style
= 0,
91 const wxValidator
& validator
= wxDefaultValidator
,
92 const wxString
& name
= wxBitmapRadioButtonNameStr
);
94 virtual void SetLabel(const wxBitmap
*label
);
95 virtual void SetValue(bool val
) ;
96 virtual bool GetValue() const ;