class

ATreemap

Module
Arc
Header
#include "Arc/Widgets/ATreemap.h"
Namespace
Arcf

Properties

TypeNameDescription
std::function<void(int32_t)>OnActivate
std::function<void(int32_t, const ArcVec2&)>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
ARC_WIDGET_ARGS
std::vector<FArcTreemapRect>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<FArcTreemapCell>&GetCells
voidResetView
voidSetSelectedCell
int32_tGetSelectedCell
int32_tGetHoveredCell
voidSetHoveredCellPins a cell's hover for display (the gallery's state rows).
ArcRectCellRectA cell's rect on screen under the current view, inside rect.
int32_tHitCellThe leaf cell under a screen point, or -1.
ArcVec2ComputeDesiredSize
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

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(ATreemap) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

Squarify

C++
static std::vector<FArcTreemapRect> 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 ArcRect& cell)

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

SetCells

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

GetCells

C++
const std::vector<FArcTreemapCell>& 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++
ArcRect CellRect(const ArcRect& rect, size_t index) const

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

HitCell

C++
int32_t HitCell(const ArcRect& rect, const ArcVec2& screen) const

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

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& 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 Arc/Widgets/ATreemap.h via arc.json · Nov 5, 2026Version 1.0.0