1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/wince/checklst.h
3 // Purpose: wxCheckListBox class - a listbox with checkable items
4 // Author: Wlodzimierz ABX Skiba
8 // Copyright: (c) Wlodzimierz Skiba
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef __CHECKLSTCE__H_
13 #define __CHECKLSTCE__H_
15 class WXDLLEXPORT wxCheckListBox
: public wxCheckListBoxBase
20 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
21 const wxPoint
& pos
= wxDefaultPosition
,
22 const wxSize
& size
= wxDefaultSize
,
24 const wxString choices
[] = NULL
,
26 const wxValidator
& validator
= wxDefaultValidator
,
27 const wxString
& name
= wxListBoxNameStr
);
28 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
31 const wxArrayString
& choices
,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxListBoxNameStr
);
35 virtual ~wxCheckListBox();
37 bool Create(wxWindow
*parent
, wxWindowID id
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
40 int n
= 0, const wxString choices
[] = NULL
,
42 const wxValidator
& validator
= wxDefaultValidator
,
43 const wxString
& name
= wxListBoxNameStr
);
44 bool Create(wxWindow
*parent
, wxWindowID id
,
47 const wxArrayString
& choices
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxListBoxNameStr
);
52 // override base class virtuals
53 virtual void Delete(int n
);
55 // items may be checked
56 virtual bool IsChecked(size_t uiIndex
) const;
57 virtual void Check(size_t uiIndex
, bool bCheck
= true);
59 // public interface derived from wxListBox and lower classes
61 virtual int GetCount() const;
62 virtual int GetSelection() const;
63 virtual int GetSelections(wxArrayInt
& aSelections
) const;
64 virtual wxString
GetString(int n
) const;
65 virtual bool IsSelected(int n
) const;
66 virtual void SetString(int n
, const wxString
& s
);
70 void OnSize(wxSizeEvent
& event
);
72 // protected interface derived from wxListBox and lower classes
73 virtual int DoAppend(const wxString
& item
);
74 virtual void* DoGetItemClientData(int n
) const;
75 virtual wxClientData
* DoGetItemClientObject(int n
) const;
76 virtual void DoInsertItems(const wxArrayString
& items
, int pos
);
77 virtual void DoSetFirstItem(int n
);
78 virtual void DoSetItemClientData(int n
, void* clientData
);
79 virtual void DoSetItemClientObject(int n
, wxClientData
* clientData
);
80 virtual void DoSetItems(const wxArrayString
& items
, void **clientData
);
81 virtual void DoSetSelection(int n
, bool select
);
82 // convert our styles to Windows
83 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
87 wxArrayPtrVoid m_itemsClientData
;
90 DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox
)
93 #endif //_CHECKLSTCE_H