TermOx
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
ox::Dynamic_color_engine Class Reference

Event loop that manages posting of Dynamic_color_events. More...

#include <dynamic_color_engine.hpp>

Inheritance diagram for ox::Dynamic_color_engine:
ox::Lockable< std::mutex >

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}
 

Detailed Description

Event loop that manages posting of Dynamic_color_events.

Member Function Documentation

◆ register_color()

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.

◆ unregister_color()

void ox::Dynamic_color_engine::unregister_color ( Color  color)

Removes the Dynamic_color linked to color.

Function does nothing if Color is not found.


The documentation for this class was generated from the following files: