1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/wince/checklst.h
3 // Purpose: wxCheckListBox class - a listbox with checkable items
4 // Author: Wlodzimierz ABX Skiba
7 // Copyright: (c) Wlodzimierz Skiba
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef __CHECKLSTCE__H_
12 #define __CHECKLSTCE__H_
14 class WXDLLIMPEXP_CORE wxCheckListBox
: public wxCheckListBoxBase
19 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
20 const wxPoint
& pos
= wxDefaultPosition
,
21 const wxSize
& size
= wxDefaultSize
,
23 const wxString choices
[] = NULL
,
25 const wxValidator
& validator
= wxDefaultValidator
,
26 const wxString
& name
= wxListBoxNameStr
);
27 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
30 const wxArrayString
& choices
,
32 const wxValidator
& validator
= wxDefaultValidator
,
33 const wxString
& name
= wxListBoxNameStr
);
34 virtual ~wxCheckListBox();
36 bool Create(wxWindow
*parent
, wxWindowID id
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
,
39 int n
= 0, const wxString choices
[] = NULL
,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxListBoxNameStr
);
43 bool Create(wxWindow
*parent
, wxWindowID id
,
46 const wxArrayString
& choices
,
48 const wxValidator
& validator
= wxDefaultValidator
,
49 const wxString
& name
= wxListBoxNameStr
);
51 // items may be checked
52 virtual bool IsChecked(unsigned int uiIndex
) const;
53 virtual void Check(unsigned int uiIndex
, bool bCheck
= true);
55 // public interface derived from wxListBox and lower classes
56 virtual void DoClear();
57 virtual void DoDeleteOneItem(unsigned int n
);
58 virtual unsigned int GetCount() const;
59 virtual int GetSelection() const;
60 virtual int GetSelections(wxArrayInt
& aSelections
) const;
61 virtual wxString
GetString(unsigned int n
) const;
62 virtual bool IsSelected(int n
) const;
63 virtual void SetString(unsigned int n
, const wxString
& s
);
66 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
69 void OnSize(wxSizeEvent
& event
);
71 // protected interface derived from wxListBox and lower classes
72 virtual int DoInsertItems(const wxArrayStringsAdapter
& items
,
74 void **clientData
, wxClientDataType type
);
76 virtual void* DoGetItemClientData(unsigned int n
) const;
77 virtual void DoSetItemClientData(unsigned int n
, void* clientData
);
78 virtual void DoSetFirstItem(int n
);
79 virtual void DoSetSelection(int n
, bool select
);
80 // convert our styles to Windows
81 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
84 wxArrayPtrVoid m_itemsClientData
;
87 DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox
)
90 #endif //_CHECKLSTCE_H