|
1 /* |
|
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implements Xuikon animation component. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef _XNANIMATIONAPADAPTER_H |
|
21 #define _XNANIMATIONAPADAPTER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "xncontroladapter.h" |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CXnNodePluginIf; |
|
29 class CAknBitmapAnimation; |
|
30 class CXnAnimationControl; |
|
31 class CPeriodic; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * @ingroup group_xnbitmapfactory |
|
36 * @lib xn3bitmapfactory.dll |
|
37 * @since Series 60 3.1 |
|
38 */ |
|
39 class CXnAnimationAdapter : public CXnControlAdapter |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * 2 phase construction. |
|
44 */ |
|
45 static CXnAnimationAdapter* NewL(CXnNodePluginIf& aNode); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CXnAnimationAdapter(); |
|
51 |
|
52 public: // From Base classes |
|
53 /** |
|
54 * From CXnControlAdapter Handles the property changes. |
|
55 * @since Series 60 3.1 |
|
56 * @return void. |
|
57 */ |
|
58 void DoHandlePropertyChangeL(CXnProperty* aProperty = NULL); |
|
59 |
|
60 protected: |
|
61 /** |
|
62 * From CCoeControl. |
|
63 * Draws the control. |
|
64 * |
|
65 * @param aRect TRect to draw |
|
66 */ |
|
67 void Draw(const TRect& aRect) const; |
|
68 |
|
69 /** |
|
70 * From CCoeControl. |
|
71 * Control visual state. |
|
72 * |
|
73 * @param aVisible visibility (ETrue/EFalse) |
|
74 */ |
|
75 void MakeVisible( TBool aVisible ); |
|
76 |
|
77 private: |
|
78 /** |
|
79 * Constructor |
|
80 * |
|
81 * @param aNode plugin node |
|
82 */ |
|
83 CXnAnimationAdapter(CXnNodePluginIf& aNode); |
|
84 |
|
85 /** |
|
86 * 2nd phase constructor |
|
87 * |
|
88 * @param aNode plugin node |
|
89 */ |
|
90 void ConstructL(CXnNodePluginIf& aNode); |
|
91 |
|
92 /** |
|
93 * Periodic timer call back |
|
94 * |
|
95 * @param aAny pointer reference |
|
96 */ |
|
97 static TInt TimerCallBack(TAny* aAny); |
|
98 |
|
99 /** |
|
100 * Update the next image for animation |
|
101 * |
|
102 */ |
|
103 void Update(); |
|
104 |
|
105 /** |
|
106 * Starts the animation |
|
107 * |
|
108 */ |
|
109 void StartAnimation(); |
|
110 |
|
111 /** |
|
112 * Stops the animation |
|
113 * |
|
114 */ |
|
115 void StopAnimation(); |
|
116 |
|
117 private: // Data |
|
118 |
|
119 // UI node, not owned |
|
120 CXnNodePluginIf& iNode; |
|
121 |
|
122 // display on(block) or off(none) |
|
123 TBool iDisplay; |
|
124 |
|
125 // Whether the animation started or not |
|
126 TBool iAnimationSarted; |
|
127 |
|
128 // Image Skind Id |
|
129 TAknsItemID iSkinId; |
|
130 |
|
131 // Timer for animation, owned |
|
132 CPeriodic* iPeriodicTimer; |
|
133 }; |
|
134 |
|
135 #endif // _XNANIMATIONAPADAPTER_H |
|
136 |
|
137 // End of File |