SDropTarget

A widget that displays a hover cue and handles dropping assets of allowed types onto this widget

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

EditorWidgets

Header

/Engine/Source/Editor/EditorWidgets/Public/SDropTarget.h

Include

#include "SDropTarget.h"

Syntax

class SDropTarget : public SCompoundWidget

Remarks

A widget that displays a hover cue and handles dropping assets of allowed types onto this widget

Functions

Name Description

Protected function Const

bool

 

AllowDrop

(
    TSharedPtr< FDragDropOperation > Dr...
)

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Protected function Const

FSlateColor

 

GetBackgroundBrightness()

Get the brightness on the background.

Protected function Const

EVisibility

 

GetDragOverlayVisibility()

Protected function Virtual Const

bool

 

OnAllowDrop

(
    TSharedPtr< FDragDropOperation > Dr...
)

Protected function Virtual Const

bool

 

OnIsRecognized

(
    TSharedPtr< FDragDropOperation > Dr...
)

Overridden from SWidget

Name Description

Protected function Virtual

void

 

OnDragEnter

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

DRAG AND DROP (DragDrop) Called during drag and drop when the drag enters a widget.

Protected function Virtual

void

 

OnDragLeave

(
    const FDragDropEvent& DragDropEven...
)

Called during drag and drop when the drag leaves a widget.

Protected function Virtual

FReply

 

OnDragOver

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

Called during drag and drop when the the mouse is being dragged over a widget.

Protected function Virtual

FReply

 

OnDrop

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

Called when the user is dropping something onto a widget; terminates drag and drop.

Protected function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Classes

Name

Description

Public struct

FArguments

Typedefs

Name

Description

FOnDrop

Called when a valid asset is dropped

FVerifyDrag

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