class

MBudgetMeter

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

Public functions

ReturnsNameDescription
MIRI_WIDGET_ARGS
voidSetValue
floatGetRatio
const MiriColor*FillTokenThe fill token for a value / budget ratio.
std::stringCaption"182 MB of 256 MB · 71 %".
floatPaintThe meter at rect (bar on top, caption under it) for hosts that paint their own card; returns the height it used.
MiriVec2ComputeDesiredSize
int32_tOnPaint
const char*GetTypeName

Function details

MIRI_WIDGET_ARGS

C++
MIRI_WIDGET_ARGS(MBudgetMeter) MIRI_ARG(float, Value) MIRI_ARG(float, Budget) MIRI_ARG(std::string, Unit) MIRI_ARG(int32_t, Decimals) MIRI_WIDGET_ARGS_END() void Construct(const CArguments& args)

SetValue

C++
void SetValue(float value, float budget)

GetRatio

C++
float GetRatio() const

FillToken

C++
static const MiriColor* FillToken(float ratio)

The fill token for a value / budget ratio.

Caption

C++
static std::string Caption(float value, float budget, const std::string& unit, int32_t decimals)

"182 MB of 256 MB · 71 %".

Paint

C++
static float Paint(CMiriRenderer& renderer, const MiriRect& rect, float value, float budget, const std::string& unit, int32_t decimals, float opacity)

The meter at rect (bar on top, caption under it) for hosts that paint their own card; returns the height it used.

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

GetTypeName

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