1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/listbox.mm
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
13 #include "wx/listbox.h"
16 IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
17 BEGIN_EVENT_TABLE(wxListBox, wxListBoxBase)
19 // WX_IMPLEMENT_COCOA_OWNER(wxListBox,NSButton,NSControl,NSView)
21 bool wxListBox::Create(wxWindow *parent, wxWindowID winid,
24 int n, const wxString choices[],
26 const wxValidator& validator,
29 if(!CreateControl(parent,winid,pos,size,style,validator,name))
33 m_parent->CocoaAddChild(this);
37 wxListBox::~wxListBox()
39 CocoaRemoveFromParent();
42 // pure virtuals from wxListBoxBase
43 bool wxListBox::IsSelected(int n) const
48 void wxListBox::SetSelection(int n, bool select)
52 int wxListBox::GetSelections(wxArrayInt& aSelections) const
57 void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
61 void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
65 void wxListBox::DoSetFirstItem(int n)
70 // pure virtuals from wxItemContainer
72 void wxListBox::Clear()
76 void wxListBox::Delete(int n)
81 int wxListBox::GetCount() const
86 wxString wxListBox::GetString(int n) const
91 void wxListBox::SetString(int n, const wxString& s)
95 int wxListBox::FindString(const wxString& s) const
101 void wxListBox::Select(int n)
105 int wxListBox::GetSelection() const
110 int wxListBox::DoAppend(const wxString& item)
115 void wxListBox::DoSetItemClientData(int n, void* clientData)
119 void* wxListBox::DoGetItemClientData(int n) const
124 void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
128 wxClientData* wxListBox::DoGetItemClientObject(int n) const