class

MScaleBox

Module
Miri
Header
#include "Miri/Widgets/MScaleBox.h"
Namespace
Miri

Public functions

ReturnsNameDescription
MIRI_WIDGET_ARGS
voidSetStretch
voidSetStretchDirection
voidSetUserScale
MiriVec2GetAppliedScaleThe X and Y factors the last arrange applied.
MiriVec2ComputeScalePure: the factors a stretch mode gives content of content size in a box of available size.
MiriVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
boolCanCacheDesiredSize
const char*GetTypeName

Function details

MIRI_WIDGET_ARGS

C++
MIRI_WIDGET_ARGS(MScaleBox) MIRI_ARG(EScaleBoxStretch, Stretch) MIRI_ARG(EScaleBoxDirection, StretchDirection) MIRI_ARG(float, UserScale) MIRI_CONTENT(MScaleBox, Content) MIRI_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++
MiriVec2 GetAppliedScale() const

The X and Y factors the last arrange applied.

ComputeScale

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

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

ComputeDesiredSize

C++
MiriVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

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

OnPaint

C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const override

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

GetTypeName

C++
const char* GetTypeName() const override
Generated from Miri/Widgets/MScaleBox.h via miri.json · Dec 5, 2026Version 1.1.0