1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/checklst.h
3 // Purpose: wxCheckListBox class - a listbox with checkable items
4 // Note: this is an optional class.
5 // Author: Stefan Csomor
9 // Copyright: (c) Stefan Csomor
10 // Licence: wxWindows licence
11 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_CHECKLST_H_
14 #define _WX_CHECKLST_H_
16 class WXDLLEXPORT wxCheckListBox
: public wxCheckListBoxBase
18 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
21 wxCheckListBox() { Init(); }
22 wxCheckListBox(wxWindow
*parent
,
24 const wxPoint
& pos
= wxDefaultPosition
,
25 const wxSize
& size
= wxDefaultSize
,
27 const wxString
*choices
= NULL
,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxListBoxNameStr
)
34 Create(parent
, id
, pos
, size
, nStrings
, choices
, style
, validator
, name
);
36 wxCheckListBox(wxWindow
*parent
,
40 const wxArrayString
& choices
,
42 const wxValidator
& validator
= wxDefaultValidator
,
43 const wxString
& name
= wxListBoxNameStr
)
47 Create(parent
, id
, pos
, size
, choices
, style
, validator
, name
);
50 bool Create(wxWindow
*parent
,
52 const wxPoint
& pos
= wxDefaultPosition
,
53 const wxSize
& size
= wxDefaultSize
,
55 const wxString
*choices
= NULL
,
57 const wxValidator
& validator
= wxDefaultValidator
,
58 const wxString
& name
= wxListBoxNameStr
);
59 bool Create(wxWindow
*parent
,
63 const wxArrayString
& choices
,
65 const wxValidator
& validator
= wxDefaultValidator
,
66 const wxString
& name
= wxListBoxNameStr
);
68 // items may be checked
69 bool IsChecked(unsigned int uiIndex
) const;
70 void Check(unsigned int uiIndex
, bool bCheck
= true);
73 // override all methods which add/delete items to update m_checks array as
75 virtual void Delete(unsigned int n
);
76 // the array containing the checked status of the items
80 virtual int DoAppend(const wxString
& item
);
81 virtual void DoInsertItems(const wxArrayString
& items
, unsigned int pos
);
82 virtual void DoSetItems(const wxArrayString
& items
, void **clientData
);
83 virtual void DoClear();
84 // common part of all ctors