1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /* |
|
21 * File: ExtProgressAnimationControl.h |
|
22 * Created: 17-10-2005 |
|
23 * Author: |
|
24 * |
|
25 */ |
|
26 |
|
27 #ifndef EXTPROGRESSANIMATIONCONTROL_H |
|
28 #define EXTPROGRESSANIMATIONCONTROL_H |
|
29 |
|
30 // INCLUDES |
|
31 #include <coecntrl.h> |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CAknBitmapAnimation; |
|
35 class CAknsBasicBackgroundControlContext; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** CLASS: CExtProgressAnimationControl |
|
40 * |
|
41 * CExtProgressAnimationControl represent animated transition using two |
|
42 * thumbnail images. The thumbnails and transition type can be set |
|
43 * to the control. |
|
44 */ |
|
45 NONSHARABLE_CLASS( CExtProgressAnimationControl ) : public CCoeControl, public MCoeControlObserver |
|
46 { |
|
47 |
|
48 public: |
|
49 |
|
50 /** @name Methods:*/ |
|
51 //@{ |
|
52 /** NewL factory method, pops cleanup stack |
|
53 * |
|
54 * @param aRect - control rectangle |
|
55 * @param aParent - pointer to window owning control |
|
56 * @return pointer to created CExtProgressAnimationControl object |
|
57 */ |
|
58 static CExtProgressAnimationControl * NewL ( |
|
59 const TRect & aRect, |
|
60 const CCoeControl * aParent |
|
61 ); |
|
62 |
|
63 /** Destructor |
|
64 * |
|
65 * @param - |
|
66 * @return - |
|
67 */ |
|
68 ~CExtProgressAnimationControl(); |
|
69 |
|
70 /** StartAnimationL |
|
71 * |
|
72 * Starts animation routine. |
|
73 * |
|
74 * @param - |
|
75 * @return - |
|
76 */ |
|
77 void StartAnimationL( TInt aFrameIntervalInMilliSeconds=-1 ); |
|
78 |
|
79 /** SetAnimationResourceId |
|
80 * |
|
81 * @param - |
|
82 * @return - |
|
83 */ |
|
84 void SetAnimationResourceId(const TInt &aResourceId); |
|
85 |
|
86 /** MinimumSize |
|
87 * |
|
88 * @param - |
|
89 * @return - |
|
90 */ |
|
91 //TSize MinimumSize(); |
|
92 |
|
93 /** SetAnimationResourceId |
|
94 * |
|
95 * @param - |
|
96 * @return - |
|
97 */ |
|
98 void HandleControlEventL(CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/); |
|
99 |
|
100 /** StopAnimation |
|
101 * |
|
102 * @param - |
|
103 * @return - |
|
104 */ |
|
105 void StopAnimation(); |
|
106 |
|
107 /** SetFrameIntervalL |
|
108 * |
|
109 * @param - |
|
110 * @return - |
|
111 */ |
|
112 void SetFrameIntervalL(TInt aFrameIntervalInMilliSeconds); |
|
113 |
|
114 //@} |
|
115 |
|
116 |
|
117 private: |
|
118 |
|
119 /** @name Methods:*/ |
|
120 //@{ |
|
121 |
|
122 /** Default constructor |
|
123 * |
|
124 * @param - |
|
125 * @return - |
|
126 */ |
|
127 CExtProgressAnimationControl(); |
|
128 |
|
129 /** ConstructL |
|
130 * |
|
131 * Second phase constructor |
|
132 * |
|
133 * @param aRect - control rectangle |
|
134 * @param aParent - pointer to window owning control |
|
135 * @param aLeft - left icon |
|
136 * @param aRight - right icon |
|
137 * @return - |
|
138 */ |
|
139 void ConstructL ( |
|
140 const TRect & aRect, |
|
141 const CCoeControl * aParent |
|
142 ); |
|
143 |
|
144 /** SizeChanged |
|
145 * |
|
146 * @see CCoeControl |
|
147 */ |
|
148 void SizeChanged(); |
|
149 |
|
150 /** CountComponentControls |
|
151 * |
|
152 * @see CCoeControl |
|
153 */ |
|
154 //TInt CountComponentControls() const; |
|
155 |
|
156 /** ComponentControl |
|
157 * |
|
158 * @see CCoeControl |
|
159 */ |
|
160 //CCoeControl * ComponentControl (TInt aIndex) const; |
|
161 |
|
162 /** Draw |
|
163 * |
|
164 * @see CCoeControl |
|
165 */ |
|
166 void Draw (const TRect& aRect) const; |
|
167 |
|
168 /** |
|
169 * From CoeControl, MopSupplyObject. |
|
170 * |
|
171 * @param aId |
|
172 */ |
|
173 virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); |
|
174 |
|
175 //@} |
|
176 |
|
177 /** @name Members:*/ |
|
178 //@{ |
|
179 |
|
180 //@} |
|
181 |
|
182 /** @name Members:*/ |
|
183 //@{ |
|
184 |
|
185 TBool iAnimationOn; |
|
186 CAknBitmapAnimation* iAnimation; |
|
187 TInt iAnimationSpeedInMilliSeconds; |
|
188 TInt iBorderWidth; |
|
189 |
|
190 TInt iAnimationResourceId; |
|
191 |
|
192 /** Background context. Skin stuff. */ |
|
193 CAknsBasicBackgroundControlContext* iBgContext; |
|
194 |
|
195 //@} |
|
196 |
|
197 }; |
|
198 |
|
199 #endif |
|
200 |
|
201 // End of File |
|