]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/radiobut.h
fixed recent modeless dialog breakage caused by removing wxDIALOG_MODAL (wxModelessWi...
[wxWidgets.git] / include / wx / cocoa / radiobut.h
... / ...
CommitLineData
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 license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __WX_COCOA_RADIOBUT_H__
13#define __WX_COCOA_RADIOBUT_H__
14
15#include "wx/cocoa/NSButton.h"
16
17class WXDLLEXPORT wxRadioButton;
18
19WX_DECLARE_LIST(wxRadioButton, wxRadioButtonList);
20
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:
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// ------------------------------------------------------------------------
57protected:
58 virtual void Cocoa_wxNSButtonAction(void);
59// ------------------------------------------------------------------------
60// Implementation
61// ------------------------------------------------------------------------
62public:
63 virtual void SetValue(bool);
64 virtual bool GetValue() const;
65protected:
66 wxRadioButtonList m_radioSlaves;
67 wxRadioButton *m_radioMaster;
68};
69
70#endif // __WX_COCOA_RADIOBUT_H__