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

#include <FDockingDragOperation.h>

+ Inheritance diagram for FDockingDragOperation:

Classes

struct  FDockTarget
 

Public Types

enum  EViaTabwell { DockingViaTabWell , DockingViaTarget }
 

Public Member Functions

virtual void OnDrop (bool bDropWasHandled, const FPointerEvent &MouseEvent) override
 
virtual void OnDragged (const FDragDropEvent &DragDropEvent) override
 
void OnTabWellEntered (const TSharedRef< class SDockingTabWell > &ThePanel)
 
void OnTabWellLeft (const TSharedRef< class SDockingTabWell > &ThePanel, const FGeometry &DockNodeGeometry)
 
FSlateRect GetPreviewAreaForDirection (const FSlateRect &DockableArea, SDockingArea::RelativeDirection DockingDirection)
 
void SetHoveredTarget (const FDockTarget &InTarget, const FInputEvent &InputEvent)
 
TSharedPtr< SDockTabGetTabBeingDragged ()
 
FVector2D GetTabGrabOffsetFraction () const
 
bool CanDockInNode (const TSharedRef< SDockingNode > &DockNode, EViaTabwell IsDockingViaTabwell) const
 
virtual ~FDockingDragOperation ()
 
- Public Member Functions inherited from FDragDropOperation
SLATECORE_API FDragDropOperation ()
 
virtual SLATECORE_API ~FDragDropOperation ()
 
template<class TType >
bool IsOfType () const
 
virtual bool AffectedByPointerEvent (const FPointerEvent &PointerEvent)
 
virtual SLATECORE_API void OnDragged (const class FDragDropEvent &DragDropEvent)
 
virtual SLATECORE_API FCursorReply OnCursorQuery ()
 
virtual TSharedPtr< SWidgetGetDefaultDecorator () const
 
virtual FVector2D GetDecoratorPosition () 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
 

Static Public Member Functions

static TSharedRef< FDockingDragOperationNew (const TSharedRef< SDockTab > &InTabToBeDragged, const FVector2D InTabGrabOffset, TSharedRef< class SDockingArea > InTabOwnerArea, const FVector2D &OwnerAreaSize)
 

Protected Member Functions

 FDockingDragOperation (const TSharedRef< class SDockTab > &InTabToBeDragged, const FVector2D InTabGrabOffsetFraction, TSharedRef< class SDockingArea > InTabOwnerArea, const FVector2D &OwnerAreaSize)
 
const FVector2D GetDecoratorOffsetFromCursor ()
 
void DroppedOntoNothing ()
 
- Protected Member Functions inherited from FDragDropOperation
virtual SLATECORE_API void Construct ()
 
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 ()
 

Static Protected Member Functions

static FVector2D DesiredSizeFrom (const FVector2D &InitialTabSize)
 
- 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

TSharedPtr< class SDockTabTabBeingDragged
 
FVector2D TabGrabOffsetFraction
 
TSharedPtr< SDockingAreaTabOwnerAreaOfOrigin
 
TSharedPtr< SDockingTabStackCursorDecoratorStackNode
 
TWeakPtr< class SDockingTabStackTabStackOfOrigin
 
TWeakPtr< class SDockingTabWellHoveredTabPanelPtr
 
FDockTarget HoveredDockTarget
 
FVector2D LastContentSize
 
- Protected Attributes inherited from FDragDropOperation
bool bCreateNewWindow
 
TSharedPtr< SWindowCursorDecoratorWindow
 
TOptional< EMouseCursor::TypeMouseCursor
 
TOptional< EMouseCursor::TypeMouseCursorOverride
 

Detailed Description

A Sample implementation of IDragDropOperation

Member Enumeration Documentation

◆ EViaTabwell

Is this dock tab being placed via a tab well or via a target

Enumerator
DockingViaTabWell 
DockingViaTarget 

Constructor & Destructor Documentation

◆ ~FDockingDragOperation()

FDockingDragOperation::~FDockingDragOperation ( )
virtual

◆ FDockingDragOperation()

FDockingDragOperation::FDockingDragOperation ( const TSharedRef< class SDockTab > &  InTabToBeDragged,
const FVector2D  InTabGrabOffsetFraction,
TSharedRef< class SDockingArea InTabOwnerArea,
const FVector2D OwnerAreaSize 
)
protected

The constructor is protected, so that this class can only be instantiated as a shared pointer.

Member Function Documentation

◆ CanDockInNode()

bool FDockingDragOperation::CanDockInNode ( const TSharedRef< SDockingNode > &  DockNode,
EViaTabwell  IsDockingViaTabwell 
) const

Checks to see if this tab can dock in this node. Some tabs can only dock via the tab well.

◆ DesiredSizeFrom()

FVector2D FDockingDragOperation::DesiredSizeFrom ( const FVector2D InitialTabSize)
staticprotected
Returns
the size of the DockNode that looks good in a preview given the initial size of the tab that we grabbed.

◆ DroppedOntoNothing()

void FDockingDragOperation::DroppedOntoNothing ( )
protected

The tab was dropped onto nothing or someone interrupted the drag drop operation.

◆ GetDecoratorOffsetFromCursor()

const FVector2D FDockingDragOperation::GetDecoratorOffsetFromCursor ( )
protected
Returns
The offset into the tab where the user grabbed in Slate Units.

◆ GetPreviewAreaForDirection()

FSlateRect FDockingDragOperation::GetPreviewAreaForDirection ( const FSlateRect DockableArea,
SDockingArea::RelativeDirection  DockingDirection 
)

Given a docking direction and the geometry of the dockable area, figure out the area that will be occupied by a new tab if it is docked there.

Parameters
DockableAreaThe area of a TabStack that you're hovering
DockingDirectionWhere relative to this TabStack you want to dock: e.g. to the right.
Returns
The area that the new tab will occupy.

◆ GetTabBeingDragged()

TSharedPtr< class SDockTab > FDockingDragOperation::GetTabBeingDragged ( )
Returns
the widget being dragged

◆ GetTabGrabOffsetFraction()

FVector2D FDockingDragOperation::GetTabGrabOffsetFraction ( ) const
Returns
location where the user grabbed within the tab as a fraction of the tab's size

◆ New()

TSharedRef< FDockingDragOperation > FDockingDragOperation::New ( const TSharedRef< SDockTab > &  InTabToBeDragged,
const FVector2D  InTabGrabOffset,
TSharedRef< class SDockingArea InTabOwnerArea,
const FVector2D OwnerAreaSize 
)
static

Create this Drag and Drop Content

Parameters
InTabToBeDraggedThe tab being dragged (dragged within or outside of a tabwell).
InTabGrabOffsetWhere within the tab we grabbed, so we're not dragging by the upper left of the tab.
InTabOwnerAreaThe DockArea that owns this tab until it is relocated.
OwnerAreaSizeSize of the DockArea at the time when we start dragging.
Returns
a new FDockingDragOperation

◆ OnDragged()

void FDockingDragOperation::OnDragged ( const FDragDropEvent DragDropEvent)
overridevirtual

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

Parameters
DragDropEventThe event that describes this drag drop operation.

◆ OnDrop()

void FDockingDragOperation::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

Reimplemented from FDragDropOperation.

◆ OnTabWellEntered()

void FDockingDragOperation::OnTabWellEntered ( const TSharedRef< class SDockingTabWell > &  ThePanel)

DragTestArea widgets invoke this method when a drag enters them

Parameters
ThePanelThat tab well that we just dragged something into.

◆ OnTabWellLeft()

void FDockingDragOperation::OnTabWellLeft ( const TSharedRef< class SDockingTabWell > &  ThePanel,
const FGeometry DockNodeGeometry 
)

DragTestArea widgets invoke this method when a drag leaves them

Parameters
ThePanelThat tab well that we just dragged something out of.

◆ SetHoveredTarget()

void FDockingDragOperation::SetHoveredTarget ( const FDockTarget InTarget,
const FInputEvent InputEvent 
)

Update which dock target, if any, is currently hovered as a result of the InputEvent

Member Data Documentation

◆ CursorDecoratorStackNode

TSharedPtr<SDockingTabStack> FDockingDragOperation::CursorDecoratorStackNode
protected

Decorator widget where we add temp doc tabs to

◆ HoveredDockTarget

FDockTarget FDockingDragOperation::HoveredDockTarget
protected

Some target dock node over which we are currently hovering; it could be a TabStack or a DockAre

◆ HoveredTabPanelPtr

TWeakPtr<class SDockingTabWell> FDockingDragOperation::HoveredTabPanelPtr
protected

The TabWell over which we are currently hovering

◆ LastContentSize

FVector2D FDockingDragOperation::LastContentSize
protected

What the size of the content was when it was last shown. The user drags splitters to set this size; it is legitimate state.

◆ TabBeingDragged

TSharedPtr<class SDockTab> FDockingDragOperation::TabBeingDragged
protected

What is actually being dragged in this operation

◆ TabGrabOffsetFraction

FVector2D FDockingDragOperation::TabGrabOffsetFraction
protected

Where the user grabbed the tab as a fraction of the tab's size

◆ TabOwnerAreaOfOrigin

TSharedPtr<SDockingArea> FDockingDragOperation::TabOwnerAreaOfOrigin
protected

The area from which we initially started dragging

◆ TabStackOfOrigin

TWeakPtr<class SDockingTabStack> FDockingDragOperation::TabStackOfOrigin
protected

Tab stack from which we started dragging this tab.


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