Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Docking
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SCompoundWidget
- SBorder
- SDockTab
- SLiveLinkCurveDebugUITab
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
| Type | Name | Description | |
|---|---|---|---|
| bool | bCanEverClose | Determines whether the close button for the tab is shown. | |
| bool | bShouldAutosize | Should this tab be auto-sized based on its content? | |
| TSharedRef< SWidget > | Content | The stuff to show when this tab is selected | |
| TAttribute< FMargin > | ContentAreaPadding | ||
| TSharedPtr< SDockingArea > | DraggedOverDockingArea | The dock area this tab is currently being dragged over. Used in nomad tabs to change style | |
| FCurveSequence | FlashTabCurve | Animation that causes the tab to flash | |
| const FDockTabStyle * | GenericTabStyle | ||
| TAttribute< FLinearColor > | IconColor | Color of this tab's icon | |
| TSharedPtr< SImage > | IconWidget | Widget used to show the icon on the tab | |
| TSharedPtr< STextBlock > | LabelSuffix | ||
| TSharedPtr< STextBlock > | LabelWidget | Widget used to show the label on the tab | |
| double | LastActivationTime | Time this tab was last activated | |
| FTabId | LayoutIdentifier | The tab's layout identifier | |
| const FDockTabStyle * | MajorTabStyle | The styles used to draw the tab in its various states | |
| TWeakPtr< FTabManager > | MyTabManager | The tab manager that created this tab. | |
| FCanCloseTab | OnCanCloseTab | Delegate to execute to determine if we can close this tab | |
| FExtendContextMenu | OnExtendContextMenu | ||
| FOnPersistVisualState | OnPersistVisualState | Invoked during the Save Visual State pass; gives this tab a chance to save misc info about visual state. | |
| FOnTabActivatedCallback | OnTabActivated | Callback to call when this tab is activated | |
| FOnTabClosedCallback | OnTabClosed | Callback to call when this tab is destroyed | |
| FSimpleDelegate | OnTabDraggedOverDockArea | ||
| FSimpleDelegate | OnTabDrawerClosedEvent | ||
| FSimpleDelegate | OnTabDrawerOpenedEvent | ||
| FSimpleDelegate | OnTabRelocated | ||
| FOnTabRenamed | OnTabRenamed | Invoked when the tab is renamed | |
| TWeakPtr< SDockingTabWell > | ParentPtr | The tab's parent tab well. Null if it is a floating tab. | |
| FCurveSequence | SpawnAnimCurve | Animation that shows the tab opening up | |
| TAttribute< FLinearColor > | TabColorScale | Color of this tab | |
| TAttribute< const FSlateBrush * > | TabIcon | The icon on the tab | |
| TAttribute< FText > | TabLabel | The label on the tab | |
| TAttribute< FText > | TabLabelSuffix | A second text field at the end of the Label that takes precedence and isn't lost when space is restricted | |
| ETabRole | TabRole | Is this an MajorTab? A tool panel tab? | |
| TSharedRef< SWidget > | TabWellContentLeft | ||
| TSharedRef< SWidget > | TabWellContentRight | ||
| TSharedRef< SWidget > | TitleBarContentRight |
Constructors
| Type | Name | Description | |
|---|---|---|---|
SDockTab () |
Protected constructor; Widgets may only be constructed via a FArguments (i.e.: SNew(SDockTab) ) |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ActivateInParent
(
ETabActivationCause InActivationCause |
Make this tab active in its tabwell | |
| bool | CanCloseTab () |
||
| void | Construct
(
const FArguments& InArgs |
Construct the widget from the declaration. | |
| void | Draws attention to the tab. | ||
| void | ExtendContextMenu
(
FMenuBuilder& MenuBuilder |
Add any entries specific to this tab to the tab context menu | |
| void | FlashTab () |
Flash the tab, used for drawing attention to it | |
| EVisibility | |||
| UE::Slate::FDeprecateVector2DResult | |||
| FText | The close button tooltip showing the appropriate close command shortcut | ||
| const FSlateBrush * | |||
| TSharedRef< SWidget > | GetContent () |
||
| const FSlateBrush * | What should the content area look like for this type of tab? Documents, Apps, and Tool Panels have different backgrounds. | ||
| FMargin | Padding around the content when it is presented by the SDockingTabStack | ||
| const FDockTabStyle & | |||
| TSharedPtr< class SDockingArea > | GetDockArea () |
Gets the dock area that this resides in | |
| FSlateColor | |||
| const FSlateBrush * | |||
| float | Get the desired color of tab. These change during flashing. | ||
| FSlateColor | GetIconColor () |
||
| const FSlateBrush * | |||
| double | Returns the time this tab was last activated | ||
| const FTabId | Gets this tab's layout identifier | ||
| TSharedRef< SWidget > | |||
| float | The width that this tab will overlap with side-by-side tabs. | ||
| TSharedPtr< SDockingTabWell > | GetParent () |
Gets the tab's tab well parent, or nothing, if it has none | |
| TSharedPtr< SDockingTabStack > | Gets the dock tab stack this dockable tab resides within, if any | ||
| TSharedPtr< SWindow > | Get the window in which this tab's tabmanager has placed it | ||
| TSharedRef< SWidget > | |||
| FSlateColor | GetTabColor () |
||
| const FSlateBrush * | GetTabIcon () |
Gets the tab icon | |
| FMargin | |||
| TOptional< FVector2D > | |||
| FText | GetTabLabel () |
The label on the tab | |
| FText | Get Label Suffix | ||
| TSharedPtr< FTabManager > | Get the tab manager currently managing this tab. | ||
| FMargin | |||
| ETabRole | GetTabRole () |
Is this an MajorTab? A tool panel tab? | |
| const FSlateBrush * | Depending on the tabs we put into the tab well, we want a different background brush. | ||
| TSharedRef< SWidget > | |||
| ETabRole | Similar to GetTabRole() but returns the correct role for UI style and user input purposes | ||
| EVisibility | |||
| bool | HasSiblingTab
(
const FTabId& SiblingTabId, |
Check to see whether this tab has a sibling tab with the given tab ID | |
| bool | IsActive () |
||
| bool | IsForeground () |
||
| FReply | Called when the close button is clicked on the tab. | ||
| void | A chance for the tab's content to save any internal layout info | ||
| void | Play an animation showing this tab as opening | ||
| void | ProvideDefaultIcon
(
const FSlateBrush* InDefaultIcon |
Provide a default tab icon. | |
| void | ProvideDefaultLabel
(
const FText& InDefaultLabel |
Provide a default tab label in case the spawner did not set one. | |
| void | 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. | ||
| bool | Requests that the tab be closed. Tabs may prevent closing depending on their state | ||
| void | SetCanCloseTab
(
const FCanCloseTab& InOnTabClosing |
Set the handler to be invoked when the user requests that this tab be closed. | |
| void | SetDraggedOverDockArea
(
const TSharedPtr< SDockingArea >& Area |
Used by the drag/drop operation to signal to this tab what it is dragging over. | |
| void | SetLabel
(
const TAttribute< FText >& InTabLabel |
The label that appears on the tab. | |
| void | SetLayoutIdentifier
(
const FTabId& TabId |
Specify the TabId that was used to spawn this tab. | |
| void | SetLeftContent
(
TSharedRef< SWidget > InContent |
Content that appears in the TabWell to the left of the tabs | |
| void | SetOnExtendContextMenu
(
const FExtendContextMenu& Handler |
Set the handler for extending the tab context menu | |
| void | SetOnPersistVisualState
(
const FOnPersistVisualState& Handler |
Set the custom code to execute for saving visual state in this tab. | |
| void | SetOnTabActivated
(
const FOnTabActivatedCallback& InDelegate |
Set the handler that will be invoked when the tab is activated | |
| void | SetOnTabClosed
(
const FOnTabClosedCallback& InDelegate |
Set the handler that will be invoked when the tab is closed | |
| void | SetOnTabDraggedOverDockArea
(
const FSimpleDelegate InDelegate |
Set the handler that will be invoked when the tab is dragged over dock area | |
| void | SetOnTabDrawerClosed
(
const FSimpleDelegate InDelegate |
Set the handler that will be invoked when the tab is closed from a drawer | |
| void | SetOnTabDrawerOpened
(
const FSimpleDelegate InDelegate |
Set the handler that will be invoked when the tab is opened from a drawer | |
| void | SetOnTabRelocated
(
const FSimpleDelegate InDelegate |
Set the handler that will be invoked when the tab is relocated to a new tab well | |
| void | SetOnTabRenamed
(
const FOnTabRenamed& InDelegate |
Set the handler that will be invoked when the tab is renamed | |
| void | SetParent
(
TSharedPtr< SDockingTabWell > Parent |
Sets the tab's tab well parent, or resets it if nothing is passed in | |
| void | SetParentDockTabStackTabWellHidden
(
bool bIsTabWellHidden |
||
| void | SetRightContent
(
TSharedRef< SWidget > InContent |
Content that appears in the TabWell to the right of the tabs | |
| void | SetShouldAutosize
(
const bool bNewShouldAutosize |
Set whether this tab should be sized based on its content. | |
| void | SetTabIcon
(
const TAttribute< const FSlateBrush* > InTabIcon |
Sets the tab icon | |
| void | SetTabLabelSuffix
(
const TAttribute< FText >& InTabLabelSuffix |
Set Label Suffix. | |
| void | SetTabManager
(
const TSharedPtr< FTabManager >& InTabManager |
Set the tab manager that is controlling this tab | |
| void | SetTabToolTipWidget
(
TSharedPtr< SToolTip > InTabToolTipWidget |
The tooltip text that appears on the tab. | |
| void | SetTitleBarRightContent
(
TSharedRef< SWidget > InContent |
Content that appears on the right side of the title bar in the window this stack is in | |
| bool | Should this tab be sized based on its content. | ||
| void | Updates the 'last activated' time to the current time |
Overridden from SBorder
| Type | Name | Description | |
|---|---|---|---|
| void | SetContent
(
TSharedRef< SWidget > InContent |
Sets the content for this border |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| FSlateColor | |||
| FReply | OnDragDetected
(
const FGeometry& MyGeometry, |
Called when Slate detects that a widget started to be dragged. | |
| void | OnDragEnter
(
const FGeometry& MyGeometry, |
DRAG AND DROP (DragDrop) Called during drag and drop when the drag enters a widget. | |
| void | OnDragLeave
(
const FDragDropEvent& DragDropEvent |
Called during drag and drop when the drag leaves a widget. | |
| FReply | OnDrop
(
const FGeometry& MyGeometry, |
Called when the user is dropping something onto a widget; terminates drag and drop. | |
| FReply | OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Called when a mouse button is double clicked. Override this in derived classes. | |
| FReply | OnMouseButtonDown
(
const FGeometry& MyGeometry, |
MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it. | |
| FReply | OnMouseButtonUp
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse button was release within it. | |
| FReply | OnTouchEnded
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is ended (finger lifted) | |
| FReply | OnTouchStarted
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is started (finger down) |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments |
Typedefs
| Name | Description |
|---|---|
| FCanCloseTab | Delegate called before a tab is closed. Returning false will prevent the tab from closing |
| FExtendContextMenu | Invoked to add entries to the tab context menu |
| FOnPersistVisualState | Invoked w`en this tab should save some information about its content. |
| FOnTabActivatedCallback | Invoked when a tab is activated |
| FOnTabClosedCallback | Invoked when a tab is closing |
| FOnTabRenamed | Invoked when a tab is renamed |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< FTabManager > | The tab manager is not guaranteed to exist, which will cause GetTabManager() to crash. Use GetTabManagerPtr() instead. |