class

CArcScrollAnimator

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

Properties

TypeNameDescription
static constexpr floatFLING_SECONDSDuration of a fling's deceleration. Default 0.6f.
static constexpr floatFLING_MIN_VELOCITYBelow this release speed a drag just stops. Default 120.0f.

Constructors

SignatureNameDescription
CArcScrollAnimator()CArcScrollAnimator

Public functions

ReturnsNameDescription
voidAnimateToRetargets toward target from wherever the content is drawn now (visibleOffset).
voidFlingA released drag carries on at velocity (content px per second) and decelerates to rest.
voidStop
boolResolveWrites the offset this frame should lay out at, clamped to the range the owner can scroll now (content may have shrunk mid-animation), and returns true; false (offset untouched) when idle.
floatGetTargetWhere the animation will land.
boolIsAnimating
voidSetSmoothScrollEnabledProcess-wide switch (the editor exposes it as a preference); off makes every wheel notch a jump, as before.
boolIsSmoothScrollEnabled

Function details

CArcScrollAnimator

C++
CArcScrollAnimator()

AnimateTo

C++
void AnimateTo(float visibleOffset, float target)

Retargets toward target from wherever the content is drawn now (visibleOffset). Consecutive notches accumulate on the target, so a fast spin travels the full distance instead of restarting short.

Fling

C++
void Fling(float visibleOffset, float velocity, float minOffset, float maxOffset)

A released drag carries on at velocity (content px per second) and decelerates to rest. The distance is chosen so the curve's starting speed equals the release speed: no kick, no stall.

Stop

C++
void Stop()

Resolve

C++
bool Resolve(float& inOutOffset, float minOffset, float maxOffset)

Writes the offset this frame should lay out at, clamped to the range the owner can scroll now (content may have shrunk mid-animation), and returns true; false (offset untouched) when idle. Called from the owner's arrange, once per frame.

GetTarget

C++
float GetTarget(float currentOffset) const

Where the animation will land. Callers stack wheel notches on this.

IsAnimating

C++
bool IsAnimating() const

SetSmoothScrollEnabled

C++
static void SetSmoothScrollEnabled(bool enabled)

Process-wide switch (the editor exposes it as a preference); off makes every wheel notch a jump, as before.

IsSmoothScrollEnabled

C++
static bool IsSmoothScrollEnabled()
Generated from Arc/Widgets/CArcScrollAnimator.h via arc.json · Nov 5, 2026Version 1.0.0