]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/choice.mm
Implement wxApp::Yield
[wxWidgets.git] / src / cocoa / choice.mm
CommitLineData
da0634c1
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/choice.mm
3// Purpose: wxChoice
4// Author: David Elliott
5// Modified by:
6// Created: 2003/03/16
7// RCS-ID: $Id:
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
449c5673
DE
12#include "wx/wxprec.h"
13#ifndef WX_PRECOMP
14 #include "wx/log.h"
15 #include "wx/app.h"
16 #include "wx/choice.h"
17#endif //WX_PRECOMP
da0634c1 18
d77ea20c
DE
19#import <AppKit/NSPopUpButton.h>
20
da0634c1
DE
21IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
22BEGIN_EVENT_TABLE(wxChoice, wxChoiceBase)
23END_EVENT_TABLE()
24// WX_IMPLEMENT_COCOA_OWNER(wxChoice,NSButton,NSControl,NSView)
25
26bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
27 const wxPoint& pos,
28 const wxSize& size,
29 int n, const wxString choices[],
30 long style,
31 const wxValidator& validator,
32 const wxString& name)
33{
34 if(!CreateControl(parent,winid,pos,size,style,validator,name))
35 return false;
36
d77ea20c
DE
37 SetNSView([[NSPopUpButton alloc] initWithFrame:MakeDefaultNSRect(size)
38 pullsDown: NO]);
39
40 [m_cocoaNSView sizeToFit];
da0634c1
DE
41 if(m_parent)
42 m_parent->CocoaAddChild(this);
d77ea20c
DE
43 SetInitialFrameRect(pos,size);
44
da0634c1
DE
45 return true;
46}
47
48wxChoice::~wxChoice()
49{
50 CocoaRemoveFromParent();
51}
52
53void wxChoice::Clear()
54{
55}
56
57void wxChoice::Delete(int)
58{
59}
60
61int wxChoice::GetCount() const
62{
63 return 0;
64}
65
66wxString wxChoice::GetString(int) const
67{
68 return wxEmptyString;
69}
70
71void wxChoice::SetString(int, const wxString&)
72{
73}
74
75int wxChoice::FindString(const wxString&) const
76{
77 return 0;
78}
79
80int wxChoice::GetSelection() const
81{
82 return 0;
83}
84
85int wxChoice::DoAppend(const wxString&)
86{
87 return 0;
88}
89
be657756
DE
90int wxChoice::DoInsert(const wxString&, int)
91{
92 return 0;
93}
94
da0634c1
DE
95void wxChoice::DoSetItemClientData(int, void*)
96{
97}
98
99void* wxChoice::DoGetItemClientData(int) const
100{
101 return NULL;
102}
103
104void wxChoice::DoSetItemClientObject(int, wxClientData*)
105{
106}
107
108wxClientData* wxChoice::DoGetItemClientObject(int) const
109{
110 return NULL;
111}
112
113void wxChoice::SetSelection(int)
114{
115}
116