]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: radiobut.h | |
3 | // Purpose: wxRadioButton class | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_RADIOBUT_H_ | |
13 | #define _WX_RADIOBUT_H_ | |
14 | ||
15 | class WXDLLEXPORT wxRadioButton: public wxControl | |
16 | { | |
17 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
18 | protected: | |
19 | public: | |
20 | inline wxRadioButton() {} | |
21 | inline wxRadioButton(wxWindow *parent, wxWindowID id, | |
22 | const wxString& label, | |
23 | const wxPoint& pos = wxDefaultPosition, | |
24 | const wxSize& size = wxDefaultSize, long style = 0, | |
25 | const wxValidator& validator = wxDefaultValidator, | |
26 | const wxString& name = wxRadioButtonNameStr) | |
27 | { | |
28 | Create(parent, id, label, pos, size, style, validator, name); | |
29 | } | |
30 | ~wxRadioButton(); | |
31 | ||
32 | bool Create(wxWindow *parent, wxWindowID id, | |
33 | const wxString& label, | |
34 | const wxPoint& pos = wxDefaultPosition, | |
35 | const wxSize& size = wxDefaultSize, long style = 0, | |
36 | const wxValidator& validator = wxDefaultValidator, | |
37 | const wxString& name = wxRadioButtonNameStr); | |
38 | ||
39 | virtual void SetValue(bool val); | |
40 | virtual bool GetValue() const ; | |
41 | ||
42 | // implementation | |
43 | ||
44 | virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; | |
45 | void Command(wxCommandEvent& event); | |
46 | wxRadioButton *AddInCycle(wxRadioButton *cycle); | |
47 | void RemoveFromCycle(); | |
48 | inline wxRadioButton *NextInCycle() {return m_cycle;} | |
49 | ||
50 | protected: | |
51 | ||
52 | wxRadioButton *m_cycle; | |
53 | }; | |
54 | ||
55 | // Not implemented | |
56 | #if 0 | |
57 | class WXDLLEXPORT wxBitmap ; | |
58 | ||
59 | WXDLLEXPORT_DATA(extern const wxChar) wxBitmapRadioButtonNameStr[]; | |
60 | ||
61 | class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton | |
62 | { | |
63 | DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) | |
64 | protected: | |
65 | wxBitmap *theButtonBitmap; | |
66 | public: | |
67 | inline wxBitmapRadioButton() { theButtonBitmap = NULL; } | |
68 | inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, | |
69 | const wxBitmap *label, | |
70 | const wxPoint& pos = wxDefaultPosition, | |
71 | const wxSize& size = wxDefaultSize, long style = 0, | |
72 | const wxValidator& validator = wxDefaultValidator, | |
73 | const wxString& name = wxBitmapRadioButtonNameStr) | |
74 | { | |
75 | Create(parent, id, label, pos, size, style, validator, name); | |
76 | } | |
77 | ||
78 | bool Create(wxWindow *parent, wxWindowID id, | |
79 | const wxBitmap *label, | |
80 | const wxPoint& pos = wxDefaultPosition, | |
81 | const wxSize& size = wxDefaultSize, long style = 0, | |
82 | const wxValidator& validator = wxDefaultValidator, | |
83 | const wxString& name = wxBitmapRadioButtonNameStr); | |
84 | ||
85 | virtual void SetLabel(const wxBitmap *label); | |
86 | virtual void SetValue(bool val) ; | |
87 | virtual bool GetValue() const ; | |
88 | }; | |
89 | #endif | |
90 | ||
91 | #endif | |
92 | // _WX_RADIOBUT_H_ |