class

MBorder

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

Public functions

ReturnsNameDescription
MIRI_WIDGET_ARGS
boolCanCacheDesiredSizeOne child inset by the padding — nothing else.
boolCanSkipArrange
boolCanRetainPaintA rect and an outline from four attributes.
boolPollAttributes
voidSetStateBrushesA brush for Normal (and Disabled) replaces the rect-and-outline the attributes describe.
voidSetBackgroundColor
boolSetMaterialParam
MiriVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
const char*GetTypeName

Function details

MIRI_WIDGET_ARGS

C++
MIRI_WIDGET_ARGS(MBorder) MIRI_ATTR(MiriColor, BackgroundColor) MIRI_ATTR(MiriColor, BorderColor) MIRI_ATTR(float, BorderThickness) MIRI_ATTR(float, CornerRadius) MIRI_ATTR(MiriMargin, Padding) MIRI_CONTENT(MBorder, Content) MIRI_WIDGET_ARGS_END() void Construct(const CArguments& args)

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

One child inset by the padding — nothing else. A bound padding can return a new margin with no write for Invalidate to see, so it disqualifies the measure cache and the arrange skip alike — unless the border is polled, in which case the poll is that write.

CanSkipArrange

C++
bool CanSkipArrange() const override

CanRetainPaint

C++
bool CanRetainPaint() const override

A rect and an outline from four attributes. A bound one of those is a colour that can change with nothing to invalidate on, so the same test that disqualifies the measure disqualifies the slice.

PollAttributes

C++
bool PollAttributes() override

SetStateBrushes

C++
void SetStateBrushes(const FMiriStateBrushes& brushes)

A brush for Normal (and Disabled) replaces the rect-and-outline the attributes describe.

SetBackgroundColor

C++
void SetBackgroundColor(const MiriColor& color)

SetMaterialParam

C++
bool SetMaterialParam(const std::string& name, const MiriVec4& value)

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

GetTypeName

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