]>
Commit | Line | Data |
---|---|---|
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 | |
7 | // RCS-ID: $Id: checkbox.mm 54129 2008-06-11 19:30:52Z SC $ | |
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" | |
17 | #include "wx/osx/private.h" | |
18 | ||
03647350 VZ |
19 | wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, |
20 | wxWindowMac* WXUNUSED(parent), | |
21 | wxWindowID WXUNUSED(id), | |
d8207702 | 22 | const wxString& WXUNUSED(label), |
03647350 | 23 | const wxPoint& pos, |
f033830e | 24 | const wxSize& size, |
03647350 VZ |
25 | long style, |
26 | long WXUNUSED(extraStyle)) | |
f033830e | 27 | { |
dbeddfb9 | 28 | NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; |
f033830e SC |
29 | wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; |
30 | ||
03647350 | 31 | [v setButtonType:NSSwitchButton]; |
f033830e SC |
32 | if (style & wxCHK_3STATE) |
33 | [v setAllowsMixedState:YES]; | |
03647350 | 34 | |
f033830e | 35 | wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); |
f033830e SC |
36 | return c; |
37 | } | |
38 | ||
39 | #endif |