williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2: // All rights reserved.
williamr@2: // This component and the accompanying materials are made available
williamr@2: // 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: // which accompanies this distribution, and is available
williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2: //
williamr@2: // Initial Contributors:
williamr@2: // Nokia Corporation - initial contribution.
williamr@2: //
williamr@2: // Contributors:
williamr@2: //
williamr@2: // Description:
williamr@2: //
williamr@2: 
williamr@2: #ifndef __ANIMATION_H__
williamr@2: #define __ANIMATION_H__
williamr@2: 
williamr@2: #include <animationmixins.h>
williamr@2: 
williamr@2: class TAnimationConfig;
williamr@2: 
williamr@2: /** Pure virtual base class for animations.
williamr@2: 
williamr@2: This defines an abstracted interface between a client application and an
williamr@2: animation.  Most of the implementation details are handled by an animator
williamr@2: plugin.  The source of the animation data and its interpretation are usually
williamr@2: handled by a data provider.
williamr@2: 
williamr@2: @see CAnimationDataProvider
williamr@2: @see CAnimator
williamr@2: @see MAnimationObserver
williamr@2: @publishedAll
williamr@2: @released*/
williamr@2: class CAnimation : public CBase
williamr@2: 	{
williamr@2: public:
williamr@2: 	/** Causes the animation to start, at the first time step or logical
williamr@2: 	equivalent.  If the animation is already running, it rewinds.
williamr@2: 	@see TAnimationConfig
williamr@2: 	@param aConfig Specifies run time attributes of the animation.*/
williamr@2: 	virtual void Start(const TAnimationConfig& aConfig) = 0;
williamr@2: 	/** Causes the animation to stop, and rewinds to the first frame.*/
williamr@2: 	virtual void Stop() = 0;
williamr@2: 	/** Causes the animation to stop, but without rewinding.*/
williamr@2: 	virtual void Pause() = 0;
williamr@2: 	/** Causes a paused animation to continue from where it left off.*/
williamr@2: 	virtual void Resume() = 0;
williamr@2: 	/** Puts an animation on hold, which is similar to pause, but keeps
williamr@2: 	track of the time steps passing and catches up when resumed.  This
williamr@2: 	can be used to temporarily cease processing an animation without it
williamr@2: 	getting out of step with others.*/
williamr@2: 	virtual void Hold() = 0;
williamr@2: 	/** Resumes a held animation.*/
williamr@2: 	virtual void Unhold() = 0;
williamr@2: 	/** Sets the coordinates of the animation.  This generally refers
williamr@2: 	to the top left corner of the total area the animation covers.
williamr@2: 	@param aPoint The new coordinates of the animation (usually the top left
williamr@2: 	corner)*/
williamr@2: 	virtual void SetPosition(const TPoint& aPoint) = 0;
williamr@2: 	/** Causes whatever ticker this animation provides to its animator to
williamr@2: 	be frozen untill a corresponding call to unfreeze.
williamr@2: 	
williamr@2: 	You should not normally need to call this function.
williamr@2: 	@see Unfreeze()*/
williamr@2: 	virtual void Freeze() = 0;
williamr@2: 	/** Causes whatever ticker this animation provides to its animator to
williamr@2: 	be unfrozen.
williamr@2: 	
williamr@2: 	You should not normally need to call this function.
williamr@2: 	@see Freeze()*/	
williamr@2: 	virtual void Unfreeze() = 0;
williamr@2: 	};
williamr@2: 
williamr@2: #endif //__ANIMATION_H__