]> git.saurik.com Git - wxWidgets.git/blob - src/osx/cocoa/checkbox.mm
No changes, just use wxRecursionGuard instead of manual boolean flag.
[wxWidgets.git] / src / osx / cocoa / checkbox.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/cocoa/checkbox.mm
3 // Purpose: wxCheckBox
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 2008-08-20
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #include "wx/wxprec.h"
12
13 #if wxUSE_CHECKBOX
14
15 #include "wx/checkbox.h"
16 #include "wx/osx/private.h"
17
18 wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
19 wxWindowMac* WXUNUSED(parent),
20 wxWindowID WXUNUSED(id),
21 const wxString& WXUNUSED(label),
22 const wxPoint& pos,
23 const wxSize& size,
24 long style,
25 long WXUNUSED(extraStyle))
26 {
27 NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
28 wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
29
30 [v setButtonType:NSSwitchButton];
31 if (style & wxCHK_3STATE)
32 [v setAllowsMixedState:YES];
33
34 wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
35 return c;
36 }
37
38 #endif