1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: David Elliott
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_COCOA_RADIOBUT_H__
12 #define __WX_COCOA_RADIOBUT_H__
14 #include "wx/cocoa/NSButton.h"
16 class WXDLLIMPEXP_FWD_CORE wxRadioButton
;
18 WX_DECLARE_EXPORTED_LIST(wxRadioButton
, wxRadioButtonList
);
20 // ========================================================================
22 // ========================================================================
23 class WXDLLIMPEXP_CORE wxRadioButton
: public wxControl
, protected wxCocoaNSButton
25 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
27 WX_DECLARE_COCOA_OWNER(NSButton
,NSControl
,NSView
)
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
32 wxRadioButton() { m_radioMaster
= NULL
; }
33 wxRadioButton(wxWindow
*parent
, wxWindowID winid
,
34 const wxString
& label
,
35 const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
,
38 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxRadioButtonNameStr
)
41 Create(parent
, winid
, label
, pos
, size
, style
, validator
, name
);
44 bool Create(wxWindow
*parent
, wxWindowID winid
,
45 const wxString
& label
,
46 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxSize
& size
= wxDefaultSize
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxRadioButtonNameStr
);
51 virtual ~wxRadioButton();
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
57 virtual void Cocoa_wxNSButtonAction(void);
59 void Cocoa_DeselectOtherButtonsInTheGroup(void);
60 // ------------------------------------------------------------------------
62 // ------------------------------------------------------------------------
64 virtual void SetValue(bool);
65 virtual bool GetValue() const;
66 virtual void SetLabel(const wxString
& label
);
67 virtual wxString
GetLabel() const;
69 wxRadioButtonList m_radioSlaves
;
70 wxRadioButton
*m_radioMaster
;
73 #endif // __WX_COCOA_RADIOBUT_H__