From c13c0b52d24fa6d2c82287aa418f5daaf0fb099b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 May 2015 14:04:35 +0000 Subject: multiselect mode for CCtrlTreeView git-svn-id: http://svn.miranda-ng.org/main/trunk@13586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_gui.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/m_gui.h b/include/m_gui.h index 89393d0be7..e86bf71acc 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -851,8 +851,9 @@ protected: #undef GetNextSibling #undef GetPrevSibling -#define MTREE_CHECKBOX 0x0001 -#define MTREE_DND 0x0002 +#define MTREE_CHECKBOX 0x0001 +#define MTREE_DND 0x0002 +#define MTREE_MULTISELECT 0x0004 class MIR_CORE_EXPORT CCtrlTreeView : public CCtrlBase { @@ -931,6 +932,21 @@ public: void GetItem(HTREEITEM hItem, TVITEMEX *tvi, TCHAR *szText, int iTextLength); void InvertCheck(HTREEITEM hItem); + bool IsSelected(HTREEITEM hItem); + int GetNumSelected(); + void GetSelected(LIST<_TREEITEM> &selected); + + void Select(HTREEITEM hItem); + void Select(LIST<_TREEITEM> &selected); + void SelectAll(); + void SelectRange(HTREEITEM hStart, HTREEITEM hEnd); + + void Unselect(HTREEITEM hItem); + void UnselectAll(); + + void DropHilite(HTREEITEM hItem); + void DropUnhilite(HTREEITEM hItem); + // Events struct TEventInfo { CCtrlTreeView *treeviewctrl; @@ -970,6 +986,7 @@ protected: bool m_bDndEnabled : 1; bool m_bDragging : 1; bool m_bCheckBox : 1; + bool m_bMultiSelect : 1; }; }; HTREEITEM m_hDragItem; // valid if m_bDragging == true -- cgit v1.2.3