]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: radiobut.h | |
3 | // Purpose: wxRadioButton class | |
cdf1e714 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
cdf1e714 | 6 | // Created: 10/12/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
cdf1e714 DW |
8 | // Copyright: (c) David Webster |
9 | // Licence: wxWindows licence | |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_RADIOBUT_H_ | |
13 | #define _WX_RADIOBUT_H_ | |
14 | ||
0e320a79 DW |
15 | #include "wx/control.h" |
16 | ||
17 | WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr; | |
18 | ||
19 | class WXDLLEXPORT wxRadioButton: public wxControl | |
20 | { | |
21 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
22 | protected: | |
23 | public: | |
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) | |
31 | { | |
32 | Create(parent, id, label, pos, size, style, validator, name); | |
33 | } | |
34 | ||
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); | |
41 | ||
42 | virtual void SetLabel(const wxString& label); | |
43 | virtual void SetValue(bool val); | |
44 | virtual bool GetValue() const ; | |
45 | ||
cdf1e714 | 46 | bool OS2Command(WXUINT param, WXWORD id); |
0e320a79 DW |
47 | void Command(wxCommandEvent& event); |
48 | }; | |
49 | ||
50 | // Not implemented | |
0e320a79 DW |
51 | class WXDLLEXPORT wxBitmap ; |
52 | ||
53 | WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; | |
54 | ||
55 | class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton | |
56 | { | |
57 | DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) | |
58 | protected: | |
59 | wxBitmap *theButtonBitmap; | |
60 | public: | |
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) | |
68 | { | |
69 | Create(parent, id, label, pos, size, style, validator, name); | |
70 | } | |
71 | ||
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); | |
78 | ||
79 | virtual void SetLabel(const wxBitmap *label); | |
80 | virtual void SetValue(bool val) ; | |
81 | virtual bool GetValue() const ; | |
cdf1e714 DW |
82 | private: |
83 | // virtual function hiding suppression, do not use | |
84 | virtual void SetLabel(const wxString& label) | |
85 | { wxRadioButton::SetLabel(label); }; | |
0e320a79 | 86 | }; |
0e320a79 DW |
87 | |
88 | #endif | |
89 | // _WX_RADIOBUT_H_ |