TermOx
|
Event loop that manages posting of Dynamic_color_events. More...
#include <dynamic_color_engine.hpp>
Classes | |
struct | Registered_data |
Public Types | |
using | Clock_t = Timer::Clock_t |
using | Duration_t = Timer::Duration_t |
using | Time_point = Timer::Time_point |
Public Member Functions | |
void | register_color (Color color, Dynamic_color const &dynamic) |
Add a dynamic color linked to color . More... | |
void | unregister_color (Color color) |
Removes the Dynamic_color linked to color . More... | |
void | clear () |
Remove all registered colors. | |
auto | is_empty () const -> bool |
Return true if there are no registered widgets. | |
void | start () |
Start another thread that waits on intervals and sents Events. | |
void | stop () |
Sends exit signal and waits for animation thread to exit. | |
Static Public Attributes | |
static constexpr auto | default_interval = Duration_t{100} |
Event loop that manages posting of Dynamic_color_events.
void ox::Dynamic_color_engine::register_color | ( | Color | color, |
Dynamic_color const & | dynamic | ||
) |
Add a dynamic color linked to color
.
Does not check for duplicates.
void ox::Dynamic_color_engine::unregister_color | ( | Color | color | ) |
Removes the Dynamic_color linked to color
.
Function does nothing if Color is not found.