]>
Commit | Line | Data |
---|---|---|
f033830e SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/osx/cocoa/radiobut.mm | |
3 | // Purpose: wxRadioButton | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: JS Lair (99/11/15) adding the cyclic group notion for radiobox | |
6 | // Created: ??/??/98 | |
7 | // RCS-ID: $Id: radiobut.cpp 54129 2008-06-11 19:30:52Z SC $ | |
8 | // Copyright: (c) AUTHOR | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #include "wx/wxprec.h" | |
13 | ||
14 | #if wxUSE_RADIOBTN | |
15 | ||
16 | #include "wx/radiobut.h" | |
17 | #include "wx/osx/private.h" | |
18 | ||
19 | wxWidgetImplType* wxWidgetImpl::CreateRadioButton( 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) | |
27 | { | |
28 | NSView* sv = (wxpeer->GetParent()->GetHandle() ); | |
29 | ||
dbeddfb9 | 30 | NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; |
f033830e SC |
31 | wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; |
32 | ||
33 | [v setButtonType:NSRadioButton]; | |
34 | ||
35 | [sv addSubview:v]; | |
36 | wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); | |
37 | [v setImplementation:c]; | |
38 | return c; | |
39 | } | |
40 | ||
41 | #endif |