1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/cocoa/checklst.mm
3 // Purpose: wxCheckListBox
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWidgets licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
14 #if wxUSE_CHECKLISTBOX
19 #include "wx/checklst.h"
22 IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
23 BEGIN_EVENT_TABLE(wxCheckListBox, wxCheckListBoxBase)
25 // WX_IMPLEMENT_COCOA_OWNER(wxCheckListBox,NSButton,NSControl,NSView)
27 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
30 const wxArrayString& choices,
32 const wxValidator& validator,
35 wxCArrayString chs(choices);
37 return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
38 style, validator, name);
41 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
44 int n, const wxString choices[],
46 const wxValidator& validator,
49 if(!CreateControl(parent,winid,pos,size,style,validator,name))
53 m_parent->CocoaAddChild(this);
57 wxCheckListBox::~wxCheckListBox()
61 bool wxCheckListBox::IsChecked(unsigned int item) const
67 void wxCheckListBox::Check(unsigned int item, bool check)