1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __ANIMATION_H__
17 #define __ANIMATION_H__
19 #include <animationmixins.h>
21 class TAnimationConfig;
23 /** Pure virtual base class for animations.
25 This defines an abstracted interface between a client application and an
26 animation. Most of the implementation details are handled by an animator
27 plugin. The source of the animation data and its interpretation are usually
28 handled by a data provider.
30 @see CAnimationDataProvider
32 @see MAnimationObserver
35 class CAnimation : public CBase
38 /** Causes the animation to start, at the first time step or logical
39 equivalent. If the animation is already running, it rewinds.
41 @param aConfig Specifies run time attributes of the animation.*/
42 virtual void Start(const TAnimationConfig& aConfig) = 0;
43 /** Causes the animation to stop, and rewinds to the first frame.*/
44 virtual void Stop() = 0;
45 /** Causes the animation to stop, but without rewinding.*/
46 virtual void Pause() = 0;
47 /** Causes a paused animation to continue from where it left off.*/
48 virtual void Resume() = 0;
49 /** Puts an animation on hold, which is similar to pause, but keeps
50 track of the time steps passing and catches up when resumed. This
51 can be used to temporarily cease processing an animation without it
52 getting out of step with others.*/
53 virtual void Hold() = 0;
54 /** Resumes a held animation.*/
55 virtual void Unhold() = 0;
56 /** Sets the coordinates of the animation. This generally refers
57 to the top left corner of the total area the animation covers.
58 @param aPoint The new coordinates of the animation (usually the top left
60 virtual void SetPosition(const TPoint& aPoint) = 0;
61 /** Causes whatever ticker this animation provides to its animator to
62 be frozen untill a corresponding call to unfreeze.
64 You should not normally need to call this function.
66 virtual void Freeze() = 0;
67 /** Causes whatever ticker this animation provides to its animator to
70 You should not normally need to call this function.
72 virtual void Unfreeze() = 0;
75 #endif //__ANIMATION_H__