]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/radiobox.mm
Fixed Mac CodeWarrior compilation (there's no <sys/types.h>).
[wxWidgets.git] / src / cocoa / radiobox.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/radiobox.mm
3 // Purpose: wxRadioBox
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/02/15
7 // RCS-ID: $Id:
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13 #ifndef WX_PRECOMP
14 #include "wx/app.h"
15 #include "wx/radiobox.h"
16 #endif //WX_PRECOMP
17
18 #import <AppKit/NSView.h>
19
20 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
21 BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
22 END_EVENT_TABLE()
23 // WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView)
24
25 bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
26 const wxString& title,
27 const wxPoint& pos,
28 const wxSize& size,
29 int n, const wxString choices[],
30 int majorDim,
31 long style, const wxValidator& validator,
32 const wxString& name)
33 {
34 if(!CreateControl(parent,winid,pos,size,style,validator,name))
35 return false;
36 SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
37 [m_cocoaNSView release];
38 if(m_parent)
39 m_parent->CocoaAddChild(this);
40 SetInitialFrameRect(pos,size);
41
42 return true;
43 }
44
45 wxRadioBox::~wxRadioBox()
46 {
47 }
48
49 // selection
50 void wxRadioBox::SetSelection(int n)
51 {
52 }
53
54 int wxRadioBox::GetSelection() const
55 {
56 return 0;
57 }
58
59 // string access
60 int wxRadioBox::GetCount() const
61 {
62 return 0;
63 }
64
65 wxString wxRadioBox::GetString(int n) const
66 {
67 return wxEmptyString;
68 }
69
70 void wxRadioBox::SetString(int n, const wxString& label)
71 {
72 }
73
74 // change the individual radio button state
75 void wxRadioBox::Enable(int n, bool enable)
76 {
77 }
78
79 void wxRadioBox::Show(int n, bool show)
80 {
81 }
82
83 // layout parameters
84 int wxRadioBox::GetColumnCount() const
85 {
86 return 0;
87 }
88
89 int wxRadioBox::GetRowCount() const
90 {
91 return 0;
92 }
93