rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvBitmapAnimationHandler Class Reference

Animation handler class. More...

#include <ilviews/base/port.h>

List of all members.

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.
virtual IlUInt getFrameDelay (IlUInt frame) const =0
 Returns the delay between the specified frame and the next frame.
virtual IlUInt getFramesCount () const =0
 Returns the number of frames of the animation.
virtual IlBoolean isLastFrame (IlUInt frame) const
 Returns IlTrue if the specified frame is the last one.

Detailed Description

Animation handler class.

Library: display

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:
dst The port in which the drawing should be done.
palette The palette.
rect The bounding box of the bitmap.
frame The frame index.
clip The clip.
alignment The alignment of the bitmap inside rect.
transparent A 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:
frame The 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:
frame The frame index.
Returns:
IlTrue if frame is the last frame.
See also:
getFramesCount
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.