1.10 |
Base class for an animation. More...
#include <animation.h>
Public Member Functions | |
AnimationBase ()=default | |
AnimationBase (AnimationBase &&) noexcept=default | |
AnimationBase (const AnimationBase &)=delete | |
virtual | ~AnimationBase () noexcept=default |
void | add_callback (AnimationCallback callback) |
Register a callback for the animation. | |
void | clear_callbacks () |
Clear all callbacks. | |
virtual bool | next ()=0 |
Periodic call to the animation. | |
AnimationBase & | operator= (AnimationBase &&) noexcept=default |
AnimationBase & | operator= (const AnimationBase &)=delete |
virtual void | resume ()=0 |
Resume the animation. | |
virtual EGT_NODISCARD bool | running () const |
Returns true if the animation is currently running. | |
virtual void | start ()=0 |
Start the animation. | |
virtual void | stop ()=0 |
Stop the animation. | |
Protected Attributes | |
std::vector< AnimationCallback > | m_callbacks |
Registered callbacks for the animation. | |
bool | m_running {false} |
The running state of the animation. | |
Base class for an animation.
|
default |
|
delete |
|
defaultnoexcept |
|
virtualdefaultnoexcept |
|
inline |
|
inline |
Clear all callbacks.
|
pure virtual |
Periodic call to the animation.
This must be called until it returns false. When it returns false, the animation is done.
Implemented in Animation, AnimationSequence, and AnimationDelay.
|
defaultnoexcept |
|
delete |
|
pure virtual |
Resume the animation.
Implemented in Animation, AnimationSequence, AutoAnimation, and AnimationDelay.
|
inlinevirtual |
Returns true if the animation is currently running.
|
pure virtual |
Start the animation.
Implemented in Animation, AnimationSequence, AutoAnimation, and AnimationDelay.
|
pure virtual |
Stop the animation.
Implemented in Animation, AnimationSequence, AutoAnimation, and AnimationDelay.
|
protected |
Registered callbacks for the animation.
|
protected |
The running state of the animation.