]> git.saurik.com Git - wxWidgets.git/blame - src/osx/carbon/radiobut.cpp
Create an autorelease pool to catch objects created during several special situations...
[wxWidgets.git] / src / osx / carbon / radiobut.cpp
CommitLineData
489468fe 1/////////////////////////////////////////////////////////////////////////////
524c47aa 2// Name: src/osx/carbon/radiobut.cpp
489468fe 3// Purpose: wxRadioButton
524c47aa 4// Author: Stefan Csomor
489468fe 5// Modified by: JS Lair (99/11/15) adding the cyclic group notion for radiobox
524c47aa 6// Created: 01/01/98
489468fe 7// RCS-ID: $Id$
524c47aa 8// Copyright: (c) Stefan Csomor
489468fe
SC
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/wxprec.h"
13
14#if wxUSE_RADIOBTN
15
16#include "wx/radiobut.h"
524c47aa
SC
17#include "wx/osx/private.h"
18
03647350
VZ
19wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer,
20 wxWindowMac* parent,
21 wxWindowID WXUNUSED(id),
a4fec5b4 22 const wxString& WXUNUSED(label),
03647350 23 const wxPoint& pos,
524c47aa 24 const wxSize& size,
03647350
VZ
25 long WXUNUSED(style),
26 long WXUNUSED(extraStyle))
489468fe 27{
524c47aa
SC
28 Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ;
29 wxMacControl* peer = new wxMacControl(wxpeer) ;
489468fe
SC
30 OSStatus err = CreateRadioButtonControl(
31 MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, CFSTR(""),
524c47aa 32 0, false /* no autotoggle */, peer->GetControlRefAddr() );
489468fe
SC
33 verify_noerr( err );
34
524c47aa 35 return peer;
489468fe
SC
36}
37
38#endif