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,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxRadioButtonNameStr
)
32 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
35 bool Create(wxWindow
*parent
, wxWindowID id
,
36 const wxString
& label
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
, long style
= 0,
39 const wxValidator
& validator
= wxDefaultValidator
,
40 const wxString
& name
= wxRadioButtonNameStr
);
42 virtual void SetLabel(const wxString
& label
);
43 virtual void SetValue(bool val
);
44 virtual bool GetValue() const ;
46 bool OS2Command(WXUINT param
, WXWORD id
);
47 void Command(wxCommandEvent
& event
);
51 class WXDLLEXPORT wxBitmap
;
53 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr
;
55 class WXDLLEXPORT wxBitmapRadioButton
: public wxRadioButton
57 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
59 wxBitmap
*theButtonBitmap
;
61 inline wxBitmapRadioButton() { theButtonBitmap
= NULL
; }
62 inline wxBitmapRadioButton(wxWindow
*parent
, wxWindowID id
,
63 const wxBitmap
*label
,
64 const wxPoint
& pos
= wxDefaultPosition
,
65 const wxSize
& size
= wxDefaultSize
, long style
= 0,
66 const wxValidator
& validator
= wxDefaultValidator
,
67 const wxString
& name
= wxBitmapRadioButtonNameStr
)
69 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
72 bool Create(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 virtual void SetLabel(const wxBitmap
*label
);
80 virtual void SetValue(bool val
) ;
81 virtual bool GetValue() const ;
83 // virtual function hiding suppression, do not use
84 virtual void SetLabel(const wxString
& label
)
85 { wxRadioButton::SetLabel(label
); };