UWidgetSwitcher

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

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/WidgetSwitcher.h

Include

#include "Components/WidgetSwitcher.h"

Syntax

class UWidgetSwitcher : public UPanelWidget

Remarks

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

Variables

Name Description

Public variable

int32

 

ActiveWidgetIndex

The slot index to display

Protected variable

TSharedPtr< cla...

 

MyWidgetSwitcher

Constructors

Name Description

Public function

UWidgetSwitcher

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

UWidget *...

 

GetActiveWidget()

Get the reference of the currently 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.

Public function Const

UWidget *...

 

GetWidgetAtIndex

(
    int32 Index
)

Get a widget at the provided index

Public function Virtual

void

 

SetActiveWidget

(
    UWidget* Widget
)

Activates the widget and makes it the active index.

Public function Virtual

void

 

SetActiveWidgetIndex

(
    int32 Index
)

Activates the widget at the specified index.

Overridden from UPanelWidget

Name Description

Protected function Virtual Const

UClass *

 

GetSlotClass()

UPanelWidget.

Protected function Virtual

void

 

OnSlotAdded

(
    UPanelSlot* Slot
)

Protected function Virtual

void

 

OnSlotRemoved

(
    UPanelSlot* Slot
)

Overridden from UWidget

Name Description

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Public function Virtual

void

 

OnDescendantDeselectedByDesigner

(
    UWidget* DescendantWidget
)

Public function Virtual

void

 

OnDescendantSelectedByDesigner

(
    UWidget* DescendantWidget
)

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

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