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

Registers Widgets with intervals to send timer events. More...

#include <animation_engine.hpp>

Inheritance diagram for ox::Animation_engine:
ox::Lockable< std::recursive_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_widget (Widget &w, Duration_t interval)
 Register to start sending Timer_events to w every interval.
 
void register_widget (Widget &w, FPS fps)
 Register to start sending Timer_events to w at fps.
 
void unregister_widget (Widget &w)
 Stop the given Widget from being sent Timer_events.
 
auto is_empty () const -> bool
 Return true if there are no registered widgets.
 
void start ()
 Start another thread that waits on intervals and sents timer events.
 
void stop ()
 Sends exit signal and waits for animation thread to exit.
 
auto is_running () const -> bool
 Return true if start() has been called, and hasn't been exited.
 

Static Public Attributes

static constexpr auto default_interval = Duration_t{100}
 

Detailed Description

Registers Widgets with intervals to send timer events.


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