#include <mw/spriteanimation.h>
Link against: animation.lib
class CSpriteAnimation : public CAnimation, public MAnimationDataProviderObserver, public CAnimation, public MAnimationDataProviderObserver |
Public Member Functions | |
---|---|
~CSpriteAnimation() | |
CAnimationDataProvider * | DataProvider() |
virtual void | Freeze() |
virtual void | Hold() |
IMPORT_C CSpriteAnimation * | NewL(CAnimationDataProvider *, const TPoint &, RWsSession &, RWindow &, MAnimationObserver *) |
IMPORT_C CSpriteAnimation * | NewL(CAnimationDataProvider *, const TPoint &, RWsSession &, RWindow &, const TDesC8 &, MAnimationObserver *) |
IMPORT_C CSpriteAnimation * | NewL(CAnimationDataProvider *, const TPoint &, MAnimationObserver *, const CCoeControl *) |
IMPORT_C CSpriteAnimation * | NewL(CAnimationDataProvider *, const TPoint &, const TDesC8 &, MAnimationObserver *, const CCoeControl *) |
virtual void | Pause() |
virtual void | Resume() |
virtual IMPORT_C void | SetHostL(const CCoeControl *) |
virtual void | SetPosition(const TPoint &) |
IMPORT_C TSize | Size() |
virtual void | Start(const TAnimationConfig &) |
virtual void | Stop() |
virtual void | Unfreeze() |
virtual void | Unhold() |
Protected Member Functions | |
---|---|
CSpriteAnimation() | |
CSpriteAnimation(CAnimationDataProvider *, RWsSession &) | |
CSpriteAnimation(CAnimationDataProvider *, MAnimationObserver *, const CCoeControl *) | |
virtual void | CSpriteAnimation_Reserved2() |
void | ConstructL(const TPoint &, RWindow &, const TDesC8 &, MAnimationObserver *) |
void | ConstructL(const TPoint &, const TDesC8 &) |
void | ConstructL() |
Inherited Functions | |
---|---|
CBase::CBase() | |
CBase::Delete(CBase *) | |
CBase::Extension_(TUint,TAny *&,TAny *) | |
CBase::operator new(TUint) | |
CBase::operator new(TUint,TAny *) | |
CBase::operator new(TUint,TLeave) | |
CBase::operator new(TUint,TLeave,TUint) | |
CBase::operator new(TUint,TUint) | |
CBase::~CBase() | |
MAnimationDataProviderObserver::MAnimationDataProviderObserver_Reserved1() | |
MAnimationDataProviderObserver::MAnimationDataProviderObserver_Reserved2() |
Implementation of CAnimation for sprite based animations.
A sprite animation displays the image using a sprite, which is a server side graphic object. This is likely to be more efficient than a basic animation, and requires slightly less work in the client application. However, it also provides less control over the actual rendering of the image.
A sprite animation must be associated with an RWindow. However, no redraw events will be generated for it by the animation, and the client application does not need to take any action once the animation has started. Holding the animation when the sprite is not visible is handled automatically on the server side.
See also: CAnimationDataProvider
CSpriteAnimation | ( | ) | [protected] |
CSpriteAnimation | ( | CAnimationDataProvider * | aDataProvider, |
RWsSession & | aWsSession | ||
) | [protected] |
CSpriteAnimation | ( | CAnimationDataProvider * | aDataProvider, |
MAnimationObserver * | aObserver, | ||
const CCoeControl * | aHost | ||
) | [protected] |
void | CSpriteAnimation_Reserved2 | ( | ) | [protected, virtual] |
Reserved for future use
void | ConstructL | ( | const TPoint & | aPoint, |
RWindow & | aWindow, | |||
const TDesC8 & | aDataType, | |||
MAnimationObserver * | aObserver | |||
) | [protected] |
void | ConstructL | ( | ) | [protected] |
CAnimationDataProvider * | DataProvider | ( | ) | [inline] |
Provides an CSpriteAnimation DataProvider interface to the client application.
IMPORT_C CSpriteAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
RWsSession & | aWsSession, | |||
RWindow & | aWindow, | |||
MAnimationObserver * | aObserver = 0 | |||
) | [static] |
Two stage constructor.
This creates and returns a new sprite animation.
Parameters | |
---|---|
aDataProvider | The data provider from which the animation contents will be obtained. The animation takes ownership of this object |
aPoint | The starting position of the sprite in the window |
aWsSession | A session with the window server |
aWindow | The window in which to draw the animation |
aObserver | An optional receiver of animation events (such as errors) |
IMPORT_C CSpriteAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
RWsSession & | aWsSession, | |||
RWindow & | aWindow, | |||
const TDesC8 & | aDataType, | |||
MAnimationObserver * | aObserver = 0 | |||
) | [static] |
Two stage constructor.
This is identical to the other NewL except that it allows an alternative data type to be specified. Unless you are trying to use a custom animator class the other form of constructor should be used.
Parameters | |
---|---|
aDataProvider | The data provider from which the animation contents will be obtained. The animation takes ownership of this object |
aPoint | The starting position of the sprite in the window |
aWsSession | A session with the window server |
aWindow | The window in which to draw the animation |
aDataType | Overrides the data type specified by the data provider |
aObserver | An optional receiver of animation events (such as errors) |
IMPORT_C CSpriteAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
MAnimationObserver * | aObserver = NULL, | |||
const CCoeControl * | aHost = NULL | |||
) | [static] |
Two stage constructor.
This creates and returns a new sprite animation.
Parameters | |
---|---|
aDataProvider | The data provider from which the animation contents will be obtained. The animation takes ownership of this object |
aPoint | The starting position of the sprite in the window |
aObserver | An optional receiver of animation events (such as errors) |
IMPORT_C CSpriteAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
const TDesC8 & | aDataType, | |||
MAnimationObserver * | aObserver = NULL, | |||
const CCoeControl * | aHost = NULL | |||
) | [static] |
Two stage constructor.
This is identical to the other NewL except that it allows an alternative data type to be specified. Unless you are trying to use a custom animator class the other form of constructor should be used.
Parameters | |
---|---|
aDataProvider | The data provider from which the animation contents will be obtained. The animation takes ownership of this object |
aPoint | The starting position of the sprite in the window |
aDataType | Overrides the data type specified by the data provider |
aObserver | An optional receiver of animation events (such as errors) |
IMPORT_C void | SetHostL | ( | const CCoeControl * | aHost | ) | [virtual] |
void | SetPosition | ( | const TPoint & | aPoint | ) | [virtual] |
Reimplemented from CAnimation::SetPosition(const TPoint &)
Implements CAnimation::SetPosition.
Parameters | |
---|---|
aPoint | The new coordinates of the animation (usually the top left corner) |
void | Start | ( | const TAnimationConfig & | aConfig | ) | [virtual] |
Reimplemented from CAnimation::Start(const TAnimationConfig &)
Implements CAnimation::Start.
Parameters | |
---|---|
aConfig | Specifies run time attributes of the animation |