JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
JXAnimationTask Class Referenceabstract

#include <JXAnimationTask.h>

Inheritance diagram for JXAnimationTask:
[legend]

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 JXImageGetFrame (const JIndex frameIndex)=0
 
- Protected Member Functions inherited from JXIdleTask
bool Ready (const Time delta, Time *maxSleepTime)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ JXAnimationTask()

JXAnimationTask::JXAnimationTask ( JXImageWidget widget)

◆ ~JXAnimationTask()

JXAnimationTask::~JXAnimationTask ( )
override

Member Function Documentation

◆ GetFrame()

virtual JXImage * JXAnimationTask::GetFrame ( const JIndex  frameIndex)
protectedpure virtual

Implemented in JXBusyIconTask.

◆ GetFrameCount()

virtual JSize JXAnimationTask::GetFrameCount ( )
protectedpure virtual

Implemented in JXBusyIconTask.

◆ GetFrameTime()

virtual void JXAnimationTask::GetFrameTime ( const JIndex  frameIndex,
Time *  tmin,
Time *  tmax 
)
protectedpure virtual

Implemented in JXBusyIconTask.

◆ Perform()

void JXAnimationTask::Perform ( const Time  delta)
overrideprotectedvirtual

Implements JXIdleTask.


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