]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/combobox.mm
New default configuration is debug/static
[wxWidgets.git] / src / cocoa / combobox.mm
CommitLineData
421a8431
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/combobox.mm
3// Purpose: wxComboBox
4// Author: David Elliott
5// Modified by:
a6660cbb
DE
6// Created: 2003/07/14
7// RCS-ID: $Id$
421a8431 8// Copyright: (c) 2003 David Elliott
a6660cbb 9// Licence: wxWindows licence
421a8431
DE
10/////////////////////////////////////////////////////////////////////////////
11
2ee09b55
DE
12#include "wx/wxprec.h"
13
14#if wxUSE_COMBOBOX
15
421a8431
DE
16#include "wx/app.h"
17#include "wx/combobox.h"
18#include "wx/log.h"
19
20#include "wx/cocoa/autorelease.h"
21#include "wx/cocoa/string.h"
22
23#import <AppKit/NSComboBox.h>
24
25IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxTextCtrl)
26BEGIN_EVENT_TABLE(wxComboBox, wxTextCtrl)
27END_EVENT_TABLE()
28// WX_IMPLEMENT_COCOA_OWNER(wxComboBox,NSComboBox,NSTextField,NSView)
29
30bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
31 const wxString& value,
32 const wxPoint& pos,
33 const wxSize& size,
34 int n, const wxString choices[],
35 long style,
36 const wxValidator& validator,
37 const wxString& name)
38{
39 wxAutoNSAutoreleasePool pool;
40 if(!CreateControl(parent,winid,pos,size,style,validator,name))
41 return false;
42
43 m_cocoaNSView = NULL;
8d656ea9 44 SetNSTextField([[NSComboBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
421a8431
DE
45 [m_cocoaNSView release];
46 [GetNSTextField() setStringValue:wxNSStringWithWxString(value.c_str())];
47 [GetNSControl() sizeToFit];
48 if(m_parent)
49 m_parent->CocoaAddChild(this);
8d656ea9
DE
50 SetInitialFrameRect(pos,size);
51
421a8431
DE
52 return true;
53}
54
55wxComboBox::~wxComboBox()
56{
57}
58
59void wxComboBox::SetSelection(int)
60{
61}
62
63wxString wxComboBox::GetStringSelection()
64{
65 return wxEmptyString;
66}
67
e92ea629 68void wxComboBox::SetStringSelection(const wxString& selection)
421a8431
DE
69{
70}
71
72void wxComboBox::Clear()
73{
74}
75
76void wxComboBox::Delete(int)
77{
78}
79
80int wxComboBox::GetCount() const
81{
82 return 0;
83}
84
85wxString wxComboBox::GetString(int) const
86{
87 return wxEmptyString;
88}
89
90void wxComboBox::SetString(int, const wxString&)
91{
92}
93
94int wxComboBox::FindString(const wxString&) const
95{
96 return 0;
97}
98
99int wxComboBox::GetSelection() const
100{
101 return 0;
102}
103
104int wxComboBox::DoAppend(const wxString&)
105{
106 return 0;
107}
108
109int wxComboBox::DoInsert(const wxString&, int)
110{
111 return 0;
112}
113
114void wxComboBox::DoSetItemClientData(int, void*)
115{
116}
117
118void* wxComboBox::DoGetItemClientData(int) const
119{
120 return NULL;
121}
122
123void wxComboBox::DoSetItemClientObject(int, wxClientData*)
124{
125}
126
127wxClientData* wxComboBox::DoGetItemClientObject(int) const
128{
129 return NULL;
130}
131
2ee09b55 132#endif //wxUSE_COMBOBOX