SWidgetSwitcher

Implements a widget switcher.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Layout/SWidgetSwitcher.h

Include

#include "Widgets/Layout/SWidgetSwitcher.h"

Syntax

class SWidgetSwitcher : public SPanel

Remarks

Implements a widget switcher.

A widget switcher is like a tab control, but without tabs. At most one widget is visible at time.

Constructors

Name Description

Public function

SWidgetSwitcher()

Functions

Name Description

Public function

FSlot &

 

AddSlot

(
    int32 SlotIndex
)

Adds a slot to the widget switcher at the specified location.

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Constructs the widget.

Protected function Const

const FSlot ...

 

GetActiveSlot()

Public function Const

TSharedPtr< ...

 

GetActiveWidget()

Gets the active widget.

Public function Const

int32

 

GetActiveWidgetIndex()

Gets the slot index of the currently active widget.

Public function Const

int32

 

GetNumWidgets()

Gets the number of widgets that this switcher manages.

Protected function

TPanelChildr...

 

GetTypedChildren()

Public function Const

TSharedPtr< ...

 

GetWidget

(
    int32 SlotIndex
)

Gets the widget in the specified slot.

Public function Const

int32

 

GetWidgetIndex

(
    TSharedRef< SWidget > Widget
)

Gets the slot index of the specified widget.

Public function

int32

 

RemoveSlot

(
    TSharedRef< SWidget > WidgetToRemov...
)

Removes a slot with the corresponding widget in it.

Public function

void

 

SetActiveWidget

(
    TSharedRef< SWidget > Widget
)

Sets the active widget.

Public function

void

 

SetActiveWidgetIndex

(
    int32 Index
)

Activates the widget at the specified index.

Public function Static

FSlot &

 

Slot()

Creates a new widget slot.

Overridden from SWidget

Name Description

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float
)

A Panel's desired size in the space required to arrange of its children on the screen while respecting all of the children's desired sizes and any layout-related options specified by the user.

Protected function Virtual Const

bool

 

ComputeVolatility()

Recomputes the volatility of the widget.

Protected function Virtual

FChildren &#...

 

GetChildren()

All widgets must provide a way to access their children in a layout-agnostic way.

Protected function Virtual Const

void

 

OnArrangeChildren

(
    const FGeometry& AllottedGeometry,
    FArrangedChildren& ArrangedChildre...
)

Panels arrange their children in a space described by the AllottedGeometry parameter.

Public function Virtual

bool

 

ValidatePathToChild

(
    SWidget* InChild
)

Classes

Name

Description

Public struct

FArguments

Public class

FSlot

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