1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/checklst.h
3 // Purpose: wxCheckListBox class - a listbox with checkable items
4 // Note: this is an optional class.
5 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MAC_CHECKLST_H_
13 #define _WX_MAC_CHECKLST_H_
15 class WXDLLIMPEXP_CORE wxCheckListBox
: public wxCheckListBoxBase
19 wxCheckListBox() { Init(); }
20 wxCheckListBox(wxWindow
*parent
,
22 const wxPoint
& pos
= wxDefaultPosition
,
23 const wxSize
& size
= wxDefaultSize
,
25 const wxString
*choices
= NULL
,
27 const wxValidator
& validator
= wxDefaultValidator
,
28 const wxString
& name
= wxListBoxNameStr
)
32 Create(parent
, id
, pos
, size
, nStrings
, choices
, style
, validator
, name
);
34 wxCheckListBox(wxWindow
*parent
,
38 const wxArrayString
& choices
,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxListBoxNameStr
)
45 Create(parent
, id
, pos
, size
, choices
, style
, validator
, name
);
48 bool Create(wxWindow
*parent
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
,
53 const wxString
*choices
= NULL
,
55 const wxValidator
& validator
= wxDefaultValidator
,
56 const wxString
& name
= wxListBoxNameStr
);
57 bool Create(wxWindow
*parent
,
61 const wxArrayString
& choices
,
63 const wxValidator
& validator
= wxDefaultValidator
,
64 const wxString
& name
= wxListBoxNameStr
);
66 // items may be checked
67 bool IsChecked(unsigned int uiIndex
) const;
68 void Check(unsigned int uiIndex
, bool bCheck
= true);
71 virtual void GetValueCallback( unsigned int n
, wxListWidgetColumn
* col
, wxListWidgetCellValue
& value
);
72 virtual void SetValueCallback( unsigned int n
, wxListWidgetColumn
* col
, wxListWidgetCellValue
& value
);
75 // override all methods which add/delete items to update m_checks array as
77 virtual void OnItemInserted(unsigned int pos
);
78 virtual void DoDeleteOneItem(unsigned int n
);
79 virtual void DoClear();
81 // the array containing the checked status of the items
84 wxListWidgetColumn
* m_checkColumn
;
90 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
93 #endif // _WX_MAC_CHECKLST_H_