2020-10-28 06:51:40 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "Framework/Commands/UICommandList.h"
|
|
|
|
|
#include "Framework/MultiBox/MultiBoxExtender.h"
|
2020-12-02 10:18:50 -04:00
|
|
|
#include "WorldPartition/DataLayer/IDataLayerEditorModule.h"
|
2020-10-28 06:51:40 -04:00
|
|
|
|
2022-03-15 13:52:28 -04:00
|
|
|
class UDataLayerInstance;
|
2020-10-28 06:51:40 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The module holding all of the UI related pieces for DataLayers
|
|
|
|
|
*/
|
2020-12-02 10:18:50 -04:00
|
|
|
class FDataLayerEditorModule : public IDataLayerEditorModule
|
2020-10-28 06:51:40 -04:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called right after the module DLL has been loaded and the module object has been created
|
|
|
|
|
*/
|
|
|
|
|
virtual void StartupModule();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called before the module is unloaded, right before the module object is destroyed.
|
|
|
|
|
*/
|
|
|
|
|
virtual void ShutdownModule();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a DataLayer Browser widget
|
|
|
|
|
*/
|
|
|
|
|
virtual TSharedRef<class SWidget> CreateDataLayerBrowser();
|
|
|
|
|
|
2021-11-07 23:43:01 -05:00
|
|
|
/*
|
|
|
|
|
* Selected DataLayer in DataLayer Browser widget
|
|
|
|
|
*/
|
2022-03-15 13:52:28 -04:00
|
|
|
virtual void SyncDataLayerBrowserToDataLayer(const UDataLayerInstance* DataLayer);
|
2021-11-07 23:43:01 -05:00
|
|
|
|
2020-10-28 06:51:40 -04:00
|
|
|
/** Delegates to be called to extend the DataLayers menus */
|
|
|
|
|
DECLARE_DELEGATE_RetVal_OneParam(TSharedRef<FExtender>, FDataLayersMenuExtender, const TSharedRef<FUICommandList>);
|
|
|
|
|
virtual TArray<FDataLayersMenuExtender>& GetAllDataLayersMenuExtenders() {return DataLayersMenuExtenders;}
|
|
|
|
|
|
|
|
|
|
private:
|
2021-11-07 23:43:01 -05:00
|
|
|
TWeakPtr<SWidget> DataLayerBrowser;
|
|
|
|
|
|
2020-10-28 06:51:40 -04:00
|
|
|
/** All extender delegates for the DataLayers menus */
|
|
|
|
|
TArray<FDataLayersMenuExtender> DataLayersMenuExtenders;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|