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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "radiobut.h"
19 class WXDLLEXPORT wxRadioButton
: public wxControl
21 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
24 inline wxRadioButton() {}
25 inline wxRadioButton(wxWindow
*parent
, wxWindowID id
,
26 const wxString
& label
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
, long style
= 0,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxRadioButtonNameStr
)
32 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
36 bool Create(wxWindow
*parent
, wxWindowID id
,
37 const wxString
& label
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
, long style
= 0,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxRadioButtonNameStr
);
43 virtual void SetValue(bool val
);
44 virtual bool GetValue() const ;
48 virtual wxInt32
MacControlHit( WXEVENTHANDLERREF handler
, WXEVENTREF event
) ;
49 void Command(wxCommandEvent
& event
);
50 wxRadioButton
*AddInCycle(wxRadioButton
*cycle
);
51 void RemoveFromCycle();
52 inline wxRadioButton
*NextInCycle() {return m_cycle
;}
56 wxRadioButton
*m_cycle
;
61 class WXDLLEXPORT wxBitmap
;
63 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr
;
65 class WXDLLEXPORT wxBitmapRadioButton
: public wxRadioButton
67 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
69 wxBitmap
*theButtonBitmap
;
71 inline wxBitmapRadioButton() { theButtonBitmap
= NULL
; }
72 inline wxBitmapRadioButton(wxWindow
*parent
, wxWindowID id
,
73 const wxBitmap
*label
,
74 const wxPoint
& pos
= wxDefaultPosition
,
75 const wxSize
& size
= wxDefaultSize
, long style
= 0,
76 const wxValidator
& validator
= wxDefaultValidator
,
77 const wxString
& name
= wxBitmapRadioButtonNameStr
)
79 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
82 bool Create(wxWindow
*parent
, wxWindowID id
,
83 const wxBitmap
*label
,
84 const wxPoint
& pos
= wxDefaultPosition
,
85 const wxSize
& size
= wxDefaultSize
, long style
= 0,
86 const wxValidator
& validator
= wxDefaultValidator
,
87 const wxString
& name
= wxBitmapRadioButtonNameStr
);
89 virtual void SetLabel(const wxBitmap
*label
);
90 virtual void SetValue(bool val
) ;
91 virtual bool GetValue() const ;