|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
The six elevation levels of a theme: one ElevationToken per ElevationLevel. More...
#include <headers/guillaume/theme/tokens.hpp>
Public Member Functions | |
| ElevationScale (void) | |
| Create the scale with the Material 3 baseline values. | |
| const ElevationToken & | get (ElevationLevel level) const |
| Get the shadow and tint of a level. | |
| void | set (ElevationLevel level, const ElevationToken &token) |
| Replace the shadow and tint of a level. | |
| utility::graphic::Color32Bit | tint (const utility::graphic::Color32Bit &surface, const utility::graphic::Color32Bit &tint, ElevationLevel level) const |
| Compute the color of a surface raised to a level: the tint color blended over the surface color at the level's tint opacity. | |
The six elevation levels of a theme: one ElevationToken per ElevationLevel.
The default values grow with the level, from no shadow and no tint at Level0 to a 12 dp shadow and a 14 % tint at Level5. The tint opacities are those of react-native-paper's Material 3 themes.
Read it through guillaume::getElevationToken and guillaume::getElevatedSurfaceColor.
Definition at line 169 of file tokens.hpp.
| guillaume::theme::ElevationScale::ElevationScale | ( | void | ) |
Create the scale with the Material 3 baseline values.
Definition at line 68 of file tokens.cpp.
| const ElevationToken & guillaume::theme::ElevationScale::get | ( | ElevationLevel | level | ) | const |
Get the shadow and tint of a level.
| level | The elevation level to look up. |
| std::out_of_range | When level is ElevationLevel::Count. |
Definition at line 80 of file tokens.cpp.


| void guillaume::theme::ElevationScale::set | ( | ElevationLevel | level, |
| const ElevationToken & | token ) |
Replace the shadow and tint of a level.
| level | The elevation level to change. |
| token | The new values. They are stored as given, without range check. |
| std::out_of_range | When level is ElevationLevel::Count. |
Definition at line 85 of file tokens.cpp.


| utility::graphic::Color32Bit guillaume::theme::ElevationScale::tint | ( | const utility::graphic::Color32Bit & | surface, |
| const utility::graphic::Color32Bit & | tint, | ||
| ElevationLevel | level ) const |
Compute the color of a surface raised to a level: the tint color blended over the surface color at the level's tint opacity.
| surface | The color of the surface when it is flat. |
| tint | The color to blend over it (the scheme's SurfaceTint). Its own alpha is ignored. |
| level | The elevation level of the surface. |
| std::out_of_range | When level is ElevationLevel::Count. |
Definition at line 91 of file tokens.cpp.

