|
JX Application Framework
|
#include <JXAnimationTask.h>
Public Member Functions | |
| JXAnimationTask (JXImageWidget *widget) | |
| ~JXAnimationTask () override | |
Public Member Functions inherited from JXIdleTask | |
| JXIdleTask (const Time period) | |
| virtual | ~JXIdleTask () |
| void | Start () |
| void | Stop () |
| Time | GetPeriod () const |
| void | SetPeriod (const Time period) |
| void | ResetTimer () |
Protected Member Functions | |
| void | Perform (const Time delta) override |
| virtual JSize | GetFrameCount ()=0 |
| virtual void | GetFrameTime (const JIndex frameIndex, Time *tmin, Time *tmax)=0 |
| virtual JXImage * | GetFrame (const JIndex frameIndex)=0 |
Protected Member Functions inherited from JXIdleTask | |
| bool | Ready (const Time delta, Time *maxSleepTime) |
This class provides the framework for animating a JXImageWidget.
Derived classes must store the JXImages and implement the following
functions:
GetFrameCount
Returns the number of animation frames.
GetFrameTime
Returns the minimum and maximum time (in milliseconds)
that the frame can be displayed. A time will be chosen at
random between these two values. This is mainly useful for
animations that should repeat themselves at random intervals.
For most frames, this function will return min=max so that
the image is displayed for a fixed amount of time.
GetFrame
Returns the JXImage to display.
For best results, all images should be the same size so JXImageWidget
doesn't have to change size.
| JXAnimationTask::JXAnimationTask | ( | JXImageWidget * | widget | ) |
|
override |
Implemented in JXBusyIconTask.
|
protectedpure virtual |
Implemented in JXBusyIconTask.
|
protectedpure virtual |
Implemented in JXBusyIconTask.
|
overrideprotectedvirtual |
Implements JXIdleTask.