class

ASlider

Module
Arc
Header
#include "Arc/Widgets/ASlider.h"
Namespace
Arcf

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
CReplyOnMouseMove
CReplyOnKeyDownArrows step a hundredth of the range, PageUp/PageDown a tenth, Home/End jump to the ends.
voidOnMouseCaptureLost
voidOnMouseEnter
EArcCursorTypeOnCursorQuery
ArcRectGetTrackRectslider.json's track: a thumb's travel stays inside it, so the thumb at 0 and at 1 sits flush with the track's ends.
ArcRectGetThumbRect
EFocusVisualGetFocusVisualThe ring goes round the thumb, not the slot the slider is stretched across: the paint draws it there, concentric with the thumb.
boolPaintsOwnFocus
voidSetValue
floatGetValue
boolCanCacheDesiredSizeA fixed track; the handle position is a paint-time concern.
boolCanRetainPaintA leaf whose whole picture is the value, the drag tint and four colours.
const char*GetTypeName
EAccessibleRoleGetAccessibleRole
std::stringGetAccessibleValue
boolIsFocusable

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(ASlider) ARC_ATTR(float, Value) ARC_ARG(float, MinValue) ARC_ARG(float, MaxValue) ARC_EVENT(COnFloatChanged, OnValueChanged) ARC_ATTR(ArcColor, TrackColor) ARC_ATTR(ArcColor, FillColor) ARC_ATTR(ArcColor, ThumbColor) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonUp

C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) override

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

Arrows step a hundredth of the range, PageUp/PageDown a tenth, Home/End jump to the ends. A key at the limit it would push past is declined so the panel around the slider can use it.

OnMouseCaptureLost

C++
void OnMouseCaptureLost() override

OnMouseEnter

C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) override

OnCursorQuery

C++
EArcCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const override

GetTrackRect

C++
ArcRect GetTrackRect(const CGeometry& geo) const

slider.json's track: a thumb's travel stays inside it, so the thumb at 0 and at 1 sits flush with the track's ends.

GetThumbRect

C++
ArcRect GetThumbRect(const CGeometry& geo) const

GetFocusVisual

C++
EFocusVisual GetFocusVisual() const override

The ring goes round the thumb, not the slot the slider is stretched across: the paint draws it there, concentric with the thumb.

PaintsOwnFocus

C++
bool PaintsOwnFocus() const override

SetValue

C++
void SetValue(float value)

GetValue

C++
float GetValue() const

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

A fixed track; the handle position is a paint-time concern.

CanRetainPaint

C++
bool CanRetainPaint() const override

A leaf whose whole picture is the value, the drag tint and four colours. The value and the drag flag both announce themselves; a bound attribute can hand back a new one with no write to see, which is the only case that has to refuse.

GetTypeName

C++
const char* GetTypeName() const override

GetAccessibleRole

C++
EAccessibleRole GetAccessibleRole() const override

GetAccessibleValue

C++
std::string GetAccessibleValue() const override

IsFocusable

C++
bool IsFocusable() const override
Generated from Arc/Widgets/ASlider.h via arc.json · Nov 5, 2026Version 1.0.0