]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/wince/checklst.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / msw / wince / checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/wince/checklst.h
3 // Purpose: wxCheckListBox class - a listbox with checkable items
4 // Author: Wlodzimierz ABX Skiba
5 // Modified by:
6 // Created: 30.10.2005
7 // Copyright: (c) Wlodzimierz Skiba
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __CHECKLSTCE__H_
12 #define __CHECKLSTCE__H_
13
14 class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
15 {
16 public:
17 // ctors
18 wxCheckListBox();
19 wxCheckListBox(wxWindow *parent, wxWindowID id,
20 const wxPoint& pos = wxDefaultPosition,
21 const wxSize& size = wxDefaultSize,
22 int nStrings = 0,
23 const wxString choices[] = NULL,
24 long style = 0,
25 const wxValidator& validator = wxDefaultValidator,
26 const wxString& name = wxListBoxNameStr);
27 wxCheckListBox(wxWindow *parent, wxWindowID id,
28 const wxPoint& pos,
29 const wxSize& size,
30 const wxArrayString& choices,
31 long style = 0,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxListBoxNameStr);
34 virtual ~wxCheckListBox();
35
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,
40 long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxListBoxNameStr);
43 bool Create(wxWindow *parent, wxWindowID id,
44 const wxPoint& pos,
45 const wxSize& size,
46 const wxArrayString& choices,
47 long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxListBoxNameStr);
50
51 // items may be checked
52 virtual bool IsChecked(unsigned int uiIndex) const;
53 virtual void Check(unsigned int uiIndex, bool bCheck = true);
54
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);
64
65 // Implementation
66 virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
67 protected:
68
69 void OnSize(wxSizeEvent& event);
70
71 // protected interface derived from wxListBox and lower classes
72 virtual int DoInsertItems(const wxArrayStringsAdapter& items,
73 unsigned int pos,
74 void **clientData, wxClientDataType type);
75
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;
82
83 private:
84 wxArrayPtrVoid m_itemsClientData;
85
86 DECLARE_EVENT_TABLE()
87 DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox)
88 };
89
90 #endif //_CHECKLSTCE_H