|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
An icon: one glyph of the Material Symbols font, chosen by name, at a given size. More...
#include <headers/guillaume/components/glyph.hpp>


Public Types | |
| enum class | Style { Outlined , Rounded , Sharp } |
| Family of the Material Symbols font the icon belongs to. More... | |
Public Member Functions | |
| Glyph (void)=default | |
| Default constructor for the Glyph component. | |
| ~Glyph (void)=default | |
| Default destructor for the Glyph component. | |
| uint32_t | getCode (void) const |
| Get the stored code point. | |
| Glyph & | setCode (uint32_t code) |
| Store a code point for the glyph. | |
| const std::string & | getName (void) const |
| Get the name of the icon. | |
| Glyph & | setName (const std::string &name) |
| Choose the icon by name. | |
| const float & | getFontSize (void) const |
| Get the size of the icon. | |
| Glyph & | setFontSize (const float &fontSize) |
| Set the size of the icon. | |
| const Style & | getStyle (void) const |
| Get the font family of the icon. | |
| Glyph & | setStyle (const Style &style) |
| Set the font family of the icon. | |
| Public Member Functions inherited from guillaume::ecs::Component | |
| bool | hasChanged (void) const |
| Tell whether a value of the component changed since the flags were last reset (the end of the previous frame). | |
| void | setHasChanged (bool hasChanged) |
| Raise or lower the changed flag. | |
| Component (void)=default | |
| Create a component that is not marked as changed. | |
| virtual | ~Component (void)=default |
| Virtual destructor, so components can be destroyed through the base class. | |
An icon: one glyph of the Material Symbols font, chosen by name, at a given size.
entities::Icon writes it, and the widget systems resize the icons of their widgets. systems::MeasureGlyph (Measure phase) looks the name up in the font's code point table and writes the size of the glyph into the entity's components::Bound; systems::GlyphRender (Render phase) draws it at the entity's components::Transform in the entity's components::Color.
|
strong |
| uint32_t guillaume::components::Glyph::getCode | ( | void | ) | const |
| const float & guillaume::components::Glyph::getFontSize | ( | void | ) | const |
| const std::string & guillaume::components::Glyph::getName | ( | void | ) | const |
| const Glyph::Style & guillaume::components::Glyph::getStyle | ( | void | ) | const |
| Glyph & guillaume::components::Glyph::setCode | ( | uint32_t | code | ) |
Store a code point for the glyph.
The render systems resolve the glyph from its name, not from this value. Marks the component changed only when the value differs.
| code | The Unicode code point. |
Definition at line 32 of file glyph.cpp.

| Glyph & guillaume::components::Glyph::setFontSize | ( | const float & | fontSize | ) |
| Glyph & guillaume::components::Glyph::setName | ( | const std::string & | name | ) |
Choose the icon by name.
Marks the component changed only when the name differs.
| name | The Material Symbols name, such as "home" or "arrow_back". |
Definition at line 47 of file glyph.cpp.


Set the font family of the icon.
Marks the component changed only when the style differs.
| style | The style; see the class note on what the systems do with it. |
Definition at line 77 of file glyph.cpp.

