]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/cocoa/choice.mm
removed WXWIN_COMPATIBILITY and WXWIN_COMPATIBILITY_2
[wxWidgets.git] / src / cocoa / choice.mm
... / ...
CommitLineData
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
12#include "wx/app.h"
13#include "wx/choice.h"
14#include "wx/log.h"
15
16#import <AppKit/NSPopUpButton.h>
17
18IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
19BEGIN_EVENT_TABLE(wxChoice, wxChoiceBase)
20END_EVENT_TABLE()
21// WX_IMPLEMENT_COCOA_OWNER(wxChoice,NSButton,NSControl,NSView)
22
23bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
24 const wxPoint& pos,
25 const wxSize& size,
26 int n, const wxString choices[],
27 long style,
28 const wxValidator& validator,
29 const wxString& name)
30{
31 if(!CreateControl(parent,winid,pos,size,style,validator,name))
32 return false;
33
34 SetNSView([[NSPopUpButton alloc] initWithFrame:MakeDefaultNSRect(size)
35 pullsDown: NO]);
36
37 [m_cocoaNSView sizeToFit];
38 if(m_parent)
39 m_parent->CocoaAddChild(this);
40 SetInitialFrameRect(pos,size);
41
42 return true;
43}
44
45wxChoice::~wxChoice()
46{
47 CocoaRemoveFromParent();
48}
49
50void wxChoice::Clear()
51{
52}
53
54void wxChoice::Delete(int)
55{
56}
57
58int wxChoice::GetCount() const
59{
60 return 0;
61}
62
63wxString wxChoice::GetString(int) const
64{
65 return wxEmptyString;
66}
67
68void wxChoice::SetString(int, const wxString&)
69{
70}
71
72int wxChoice::FindString(const wxString&) const
73{
74 return 0;
75}
76
77int wxChoice::GetSelection() const
78{
79 return 0;
80}
81
82int wxChoice::DoAppend(const wxString&)
83{
84 return 0;
85}
86
87int wxChoice::DoInsert(const wxString&, int)
88{
89 return 0;
90}
91
92void wxChoice::DoSetItemClientData(int, void*)
93{
94}
95
96void* wxChoice::DoGetItemClientData(int) const
97{
98 return NULL;
99}
100
101void wxChoice::DoSetItemClientObject(int, wxClientData*)
102{
103}
104
105wxClientData* wxChoice::DoGetItemClientObject(int) const
106{
107 return NULL;
108}
109
110void wxChoice::SetSelection(int)
111{
112}
113