Navigation
API > API/Runtime > API/Runtime/SlateCore
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)
| Name | FDragDropOperation |
| Type | class |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Input/DragAndDrop.h |
| Include Path | #include "Input/DragAndDrop.h" |
Syntax
class FDragDropOperation : public TSharedFromThis< FDragDropOperation >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FDragDropOperation
Derived Classes
FDragDropOperation derived class hierarchy
- FDecoratedDragDropOp
- FBoneDragDropOp
- FBrushBuilderDragDropOp
- FClassDragDropOp
- FColorDragDrop
- FCommandDragDropOperation
- FConvertDragDropOp
- FDragAndDropVerticalBoxOp
- FExportTextDragDropOp
- FExternalDragOperation
- FGameDragDropOperation
- FHierarchyDragDropOp
- FSchematicGraphNodeDragDropOp
- FUICommandDragDropOp
- SRigVMNodeLayoutWidget::FRigVMNodeLayoutDragDropOp
- FDraggableBoxUIDragOperation
- FGraphEditorDragDropAction
- FInViewportUIDragOperation
- FSocketDragDropOp
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDragDropOperation() |
Default constructor. | Input/DragAndDrop.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FDragDropOperation() |
Destructor. | Input/DragAndDrop.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AffectedByPointerEvent
(
const FPointerEvent& PointerEvent |
Checks if this drag and drop operation is affected by a given PointerEvent. | Input/DragAndDrop.h | |
virtual FVector2D GetDecoratorPosition() |
Gets the desired position of the decorator in absolute space. | Input/DragAndDrop.h | |
virtual TSharedPtr< SWidget > GetDefaultDecorator () |
Gets the widget that will serve as the decorator unless overridden. | Input/DragAndDrop.h | |
virtual bool IsExternalOperation() |
Is this drag Drop operation going to interact with applications outside of Slate | Input/DragAndDrop.h | |
bool IsOfType() |
Check if this drag and drop operation can cast safely to the specified template type | Input/DragAndDrop.h | |
virtual bool IsOfTypeImpl
(
const FString& Type |
Checks whether this drag and drop operation can cast safely to the specified type. | Input/DragAndDrop.h | |
virtual bool IsWindowlessOperation() |
Input/DragAndDrop.h | ||
virtual FCursorReply OnCursorQuery() |
Allows drag/drop operations to override the current cursor | Input/DragAndDrop.h | |
virtual void OnDragged
(
const FDragDropEvent& DragDropEvent |
Called when the mouse was moved during a drag and drop operation | Input/DragAndDrop.h | |
virtual void OnDrop
(
bool bDropWasHandled, |
Invoked when the drag and drop operation has ended. | Input/DragAndDrop.h | |
void SetCursorOverride
(
TOptional< EMouseCursor::Type > CursorType |
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'. | Input/DragAndDrop.h | |
virtual void SetDecoratorVisibility
(
bool bVisible |
Alters the visibility of the window | Input/DragAndDrop.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Construct() |
Constructs the window and widget if applicable. | Input/DragAndDrop.h | |
virtual TSharedPtr< FDragDropOperation > ConvertTo
(
const FString& TypeId |
Input/DragAndDrop.h | ||
void CreateCursorDecoratorWindow() |
Creates a window for the cursor decorator. | Input/DragAndDrop.h | |
void DestroyCursorDecoratorWindow() |
Destroys the cursor decorator window. | Input/DragAndDrop.h |