diff options
author | Oliver Braun <obr@openoffice.org> | 2001-02-12 11:26:06 +0000 |
---|---|---|
committer | Oliver Braun <obr@openoffice.org> | 2001-02-12 11:26:06 +0000 |
commit | d59c7ff8cc32ae0779fca6d85d39ba6d6c0516cd (patch) | |
tree | 2a9c32596110992debc7ca5763bbcaf7907a403d /vcl/source/window/dndevdis.hxx | |
parent | 43eacefc2b1d59cc9a1c5cc9f0ba3c930c37eab2 (diff) |
dnd enhancements
Diffstat (limited to 'vcl/source/window/dndevdis.hxx')
-rw-r--r-- | vcl/source/window/dndevdis.hxx | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/vcl/source/window/dndevdis.hxx b/vcl/source/window/dndevdis.hxx index 1bbc6f6d94bf..50b7e64e162d 100644 --- a/vcl/source/window/dndevdis.hxx +++ b/vcl/source/window/dndevdis.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dndevdis.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: obr $ $Date: 2001-02-09 15:59:18 $ + * last change: $Author: obr $ $Date: 2001-02-12 12:26:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,22 +66,47 @@ #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> #endif -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ -#include <cppuhelper/implbase1.hxx> +#ifndef _COM_SUN_STAR_DATATRANSFER_DND_XDROPTARGETDRAGCONTEXT_HPP_ +#include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> +#endif + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> #endif #ifndef _SV_WINDOW_HXX #include <window.hxx> #endif -class DNDEventDispatcher: public ::cppu::WeakImplHelper1< - ::com::sun::star::datatransfer::dnd::XDropTargetListener > +class DNDEventDispatcher: public ::cppu::WeakImplHelper2< + ::com::sun::star::datatransfer::dnd::XDropTargetListener, + ::com::sun::star::datatransfer::dnd::XDropTargetDragContext > { Window * m_pTopWindow; Window * m_pCurrentWindow; - // actions: 1 : DragEnter 2 : DragOver 3 : DropActionChanged - sal_Int32 dragAction( sal_Int8 action, Window * pWindow, const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ); + ::osl::Mutex m_aMutex; + ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_aDataFlavorList; + + /* + * fire the events on the dnd listener container of the specified window + */ + + sal_Int32 fireDragEnterEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, + const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& aFlavorList ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDragOverEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDragExitEvent( Window *pWindow ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDropActionChangedEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); + + sal_Int32 fireDropEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& xContext, + const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, + const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable ) throw(::com::sun::star::uno::RuntimeException); public: @@ -89,6 +114,13 @@ public: virtual ~DNDEventDispatcher(); /* + * XDropTargetDragContext + */ + + virtual void SAL_CALL acceptDrag( const sal_Int8 dropAction ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL rejectDrag() throw(::com::sun::star::uno::RuntimeException); + + /* * XDropTargetListener */ |