guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
guillaume::systems::MeasureGlyphCacheKey Struct Reference

Key of the size cache of MeasureGlyph: everything a measured icon size is looked up by. More...

#include <headers/guillaume/systems/measure_glyph.hpp>

Public Member Functions

bool operator== (const MeasureGlyphCacheKey &other) const
 Compare two keys field by field.
bool operator!= (const MeasureGlyphCacheKey &other) const
 Negation of operator==.
bool operator< (const MeasureGlyphCacheKey &other) const
 Order two keys by name, then font size, then style, then color.

Public Attributes

std::string glyphName
 Name of the icon, such as "home".
float fontSize
 Font size the icon was measured at.
components::Glyph::Style glyphStyle
 Style of the icon (outlined, rounded, sharp).
utility::graphic::Color32Bit color

Detailed Description

Key of the size cache of MeasureGlyph: everything a measured icon size is looked up by.

Two icons with equal keys share one measurement. The ordering operator exists so the key can be used in the ordered map of utility::Cache.

See also
MeasureGlyph

Definition at line 54 of file measure_glyph.hpp.

Member Function Documentation

◆ operator!=()

bool guillaume::systems::MeasureGlyphCacheKey::operator!= ( const MeasureGlyphCacheKey & other) const
inline

Negation of operator==.

Parameters
otherThe key to compare with.
Returns
True when at least one field differs.

Definition at line 90 of file measure_glyph.hpp.

◆ operator<()

bool guillaume::systems::MeasureGlyphCacheKey::operator< ( const MeasureGlyphCacheKey & other) const
inline

Order two keys by name, then font size, then style, then color.

Parameters
otherThe key to compare with.
Returns
True when this key sorts before other.

Definition at line 101 of file measure_glyph.hpp.

◆ operator==()

bool guillaume::systems::MeasureGlyphCacheKey::operator== ( const MeasureGlyphCacheKey & other) const
inline

Compare two keys field by field.

Parameters
otherThe key to compare with.
Returns
True when name, font size, style and color are all equal.

Definition at line 68 of file measure_glyph.hpp.

Member Data Documentation

◆ color

utility::graphic::Color32Bit guillaume::systems::MeasureGlyphCacheKey::color

Color of the icon. It does not change the size, but two colors give two cache entries

Definition at line 60 of file measure_glyph.hpp.

◆ fontSize

float guillaume::systems::MeasureGlyphCacheKey::fontSize

Font size the icon was measured at.

Definition at line 56 of file measure_glyph.hpp.

◆ glyphName

std::string guillaume::systems::MeasureGlyphCacheKey::glyphName

Name of the icon, such as "home".

Definition at line 55 of file measure_glyph.hpp.

◆ glyphStyle

components::Glyph::Style guillaume::systems::MeasureGlyphCacheKey::glyphStyle

Style of the icon (outlined, rounded, sharp).

Definition at line 58 of file measure_glyph.hpp.


The documentation for this struct was generated from the following file: