// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Widgets/SWidget.h" #include "Toolkits/AssetEditorToolkit.h" #include "WorkflowOrientedApp/WorkflowCentricApplication.h" #include "PersonaDelegates.h" #include "WorkflowOrientedApp/ApplicationMode.h" #include "IDocumentation.h" #include "WorkflowOrientedApp/WorkflowTabFactory.h" #include "WorkflowOrientedApp/WorkflowTabManager.h" class SToolTip; class FSkeletalMeshEditorMode : public FApplicationMode { public: FSkeletalMeshEditorMode( TSharedRef InHostingApp, TSharedRef InSkeletonTree, TSharedRef InMorphTargetViewer ); /** FApplicationMode interface */ virtual void RegisterTabFactories(TSharedPtr InTabManager) override; virtual void AddTabFactory(FCreateWorkflowTabFactory FactoryCreator) override; virtual void RemoveTabFactory(FName TabFactoryID) override; protected: /** The hosting app */ TWeakPtr HostingAppPtr; /** The tab factories we support */ FWorkflowAllowedTabSet TabFactories; /** Mesh interface class */ TSharedRef CreateMeshControllerMappingTabFactory(const TSharedRef& InHostingApp, const TWeakObjectPtr& InEditingMesh, FSimpleMulticastDelegate& OnPostUndo) const; }; struct FMeshPropertiesSummoner : public FWorkflowTabFactory { FMeshPropertiesSummoner(TSharedPtr InHostingApp, FOnGetAsset InOnGetAsset); // FWorkflowTabFactory interface virtual TSharedRef CreateTabBody(const FWorkflowTabSpawnInfo& Info) const override; // Create a tooltip widget for the tab virtual TSharedPtr CreateTabToolTipWidget(const FWorkflowTabSpawnInfo& Info) const override { return IDocumentation::Get()->CreateToolTip(NSLOCTEXT("MeshProperties", "MeshDetailsTooltip", "The Mesh Details tab lets you edit properties (materials etc) of the current Skeletal Mesh."), NULL, TEXT("Shared/Editors/Persona"), TEXT("MeshDetail_Window")); } // FWorkflowTabFactory interface private: FOnGetAsset OnGetAsset; }; ///////////////////////////////////////////////////// // FAnimationMappingWindowTabSummoner struct FMeshControllerMappingTabSummoner : public FWorkflowTabFactory { public: FMeshControllerMappingTabSummoner(TSharedPtr InHostingApp, const TWeakObjectPtr& InEditingMesh, FSimpleMulticastDelegate& InOnPostUndo); virtual TSharedRef CreateTabBody(const FWorkflowTabSpawnInfo& Info) const override; // Create a tooltip widget for the tab virtual TSharedPtr CreateTabToolTipWidget(const FWorkflowTabSpawnInfo& Info) const override; private: TWeakObjectPtr SkeletalMesh; FSimpleMulticastDelegate& OnPostUndo; };