Navigation
API > API/Runtime > API/Runtime/UMG
A widget switcher is like a tab control, but without tabs. At most one widget is visible at time.
| Name | UWidgetSwitcher |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/WidgetSwitcher.h |
| Include Path | #include "Components/WidgetSwitcher.h" |
Syntax
UCLASS (MinimalAPI)
class UWidgetSwitcher : public UPanelWidget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UPanelWidget → UWidgetSwitcher
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UWidgetSwitcher
(
const FObjectInitializer& ObjectInitializer |
Components/WidgetSwitcher.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveWidgetIndex | int32 | The slot index to display | Components/WidgetSwitcher.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UWidget * GetActiveWidget() |
Get the reference of the currently active widget | Components/WidgetSwitcher.h |
|
int32 GetActiveWidgetIndex() |
Gets the slot index of the currently active widget | Components/WidgetSwitcher.h |
|
int32 GetNumWidgets() |
Gets the number of widgets that this switcher manages. | Components/WidgetSwitcher.h |
|
UWidget * GetWidgetAtIndex
(
int32 Index |
Get a widget at the provided index | Components/WidgetSwitcher.h |
|
virtual void SetActiveWidget
(
UWidget* Widget |
Activates the widget and makes it the active index. | Components/WidgetSwitcher.h |
|
virtual void SetActiveWidgetIndex
(
int32 Index |
Activates the widget at the specified index. | Components/WidgetSwitcher.h |
|
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const FText GetPaletteCategory() |
Gets the palette category of the widget | Components/WidgetSwitcher.h | |
virtual void OnDescendantDeselectedByDesigner
(
UWidget* DescendantWidget |
Components/WidgetSwitcher.h | ||
virtual void OnDescendantSelectedByDesigner
(
UWidget* DescendantWidget |
Components/WidgetSwitcher.h | ||
virtual void SynchronizeProperties () |
Applies all properties to the native widget if possible. | Components/WidgetSwitcher.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/WidgetSwitcher.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Components/WidgetSwitcher.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void SetActiveWidgetIndexForSlateWidget() |
Components/WidgetSwitcher.h |
Overridden from UPanelWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UClass * GetSlotClass() |
UPanelWidget. | Components/WidgetSwitcher.h | |
virtual void OnSlotAdded
(
UPanelSlot* Slot |
Components/WidgetSwitcher.h | ||
virtual void OnSlotRemoved
(
UPanelSlot* Slot |
Components/WidgetSwitcher.h |
Overridden from UWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< SWidget > RebuildWidget() |
Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. | Components/WidgetSwitcher.h |