1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/cocoa/checkbox.mm
4 // Author: Stefan Csomor
7 // RCS-ID: $Id: checkbox.mm 54129 2008-06-11 19:30:52Z SC $
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
16 #include "wx/checkbox.h"
17 #include "wx/osx/private.h"
19 wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
22 const wxString& label,
28 NSView* sv = (wxpeer->GetParent()->GetHandle() );
30 NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
31 wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
33 [v setButtonType:NSSwitchButton];
34 if (style & wxCHK_3STATE)
35 [v setAllowsMixedState:YES];
38 wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
39 [v setImplementation:c];