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