LibreOffice Module vcl (master)  1
dndhelp.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_VCL_DNDHELP_HXX
21 #define INCLUDED_VCL_DNDHELP_HXX
22 
23 #include <vcl/dllapi.h>
24 #include <cppuhelper/weak.hxx>
25 #include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp>
26 #include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp>
27 #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
28 
29 namespace com {
30 namespace sun {
31 namespace star {
32 
33 namespace datatransfer {
34 namespace dnd {
35  struct DragGestureEvent;
36  struct DragSourceDragEvent;
37  struct DragSourceDropEvent;
38  struct DragSourceEvent;
39  struct DropTargetDragEvent;
40  struct DropTargetDragEnterEvent;
41  struct DropTargetDropEvent;
42  struct DropTargetEvent;
43 }}
44 
45 }}}
46 
47 namespace vcl
48 {
49 
50 namespace unohelper
51 {
52 
54 {
55 public:
56  virtual ~DragAndDropClient() COVERITY_NOEXCEPT_FALSE;
57 
58  // css::datatransfer::dnd::XDragGestureListener
60  virtual void dragGestureRecognized( const css::datatransfer::dnd::DragGestureEvent& dge );
61 
62  // css::datatransfer::dnd::XDragSourceListener
64  virtual void dragDropEnd(const css::datatransfer::dnd::DragSourceDropEvent& dsde );
65 
66  // css::datatransfer::dnd::XDropTargetListener
68  virtual void drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde );
70  virtual void dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee );
72  virtual void dragExit( const css::datatransfer::dnd::DropTargetEvent& dte );
74  virtual void dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde );
75 };
76 
78  public css::datatransfer::dnd::XDragGestureListener,
79  public css::datatransfer::dnd::XDragSourceListener,
80  public css::datatransfer::dnd::XDropTargetListener,
81  public ::cppu::OWeakObject
82 {
83 private:
85 
86 public:
88  virtual ~DragAndDropWrapper() override;
89 
90  // css::uno::XInterface
91  css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
92  void SAL_CALL acquire() throw() override { OWeakObject::acquire(); }
93  void SAL_CALL release() throw() override { OWeakObject::release(); }
94 
95  // css::lang::XEventListener
96  void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
97 
98  // css::datatransfer::dnd::XDragGestureListener
99  void SAL_CALL dragGestureRecognized( const css::datatransfer::dnd::DragGestureEvent& dge ) override;
100 
101  // css::datatransfer::dnd::XDragSourceListener
102  void SAL_CALL dragDropEnd( const css::datatransfer::dnd::DragSourceDropEvent& dsde ) override;
103  void SAL_CALL dragEnter( const css::datatransfer::dnd::DragSourceDragEvent& dsde ) override;
104  void SAL_CALL dragExit( const css::datatransfer::dnd::DragSourceEvent& dse ) override;
105  void SAL_CALL dragOver( const css::datatransfer::dnd::DragSourceDragEvent& dsde ) override;
106  void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DragSourceDragEvent& dsde ) override;
107 
108  // css::datatransfer::dnd::XDropTargetListener
109  void SAL_CALL drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) override;
110  void SAL_CALL dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) override;
111  void SAL_CALL dragExit( const css::datatransfer::dnd::DropTargetEvent& dte ) override;
112  void SAL_CALL dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) override;
113  void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) override;
114 };
115 
116 }} // namespace vcl::unohelper
117 
118 #endif // INCLUDED_VCL_DNDHELP_HXX
119 
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
DragAndDropClient * mpClient
Definition: dndhelp.hxx:84
void SAL_CALL acquire() override
Definition: dndhelp.hxx:92
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
void SAL_CALL release() override
Definition: dndhelp.hxx:93