]>
Commit | Line | Data |
---|---|---|
9b6dbb09 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: radiobut.h | |
3 | // Purpose: wxRadioButton class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_RADIOBUT_H_ | |
13 | #define _WX_RADIOBUT_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "radiobut.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/control.h" | |
20 | ||
21 | WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr; | |
22 | ||
23 | class WXDLLEXPORT wxRadioButton: public wxControl | |
24 | { | |
a4294b78 JS |
25 | DECLARE_DYNAMIC_CLASS(wxRadioButton) |
26 | protected: | |
27 | public: | |
28 | wxRadioButton(); | |
29 | inline wxRadioButton(wxWindow *parent, wxWindowID id, | |
9b6dbb09 JS |
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) | |
a4294b78 JS |
35 | { |
36 | Create(parent, id, label, pos, size, style, validator, name); | |
37 | } | |
9b6dbb09 | 38 | |
a4294b78 | 39 | bool Create(wxWindow *parent, wxWindowID id, |
9b6dbb09 JS |
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); | |
45 | ||
a4294b78 JS |
46 | virtual void SetValue(bool val); |
47 | virtual bool GetValue() const ; | |
9b6dbb09 | 48 | |
a4294b78 JS |
49 | void Command(wxCommandEvent& event); |
50 | ||
0d57be45 JS |
51 | // Implementation |
52 | virtual void ChangeFont(); | |
53 | virtual void ChangeBackgroundColour(); | |
54 | virtual void ChangeForegroundColour(); | |
a4294b78 JS |
55 | WXWidget GetTopWidget() const { return m_formWidget; } |
56 | WXWidget GetLabelWidget() const { return m_labelWidget; } | |
57 | ||
58 | private: | |
59 | WXWidget m_formWidget; | |
60 | WXWidget m_labelWidget; | |
9b6dbb09 JS |
61 | }; |
62 | ||
63 | // Not implemented | |
64 | #if 0 | |
65 | class WXDLLEXPORT wxBitmap ; | |
66 | ||
67 | WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; | |
68 | ||
69 | class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton | |
70 | { | |
71 | DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) | |
72 | protected: | |
73 | wxBitmap *theButtonBitmap; | |
74 | public: | |
75 | inline wxBitmapRadioButton() { theButtonBitmap = NULL; } | |
76 | inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, | |
77 | const wxBitmap *label, | |
78 | const wxPoint& pos = wxDefaultPosition, | |
79 | const wxSize& size = wxDefaultSize, long style = 0, | |
80 | const wxValidator& validator = wxDefaultValidator, | |
81 | const wxString& name = wxBitmapRadioButtonNameStr) | |
82 | { | |
83 | Create(parent, id, label, pos, size, style, validator, name); | |
84 | } | |
85 | ||
86 | bool Create(wxWindow *parent, wxWindowID id, | |
87 | const wxBitmap *label, | |
88 | const wxPoint& pos = wxDefaultPosition, | |
89 | const wxSize& size = wxDefaultSize, long style = 0, | |
90 | const wxValidator& validator = wxDefaultValidator, | |
91 | const wxString& name = wxBitmapRadioButtonNameStr); | |
92 | ||
93 | virtual void SetLabel(const wxBitmap *label); | |
94 | virtual void SetValue(bool val) ; | |
95 | virtual bool GetValue() const ; | |
96 | }; | |
97 | #endif | |
98 | ||
99 | #endif | |
100 | // _WX_RADIOBUT_H_ |