FDragDropOperation

A base class for a DragAndDrop operation which supports reflection.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Input/DragAndDrop.h

Include

#include "Input/DragAndDrop.h"

Syntax

class FDragDropOperation : public TSharedFromThis< FDragDropOperation >

Remarks

A base class for a DragAndDrop operation which supports reflection. Drag and Drop is inherently quite stateful. Implementing a custom DragDropOperation allows for dedicated handling of a drag drop operation which keeps a decorator window (optionally) Implement derived types with DRAG_DROP_OPERATOR_TYPE (see below)

Variables

Name Description

Protected variable

bool

 

bCreateNewWindow

Create a new window for the decorator content.

Protected variable

TSharedPtr< SWi...

 

CursorDecoratorWindow

The window that owns the decorator widget

Protected variable

TOptional< EMou...

 

MouseCursor

Mouse cursor used by the drag drop operation

Protected variable

TOptional< EMou...

 

MouseCursorOverride

Mouse cursor used to temporarily replace the drag drops cursor

Constructors

Name Description

Public function

FDragDropOperation()

Default constructor.

Destructors

Name Description

Public function Virtual

~FDragDropOperation()

Destructor.

Functions

Name Description

Public function Virtual

bool

 

AffectedByPointerEvent

(
    const FPointerEvent& PointerEvent
)

Checks if this drag and drop operation is affected by a given PointerEvent.

Protected function Virtual

void

 

Construct()

Constructs the window and widget if applicable.

Protected function

void

 

CreateCursorDecoratorWindow()

Creates a window for the cursor decorator.

Protected function

void

 

DestroyCursorDecoratorWindow()

Destroys the cursor decorator window.

Public function Virtual Const

FVector2D

 

GetDecoratorPosition()

Gets the desired position of the decorator in absolute space.

Public function Virtual Const

TSharedPtr< ...

 

GetDefaultDecorator()

Gets the widget that will serve as the decorator unless overridden.

Public function Virtual Const

bool

 

IsExternalOperation()

Is this drag Drop operation going to interact with applications outside of Slate

Public function Const

bool

 

IsOfType()

Check if this drag and drop operation can cast safely to the specified template type

Protected function Virtual Const

bool

 

IsOfTypeImpl

(
    const FString& Type
)

Checks whether this drag and drop operation can cast safely to the specified type.

Public function Virtual Const

bool

 

IsWindowlessOperation()

Public function Virtual

FCursorReply

 

OnCursorQuery()

Allows drag/drop operations to override the current cursor

Public function Virtual

void

 

OnDragged

(
    const FDragDropEvent& DragDropEven...
)

Called when the mouse was moved during a drag and drop operation

Public function Virtual

void

 

OnDrop

(
    bool bDropWasHandled,
    const FPointerEvent& MouseEvent
)

Invoked when the drag and drop operation has ended.

Public function

void

 

SetCursorOverride

(
    TOptional< EMouseCursor::Type > Cur...
)

Sets the cursor to override the drag drop operations cursor with so that a control can give temporary feedback, for example - a slashed circle telling the user 'this can't be dropped here'.

Public function Virtual

void

 

SetDecoratorVisibility

(
    bool bVisible
)

Alters the visibility of the window

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss