class
MProgressBar
- Module
- Miri
- Header
#include "Miri/Widgets/MProgressBar.h"- Namespace
Miri
Public functions
| Returns | Name | Description |
|---|---|---|
MIRI_WIDGET_ARGS | 4 px, or 2 px for the thin (splash) bar. | |
void | Construct | |
MiriVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
void | SetPercent | 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. |
void | SetFillColor | |
MiriColor | GetFillColor | |
void | SetBarState | |
EProgressBarState | GetBarState | |
float | GetPercent | |
bool | CanCacheDesiredSize | A fixed bar; progress fills it rather than resizing it. |
bool | CanRetainPaint | 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. |
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() const4 px, or 2 px for the thin (splash) bar.
Construct
C++
void Construct(const CArguments& args)ComputeDesiredSize
C++
MiriVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const overrideSetPercent
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() constSetBarState
C++
void SetBarState(EProgressBarState state)GetBarState
C++
EProgressBarState GetBarState() constGetPercent
C++
float GetPercent() constCanCacheDesiredSize
C++
bool CanCacheDesiredSize() const overrideA fixed bar; progress fills it rather than resizing it.
CanRetainPaint
C++
bool CanRetainPaint() const overrideThe 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 overrideGenerated from Miri/Widgets/MProgressBar.h via miri.json · Dec 5, 2026Version 1.1.0