neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::widget_timer Class Reference

#include <timer.hpp>

Inheritance diagram for neogfx::widget_timer:
neolib::callback_timer neolib::timer neolib::noncopyable neolib::lifetime< Base > neolib::i_lifetime

Public Member Functions

 widget_timer (i_widget &aWidget, std::function< void(widget_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
template<typename Context >
 widget_timer (i_widget &aWidget, const Context &aContext, std::function< void(widget_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
 widget_timer (i_widget &aWidget, const i_lifetime &aContext, std::function< void(widget_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
- Public Member Functions inherited from neolib::callback_timer
 callback_timer (i_async_task &aTask, std::function< void(callback_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
 callback_timer (i_async_task &aTask, const i_lifetime &aContext, std::function< void(callback_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
template<typename Context >
 callback_timer (i_async_task &aTask, const Context &aContext, std::function< void(callback_timer &)> aCallback, const duration_type &aDuration_s, bool aInitialWait=true)
 
 ~callback_timer ()
 
- Public Member Functions inherited from neolib::timer
 timer (i_async_task &aTask, const duration_type &aDuration_s, bool aInitialWait=true)
 
 timer (i_async_task &aTask, const i_lifetime &aContext, const duration_type &aDuration_s, bool aInitialWait=true)
 
template<typename Context >
 timer (i_async_task &aTask, const Context &aContext, const duration_type &aDuration_s, bool aInitialWait=true)
 
 timer (const timer &aOther)
 
timeroperator= (const timer &aOther)
 
virtual ~timer ()
 
i_async_taskowner_task () const
 
void enable (bool aWait=true)
 
void disable ()
 
bool enabled () const
 
bool disabled () const
 
void again ()
 
void again_if ()
 
void cancel ()
 
void reset ()
 
bool waiting () const
 
const duration_typeduration () const
 
void set_duration (const duration_type &aDuration_s, bool aEffectiveImmediately=false)
 
void set_debug (bool aDebug)
 
- Public Member Functions inherited from neolib::lifetime< Base >
 lifetime (lifetime_state aState=lifetime_state::Alive)
 
virtual ~lifetime ()
 
lifetime_state object_state () const final
 
std::shared_ptr< std::atomic< lifetime_state > > object_state_ptr () const final
 
bool is_creating () const final
 
bool is_alive () const final
 
bool is_destroying () const final
 
bool is_destroyed () const final
 
void set_alive () override
 
void set_destroying () override
 
void set_destroyed () override
 
- Public Member Functions inherited from neolib::i_lifetime
virtual ~i_lifetime ()=default
 

Public Attributes

std::optional< destroyed_flagiContextDestroyed
 

Additional Inherited Members

- Public Types inherited from neolib::timer
typedef std::chrono::duration< double > duration_type
 
- Public Types inherited from neolib::lifetime< Base >
typedef neolib::destroyed_flag destroyed_flag
 
- Protected Member Functions inherited from neolib::timer
void unsubscribe ()
 

Detailed Description

Definition at line 30 of file timer.hpp.

Constructor & Destructor Documentation

◆ widget_timer() [1/3]

neogfx::widget_timer::widget_timer ( i_widget aWidget,
std::function< void(widget_timer &)>  aCallback,
const duration_type aDuration_s,
bool  aInitialWait = true 
)

◆ widget_timer() [2/3]

template<typename Context >
neogfx::widget_timer::widget_timer ( i_widget aWidget,
const Context &  aContext,
std::function< void(widget_timer &)>  aCallback,
const duration_type aDuration_s,
bool  aInitialWait = true 
)
inline

Definition at line 35 of file timer.hpp.

◆ widget_timer() [3/3]

neogfx::widget_timer::widget_timer ( i_widget aWidget,
const i_lifetime &  aContext,
std::function< void(widget_timer &)>  aCallback,
const duration_type aDuration_s,
bool  aInitialWait = true 
)

Member Data Documentation

◆ iContextDestroyed

std::optional<destroyed_flag> neogfx::widget_timer::iContextDestroyed

Definition at line 39 of file timer.hpp.


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