// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Framework/Docking/WorkspaceItem.h" #include "Framework/Docking/TabManager.h" #include "Framework/Docking/LayoutExtender.h" DECLARE_DELEGATE_RetVal_OneParam(TSharedPtr, FCreateWorkflowTabFactory, TSharedPtr) class FExtender; ///////////////////////////////////////////////////// // FApplicationMode class FApplicationMode : public TSharedFromThis { protected: // The layout to use in this mode TSharedPtr TabLayout; // The list of tabs that can be spawned in this game mode. // Note: This list should be treated as readonly outside of the constructor. //FWorkflowAllowedTabSet AllowableTabs; // The internal name of this mode FName ModeName; //@TODO: For test suite use only FString UserLayoutString; /** The toolbar extension for this mode */ TSharedPtr ToolbarExtender; /** The workspace menu category for this mode */ TSharedPtr WorkspaceMenuCategory; /** What ini file should be used to persist and restore the user's layout. Defaults to GEditorLayoutIni. */ FString LayoutIni = GEditorLayoutIni; public: UNREALED_API FApplicationMode(FName InModeName); UNREALED_API FApplicationMode(FName InModeName, FText(*GetLocalizedMode)(const FName)); virtual ~FApplicationMode() {} UNREALED_API void DeactivateMode(TSharedPtr InTabManager); UNREALED_API TSharedRef ActivateMode(TSharedPtr InTabManager); virtual void RegisterTabFactories(TSharedPtr InTabManager) {} virtual void AddTabFactory(FCreateWorkflowTabFactory FactoryCreator) {} virtual void RemoveTabFactory(FName TabFactoryID) {} virtual void PreDeactivateMode() {} virtual void PostActivateMode() {} FName GetModeName() const { return ModeName; } TSharedPtr GetToolbarExtender() { return ToolbarExtender; } /** @return The the workspace category for this asset editor */ TSharedRef GetWorkspaceMenuCategory() const { return WorkspaceMenuCategory.ToSharedRef(); } /** Extender for adding to the default layout for this mode */ TSharedPtr LayoutExtender; };