class
CArcScrollBarBehavior
- Module
- Arc
- Header
#include "Arc/Widgets/CArcScrollBarBehavior.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
static constexpr float | MIN_THUMB_SIZE | A 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
| Returns | Name | Description |
|---|---|---|
void | SetTrack | Absolute track rect plus the sizes that set the thumb. |
bool | IsScrollable | |
bool | IsEngaged | True while the user is driving the bar — the owner must keep pointer capture and must not treat moves as anything else. |
bool | IsHighlighted | True when the thumb should paint in its hovered/pressed colour. |
const ArcRect& | GetTrackRect | |
ArcRect | GetThumbRect | |
float | GetMaxScrollOffset | |
float | GetScrollOffset | |
void | SetScrollOffset | |
bool | OnPressed | True when the bar took the press. |
bool | OnMoved | True when the bar consumed the move (a drag, or a held track press). |
void | OnReleased | |
EArcCursorType | GetCursorAt | The grab cursor over the thumb and while it is dragged, Default elsewhere — for the owner's OnCursorQuery. |
void | Advance | Runs 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() constIsEngaged
C++
bool IsEngaged() constTrue 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() constTrue when the thumb should paint in its hovered/pressed colour.
GetTrackRect
C++
const ArcRect& GetTrackRect() constGetThumbRect
C++
ArcRect GetThumbRect() constGetMaxScrollOffset
C++
float GetMaxScrollOffset() constGetScrollOffset
C++
float GetScrollOffset() constSetScrollOffset
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) constThe 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