Files
UnrealEngineUWP/Engine/Source/Editor/UndoHistory/Private/UndoHistoryModule.cpp
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

44 lines
1.2 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "UndoHistoryModule.h"
#include "EditorStyleSet.h"
#include "Widgets/SUndoHistory.h"
#include "Widgets/Docking/SDockTab.h"
#define LOCTEXT_NAMESPACE "FUndoHistoryModule"
void FUndoHistoryModule::StartupModule()
{
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(UndoHistoryTabName, FOnSpawnTab::CreateRaw(this, &FUndoHistoryModule::HandleSpawnSettingsTab))
.SetDisplayName(NSLOCTEXT("FUndoHistoryModule", "UndoHistoryTabTitle", "Undo History"))
.SetTooltipText(NSLOCTEXT("FUndoHistoryModule", "UndoHistoryTooltipText", "Open the Undo History tab."))
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "UndoHistory.TabIcon"))
.SetAutoGenerateMenuEntry(false);
}
void FUndoHistoryModule::ShutdownModule()
{
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(UndoHistoryTabName);
}
bool FUndoHistoryModule::SupportsDynamicReloading()
{
return true;
}
TSharedRef<SDockTab> FUndoHistoryModule::HandleSpawnSettingsTab(const FSpawnTabArgs& SpawnTabArgs)
{
const TSharedRef<SDockTab> DockTab = SNew(SDockTab)
.TabRole(ETabRole::NomadTab);
DockTab->SetContent(SNew(SUndoHistory));
return DockTab;
}
IMPLEMENT_MODULE(FUndoHistoryModule, UndoHistory);
#undef LOCTEXT_NAMESPACE