1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/radiobut.h
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 void Command(wxCommandEvent
& event
);
45 wxRadioButton
*AddInCycle(wxRadioButton
*cycle
);
46 void RemoveFromCycle();
47 inline wxRadioButton
*NextInCycle() {return m_cycle
;}
49 // osx specific event handling common for all osx-ports
51 virtual bool OSXHandleClicked( double timestampsec
);
54 wxRadioButton
*m_cycle
;
59 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
61 WXDLLIMPEXP_DATA_CORE(extern const wxChar
) wxBitmapRadioButtonNameStr
[];
63 class WXDLLIMPEXP_CORE wxBitmapRadioButton
: public wxRadioButton
65 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
67 wxBitmap
*theButtonBitmap
;
69 inline wxBitmapRadioButton() { theButtonBitmap
= NULL
; }
70 inline wxBitmapRadioButton(wxWindow
*parent
, wxWindowID id
,
71 const wxBitmap
*label
,
72 const wxPoint
& pos
= wxDefaultPosition
,
73 const wxSize
& size
= wxDefaultSize
, long style
= 0,
74 const wxValidator
& validator
= wxDefaultValidator
,
75 const wxString
& name
= wxBitmapRadioButtonNameStr
)
77 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
80 bool Create(wxWindow
*parent
, wxWindowID id
,
81 const wxBitmap
*label
,
82 const wxPoint
& pos
= wxDefaultPosition
,
83 const wxSize
& size
= wxDefaultSize
, long style
= 0,
84 const wxValidator
& validator
= wxDefaultValidator
,
85 const wxString
& name
= wxBitmapRadioButtonNameStr
);
87 virtual void SetLabel(const wxBitmap
*label
);
88 virtual void SetValue(bool val
) ;
89 virtual bool GetValue() const ;