Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: bmpancli.h
Link against: bmpanim.lib

Class CBitmapAnimClientData

class CBitmapAnimClientData : public CBase

Support

Supported from 6.0

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:

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.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CBitmapAnimClientDataEncapsulates one or more animation frames into an entire animation

Defined in CBitmapAnimClientData:
AppendFrameL(), BackgroundFrame(), CBitmapAnimClientData(), DurationInMilliSeconds(), EBounce, ECycle, EPlay, Flash(), FrameArray(), FrameIntervalInMilliSeconds(), NewL(), PlayMode(), ResetFrameArray(), SetBackgroundFrame(), SetFlash(), SetFrameInterval(), SetPlayMode(), Size(), TPlayMode, iBackgroundFrame, iFlash, iFrameArray, iFrameIntervalInMilliSeconds, iPlayMode, ~CBitmapAnimClientData()

Inherited from CBase:
operator new()


Construction and destruction


NewL()

static CBitmapAnimClientData* NewL();

Description

Allocates and constructs a new CBitmapAnimClientData object.

Return value

CBitmapAnimClientData*

New CBitmapAnimClientData object


~CBitmapAnimClientData()

~CBitmapAnimClientData();

Description

Destructor.

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

[Top]


Member functions


AppendFrameL()

void AppendFrameL(CBitmapFrameData* aFrame);

Description

Appends a new frame to the array of frames.

The array takes ownership of the new frame.

Parameters

CBitmapFrameData* aFrame

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


ResetFrameArray()

void ResetFrameArray();

Description

Resets and destroys the frame array's contents.


SetBackgroundFrame()

void SetBackgroundFrame(CBitmapFrameData* aBackgroundFrame);

Description

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.

Parameters

CBitmapFrameData* aBackgroundFrame

The bitmap to use as the background frame


SetFlash()

void SetFlash(TBool aFlash);

Description

Sets/unsets the animation to flash.

Parameters

TBool aFlash

ETrue to draw the animation flashing, otherwise EFalse


SetFrameInterval()

void SetFrameInterval(TInt aFrameIntervalInMilliSeconds);

Description

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.

Parameters

TInt aFrameIntervalInMilliSeconds

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


SetPlayMode()

void SetPlayMode(TPlayMode aPlayMode);

Description

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

Parameters

TPlayMode aPlayMode

The animation play mode


BackgroundFrame()

CBitmapFrameData* BackgroundFrame() const;

Description

Gets the background frame bitmap.

Return value

CBitmapFrameData*

Background frame bitmap


Flash()

TBool Flash() const;

Description

Gets the flash setting.

Return value

TBool

ETrue if the animation is flashing, otherwise EFalse


FrameArray()

const CArrayPtrFlat<CBitmapFrameData>& FrameArray() const;

Description

Gets the animation frame array.

Return value

CArrayPtrFlat<CBitmapFrameData>

Animation frame array


FrameIntervalInMilliSeconds()

TInt FrameIntervalInMilliSeconds() const;

Description

Gets the default animation frame interval in milliseconds.

Return value

TInt

Default animation frame interval in milliseconds


PlayMode()

TPlayMode PlayMode() const;

Description

Gets the animation's play mode.

Return value

TPlayMode

Animation's play mode


DurationInMilliSeconds()

TInt DurationInMilliSeconds() const;

Description

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

This time is expressed in milliseconds.

Return value

TInt

Animation duration


Size()

TSize Size() const;

Description

Gets the display size required to show the entire animation.

Return value

TSize

Display size

[Top]


Member enumerations


Enum TPlayMode

TPlayMode

Description

Animation play mode flags.

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

EPlay

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

ECycle

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

EBounce

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

[Top]


Internal members


CBitmapAnimClientData()

private: CBitmapAnimClientData();

Description

This member is internal and not intended for use.


iFlash

private: TBool iFlash;

Description

This member is internal and not intended for use.


iPlayMode

private: TPlayMode iPlayMode;

Description

This member is internal and not intended for use.


iFrameIntervalInMilliSeconds

private: TInt iFrameIntervalInMilliSeconds;

Description

This member is internal and not intended for use.


iFrameArray

private: CArrayPtrFlat<CBitmapFrameData> iFrameArray;

Description

This member is internal and not intended for use.


iBackgroundFrame

private: CBitmapFrameData* iBackgroundFrame;

Description

This member is internal and not intended for use.