1 /////////////////////////////////////////////////////////////////////////////
 
   2 // Name:        src/osx/cocoa/checkbox.mm
 
   4 // Author:      Stefan Csomor
 
   7 // Copyright:   (c) Stefan Csomor
 
   8 // Licence:       wxWindows licence
 
   9 /////////////////////////////////////////////////////////////////////////////
 
  11 #include "wx/wxprec.h"
 
  15 #include "wx/checkbox.h"
 
  16 #include "wx/osx/private.h"
 
  18 wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
 
  19                                     wxWindowMac* WXUNUSED(parent),
 
  20                                     wxWindowID WXUNUSED(id),
 
  21                                     const wxString& WXUNUSED(label),
 
  25                                     long WXUNUSED(extraStyle))
 
  27     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
 
  28     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
 
  30     [v setButtonType:NSSwitchButton];
 
  31     if (style & wxCHK_3STATE)
 
  32         [v setAllowsMixedState:YES];
 
  34     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );