]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/cocoa/radiobox.mm
m_font may not have been set yet. Default to letting GetTextExtent
[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: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/wxprec.h"
13#ifndef WX_PRECOMP
14 #include "wx/app.h"
15 #include "wx/radiobox.h"
16 #include "wx/arrstr.h"
17#endif //WX_PRECOMP
18
19#import <AppKit/NSView.h>
20
21IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
22BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
23END_EVENT_TABLE()
24// WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView)
25
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
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;
52 SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
53 [m_cocoaNSView release];
54 if(m_parent)
55 m_parent->CocoaAddChild(this);
56 SetInitialFrameRect(pos,size);
57
58 return true;
59}
60
61wxRadioBox::~wxRadioBox()
62{
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