#include <mw/basicanimation.h>
Link against: animation.lib
class CBasicAnimation : public CAnimation, public MAnimationDrawer, public MAnimationDataProviderObserver, public CAnimation, public MAnimationDrawer, public MAnimationDataProviderObserver |
Public Member Functions | |
---|---|
~CBasicAnimation() | |
CAnimationDataProvider * | DataProvider() |
IMPORT_C void | Draw(CWindowGc &) |
virtual void | Freeze() |
virtual void | Hold() |
IMPORT_C CBasicAnimation * | NewL(CAnimationDataProvider *, const TPoint &, RWsSession &, RWindow &, MAnimationObserver *) |
IMPORT_C CBasicAnimation * | NewL(CAnimationDataProvider *, const TPoint &, RWsSession &, RWindow &, const TDesC8 &, MAnimationObserver *) |
IMPORT_C CBasicAnimation * | NewL(CAnimationDataProvider *, const TPoint &, MAnimationObserver *, const CCoeControl *) |
IMPORT_C CBasicAnimation * | NewL(CAnimationDataProvider *, const TPoint &, const TDesC8 &, MAnimationObserver *, const CCoeControl *) |
virtual void | Pause() |
const TPoint & | Position() |
virtual void | Resume() |
IMPORT_C void | SetHostL(const CCoeControl *) |
virtual void | SetPosition(const TPoint &) |
const TSize & | Size() |
virtual void | Start(const TAnimationConfig &) |
virtual void | Stop() |
virtual void | Unfreeze() |
virtual void | Unhold() |
Protected Member Functions | |
---|---|
CBasicAnimation(CAnimationDataProvider *, const TPoint &, RWsSession *, RWindow *, MAnimationObserver *) | |
CBasicAnimation() | |
CBasicAnimation(CAnimationDataProvider *, const TPoint &, MAnimationObserver *) | |
virtual IMPORT_C void | CBasicAnimation_Reserved1() |
virtual IMPORT_C void | CBasicAnimation_Reserved2() |
void | ConstructL(const TDesC8 &) |
void | ConstructL(const TDesC8 &, const CCoeControl *) |
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 purely client side animations.
A basic animation accepts a data provider during construction, loads the appropriate animator plugin, and implements the interface defined in CAnimation.
A basic animation must be associated with an RWindow. Redraw events will be received by the client application whenever the animation needs to draw a new frame, and it is the applications responsibility to call Draw() while handling these events. It is also the client applications responsibility to handle visibility events and place the animation on hold when it isn't visible. This saves on CPU usage and ultimately prolongs battery life.
See also: CAnimationDataProvider
CBasicAnimation | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | ||
RWsSession * | aWs, | ||
RWindow * | aWindow, | ||
MAnimationObserver * | aObserver | ||
) | [protected] |
CBasicAnimation | ( | ) | [protected] |
CBasicAnimation | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | ||
MAnimationObserver * | aObserver | ||
) | [protected] |
IMPORT_C void | CBasicAnimation_Reserved1 | ( | ) | [protected, virtual] |
Reserved for future use
IMPORT_C void | CBasicAnimation_Reserved2 | ( | ) | [protected, virtual] |
Reserved for future use
void | ConstructL | ( | const TDesC8 & | aDataType | ) | [protected] |
void | ConstructL | ( | const TDesC8 & | aDataType, |
const CCoeControl * | aHost | |||
) | [protected] |
CAnimationDataProvider * | DataProvider | ( | ) | [inline] |
Provides an CAnimationDataProvider interface to the client application.
IMPORT_C void | Draw | ( | CWindowGc & | aGc | ) | const |
This function should be called with a valid graphics context whenever a redraw event is received for the window this animation resides in.
The graphics context attributes will not be modified, which means effects such as opacity can be applied to it before the call to Draw.
Parameters | |
---|---|
aGc | A graphics context which will be used for blitting the animation frame onto the window |
IMPORT_C CBasicAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
RWsSession & | aWs, | |||
RWindow & | aWindow, | |||
MAnimationObserver * | aObserver = 0 | |||
) | [static] |
Two stage constructor.
This creates and returns a new basic 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 animation in the window (top left corner) |
aWs | A session with the window server |
aWindow | The window in which the animation will be drawn |
aObserver | An optional receiver of animation events (such as errors) |
IMPORT_C CBasicAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
RWsSession & | aWs, | |||
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 animation in the window (top left corner) |
aWs | A session with the window server |
aWindow | The window in which the animation will be drawn |
aDataType | Overrides the data type specified by the data provider |
aObserver | An optional receiver of animation events (such as errors) |
IMPORT_C CBasicAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
MAnimationObserver * | aObserver, | |||
const CCoeControl * | aHost | |||
) | [static] |
Two stage constructor. This creates and returns a new basic 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 animation in the window (top left corner) |
aObserver | An optional receiver of animation events (such as errors) |
aHost | The CCoeControl responsible for drawing this animation |
IMPORT_C CBasicAnimation * | NewL | ( | CAnimationDataProvider * | aDataProvider, |
const TPoint & | aPoint, | |||
const TDesC8 & | aDataType, | |||
MAnimationObserver * | aObserver, | |||
const CCoeControl * | aHost | |||
) | [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 animation in the window (top left corner) |
aDataType | Overrides the data type specified by the data provider |
aObserver | An optional receiver of animation events (such as errors) |
aHost | The CCoeControl responsible for drawing this animation |
const TPoint & | Position | ( | ) | const [inline] |
Returns the current drawing position.
IMPORT_C void | SetHostL | ( | const CCoeControl * | aHost | ) |
This function lets you set the host at a later stage if you haven't got access to it during construction, or if you for some reason need to change it in run time.
void | SetPosition | ( | const TPoint & | aPoint | ) | [virtual] |
Reimplemented from CAnimation::SetPosition(const TPoint &)
Implements CAnimation::SetPosition.
Parameters | |
---|---|
aPoint | The new location of the top left corner of the animation, relative to the window in which it is to be drawn |
const TSize & | Size | ( | ) | const [inline] |
Gets the size of the smallest bounding rectangle that will be required to render the animation.
This function is called when the animator is ready to begin animating. The animator cannot be started until it has called this function.
void | Start | ( | const TAnimationConfig & | aConfig | ) | [virtual] |
Reimplemented from CAnimation::Start(const TAnimationConfig &)
Implements CAnimation::Start.
Parameters | |
---|---|
aConfig | Flags and possibly data regarding the way in which the animation should be run |