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 wxMacCheckListControl
19 virtual bool MacIsChecked(unsigned int n
) const = 0;
20 virtual void MacCheck(unsigned int n
, bool bCheck
= true) = 0;
23 class WXDLLEXPORT wxCheckListBox
: public wxCheckListBoxBase
25 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
28 wxCheckListBox() { Init(); }
29 wxCheckListBox(wxWindow
*parent
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
34 const wxString
*choices
= NULL
,
36 const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxListBoxNameStr
)
41 Create(parent
, id
, pos
, size
, nStrings
, choices
, style
, validator
, name
);
43 wxCheckListBox(wxWindow
*parent
,
47 const wxArrayString
& choices
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxListBoxNameStr
)
54 Create(parent
, id
, pos
, size
, choices
, style
, validator
, name
);
57 bool Create(wxWindow
*parent
,
59 const wxPoint
& pos
= wxDefaultPosition
,
60 const wxSize
& size
= wxDefaultSize
,
62 const wxString
*choices
= NULL
,
64 const wxValidator
& validator
= wxDefaultValidator
,
65 const wxString
& name
= wxListBoxNameStr
);
66 bool Create(wxWindow
*parent
,
70 const wxArrayString
& choices
,
72 const wxValidator
& validator
= wxDefaultValidator
,
73 const wxString
& name
= wxListBoxNameStr
);
75 // items may be checked
76 bool IsChecked(unsigned int uiIndex
) const;
77 void Check(unsigned int uiIndex
, bool bCheck
= true);
79 wxMacCheckListControl
* GetPeer() const;