]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/radiobox.mm
Translate '&Help' to '&' for italian Windows only
[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
1a87edf2 7// RCS-ID: $Id:
da0634c1 8// Copyright: (c) 2003 David Elliott
1a87edf2 9// Licence: wxWidgets licence
da0634c1
DE
10/////////////////////////////////////////////////////////////////////////////
11
449c5673 12#include "wx/wxprec.h"
16c81607
RN
13
14#if wxUSE_RADIOBOX
15
449c5673
DE
16#ifndef WX_PRECOMP
17 #include "wx/app.h"
18 #include "wx/radiobox.h"
584ad2a3 19 #include "wx/arrstr.h"
449c5673 20#endif //WX_PRECOMP
da0634c1 21
548dd93d
DE
22#import <AppKit/NSView.h>
23
da0634c1
DE
24IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
25BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
26END_EVENT_TABLE()
27// WX_IMPLEMENT_COCOA_OWNER(wxRadioBox,NSTextField,NSControl,NSView)
28
584ad2a3
MB
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
da0634c1
DE
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;
8d656ea9 55 SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
548dd93d 56 [m_cocoaNSView release];
da0634c1
DE
57 if(m_parent)
58 m_parent->CocoaAddChild(this);
8d656ea9
DE
59 SetInitialFrameRect(pos,size);
60
da0634c1
DE
61 return true;
62}
63
64wxRadioBox::~wxRadioBox()
65{
da0634c1
DE
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
1a87edf2 94bool wxRadioBox::Enable(int n, bool enable)
da0634c1 95{
1a87edf2
WS
96 // TODO
97 return false;
da0634c1
DE
98}
99
789f6795 100bool wxRadioBox::Show(int n, bool show)
da0634c1 101{
789f6795
WS
102 // TODO
103 return false;
da0634c1
DE
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
9a165f54
DE
117wxSize wxRadioBox::DoGetBestSize() const
118{
119 return wxSize(50,50);
120}
121
16c81607
RN
122#endif
123