UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FUMGDragDropOp Class Reference

#include <UMGDragDropOp.h>

+ Inheritance diagram for FUMGDragDropOp:

Public Member Functions

 FUMGDragDropOp ()
 
virtual void AddReferencedObjects (FReferenceCollector &Collector) override
 
virtual FString GetReferencerName () const override
 
virtual bool AffectedByPointerEvent (const FPointerEvent &PointerEvent) override
 
virtual void OnDrop (bool bDropWasHandled, const FPointerEvent &MouseEvent) override
 
virtual void OnDragged (const class FDragDropEvent &DragDropEvent) override
 
virtual FCursorReply OnCursorQuery () override
 
virtual TSharedPtr< SWidgetGetDefaultDecorator () const override
 
UDragDropOperationGetOperation () const
 
- Public Member Functions inherited from FGameDragDropOperation
SLATECORE_API FGameDragDropOperation ()
 
virtual SLATECORE_API FVector2D GetDecoratorPosition () const override
 
- Public Member Functions inherited from FDragDropOperation
SLATECORE_API FDragDropOperation ()
 
virtual SLATECORE_API ~FDragDropOperation ()
 
template<class TType >
bool IsOfType () const
 
virtual SLATECORE_API void SetDecoratorVisibility (bool bVisible)
 
virtual bool IsExternalOperation () const
 
virtual bool IsWindowlessOperation () const
 
SLATECORE_API void SetCursorOverride (TOptional< EMouseCursor::Type > CursorType)
 
virtual bool IsOfTypeImpl (const FString &Type) const
 
- Public Member Functions inherited from TSharedFromThis< FDragDropOperation >
TSharedRef< FDragDropOperation, Mode > AsShared ()
 
TSharedRef< FDragDropOperation const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FDragDropOperation, Mode > AsWeak ()
 
TWeakPtr< FDragDropOperation const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 
- Public Member Functions inherited from FGCObject
 FGCObject ()
 
 FGCObject (const FGCObject &Other)
 
 FGCObject (FGCObject &&Other)
 
 FGCObject (EFlags Flags)
 
virtual ~FGCObject ()
 
FGCObjectoperator= (const FGCObject &)
 
FGCObjectoperator= (FGCObject &&)
 
COREUOBJECT_API void RegisterGCObject ()
 
COREUOBJECT_API void UnregisterGCObject ()
 
virtual bool GetReferencerPropertyName (UObject *Object, FString &OutPropertyName) const
 

Static Public Member Functions

static UMG_API TSharedRef< FUMGDragDropOpNew (UDragDropOperation *Operation, const int32 PointerIndex, const FVector2D &CursorPosition, const FVector2D &ScreenPositionOfNode, float DPIScale, TSharedPtr< SObjectWidget > SourceUserWidget)
 
- Static Public Member Functions inherited from FGCObject
static COREUOBJECT_API void StaticInit ()
 

Protected Member Functions

virtual void Construct () override
 
- Protected Member Functions inherited from FDragDropOperation
SLATECORE_API void CreateCursorDecoratorWindow ()
 
SLATECORE_API void DestroyCursorDecoratorWindow ()
 
virtual TSharedPtr< FDragDropOperationConvertTo (const FString &TypeId)
 
- Protected Member Functions inherited from TSharedFromThis< FDragDropOperation >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Additional Inherited Members

- Public Types inherited from FGCObject
enum class  EFlags : uint32 { None = 0 , RegisterLater = 1 << 0 , AddStableNativeReferencesOnly = 1 << 1 }
 
- Static Public Attributes inherited from FGCObject
static COREUOBJECT_API UGCObjectReferencerGGCObjectReferencer = nullptr
 
- Static Protected Member Functions inherited from TSharedFromThis< FDragDropOperation >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 
- Protected Attributes inherited from FGameDragDropOperation
FVector2D DecoratorPosition
 
- Protected Attributes inherited from FDragDropOperation
bool bCreateNewWindow
 
TSharedPtr< SWindowCursorDecoratorWindow
 
TOptional< EMouseCursor::TypeMouseCursor
 
TOptional< EMouseCursor::TypeMouseCursorOverride
 

Detailed Description

This is the drag/drop class used for UMG, all UMG drag drop operations utilize this operation. It supports moving a UObject payload and using a UWidget decorator.

Constructor & Destructor Documentation

◆ FUMGDragDropOp()

FUMGDragDropOp::FUMGDragDropOp ( )

Member Function Documentation

◆ AddReferencedObjects()

void FUMGDragDropOp::AddReferencedObjects ( FReferenceCollector Collector)
overridevirtual

Pure virtual that must be overloaded by the inheriting class. Use this method to serialize any UObjects contained that you wish to keep around.

Parameters
CollectorThe collector of referenced objects.

Implements FGCObject.

◆ AffectedByPointerEvent()

bool FUMGDragDropOp::AffectedByPointerEvent ( const FPointerEvent PointerEvent)
overridevirtual

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

Parameters
PointerEventThe mouse event we are checking against
Returns
true if the the pointer event affects this drag and drop operation (default true).

Reimplemented from FDragDropOperation.

◆ Construct()

void FUMGDragDropOp::Construct ( )
overrideprotectedvirtual

Constructs the window and widget if applicable.

Reimplemented from FDragDropOperation.

◆ GetDefaultDecorator()

TSharedPtr< SWidget > FUMGDragDropOp::GetDefaultDecorator ( ) const
overridevirtual

Gets the widget that will serve as the decorator unless overridden. If you do not override, you will have no decorator

Reimplemented from FDragDropOperation.

◆ GetOperation()

UDragDropOperation * FUMGDragDropOp::GetOperation ( ) const
inline

◆ GetReferencerName()

FString FUMGDragDropOp::GetReferencerName ( ) const
overridevirtual

Overload this method to report a name for your referencer

Implements FGCObject.

◆ New()

TSharedRef< FUMGDragDropOp > FUMGDragDropOp::New ( UDragDropOperation Operation,
const int32  PointerIndex,
const FVector2D CursorPosition,
const FVector2D ScreenPositionOfNode,
float  DPIScale,
TSharedPtr< SObjectWidget SourceUserWidget 
)
static

◆ OnCursorQuery()

FCursorReply FUMGDragDropOp::OnCursorQuery ( )
overridevirtual

Allows drag/drop operations to override the current cursor

Reimplemented from FDragDropOperation.

◆ OnDragged()

void FUMGDragDropOp::OnDragged ( const class FDragDropEvent DragDropEvent)
overridevirtual

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

Parameters
DragDropEventThe event that describes this drag drop operation.

Reimplemented from FDragDropOperation.

◆ OnDrop()

void FUMGDragDropOp::OnDrop ( bool  bDropWasHandled,
const FPointerEvent MouseEvent 
)
overridevirtual

Invoked when the drag and drop operation has ended.

Parameters
bDropWasHandledtrue when the drop was handled by some widget; false otherwise
MouseEventThe mouse event which caused the on drop to be called.

Reimplemented from FDragDropOperation.


The documentation for this class was generated from the following files: