DragRoutedEvent
Abstract base class for routed drag-and-drop events conveying the active DragSession across widget hierarchies.
Overview
DragRoutedEvent is the abstract base class for routed drag-and-drop notifications dispatched throughout the widget hierarchy.
Routed Event Flow
| Phase | Description |
|---|---|
CAPTURING |
Dispatched from the root container downward toward the target widget under cursor. |
AT_TARGET |
Delivered directly to the candidate target widget beneath the pointer. |
BUBBLING |
Bubbles upwards from target back to the root widget. |
All drag events provide access to the active DragSession, transfer DragPayload, and pointer coordinates in root UI pixels.
Related links
- DragSession: Live state and controller of an active drag gesture, managing pointer coordinates, active drop target, ghost positioning, insertion indicators, and autoscrolling.
API
DragRoutedEvent::currentTarget()
Returns the current widget handling the event during dispatch.
Returns Widget: The current widget handling this routed event..
DragRoutedEvent::payload()
Convenience shortcut returning the payload from the active drag session.
Returns DragPayload: The transfer payload of the drag session..
DragRoutedEvent::phase()
Returns the current routing phase (capture, target, bubble).
Returns EventPhase: The dispatch phase (CAPTURING, AT_TARGET, BUBBLING)..
DragRoutedEvent::rootX()
Returns the pointer X coordinate in root UI space.
Returns float: The root pointer coordinate X..
DragRoutedEvent::rootY()
Returns the pointer Y coordinate in root UI space.
Returns float: The root pointer coordinate Y..
DragRoutedEvent::session()
Returns the active DragSession associated with this event.
Returns DragSession: The active DragSession..
DragRoutedEvent::target()
Returns the original target widget where the event was initiated.
Returns Widget: The original target widget of the event..
DragRoutedEvent::type()
Returns the event type token.
Returns EventType: The specific event type identifier..