SDockTab

A tab widget that also holds on to some content that should be shown when this tab is selected.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Docking/SDockTab.h

Include

#include "Widgets/Docking/SDockTab.h"

Syntax

class SDockTab : public SBorder

Remarks

A tab widget that also holds on to some content that should be shown when this tab is selected. Intended to be used in conjunction with SDockingTabStack.

Variables

Name Description

Protected variable

bool

 

bShouldAutosize

Should this tab be auto-sized based on its content?

Protected variable

TSharedRef< SWi...

 

Content

The stuff to show when this tab is selected

Protected variable

TAttribute< FMa...

 

ContentAreaPadding

Protected variable

TSharedPtr< SDo...

 

DraggedOverDockingArea

The dock area this tab is currently being dragged over. Used in nomad tabs to change style

Protected variable

FCurveSequence

 

FlashTabCurve

Animation that causes the tab to flash

Protected variable

const FDockTabS...

 

GenericTabStyle

Protected variable

TSharedPtr< SIm...

 

IconWidget

Widget used to show the icon on the tab

Protected variable

TSharedPtr< STe...

 

LabelWidget

Widget used to show the label on the tab

Protected variable

double

 

LastActivationTime

Time this tab was last activated

Protected variable

FTabId

 

LayoutIdentifier

The tab's layout identifier

Protected variable

const FDockTabS...

 

MajorTabStyle

The styles used to draw the tab in its various states

Protected variable

TWeakPtr< FTabM...

 

MyTabManager

The tab manager that created this tab.

Protected variable

FCanCloseTab

 

OnCanCloseTab

Delegate to execute to determine if we can close this tab

Protected variable

FOnPersistVisua...

 

OnPersistVisualState

Invoked during the Save Visual State pass; gives this tab a chance to save misc info about visual state.

Protected variable

FOnTabActivated...

 

OnTabActivated

Callback to call when this tab is activated

Protected variable

FOnTabClosedCal...

 

OnTabClosed

Callback to call when this tab is destroyed

Protected variable

TWeakPtr< SDock...

 

ParentPtr

The tab's parent tab well. Null if it is a floating tab.

Protected variable

FCurveSequence

 

SpawnAnimCurve

Animation that shows the tab opening up

Protected variable

TAttribute< FLi...

 

TabColorScale

Color of this tab

Protected variable

TAttribute< con...

 

TabIcon

The icon on the tab

Protected variable

TAttribute< FTe...

 

TabLabel

The label on the tab

Protected variable

TAttribute< FTe...

 

TabLabelSuffix

A second text field at the end of the Label that takes precedence and isn't lost when space is restricted

Protected variable

ETabRole

 

TabRole

Is this an MajorTab? A tool panel tab?

Protected variable

TSharedRef< SWi...

 

TabWellContentBackground

Protected variable

TSharedRef< SWi...

 

TabWellContentLeft

Protected variable

TSharedRef< SWi...

 

TabWellContentRight

Constructors

Name Description

Public function

SDockTab()

Protected constructor; Widgets may only be constructed via a FArguments (i.e.: SNew(SDockTab) )

Functions

Name Description

Public function

void

 

ActivateInParent

(
    ETabActivationCause InActivationCau...
)

Make this tab active in its tabwell

Public function Const

bool

 

CanCloseTab()

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct the widget from the declaration.

Public function

void

 

DrawAttention()

Draws attention to the tab.

Public function

void

 

FlashTab()

Flash the tab, used for drawing attention to it

Protected function Const

const FSlate...

 

GetActiveTabOverlayImageBrush()

Protected function Const

FVector2D

 

GetAnimatedScale()

Public function

TSharedRef< ...

 

GetBackgrounfContent()

Protected function Const

FText

 

GetCloseButtonToolTipText()

The close button tooltip showing the appropriate close command shortcut

Protected function Const

const FSlate...

 

GetColorOverlayImageBrush()

Public function

TSharedRef< ...

 

GetContent()

Public function Const

const FSlate...

 

GetContentAreaBrush()

What should the content area look like for this type of tab? Documents, Apps, and Tool Panels have different backgrounds.

Public function Const

FMargin

 

GetContentPadding()

Padding around the content when it is presented by the SDockingTabStack

Protected function Const

const FDockT...

 

GetCurrentStyle()

Public function Const

TSharedPtr< ...

 

GetDockArea()

Gets the dock area that this resides in

Protected function Const

FSlateColor

 

GetFlashColor()

Protected function Const

const FSlate...

 

GetFlashOverlayImageBrush()

Protected function Const

float

 

GetFlashValue()

Get the desired color of tab. These change during flashing.

Protected function Const

const FSlate...

 

GetImageBrush()

Public function

double

 

GetLastActivationTime()

Returns the time this tab was last activated

Public function Const

const FTabId...

 

GetLayoutIdentifier()

Gets this tab's layout identifier

Public function

TSharedRef< ...

 

GetLeftContent()

Public function Const

float

 

GetOverlapWidth()

The width that this tab will overlap with side-by-side tabs.

Public function Const

TSharedPtr< ...

 

GetParent()

Gets the tab's tab well parent, or nothing, if it has none

Protected function Const

TSharedPtr< ...

 

GetParentDockTabStack()

Gets the dock tab stack this dockable tab resides within, if any

Public function Const

TSharedPtr< ...

 

GetParentWindow()

Get the window in which this tab's tabmanager has placed it

Public function

TSharedRef< ...

 

GetRightContent()

Protected function Const

FSlateColor

 

GetTabColor()

Public function Const

const FSlate...

 

GetTabIcon()

Gets the tab icon

Public function Const

FText

 

GetTabLabel()

The label on the tab

Public function Const

FText

 

GetTabLabelSuffix()

Get Label Suffix

Public function Const

TSharedRef< ...

 

GetTabManager()

Get the tab manager currently managing this tab.

Protected function Const

FMargin

 

GetTabPadding()

Public function Const

ETabRole

 

GetTabRole()

Is this an MajorTab? A tool panel tab?

Public function Const

const FSlate...

 

GetTabWellBrush()

Depending on the tabs we put into the tab well, we want a different background brush.

Public function Const

ETabRole

 

GetVisualTabRole()

Similar to GetTabRole() but returns the correct role for UI style and user input purposes

Protected function Const

EVisibility

 

HandleIsCloseButtonVisible()

Public function Const

bool

 

HasSiblingTab

(
    const FTabId& SiblingTabId,
    const bool TreatIndexNoneAsWildcard
)

Check to see whether this tab has a sibling tab with the given tab ID

Public function Const

bool

 

IsActive()

Public function Const

bool

 

IsForeground()

Protected function

FReply

 

OnCloseButtonClicked()

Called when the close button is clicked on the tab.

Public function

void

 

PersistVisualState()

A chance for the tab's content to save any internal layout info

Public function

void

 

PlaySpawnAnim()

Play an animation showing this tab as opening

Public function

void

 

ProvideDefaultIcon

(
    const FSlateBrush* InDefaultIc...
)

Provide a default tab icon in case the spawner did not set one.

Public function

void

 

ProvideDefaultLabel

(
    const FText& InDefaultLabel
)

Provide a default tab label in case the spawner did not set one.

Public function

void

 

RemoveTabFromParent()

Pulls this tab out of it's parent tab stack and destroys it Note: This does not check if its safe to remove the tab.

Public function

bool

 

RequestCloseTab()

Requests that the tab be closed. Tabs may prevent closing depending on their state

Public function

void

 

SetBackgroundContent

(
    TSharedRef< SWidget > InContent
)

Content that appears in the TabWell behind the tabs

Public function

void

 

SetCanCloseTab

(
    const FCanCloseTab& InOnTabClosing
)

Set the handler to be invoked when the user requests that this tab be closed.

Public function

void

 

SetDraggedOverDockArea

(
    const TSharedPtr< SDockingArea >& ...
)

Used by the drag/drop operation to signal to this tab what it is dragging over.

Public function

void

 

SetLabel

(
    const TAttribute< FText >& InTabLa...
)

The label that appears on the tab.

Protected function

void

 

SetLayoutIdentifier

(
    const FTabId& TabId
)

Specify the TabId that was used to spawn this tab.

Public function

void

 

SetLeftContent

(
    TSharedRef< SWidget > InContent
)

Content that appears in the TabWell to the left of the tabs

Public function

void

 

SetOnPersistVisualState

(
    const FOnPersistVisualState& Handl...
)

Set the custom code to execute for saving visual state in this tab.

Public function

void

 

SetOnTabActivated

(
    const FOnTabActivatedCallback& InD...
)

Set the handler that will be invoked when the tab is activated

Public function

void

 

SetOnTabClosed

(
    const FOnTabClosedCallback& InDele...
)

Set the handler that will be invoked when the tab is closed

Public function

void

 

SetParent

(
    TSharedPtr< SDockingTabWell > Paren...
)

Sets the tab's tab well parent, or resets it if nothing is passed in

Public function

void

 

SetRightContent

(
    TSharedRef< SWidget > InContent
)

Content that appears in the TabWell to the right of the tabs

Public function

void

 

SetTabIcon

(
    const TAttribute< const FSlateBrush...
)

Sets the tab icon

Public function

void

 

SetTabLabelSuffix

(
    const TAttribute< FText >& InTabLa...
)

Set Label Suffix.

Public function

void

 

SetTabManager

(
    const TSharedPtr< FTabManager >& I...
)

Set the tab manager that is controlling this tab

Public function

void

 

SetTabToolTipWidget

(
    TSharedPtr< SToolTip > InTabToolTip...
)

The tooltip text that appears on the tab.

Public function Const

bool

 

ShouldAutosize()

Should this tab be sized based on its content.

Public function

void

 

UpdateActivationTime()

Updates the 'last activated' time to the current time

Overridden from SBorder

Name Description

Public function Virtual

void

 

SetContent

(
    TSharedRef< SWidget > InContent
)

Sets the content for this border

Overridden from SWidget

Name Description

Public function Virtual

FReply

 

OnDragDetected

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called when Slate detects that a widget started to be dragged.

Public function Virtual

void

 

OnDragEnter

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

DRAG AND DROP (DragDrop) Called during drag and drop when the drag enters a widget.

Public function Virtual

void

 

OnDragLeave

(
    const FDragDropEvent& DragDropEven...
)

Called during drag and drop when the drag leaves a widget.

Public function Virtual

FReply

 

OnDrop

(
    const FGeometry& MyGeometry,
    const FDragDropEvent& DragDropEven...
)

Called when the user is dropping something onto a widget; terminates drag and drop.

Public function Virtual

FReply

 

OnMouseButtonDoubleClick

(
    const FGeometry& InMyGeometry,
    const FPointerEvent& InMouseEvent
)

Called when a mouse button is double clicked. Override this in derived classes.

Public function Virtual

FReply

 

OnMouseButtonDown

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it.

Public function Virtual

FReply

 

OnMouseButtonUp

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

The system calls this method to notify the widget that a mouse button was release within it.

Public function Virtual

FReply

 

OnTouchEnded

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is ended (finger lifted)

Public function Virtual

FReply

 

OnTouchStarted

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is started (finger down)

Classes

Name

Description

Public struct

FArguments

Typedefs

Name

Description

FCanCloseTab

Delegate called before a tab is closed. Returning false will prevent the tab from closing

FOnPersistVisualState

Invoked when this tab should save some information about its content.

FOnTabActivatedCallback

Invoked when a tab is activated

FOnTabClosedCallback

Invoked when a tab is closing

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