]>
Commit | Line | Data |
---|---|---|
31618973 WS |
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 | |
31618973 WS |
7 | // Copyright: (c) Wlodzimierz Skiba |
8 | // Licence: wxWindows licence | |
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef __CHECKLSTCE__H_ | |
12 | #define __CHECKLSTCE__H_ | |
13 | ||
53a2db12 | 14 | class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase |
31618973 WS |
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 | ||
31618973 | 51 | // items may be checked |
aa61d352 VZ |
52 | virtual bool IsChecked(unsigned int uiIndex) const; |
53 | virtual void Check(unsigned int uiIndex, bool bCheck = true); | |
31618973 WS |
54 | |
55 | // public interface derived from wxListBox and lower classes | |
d6f2a891 VZ |
56 | virtual void DoClear(); |
57 | virtual void DoDeleteOneItem(unsigned int n); | |
aa61d352 | 58 | virtual unsigned int GetCount() const; |
31618973 WS |
59 | virtual int GetSelection() const; |
60 | virtual int GetSelections(wxArrayInt& aSelections) const; | |
aa61d352 | 61 | virtual wxString GetString(unsigned int n) const; |
31618973 | 62 | virtual bool IsSelected(int n) const; |
aa61d352 | 63 | virtual void SetString(unsigned int n, const wxString& s); |
31618973 | 64 | |
f7273ce0 JS |
65 | // Implementation |
66 | virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); | |
31618973 WS |
67 | protected: |
68 | ||
69 | void OnSize(wxSizeEvent& event); | |
70 | ||
71 | // protected interface derived from wxListBox and lower classes | |
a236aa20 VZ |
72 | virtual int DoInsertItems(const wxArrayStringsAdapter& items, |
73 | unsigned int pos, | |
74 | void **clientData, wxClientDataType type); | |
75 | ||
aa61d352 | 76 | virtual void* DoGetItemClientData(unsigned int n) const; |
aa61d352 | 77 | virtual void DoSetItemClientData(unsigned int n, void* clientData); |
a236aa20 | 78 | virtual void DoSetFirstItem(int n); |
31618973 WS |
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: | |
31618973 WS |
84 | wxArrayPtrVoid m_itemsClientData; |
85 | ||
86 | DECLARE_EVENT_TABLE() | |
87 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox) | |
88 | }; | |
89 | ||
90 | #endif //_CHECKLSTCE_H |