1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/radiobox.mm
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
15 #include "wx/radiobox.h"
18 #import <AppKit/NSView.h>
20 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
21 BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
23 // WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView)
25 bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
26 const wxString& title,
29 int n, const wxString choices[],
31 long style, const wxValidator& validator,
34 if(!CreateControl(parent,winid,pos,size,style,validator,name))
36 SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
37 [m_cocoaNSView release];
39 m_parent->CocoaAddChild(this);
40 SetInitialFrameRect(pos,size);
45 wxRadioBox::~wxRadioBox()
50 void wxRadioBox::SetSelection(int n)
54 int wxRadioBox::GetSelection() const
60 int wxRadioBox::GetCount() const
65 wxString wxRadioBox::GetString(int n) const
70 void wxRadioBox::SetString(int n, const wxString& label)
74 // change the individual radio button state
75 void wxRadioBox::Enable(int n, bool enable)
79 void wxRadioBox::Show(int n, bool show)
84 int wxRadioBox::GetColumnCount() const
89 int wxRadioBox::GetRowCount() const