class

CMiriDragDropManager

Module
Miri
Header
#include "Miri/DragDrop/CDragDropOperation.h"
Namespace
Miri

Properties

TypeNameDescription
static constexpr floatDRAG_THRESHOLDPixels of movement before a drag starts Default 4.0f.
static constexpr floatDECORATOR_OFFSETWhere the ghost sits relative to the pointer, clear of the cursor glyph Default 14.0f.

Public functions

ReturnsNameDescription
CMiriDragDropManager&Get
voidBeginDrag
voidUpdateDragCalled every frame while dragging
voidUpdateDrag
voidEndDrag
boolIsDragging
CDragDropOperation*GetActiveOperation
voidRouteHoverThe candidate path under the cursor, ordered root to leaf.
TSharedPtr<MWidget>GetDropTargetThe widget currently holding the drag, and whether it says yes to a drop right now.
boolHasDropTarget
boolIsTargetAccepting
boolWasLastDropDeliveredWhether the last EndDrag's target reported the drop consumed (OnDrop returned true).
boolPaintDecoratorPaints the active operation's DecoratorWidget beside the cursor, on top of everything the window drew.

Function details

Get

C++
static CMiriDragDropManager& Get()

BeginDrag

C++
void BeginDrag(Ref<CDragDropOperation> operation, const MiriVec2& startPos)

UpdateDrag

C++
void UpdateDrag(const MiriVec2& cursorPos)

Called every frame while dragging

UpdateDrag

C++
void UpdateDrag(const MiriVec2& cursorPos, EModifierKey modifiers)

EndDrag

C++
void EndDrag(bool cancelled = false)

IsDragging

C++
bool IsDragging() const

GetActiveOperation

C++
CDragDropOperation* GetActiveOperation() const

RouteHover

C++
void RouteHover(const std::vector<TSharedPtr<MWidget>>& path, const MiriVec2& cursorPos, EModifierKey modifiers)

The candidate path under the cursor, ordered root to leaf. The input processor hands this over on every move; the manager resolves the target from it and never hit-tests on its own.

GetDropTarget

C++
TSharedPtr<MWidget> GetDropTarget() const

The widget currently holding the drag, and whether it says yes to a drop right now. A source that keeps its own validity query must leave IsAllowed alone while a target owns the answer.

HasDropTarget

C++
bool HasDropTarget() const

IsTargetAccepting

C++
bool IsTargetAccepting() const

WasLastDropDelivered

C++
bool WasLastDropDelivered() const

Whether the last EndDrag's target reported the drop consumed (OnDrop returned true). False after a cancel or a rejection.

PaintDecorator

C++
bool PaintDecorator(class CMiriRenderer& renderer, const CGeometry& windowRoot, float deltaTime)

Paints the active operation's DecoratorWidget beside the cursor, on top of everything the window drew. Returns false when there is no drag or no decorator. The field existed and nothing ever read it, so every source painted its own ghost or showed none.

Generated from Miri/DragDrop/CDragDropOperation.h via miri.json · Dec 5, 2026Version 1.1.0