rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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

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.
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
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
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 2015, 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.