JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
JXCursorAnimator Class Reference

#include <JXCursorAnimator.h>

Public Member Functions

 JXCursorAnimator (JXWindow *window)
 
 ~JXCursorAnimator ()
 
void Activate ()
 
void Deactivate ()
 
void SetFrameSequence (const JArray< JCursorIndex > &frames)
 
void ResetFrameCounter ()
 
void NextFrame ()
 

Static Public Attributes

static const JSize kmsecPerFrame = 500
 

Detailed Description

This class simplifies the animation of cursors.

During a long process, call NextFrame() regularly, and this class will
ensure that the cursor twirls smoothly.  The default animation is the
a beach ball.  You can change this with SetFrameSequence().

We are owned by a particular JXWidget.  This object must activate us
when it controls the cursor, and must deactivate us otherwise.  This
allows an unlimited number of simultaneously animated cursors, with
at most one visible at any one time.

This class was not designed to be a base class.

Constructor & Destructor Documentation

◆ JXCursorAnimator()

JXCursorAnimator::JXCursorAnimator ( JXWindow window)

◆ ~JXCursorAnimator()

JXCursorAnimator::~JXCursorAnimator ( )

Member Function Documentation

◆ Activate()

void JXCursorAnimator::Activate ( )
inline

◆ Deactivate()

void JXCursorAnimator::Deactivate ( )
inline

◆ NextFrame()

void JXCursorAnimator::NextFrame ( )

Show the next frame of the cursor -if enough time has elapsed-.

◆ ResetFrameCounter()

void JXCursorAnimator::ResetFrameCounter ( )
inline

Reset the counter to start the animation from the first frame.

◆ SetFrameSequence()

void JXCursorAnimator::SetFrameSequence ( const JArray< JCursorIndex > &  frames)

Member Data Documentation

◆ kmsecPerFrame

const JSize JXCursorAnimator::kmsecPerFrame = 500
static

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