merge the formfield patch from ooo-build
[ooovba.git] / vcl / source / window / dndlcon.hxx
blobd65914fb35fdb1550a8655169c0dd79f42a8b0bc
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dndlcon.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DNDLCON_HXX_
32 #define _DNDLCON_HXX_
34 #include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
35 #include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
36 #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
37 #include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp>
38 #include <com/sun/star/datatransfer/dnd/XDropTargetDropContext.hpp>
39 #include <cppuhelper/compbase4.hxx>
41 #include <vcl/unohelp2.hxx>
43 class DNDListenerContainer : public ::vcl::unohelper::MutexHelper,
44 public ::cppu::WeakComponentImplHelper4<
45 ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer, \
46 ::com::sun::star::datatransfer::dnd::XDropTargetDragContext,
47 ::com::sun::star::datatransfer::dnd::XDropTargetDropContext,
48 ::com::sun::star::datatransfer::dnd::XDropTarget >
50 sal_Bool m_bActive;
51 sal_Int8 m_nDefaultActions;
53 ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext;
54 ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext > m_xDropTargetDropContext;
56 public:
58 DNDListenerContainer( sal_Int8 nDefaultActions );
59 virtual ~DNDListenerContainer();
61 sal_uInt32 fireDropEvent(
62 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& context,
63 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
64 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable );
66 sal_uInt32 fireDragExitEvent();
68 sal_uInt32 fireDragOverEvent(
69 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context,
70 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions );
72 sal_uInt32 fireDragEnterEvent(
73 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context,
74 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
75 const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& dataFlavor );
77 sal_uInt32 fireDropActionChangedEvent(
78 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context,
79 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions );
81 sal_uInt32 fireDragGestureEvent(
82 sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY,
83 const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& dragSource,
84 const ::com::sun::star::uno::Any& triggerEvent );
87 * XDragGestureRecognizer
90 virtual void SAL_CALL addDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException);
91 virtual void SAL_CALL removeDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException);
92 virtual void SAL_CALL resetRecognizer( ) throw(::com::sun::star::uno::RuntimeException);
95 * XDropTargetDragContext
98 virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) throw (::com::sun::star::uno::RuntimeException);
99 virtual void SAL_CALL rejectDrag( ) throw (::com::sun::star::uno::RuntimeException);
103 * XDropTargetDropContext
106 virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) throw (::com::sun::star::uno::RuntimeException);
107 virtual void SAL_CALL rejectDrop( ) throw (::com::sun::star::uno::RuntimeException);
108 virtual void SAL_CALL dropComplete( sal_Bool success ) throw (::com::sun::star::uno::RuntimeException);
111 * XDropTarget
114 virtual void SAL_CALL addDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException);
115 virtual void SAL_CALL removeDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException);
116 virtual sal_Bool SAL_CALL isActive( ) throw(::com::sun::star::uno::RuntimeException);
117 virtual void SAL_CALL setActive( sal_Bool active ) throw(::com::sun::star::uno::RuntimeException);
118 virtual sal_Int8 SAL_CALL getDefaultActions( ) throw(::com::sun::star::uno::RuntimeException);
119 virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(::com::sun::star::uno::RuntimeException);
123 //==================================================================================================
125 //==================================================================================================
127 #endif