soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SDropTargetDispatcher Class Reference

Manages the dispatching of drag-and-drop targets between DUI windows. More...

#include <SDropTargetDispatcher.h>

Public Member Functions

 SDropTargetDispatcher ()
 Constructor.
 
 ~SDropTargetDispatcher (void)
 Destructor.
 
void SetOwner (SWindow *pOwner)
 Sets the owner window.
 
BOOL RegisterDragDrop (SWND swnd, IDropTarget *pDropTarget)
 Registers a drag-and-drop target for a window.
 
BOOL UnregisterDragDrop (SWND swnd)
 Unregisters a drag-and-drop target for a window.
 
HRESULT QueryInterface (REFIID riid, void **ppvObject)
 Queries for a specific interface.
 
ULONG AddRef (void)
 Increments the reference count.
 
ULONG Release (void)
 Decrements the reference count.
 
HRESULT DragEnter (IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 Handles the DragEnter event.
 
HRESULT DragOver (DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 Handles the DragOver event.
 
HRESULT DragLeave (void)
 Handles the DragLeave event.
 
HRESULT Drop (IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 Handles the Drop event.
 

Protected Types

typedef SMap< SWND, IDropTarget * > DTMAP
 

Protected Member Functions

POINT PointL2FrameClient (const POINTL &pt)
 Converts POINTL to frame client coordinates.
 

Protected Attributes

DTMAP m_mapDropTarget
 
IDataObject * m_pDataObj
 
SWND m_hHover
 
SWindowm_pOwner
 

Detailed Description

Manages the dispatching of drag-and-drop targets between DUI windows.

This class handles the registration and dispatching of drag-and-drop targets for DUI windows. It implements the IDropTarget interface to manage drag-and-drop operations and routes them to the appropriate window.

Definition at line 31 of file SDropTargetDispatcher.h.

Member Typedef Documentation

◆ DTMAP

typedef SMap<SWND, IDropTarget *> SDropTargetDispatcher::DTMAP
protected

Map type for storing drop targets.

Definition at line 182 of file SDropTargetDispatcher.h.

Constructor & Destructor Documentation

◆ SDropTargetDispatcher()

SNSBEGIN SDropTargetDispatcher::SDropTargetDispatcher ( )

Constructor.

Initializes the drop target dispatcher.

Definition at line 6 of file SDropTargetDispatcher.cpp.

◆ ~SDropTargetDispatcher()

SDropTargetDispatcher::~SDropTargetDispatcher ( void )

Destructor.

Cleans up the drop target dispatcher.

Definition at line 18 of file SDropTargetDispatcher.cpp.

Member Function Documentation

◆ AddRef()

ULONG SDropTargetDispatcher::AddRef ( void )
inline

Increments the reference count.

Returns
New reference count

Increments the reference count of the object. Always returns 1.

Definition at line 96 of file SDropTargetDispatcher.h.

◆ DragEnter()

HRESULT SDropTargetDispatcher::DragEnter ( IDataObject * pDataObj,
DWORD grfKeyState,
POINTL pt,
DWORD * pdwEffect )

Handles the DragEnter event.

Parameters
pDataObjPointer to the data object
grfKeyStateState of the keyboard and mouse
ptMouse position
pdwEffectPointer to the drag effect
Returns
HRESULT indicating success or failure

Handles the DragEnter event and routes it to the appropriate window.

Definition at line 65 of file SDropTargetDispatcher.cpp.

◆ DragLeave()

HRESULT STDMETHODCALLTYPE SDropTargetDispatcher::DragLeave ( void )

Handles the DragLeave event.

Returns
HRESULT indicating success or failure

Handles the DragLeave event and routes it to the appropriate window.

Definition at line 117 of file SDropTargetDispatcher.cpp.

◆ DragOver()

HRESULT SDropTargetDispatcher::DragOver ( DWORD grfKeyState,
POINTL pt,
DWORD * pdwEffect )

Handles the DragOver event.

Parameters
grfKeyStateState of the keyboard and mouse
ptMouse position
pdwEffectPointer to the drag effect
Returns
HRESULT indicating success or failure

Handles the DragOver event and routes it to the appropriate window.

Definition at line 75 of file SDropTargetDispatcher.cpp.

◆ Drop()

HRESULT STDMETHODCALLTYPE SDropTargetDispatcher::Drop ( IDataObject * pDataObj,
DWORD grfKeyState,
POINTL pt,
DWORD * pdwEffect )

Handles the Drop event.

Parameters
pDataObjPointer to the data object
grfKeyStateState of the keyboard and mouse
ptMouse position
pdwEffectPointer to the drag effect
Returns
HRESULT indicating success or failure

Handles the Drop event and routes it to the appropriate window.

Definition at line 127 of file SDropTargetDispatcher.cpp.

◆ PointL2FrameClient()

POINT SDropTargetDispatcher::PointL2FrameClient ( const POINTL & pt)
protected

Converts POINTL to frame client coordinates.

Parameters
ptPOINTL structure
Returns
Converted POINT structure in frame client coordinates

Converts the POINTL structure to frame client coordinates.

Definition at line 144 of file SDropTargetDispatcher.cpp.

◆ QueryInterface()

HRESULT SDropTargetDispatcher::QueryInterface ( REFIID riid,
void ** ppvObject )

Queries for a specific interface.

Parameters
riidInterface identifier
ppvObjectPointer to the interface pointer
Returns
HRESULT indicating success or failure

Queries for the specified interface and returns a pointer to it.

Definition at line 54 of file SDropTargetDispatcher.cpp.

◆ RegisterDragDrop()

BOOL SDropTargetDispatcher::RegisterDragDrop ( SWND swnd,
IDropTarget * pDropTarget )

Registers a drag-and-drop target for a window.

Parameters
swndHandle to the window
pDropTargetPointer to the drop target
Returns
TRUE if successful, otherwise FALSE

Registers a drag-and-drop target for the specified window.

Definition at line 29 of file SDropTargetDispatcher.cpp.

◆ Release()

ULONG SDropTargetDispatcher::Release ( void )
inline

Decrements the reference count.

Returns
New reference count

Decrements the reference count of the object. Always returns 1.

Definition at line 107 of file SDropTargetDispatcher.h.

◆ SetOwner()

void SDropTargetDispatcher::SetOwner ( SWindow * pOwner)

Sets the owner window.

Parameters
pOwnerPointer to the owner window

Sets the owner window for the drop target dispatcher.

Definition at line 13 of file SDropTargetDispatcher.cpp.

◆ UnregisterDragDrop()

BOOL SDropTargetDispatcher::UnregisterDragDrop ( SWND swnd)

Unregisters a drag-and-drop target for a window.

Parameters
swndHandle to the window
Returns
TRUE if successful, otherwise FALSE

Unregisters the drag-and-drop target for the specified window.

Definition at line 38 of file SDropTargetDispatcher.cpp.

Member Data Documentation

◆ m_hHover

SWND SDropTargetDispatcher::m_hHover
protected

Handle to the window currently being hovered over.

Definition at line 185 of file SDropTargetDispatcher.h.

◆ m_mapDropTarget

DTMAP SDropTargetDispatcher::m_mapDropTarget
protected

Map of drop targets associated with windows.

Definition at line 183 of file SDropTargetDispatcher.h.

◆ m_pDataObj

IDataObject* SDropTargetDispatcher::m_pDataObj
protected

Pointer to the data object.

Definition at line 184 of file SDropTargetDispatcher.h.

◆ m_pOwner

SWindow* SDropTargetDispatcher::m_pOwner
protected

Pointer to the owner window.

Definition at line 186 of file SDropTargetDispatcher.h.


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