]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/carbon/checkbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/carbon/checkbox.cpp
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/uma.h"
18 wxWidgetImplType
* wxWidgetImpl::CreateCheckBox( wxWindowMac
* wxpeer
,
20 wxWindowID
WXUNUSED(id
),
21 const wxString
& WXUNUSED(label
),
25 long WXUNUSED(extraStyle
))
27 Rect bounds
= wxMacGetBoundsForControl( wxpeer
, pos
, size
) ;
28 wxMacControl
* peer
= new wxMacControl(wxpeer
) ;
30 verify_noerr( CreateCheckBoxControl(MAC_WXHWND(parent
->MacGetTopLevelWindowRef()), &bounds
,
31 CFSTR("") , 0 , false , peer
->GetControlRefAddr() ) );
32 SInt32 maxValue
= 1 /* kControlCheckboxCheckedValue */;
33 if (style
& wxCHK_3STATE
)
34 maxValue
= 2 /* kControlCheckboxMixedValue */;
36 peer
->SetMaximum( maxValue
) ;