|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
State of a modal backdrop, the dimming layer behind a dialog or a drawer: whether it is shown and how far its fade-in has progressed. More...
#include <headers/guillaume/components/backdrop.hpp>


Public Member Functions | |
| Backdrop (void)=default | |
| Default constructor. | |
| ~Backdrop (void)=default | |
| Default destructor. | |
| bool | isVisible (void) const |
| Check whether the backdrop is shown. | |
| Backdrop & | setVisible (bool visible) |
| Store whether the backdrop is shown. | |
| float | getProgress (void) const |
| Get the fade-in progress. | |
| Backdrop & | setProgress (float progress) |
| Set the fade-in progress. Called by the entity's fade animation on every sample. | |
| 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. | |
State of a modal backdrop, the dimming layer behind a dialog or a drawer: whether it is shown and how far its fade-in has progressed.
Written through systems::Backdrop::setVisible, which also starts the entity's components::Animation; that animation writes the progress while it plays. systems::Backdrop reads the state in the Layout phase and writes the color of the entity's components::Scrim: the theme's backdrop color with its alpha multiplied by the progress, or fully transparent while hidden.
Definition at line 51 of file backdrop.hpp.
| float guillaume::components::Backdrop::getProgress | ( | void | ) | const |
Get the fade-in progress.
Definition at line 42 of file backdrop.cpp.
| bool guillaume::components::Backdrop::isVisible | ( | void | ) | const |
Check whether the backdrop is shown.
Definition at line 27 of file backdrop.cpp.
| Backdrop & guillaume::components::Backdrop::setProgress | ( | float | progress | ) |
Set the fade-in progress. Called by the entity's fade animation on every sample.
Marks the component changed only when the value differs.
| progress | The progress, from 0 (transparent) to 1 (full backdrop color). The value is stored as given, not clamped. |
Definition at line 47 of file backdrop.cpp.


| Backdrop & guillaume::components::Backdrop::setVisible | ( | bool | visible | ) |
Store whether the backdrop is shown.
Marks the component changed only when the value differs. The scrim color follows the next time systems::Backdrop runs.
| visible | True to show the backdrop, false to hide it. |
Definition at line 32 of file backdrop.cpp.

