VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h@ 58212

Last change on this file since 58212 was 58212, checked in by vboxsync, 10 years ago

DnD: Updates.

  • Introduced protocol changelog in DragAndDropSvc.h.
  • Implemented protocol v3 with HOST_DND_HG_SND_DATA_HDR message for doing proper object accounting, among other parameters like checksumming and compression flags.
  • Encapsulated a lot of functionality in class hierarchies.
  • Renamed a lot of functions to make the usage more clear.
  • Various other bugfixes.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
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
24class UIDnDDataObject;
25
26/**
27 * Implementation of IDropSource for drag and drop on the host.
28 */
29class UIDnDDropSource : public IDropSource
30{
31public:
32
33 UIDnDDropSource(QWidget *pParent, UIDnDDataObject *pDataObject);
34 virtual ~UIDnDDropSource(void);
35
36public:
37
38 uint32_t GetCurrentAction(void) const { return m_uCurAction; }
39
40public: /* IUnknown methods. */
41
42 STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject);
43 STDMETHOD_(ULONG, AddRef)(void);
44 STDMETHOD_(ULONG, Release)(void);
45
46public: /* IDropSource methods. */
47
48 STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD dwKeyState);
49 STDMETHOD(GiveFeedback)(DWORD dwEffect);
50
51protected:
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
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette