1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioButton class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
15 #include "wx/control.h"
17 WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr
;
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,
30 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,
42 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxRadioButtonNameStr
);
46 virtual void SetLabel(const wxString
& label
);
47 virtual void SetValue(bool val
);
48 virtual bool GetValue() const ;
50 bool OS2Command(WXUINT param
, WXWORD id
);
51 void Command(wxCommandEvent
& event
);
55 class WXDLLEXPORT wxBitmap
;
57 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr
;
59 class WXDLLEXPORT wxBitmapRadioButton
: public wxRadioButton
61 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
63 wxBitmap
*theButtonBitmap
;
65 inline wxBitmapRadioButton() { theButtonBitmap
= NULL
; }
66 inline wxBitmapRadioButton(wxWindow
*parent
, wxWindowID id
,
67 const wxBitmap
*label
,
68 const wxPoint
& pos
= wxDefaultPosition
,
69 const wxSize
& size
= wxDefaultSize
, long style
= 0,
71 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,
83 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 ;
91 // virtual function hiding suppression, do not use
92 virtual void SetLabel(const wxString
& label
)
93 { wxRadioButton::SetLabel(label
); };