class

MTreemap

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

Properties

TypeNameDescription
std::function<void(int32_t)>OnActivate
std::function<void(int32_t, const MiriVec2&)>OnContext
std::function<void()>OnNavigateUp
std::function<void(int32_t)>OnSelectionChanged
boolActivateOnClickA single click (press and release on one cell, no drag) activates the cell, not only a double click: a map that drills in on click. Default false.

Public functions

ReturnsNameDescription
MIRI_WIDGET_ARGS
std::vector<FMiriTreemapRect>SquarifySquarified treemap (Bruls, Huizing, van Wijk) of values laid into (x, y, w, h).
floatWorstAspectThe worst aspect ratio of a candidate row, the quantity squarify minimises.
boolShowsLabelWhether a cell this size carries its labels (the spec's 80 x 32).
voidSetCells
const std::vector<FMiriTreemapCell>&GetCells
voidResetView
voidSetSelectedCell
int32_tGetSelectedCell
int32_tGetHoveredCell
voidSetHoveredCellPins a cell's hover for display (the gallery's state rows).
MiriRectCellRectA cell's rect on screen under the current view, inside rect.
int32_tHitCellThe leaf cell under a screen point, or -1.
MiriVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseWheel
CReplyOnMouseButtonDown
CReplyOnMouseMove
CReplyOnMouseButtonUp
CReplyOnKeyDown
voidOnMouseCaptureLost
voidOnMouseEnter
voidOnMouseLeave
boolIsFocusable
EFocusVisualGetFocusVisual
boolPaintsOwnFocusThe ring goes round the keyboard's cell, not the whole map.
const char*GetTypeName

Function details

MIRI_WIDGET_ARGS

C++
MIRI_WIDGET_ARGS(MTreemap) MIRI_WIDGET_ARGS_END() void Construct(const CArguments& args)

Squarify

C++
static std::vector<FMiriTreemapRect> Squarify(const std::vector<uint64_t>& values, float x, float y, float w, float h)

Squarified treemap (Bruls, Huizing, van Wijk) of values laid into (x, y, w, h). A zero value still gets a sliver: an entry whose size is unknown has to stay visible.

WorstAspect

C++
static float WorstAspect(const std::vector<double>& rowAreas, double side)

The worst aspect ratio of a candidate row, the quantity squarify minimises.

ShowsLabel

C++
static bool ShowsLabel(const MiriRect& cell)

Whether a cell this size carries its labels (the spec's 80 x 32).

SetCells

C++
void SetCells(std::vector<FMiriTreemapCell> cells)

GetCells

C++
const std::vector<FMiriTreemapCell>& GetCells() const

ResetView

C++
void ResetView()

SetSelectedCell

C++
void SetSelectedCell(int32_t index)

GetSelectedCell

C++
int32_t GetSelectedCell() const

GetHoveredCell

C++
int32_t GetHoveredCell() const

SetHoveredCell

C++
void SetHoveredCell(int32_t index)

Pins a cell's hover for display (the gallery's state rows).

CellRect

C++
MiriRect CellRect(const MiriRect& rect, size_t index) const

A cell's rect on screen under the current view, inside rect.

HitCell

C++
int32_t HitCell(const MiriRect& rect, const MiriVec2& screen) const

The leaf cell under a screen point, or -1.

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

OnMouseWheel

C++
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonUp

C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

OnMouseCaptureLost

C++
void OnMouseCaptureLost() override

OnMouseEnter

C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) override

OnMouseLeave

C++
void OnMouseLeave(const CPointerEvent& event) override

IsFocusable

C++
bool IsFocusable() const override

GetFocusVisual

C++
EFocusVisual GetFocusVisual() const override

PaintsOwnFocus

C++
bool PaintsOwnFocus() const override

The ring goes round the keyboard's cell, not the whole map.

GetTypeName

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