Merge branch 'restructure-tree'
[TortoiseGit.git] / src / TortoiseProc / RepoDrags.h
blob9e3431c27b733cda78444a84c97031f93dc29127
1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2008 - Stefan Kueng
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
20 #include "DragDropImpl.h"
23 class CItem;
24 class CTreeItem;
25 class CRepositoryBrowser;
27 /**
28 * \ingroup TortoiseProc
29 * Implements a drop target on the left tree control in the repository browser
31 class CTreeDropTarget : public CIDropTarget
33 public:
34 CTreeDropTarget(CRepositoryBrowser * pRepoBrowser);
36 virtual bool OnDrop(FORMATETC* pFmtEtc, STGMEDIUM& medium, DWORD *pdwEffect, POINTL pt);
37 virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject __RPC_FAR *pDataObj, DWORD grfKeyState, POINTL pt, DWORD __RPC_FAR *pdwEffect);
38 virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD __RPC_FAR *pdwEffect);
39 virtual HRESULT STDMETHODCALLTYPE DragLeave(void);
41 private:
42 CRepositoryBrowser * m_pRepoBrowser;
43 bool m_bFiles;
44 DWORD m_dwHoverStartTicks;
45 HTREEITEM hLastItem;
48 /**
49 * \ingroup TortoiseProc
50 * Implements a drop target on the right list control in the repository browser
52 class CListDropTarget : public CIDropTarget
54 public:
55 CListDropTarget(CRepositoryBrowser * pRepoBrowser);
57 virtual bool OnDrop(FORMATETC* pFmtEtc, STGMEDIUM& medium, DWORD *pdwEffect, POINTL pt);
58 virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject __RPC_FAR *pDataObj, DWORD grfKeyState, POINTL pt, DWORD __RPC_FAR *pdwEffect);
59 virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD __RPC_FAR *pdwEffect);
60 virtual HRESULT STDMETHODCALLTYPE DragLeave(void);
62 private:
63 CRepositoryBrowser * m_pRepoBrowser;
64 bool m_bFiles;