Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvBitmapAnimationHandler Class Referenceabstract

Animation handler class. More...

#include <ilviews/base/port.h>

Public Member Functions

virtual void drawFrame (IlvPort *dst, IlvPalette *palette, const IlvRect &rect, IlUInt frame, const IlvRegion *clip, IlvPosition alignment, IlBoolean transparent) const =0
 Called to draw the specified frame. More...
 
virtual IlUInt getFrameDelay (IlUInt frame) const =0
 Returns the delay between the specified frame and the next frame. More...
 
virtual IlUInt getFramesCount () const =0
 Returns the number of frames of the animation. More...
 
virtual IlBoolean isLastFrame (IlUInt frame) const
 Returns IlTrue if the specified frame is the last one. More...
 

Detailed Description

Animation handler class.

Library: xviews or winviews or mviews (mutually exclusive)

The IlvBitmapAnimationHandler class is an abstract class that handles animation of IlvBitmap. objects. It defines several virtual methods that need to be redefined in subclasses. The animation is supported by the following objects: IlvIcon, IlvTransparentIcon, and IlvGadgetItem.

See also
IlvBitmap

Member Function Documentation

§ drawFrame()

virtual void IlvBitmapAnimationHandler::drawFrame ( IlvPort dst,
IlvPalette palette,
const IlvRect rect,
IlUInt  frame,
const IlvRegion clip,
IlvPosition  alignment,
IlBoolean  transparent 
) const
pure virtual

Called to draw the specified frame.

Parameters
dstThe port in which the drawing should be done.
paletteThe palette.
rectThe bounding box of the bitmap.
frameThe frame index.
clipThe clip.
alignmentThe alignment of the bitmap inside rect.
transparentA Boolean value specifying whether the drawing should be transparent.

§ getFrameDelay()

virtual IlUInt IlvBitmapAnimationHandler::getFrameDelay ( IlUInt  frame) const
pure virtual

Returns the delay between the specified frame and the next frame.

Parameters
frameThe frame index.
Returns
The delay between the specified frame and the next frame.
See also
getFramesCount

§ getFramesCount()

virtual IlUInt IlvBitmapAnimationHandler::getFramesCount ( ) const
pure virtual

Returns the number of frames of the animation.

If you do not know how many frames your animation will have, redefine this member function to return (IlUInt)-1. Then you need to redefine the isLastFrame method.

Returns
The number of frames of the animation.
See also
isLastFrame

§ isLastFrame()

virtual IlBoolean IlvBitmapAnimationHandler::isLastFrame ( IlUInt  frame) const
virtual

Returns IlTrue if the specified frame is the last one.

The default implementation calls getFramesCount and compares the returned value with frame. You can override this member function if you do not know how many frames your animation will have.

Parameters
frameThe frame index.
Returns
IlTrue if frame is the last frame.
See also
getFramesCount

© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.