]> git.saurik.com Git - wxWidgets.git/blame - src/osx/cocoa/checkbox.mm
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / src / osx / cocoa / checkbox.mm
CommitLineData
f033830e
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/osx/cocoa/checkbox.mm
3// Purpose: wxCheckBox
4// Author: Stefan Csomor
5// Modified by:
6// Created: 2008-08-20
f033830e
SC
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
03647350
VZ
18wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
19 wxWindowMac* WXUNUSED(parent),
20 wxWindowID WXUNUSED(id),
d8207702 21 const wxString& WXUNUSED(label),
03647350 22 const wxPoint& pos,
f033830e 23 const wxSize& size,
03647350
VZ
24 long style,
25 long WXUNUSED(extraStyle))
f033830e 26{
dbeddfb9 27 NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
f033830e
SC
28 wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
29
03647350 30 [v setButtonType:NSSwitchButton];
f033830e
SC
31 if (style & wxCHK_3STATE)
32 [v setAllowsMixedState:YES];
03647350 33
f033830e 34 wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
f033830e
SC
35 return c;
36}
37
38#endif