class

AScrollBox

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

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGSoutgrows it.
WidgetArgsType&ScrollBarVisibility
ARC_WIDGET_ARGS_END
voidAddChild
voidClearChildren
voidScrollTo
voidScrollToEnd
floatGetScrollOffset
floatGetMaxScrollOffset
floatGetTargetScrollOffsetWhere an in-flight wheel glide or fling will land; the offset itself when nothing is animating.
boolIsScrollAnimating
ArcVec2ComputeDesiredSize
voidArrangeChildren
boolCanSkipArrangeRefused: the body clamps the scroll offset against a content size that moves as children resize, and republishes the scrollbar's thumb fraction.
boolCanRetainPaintRefused: it pushes its own viewport clip, which a slice cannot carry — every command under it would replay through a scissor fixed at the place the recording happened.
int32_tOnPaint
CReplyOnMouseWheel
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
CReplyOnMouseMove
int32_tGetNumChildren
TSharedPtr<AWidget>GetChildAt
boolCanCacheDesiredSizeIt reports no desired size at all — it takes what it is given and scrolls whatever does not fit.
boolDesiredSizeDependsOnChildrenThe scrolled content is measured by the arrange body, which is where its size is actually consumed.
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AScrollBox) ARC_ARG(EOrientation, Orientation) ARC_ARG(bool, FillViewport) EScrollBarVisibility _ScrollBarVisibility = EScrollBarVisibility::AutoHide

outgrows it. Without it a centred child is laid out at the top.

ScrollBarVisibility

C++
WidgetArgsType& ScrollBarVisibility(EScrollBarVisibility value)

ARC_WIDGET_ARGS_END

C++
ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

AddChild

C++
void AddChild(TSharedPtr<AWidget> child)

ClearChildren

C++
void ClearChildren()

ScrollTo

C++
void ScrollTo(float offset)

ScrollToEnd

C++
void ScrollToEnd()

GetScrollOffset

C++
float GetScrollOffset() const

GetMaxScrollOffset

C++
float GetMaxScrollOffset() const

GetTargetScrollOffset

C++
float GetTargetScrollOffset() const

Where an in-flight wheel glide or fling will land; the offset itself when nothing is animating.

IsScrollAnimating

C++
bool IsScrollAnimating() const

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

C++
void ArrangeChildren(const CGeometry& allottedGeo) override

CanSkipArrange

C++
bool CanSkipArrange() const override

Refused: the body clamps the scroll offset against a content size that moves as children resize, and republishes the scrollbar's thumb fraction. Skipping it strands the thumb and lets the offset sit past the end of shrunken content.

CanRetainPaint

C++
bool CanRetainPaint() const override

Refused: it pushes its own viewport clip, which a slice cannot carry — every command under it would replay through a scissor fixed at the place the recording happened.

OnPaint

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

OnMouseWheel

C++
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) 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

GetNumChildren

C++
int32_t GetNumChildren() const override

GetChildAt

C++
TSharedPtr<AWidget> GetChildAt(int32_t index) const override

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

It reports no desired size at all — it takes what it is given and scrolls whatever does not fit. The measure's only other job is capturing the layout scale, which the cache re-runs whenever the scale moves.

DesiredSizeDependsOnChildren

C++
bool DesiredSizeDependsOnChildren() const override

The scrolled content is measured by the arrange body, which is where its size is actually consumed. Reading it here as well made the measure pass walk the whole panel to learn nothing.

GetTypeName

C++
const char* GetTypeName() const override
Generated from Arc/Widgets/AScrollBox.h via arc.json · Nov 5, 2026Version 1.0.0