CBitmapAnimClientData Class Reference

#include <mw/bmpancli.h>

Link against: bmpanim.lib

class CBitmapAnimClientData : public CBase

Inherits from

  • CBitmapAnimClientData

Detailed Description

Encapsulates one or more animation frames into an entire animation.

In addition to specifying the frames you wish to include in your animation, you can also specify:

  • whether the animation will flash

  • whether the animation is played once, or continuously

  • the background frame that is drawn to clear each frame in the animation

You can also specify a default frame interval that is used for all frames in an animation. If the interval is already set for any of the individual frames, that takes precedence.

When you have defined your animation, use RBitmapAnim to play the animation.

Member Enumeration Documentation

Enum TPlayMode

Animation play mode flags.

The animation can be played in any of the ways described below.


Plays the animation once, from the first frame to the last one.


Plays the animation from the first frame to the last one continuously.


Plays the animation from the first frame to the last one then from the last frame to the first continuously.

Constructor & Destructor Documentation

~CBitmapAnimClientData ( )



It deletes the background frame and destroys the contents of the frame array.

Member Function Documentation

AppendFrameL ( CBitmapFrameData * )

IMPORT_C voidAppendFrameL(CBitmapFrameData *aFrame)

Appends a new frame to the array of frames.

The array takes ownership of the new frame.

aFrameA pointer to the frame to add to the array of frames

BackgroundFrame ( )

IMPORT_C CBitmapFrameData *BackgroundFrame()const

Gets the background frame bitmap.

Return Value
Background frame bitmap

DurationInMilliSeconds ( )

IMPORT_C TIntDurationInMilliSeconds()const

Gets the time required to display the entire sequence of frames that comprise the animation.

This time is expressed in milliseconds.

Return Value
Animation duration

Flash ( )

IMPORT_C TBoolFlash()const

Gets the animation's flash setting.

Return Value
ETrue if the animation is flashing, otherwise EFalse

FrameArray ( )

IMPORT_C const CArrayPtrFlat< CBitmapFrameData > &FrameArray()const

Gets the animation frame array.

Return Value
Animation frame array

FrameIntervalInMilliSeconds ( )

IMPORT_C TIntFrameIntervalInMilliSeconds()const

Gets the default animation frame interval in milliseconds.

Return Value
Default animation frame interval in milliseconds

NewL ( )

IMPORT_C CBitmapAnimClientData *NewL()[static]

Allocates and constructs a new CBitmapAnimClientData object.

Return Value
New CBitmapAnimClientData object

PlayMode ( )

IMPORT_C TPlayModePlayMode()const

Gets the animation's play mode.

Return Value
Animation's play mode

ResetFrameArray ( )

IMPORT_C voidResetFrameArray()

Resets and destroys the frame array's contents.

SetBackgroundFrame ( CBitmapFrameData * )

IMPORT_C voidSetBackgroundFrame(CBitmapFrameData *aBackgroundFrame)

Sets the background frame and takes ownership of it.

Any previous background frame, and mask if one is included, is deleted from memory. The frame is redrawn in the animation window in order to clear the current frame before drawing the next one.

aBackgroundFrameThe bitmap to use as the background frame

SetFlash ( TBool )

IMPORT_C voidSetFlash(TBoolaFlash)

Sets or unsets the animation's flash state.

aFlashETrue for the animation to flash, otherwise EFalse

SetFrameInterval ( TInt )

IMPORT_C voidSetFrameInterval(TIntaFrameIntervalInMilliSeconds)

Specifies for how many milliseconds each frame in the animation is displayed.

This is not used for any frames in the animation that specify their own interval.

aFrameIntervalInMilliSecondsThe number of milliseconds for which each frame in the animation is displayed

SetPlayMode ( TPlayMode )

IMPORT_C voidSetPlayMode(TPlayModeaPlayMode)

Sets the play mode so that the animation plays once or continuously.

aPlayModeThe animation play mode

Size ( )

IMPORT_C TSizeSize()const

Gets the display size required to show the entire animation.

Return Value
Display size