cf::ui::components::material::token_literals¶
Classes¶
| Name | |
|---|---|
| struct | cf::ui::components::material::token_literals::AnimationTokenMapping Animation token mapping entry. |
Functions¶
| Name | |
|---|---|
| constAnimationTokenMapping * | findTokenMapping(constchar * token) Find a mapping entry by animation token. |
| bool | hasTokenMapping(constchar * token) Check if an animation token exists in the mapping table. |
Attributes¶
Functions Documentation¶
function findTokenMapping¶
Find a mapping entry by animation token.
Parameters:
- token The animation token to look up.
Exceptions:
- None
Return: Pointer to the matching mapping entry, or nullptr if not found.
Since: 0.1
Note: Linear search is acceptable for small tables (< 100 entries).
Warning: The returned pointer is valid only as long as TOKEN_MAPPINGS is accessible (meaning: program lifetime).
Performs a linear search through the mapping table. Returns nullptr if the token is not found.
const auto* mapping = findTokenMapping("md.animation.fadeIn");
if (mapping) {
// mapping->animationType == "fade"
// mapping->motionToken == "md.motion.shortEnter"
// mapping->property == "opacity"
// mapping->defaultFrom == 0.0f
// mapping->defaultTo == 1.0f
}
function hasTokenMapping¶
Check if an animation token exists in the mapping table.
Parameters:
- token The animation token to check.
Exceptions:
- None
Return: true if the token is found, false otherwise.
Since: 0.1
Note: None
Warning: None
Attributes Documentation¶
variable ANIMATION_FADE_IN¶
Fade-in animation token.
Since: 0.1
Opacity animation from 0 to 1. Uses shortEnter timing by default.
variable ANIMATION_FADE_OUT¶
Fade-out animation token.
Since: 0.1
Opacity animation from 1 to 0. Uses shortExit timing by default.
variable ANIMATION_SLIDE_UP¶
Slide-up animation token.
Since: 0.1
Position animation sliding upward. Uses mediumEnter timing.
variable ANIMATION_SLIDE_DOWN¶
Slide-down animation token.
Since: 0.1
Position animation sliding downward. Uses mediumExit timing.
variable ANIMATION_SLIDE_LEFT¶
Slide-left animation token.
Since: 0.1
Position animation sliding left. Uses mediumEnter timing.
variable ANIMATION_SLIDE_RIGHT¶
Slide-right animation token.
Since: 0.1
Position animation sliding right. Uses mediumEnter timing.
variable ANIMATION_SCALE_UP¶
Scale-up animation token.
Since: 0.1
Size animation growing from smaller to normal. Uses shortEnter timing.
variable ANIMATION_SCALE_DOWN¶
Scale-down animation token.
Since: 0.1
Size animation shrinking from normal to smaller. Uses shortExit timing.
variable ANIMATION_ROTATE_IN¶
Rotate-in animation token.
Since: 0.1
Rotation animation for entering elements. Uses mediumEnter timing.
variable ANIMATION_ROTATE_OUT¶
Rotate-out animation token.
Since: 0.1
Rotation animation for exiting elements. Uses mediumExit timing.
variable ANIMATION_RIPPLE_EXPAND¶
Ripple expand animation token.
Since: 0.1
Ripple effect radius expansion from 0 to maxRadius. Uses rippleExpand timing.
variable ANIMATION_RIPPLE_FADE¶
Ripple fade animation token.
Since: 0.1
Ripple effect opacity fade-out from 1 to 0. Uses rippleFade timing.
variable ALL_ANIMATION_TOKENS¶
constexprconstchar *const[] ALL_ANIMATION_TOKENS = {
ANIMATION_FADE_IN, ANIMATION_FADE_OUT,
ANIMATION_SLIDE_UP, ANIMATION_SLIDE_DOWN, ANIMATION_SLIDE_LEFT, ANIMATION_SLIDE_RIGHT,
ANIMATION_SCALE_UP, ANIMATION_SCALE_DOWN,
ANIMATION_ROTATE_IN, ANIMATION_ROTATE_OUT,
ANIMATION_RIPPLE_EXPAND, ANIMATION_RIPPLE_FADE};
Array containing all Material Design 3 animation token literals.
Since: 0.1
Ordered by category: Fade (2), Slide (4), Scale (2), Rotate (2).
variable ANIMATION_TOKEN_COUNT¶
Total count of Material Design 3 animation tokens.
Since: 0.1
variable TOKEN_MAPPINGS¶
Complete animation token mapping table.
Since: 0.1
Defines all predefined animation tokens and their corresponding configurations. This table is used by MaterialAnimationFactory to resolve tokens to descriptors.
The table is ordered by animation category for easier lookup:
- Fade animations (2 entries)
- Slide animations (4 entries)
- Scale animations (2 entries)
- Rotate animations (2 entries)
- Ripple animations (2 entries)
variable TOKEN_MAPPING_COUNT¶
Total number of animation token mappings.
Since: 0.1
Updated on 2026-03-09 at 10:14:00 +0000