1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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"
16 #include "wx/checklst.h"
19 IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
20 BEGIN_EVENT_TABLE(wxCheckListBox, wxCheckListBoxBase)
22 // WX_IMPLEMENT_COCOA_OWNER(wxCheckListBox,NSButton,NSControl,NSView)
24 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
27 const wxArrayString& choices,
29 const wxValidator& validator,
32 wxCArrayString chs(choices);
34 return Create(parent, winid, pos, size, chs.GetCount(), chs.GetStrings(),
35 style, validator, name);
38 bool wxCheckListBox::Create(wxWindow *parent, wxWindowID winid,
41 int n, const wxString choices[],
43 const wxValidator& validator,
46 if(!CreateControl(parent,winid,pos,size,style,validator,name))
50 m_parent->CocoaAddChild(this);
54 wxCheckListBox::~wxCheckListBox()
58 bool wxCheckListBox::IsChecked(size_t item) const
64 void wxCheckListBox::Check(size_t item, bool check)