UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FLayoutSaveRestore Struct Reference

#include <LayoutService.h>

Static Public Member Functions

static SLATE_API const FString & GetAdditionalLayoutConfigIni ()
 
static SLATE_API void SaveToConfig (const FString &InConfigFileName, const TSharedRef< FTabManager::FLayout > &InLayoutToSave)
 
static SLATE_API TSharedRef< FTabManager::FLayoutLoadFromConfig (const FString &InConfigFileName, const TSharedRef< FTabManager::FLayout > &InDefaultLayout, const EOutputCanBeNullptr InPrimaryAreaOutputCanBeNullptr=EOutputCanBeNullptr::Never)
 
static SLATE_API TSharedRef< FTabManager::FLayoutLoadFromConfig (const FString &InConfigFileName, const TSharedRef< FTabManager::FLayout > &InDefaultLayout, const EOutputCanBeNullptr InPrimaryAreaOutputCanBeNullptr, TArray< FString > &OutRemovedOlderLayoutVersions)
 
static SLATE_API void SaveSectionToConfig (const FString &InConfigFileName, const FString &InSectionName, const FString &InSectionValue)
 
static SLATE_API void SaveSectionToConfig (const FString &InConfigFileName, const FString &InSectionName, const FText &InSectionValue)
 
static SLATE_API FText LoadSectionFromConfig (const FString &InConfigFileName, const FString &InSectionName, const bool bIsOptional=false)
 
static SLATE_API void MigrateConfig (const FString &OldConfigFileName, const FString &NewConfigFileName)
 
static SLATE_API bool DuplicateConfig (const FString &SourceConfigFileName, const FString &TargetConfigFileName)
 
static SLATE_API bool IsValidConfig (const FString &InConfigFileName, bool bAllowFallback=true)
 

Member Function Documentation

◆ DuplicateConfig()

bool FLayoutSaveRestore::DuplicateConfig ( const FString &  SourceConfigFileName,
const FString &  TargetConfigFileName 
)
static

Duplicate the layout config from one file to another.

Parameters
SourceConfigFileNameThe name of the source configuration file.
TargetConfigFileNameThe name of the target configuration file.

◆ GetAdditionalLayoutConfigIni()

const FString & FLayoutSaveRestore::GetAdditionalLayoutConfigIni ( )
static

Gets the ini section label for the additional layout configs

◆ IsValidConfig()

bool FLayoutSaveRestore::IsValidConfig ( const FString &  InConfigFileName,
bool  bAllowFallback = true 
)
static

It checks whether a file is a valid layout config file.

Parameters
InConfigFileNamefile to be read.
bAllowFallbackWhether a config should be considered valid if EditorLayoutsSectionName is missing but DefaultEditorLayoutsSectionName is found
Returns
Whether the file is a valid layout config file.

◆ LoadFromConfig() [1/2]

TSharedRef< FTabManager::FLayout > FLayoutSaveRestore::LoadFromConfig ( const FString &  InConfigFileName,
const TSharedRef< FTabManager::FLayout > &  InDefaultLayout,
const EOutputCanBeNullptr  InPrimaryAreaOutputCanBeNullptr,
TArray< FString > &  OutRemovedOlderLayoutVersions 
)
static

◆ LoadFromConfig() [2/2]

TSharedRef< FTabManager::FLayout > FLayoutSaveRestore::LoadFromConfig ( const FString &  InConfigFileName,
const TSharedRef< FTabManager::FLayout > &  InDefaultLayout,
const EOutputCanBeNullptr  InPrimaryAreaOutputCanBeNullptr = EOutputCanBeNullptr::Never 
)
static

Given a named DefaultLayout, return any saved version of it from the given ini file, otherwise return the default, also default to open tabs based on bool.

Parameters
InConfigFileNameFile to be used to load an existing layout.
InDefaultLayoutThe layout to be used if the file does not exist.
InPrimaryAreaOutputCanBeNullptrAnalog to the EOutputCanBeNullptr argument of FTabManager::RestoreFrom(), but only applied to the PrimaryArea. It specifies if the primary area can still be nullptr even if no valid tabs (or opened tabs) are found. By default, set to EOutputCanBeNullptr::Never.
InOutRemovedOlderLayoutVersionsIf this TArray is not added, default behavior. If it is added as an argument, older versions of this layout field will be also cleaned from the layout ini file and their names returned in OutRemovedOlderLayoutVersions. To be precise, it will remove fields with a name that contains the same characters, other than the final number(s) and dot(s). E.g., for "UnrealEd_Layout_v1.4", any layout field starting by "UnrealEd_Layout_v" with some numbers and/or dots after the final "v".
Returns
Loaded layout or the default.

◆ LoadSectionFromConfig()

FText FLayoutSaveRestore::LoadSectionFromConfig ( const FString &  InConfigFileName,
const FString &  InSectionName,
const bool  bIsOptional = false 
)
static

Read the desired FText value from the desired section of a named config file. This function should only be used to load localization names (e.g., LayoutName, LayoutDescription). For loading the FTabManager::FLayout, check SaveToConfig.

Parameters
InConfigFileNamefile to be used to load an existing layout.
InSectionNamethe name of the section to be read.
bIsOptionalif false, an error may be output if the section doesn't exist.
Returns
Loaded FText associated for that section.

◆ MigrateConfig()

void FLayoutSaveRestore::MigrateConfig ( const FString &  OldConfigFileName,
const FString &  NewConfigFileName 
)
static

Migrates the layout configuration from one config file to another.

Parameters
OldConfigFileNameThe name of the old configuration file.
NewConfigFileNameThe name of the new configuration file.

◆ SaveSectionToConfig() [1/2]

void FLayoutSaveRestore::SaveSectionToConfig ( const FString &  InConfigFileName,
const FString &  InSectionName,
const FString &  InSectionValue 
)
static

Write the desired value into the desired section of a named config file. This function should only be used to save localization names (e.g., LayoutName, LayoutDescription). For saving the FTabManager::FLayout, check SaveToConfig.

Parameters
InConfigFileNamefile to be saved to.
InSectionNamethe section name where to save the value.
InSectionValuethe value to save.

◆ SaveSectionToConfig() [2/2]

void FLayoutSaveRestore::SaveSectionToConfig ( const FString &  InConfigFileName,
const FString &  InSectionName,
const FText InSectionValue 
)
static

◆ SaveToConfig()

void FLayoutSaveRestore::SaveToConfig ( const FString &  InConfigFileName,
const TSharedRef< FTabManager::FLayout > &  InLayoutToSave 
)
static

Write the layout out into a named config file.

Parameters
InConfigFileNamefile to be saved to.
InLayoutToSavethe layout to save.

The documentation for this struct was generated from the following files: