1 | /* $Id: UIDnDDropSource_win.h 58212 2015-10-13 11:49:33Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIDnDDropSource class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2014-2015 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___UIDnDDropSource_win_h___
|
---|
19 | #define ___UIDnDDropSource_win_h___
|
---|
20 |
|
---|
21 | /* COM includes: */
|
---|
22 | #include "COMEnums.h"
|
---|
23 |
|
---|
24 | class UIDnDDataObject;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * Implementation of IDropSource for drag and drop on the host.
|
---|
28 | */
|
---|
29 | class UIDnDDropSource : public IDropSource
|
---|
30 | {
|
---|
31 | public:
|
---|
32 |
|
---|
33 | UIDnDDropSource(QWidget *pParent, UIDnDDataObject *pDataObject);
|
---|
34 | virtual ~UIDnDDropSource(void);
|
---|
35 |
|
---|
36 | public:
|
---|
37 |
|
---|
38 | uint32_t GetCurrentAction(void) const { return m_uCurAction; }
|
---|
39 |
|
---|
40 | public: /* IUnknown methods. */
|
---|
41 |
|
---|
42 | STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject);
|
---|
43 | STDMETHOD_(ULONG, AddRef)(void);
|
---|
44 | STDMETHOD_(ULONG, Release)(void);
|
---|
45 |
|
---|
46 | public: /* IDropSource methods. */
|
---|
47 |
|
---|
48 | STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD dwKeyState);
|
---|
49 | STDMETHOD(GiveFeedback)(DWORD dwEffect);
|
---|
50 |
|
---|
51 | protected:
|
---|
52 |
|
---|
53 | /** Pointer to parent widget. */
|
---|
54 | QWidget *m_pParent;
|
---|
55 | UIDnDDataObject *m_pDataObject;
|
---|
56 | /** The current reference count. */
|
---|
57 | LONG m_cRefCount;
|
---|
58 | /** Current (last) drop effect issued. */
|
---|
59 | DWORD m_dwCurEffect;
|
---|
60 | /** Current drop action to perform in case of a successful drop. */
|
---|
61 | Qt::DropActions m_uCurAction;
|
---|
62 | };
|
---|
63 |
|
---|
64 | #endif /* ___UIDnDDropSource_win_h___ */
|
---|
65 |
|
---|