Files
UnrealEngineUWP/Engine/Source/Editor/WorldBrowser/Private/SLevelsTreeWidget.h
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

43 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Layout/Visibility.h"
#include "Input/Reply.h"
#include "Widgets/SWidget.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SCompoundWidget.h"
#include "Widgets/Views/STreeView.h"
#include "AssetData.h"
#include "IWorldTreeItem.h"
class FLevelModel;
class FLevelCollectionModel;
class SWorldHierarchyImpl;
class SLevelsTreeWidget : public STreeView<WorldHierarchy::FWorldTreeItemPtr>
{
public:
void Construct(const FArguments& InArgs, const TSharedPtr<FLevelCollectionModel>& InWorldModel, const TSharedPtr<SWorldHierarchyImpl>& InHierachy);
virtual FReply OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override;
virtual void OnDragLeave(const FDragDropEvent& DragDropEvent) override;
virtual FReply OnDrop(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override;
private:
/** Finds any world assets that are contained in the drag drop event and returns them in the supplied array. Returns true if a world asset was found */
bool GetWorldAssetsFromDrag(const FDragDropEvent& DragDropEvent, TArray<FAssetData>& OutWorldAssetList);
/** Checks to see if all selected items can be moved. */
bool CanAttachAllItemsToRoot(const TArray<WorldHierarchy::FWorldTreeItemPtr>& Items) const;
private:
TSharedPtr<FLevelCollectionModel> WorldModel;
TWeakPtr<SWorldHierarchyImpl> Hierarchy;
};