epoc32/include/mw/animationgroup.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
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@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.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 __AnimationGroup_H__
williamr@2
    17
#define __AnimationGroup_H__
williamr@2
    18
williamr@2
    19
#include <animation.h>
williamr@2
    20
williamr@2
    21
class CAnimationTls;
williamr@2
    22
williamr@2
    23
/**
williamr@2
    24
Handles groups of other animations.
williamr@2
    25
williamr@2
    26
When it is appropriate to have several animations starting and stopping
williamr@2
    27
together, add them all to an animation group and control them through that.
williamr@2
    28
williamr@2
    29
In addition to making the code easier to both read and write, the animation
williamr@2
    30
group handles synchronisation issues which can occur when issuing a sequence
williamr@2
    31
of asynchronous requests.
williamr@2
    32
williamr@2
    33
Care must be taken to remove an animation from any groups it may have been
williamr@2
    34
added to before deleting it.
williamr@2
    35
williamr@2
    36
@publishedAll
williamr@2
    37
@released
williamr@2
    38
*/
williamr@2
    39
class CAnimationGroup : public CAnimation
williamr@2
    40
	{
williamr@2
    41
public:
williamr@2
    42
	static CAnimationGroup* NewL();
williamr@2
    43
	~CAnimationGroup();
williamr@2
    44
	IMPORT_C const RPointerArray<CAnimation>& Animations() const;
williamr@2
    45
	IMPORT_C RPointerArray<CAnimation>& Animations();
williamr@2
    46
	// From CAnimation
williamr@2
    47
	virtual void Start(const TAnimationConfig& aConfig);
williamr@2
    48
	virtual void Stop();
williamr@2
    49
	virtual void Pause();
williamr@2
    50
	virtual void Resume();
williamr@2
    51
	virtual void Hold();
williamr@2
    52
	virtual void Unhold();
williamr@2
    53
	virtual void Freeze();
williamr@2
    54
	virtual void Unfreeze();
williamr@2
    55
	virtual void SetPosition(const TPoint& aPoint);
williamr@2
    56
protected:
williamr@2
    57
	IMPORT_C virtual void CAnimationGroup_Reserved1();
williamr@2
    58
	IMPORT_C virtual void CAnimationGroup_Reserved2();
williamr@2
    59
private:
williamr@2
    60
	TInt iCAnimationGroup_Reserved;
williamr@2
    61
private:
williamr@2
    62
	CAnimationGroup();
williamr@2
    63
	void ConstructL();
williamr@2
    64
	CAnimationGroup(const CAnimationGroup&); // no implementation
williamr@2
    65
	CAnimationGroup& operator=(const CAnimationGroup&);		 // no implementation
williamr@2
    66
private:
williamr@2
    67
	TInt iFreezeCount;
williamr@2
    68
	CAnimationTls* iTls;
williamr@2
    69
	RPointerArray<CAnimation> iAnimations;
williamr@2
    70
	};
williamr@2
    71
williamr@2
    72
#endif //__AnimationGroup_H__
williamr@4
    73