]>
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 | |
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 WXDLLIMPEXP_CORE 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 | virtual ~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 | ||
03647350 VZ |
42 | // implementation |
43 | ||
6762286d SC |
44 | void Command(wxCommandEvent& event); |
45 | wxRadioButton *AddInCycle(wxRadioButton *cycle); | |
46 | void RemoveFromCycle(); | |
47 | inline wxRadioButton *NextInCycle() {return m_cycle;} | |
03647350 | 48 | |
6762286d | 49 | // osx specific event handling common for all osx-ports |
03647350 | 50 | |
12b5f4b4 | 51 | virtual bool OSXHandleClicked( double timestampsec ); |
6762286d | 52 | protected: |
03647350 | 53 | |
6762286d SC |
54 | wxRadioButton *m_cycle; |
55 | }; | |
56 | ||
57 | // Not implemented | |
58 | #if 0 | |
59 | class WXDLLIMPEXP_FWD_CORE wxBitmap ; | |
60 | ||
61 | WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxBitmapRadioButtonNameStr[]; | |
62 | ||
63 | class WXDLLIMPEXP_CORE 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 | }; | |
5c6eb3a8 | 91 | #endif |
6762286d SC |
92 | |
93 | #endif | |
94 | // _WX_RADIOBUT_H_ |