Files
UnrealEngineUWP/Engine/Source/Editor/ContentBrowser/Private/DragDropHandler.h
Jamie Dale b36a494aeb Added support for nested collections
UETOOL-332 - Collections 2.0
UETOOL-369 - Want nested collections with collapsing

We now have version 2 collections which maintain a persistent GUID for each collection. Existing collections will be lazily updated to this version when they need to be re-saved.

This GUID is used by child collections to keep track their parents, and the collections view (as well as the quick asset management) now show a tree of collections. Collections in the main collection view tree can be re-parented via drag and drop.

Performing Content Browser searches against a given collection will also test to see if an object exists in child collections, and the asset view will now show you folder entries for child collections when viewing a parent (if folders are enabled in your Content Browser view settings).

[CL 2593321 by Jamie Dale in Main branch]
2015-06-19 07:33:02 -04:00

20 lines
1.5 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
/** Common Content Browser drag-drop handler logic */
namespace DragDropHandler
{
DECLARE_DELEGATE_TwoParams(FExecuteCopyOrMoveAssets, TArray<FAssetData> /*AssetList*/, FString /*TargetPath*/);
DECLARE_DELEGATE_TwoParams(FExecuteCopyOrMoveFolders, TArray<FString> /*PathNames*/, FString /*TargetPath*/);
/** Used by OnDragEnter, OnDragOver, and OnDrop to check and update the validity of a drag-drop operation on an asset folder in the Content Browser */
bool ValidateDragDropOnAssetFolder(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent, const FString& TargetPath, bool& OutIsKnownDragOperation);
/** Handle assets being dropped onto an asset folder in the Content Browser - this drop should have been externally validated by ValidateDragDropOnAssetFolder */
void HandleAssetsDroppedOnAssetFolder(const TSharedRef<SWidget>& ParentWidget, const TArray<FAssetData>& AssetList, const FString& TargetPath, const FText& TargetDisplayName, FExecuteCopyOrMoveAssets CopyActionHandler, FExecuteCopyOrMoveAssets MoveActionHandler);
/** Handle folders being dropped onto an asset folder in the Content Browser - this drop should have been externally validated by ValidateDragDropOnAssetFolder */
void HandleFoldersDroppedOnAssetFolder(const TSharedRef<SWidget>& ParentWidget, const TArray<FString>& PathNames, const FString& TargetPath, const FText& TargetDisplayName, FExecuteCopyOrMoveFolders CopyActionHandler, FExecuteCopyOrMoveFolders MoveActionHandler);
}