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