1 /* |
|
2 * Copyright (c) 2005 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: Source file for UPnP navi pane container |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 // system |
|
22 #include <AknUtils.h> |
|
23 #include <upnpstring.h> |
|
24 #include <aknlists.h> |
|
25 #include <AknIconArray.h> |
|
26 #include <aknnavilabel.h> |
|
27 #include <aknnavide.h> |
|
28 #include <akntitle.h> |
|
29 #include <StringLoader.h> |
|
30 #include <aknnotewrappers.h> |
|
31 #include <layoutmetadata.cdl.h> |
|
32 #include <eiklabel.h> |
|
33 #include <AknIconUtils.h> |
|
34 #include <AknsBasicBackgroundControlContext.h> |
|
35 #include <data_caging_path_literals.hrh> |
|
36 #include <layoutmetadata.cdl.h> |
|
37 #include <AknBidiTextUtils.h> |
|
38 #include <bautils.h> |
|
39 |
|
40 // internal |
|
41 #include "upnpnavipanecontainer.h" |
|
42 #include <upnpcommonui.rsg> |
|
43 #include <upnpcommonui.mbg> |
|
44 #include "upnpperiodic.h" |
|
45 |
|
46 _LIT( KComponentLogfile, "commonui.txt"); |
|
47 #include "upnplog.h" |
|
48 |
|
49 _LIT( KAknCommonUIMbmFileName, "\\resource\\apps\\upnpcommonui.mbm" ); |
|
50 |
|
51 // CONSTANTS |
|
52 const TInt KPeriodicTimerDelay = 1000000; // microseconds |
|
53 const TInt KPeriodicTimerInterval = 200000; // microseconds |
|
54 _LIT( KUPnPCommonUiRscFile, "\\resource\\upnpcommonui.rsc" ); |
|
55 |
|
56 // ============================ MEMBER FUNCTIONS ============================ |
|
57 |
|
58 // -------------------------------------------------------------------------- |
|
59 // CUPnPNaviPaneContainer::CUPnPNaviPaneContainer |
|
60 // -------------------------------------------------------------------------- |
|
61 // |
|
62 CUPnPNaviPaneContainer::CUPnPNaviPaneContainer() |
|
63 { |
|
64 } |
|
65 |
|
66 // -------------------------------------------------------------------------- |
|
67 // CUPnPNaviPaneContainer::NewL |
|
68 // -------------------------------------------------------------------------- |
|
69 // |
|
70 EXPORT_C CUPnPNaviPaneContainer* CUPnPNaviPaneContainer::NewL( |
|
71 const TRect& aRect, |
|
72 TPoint aPosition, |
|
73 CAknNavigationControlContainer* aParent ) |
|
74 { |
|
75 CUPnPNaviPaneContainer* self = new ( ELeave ) CUPnPNaviPaneContainer(); |
|
76 CleanupStack::PushL( self ); |
|
77 self->ConstructL( aRect, aPosition, aParent ); |
|
78 CleanupStack::Pop(); |
|
79 return self; |
|
80 } |
|
81 |
|
82 // -------------------------------------------------------------------------- |
|
83 // CUPnPNaviPaneContainer::ConstructL |
|
84 // -------------------------------------------------------------------------- |
|
85 // |
|
86 void CUPnPNaviPaneContainer::ConstructL( |
|
87 const TRect& aRect, |
|
88 TPoint aPosition, |
|
89 CAknNavigationControlContainer* aParent ) |
|
90 { |
|
91 iCoeEnv = CEikonEnv::Static(); |
|
92 RFs& fileSession = iCoeEnv->FsSession(); |
|
93 |
|
94 // Load common ui resource file |
|
95 TFileName rscFileName( KUPnPCommonUiRscFile ); |
|
96 TFileName dllName; |
|
97 Dll::FileName( dllName ); |
|
98 TBuf<2> drive = dllName.Left( 2 ); // Drive letter followed by ':' |
|
99 rscFileName.Insert( 0, drive ); |
|
100 |
|
101 // Get the exact filename of the resource file |
|
102 BaflUtils::NearestLanguageFile( fileSession, rscFileName ); |
|
103 // Check if the resource file exists or not |
|
104 if ( !BaflUtils::FileExists( fileSession, rscFileName ) ) |
|
105 { |
|
106 User::Leave( KErrNotFound ); |
|
107 } |
|
108 iResFileOffset = iCoeEnv->AddResourceFileL( rscFileName ); |
|
109 |
|
110 |
|
111 // Create label |
|
112 iFirstDrawDelayWaited = EFalse; |
|
113 |
|
114 iPosition.iX = aPosition.iX; |
|
115 iPosition.iY = aPosition.iY; |
|
116 |
|
117 TRect backgroundRect = aRect; |
|
118 backgroundRect.iTl.iX = -iPosition.iX; |
|
119 |
|
120 iSkinContext = CAknsBasicBackgroundControlContext::NewL( |
|
121 KAknsIIDQsnBgNavipaneSolid , backgroundRect, EFalse ); |
|
122 |
|
123 SetPosition(iPosition); |
|
124 |
|
125 SetRect(aRect); |
|
126 CreateWindowL( aParent ); |
|
127 |
|
128 iIcon1 = LoadIconL( EFrame1, this ); |
|
129 iIcon2 = LoadIconL( EFrame2, this ); |
|
130 iIcon3 = LoadIconL( EFrame3, this ); |
|
131 iIcon4 = LoadIconL( EFrame4, this ); |
|
132 iIcon5 = LoadIconL( EFrame5, this ); |
|
133 iIcon6 = LoadIconL( EFrame6, this ); |
|
134 iIcon7 = LoadIconL( EFrame7, this ); |
|
135 iIcon8 = LoadIconL( EFrame8, this ); |
|
136 iIcon9 = LoadIconL( EFrame9, this ); |
|
137 |
|
138 AknIconUtils::SetSize( iIcon1->Bitmap(), |
|
139 TSize(aRect.Height(), |
|
140 aRect.Height() ) ); //width = height, on purpose |
|
141 |
|
142 AknIconUtils::SetSize( iIcon2->Bitmap(), |
|
143 TSize(aRect.Height(), |
|
144 aRect.Height() ) ); //width = height, on purpose |
|
145 |
|
146 AknIconUtils::SetSize( iIcon3->Bitmap(), |
|
147 TSize(aRect.Height(), |
|
148 aRect.Height() ) ); //width = height, on purpose |
|
149 |
|
150 AknIconUtils::SetSize( iIcon4->Bitmap(), |
|
151 TSize(aRect.Height(), |
|
152 aRect.Height() ) ); //width = height, on purpose |
|
153 |
|
154 AknIconUtils::SetSize( iIcon5->Bitmap(), |
|
155 TSize(aRect.Height(), |
|
156 aRect.Height() ) ); //width = height, on purpose |
|
157 |
|
158 AknIconUtils::SetSize( iIcon6->Bitmap(), |
|
159 TSize(aRect.Height(), |
|
160 aRect.Height() ) ); //width = height, on purpose |
|
161 |
|
162 AknIconUtils::SetSize( iIcon7->Bitmap(), |
|
163 TSize(aRect.Height(), |
|
164 aRect.Height() ) ); //width = height, on purpose |
|
165 |
|
166 AknIconUtils::SetSize( iIcon8->Bitmap(), |
|
167 TSize(aRect.Height(), |
|
168 aRect.Height() ) ); //width = height, on purpose |
|
169 |
|
170 AknIconUtils::SetSize( iIcon9->Bitmap(), |
|
171 TSize(aRect.Height(), |
|
172 aRect.Height() ) ); //width = height, on purpose |
|
173 |
|
174 iNavipaneIcon = iIcon1; //set first image in animation |
|
175 |
|
176 iPeriodic = CUPnPPeriodic::NewL( CActive::EPriorityUserInput ); |
|
177 iPeriodic->Start( KPeriodicTimerDelay, |
|
178 KPeriodicTimerInterval, |
|
179 TCallBack(UpdateAnimationL, this ) ); |
|
180 |
|
181 } |
|
182 |
|
183 // -------------------------------------------------------------------------- |
|
184 // CUPnPNaviPaneContainer::~CUPnPNaviPaneContainer |
|
185 // -------------------------------------------------------------------------- |
|
186 // |
|
187 CUPnPNaviPaneContainer::~CUPnPNaviPaneContainer() |
|
188 { |
|
189 if ( iResFileOffset ) |
|
190 { |
|
191 iCoeEnv->DeleteResourceFile( iResFileOffset ); |
|
192 iResFileOffset = 0; |
|
193 } |
|
194 |
|
195 if ( iPeriodic ) |
|
196 { |
|
197 iPeriodic->Cancel(); |
|
198 delete iPeriodic; |
|
199 } |
|
200 DeleteIcon( EFrame1 ); |
|
201 DeleteIcon( EFrame2 ); |
|
202 DeleteIcon( EFrame3 ); |
|
203 DeleteIcon( EFrame4 ); |
|
204 DeleteIcon( EFrame5 ); |
|
205 DeleteIcon( EFrame6 ); |
|
206 DeleteIcon( EFrame7 ); |
|
207 DeleteIcon( EFrame8 ); |
|
208 DeleteIcon( EFrame9 ); |
|
209 delete iSkinContext; |
|
210 /* |
|
211 delete iLabel; |
|
212 */ |
|
213 } |
|
214 |
|
215 // -------------------------------------------------------------------------- |
|
216 // CUPnPNaviPaneContainer::CountComponentControls |
|
217 // -------------------------------------------------------------------------- |
|
218 // |
|
219 TInt CUPnPNaviPaneContainer::CountComponentControls() const |
|
220 { |
|
221 return 0; |
|
222 } |
|
223 |
|
224 // -------------------------------------------------------------------------- |
|
225 // CUPnPNaviPaneContainer::ComponentControl |
|
226 // -------------------------------------------------------------------------- |
|
227 // |
|
228 CCoeControl* CUPnPNaviPaneContainer::ComponentControl( TInt /*aIndex*/ ) const |
|
229 { |
|
230 return NULL; |
|
231 } |
|
232 |
|
233 // -------------------------------------------------------------------------- |
|
234 // CUPnPNaviPaneContainer::Draw |
|
235 // -------------------------------------------------------------------------- |
|
236 // |
|
237 void CUPnPNaviPaneContainer::Draw( const TRect& aRect ) const |
|
238 { |
|
239 // Do not draw custom navi pane in landscape orientation |
|
240 if (Layout_Meta_Data::IsLandscapeOrientation() == EFalse) |
|
241 { |
|
242 if (iFirstDrawDelayWaited) |
|
243 { |
|
244 CWindowGc& gc = SystemGc(); |
|
245 gc.Clear(); |
|
246 |
|
247 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
248 |
|
249 if (iSkinContext) |
|
250 {//Draw the skin background |
|
251 AknsDrawUtils::Background( |
|
252 skin, iSkinContext, this, gc, aRect); |
|
253 } |
|
254 else |
|
255 {// clear the area |
|
256 gc.SetBrushColor( iEikonEnv->ControlColor( |
|
257 EColorWindowBackground, *this ) ); |
|
258 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
259 gc.Clear( aRect ); |
|
260 } |
|
261 |
|
262 |
|
263 const CFont* normalFont = iCoeEnv->AnnotationFont(); |
|
264 TInt baseline = ((aRect.Height() / 2) + |
|
265 (normalFont->AscentInPixels() / 2)); |
|
266 |
|
267 TRgb color(0,0,0); |
|
268 |
|
269 TInt err = AknsUtils::GetCachedColor( skin, color, |
|
270 KAknsIIDQsnTextColors, |
|
271 EAknsCIQsnTextColorsCG2 ); |
|
272 |
|
273 |
|
274 gc.UseFont(normalFont); |
|
275 if( KErrNone == err ) |
|
276 { |
|
277 gc.SetPenColor( color ); |
|
278 } |
|
279 else |
|
280 { |
|
281 gc.SetPenColor( KRgbBlack ); |
|
282 } |
|
283 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
284 |
|
285 HBufC* naviPaneText = NULL; |
|
286 TRAP( err, naviPaneText = StringLoader::LoadL( |
|
287 R_UPNPCOMMONUI_SERVER_SEARCH_MAIN ) ); |
|
288 |
|
289 TSize animationFrameSize = |
|
290 iNavipaneIcon->Bitmap()->SizeInPixels(); |
|
291 |
|
292 const TInt textWidth = (aRect.Width() - |
|
293 animationFrameSize.iWidth); |
|
294 |
|
295 TBuf< 128 > textBuffer; |
|
296 |
|
297 if( KErrNone == err ) |
|
298 { |
|
299 if (AknBidiTextUtils::ConvertToVisualAndClip( *naviPaneText, |
|
300 textBuffer, |
|
301 *normalFont, |
|
302 textWidth, |
|
303 textWidth)) |
|
304 { |
|
305 gc.DrawText(textBuffer, aRect, baseline, |
|
306 CGraphicsContext::ELeft); |
|
307 } |
|
308 else //text not clipped, default case |
|
309 { |
|
310 gc.DrawText(textBuffer, aRect, baseline, |
|
311 CGraphicsContext::ELeft); |
|
312 } |
|
313 delete naviPaneText; |
|
314 } |
|
315 TPoint upperLeftCorner((aRect.Width() - |
|
316 animationFrameSize.iWidth), 0); |
|
317 |
|
318 gc.BitBltMasked(upperLeftCorner, iNavipaneIcon->Bitmap(), Rect(), |
|
319 iNavipaneIcon->Mask(), EFalse); |
|
320 } |
|
321 } |
|
322 } |
|
323 |
|
324 // -------------------------------------------------------------------------- |
|
325 // CUPnPNaviPaneContainer::LoadIconL |
|
326 // -------------------------------------------------------------------------- |
|
327 // |
|
328 |
|
329 |
|
330 CGulIcon* CUPnPNaviPaneContainer::LoadIconL( TAnimationFrames aAnimationState, |
|
331 TAny* aDlg) |
|
332 { |
|
333 static_cast<CUPnPNaviPaneContainer*>( aDlg )-> |
|
334 DeleteIcon( aAnimationState ); |
|
335 |
|
336 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
337 CFbsBitmap* bitmap = NULL; |
|
338 CFbsBitmap* mask = NULL; |
|
339 TInt id = 0; |
|
340 TInt maskId = 0; |
|
341 TAknsItemID skinId = KAknsIIDNone; |
|
342 |
|
343 switch ( aAnimationState ) |
|
344 { |
|
345 |
|
346 case EFrame1: |
|
347 { |
|
348 id = EMbmUpnpcommonuiQgn_indi_upnp_search_1; |
|
349 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_1_mask; |
|
350 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
351 break; |
|
352 } |
|
353 case EFrame2: |
|
354 { |
|
355 id = EMbmUpnpcommonuiQgn_indi_upnp_search_2; |
|
356 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_2_mask; |
|
357 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
358 break; |
|
359 } |
|
360 case EFrame3: |
|
361 { |
|
362 id = EMbmUpnpcommonuiQgn_indi_upnp_search_3; |
|
363 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_3_mask; |
|
364 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
365 break; |
|
366 } |
|
367 case EFrame4: |
|
368 { |
|
369 id = EMbmUpnpcommonuiQgn_indi_upnp_search_4; |
|
370 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_4_mask; |
|
371 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
372 break; |
|
373 } |
|
374 case EFrame5: |
|
375 { |
|
376 id = EMbmUpnpcommonuiQgn_indi_upnp_search_5; |
|
377 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_5_mask; |
|
378 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
379 break; |
|
380 } |
|
381 case EFrame6: |
|
382 { |
|
383 id = EMbmUpnpcommonuiQgn_indi_upnp_search_6; |
|
384 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_6_mask; |
|
385 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
386 break; |
|
387 } |
|
388 case EFrame7: |
|
389 { |
|
390 id = EMbmUpnpcommonuiQgn_indi_upnp_search_7; |
|
391 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_7_mask; |
|
392 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
393 break; |
|
394 } |
|
395 case EFrame8: |
|
396 { |
|
397 id = EMbmUpnpcommonuiQgn_indi_upnp_search_8; |
|
398 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_8_mask; |
|
399 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
400 break; |
|
401 } |
|
402 case EFrame9: |
|
403 { |
|
404 id = EMbmUpnpcommonuiQgn_indi_upnp_search_9; |
|
405 maskId = EMbmUpnpcommonuiQgn_indi_upnp_search_9_mask; |
|
406 skinId = KAknsIIDQsnBgNavipaneSolid; |
|
407 break; |
|
408 } |
|
409 default: |
|
410 { |
|
411 break; |
|
412 } |
|
413 } |
|
414 |
|
415 TFileName mbmFileName( KAknCommonUIMbmFileName ); |
|
416 TFileName dllName; |
|
417 Dll::FileName( dllName ); |
|
418 TBuf<2> drive = dllName.Left( 2 ); // Drive letter followed by ':' |
|
419 mbmFileName.Insert( 0, drive ); |
|
420 |
|
421 AknsUtils::CreateIconL( skin, |
|
422 skinId, |
|
423 bitmap, |
|
424 mask, |
|
425 mbmFileName, |
|
426 id, |
|
427 maskId ); |
|
428 |
|
429 CleanupStack::PushL(mask); |
|
430 CleanupStack::PushL(bitmap); |
|
431 |
|
432 |
|
433 // Get the color of the search text |
|
434 TRgb color(0,0,0); |
|
435 TBool useWhite = EFalse; |
|
436 TInt err = AknsUtils::GetCachedColor( skin, color, |
|
437 KAknsIIDQsnTextColors, |
|
438 EAknsCIQsnTextColorsCG2 ); |
|
439 |
|
440 |
|
441 |
|
442 // If text color is closer to white, use white animation |
|
443 if( KErrNone == err && |
|
444 color.Difference(KRgbBlack) > color.Difference(KRgbWhite)) |
|
445 { |
|
446 useWhite = ETrue; |
|
447 } |
|
448 |
|
449 |
|
450 |
|
451 err = KErrNone; |
|
452 if( useWhite ) |
|
453 { |
|
454 TInt imgSize = static_cast<CUPnPNaviPaneContainer*>( |
|
455 aDlg )->Rect().Height(); |
|
456 AknIconUtils::SetSize( bitmap,TSize(imgSize,imgSize) ); |
|
457 TSize size = bitmap->SizeInPixels(); |
|
458 |
|
459 CleanupStack::PopAndDestroy(bitmap); |
|
460 bitmap = new(ELeave) CFbsBitmap(); |
|
461 CleanupStack::PushL(bitmap); |
|
462 err = bitmap->Create(size, EColor16M); |
|
463 } |
|
464 |
|
465 |
|
466 CGulIcon* icon = CGulIcon::NewL( bitmap, mask ); |
|
467 icon->SetBitmapsOwnedExternally( EFalse ); |
|
468 |
|
469 CleanupStack::Pop( bitmap ); // bitmap, mask |
|
470 CleanupStack::Pop( mask ); // bitmap, mask |
|
471 bitmap = NULL; |
|
472 mask = NULL; |
|
473 |
|
474 return icon; |
|
475 } |
|
476 |
|
477 void CUPnPNaviPaneContainer::DeleteIcon( TAnimationFrames aAnimationState ) |
|
478 { |
|
479 switch ( aAnimationState ) |
|
480 { |
|
481 case EFrame1: |
|
482 { |
|
483 delete iIcon1; |
|
484 iIcon1 = NULL; |
|
485 break; |
|
486 } |
|
487 case EFrame2: |
|
488 { |
|
489 delete iIcon2; |
|
490 iIcon2 = NULL; |
|
491 break; |
|
492 } |
|
493 case EFrame3: |
|
494 { |
|
495 delete iIcon3; |
|
496 iIcon3 = NULL; |
|
497 break; |
|
498 } |
|
499 case EFrame4: |
|
500 { |
|
501 delete iIcon4; |
|
502 iIcon4 = NULL; |
|
503 break; |
|
504 } |
|
505 case EFrame5: |
|
506 { |
|
507 delete iIcon5; |
|
508 iIcon5 = NULL; |
|
509 break; |
|
510 } |
|
511 case EFrame6: |
|
512 { |
|
513 delete iIcon6; |
|
514 iIcon6 = NULL; |
|
515 break; |
|
516 } |
|
517 case EFrame7: |
|
518 { |
|
519 delete iIcon7; |
|
520 iIcon7 = NULL; |
|
521 break; |
|
522 } |
|
523 case EFrame8: |
|
524 { |
|
525 delete iIcon8; |
|
526 iIcon8 = NULL; |
|
527 break; |
|
528 } |
|
529 case EFrame9: |
|
530 { |
|
531 if (iIcon9) |
|
532 { |
|
533 delete iIcon9; |
|
534 iIcon9 = NULL; |
|
535 } |
|
536 break; |
|
537 } |
|
538 default: |
|
539 break; |
|
540 } |
|
541 } |
|
542 |
|
543 // -------------------------------------------------------------------------- |
|
544 // CUPnPNaviPaneContainer::UpdateAnimation |
|
545 // -------------------------------------------------------------------------- |
|
546 // |
|
547 |
|
548 TBool CUPnPNaviPaneContainer::UpdateAnimationL( TAny* aDlg ) |
|
549 { |
|
550 CUPnPNaviPaneContainer* dlg = |
|
551 static_cast<CUPnPNaviPaneContainer*>( aDlg ); |
|
552 |
|
553 if ( !dlg->iFirstDrawDelayWaited ) |
|
554 { |
|
555 dlg->iFirstDrawDelayWaited = ETrue; |
|
556 } |
|
557 |
|
558 switch ( dlg->iAnimationIndex++ % 9 ) |
|
559 { |
|
560 case 0: |
|
561 { |
|
562 dlg->iNavipaneIcon = dlg->iIcon1; |
|
563 break; |
|
564 } |
|
565 case 1: |
|
566 { |
|
567 dlg->iNavipaneIcon = dlg->iIcon2; |
|
568 break; |
|
569 } |
|
570 case 2: |
|
571 { |
|
572 dlg->iNavipaneIcon = dlg->iIcon3; |
|
573 break; |
|
574 } |
|
575 case 3: |
|
576 { |
|
577 dlg->iNavipaneIcon = dlg->iIcon4; |
|
578 break; |
|
579 } |
|
580 case 4: |
|
581 { |
|
582 dlg->iNavipaneIcon = dlg->iIcon5; |
|
583 break; |
|
584 } |
|
585 case 5: |
|
586 { |
|
587 dlg->iNavipaneIcon = dlg->iIcon6; |
|
588 break; |
|
589 } |
|
590 case 6: |
|
591 { |
|
592 dlg->iNavipaneIcon = dlg->iIcon7; |
|
593 break; |
|
594 } |
|
595 case 7: |
|
596 { |
|
597 dlg->iNavipaneIcon = dlg->iIcon8; |
|
598 break; |
|
599 } |
|
600 case 8: |
|
601 { |
|
602 dlg->iNavipaneIcon = dlg->iIcon9; |
|
603 break; |
|
604 } |
|
605 default: |
|
606 { |
|
607 // error |
|
608 break; |
|
609 } |
|
610 } |
|
611 |
|
612 if (dlg->iAnimationIndex >= 9) |
|
613 { |
|
614 dlg->iAnimationIndex = 0; |
|
615 } |
|
616 |
|
617 dlg->DrawAnimation(); |
|
618 |
|
619 return ETrue; |
|
620 } |
|
621 |
|
622 // -------------------------------------------------------------------------- |
|
623 // CUPnPNaviPaneContainer::DrawAnimation |
|
624 // -------------------------------------------------------------------------- |
|
625 // |
|
626 |
|
627 void CUPnPNaviPaneContainer::DrawAnimation() |
|
628 { |
|
629 TPoint imagePosition; |
|
630 imagePosition.iX = iPosition.iX; |
|
631 imagePosition.iY = iPosition.iY; |
|
632 CWindowGc& gc = SystemGc(); |
|
633 RDrawableWindow* drawWindow = DrawableWindow(); |
|
634 gc.Activate( *drawWindow ); |
|
635 Draw( Rect() ); |
|
636 gc.Deactivate(); |
|
637 } |
|
638 |
|
639 |
|
640 // End of file |
|