]>
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, | |
57c4d796 DW |
29 | #if wxUSE_VALIDATORS |
30 | # if defined(__VISAGECPP__) | |
31 | const wxValidator* validator = wxDefaultValidator, | |
32 | # else | |
0e320a79 | 33 | const wxValidator& validator = wxDefaultValidator, |
57c4d796 DW |
34 | # endif |
35 | #endif | |
0e320a79 DW |
36 | const wxString& name = wxRadioButtonNameStr) |
37 | { | |
38 | Create(parent, id, label, pos, size, style, validator, name); | |
39 | } | |
40 | ||
41 | bool Create(wxWindow *parent, wxWindowID id, | |
42 | const wxString& label, | |
43 | const wxPoint& pos = wxDefaultPosition, | |
44 | const wxSize& size = wxDefaultSize, long style = 0, | |
57c4d796 DW |
45 | #if wxUSE_VALIDATORS |
46 | # if defined(__VISAGECPP__) | |
47 | const wxValidator* validator = wxDefaultValidator, | |
48 | # else | |
0e320a79 | 49 | const wxValidator& validator = wxDefaultValidator, |
57c4d796 DW |
50 | # endif |
51 | #endif | |
0e320a79 DW |
52 | const wxString& name = wxRadioButtonNameStr); |
53 | ||
54 | virtual void SetLabel(const wxString& label); | |
55 | virtual void SetValue(bool val); | |
56 | virtual bool GetValue() const ; | |
57 | ||
cdf1e714 | 58 | bool OS2Command(WXUINT param, WXWORD id); |
0e320a79 DW |
59 | void Command(wxCommandEvent& event); |
60 | }; | |
61 | ||
62 | // Not implemented | |
0e320a79 DW |
63 | class WXDLLEXPORT wxBitmap ; |
64 | ||
65 | WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; | |
66 | ||
67 | class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton | |
68 | { | |
69 | DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) | |
70 | protected: | |
71 | wxBitmap *theButtonBitmap; | |
72 | public: | |
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, | |
57c4d796 DW |
78 | #if wxUSE_VALIDATORS |
79 | # if defined(__VISAGECPP__) | |
80 | const wxValidator* validator = wxDefaultValidator, | |
81 | # else | |
0e320a79 | 82 | const wxValidator& validator = wxDefaultValidator, |
57c4d796 DW |
83 | # endif |
84 | #endif | |
0e320a79 DW |
85 | const wxString& name = wxBitmapRadioButtonNameStr) |
86 | { | |
87 | Create(parent, id, label, pos, size, style, validator, name); | |
88 | } | |
89 | ||
90 | bool Create(wxWindow *parent, wxWindowID id, | |
91 | const wxBitmap *label, | |
92 | const wxPoint& pos = wxDefaultPosition, | |
93 | const wxSize& size = wxDefaultSize, long style = 0, | |
57c4d796 DW |
94 | #if wxUSE_VALIDATORS |
95 | # if defined(__VISAGECPP__) | |
96 | const wxValidator* validator = wxDefaultValidator, | |
97 | # else | |
0e320a79 | 98 | const wxValidator& validator = wxDefaultValidator, |
57c4d796 DW |
99 | # endif |
100 | #endif | |
0e320a79 DW |
101 | const wxString& name = wxBitmapRadioButtonNameStr); |
102 | ||
103 | virtual void SetLabel(const wxBitmap *label); | |
104 | virtual void SetValue(bool val) ; | |
105 | virtual bool GetValue() const ; | |
cdf1e714 DW |
106 | private: |
107 | // virtual function hiding suppression, do not use | |
108 | virtual void SetLabel(const wxString& label) | |
109 | { wxRadioButton::SetLabel(label); }; | |
0e320a79 | 110 | }; |
0e320a79 DW |
111 | |
112 | #endif | |
113 | // _WX_RADIOBUT_H_ |