|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __AnimationGroup_H__ |
|
17 #define __AnimationGroup_H__ |
|
18 |
|
19 #include <animation.h> |
|
20 |
|
21 class CAnimationTls; |
|
22 |
|
23 /** |
|
24 Handles groups of other animations. |
|
25 |
|
26 When it is appropriate to have several animations starting and stopping |
|
27 together, add them all to an animation group and control them through that. |
|
28 |
|
29 In addition to making the code easier to both read and write, the animation |
|
30 group handles synchronisation issues which can occur when issuing a sequence |
|
31 of asynchronous requests. |
|
32 |
|
33 Care must be taken to remove an animation from any groups it may have been |
|
34 added to before deleting it. |
|
35 |
|
36 @publishedAll |
|
37 @released |
|
38 */ |
|
39 class CAnimationGroup : public CAnimation |
|
40 { |
|
41 public: |
|
42 static CAnimationGroup* NewL(); |
|
43 ~CAnimationGroup(); |
|
44 IMPORT_C const RPointerArray<CAnimation>& Animations() const; |
|
45 IMPORT_C RPointerArray<CAnimation>& Animations(); |
|
46 // From CAnimation |
|
47 virtual void Start(const TAnimationConfig& aConfig); |
|
48 virtual void Stop(); |
|
49 virtual void Pause(); |
|
50 virtual void Resume(); |
|
51 virtual void Hold(); |
|
52 virtual void Unhold(); |
|
53 virtual void Freeze(); |
|
54 virtual void Unfreeze(); |
|
55 virtual void SetPosition(const TPoint& aPoint); |
|
56 protected: |
|
57 IMPORT_C virtual void CAnimationGroup_Reserved1(); |
|
58 IMPORT_C virtual void CAnimationGroup_Reserved2(); |
|
59 private: |
|
60 TInt iCAnimationGroup_Reserved; |
|
61 private: |
|
62 CAnimationGroup(); |
|
63 void ConstructL(); |
|
64 CAnimationGroup(const CAnimationGroup&); // no implementation |
|
65 CAnimationGroup& operator=(const CAnimationGroup&); // no implementation |
|
66 private: |
|
67 TInt iFreezeCount; |
|
68 CAnimationTls* iTls; |
|
69 RPointerArray<CAnimation> iAnimations; |
|
70 }; |
|
71 |
|
72 #endif //__AnimationGroup_H__ |