engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
FDragDropOperation类 参考

A base class for a DragAndDrop operation which supports reflection. 更多...

#include <DragAndDrop.h>

+ 类 FDragDropOperation 继承关系图:

Public 成员函数

virtual bool AffectedByPointerEvent (const FPointerEvent &PointerEvent)
 Checks if this drag and drop operation is affected by a given PointerEvent. 更多...
 
 FDragDropOperation ()
 Default constructor.
 
virtual FVector2D GetDecoratorPosition () const
 Gets the desired position of the decorator in absolute space.
 
virtual TSharedPtr< SWidget > GetDefaultDecorator () const
 Gets the widget that will serve as the decorator unless overridden. 更多...
 
virtual bool IsExternalOperation () const
 Is this drag Drop operation going to interact with applications outside of Slate
 
template<class TType >
bool IsOfType () const
 Check if this drag and drop operation can cast safely to the specified template type
 
virtual bool IsWindowlessOperation () const
 
virtual FCursorReply OnCursorQuery ()
 Allows drag/drop operations to override the current cursor
 
virtual void OnDragged (const class FDragDropEvent &DragDropEvent)
 Called when the mouse was moved during a drag and drop operation 更多...
 
virtual void OnDrop (bool bDropWasHandled, const FPointerEvent &MouseEvent)
 Invoked when the drag and drop operation has ended. 更多...
 
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'.
 
virtual void SetDecoratorVisibility (bool bVisible)
 Alters the visibility of the window
 
virtual ~FDragDropOperation ()
 Destructor.
 
- Public 成员函数 继承自 TSharedFromThis< FDragDropOperation >
TSharedRef< FDragDropOperation, Mode > AsShared ()
 Provides access to a shared reference to this object. 更多...
 
TSharedRef< FDragDropOperation const, Mode > AsShared () const
 Provides access to a shared reference to this object (const.) Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. 更多...
 
FORCEINLINE bool DoesSharedInstanceExist () const
 Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 

Protected 成员函数

virtual void Construct ()
 Constructs the window and widget if applicable.
 
void CreateCursorDecoratorWindow ()
 Creates a window for the cursor decorator.
 
void DestroyCursorDecoratorWindow ()
 Destroys the cursor decorator window.
 
virtual bool IsOfTypeImpl (const FString &Type) const
 Checks whether this drag and drop operation can cast safely to the specified type.
 
- Protected 成员函数 继承自 TSharedFromThis< FDragDropOperation >
FORCEINLINE TSharedFromThis & operator= (TSharedFromThis const &)
 Hidden stub assignment operator
 
 TSharedFromThis ()
 Hidden stub constructor
 
 TSharedFromThis (TSharedFromThis const &)
 Hidden stub copy constructor
 
 ~TSharedFromThis ()
 Hidden destructor
 

Protected 属性

bool bCreateNewWindow
 Create a new window for the decorator content. 更多...
 
TSharedPtr< SWindow > CursorDecoratorWindow
 The window that owns the decorator widget
 
TOptional< EMouseCursor::Type > MouseCursor
 Mouse cursor used by the drag drop operation
 
TOptional< EMouseCursor::Type > MouseCursorOverride
 Mouse cursor used to temporarily replace the drag drops cursor
 

额外继承的成员函数

- 静态 Protected 成员函数 继承自 TSharedFromThis< FDragDropOperation >
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 

详细描述

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)

成员函数说明

◆ AffectedByPointerEvent()

virtual bool FDragDropOperation::AffectedByPointerEvent ( const FPointerEvent &  PointerEvent)
inlinevirtual

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

参数
PointerEventThe mouse event we are checking against
返回
true if the the pointer event affects this drag and drop operation (default true).

被 FUMGDragDropOp 重载.

◆ GetDefaultDecorator()

virtual TSharedPtr< SWidget > FDragDropOperation::GetDefaultDecorator ( ) const
inlinevirtual

Gets the widget that will serve as the decorator unless overridden.

If you do not override, you will have no decorator

被 FColorDragDrop, FUICommandDragDropOp , 以及 FUMGDragDropOp 重载.

◆ IsWindowlessOperation()

virtual bool FDragDropOperation::IsWindowlessOperation ( ) const
inlinevirtual
返回
true if the operation does not create a decorator window. Used for game drag drop operations.

◆ OnDragged()

virtual void FDragDropOperation::OnDragged ( const class FDragDropEvent &  DragDropEvent)
virtual

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

参数
DragDropEventThe event that describes this drag drop operation.

被 FColorDragDrop, FUICommandDragDropOp , 以及 FUMGDragDropOp 重载.

◆ OnDrop()

virtual void FDragDropOperation::OnDrop ( bool  bDropWasHandled,
const FPointerEvent &  MouseEvent 
)
virtual

Invoked when the drag and drop operation has ended.

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

被 FColorDragDrop, FUICommandDragDropOp , 以及 FUMGDragDropOp 重载.

类成员变量说明

◆ bCreateNewWindow

bool FDragDropOperation::bCreateNewWindow
protected

Create a new window for the decorator content.

If this is false, SlateApplication will draw the decorator directly using the


该类的文档由以下文件生成: