1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/radiobox.mm
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
13 #include "wx/radiobox.h"
15 #import <AppKit/NSView.h>
17 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
18 BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
20 // WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView)
22 bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
23 const wxString& title,
26 int n, const wxString choices[],
28 long style, const wxValidator& validator,
31 if(!CreateControl(parent,winid,pos,size,style,validator,name))
33 SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
34 [m_cocoaNSView release];
36 m_parent->CocoaAddChild(this);
40 wxRadioBox::~wxRadioBox()
42 CocoaRemoveFromParent();
47 void wxRadioBox::SetSelection(int n)
51 int wxRadioBox::GetSelection() const
57 int wxRadioBox::GetCount() const
62 wxString wxRadioBox::GetString(int n) const
67 void wxRadioBox::SetString(int n, const wxString& label)
71 // change the individual radio button state
72 void wxRadioBox::Enable(int n, bool enable)
76 void wxRadioBox::Show(int n, bool show)
81 int wxRadioBox::GetColumnCount() const
86 int wxRadioBox::GetRowCount() const