Files
UnrealEngineUWP/Engine/Source/Editor/DeviceProfileEditor/Private/DeviceProfileEditorModule.cpp
2014-03-14 14:13:41 -04:00

47 lines
1.4 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
DeviceProfileEditorModule.cpp: Implements the FDeviceProfileEditorModule class.
=============================================================================*/
#include "DeviceProfileEditorPCH.h"
#include "WorkspaceMenuStructureModule.h"
#define LOCTEXT_NAMESPACE "DeviceProfileEditor"
IMPLEMENT_MODULE(FDeviceProfileEditorModule, DeviceProfileEditor);
static const FName DeviceProfileEditorName("DeviceProfileEditor");
void FDeviceProfileEditorModule::StartupModule()
{
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(DeviceProfileEditorName, FOnSpawnTab::CreateStatic(&FDeviceProfileEditorModule::SpawnDeviceProfileEditorTab))
.SetDisplayName( NSLOCTEXT("DeviceProfileEditor", "DeviceProfileEditorTitle", "Device Profile Editor") )
.SetGroup( WorkspaceMenu::GetMenuStructure().GetToolsCategory() );
}
void FDeviceProfileEditorModule::ShutdownModule()
{
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(DeviceProfileEditorName);
}
TSharedRef<SDockTab> FDeviceProfileEditorModule::SpawnDeviceProfileEditorTab(const FSpawnTabArgs& SpawnTabArgs)
{
const TSharedRef<SDockTab> MajorTab = SNew(SDockTab)
.TabRole(ETabRole::MajorTab);
const TSharedRef<SDeviceProfileEditor> DeviceProfileEditor = SNew(SDeviceProfileEditor);
MajorTab->SetContent(DeviceProfileEditor);
return MajorTab;
}
#undef LOCTEXT_NAMESPACE