1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioButton class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
16 #pragma interface "radiobut.h"
19 #include "wx/control.h"
21 WXDLLEXPORT_DATA(extern const wxChar
*) wxRadioButtonNameStr
;
23 class WXDLLEXPORT wxRadioButton
: public wxControl
25 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
28 inline wxRadioButton(void) {}
29 inline wxRadioButton(wxWindow
*parent
, wxWindowID id
,
30 const wxString
& label
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
, long style
= 0,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxRadioButtonNameStr
)
36 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
, wxWindowID id
,
40 const wxString
& label
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
, long style
= 0,
43 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(void) const ;
50 bool MSWCommand(WXUINT param
, WXWORD id
);
51 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
52 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
54 void Command(wxCommandEvent
& event
);
59 class WXDLLEXPORT wxBitmap
;
61 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr
;
63 class WXDLLEXPORT wxBitmapRadioButton
: public wxRadioButton
65 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton
)
67 wxBitmap
*theButtonBitmap
;
69 inline wxBitmapRadioButton(void) { 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(void) const ;