|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
The animation timings of a theme: one length per MotionDuration, plus which easing curve to use for which kind of movement. More...
#include <headers/guillaume/theme/tokens.hpp>
Public Member Functions | |
| MotionScale (void) | |
| Create the scale with the Material 3 baseline durations listed in MotionDuration. | |
| float | getDuration (MotionDuration duration) const |
| Get the length of a duration token. | |
| void | setDuration (MotionDuration duration, float seconds) |
| Replace the length of a duration token. | |
Static Public Member Functions | |
| static constexpr motion::Easing | standard (void) |
| Get the easing for elements that move or change while staying on screen. | |
| static constexpr motion::Easing | enter (void) |
| Get the easing for elements entering the screen: fast at first, then settling. | |
| static constexpr motion::Easing | exit (void) |
| Get the easing for elements leaving the screen: slow at first, then speeding away. | |
Static Public Attributes | |
| static constexpr float | MaxFrameStep = 0.1f |
| Longest frame step the animation system integrates, in seconds, so a stalled frame does not skip a whole transition. | |
| static constexpr float | IndeterminateCycle = 1.5f |
| Duration of one cycle of an indeterminate progress or loading indicator, in seconds (1.5 s, as in react-native-paper). | |
| static constexpr float | SnackbarDuration = 7.0f |
| How long a snackbar stays visible by default, in seconds (7 s, as in react-native-paper). | |
The animation timings of a theme: one length per MotionDuration, plus which easing curve to use for which kind of movement.
The durations can be changed per theme; the constants and the three easing choices are the same for every theme.
Definition at line 328 of file tokens.hpp.
| guillaume::theme::MotionScale::MotionScale | ( | void | ) |
Create the scale with the Material 3 baseline durations listed in MotionDuration.
Definition at line 126 of file tokens.cpp.
|
inlinestaticconstexpr |
Get the easing for elements entering the screen: fast at first, then settling.
Definition at line 390 of file tokens.hpp.
|
inlinestaticconstexpr |
Get the easing for elements leaving the screen: slow at first, then speeding away.
Definition at line 400 of file tokens.hpp.
| float guillaume::theme::MotionScale::getDuration | ( | MotionDuration | duration | ) | const |
Get the length of a duration token.
| duration | The duration token to look up. |
| std::out_of_range | When duration is MotionDuration::Count. |
Definition at line 132 of file tokens.cpp.
| void guillaume::theme::MotionScale::setDuration | ( | MotionDuration | duration, |
| float | seconds ) |
Replace the length of a duration token.
| duration | The duration token to change. |
| seconds | The new duration, in seconds; must be greater than 0. |
| std::out_of_range | When duration is MotionDuration::Count. |
| std::invalid_argument | When seconds is zero or negative. |
Definition at line 137 of file tokens.cpp.
|
inlinestaticconstexpr |
Get the easing for elements that move or change while staying on screen.
Definition at line 380 of file tokens.hpp.

|
staticconstexpr |
Duration of one cycle of an indeterminate progress or loading indicator, in seconds (1.5 s, as in react-native-paper).
Definition at line 341 of file tokens.hpp.
|
staticconstexpr |
Longest frame step the animation system integrates, in seconds, so a stalled frame does not skip a whole transition.
Definition at line 335 of file tokens.hpp.
|
staticconstexpr |
How long a snackbar stays visible by default, in seconds (7 s, as in react-native-paper).
Definition at line 347 of file tokens.hpp.