]>
Commit | Line | Data |
---|---|---|
0dbd6262 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: radiobut.h | |
3 | // Purpose: wxRadioButton class | |
4 | // Author: AUTHOR | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) AUTHOR | |
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 | ||
0dbd6262 SC |
19 | class WXDLLEXPORT wxRadioButton: public wxControl |
20 | { | |
0a67a93b SC |
21 | DECLARE_DYNAMIC_CLASS(wxRadioButton) |
22 | protected: | |
079c842c RR |
23 | public: |
24 | inline wxRadioButton() {} | |
25 | inline wxRadioButton(wxWindow *parent, wxWindowID id, | |
0dbd6262 SC |
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) | |
079c842c RR |
31 | { |
32 | Create(parent, id, label, pos, size, style, validator, name); | |
33 | } | |
0dbd6262 | 34 | |
079c842c | 35 | bool Create(wxWindow *parent, wxWindowID id, |
0dbd6262 SC |
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 | ||
079c842c RR |
42 | virtual void SetValue(bool val); |
43 | virtual bool GetValue() const ; | |
0dbd6262 | 44 | |
079c842c RR |
45 | // implementation |
46 | ||
1dd52151 | 47 | virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ); |
079c842c RR |
48 | void Command(wxCommandEvent& event); |
49 | wxRadioButton *AddInCycle(wxRadioButton *cycle); | |
50 | inline wxRadioButton *NextInCycle() {return m_cycle;} | |
51 | ||
0a67a93b SC |
52 | protected: |
53 | ||
079c842c | 54 | wxRadioButton *m_cycle; |
0dbd6262 SC |
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() { 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) | |
76 | { | |
77 | Create(parent, id, label, pos, size, style, validator, name); | |
78 | } | |
79 | ||
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); | |
86 | ||
87 | virtual void SetLabel(const wxBitmap *label); | |
88 | virtual void SetValue(bool val) ; | |
89 | virtual bool GetValue() const ; | |
90 | }; | |
91 | #endif | |
92 | ||
93 | #endif | |
94 | // _WX_RADIOBUT_H_ |