Navigation
API > API/Runtime > API/Runtime/Slate
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.
Note: It is currently not possible to add segments after initialization (i.e. there is no AddSlot).
| Name | SSegmentedControl |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SSegmentedControl.h |
| Include Path | #include "Widgets/Input/SSegmentedControl.h" |
Syntax
template<typename OptionType>
class SSegmentedControl : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SSegmentedControl
- FSlateControlledConstruction → SWidget → SCompoundWidget → SSegmentedControl
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SSegmentedControl() |
Widgets/Input/SSegmentedControl.h |
Structs
| Name | Remarks |
|---|---|
| FArguments | |
| FSlot | Stores the per-child info for this panel type |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnValueChanged | TBaseDelegate_OneParam< void, OptionType > | Widgets/Input/SSegmentedControl.h | |
| FOnValueChecked | TBaseDelegate_TwoParams< void, OptionType, ECheckBoxState > | Widgets/Input/SSegmentedControl.h | |
| FOnValuesChanged | TBaseDelegate_OneParam< void, TArray< OptionType > > | Widgets/Input/SSegmentedControl.h | |
| FScopedWidgetSlotArguments | typename TPanelChildren< FSlot >::FScopedWidgetSlotArguments | Slot Management. | Widgets/Input/SSegmentedControl.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Children | TPanelChildren< FSlot > | Widgets/Input/SSegmentedControl.h | ||
| CurrentValues | TSlateAttribute< TArray< OptionType >, EInvalidateWidgetReason::Paint > | Widgets/Input/SSegmentedControl.h | ||
| CurrentValuesIsBound | bool | Widgets/Input/SSegmentedControl.h | ||
| MaxSegmentsPerLine | int32 | Widgets/Input/SSegmentedControl.h | ||
| OnValueChanged | FOnValueChanged | Widgets/Input/SSegmentedControl.h | ||
| OnValueChecked | FOnValueChecked | Widgets/Input/SSegmentedControl.h | ||
| OnValuesChanged | FOnValuesChanged | Widgets/Input/SSegmentedControl.h | ||
| Style | const FSegmentedControlStyle * | Widgets/Input/SSegmentedControl.h | ||
| SupportsEmptySelection | bool | Widgets/Input/SSegmentedControl.h | ||
| SupportsMultiSelection | bool | Widgets/Input/SSegmentedControl.h | ||
| TextStyle | const FTextBlockStyle * | Widgets/Input/SSegmentedControl.h | ||
| UniformPadding | TAttribute< FMargin > | Widgets/Input/SSegmentedControl.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScopedWidgetSlotArguments AddSlot
(
const OptionType& InValue, |
Widgets/Input/SSegmentedControl.h | ||
void Construct
(
const FArguments& InArgs |
Widgets/Input/SSegmentedControl.h | ||
OptionType GetValue() |
Widgets/Input/SSegmentedControl.h | ||
TArray< OptionType > GetValues() |
Widgets/Input/SSegmentedControl.h | ||
bool HasValue
(
OptionType InValue |
Widgets/Input/SSegmentedControl.h | ||
int32 NumSlots() |
Widgets/Input/SSegmentedControl.h | ||
void RebuildChildren() |
Widgets/Input/SSegmentedControl.h | ||
void SetValue
(
TAttribute< OptionType > InValue, |
See the Value attribute | Widgets/Input/SSegmentedControl.h | |
void SetValues
(
TAttribute< TArray< OptionType > > InValues, |
See the Values attribute | Widgets/Input/SSegmentedControl.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedPtr< SSegmentedControl< OptionType > > Create
(
const TArray< OptionType >& InKeys, |
Widgets/Input/SSegmentedControl.h | ||
static FSlot::FSlotArguments Slot
(
const OptionType& InValue |
Widgets/Input/SSegmentedControl.h |