#include <mw/bmpancli.h>
Link against: bmpanim.lib
class CBitmapAnimClientData : public CBase |
Public Member Enumerations | |
---|---|
enum | TPlayMode { EPlay, ECycle, EBounce } |
Public Member Functions | |
---|---|
~CBitmapAnimClientData() | |
IMPORT_C void | AppendFrameL(CBitmapFrameData *) |
IMPORT_C CBitmapFrameData * | BackgroundFrame() |
IMPORT_C TInt | DurationInMilliSeconds() |
IMPORT_C TBool | Flash() |
IMPORT_C const CArrayPtrFlat< CBitmapFrameData > & | FrameArray() |
IMPORT_C TInt | FrameIntervalInMilliSeconds() |
IMPORT_C CBitmapAnimClientData * | NewL() |
IMPORT_C TPlayMode | PlayMode() |
IMPORT_C void | ResetFrameArray() |
IMPORT_C void | SetBackgroundFrame(CBitmapFrameData *) |
IMPORT_C void | SetFlash(TBool) |
IMPORT_C void | SetFrameInterval(TInt) |
IMPORT_C void | SetPlayMode(TPlayMode) |
IMPORT_C TSize | Size() |
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.
Animation play mode flags.
The animation can be played in any of the ways described below.
Enumerator | Value | Description |
---|---|---|
EPlay | 0x00 |
Plays the animation once, from the first frame to the last one. |
ECycle | 0x01 |
Plays the animation from the first frame to the last one continuously. |
EBounce | 0x02 |
Plays the animation from the first frame to the last one then from the last frame to the first continuously. |
IMPORT_C | ~CBitmapAnimClientData | ( | ) |
Destructor.
It deletes the background frame and destroys the contents of the frame array.
IMPORT_C void | AppendFrameL | ( | CBitmapFrameData * | aFrame | ) |
Appends a new frame to the array of frames.
The array takes ownership of the new frame.
Parameters | |
---|---|
aFrame | A pointer to the frame to add to the array of frames |
IMPORT_C CBitmapFrameData * | BackgroundFrame | ( | ) | const |
Gets the background frame bitmap.
IMPORT_C TInt | DurationInMilliSeconds | ( | ) | const |
Gets the time required to display the entire sequence of frames that comprise the animation.
This time is expressed in milliseconds.
IMPORT_C TBool | Flash | ( | ) | const |
Gets the animation's flash setting.
IMPORT_C const CArrayPtrFlat< CBitmapFrameData > & | FrameArray | ( | ) | const |
Gets the animation frame array.
IMPORT_C TInt | FrameIntervalInMilliSeconds | ( | ) | const |
Gets the default animation frame interval in milliseconds.
IMPORT_C CBitmapAnimClientData * | NewL | ( | ) | [static] |
Allocates and constructs a new CBitmapAnimClientData object.
IMPORT_C void | SetBackgroundFrame | ( | 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.
Parameters | |
---|---|
aBackgroundFrame | The bitmap to use as the background frame |
IMPORT_C void | SetFlash | ( | TBool | aFlash | ) |
Sets or unsets the animation's flash state.
Parameters | |
---|---|
aFlash | ETrue for the animation to flash, otherwise EFalse |
IMPORT_C void | SetFrameInterval | ( | TInt | aFrameIntervalInMilliSeconds | ) |
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 | |
---|---|
aFrameIntervalInMilliSeconds | The number of milliseconds for which each frame in the animation is displayed |
IMPORT_C void | SetPlayMode | ( | TPlayMode | aPlayMode | ) |
Sets the play mode so that the animation plays once or continuously.
Parameters | |
---|---|
aPlayMode | The animation play mode |
IMPORT_C TSize | Size | ( | ) | const |
Gets the display size required to show the entire animation.