]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/carbon/checkbox.cpp
346720b8caf80478f57ed5ccd95bfb34aa5ae68f
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/carbon/checkbox.cpp
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
16 #include "wx/checkbox.h"
17 #include "wx/osx/uma.h"
19 wxWidgetImplType
* wxWidgetImpl::CreateCheckBox( wxWindowMac
* wxpeer
,
21 wxWindowID
WXUNUSED(id
),
22 const wxString
& WXUNUSED(label
),
26 long WXUNUSED(extraStyle
))
28 Rect bounds
= wxMacGetBoundsForControl( wxpeer
, pos
, size
) ;
29 wxMacControl
* peer
= new wxMacControl(wxpeer
) ;
31 verify_noerr( CreateCheckBoxControl(MAC_WXHWND(parent
->MacGetTopLevelWindowRef()), &bounds
,
32 CFSTR("") , 0 , false , peer
->GetControlRefAddr() ) );
33 SInt32 maxValue
= 1 /* kControlCheckboxCheckedValue */;
34 if (style
& wxCHK_3STATE
)
35 maxValue
= 2 /* kControlCheckboxMixedValue */;
37 peer
->SetMaximum( maxValue
) ;