+class wxMacDataBrowserCheckListControl : public wxMacDataBrowserListControl , public wxMacCheckListControl
+{
+public:
+ wxMacDataBrowserCheckListControl( wxListBox *peer, const wxPoint& pos, const wxSize& size, long style );
+ virtual ~wxMacDataBrowserCheckListControl();
+
+ virtual wxMacDataItem* CreateItem();
+
+ virtual bool MacIsChecked(unsigned int n) const;
+ virtual void MacCheck(unsigned int n, bool bCheck = true);
+};
+
+void wxCheckListBox::Init()
+{
+}
+
+bool wxCheckListBox::Create(
+ wxWindow *parent,
+ wxWindowID id,
+ const wxPoint &pos,
+ const wxSize &size,
+ const wxArrayString& choices,
+ long style,
+ const wxValidator& validator,
+ const wxString &name )
+{
+ wxCArrayString chs( choices );
+
+ return Create( parent, id, pos, size, chs.GetCount(), chs.GetStrings(), style, validator, name );
+}
+
+bool wxCheckListBox::Create(
+ wxWindow *parent,
+ wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ int n,
+ const wxString choices[],
+ long style,
+ const wxValidator& validator,
+ const wxString& name )
+{
+ m_macIsUserPane = false;
+
+ wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED),
+ wxT("only one of listbox selection modes can be specified") );
+
+ if ( !wxListBoxBase::Create( parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), validator, name ) )
+ return false;
+
+ // this will be increased by our Append command
+ wxMacDataBrowserCheckListControl* control = new wxMacDataBrowserCheckListControl( this, pos, size, style );
+ control->SetClientDataType( m_clientDataItemsType );
+ m_peer = control;
+
+ MacPostControlCreate(pos,size);
+
+ InsertItems( n , choices , 0 );
+
+ // Needed because it is a wxControlWithItems
+ SetBestSize( size );
+
+ return true;
+}
+
+// ----------------------------------------------------------------------------
+// wxCheckListBox functions
+// ----------------------------------------------------------------------------
+
+bool wxCheckListBox::IsChecked(unsigned int item) const
+{
+ wxCHECK_MSG( IsValid(item), false,
+ wxT("invalid index in wxCheckListBox::IsChecked") );
+
+ return GetPeer()->MacIsChecked( item );
+}