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_MAC_CHECKLST_H_
14 #define _WX_MAC_CHECKLST_H_
16 class WXDLLIMPEXP_CORE wxCheckListBox
: public wxCheckListBoxBase
20 wxCheckListBox() { Init(); }
21 wxCheckListBox(wxWindow
*parent
,
23 const wxPoint
& pos
= wxDefaultPosition
,
24 const wxSize
& size
= wxDefaultSize
,
26 const wxString
*choices
= NULL
,
28 const wxValidator
& validator
= wxDefaultValidator
,
29 const wxString
& name
= wxListBoxNameStr
)
33 Create(parent
, id
, pos
, size
, nStrings
, choices
, style
, validator
, name
);
35 wxCheckListBox(wxWindow
*parent
,
39 const wxArrayString
& choices
,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxListBoxNameStr
)
46 Create(parent
, id
, pos
, size
, choices
, style
, validator
, name
);
49 bool Create(wxWindow
*parent
,
51 const wxPoint
& pos
= wxDefaultPosition
,
52 const wxSize
& size
= wxDefaultSize
,
54 const wxString
*choices
= NULL
,
56 const wxValidator
& validator
= wxDefaultValidator
,
57 const wxString
& name
= wxListBoxNameStr
);
58 bool Create(wxWindow
*parent
,
62 const wxArrayString
& choices
,
64 const wxValidator
& validator
= wxDefaultValidator
,
65 const wxString
& name
= wxListBoxNameStr
);
67 // items may be checked
68 bool IsChecked(unsigned int uiIndex
) const;
69 void Check(unsigned int uiIndex
, bool bCheck
= true);
72 virtual void GetValueCallback( unsigned int n
, wxListWidgetColumn
* col
, wxListWidgetCellValue
& value
);
73 virtual void SetValueCallback( unsigned int n
, wxListWidgetColumn
* col
, wxListWidgetCellValue
& value
);
76 // override all methods which add/delete items to update m_checks array as
78 virtual void OnItemInserted(unsigned int pos
);
79 virtual void DoDeleteOneItem(unsigned int n
);
80 virtual void DoClear();
82 // the array containing the checked status of the items
85 wxListWidgetColumn
* m_checkColumn
;
91 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
94 #endif // _WX_MAC_CHECKLST_H_