Skip to main content

Editor Slate Utils

Base:
class
Type:
FNEditorSlateUtils
Header File:
NexusUIEditor/Public/NEditorSlateUtils.h

Editor-time Slate helpers focused on locating SDockTab instances inside the editor's tab hierarchy so callers can reach tabs that were spawned by other systems. The runtime equivalent — FNSlateUtils — covers generic widget-tree searches that apply outside the editor; this class adds editor-specific traversal that reaches into FGlobalTabmanager.

Methods​

Find Dock Tab​

Walks the widget tree rooted at BaseWidget searching for an SDockTab matching either TargetLabel or TabIdentifier. Used when only a known ancestor widget is available — typically a parent tab — and the target tab's pointer needs to be recovered.

/**
* @param BaseWidget Root of the search; typically the parent tab or a known ancestor widget.
* @param TargetLabel Human-readable label to compare against the tab's displayed text.
* @param TabIdentifier Tab manager identifier to match; preferred over label when unique.
* @return The matching SDockTab, or an invalid shared pointer if nothing was found.
*/
static TSharedPtr<SDockTab> FindDockTab(const TSharedPtr<SWidget>& BaseWidget, const FText& TargetLabel, const FName TabIdentifier);

Find Dock Tab By Identifier​

Asks FGlobalTabmanager for a tab by registered identifier. Faster and more reliable than walking widget trees when the identifier was published by FTabSpawnerEntry at registration time.

/**
* @param TabIdentifier Tab manager identifier registered when the tab was spawned.
* @return The matching SDockTab, or an invalid shared pointer if no such tab is live.
*/
static TSharedPtr<SDockTab> FindDockTabByIdentifier(const FName TabIdentifier);

See Also​

  • FNSlateUtils — runtime widget-tree walking that does not depend on the editor.