]> git.saurik.com Git - wxWidgets.git/blame - src/osx/carbon/checkbox.cpp
superfluous embedding API
[wxWidgets.git] / src / osx / carbon / checkbox.cpp
CommitLineData
489468fe 1/////////////////////////////////////////////////////////////////////////////
524c47aa 2// Name: src/osx/carbon/checkbox.cpp
489468fe
SC
3// Purpose: wxCheckBox
4// Author: Stefan Csomor
5// Modified by:
6// Created: 04/01/98
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/wxprec.h"
13
14#if wxUSE_CHECKBOX
15
16#include "wx/checkbox.h"
1f0c8f31 17#include "wx/osx/uma.h"
489468fe 18
524c47aa
SC
19wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
20 wxWindowMac* parent,
21 wxWindowID id,
22 const wxString& label,
23 const wxPoint& pos,
24 const wxSize& size,
25 long style,
26 long extraStyle)
489468fe 27{
524c47aa
SC
28 Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ;
29 wxMacControl* peer = new wxMacControl(wxpeer) ;
489468fe 30
524c47aa
SC
31 verify_noerr( CreateCheckBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds ,
32 CFSTR("") , 0 , false , peer->GetControlRefAddr() ) );
489468fe
SC
33 SInt32 maxValue = 1 /* kControlCheckboxCheckedValue */;
34 if (style & wxCHK_3STATE)
35 maxValue = 2 /* kControlCheckboxMixedValue */;
36
524c47aa 37 peer->SetMaximum( maxValue ) ;
489468fe 38
524c47aa 39 return peer;
489468fe
SC
40}
41
42#endif