]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
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$ | |
bbcdf8bc JS |
8 | // Copyright: (c) Julian Smart |
9 | // Licence: wxWindows licence | |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_RADIOBUT_H_ |
13 | #define _WX_RADIOBUT_H_ | |
2bda0e17 KB |
14 | |
15 | #ifdef __GNUG__ | |
16 | #pragma interface "radiobut.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/control.h" | |
20 | ||
32c1cda2 | 21 | WXDLLEXPORT_DATA(extern const wxChar*) wxRadioButtonNameStr; |
2bda0e17 KB |
22 | |
23 | class WXDLLEXPORT wxRadioButton: public wxControl | |
24 | { | |
25 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
26 | protected: | |
27 | public: | |
28 | inline wxRadioButton(void) {} | |
debe6624 | 29 | inline wxRadioButton(wxWindow *parent, wxWindowID id, |
2bda0e17 KB |
30 | const wxString& label, |
31 | const wxPoint& pos = wxDefaultPosition, | |
debe6624 | 32 | const wxSize& size = wxDefaultSize, long style = 0, |
2bda0e17 KB |
33 | const wxValidator& validator = wxDefaultValidator, |
34 | const wxString& name = wxRadioButtonNameStr) | |
35 | { | |
36 | Create(parent, id, label, pos, size, style, validator, name); | |
37 | } | |
38 | ||
debe6624 | 39 | bool Create(wxWindow *parent, wxWindowID id, |
2bda0e17 KB |
40 | const wxString& label, |
41 | const wxPoint& pos = wxDefaultPosition, | |
debe6624 | 42 | const wxSize& size = wxDefaultSize, long style = 0, |
2bda0e17 KB |
43 | const wxValidator& validator = wxDefaultValidator, |
44 | const wxString& name = wxRadioButtonNameStr); | |
45 | ||
46 | virtual void SetLabel(const wxString& label); | |
debe6624 | 47 | virtual void SetValue(bool val); |
2bda0e17 KB |
48 | virtual bool GetValue(void) const ; |
49 | ||
621793f4 | 50 | bool MSWCommand(WXUINT param, WXWORD id); |
f6bcfd97 BP |
51 | virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, |
52 | WXUINT message, WXWPARAM wParam, WXLPARAM lParam); | |
53 | ||
2bda0e17 | 54 | void Command(wxCommandEvent& event); |
2bda0e17 KB |
55 | }; |
56 | ||
57 | // Not implemented | |
58 | #if 0 | |
59 | class WXDLLEXPORT wxBitmap ; | |
60 | ||
61 | WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; | |
62 | ||
63 | class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton | |
64 | { | |
65 | DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) | |
66 | protected: | |
67 | wxBitmap *theButtonBitmap; | |
68 | public: | |
69 | inline wxBitmapRadioButton(void) { theButtonBitmap = NULL; } | |
debe6624 | 70 | inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, |
2bda0e17 KB |
71 | const wxBitmap *label, |
72 | const wxPoint& pos = wxDefaultPosition, | |
debe6624 | 73 | const wxSize& size = wxDefaultSize, long style = 0, |
2bda0e17 KB |
74 | const wxValidator& validator = wxDefaultValidator, |
75 | const wxString& name = wxBitmapRadioButtonNameStr) | |
76 | { | |
77 | Create(parent, id, label, pos, size, style, validator, name); | |
78 | } | |
79 | ||
debe6624 | 80 | bool Create(wxWindow *parent, wxWindowID id, |
2bda0e17 KB |
81 | const wxBitmap *label, |
82 | const wxPoint& pos = wxDefaultPosition, | |
debe6624 | 83 | const wxSize& size = wxDefaultSize, long style = 0, |
2bda0e17 KB |
84 | const wxValidator& validator = wxDefaultValidator, |
85 | const wxString& name = wxBitmapRadioButtonNameStr); | |
86 | ||
87 | virtual void SetLabel(const wxBitmap *label); | |
debe6624 | 88 | virtual void SetValue(bool val) ; |
2bda0e17 KB |
89 | virtual bool GetValue(void) const ; |
90 | }; | |
91 | #endif | |
92 | ||
93 | #endif | |
bbcdf8bc | 94 | // _WX_RADIOBUT_H_ |