LibreOffice Module vcl (master) 1
dndlistenercontainer.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_INC_DNDLCON_HXX
21#define INCLUDED_VCL_INC_DNDLCON_HXX
22
23#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
24#include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
25#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
26#include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp>
27#include <com/sun/star/datatransfer/dnd/XDropTargetDropContext.hpp>
31
32#include <vcl/unohelp2.hxx>
33
35 public ::cppu::WeakImplHelper<css::datatransfer::dnd::XDropTargetDropContext>
36{
37public:
39
40 // XDropTargetDropContext
41 virtual void SAL_CALL acceptDrop( sal_Int8 dragOperation ) override;
42 virtual void SAL_CALL rejectDrop() override;
43 virtual void SAL_CALL dropComplete( sal_Bool success ) override;
44};
45
47 public ::cppu::WeakImplHelper<css::datatransfer::dnd::XDropTargetDragContext>
48{
49public:
51
52 // XDropTargetDragContext
53 virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) override;
54 virtual void SAL_CALL rejectDrag() override;
55};
56
59 css::datatransfer::dnd::XDragGestureRecognizer,
60 css::datatransfer::dnd::XDropTargetDragContext,
61 css::datatransfer::dnd::XDropTargetDropContext,
62 css::datatransfer::dnd::XDropTarget >
63{
68 css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext;
69 css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > m_xDropTargetDropContext;
70
71public:
72
73 DNDListenerContainer( sal_Int8 nDefaultActions );
74 virtual ~DNDListenerContainer() override;
75
76 sal_uInt32 fireDropEvent(
77 const css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext >& context,
78 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
79 const css::uno::Reference< css::datatransfer::XTransferable >& transferable );
80
81 sal_uInt32 fireDragExitEvent();
82
83 sal_uInt32 fireDragOverEvent(
84 const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext >& context,
85 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions );
86
87 sal_uInt32 fireDragEnterEvent(
88 const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext >& context,
89 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
90 const css::uno::Sequence< css::datatransfer::DataFlavor >& dataFlavor );
91
93 const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext >& context,
94 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions );
95
96 sal_uInt32 fireDragGestureEvent(
97 sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY,
98 const css::uno::Reference< css::datatransfer::dnd::XDragSource >& dragSource,
99 const css::uno::Any& triggerEvent );
100
101 /*
102 * XDragGestureRecognizer
103 */
104
105 virtual void SAL_CALL addDragGestureListener( const css::uno::Reference< css::datatransfer::dnd::XDragGestureListener >& dgl ) override;
106 virtual void SAL_CALL removeDragGestureListener( const css::uno::Reference< css::datatransfer::dnd::XDragGestureListener >& dgl ) override;
107 virtual void SAL_CALL resetRecognizer( ) override;
108
109 /*
110 * XDropTargetDragContext
111 */
112
113 virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) override;
114 virtual void SAL_CALL rejectDrag( ) override;
115
116 /*
117 * XDropTargetDropContext
118 */
119
120 virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) override;
121 virtual void SAL_CALL rejectDrop( ) override;
122 virtual void SAL_CALL dropComplete( sal_Bool success ) override;
123
124 /*
125 * XDropTarget
126 */
127
128 virtual void SAL_CALL addDropTargetListener( const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >& dtl ) override;
129 virtual void SAL_CALL removeDropTargetListener( const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >& dtl ) override;
130 virtual sal_Bool SAL_CALL isActive( ) override;
131 virtual void SAL_CALL setActive( sal_Bool active ) override;
132 virtual sal_Int8 SAL_CALL getDefaultActions( ) override;
133 virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) override;
134};
135
136#endif
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt32 fireDragOverEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions)
css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext
virtual void SAL_CALL removeDragGestureListener(const css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > &dgl) override
virtual sal_Bool SAL_CALL isActive() override
virtual void SAL_CALL addDragGestureListener(const css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > &dgl) override
virtual void SAL_CALL resetRecognizer() override
virtual void SAL_CALL acceptDrop(sal_Int8 dropOperation) override
comphelper::OInterfaceContainerHelper4< css::datatransfer::dnd::XDropTargetListener > maDropTargetListeners
virtual void SAL_CALL rejectDrag() override
sal_uInt32 fireDragEnterEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const css::uno::Sequence< css::datatransfer::DataFlavor > &dataFlavor)
virtual void SAL_CALL addDropTargetListener(const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > &dtl) override
sal_uInt32 fireDragGestureEvent(sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY, const css::uno::Reference< css::datatransfer::dnd::XDragSource > &dragSource, const css::uno::Any &triggerEvent)
virtual void SAL_CALL dropComplete(sal_Bool success) override
virtual void SAL_CALL setActive(sal_Bool active) override
virtual ~DNDListenerContainer() override
DNDListenerContainer(sal_Int8 nDefaultActions)
comphelper::OInterfaceContainerHelper4< css::datatransfer::dnd::XDragGestureListener > maDragGestureListeners
sal_uInt32 fireDropActionChangedEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions)
virtual void SAL_CALL removeDropTargetListener(const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > &dtl) override
sal_uInt32 fireDropEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const css::uno::Reference< css::datatransfer::XTransferable > &transferable)
virtual void SAL_CALL acceptDrag(sal_Int8 dragOperation) override
virtual void SAL_CALL rejectDrop() override
virtual sal_Int8 SAL_CALL getDefaultActions() override
virtual void SAL_CALL setDefaultActions(sal_Int8 actions) override
css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > m_xDropTargetDropContext
virtual void SAL_CALL rejectDrag() override
virtual void SAL_CALL acceptDrag(sal_Int8 dragOperation) override
virtual void SAL_CALL rejectDrop() override
virtual void SAL_CALL acceptDrop(sal_Int8 dragOperation) override
virtual void SAL_CALL dropComplete(sal_Bool success) override
unsigned char sal_Bool
signed char sal_Int8