You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
74 lines
3.2 KiB
C++
74 lines
3.2 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "ModuleInterface.h"
|
|
#include "IContentBrowserSingleton.h"
|
|
|
|
/**
|
|
* Content browser module
|
|
*/
|
|
class FContentBrowserModule : public IModuleInterface
|
|
{
|
|
|
|
public:
|
|
|
|
/** */
|
|
DECLARE_MULTICAST_DELEGATE_TwoParams( FOnFilterChanged, const FARFilter& /*NewFilter*/, bool /*bIsPrimaryBrowser*/ );
|
|
/** */
|
|
DECLARE_MULTICAST_DELEGATE_TwoParams( FOnSearchBoxChanged, const FText& /*InSearchText*/, bool /*bIsPrimaryBrowser*/ );
|
|
/** */
|
|
DECLARE_MULTICAST_DELEGATE_TwoParams( FOnAssetSelectionChanged, const TArray<FAssetData>& /*NewSelectedAssets*/, bool /*bIsPrimaryBrowser*/ );
|
|
/** */
|
|
DECLARE_MULTICAST_DELEGATE_OneParam( FOnSourcesViewChanged, bool /*bExpanded*/ );
|
|
/** */
|
|
DECLARE_MULTICAST_DELEGATE_OneParam( FOnAssetPathChanged, const FString& /*NewPath*/ );
|
|
|
|
/**
|
|
* Called right after the plugin DLL has been loaded and the plugin object has been created
|
|
*/
|
|
virtual void StartupModule();
|
|
|
|
/**
|
|
* Called before the plugin is unloaded, right before the plugin object is destroyed.
|
|
*/
|
|
virtual void ShutdownModule();
|
|
|
|
/** Gets the content browser singleton */
|
|
virtual IContentBrowserSingleton& Get() const;
|
|
|
|
/** Delegates to be called to extend the content browser menus */
|
|
virtual TArray<FContentBrowserMenuExtender>& GetAllAssetContextMenuExtenders() {return AssetContextMenuExtenders;}
|
|
virtual TArray<FContentBrowserMenuExtender_SelectedPaths>& GetAllPathViewContextMenuExtenders() {return PathViewContextMenuExtenders;}
|
|
virtual TArray<FContentBrowserMenuExtender>& GetAllCollectionListContextMenuExtenders() {return CollectionListContextMenuExtenders;}
|
|
virtual TArray<FContentBrowserMenuExtender>& GetAllCollectionViewContextMenuExtenders() {return CollectionViewContextMenuExtenders;}
|
|
virtual TArray<FContentBrowserMenuExtender_SelectedAssets>& GetAllAssetViewContextMenuExtenders() {return AssetViewContextMenuExtenders;}
|
|
virtual TArray<FContentBrowserMenuExtender>& GetAllAssetViewViewMenuExtenders() {return AssetViewViewMenuExtenders;}
|
|
|
|
/** Delegate accessors */
|
|
FOnFilterChanged& GetOnFilterChanged() { return OnFilterChanged; }
|
|
FOnSearchBoxChanged& GetOnSearchBoxChanged() { return OnSearchBoxChanged; }
|
|
FOnAssetSelectionChanged& GetOnAssetSelectionChanged() { return OnAssetSelectionChanged; }
|
|
FOnSourcesViewChanged& GetOnSourcesViewChanged() { return OnSourcesViewChanged; }
|
|
FOnAssetPathChanged& GetOnAssetPathChanged() { return OnAssetPathChanged; }
|
|
|
|
private:
|
|
IContentBrowserSingleton* ContentBrowserSingleton;
|
|
TSharedPtr<class FContentBrowserSpawner> ContentBrowserSpawner;
|
|
|
|
/** All extender delegates for the content browser menus */
|
|
TArray<FContentBrowserMenuExtender> AssetContextMenuExtenders;
|
|
TArray<FContentBrowserMenuExtender_SelectedPaths> PathViewContextMenuExtenders;
|
|
TArray<FContentBrowserMenuExtender> CollectionListContextMenuExtenders;
|
|
TArray<FContentBrowserMenuExtender> CollectionViewContextMenuExtenders;
|
|
TArray<FContentBrowserMenuExtender_SelectedAssets> AssetViewContextMenuExtenders;
|
|
TArray<FContentBrowserMenuExtender> AssetViewViewMenuExtenders;
|
|
|
|
FOnFilterChanged OnFilterChanged;
|
|
FOnSearchBoxChanged OnSearchBoxChanged;
|
|
FOnAssetSelectionChanged OnAssetSelectionChanged;
|
|
FOnSourcesViewChanged OnSourcesViewChanged;
|
|
FOnAssetPathChanged OnAssetPathChanged;
|
|
};
|