]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/radiobut.h
more extra semicolons removed (patch 1303724)
[wxWidgets.git] / include / wx / cocoa / radiobut.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/03/18
7 // RCS-ID: $Id:
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_RADIOBUT_H__
13 #define __WX_COCOA_RADIOBUT_H__
14
15 #include "wx/cocoa/NSButton.h"
16
17 class WXDLLEXPORT wxRadioButton;
18
19 WX_DECLARE_LIST(wxRadioButton, wxRadioButtonList);
20
21 // ========================================================================
22 // wxRadioButton
23 // ========================================================================
24 class WXDLLEXPORT wxRadioButton: public wxControl, protected wxCocoaNSButton
25 {
26 DECLARE_DYNAMIC_CLASS(wxRadioButton)
27 DECLARE_EVENT_TABLE()
28 WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
29 // ------------------------------------------------------------------------
30 // initialization
31 // ------------------------------------------------------------------------
32 public:
33 wxRadioButton() { m_radioMaster = NULL; }
34 wxRadioButton(wxWindow *parent, wxWindowID winid,
35 const wxString& label,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxRadioButtonNameStr)
41 {
42 Create(parent, winid, label, pos, size, style, validator, name);
43 }
44
45 bool Create(wxWindow *parent, wxWindowID winid,
46 const wxString& label,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 long style = 0,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxRadioButtonNameStr);
52 virtual ~wxRadioButton();
53
54 // ------------------------------------------------------------------------
55 // Cocoa callbacks
56 // ------------------------------------------------------------------------
57 protected:
58 virtual void Cocoa_wxNSButtonAction(void);
59 // ------------------------------------------------------------------------
60 // Implementation
61 // ------------------------------------------------------------------------
62 public:
63 virtual void SetValue(bool);
64 virtual bool GetValue() const;
65 protected:
66 wxRadioButtonList m_radioSlaves;
67 wxRadioButton *m_radioMaster;
68 };
69
70 #endif // __WX_COCOA_RADIOBUT_H__