class
ASegmentedControl
- Module
- Arc
- Header
#include "Arc/Widgets/ASegmentedControl.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
ArcDelegate<void(int32_t)> | OnSelectionChanged |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | Connected / Listening / Off. | |
void | SetItems | |
void | AddItem | |
const std::vector<FSegmentedItem>& | GetItems | |
int32_t | GetItemCount | |
void | SetSelectedIndex | |
int32_t | GetSelectedIndex | |
int32_t | GetHoveredIndex | |
bool | IsSegmentEnabled | |
ArcRect | GetSegmentRect | |
int32_t | SegmentAtPosition | |
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseButtonUp | |
CReply | OnMouseMove | |
CReply | OnKeyDown | |
void | OnMouseEnter | |
void | OnMouseLeave | |
bool | CanCacheDesiredSize | Segment widths, gaps and padding; the selection highlight rides inside them. |
const char* | GetTypeName | |
bool | IsFocusable | Arrows already move the selection; without this Tab never reached it. |
bool | OnActivate | Space / Enter step to the next segment, which is the toggle of a two-segment boolean; with nothing selected (a mixed value) the first. |
float | GetFocusRadius | |
void | SetAccent | |
bool | IsAccent |
Function details
ARC_WIDGET_ARGS
C++
ARC_WIDGET_ARGS(ASegmentedControl) ARC_ATTR(int32_t, SelectedIndex) ARC_ARG(float, HeightOverride) ARC_ARG(float, SegmentWidthOverride) ARC_ARG(bool, Stretch) ARC_ARG(float, RadiusOverride) ARC_ARG(float, IconSize) ARC_ARG(bool, Accent) ARC_ARG(bool, Page) ARC_ARG(bool, NormalTrackBorder) ARC_ARG(bool, Dense) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)Connected / Listening / Off.
SetItems
C++
void SetItems(std::vector<FSegmentedItem> items)AddItem
C++
void AddItem(FSegmentedItem item)GetItems
C++
const std::vector<FSegmentedItem>& GetItems() constGetItemCount
C++
int32_t GetItemCount() constSetSelectedIndex
C++
void SetSelectedIndex(int32_t index)GetSelectedIndex
C++
int32_t GetSelectedIndex() constGetHoveredIndex
C++
int32_t GetHoveredIndex() constIsSegmentEnabled
C++
bool IsSegmentEnabled(int32_t index) constGetSegmentRect
C++
ArcRect GetSegmentRect(const ArcRect& rect, int32_t index) constSegmentAtPosition
C++
int32_t SegmentAtPosition(const ArcRect& rect, const ArcVec2& position) constComputeDesiredSize
C++
ArcVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseMove
C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideOnKeyDown
C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) overrideOnMouseEnter
C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseLeave
C++
void OnMouseLeave(const CPointerEvent& event) overrideCanCacheDesiredSize
C++
bool CanCacheDesiredSize() const overrideSegment widths, gaps and padding; the selection highlight rides inside them.
GetTypeName
C++
const char* GetTypeName() const overrideIsFocusable
C++
bool IsFocusable() const overrideArrows already move the selection; without this Tab never reached it.
OnActivate
C++
bool OnActivate() overrideSpace / Enter step to the next segment, which is the toggle of a two-segment boolean; with nothing selected (a mixed value) the first.
GetFocusRadius
C++
float GetFocusRadius() const overrideSetAccent
C++
void SetAccent(bool accent)IsAccent
C++
bool IsAccent() constGenerated from Arc/Widgets/ASegmentedControl.h via arc.json · Nov 5, 2026Version 1.0.0