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 wxMacCheckListControl
19 virtual bool MacIsChecked(unsigned int n
) const = 0;
20 virtual void MacCheck(unsigned int n
, bool bCheck
= true) = 0;
22 virtual ~wxMacCheckListControl() { }
25 class WXDLLIMPEXP_CORE wxCheckListBox
: public wxCheckListBoxBase
29 wxCheckListBox() { Init(); }
30 wxCheckListBox(wxWindow
*parent
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
35 const wxString
*choices
= NULL
,
37 const wxValidator
& validator
= wxDefaultValidator
,
38 const wxString
& name
= wxListBoxNameStr
)
42 Create(parent
, id
, pos
, size
, nStrings
, choices
, style
, validator
, name
);
44 wxCheckListBox(wxWindow
*parent
,
48 const wxArrayString
& choices
,
50 const wxValidator
& validator
= wxDefaultValidator
,
51 const wxString
& name
= wxListBoxNameStr
)
55 Create(parent
, id
, pos
, size
, choices
, style
, validator
, name
);
58 bool Create(wxWindow
*parent
,
60 const wxPoint
& pos
= wxDefaultPosition
,
61 const wxSize
& size
= wxDefaultSize
,
63 const wxString
*choices
= NULL
,
65 const wxValidator
& validator
= wxDefaultValidator
,
66 const wxString
& name
= wxListBoxNameStr
);
67 bool Create(wxWindow
*parent
,
71 const wxArrayString
& choices
,
73 const wxValidator
& validator
= wxDefaultValidator
,
74 const wxString
& name
= wxListBoxNameStr
);
76 // items may be checked
77 bool IsChecked(unsigned int uiIndex
) const;
78 void Check(unsigned int uiIndex
, bool bCheck
= true);
80 wxMacCheckListControl
* GetPeer() const;
87 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
90 #endif // _WX_MAC_CHECKLST_H_