class

AScaleBox

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

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
voidSetStretch
voidSetStretchDirection
voidSetUserScale
ArcVec2GetAppliedScaleThe X and Y factors the last arrange applied.
ArcVec2ComputeScalePure: the factors a stretch mode gives content of content size in a box of available size.
ArcVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
boolCanCacheDesiredSize
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AScaleBox) ARC_ARG(EScaleBoxStretch, Stretch) ARC_ARG(EScaleBoxDirection, StretchDirection) ARC_ARG(float, UserScale) ARC_CONTENT(AScaleBox, Content) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

SetStretch

C++
void SetStretch(EScaleBoxStretch stretch)

SetStretchDirection

C++
void SetStretchDirection(EScaleBoxDirection direction)

SetUserScale

C++
void SetUserScale(float scale)

GetAppliedScale

C++
ArcVec2 GetAppliedScale() const

The X and Y factors the last arrange applied.

ComputeScale

C++
static ArcVec2 ComputeScale(EScaleBoxStretch stretch, EScaleBoxDirection direction, float userScale, const ArcVec2& content, const ArcVec2& available)

Pure: the factors a stretch mode gives content of content size in a box of available size.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

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

OnPaint

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

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

GetTypeName

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