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 # if defined(__VISAGECPP__)
31 const wxValidator
* validator
= wxDefaultValidator
,
33 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxRadioButtonNameStr
)
38 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
41 bool Create(wxWindow
*parent
, wxWindowID id
,
42 const wxString
& label
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
, long style
= 0,
46 # if defined(__VISAGECPP__)
47 const wxValidator
* validator
= wxDefaultValidator
,
49 const wxValidator
& validator
= wxDefaultValidator
,
52 const wxString
& name
= wxRadioButtonNameStr
);
54 virtual void SetLabel(const wxString
& label
);
55 virtual void SetValue(bool val
);
56 virtual bool GetValue() const ;
58 bool OS2Command(WXUINT param
, WXWORD id
);
59 void Command(wxCommandEvent
& event
);
63 class WXDLLEXPORT wxBitmap
;
65 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr
;
67 class WXDLLEXPORT wxBitmapRadioButton
: public wxRadioButton
69 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
71 wxBitmap
*theButtonBitmap
;
73 inline wxBitmapRadioButton() { theButtonBitmap
= NULL
; }
74 inline wxBitmapRadioButton(wxWindow
*parent
, wxWindowID id
,
75 const wxBitmap
*label
,
76 const wxPoint
& pos
= wxDefaultPosition
,
77 const wxSize
& size
= wxDefaultSize
, long style
= 0,
79 # if defined(__VISAGECPP__)
80 const wxValidator
* validator
= wxDefaultValidator
,
82 const wxValidator
& validator
= wxDefaultValidator
,
85 const wxString
& name
= wxBitmapRadioButtonNameStr
)
87 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
90 bool Create(wxWindow
*parent
, wxWindowID id
,
91 const wxBitmap
*label
,
92 const wxPoint
& pos
= wxDefaultPosition
,
93 const wxSize
& size
= wxDefaultSize
, long style
= 0,
95 # if defined(__VISAGECPP__)
96 const wxValidator
* validator
= wxDefaultValidator
,
98 const wxValidator
& validator
= wxDefaultValidator
,
101 const wxString
& name
= wxBitmapRadioButtonNameStr
);
103 virtual void SetLabel(const wxBitmap
*label
);
104 virtual void SetValue(bool val
) ;
105 virtual bool GetValue() const ;
107 // virtual function hiding suppression, do not use
108 virtual void SetLabel(const wxString
& label
)
109 { wxRadioButton::SetLabel(label
); };