]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/radiobut.h
wxFrameNameStr was already delivered by #include one line earlier.
[wxWidgets.git] / include / wx / cocoa / radiobut.h
CommitLineData
da0634c1
DE
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
65571936 9// Licence: wxWindows licence
da0634c1
DE
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __WX_COCOA_RADIOBUT_H__
13#define __WX_COCOA_RADIOBUT_H__
14
15#include "wx/cocoa/NSButton.h"
16
d0a5e34a
DE
17class WXDLLEXPORT wxRadioButton;
18
19WX_DECLARE_LIST(wxRadioButton, wxRadioButtonList);
20
da0634c1
DE
21// ========================================================================
22// wxRadioButton
23// ========================================================================
24class 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// ------------------------------------------------------------------------
32public:
d0a5e34a 33 wxRadioButton() { m_radioMaster = NULL; }
da0634c1
DE
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// ------------------------------------------------------------------------
57protected:
58 virtual void Cocoa_wxNSButtonAction(void);
59// ------------------------------------------------------------------------
60// Implementation
61// ------------------------------------------------------------------------
62public:
63 virtual void SetValue(bool);
64 virtual bool GetValue() const;
d0a5e34a
DE
65protected:
66 wxRadioButtonList m_radioSlaves;
67 wxRadioButton *m_radioMaster;
da0634c1
DE
68};
69
70#endif // __WX_COCOA_RADIOBUT_H__