]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/cocoa/radiobox.mm
sizer.h needed by cygwin
[wxWidgets.git] / src / cocoa / radiobox.mm
... / ...
CommitLineData
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: wxWidgets licence
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/wxprec.h"
13
14#if wxUSE_RADIOBOX
15
16#ifndef WX_PRECOMP
17 #include "wx/app.h"
18 #include "wx/radiobox.h"
19 #include "wx/arrstr.h"
20#endif //WX_PRECOMP
21
22#import <AppKit/NSView.h>
23
24IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
25BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
26END_EVENT_TABLE()
27// WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView)
28
29bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
30 const wxString& title,
31 const wxPoint& pos,
32 const wxSize& size,
33 const wxArrayString& choices,
34 int majorDim,
35 long style, const wxValidator& validator,
36 const wxString& name)
37{
38 wxCArrayString chs(choices);
39
40 return Create(parent, winid, title, pos, size, chs.GetCount(),
41 chs.GetStrings(), majorDim, style, validator, name);
42}
43
44bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
45 const wxString& title,
46 const wxPoint& pos,
47 const wxSize& size,
48 int n, const wxString choices[],
49 int majorDim,
50 long style, const wxValidator& validator,
51 const wxString& name)
52{
53 if(!CreateControl(parent,winid,pos,size,style,validator,name))
54 return false;
55 SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
56 [m_cocoaNSView release];
57 if(m_parent)
58 m_parent->CocoaAddChild(this);
59 SetInitialFrameRect(pos,size);
60
61 return true;
62}
63
64wxRadioBox::~wxRadioBox()
65{
66}
67
68 // selection
69void wxRadioBox::SetSelection(int n)
70{
71}
72
73int wxRadioBox::GetSelection() const
74{
75 return 0;
76}
77
78 // string access
79int wxRadioBox::GetCount() const
80{
81 return 0;
82}
83
84wxString wxRadioBox::GetString(int n) const
85{
86 return wxEmptyString;
87}
88
89void wxRadioBox::SetString(int n, const wxString& label)
90{
91}
92
93 // change the individual radio button state
94bool wxRadioBox::Enable(int n, bool enable)
95{
96 // TODO
97 return false;
98}
99
100bool wxRadioBox::Show(int n, bool show)
101{
102 // TODO
103 return false;
104}
105
106 // layout parameters
107int wxRadioBox::GetColumnCount() const
108{
109 return 0;
110}
111
112int wxRadioBox::GetRowCount() const
113{
114 return 0;
115}
116
117wxSize wxRadioBox::DoGetBestSize() const
118{
119 return wxSize(50,50);
120}
121
122#endif
123