162 template<
typename OperationType>
207#define DRAG_DROP_OPERATOR_TYPE(TYPE, BASE) \
208 static const FString& GetTypeId() { static FString Type = TEXT(#TYPE); return Type; } \
209 virtual bool IsOfTypeImpl(const FString& Type) const override { return GetTypeId() == Type || BASE::IsOfTypeImpl(Type); }
222 virtual bool IsExternalOperation()
const override {
return true; }
235 bool HasText()
const {
return !!(DragType & DragText);}
237 bool HasFiles()
const {
return !!(DragType & DragFiles);}
248 enum EExternalDragType
#define ensure( InExpression)
Definition AssertionMacros.h:464
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:57
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:48
#define DRAG_DROP_OPERATOR_TYPE(TYPE, BASE)
Definition DragAndDrop.h:207
UE::Math::TVector2< double > FVector2D
Definition MathFwd.h:48
Definition CursorReply.h:16
Definition DragAndDrop.h:141
FDragDropEvent(const FPointerEvent &InMouseEvent, const TSharedPtr< FDragDropOperation > InContent)
Definition DragAndDrop.h:149
TSharedPtr< FDragDropOperation > GetOperation() const
Definition DragAndDrop.h:156
TSharedPtr< OperationType > GetOperationAs() const
Definition DragAndDrop.inl:9
Definition DragAndDrop.h:21
virtual SLATECORE_API FCursorReply OnCursorQuery()
Definition DragAndDrop.cpp:49
SLATECORE_API FDragDropOperation()
Definition DragAndDrop.cpp:12
virtual bool IsExternalOperation() const
Definition DragAndDrop.h:79
virtual bool IsWindowlessOperation() const
Definition DragAndDrop.h:82
virtual SLATECORE_API void OnDragged(const class FDragDropEvent &DragDropEvent)
Definition DragAndDrop.cpp:31
bool IsOfType() const
Definition DragAndDrop.h:35
SLATECORE_API void CreateCursorDecoratorWindow()
Definition DragAndDrop.cpp:112
virtual TSharedPtr< SWidget > GetDefaultDecorator() const
Definition DragAndDrop.h:70
virtual SLATECORE_API ~FDragDropOperation()
Definition DragAndDrop.cpp:17
virtual FVector2D GetDecoratorPosition() const
Definition DragAndDrop.h:73
virtual SLATECORE_API void Construct()
Definition DragAndDrop.cpp:104
virtual bool AffectedByPointerEvent(const FPointerEvent &PointerEvent)
Definition DragAndDrop.h:46
SLATECORE_API void SetCursorOverride(TOptional< EMouseCursor::Type > CursorType)
Definition DragAndDrop.cpp:95
SLATECORE_API void DestroyCursorDecoratorWindow()
Definition DragAndDrop.cpp:125
virtual SLATECORE_API void OnDrop(bool bDropWasHandled, const FPointerEvent &MouseEvent)
Definition DragAndDrop.cpp:26
bool bCreateNewWindow
Definition DragAndDrop.h:126
TOptional< EMouseCursor::Type > MouseCursor
Definition DragAndDrop.h:132
virtual SLATECORE_API void SetDecoratorVisibility(bool bVisible)
Definition DragAndDrop.cpp:64
virtual TSharedPtr< FDragDropOperation > ConvertTo(const FString &TypeId)
Definition DragAndDrop.h:115
TOptional< EMouseCursor::Type > MouseCursorOverride
Definition DragAndDrop.h:135
virtual bool IsOfTypeImpl(const FString &Type) const
Definition DragAndDrop.h:94
TSharedPtr< SWindow > CursorDecoratorWindow
Definition DragAndDrop.h:129
Definition DragAndDrop.h:217
static SLATECORE_API TSharedRef< FExternalDragOperation > NewText(FString InText)
Definition DragAndDrop.cpp:138
const FString & GetText() const
Definition DragAndDrop.h:240
const TArray< FString > & GetFiles() const
Definition DragAndDrop.h:242
static SLATECORE_API TSharedRef< FExternalDragOperation > NewFiles(TArray< FString > InFileNames)
Definition DragAndDrop.cpp:147
bool HasFiles() const
Definition DragAndDrop.h:237
bool HasText() const
Definition DragAndDrop.h:235
static SLATECORE_API TSharedRef< FExternalDragOperation > NewOperation(FString InText, TArray< FString > InFileNames)
Definition DragAndDrop.cpp:156
Definition DragAndDrop.h:258
virtual SLATECORE_API FVector2D GetDecoratorPosition() const override
Definition DragAndDrop.cpp:176
SLATECORE_API FGameDragDropOperation()
Definition DragAndDrop.cpp:170
FVector2D DecoratorPosition
Definition DragAndDrop.h:271
Definition SharedPointer.h:1640
TSharedRef< FDragDropOperation, Mode > AsShared()
Definition SharedPointer.h:1650
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition Optional.h:131