]>
Commit | Line | Data |
---|---|---|
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 | ||
19 | #include "wx/control.h" | |
20 | ||
21 | WXDLLEXPORT_DATA(extern const char*) wxRadioButtonNameStr; | |
22 | ||
23 | class WXDLLEXPORT wxRadioButton: public wxControl | |
24 | { | |
25 | public: | |
26 | inline wxRadioButton() {} | |
27 | inline wxRadioButton(wxWindow *parent, wxWindowID id, | |
28 | const wxString& label, | |
29 | const wxPoint& pos = wxDefaultPosition, | |
30 | const wxSize& size = wxDefaultSize, long style = 0, | |
31 | const wxValidator& validator = wxDefaultValidator, | |
32 | const wxString& name = wxRadioButtonNameStr) | |
33 | { | |
34 | Create(parent, id, label, pos, size, style, validator, name); | |
35 | } | |
36 | ||
37 | bool Create(wxWindow *parent, wxWindowID id, | |
38 | const wxString& label, | |
39 | const wxPoint& pos = wxDefaultPosition, | |
40 | const wxSize& size = wxDefaultSize, long style = 0, | |
41 | const wxValidator& validator = wxDefaultValidator, | |
42 | const wxString& name = wxRadioButtonNameStr); | |
43 | ||
44 | virtual void SetValue(bool val); | |
45 | virtual bool GetValue() const ; | |
46 | ||
47 | // implementation | |
48 | ||
49 | virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ); | |
50 | void Command(wxCommandEvent& event); | |
51 | wxRadioButton *AddInCycle(wxRadioButton *cycle); | |
52 | inline wxRadioButton *NextInCycle() {return m_cycle;} | |
53 | ||
54 | void OnIdle( wxIdleEvent &event ); | |
55 | ||
56 | protected: | |
57 | wxRadioButton *m_cycle; | |
58 | ||
59 | private: | |
60 | DECLARE_EVENT_TABLE() | |
61 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
62 | }; | |
63 | ||
64 | // Not implemented | |
65 | #if 0 | |
66 | class WXDLLEXPORT wxBitmap ; | |
67 | ||
68 | WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; | |
69 | ||
70 | class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton | |
71 | { | |
72 | DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) | |
73 | protected: | |
74 | wxBitmap *theButtonBitmap; | |
75 | public: | |
76 | inline wxBitmapRadioButton() { theButtonBitmap = NULL; } | |
77 | inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, | |
78 | const wxBitmap *label, | |
79 | const wxPoint& pos = wxDefaultPosition, | |
80 | const wxSize& size = wxDefaultSize, long style = 0, | |
81 | const wxValidator& validator = wxDefaultValidator, | |
82 | const wxString& name = wxBitmapRadioButtonNameStr) | |
83 | { | |
84 | Create(parent, id, label, pos, size, style, validator, name); | |
85 | } | |
86 | ||
87 | bool Create(wxWindow *parent, wxWindowID id, | |
88 | const wxBitmap *label, | |
89 | const wxPoint& pos = wxDefaultPosition, | |
90 | const wxSize& size = wxDefaultSize, long style = 0, | |
91 | const wxValidator& validator = wxDefaultValidator, | |
92 | const wxString& name = wxBitmapRadioButtonNameStr); | |
93 | ||
94 | virtual void SetLabel(const wxBitmap *label); | |
95 | virtual void SetValue(bool val) ; | |
96 | virtual bool GetValue() const ; | |
97 | }; | |
98 | #endif | |
99 | ||
100 | #endif | |
101 | // _WX_RADIOBUT_H_ |