author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
parent 0 | 061f57f2323e |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@2 | 4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@2 | 6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
#ifndef __ANIMATION_H__ |
williamr@2 | 17 |
#define __ANIMATION_H__ |
williamr@2 | 18 |
|
williamr@2 | 19 |
#include <animationmixins.h> |
williamr@2 | 20 |
|
williamr@2 | 21 |
class TAnimationConfig; |
williamr@2 | 22 |
|
williamr@2 | 23 |
/** Pure virtual base class for animations. |
williamr@2 | 24 |
|
williamr@2 | 25 |
This defines an abstracted interface between a client application and an |
williamr@2 | 26 |
animation. Most of the implementation details are handled by an animator |
williamr@2 | 27 |
plugin. The source of the animation data and its interpretation are usually |
williamr@2 | 28 |
handled by a data provider. |
williamr@2 | 29 |
|
williamr@2 | 30 |
@see CAnimationDataProvider |
williamr@2 | 31 |
@see CAnimator |
williamr@2 | 32 |
@see MAnimationObserver |
williamr@2 | 33 |
@publishedAll |
williamr@2 | 34 |
@released*/ |
williamr@2 | 35 |
class CAnimation : public CBase |
williamr@2 | 36 |
{ |
williamr@2 | 37 |
public: |
williamr@2 | 38 |
/** Causes the animation to start, at the first time step or logical |
williamr@2 | 39 |
equivalent. If the animation is already running, it rewinds. |
williamr@2 | 40 |
@see TAnimationConfig |
williamr@2 | 41 |
@param aConfig Specifies run time attributes of the animation.*/ |
williamr@2 | 42 |
virtual void Start(const TAnimationConfig& aConfig) = 0; |
williamr@2 | 43 |
/** Causes the animation to stop, and rewinds to the first frame.*/ |
williamr@2 | 44 |
virtual void Stop() = 0; |
williamr@2 | 45 |
/** Causes the animation to stop, but without rewinding.*/ |
williamr@2 | 46 |
virtual void Pause() = 0; |
williamr@2 | 47 |
/** Causes a paused animation to continue from where it left off.*/ |
williamr@2 | 48 |
virtual void Resume() = 0; |
williamr@2 | 49 |
/** Puts an animation on hold, which is similar to pause, but keeps |
williamr@2 | 50 |
track of the time steps passing and catches up when resumed. This |
williamr@2 | 51 |
can be used to temporarily cease processing an animation without it |
williamr@2 | 52 |
getting out of step with others.*/ |
williamr@2 | 53 |
virtual void Hold() = 0; |
williamr@2 | 54 |
/** Resumes a held animation.*/ |
williamr@2 | 55 |
virtual void Unhold() = 0; |
williamr@2 | 56 |
/** Sets the coordinates of the animation. This generally refers |
williamr@2 | 57 |
to the top left corner of the total area the animation covers. |
williamr@2 | 58 |
@param aPoint The new coordinates of the animation (usually the top left |
williamr@2 | 59 |
corner)*/ |
williamr@2 | 60 |
virtual void SetPosition(const TPoint& aPoint) = 0; |
williamr@2 | 61 |
/** Causes whatever ticker this animation provides to its animator to |
williamr@2 | 62 |
be frozen untill a corresponding call to unfreeze. |
williamr@2 | 63 |
|
williamr@2 | 64 |
You should not normally need to call this function. |
williamr@2 | 65 |
@see Unfreeze()*/ |
williamr@2 | 66 |
virtual void Freeze() = 0; |
williamr@2 | 67 |
/** Causes whatever ticker this animation provides to its animator to |
williamr@2 | 68 |
be unfrozen. |
williamr@2 | 69 |
|
williamr@2 | 70 |
You should not normally need to call this function. |
williamr@2 | 71 |
@see Freeze()*/ |
williamr@2 | 72 |
virtual void Unfreeze() = 0; |
williamr@2 | 73 |
}; |
williamr@2 | 74 |
|
williamr@2 | 75 |
#endif //__ANIMATION_H__ |