// Copyright Epic Games, Inc. All Rights Reserved. #include "ContentSourceDragDropOp.h" #include "GenericPlatform/ICursor.h" #include "HAL/PlatformCrt.h" #include "Misc/Attribute.h" #include "Misc/Optional.h" #include "ViewModels/ContentSourceViewModel.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "Widgets/Images/SImage.h" class SWidget; TSharedRef FContentSourceDragDropOp::CreateShared(TSharedPtr InContentSource) { TSharedPtr DragDropOp = MakeShareable(new FContentSourceDragDropOp(InContentSource)); DragDropOp->MouseCursor = EMouseCursor::GrabHandClosed; DragDropOp->Construct(); return DragDropOp.ToSharedRef(); } FContentSourceDragDropOp::FContentSourceDragDropOp(TSharedPtr InContentSource) { ContentSource = InContentSource; } TSharedPtr FContentSourceDragDropOp::GetDefaultDecorator() const { return SNew(SImage) .Image(ContentSource->GetIconBrush().Get()); } TSharedPtr FContentSourceDragDropOp::GetContentSource() { return ContentSource; }