class
MScaleBox
- Module
- Miri
- Header
#include "Miri/Widgets/MScaleBox.h"- Namespace
Miri
Public functions
| Returns | Name | Description |
|---|---|---|
MIRI_WIDGET_ARGS | ||
void | SetStretch | |
void | SetStretchDirection | |
void | SetUserScale | |
MiriVec2 | GetAppliedScale | The X and Y factors the last arrange applied. |
MiriVec2 | ComputeScale | Pure: the factors a stretch mode gives content of content size in a box of available size. |
MiriVec2 | ComputeDesiredSize | |
void | ArrangeChildren | |
int32_t | OnPaint | |
bool | CanCacheDesiredSize | |
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() constThe 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 overrideArrangeChildren
C++
void ArrangeChildren(const CGeometry& geo) overrideOnPaint
C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const overrideCanCacheDesiredSize
C++
bool CanCacheDesiredSize() const overrideGetTypeName
C++
const char* GetTypeName() const overrideGenerated from Miri/Widgets/MScaleBox.h via miri.json · Dec 5, 2026Version 1.1.0