]>
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 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
16 | #pragma interface "radiobut.h" | |
17 | #endif | |
18 | ||
19 | class WXDLLEXPORT wxRadioButton: public wxControl | |
20 | { | |
21 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
22 | protected: | |
23 | public: | |
24 | inline wxRadioButton() {} | |
25 | inline wxRadioButton(wxWindow *parent, wxWindowID id, | |
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) | |
31 | { | |
32 | Create(parent, id, label, pos, size, style, validator, name); | |
33 | } | |
34 | ~wxRadioButton(); | |
35 | ||
36 | bool Create(wxWindow *parent, wxWindowID id, | |
37 | const wxString& label, | |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, long style = 0, | |
40 | const wxValidator& validator = wxDefaultValidator, | |
41 | const wxString& name = wxRadioButtonNameStr); | |
42 | ||
43 | virtual void SetValue(bool val); | |
44 | virtual bool GetValue() const ; | |
45 | ||
46 | // implementation | |
47 | ||
48 | virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; | |
49 | void Command(wxCommandEvent& event); | |
50 | wxRadioButton *AddInCycle(wxRadioButton *cycle); | |
51 | void RemoveFromCycle(); | |
52 | inline wxRadioButton *NextInCycle() {return m_cycle;} | |
53 | ||
54 | protected: | |
55 | ||
56 | wxRadioButton *m_cycle; | |
57 | }; | |
58 | ||
59 | // Not implemented | |
60 | #if 0 | |
61 | class WXDLLEXPORT wxBitmap ; | |
62 | ||
63 | WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr; | |
64 | ||
65 | class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton | |
66 | { | |
67 | DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) | |
68 | protected: | |
69 | wxBitmap *theButtonBitmap; | |
70 | public: | |
71 | inline wxBitmapRadioButton() { theButtonBitmap = NULL; } | |
72 | inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, | |
73 | const wxBitmap *label, | |
74 | const wxPoint& pos = wxDefaultPosition, | |
75 | const wxSize& size = wxDefaultSize, long style = 0, | |
76 | const wxValidator& validator = wxDefaultValidator, | |
77 | const wxString& name = wxBitmapRadioButtonNameStr) | |
78 | { | |
79 | Create(parent, id, label, pos, size, style, validator, name); | |
80 | } | |
81 | ||
82 | bool Create(wxWindow *parent, wxWindowID id, | |
83 | const wxBitmap *label, | |
84 | const wxPoint& pos = wxDefaultPosition, | |
85 | const wxSize& size = wxDefaultSize, long style = 0, | |
86 | const wxValidator& validator = wxDefaultValidator, | |
87 | const wxString& name = wxBitmapRadioButtonNameStr); | |
88 | ||
89 | virtual void SetLabel(const wxBitmap *label); | |
90 | virtual void SetValue(bool val) ; | |
91 | virtual bool GetValue() const ; | |
92 | }; | |
93 | #endif | |
94 | ||
95 | #endif | |
96 | // _WX_RADIOBUT_H_ |