FTabManager

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Framework/Docking/TabManager.h

Include

#include "Framework/Docking/TabManager.h"

Syntax

class FTabManager : public TSharedFromThis< FTabManager >

Variables

Name Description

Protected variable

FName

 

ActiveLayoutName

The name of the layout being used

Protected variable

bool

 

bCanDoDragOperation

Prevent or allow Drag operation.

Protected variable

bool

 

bIsSavingVisualState

Defensive: True when we are saving the visual state.

Protected variable

TArray< TShared...

 

CollapsedDockAreas

CollapsedDockAreas refers to areas that were closed (e.g., by the user).

Protected variable

TArray< TWeakPt...

 

DockAreas

Protected variable

TArray< TShared...

 

InvalidDockAreas

InvalidDockAreas refers to areas that were not recognized by the Editor (e.g., LiveLink when its plugin its disabled).

Protected variable

int32

 

LastDocumentUID

Instance ID for document tabs.

Protected variable

TWeakPtr< SWind...

 

LastMajorDockWindow

The last window we docked a nomad or major tab into

Protected variable

TSharedPtr< FWo...

 

LocalWorkspaceMenuRoot

The root for the local editor's tab spawner workspace menu

Protected variable

TWeakPtr< const...

 

MainNonCloseableTab

The main tab, this tab cannot be closed.

Protected variable

TSharedPtr< FMu...

 

MenuMultiBox

The current menu multi-box for the tab, used to construct platform native main menus

Protected variable

TSharedRef< FTa...

 

NomadTabSpawner

Protected variable

FOnPersistLayou...

 

OnPersistLayout_Handler

Invoked when the tab manager is about to close

Protected variable

TWeakPtr< SDock...

 

OwnerTabPtr

A Major tab that contains this TabManager's widgets.

Protected variable

TSharedRef< FPr...

 

PrivateApi

Protected private API that must only be accessed by the docking framework internals

Protected variable

TSharedRef< FBl...

 

TabBlacklist

Allow systems to dynamically hide tabs

Protected variable

FTabSpawner

 

TabSpawner

Constructors

Name Description

Protected function

FTabManager

(
    const TSharedPtr< SDockTab >& InOw...,
    const TSharedRef< FTabManager::FTab...
)

Destructors

Name Description

Public function Virtual

~FTabManager()

Functions

Name Description

Public function

TSharedRef< ...

 

AddLocalWorkspaceMenuCategory

(
    const FText& CategoryTitle
)

Adds a category to the local workspace menu by name

Public function

void

 

AddLocalWorkspaceMenuItem

(
    const TSharedRef< FWorkspaceItem > ...
)

Adds an existing workspace item to the local workspace menu

Protected function Virtual

bool

 

CanCloseManager

(
    const TSet< TSharedRef< SDockTab > ...
)

Check these all tabs to see if it is OK to close them. Ignore the TabsToIgnore

Protected function

bool

 

CanRestoreSplitterContent

(
    TArray< TSharedRef< class SDockingN...,
    const TSharedRef< FSplitter >& Spl...,
    const TSharedPtr< SWindow >& Paren...,
    const EOutputCanBeNullptr OutputCan...
)

Use CanRestoreSplitterContent + RestoreSplitterContent when the output of its internal RestoreArea_Helper can be a nullptr.

Public function

void

 

ClearLocalWorkspaceMenuCategories()

Clears all categories in the local workspace menu

Public function

void

 

CloseAllAreas()

Close all live areas and wipe all the persisted areas.

Public function Virtual

void

 

DrawAttention

(
    const TSharedRef< SDockTab >& TabT...
)

Public function Const

TSharedPtr< ...

 

FindExistingLiveTab

(
    const FTabId& TabId
)

Finds the first instance of an existing tab with the given tab id.

Protected function Const

TSharedPtr< ...

 

FindLastTabInWindow

(
    TSharedPtr< SWindow > Window
)

Finds the last major or nomad tab in a particular window.

Protected function

TSharedPtr< ...

 

FindPotentiallyClosedTab

(
    const FTabId& ClosedTabId
)

Protected function

int32

 

FindTabInCollapsedAreas

(
    const FTabMatcher& Matcher
)

Protected function Static

TSharedPtr< ...

 

FindTabInLiveArea

(
    const FTabMatcher& TabMatcher,
    const TSharedRef< SDockingArea >& ...
)

Protected function Const

TSharedPtr< ...

 

FindTabInLiveAreas

(
    const FTabMatcher& TabMatcher
)

Protected function

TSharedPtr< ...

 

FindTabSpawnerFor

(
    FName TabId
)

Protected function Static

TSharedPtr< ...

 

FindTabUnderNode

(
    const FTabMatcher& Matcher,
    const TSharedRef< FTabManager::FLay...
)

Protected function Static

void

 

GetAllStacks

(
    const TSharedRef< SDockingArea >& ...,
    TArray< TSharedRef< SDockingTabStac...
)

Public function

bool

 

GetCanDoDragOperation()

Return true if we can do drag operation

Protected function Static

FVector2D

 

GetDefaultTabWindowSize

(
    const FTabId& TabId
)

Returns the default window size for the TabId, or the fallback window size if it wasn't registered

Public function Const

const TShare...

 

GetLocalWorkspaceMenuRoot()

Public function

TSharedPtr< ...

 

GetOwnerTab()

Returns the owner tab (if it exists)

Public function

FTabManager:...

 

GetPrivateApi()

Public function

TSharedRef< ...

 

GetTabBlacklist()

Returns filter for additional control over available tabs

Protected function Static

bool

 

HasAnyMatchingTabs

(
    const TSharedRef< FTabManager::FLay...,
    const MatchFunctorType& Matcher
)

Public function Const

bool

 

HasTabSpawner

(
    FName TabId
)

Protected function Const

bool

 

HasTabSpawnerFor

(
    FName TabId
)

Public function Const

bool

 

HasValidOpenTabs

(
    const TSharedRef< FTabManager::FLay...
)

It searches for valid and open tabs on SomeNode.

Protected function Const

bool

 

HasValidTabs

(
    const TSharedRef< FTabManager::FLay...
)

Protected function

void

 

InsertDocumentTab

(
    FName PlaceholderId,
    const FSearchPreference& SearchPre...,
    const TSharedRef< SDockTab >& Unma...,
    bool bPlaySpawnAnim
)

Public function

void

 

InsertNewDocumentTab

(
    FName PlaceholderId,
    ESearchPreference::Type SearchPrefe...,
    const TSharedRef< SDockTab >& Unma...
)

Insert a new UnmanagedTab document tab next to an existing tab (closed or open) that has the PlaceholdId.

Public function

void

 

InsertNewDocumentTab

(
    FName PlaceholderId,
    const FSearchPreference& SearchPre...,
    const TSharedRef< SDockTab >& Unma...
)

Insert a new UnmanagedTab document tab next to an existing tab (closed or open) that has the PlaceholdId.

Protected function

TSharedPtr< ...

 

InvokeTab_Internal

(
    const FTabId& TabId
)

Protected function

void

 

InvokeTabForMenu

(
    FName TabId
)

Protected function Const

bool

 

IsAllowedTab

(
    const FTabId& TabId
)

Protected function Const

bool

 

IsAllowedTabType

(
    const FName TabType
)

Public function Const

bool

 

IsTabCloseable

(
    const TSharedRef< const SDockTab > ...
)

Protected function Const

bool

 

IsValidTabForSpawning

(
    const FTab& SomeTab
)

Protected function

void

 

MakeSpawnerMenuEntry

(
    FMenuBuilder& PopulateMe,
    const TSharedPtr< FTabSpawnerEntry ...
)

Protected function Static

TSharedRef< ...

 

New

(
    const TSharedPtr< SDockTab >& InOw...,
    const TSharedRef< FTabSpawner >& I...
)

Public function Static

TSharedRef< ...

 

NewArea

(
    const float Width,
    const float Height
)

Public function Static

TSharedRef< ...

 

NewArea

(
    const FVector2D& WindowSize
)

Public function Static

TSharedRef< ...

 

NewLayout

(
    const FName LayoutName
)

Public function Static

TSharedRef< ...

 

NewPrimaryArea()

Public function Static

TSharedRef< ...

 

NewSplitter()

Public function Static

TSharedRef< ...

 

NewStack()

Protected function Virtual

void

 

OnTabClosing

(
    const TSharedRef< SDockTab >& TabB...
)

Protected function Virtual

void

 

OnTabForegrounded

(
    const TSharedPtr< SDockTab >& NewF...,
    const TSharedPtr< SDockTab >& Back...
)

Notify the tab manager that the NewForegroundTab was brought to front and the BackgroundedTab was send to the background as a result.

Protected function Virtual

void

 

OnTabManagerClosing()

Invoked when a tab manager is closing down.

Protected function Virtual

void

 

OnTabOpening

(
    const TSharedRef< SDockTab >& TabB...
)

Protected function Virtual

void

 

OnTabRelocated

(
    const TSharedRef< SDockTab >& Relo...,
    const TSharedPtr< SWindow >& NewOw...
)

Protected function Virtual

void

 

OpenUnmanagedTab

(
    FName PlaceholderId,
    const FSearchPreference& SearchPre...,
    const TSharedRef< SDockTab >& Unma...
)

Public function Const

TSharedRef< ...

 

PersistLayout()

Gather the persistent layout

Public function

void

 

PopulateLocalTabSpawnerMenu

(
    FMenuBuilder& PopulateMe
)

Public function

void

 

PopulateTabSpawnerMenu

(
    FMenuBuilder& PopulateMe,
    TSharedRef< FWorkspaceItem > MenuSt...,
    bool bIncludeOrphanedMenus
)

Public function

void

 

PopulateTabSpawnerMenu

(
    FMenuBuilder& PopulateMe,
    const FName& TabType
)

Public function

void

 

PopulateTabSpawnerMenu

(
    FMenuBuilder& PopulateMe,
    TSharedRef< FWorkspaceItem > MenuSt...
)

Protected function

void

 

PopulateTabSpawnerMenu_Helper

(
    FMenuBuilder& PopulateMe,
    FPopulateTabSpawnerMenu_Args Args
)

Public function Static

void

 

RegisterDefaultTabWindowSize

(
    const FTabId& TabName,
    const FVector2D DefaultSize
)

Public function

FTabSpawnerE...

 

RegisterTabSpawner

(
    const FName TabId,
    const FOnSpawnTab& OnSpawnTab,
    const FCanSpawnTab& CanSpawnTab
)

Register a new tab spawner with the tab manager.

Protected function

void

 

RemoveTabFromCollapsedAreas

(
    const FTabMatcher& Matcher
)

Protected function

TSharedPtr< ...

 

RestoreArea

(
    const TSharedRef< FArea >& AreaToR...,
    const TSharedPtr< SWindow >& InPar...,
    const bool bEmbedTitleAreaContent,
    const EOutputCanBeNullptr OutputCan...
)

Protected function

TSharedPtr< ...

 

RestoreArea_Helper

(
    const TSharedRef< FLayoutNode >& L...,
    const TSharedPtr< SWindow >& Paren...,
    const bool bEmbedTitleAreaContent,
    const EOutputCanBeNullptr OutputCan...
)

Public function

void

 

RestoreDocumentTab

(
    FName PlaceholderId,
    ESearchPreference::Type SearchPrefe...,
    const TSharedRef< SDockTab >& Unma...
)

Much like InsertNewDocumentTab, but the UnmanagedTab is not seen by the user as newly-created.

Public function

TSharedPtr< ...

 

RestoreFrom

(
    const TSharedRef< FLayout >& Layou...,
    const TSharedPtr< SWindow >& Paren...,
    const bool bEmbedTitleAreaContent,
    const EOutputCanBeNullptr RestoreAr...
)

Protected function

void

 

RestoreSplitterContent

(
    const TArray< TSharedRef< class SDo...,
    const TSharedRef< class SDockingSpl...
)

Protected function

void

 

RestoreSplitterContent

(
    const TSharedRef< FSplitter >& Spl...,
    const TSharedRef< class SDockingSpl...,
    const TSharedPtr< SWindow >& Paren...
)

Use this standalone RestoreSplitterContent when the output of its internal RestoreArea_Helper cannot be a nullptr.

Public function

void

 

SavePersistentLayout()

Gather the persistent layout and execute the custom delegate for saving it to persistent storage (e.g. into config files)

Public function

void

 

SetCanDoDragOperation

(
    bool CanDoDragOperation
)

Prevent or allow all tabs to be drag

Public function

void

 

SetMainTab

(
    const TSharedRef< const SDockTab > ...
)

Provide a tab that will be the main tab and cannot be closed.

Public function

void

 

SetMenuMultiBox

(
    const TSharedPtr< FMultiBox >& New...
)

Set the multi-box to use for generating a native, global menu bar.

Public function

void

 

SetOnPersistLayout

(
    const FOnPersistLayout& InHandler
)

Protected function Const

void

 

SetTabsTo

(
    const TSharedRef< FTabManager::FLay...,
    const ETabState::Type NewTabState,
    const ETabState::Type OriginalTabSt...
)

It sets the desired (or all) tabs in the FTabManager::FLayoutNode to the desired value.

Protected function

TSharedPtr< ...

 

SpawnTab

(
    const FTabId& TabId,
    const TSharedPtr< SWindow >& Paren...,
    const bool bCanOutputBeNullptr
)

Public function Virtual

TSharedPtr< ...

 

TryInvokeTab

(
    const FTabId& TabId
)

Try to open tab if it is closed at the last known location.

Public function

void

 

UnregisterAllTabSpawners()

Unregisters all tab spawners.

Public function Static

void

 

UnregisterDefaultTabWindowSize

(
    const FTabId& TabName
)

Public function

bool

 

UnregisterTabSpawner

(
    const FName TabId
)

Unregisters the tab spawner matching the provided TabId.

Public function

void

 

UpdateMainMenu

(
    bool const bForce
)

Update the native, global menu bar if it is being used.

Protected function Virtual

void

 

UpdateStats()

Called when tab(s) have been added or windows created

Classes

Typedefs

Name

Description

FOnPersistLayout

FTabSpawner

Constants

Name

Description

DefaultTabWindowSizeMap

Default tab window sizes for newly-created tabs

FallbackWindowSize

The fallback size for a window

Deprecated Functions

Name Description

Public function Const

bool

 

CanSpawnTab

(
    FName TabId
)

CanSpawnTab has been replaced by HasTabSpawner

Public function Virtual

TSharedRef< ...

 

InvokeTab

(
    const FTabId& TabId
)

FTabManager::InvokeTab is deprecated. Please use TryInvokeTab instead!

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss