LibreOffice Module vcl (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
DNDEventDispatcher Class Reference

#include <dndeventdispatcher.hxx>

Inheritance diagram for DNDEventDispatcher:
[legend]
Collaboration diagram for DNDEventDispatcher:
[legend]

Public Member Functions

 DNDEventDispatcher (vcl::Window *pTopWindow)
 
virtual ~DNDEventDispatcher () override
 
virtual void SAL_CALL acceptDrag (sal_Int8 dropAction) override
 
virtual void SAL_CALL rejectDrag () override
 
virtual void SAL_CALL drop (const css::datatransfer::dnd::DropTargetDropEvent &dtde) override
 
virtual void SAL_CALL dragEnter (const css::datatransfer::dnd::DropTargetDragEnterEvent &dtdee) override
 
virtual void SAL_CALL dragExit (const css::datatransfer::dnd::DropTargetEvent &dte) override
 
virtual void SAL_CALL dragOver (const css::datatransfer::dnd::DropTargetDragEvent &dtde) override
 
virtual void SAL_CALL dropActionChanged (const css::datatransfer::dnd::DropTargetDragEvent &dtde) override
 
virtual void SAL_CALL dragGestureRecognized (const css::datatransfer::dnd::DragGestureEvent &dge) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &eo) override
 

Private Member Functions

void designate_currentwindow (vcl::Window *pWindow)
 
 DECL_LINK (WindowEventListener, VclWindowEvent &, void)
 
vcl::WindowfindTopLevelWindow (Point location)
 

Static Private Member Functions

static sal_Int32 fireDragEnterEvent (vcl::Window *pWindow, const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &xContext, const sal_Int8 nDropAction, const Point &rLocation, const sal_Int8 nSourceAction, const css::uno::Sequence< css::datatransfer::DataFlavor > &aFlavorList)
 
static sal_Int32 fireDragOverEvent (vcl::Window *pWindow, const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &xContext, const sal_Int8 nDropAction, const Point &rLocation, const sal_Int8 nSourceAction)
 
static sal_Int32 fireDragExitEvent (vcl::Window *pWindow)
 
static sal_Int32 fireDropActionChangedEvent (vcl::Window *pWindow, const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &xContext, const sal_Int8 nDropAction, const Point &rLocation, const sal_Int8 nSourceAction)
 
static sal_Int32 fireDropEvent (vcl::Window *pWindow, const css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > &xContext, const sal_Int8 nDropAction, const Point &rLocation, const sal_Int8 nSourceAction, const css::uno::Reference< css::datatransfer::XTransferable > &xTransferable)
 
static sal_Int32 fireDragGestureEvent (vcl::Window *pWindow, const css::uno::Reference< css::datatransfer::dnd::XDragSource > &xSource, const css::uno::Any &event, const Point &rOrigin, const sal_Int8 nDragAction)
 

Private Attributes

VclPtr< vcl::Windowm_pTopWindow
 
VclPtr< vcl::Windowm_pCurrentWindow
 
::osl::Mutex m_aMutex
 
css::uno::Sequence< css::datatransfer::DataFlavor > m_aDataFlavorList
 

Detailed Description

Definition at line 30 of file dndeventdispatcher.hxx.

Constructor & Destructor Documentation

DNDEventDispatcher::DNDEventDispatcher ( vcl::Window pTopWindow)

Definition at line 34 of file dndeventdispatcher.cxx.

DNDEventDispatcher::~DNDEventDispatcher ( )
overridevirtual

Definition at line 40 of file dndeventdispatcher.cxx.

References designate_currentwindow().

Member Function Documentation

void SAL_CALL DNDEventDispatcher::acceptDrag ( sal_Int8  dropAction)
overridevirtual

Definition at line 241 of file dndeventdispatcher.cxx.

DNDEventDispatcher::DECL_LINK ( WindowEventListener  ,
VclWindowEvent ,
void   
)
private
void DNDEventDispatcher::designate_currentwindow ( vcl::Window pWindow)
private
void SAL_CALL DNDEventDispatcher::disposing ( const css::lang::EventObject &  eo)
overridevirtual

Definition at line 237 of file dndeventdispatcher.cxx.

void SAL_CALL DNDEventDispatcher::dragEnter ( const css::datatransfer::dnd::DropTargetDragEnterEvent &  dtdee)
overridevirtual
void SAL_CALL DNDEventDispatcher::dragExit ( const css::datatransfer::dnd::DropTargetEvent &  dte)
overridevirtual
void SAL_CALL DNDEventDispatcher::dragGestureRecognized ( const css::datatransfer::dnd::DragGestureEvent &  dge)
overridevirtual

Definition at line 226 of file dndeventdispatcher.cxx.

References findTopLevelWindow(), fireDragGestureEvent(), and m_aMutex.

void SAL_CALL DNDEventDispatcher::dragOver ( const css::datatransfer::dnd::DropTargetDragEvent &  dtde)
overridevirtual
void SAL_CALL DNDEventDispatcher::drop ( const css::datatransfer::dnd::DropTargetDropEvent &  dtde)
overridevirtual
void SAL_CALL DNDEventDispatcher::dropActionChanged ( const css::datatransfer::dnd::DropTargetDragEvent &  dtde)
overridevirtual
vcl::Window * DNDEventDispatcher::findTopLevelWindow ( Point  location)
private
sal_Int32 DNDEventDispatcher::fireDragEnterEvent ( vcl::Window pWindow,
const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &  xContext,
const sal_Int8  nDropAction,
const Point rLocation,
const sal_Int8  nSourceAction,
const css::uno::Sequence< css::datatransfer::DataFlavor > &  aFlavorList 
)
staticprivate
sal_Int32 DNDEventDispatcher::fireDragExitEvent ( vcl::Window pWindow)
staticprivate
Exceptions
css::uno::RuntimeException

Definition at line 305 of file dndeventdispatcher.cxx.

References vcl::Window::GetDropTarget(), vcl::Window::IsInModalMode(), and vcl::Window::IsInputEnabled().

Referenced by dragExit(), dragOver(), drop(), and dropActionChanged().

sal_Int32 DNDEventDispatcher::fireDragGestureEvent ( vcl::Window pWindow,
const css::uno::Reference< css::datatransfer::dnd::XDragSource > &  xSource,
const css::uno::Any &  event,
const Point rOrigin,
const sal_Int8  nDragAction 
)
staticprivate
sal_Int32 DNDEventDispatcher::fireDragOverEvent ( vcl::Window pWindow,
const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &  xContext,
const sal_Int8  nDropAction,
const Point rLocation,
const sal_Int8  nSourceAction 
)
staticprivate
sal_Int32 DNDEventDispatcher::fireDropActionChangedEvent ( vcl::Window pWindow,
const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &  xContext,
const sal_Int8  nDropAction,
const Point rLocation,
const sal_Int8  nSourceAction 
)
staticprivate
sal_Int32 DNDEventDispatcher::fireDropEvent ( vcl::Window pWindow,
const css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > &  xContext,
const sal_Int8  nDropAction,
const Point rLocation,
const sal_Int8  nSourceAction,
const css::uno::Reference< css::datatransfer::XTransferable > &  xTransferable 
)
staticprivate
Exceptions
css::uno::RuntimeException

Definition at line 353 of file dndeventdispatcher.cxx.

References vcl::Window::GetDropTarget(), vcl::Window::ImplFrameToOutput(), vcl::Window::IsInModalMode(), vcl::Window::IsInputEnabled(), Point::X(), and Point::Y().

Referenced by drop().

void SAL_CALL DNDEventDispatcher::rejectDrag ( )
overridevirtual

Definition at line 245 of file dndeventdispatcher.cxx.

Member Data Documentation

css::uno::Sequence< css::datatransfer::DataFlavor > DNDEventDispatcher::m_aDataFlavorList
private

Definition at line 42 of file dndeventdispatcher.hxx.

Referenced by dragEnter(), dragExit(), dragOver(), drop(), and dropActionChanged().

::osl::Mutex DNDEventDispatcher::m_aMutex
private
VclPtr<vcl::Window> DNDEventDispatcher::m_pCurrentWindow
private
VclPtr<vcl::Window> DNDEventDispatcher::m_pTopWindow
private

Definition at line 35 of file dndeventdispatcher.hxx.

Referenced by findTopLevelWindow().


The documentation for this class was generated from the following files: