SDropTarget::OnDragEnter

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

Windows
MacOS
Linux

Override Hierarchy

SWidget::OnDragEnter()

SDropTarget::OnDragEnter()

References

Module

EditorWidgets

Header

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

Include

#include "SDropTarget.h"

Source

/Engine/Source/Editor/EditorWidgets/Private/SDropTarget.cpp

Syntax

virtual void OnDragEnter
(
    const FGeometry & MyGeometry,
    const FDragDropEvent & DragDropEvent
)

Remarks

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

Enter/Leave events in slate are meant as lightweight notifications. So we do not want to capture mouse or set focus in response to these. However, OnDragEnter must also support external APIs (e.g. OLE Drag/Drop) Those require that we let them know whether we can handle the content being dragged OnDragEnter.

The concession is to return a can_handled/cannot_handle boolean rather than a full FReply.

Returns

A reply that indicated whether the contents of the DragDropEvent can potentially be processed by this widget.

Parameters

Parameter

Description

MyGeometry

The geometry of the widget receiving the event.

DragDropEvent

The drag and drop event.

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