]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/combobox.mm
wxCocoa: Added basic (i.e. not working) implementation of wxComboBox
[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:
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/combobox.h"
14#include "wx/log.h"
15
16#include "wx/cocoa/autorelease.h"
17#include "wx/cocoa/string.h"
18
19#import <AppKit/NSComboBox.h>
20
21IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxTextCtrl)
22BEGIN_EVENT_TABLE(wxComboBox, wxTextCtrl)
23END_EVENT_TABLE()
24// WX_IMPLEMENT_COCOA_OWNER(wxComboBox,NSComboBox,NSTextField,NSView)
25
26bool wxComboBox::Create(wxWindow *parent, wxWindowID winid,
27 const wxString& value,
28 const wxPoint& pos,
29 const wxSize& size,
30 int n, const wxString choices[],
31 long style,
32 const wxValidator& validator,
33 const wxString& name)
34{
35 wxAutoNSAutoreleasePool pool;
36 if(!CreateControl(parent,winid,pos,size,style,validator,name))
37 return false;
38
39 m_cocoaNSView = NULL;
40 SetNSTextField([[NSComboBox alloc] initWithFrame:NSMakeRect(0,0,30,30)]);
41 [m_cocoaNSView release];
42 [GetNSTextField() setStringValue:wxNSStringWithWxString(value.c_str())];
43 [GetNSControl() sizeToFit];
44 if(m_parent)
45 m_parent->CocoaAddChild(this);
46 return true;
47}
48
49wxComboBox::~wxComboBox()
50{
51}
52
53void wxComboBox::SetSelection(int)
54{
55}
56
57wxString wxComboBox::GetStringSelection()
58{
59 return wxEmptyString;
60}
61
62void wxComboBox::SetStringSelection(wxString& selection)
63{
64}
65
66void wxComboBox::Clear()
67{
68}
69
70void wxComboBox::Delete(int)
71{
72}
73
74int wxComboBox::GetCount() const
75{
76 return 0;
77}
78
79wxString wxComboBox::GetString(int) const
80{
81 return wxEmptyString;
82}
83
84void wxComboBox::SetString(int, const wxString&)
85{
86}
87
88int wxComboBox::FindString(const wxString&) const
89{
90 return 0;
91}
92
93int wxComboBox::GetSelection() const
94{
95 return 0;
96}
97
98int wxComboBox::DoAppend(const wxString&)
99{
100 return 0;
101}
102
103int wxComboBox::DoInsert(const wxString&, int)
104{
105 return 0;
106}
107
108void wxComboBox::DoSetItemClientData(int, void*)
109{
110}
111
112void* wxComboBox::DoGetItemClientData(int) const
113{
114 return NULL;
115}
116
117void wxComboBox::DoSetItemClientObject(int, wxClientData*)
118{
119}
120
121wxClientData* wxComboBox::DoGetItemClientObject(int) const
122{
123 return NULL;
124}
125