|
||
class CBasicAnimation : public CAnimation, public MAnimationDrawer, public MAnimationDataProviderObserver;
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 CBasicAnimation::Draw(CWindowGc &)const
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.
MAnimationDataProviderObserver
- Interface from a data provider to an animation
MAnimationDrawer
- Interface used by an animator to during the rendering process.
CBase
-
Base class for all classes to be instantiated on the heap.
CAnimation
- Pure virtual base class for animations.
CBasicAnimation
- Implementation of CAnimation for purely client side animations.
Defined in CBasicAnimation
:
AnimatorDataType()const
Called by the animator plugin loading routine to determine the type of data for ...AnimatorDraw()
Called by the animator when it needs to draw a new frame AnimatorInitialisedL(const TSize &)
Called by the animator when it is ready to begin running. AnimatorResetL()
Called by the animator when it is no longer ready, usually in response to EAnima...AnimatorTicker()
Called by the animator to obtain an AnimatorTicker, to which it will add itself ...CBasicAnimation_Reserved1()
Reserved for future use CBasicAnimation_Reserved2()
Reserved for future use DataProvider()
Provides an CAnimationDataProvider interface to the client application. DataProviderEventL(TInt,TAny *,TInt)
Receives an event from a data provider. Draw(CWindowGc &)const
This function should be called with a valid graphics context whenever a redraw e...Freeze()
Implements CAnimation::Freeze(). Hold()
Implements CAnimation::Hold(). NewL(CAnimationDataProvider *,const TPoint &,MAnimationObserver *,const CCoeControl *)
Two stage constructor. This creates and returns a new basic animation.NewL(CAnimationDataProvider *,const TPoint &,RWsSession &,RWindow &,MAnimationObserver *)
Two stage constructor.NewL(CAnimationDataProvider *,const TPoint &,RWsSession &,RWindow &,const TDesC8 &,MAnimationObserver *)
Two stage constructor.NewL(CAnimationDataProvider *,const TPoint &,const TDesC8 &,MAnimationObserver *,const CCoeControl *)
Two stage constructor.Pause()
Implements CAnimation::Pause(). Position()const
Returns the current drawing position. Resume()
Implements CAnimation::Resume(). SetHostL(const CCoeControl *)
This function lets you set the host at a later stage if you haven't got access t...SetPosition(const TPoint &)
Implements CAnimation::SetPosition(const TPoint &).Size()const
Gets the size of the smallest bounding rectangle that will be required to render...Start(const TAnimationConfig &)
Implements CAnimation::Start(const TAnimationConfig &).Stop()
Implements CAnimation::Stop(). Unfreeze()
Implements CAnimation::Unfreeze(). Unhold()
Implements CAnimation::Unhold(). ~CBasicAnimation()
Destructor. Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from MAnimationDataProviderObserver
:
MAnimationDataProviderObserver_Reserved1()
Reserved for future use MAnimationDataProviderObserver_Reserved2()
Reserved for future use CAnimationDataProvider
Pure virtual base class for data providers.IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider *aDataProvider, const TPoint &aPoint, RWsSession &aWs, RWindow
&aWindow, MAnimationObserver *aObserver=0);
Two stage constructor.
This creates and returns a new basic animation.
|
|
NewL(CAnimationDataProvider *,const TPoint &,RWsSession &,RWindow &,const TDesC8 &,MAnimationObserver *)
IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider *aDataProvider, const TPoint &aPoint, RWsSession &aWs, RWindow
&aWindow, const TDesC8 &aDataType, MAnimationObserver *aObserver=0);
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.
|
|
IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider *aDataProvider, const TPoint &aPoint, MAnimationObserver *aObserver,
const CCoeControl *aHost);
Two stage constructor. This creates and returns a new basic animation.
|
|
NewL(CAnimationDataProvider *,const TPoint &,const TDesC8 &,MAnimationObserver *,const CCoeControl *)
IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider *aDataProvider, const TPoint &aPoint, const TDesC8 &aDataType,
MAnimationObserver *aObserver, const CCoeControl *aHost);
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.
|
|
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.
|
inline CAnimationDataProvider* DataProvider();
Provides an CAnimationDataProvider
interface to the client application.
|
inline const TPoint& Position() const;
Returns the current drawing position.
|
inline const TSize& Size() const;
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.
|
virtual void Start(const TAnimationConfig &aConfig);
Implements CAnimation::Start(const TAnimationConfig &)
.
|
virtual void SetPosition(const TPoint &aPoint);
Implements CAnimation::SetPosition(const TPoint &)
.
|
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.
|
private: virtual void DataProviderEventL(TInt aEvent, TAny *aData, TInt aDataSize);
Receives an event from a data provider.
|
private: virtual void AnimatorDraw();
Called by the animator when it needs to draw a new frame
private: virtual void AnimatorInitialisedL(const TSize &aSize);
Called by the animator when it is ready to begin running.
|
private: virtual void AnimatorResetL();
Called by the animator when it is no longer ready, usually in response to EAnimationDataChanged
private: virtual const TPtrC8 AnimatorDataType() const;
Called by the animator plugin loading routine to determine the type of data for which an animator is required.
|
private: virtual CAnimationTicker& AnimatorTicker();
Called by the animator to obtain an AnimatorTicker, to which it will add itself whenever it is running.
|