class

MProgressBar

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

Public functions

ReturnsNameDescription
MIRI_WIDGET_ARGS4 px, or 2 px for the thin (splash) bar.
voidConstruct
MiriVec2ComputeDesiredSize
int32_tOnPaint
voidSetPercentPercent is painted, never measured — the bar is a fixed frame — so a new value must drop the slice without throwing away a measure that is still correct.
voidSetFillColor
MiriColorGetFillColor
voidSetBarState
EProgressBarStateGetBarState
floatGetPercent
boolCanCacheDesiredSizeA fixed bar; progress fills it rather than resizing it.
boolCanRetainPaintThe usual case is a bound percent driven off a task's progress: a getter that returns something new every frame with no write for any invalidation to observe.
const char*GetTypeName

Function details

MIRI_WIDGET_ARGS

C++
MIRI_WIDGET_ARGS(MProgressBar) MIRI_ATTR(float, Percent) MIRI_ATTR(MiriColor, FillColor) MIRI_ATTR(MiriColor, BackgroundColor) MIRI_ATTR(float, CornerRadius) MIRI_ARG(bool, Thin) MIRI_WIDGET_ARGS_END() float GetBarHeight() const

4 px, or 2 px for the thin (splash) bar.

Construct

C++
void Construct(const CArguments& args)

ComputeDesiredSize

C++
MiriVec2 ComputeDesiredSize(float scale) const override

OnPaint

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

SetPercent

C++
void SetPercent(float pct)

Percent is painted, never measured — the bar is a fixed frame — so a new value must drop the slice without throwing away a measure that is still correct.

SetFillColor

C++
void SetFillColor(const MiriColor& color)

GetFillColor

C++
MiriColor GetFillColor() const

SetBarState

C++
void SetBarState(EProgressBarState state)

GetBarState

C++
EProgressBarState GetBarState() const

GetPercent

C++
float GetPercent() const

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

A fixed bar; progress fills it rather than resizing it.

CanRetainPaint

C++
bool CanRetainPaint() const override

The usual case is a bound percent driven off a task's progress: a getter that returns something new every frame with no write for any invalidation to observe.

GetTypeName

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