9 #include "tb_linklist.h"
10 #include "tb_object.h"
14 class TBAnimationObject;
47 #define ANIMATION_DEFAULT_CURVE ANIMATION_CURVE_SLOW_DOWN
48 #define ANIMATION_DEFAULT_DURATION 200
76 double animation_start_time;
77 double animation_duration;
78 bool adjust_start_time;
109 void InvokeOnAnimationStart();
110 void InvokeOnAnimationUpdate(
float progress);
111 void InvokeOnAnimationStop(
bool aborted);
129 double animation_duration = ANIMATION_DEFAULT_DURATION,
164 #endif // TB_ANIMATION_H
TBLinkListOf is a double linked linklist.
Definition: tb_linklist.h:122
ANIMATION_TIME
Defines what the animation duration time is relative to.
Definition: tb_animation.h:26
static void BeginBlockAnimations()
Begin a period of blocking new animations.
Definition: tb_animation.cpp:171
Slow start, slow end. Almost linear.
Definition: tb_animation.h:21
TBAnimationManager - System class that manages all animated object.
Definition: tb_animation.h:116
static void Update()
Update all running animations.
Definition: tb_animation.cpp:71
static void EndBlockAnimations()
End a period of blocking new animations that was started with BeginBlockAnimations.
Definition: tb_animation.cpp:177
bool IsAnimating() const
Return true if the object is currently animating.
Definition: tb_animation.h:86
Fast start, slow end.
Definition: tb_animation.h:19
The animation start in StartAnimation just as with ANIMATION_TIME_IMMEDIATELY, but the start time is ...
Definition: tb_animation.h:44
TBAnimationBlocker blocks new animations during its lifetime.
Definition: tb_animation.h:155
TBAnimationListener - Listens to the progress of TBAnimationObject.
Definition: tb_animation.h:52
virtual void OnAnimationStop(TBAnimationObject *obj, bool aborted)=0
Called after the animation object handled its own OnAnimationStart.
The start time begins when the animation start in TBAnimationManager::StartAnimation.
Definition: tb_animation.h:29
virtual void OnAnimationUpdate(float progress)=0
Called on animation update.
Slow start, slow end. Stronger than ANIMATION_CURVE_BEZIER.
Definition: tb_animation.h:22
Definition: tb_object.h:21
static void AbortAllAnimations()
Abort and delete all animations.
Definition: tb_animation.cpp:64
Slow start, fast end.
Definition: tb_animation.h:20
static bool IsAnimationsBlocked()
Return true if new animations are blocked.
Definition: tb_animation.cpp:165
static void AbortAnimation(TBAnimationObject *obj, bool delete_animation)
Abort the animation.
Definition: tb_animation.cpp:153
ANIMATION_CURVE
Defines how the animation progress value is interpolated.
Definition: tb_animation.h:17
Definition: tb_linklist.h:83
virtual void OnAnimationUpdate(TBAnimationObject *obj, float progress)=0
Called after the animation object handled its own OnAnimationStart.
void RemoveListener(TBAnimationListener *listener)
Remove a listener from this animation object.
Definition: tb_animation.h:105
void AddListener(TBAnimationListener *listener)
Add a listener to this animation object.
Definition: tb_animation.h:102
TBAnimationObject - Base class for all animated object.
Definition: tb_animation.h:72
virtual void OnAnimationStop(bool aborted)=0
Called on animation stop.
virtual void OnAnimationStart(TBAnimationObject *obj)=0
Called after the animation object handled its own OnAnimationStart.
static bool HasAnimationsRunning()
Return true if there are running animations.
Definition: tb_animation.cpp:129
Linear.
Definition: tb_animation.h:18
virtual void OnAnimationStart()=0
Called on animation start.