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
16 #include "wx/checklst.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
24 BEGIN_EVENT_TABLE(wxCheckListBox, wxCheckListBoxBase)
26 // WX_IMPLEMENT_COCOA_OWNER(wxCheckListBox,NSButton,NSControl,NSView)
28 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
31 const wxArrayString& choices,
33 const wxValidator& validator,
36 wxCArrayString chs(choices);
38 return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
39 style, validator, name);
42 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
45 int n, const wxString choices[],
47 const wxValidator& validator,
50 if(!CreateControl(parent,winid,pos,size,style,validator,name))
54 m_parent->CocoaAddChild(this);
58 wxCheckListBox::~wxCheckListBox()
62 bool wxCheckListBox::IsChecked(unsigned int item) const
68 void wxCheckListBox::Check(unsigned int item, bool check)