class

CArcScrollBarBehavior

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

Properties

TypeNameDescription
static constexpr floatMIN_THUMB_SIZEA thumb shorter than this cannot be grabbed, so its length is clamped and its travel derived from the clamped value. Default 24.0f.

Public functions

ReturnsNameDescription
voidSetTrackAbsolute track rect plus the sizes that set the thumb.
boolIsScrollable
boolIsEngagedTrue while the user is driving the bar — the owner must keep pointer capture and must not treat moves as anything else.
boolIsHighlightedTrue when the thumb should paint in its hovered/pressed colour.
const ArcRect&GetTrackRect
ArcRectGetThumbRect
floatGetMaxScrollOffset
floatGetScrollOffset
voidSetScrollOffset
boolOnPressedTrue when the bar took the press.
boolOnMovedTrue when the bar consumed the move (a drag, or a held track press).
voidOnReleased
EArcCursorTypeGetCursorAtThe grab cursor over the thumb and while it is dragged, Default elsewhere — for the owner's OnCursorQuery.
voidAdvanceRuns the hold-to-repeat page timer; feed it the frame delta.

Function details

SetTrack

C++
void SetTrack(const ArcRect& trackRect, float viewportSize, float contentSize)

Absolute track rect plus the sizes that set the thumb. Widen the rect past the painted bar: it is the band that answers the mouse, and a 4 px thumb is not something anyone can hit.

IsScrollable

C++
bool IsScrollable() const

IsEngaged

C++
bool IsEngaged() const

True while the user is driving the bar — the owner must keep pointer capture and must not treat moves as anything else.

IsHighlighted

C++
bool IsHighlighted() const

True when the thumb should paint in its hovered/pressed colour.

GetTrackRect

C++
const ArcRect& GetTrackRect() const

GetThumbRect

C++
ArcRect GetThumbRect() const

GetMaxScrollOffset

C++
float GetMaxScrollOffset() const

GetScrollOffset

C++
float GetScrollOffset() const

SetScrollOffset

C++
void SetScrollOffset(float offset)

OnPressed

C++
bool OnPressed(const ArcVec2& pointer)

True when the bar took the press. The owner must not also treat the point as a click on the row underneath.

OnMoved

C++
bool OnMoved(const ArcVec2& pointer)

True when the bar consumed the move (a drag, or a held track press).

OnReleased

C++
void OnReleased()

GetCursorAt

C++
EArcCursorType GetCursorAt(const ArcVec2& pointer) const

The grab cursor over the thumb and while it is dragged, Default elsewhere — for the owner's OnCursorQuery.

Advance

C++
void Advance(float deltaSeconds)

Runs the hold-to-repeat page timer; feed it the frame delta.

Generated from Arc/Widgets/CArcScrollBarBehavior.h via arc.json · Nov 5, 2026Version 1.0.0