SSegmentedControl

A Slate Segmented Control is functionally similar to a group of Radio Buttons.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Input/SSegmentedControl.h

Include

#include "Widgets/Input/SSegmentedControl.h"

Syntax

template<typename OptionType>
class SSegmentedControl : public SCompoundWidget

Remarks

A Slate Segmented Control is functionally similar to a group of Radio Buttons. Slots require a templated value to return when the segment is selected by the user. Users can specify text, icon or provide custom content to each Segment.

It is currently not possible to add segments after initialization (i.e. there is no AddSlot).

Constructors

Name Description

Public function

SSegmentedControl()

Functions

Name Description

Public function

FScopedWidge...

 

AddSlot

(
    const OptionType& InValue,
    bool bRebuildChildren
)

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Public function Static

TSharedPtr< ...

 

Create

(
    const TArray< OptionType >& InKeys,
    const TArray< FText >& InLabels,
    const TArray< FText >& InTooltips,
    const TAttribute< TArray< OptionTyp...,
    bool bSupportsMultiSelection,
    FOnValuesChanged OnValuesChanged
)

Public function Const

OptionType

 

GetValue()

Public function Const

TArray< Opti...

 

GetValues()

Public function

bool

 

HasValue

(
    OptionType InValue
)

Public function Const

int32

 

NumSlots()

Public function

void

 

RebuildChildren()

Public function

void

 

SetValue

(
    TAttribute< OptionType > InValue,
    bool bUpdateChildren
)

See the Value attribute

Public function

void

 

SetValues

(
    TAttribute< TArray< OptionType >> I...,
    bool bUpdateChildren
)

See the Values attribute

Public function Static

FSlot::FSlot...

 

Slot

(
    const OptionType& InValue
)

Classes

Name

Description

Public struct

FArguments

Public struct

FSlot

Stores the per-child info for this panel type

Typedefs