|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HGVGMEDIAWALL_H_ |
|
19 #define HGVGMEDIAWALL_H_ |
|
20 |
|
21 // INCLUDES |
|
22 #include <coecntrl.h> |
|
23 #include <coemain.h> |
|
24 #include <EGL/egl.h> |
|
25 #include <VG/openvg.h> |
|
26 #include <ganes/HgBufferOwnerIface.h> |
|
27 #include <ganes/HgScrollbarObserverIface.h> |
|
28 #include <akntouchgesturefw.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class MHgScrollBufferObserver; |
|
32 class MHgSelectionObserver; |
|
33 class CHgVgItem; |
|
34 class CGulIcon; |
|
35 class CHgScrollBufferManager; |
|
36 class CHgVgScrollBar; |
|
37 class CHgVgMediaWallRenderer; |
|
38 class CHgVgSkinRenderer; |
|
39 class CHgVgTimer; |
|
40 class CHgVgPopup; |
|
41 class CHgVgButton; |
|
42 class MHgVgMediaWallObserver; |
|
43 class CHgVgLabel; |
|
44 class CHgVgEGL; |
|
45 class THgVgSpring; |
|
46 class CAlfCompositionSource; |
|
47 class CFbsBitmap; |
|
48 |
|
49 // CLASS DECLARATION |
|
50 class CHgVgMediaWall : |
|
51 public CCoeControl, |
|
52 public MHgBufferOwner, |
|
53 public MHgScrollbarObserver, |
|
54 public MCoeForegroundObserver, |
|
55 public AknTouchGestureFw::MAknTouchGestureFwObserver |
|
56 { |
|
57 public: |
|
58 |
|
59 /** |
|
60 * Style of the media wall to use. |
|
61 */ |
|
62 enum THgVgMediaWallStyle |
|
63 { |
|
64 EHgVgMediaWallStyleCoverflowFullScreen, |
|
65 EHgVgMediaWallStyleCoverflowTBonePortrait, |
|
66 EHgVgMediaWallStyleCoverflowTBoneLandscape, |
|
67 EHgVgMediaWallStyleGrid, |
|
68 EHgVgMediaWallStyleUnknown |
|
69 }; |
|
70 |
|
71 /** |
|
72 * Media walls current animation state. |
|
73 */ |
|
74 enum THgVgAnimationState |
|
75 { |
|
76 EHgVgMediaWallAnimationStateIdle, |
|
77 EHgVgMediaWallAnimationStateTransition, |
|
78 EHgVgMediaWallAnimationStateFastTransition, |
|
79 EHgVgMediaWallAnimationStateOpening, |
|
80 EHgVgMediaWallAnimationStateClosing, |
|
81 EHgVgMediaWallAnimationStateItemOpened |
|
82 }; |
|
83 |
|
84 /** |
|
85 * Media walls selection animation type. |
|
86 * Default behaviour is EHgSelectionAnimationFlipToFront. |
|
87 */ |
|
88 enum THgVgOpeningAnimationType |
|
89 { |
|
90 EHgVgOpeningAnimationNone, // no animation takes place when item is tapped |
|
91 EHgVgOpeningAnimationFlipToFront, // flips the opened item by flip angle and fits to set opened item rect. |
|
92 EHgVgOpeningAnimationZoomToFront, // zooms the opened item to set opened item rect. |
|
93 EHgVgOpeningAnimationZoomIn // zooms the item to the back of the camera. |
|
94 }; |
|
95 |
|
96 /** |
|
97 * Event types, CHgVgMediaWall may send through MHgVgMediaWallObserver interface. |
|
98 */ |
|
99 enum THgVgMediaWallEvent |
|
100 { |
|
101 EHgVgMediaWallEventRequestHideSoftkeys, |
|
102 EHgVgMediaWallEventRequestShowSoftkeys |
|
103 }; |
|
104 |
|
105 /** |
|
106 * Flags that define possible mediawall modes |
|
107 */ |
|
108 enum THgVgMediaWallMode |
|
109 { |
|
110 EHgVgMediaWallDrawToWindowGC = 0x0001 |
|
111 }; |
|
112 |
|
113 public: |
|
114 |
|
115 /** |
|
116 * Creates new HgVgMediaWall. |
|
117 * |
|
118 * @param aRect Rect that the control draws onto. |
|
119 * @param aItemCount Total count of items in the mediawall. |
|
120 * @param aStyle style of the mediawall. |
|
121 * @param aEnableScrollBar ETrue to enable scrollbar. |
|
122 * @param aDefaultIcon Default icon to be used. |
|
123 * |
|
124 * @return HgVGMediaWall-object |
|
125 */ |
|
126 IMPORT_C static CHgVgMediaWall* NewL ( const TRect& aRect, |
|
127 TInt aItemCount, |
|
128 THgVgMediaWallStyle aStyle, |
|
129 TBool aEnableScrollBar, |
|
130 MObjectProvider* aParent, |
|
131 CGulIcon* aDefaultIcon = NULL); |
|
132 |
|
133 // Destructor. |
|
134 IMPORT_C virtual ~CHgVgMediaWall(); |
|
135 |
|
136 public: // CCoeControl |
|
137 |
|
138 void Draw(const TRect& aRect ) const; |
|
139 void SizeChanged(); |
|
140 void HandlePointerEventL( const TPointerEvent& aEvent ); |
|
141 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
142 void FocusChanged(TDrawNow aDrawNow); |
|
143 void HandleResourceChange(TInt aType); |
|
144 |
|
145 private: // MHgBufferOwner |
|
146 void Release(TInt aReleaseStart, TInt aReleaseEnd); |
|
147 |
|
148 private: // MHgScrollbarObserver |
|
149 |
|
150 void ScrollBarPositionChanged( const TPoint& aNewPosition ); |
|
151 |
|
152 void HandleNaviStripChar( const TChar& aChar ); |
|
153 |
|
154 public: //MCoeForegroundObserver |
|
155 void HandleGainingForeground(); |
|
156 void HandleLosingForeground(); |
|
157 |
|
158 private: // MAknTouchGestureFwObserver |
|
159 |
|
160 void HandleTouchGestureL( AknTouchGestureFw::MAknTouchGestureFwEvent& aEvent ); |
|
161 |
|
162 public: // NEW FUNCTIONS |
|
163 /** |
|
164 * Re-inits rendering for new window rectangle. |
|
165 * |
|
166 * @param aRect New display rect |
|
167 */ |
|
168 IMPORT_C void InitScreenL( const TRect& aRect ); |
|
169 |
|
170 /** |
|
171 * Refreshes screen. |
|
172 */ |
|
173 IMPORT_C void RefreshScreen( TInt aIndex ); |
|
174 |
|
175 /** |
|
176 * Gives the first index on the screen. |
|
177 * |
|
178 * Note: The index is not guaranteed to be in the range of the scroller items. |
|
179 * Index can be negative if the scroller is scrolled to the way up or |
|
180 * over the count - 1 if scrolled way down. |
|
181 * |
|
182 * @return The index of the first item on the screen. |
|
183 */ |
|
184 IMPORT_C TInt FirstIndexOnScreen(); |
|
185 |
|
186 /** |
|
187 * How many items fit on one screen. |
|
188 * @return Item count. |
|
189 */ |
|
190 IMPORT_C TInt ItemsOnScreen(); |
|
191 |
|
192 /** |
|
193 * Get item at specified index. |
|
194 * |
|
195 * @param aIndex Index of the item that is returned |
|
196 * @return Reference to item. |
|
197 */ |
|
198 IMPORT_C CHgVgItem& ItemL( TInt aIndex ); |
|
199 |
|
200 /** |
|
201 * Resets item at the index position. Old item is deleted. |
|
202 * |
|
203 * @param aItem New item. Ownership transferred. |
|
204 * @param aIndex The index of the item. |
|
205 */ |
|
206 IMPORT_C void SetItem(CHgVgItem* aItem, TInt aIndex); |
|
207 |
|
208 /** |
|
209 * Adds Item. |
|
210 * |
|
211 * @param aItem New item. Ownership transferred. |
|
212 */ |
|
213 IMPORT_C void AddItem(CHgVgItem* aItem); |
|
214 |
|
215 /** |
|
216 * Inserts item at index postion. |
|
217 * |
|
218 * @param aItem New item. Ownership transferred. |
|
219 * @param aIndex The index of the item. |
|
220 */ |
|
221 IMPORT_C void InsertItem(CHgVgItem* aItem, TInt aIndex); |
|
222 |
|
223 /** |
|
224 * Removes item at index position. Removed item is deleted. |
|
225 * |
|
226 * @param aIndex The index of the item. |
|
227 */ |
|
228 IMPORT_C void RemoveItem(TInt aIndex); |
|
229 |
|
230 /** |
|
231 * Returns index of currently selected item in MediaWall. |
|
232 * In the case of EHgVgMediaWallStyleStyleGrid this method can only |
|
233 * return indices of the items at top row. The index of the item picked |
|
234 * by user is on grids case only passed through MHgSelectionObserver interface. |
|
235 * |
|
236 * @return Selected index (KErrNotFound if nothing is selected) |
|
237 */ |
|
238 IMPORT_C TInt SelectedIndex(); |
|
239 |
|
240 /** |
|
241 * Sets selected index. Positions the mediwall into this index. |
|
242 * In case of a grid. The mediawall is positioned into row = aIndex / RowCount. |
|
243 * @param aIndex new selected index. Selection is also made visible. |
|
244 */ |
|
245 IMPORT_C void SetSelectedIndex( TInt aIndex ); |
|
246 |
|
247 /** |
|
248 * Enables Buffering. |
|
249 * @param aObserver Buffer change observer. |
|
250 * @param aBufferSize The size of the buffer. |
|
251 * @param aBufferTreshold The minimum change needed for buffer to be modified. |
|
252 */ |
|
253 IMPORT_C void EnableScrollBufferL( MHgScrollBufferObserver& aObserver, |
|
254 TInt aBufferSize, |
|
255 TInt aBufferTreshold ); |
|
256 |
|
257 /** |
|
258 * Sets selection observer. |
|
259 * @param aObserver Selection observer. |
|
260 */ |
|
261 IMPORT_C void SetSelectionObserver( MHgSelectionObserver& aObserver ); |
|
262 |
|
263 /** |
|
264 * Removes all items and presents empty text |
|
265 * */ |
|
266 IMPORT_C void Reset(); |
|
267 |
|
268 /** |
|
269 * Resizes Grid/List. |
|
270 * @param aItemCount New Count of items. |
|
271 */ |
|
272 IMPORT_C void ResizeL( TInt aItemCount ); |
|
273 |
|
274 /** |
|
275 * Set text that is displayed when there are no items in the view. |
|
276 * @param aEmptyText Empty text. |
|
277 */ |
|
278 IMPORT_C void SetEmptyTextL( const TDesC& aEmptyText ); |
|
279 |
|
280 /** |
|
281 * Fetch item count. |
|
282 * @return Total number of items. |
|
283 */ |
|
284 IMPORT_C TInt ItemCount() const; |
|
285 |
|
286 /** |
|
287 * Sets new default icon. |
|
288 * @param aDefaultIcon New default icon to be used in scroller. |
|
289 */ |
|
290 IMPORT_C void SetDefaultIconL( CGulIcon* aDefaultIcon ); |
|
291 |
|
292 /** |
|
293 * Disables Scrollbuffer. |
|
294 */ |
|
295 IMPORT_C void DisableScrollBuffer(); |
|
296 |
|
297 /** |
|
298 * Changes mediawalls style. |
|
299 * |
|
300 * @param aStyle style. |
|
301 * @param aRect new window rectangle. |
|
302 * @param aReuseSurface flag to indicate whether or not OpenVG surface should be reconstructed. |
|
303 */ |
|
304 IMPORT_C void ChangeStyleL( THgVgMediaWallStyle aStyle, const TRect& aRect, TBool aReuseSurface ); |
|
305 |
|
306 /** |
|
307 * Sets button observer. Client can use this to register it self to be |
|
308 * notified when the user for example, presses hide softkeys button. |
|
309 * |
|
310 * @param aObserver observer. |
|
311 */ |
|
312 IMPORT_C void SetObserver(MHgVgMediaWallObserver* aObserver); |
|
313 |
|
314 /** |
|
315 * Sets type of selection animation to perform, when an item |
|
316 * is opened. |
|
317 * Default behaviour is EHgSelectionAnimationFlipToFront. |
|
318 * |
|
319 * @param aType type of opening animation. |
|
320 */ |
|
321 IMPORT_C void SetOpeningAnimationType(THgVgOpeningAnimationType aType); |
|
322 |
|
323 /** |
|
324 * Gets current MediaWall style. |
|
325 * |
|
326 * @return THgVgMediaWallStyle. |
|
327 */ |
|
328 IMPORT_C THgVgMediaWallStyle Style() const; |
|
329 |
|
330 /** |
|
331 * Gets current opening animation type |
|
332 * |
|
333 * @return THgVgOpeningAnimationType. |
|
334 */ |
|
335 IMPORT_C THgVgOpeningAnimationType OpeningAnimationType() const; |
|
336 |
|
337 /** |
|
338 * Starts opening animation to selected direction. After animation is complete, |
|
339 * Open event is sent to selection observer. |
|
340 * |
|
341 * @param aOpening if this is true, the selected item is opened, otherwise closed. |
|
342 */ |
|
343 IMPORT_C void StartOpeningAnimationL(TBool aOpening); |
|
344 |
|
345 /** |
|
346 * Set mode flags. Possible values are defined in THgVgMediaWallMode. |
|
347 * @param aFlags flags to bet set. |
|
348 */ |
|
349 IMPORT_C void SetFlags( TInt aFlags ); |
|
350 |
|
351 /** |
|
352 * Clear mode flags. Possible values are defined in THgVgMediaWallMode. |
|
353 * @param aFlags flags to be cleared. |
|
354 */ |
|
355 IMPORT_C void ClearFlags( TInt aFlags ); |
|
356 |
|
357 /** |
|
358 * Get flags. Possible values are defined in THgVgMediaWallMode. |
|
359 * @return Current flags. |
|
360 */ |
|
361 IMPORT_C TInt Flags(); |
|
362 |
|
363 /** |
|
364 * Sets item at index as selected and opened item. HandleOpenL not called for observers. |
|
365 * If index is out of range, does nothing. Using this function sets item at index |
|
366 * to the state where it is when it was selected and opened by the user. |
|
367 * One can use for example. StartOpeningAnimationL to togle animation backwards from |
|
368 * this state to normal. This can be useful for example. when returning from a |
|
369 * a different view and there is a need to pop the item back to the wall from front. |
|
370 * |
|
371 * @param aIndex of the item to open. |
|
372 */ |
|
373 IMPORT_C void SetItemToOpenedState(TInt aIndex); |
|
374 |
|
375 /** |
|
376 * Sets the rectangle where item fit at the end of opening animation. |
|
377 * |
|
378 * @param aRect target rectangle where opened item is fitted at the end of opening animation. |
|
379 */ |
|
380 IMPORT_C void SetOpenedItemRect(const TRect& aRect); |
|
381 |
|
382 protected: // Constructors |
|
383 |
|
384 CHgVgMediaWall( TInt aItemCount, |
|
385 CGulIcon* aDefaultIcon, THgVgMediaWallStyle aStyle, |
|
386 TBool aEnableScrollBar ); |
|
387 |
|
388 void ConstructL (const TRect& aRect, MObjectProvider* aParent ); |
|
389 |
|
390 private: |
|
391 |
|
392 /** |
|
393 * Handles viewposition change. |
|
394 */ |
|
395 void HandleViewPositionChanged(TBool aDontUpdateObserver=EFalse); |
|
396 |
|
397 /** |
|
398 * Initializes items. |
|
399 */ |
|
400 void InitItemsL(); |
|
401 |
|
402 |
|
403 /** |
|
404 * |
|
405 */ |
|
406 void HandleKeyDown(); |
|
407 |
|
408 /** |
|
409 * Handles key events. |
|
410 * |
|
411 * @param aKeyEvent TKeyEvent-object. |
|
412 */ |
|
413 TKeyResponse HandleKeyEvent(const TKeyEvent& aKeyEvent); |
|
414 |
|
415 /** |
|
416 * |
|
417 */ |
|
418 void HandleKeyUp(); |
|
419 |
|
420 /** |
|
421 * |
|
422 */ |
|
423 void StopKeyScrolling(); |
|
424 |
|
425 /** |
|
426 * |
|
427 */ |
|
428 void DoKeyScrolling(); |
|
429 |
|
430 /** |
|
431 * |
|
432 */ |
|
433 static TInt KeyScrollingTimerCallback( TAny* aPtr ); |
|
434 |
|
435 /** |
|
436 * Handles items count change. |
|
437 */ |
|
438 void HandleItemCountChanged(); |
|
439 |
|
440 /** |
|
441 * Initializes default icon and |
|
442 * creates VGImage for it. |
|
443 */ |
|
444 void InitDefaultIconL(); |
|
445 |
|
446 /** |
|
447 * Draws using OpenVG |
|
448 */ |
|
449 void DrawOpenVG() const; |
|
450 |
|
451 /** |
|
452 * Called by callback to do actual animation. |
|
453 */ |
|
454 void DoAnimation(); |
|
455 |
|
456 /** |
|
457 * Does transition animation, called by DoAnimation. |
|
458 */ |
|
459 void DoTransitionAnimation(); |
|
460 |
|
461 /** |
|
462 * Does selection animation |
|
463 */ |
|
464 void DoSelectionAnimation(); |
|
465 |
|
466 /** |
|
467 * Callback method for animation |
|
468 * |
|
469 * @param aPtr Pointer to an instance of CHgVgMediaWall class. |
|
470 * |
|
471 * @return System wide error code. |
|
472 */ |
|
473 static TInt AnimationTimerCallback( TAny* aPtr ); |
|
474 |
|
475 /** |
|
476 * Updates bitmaps used to render album and artist titles. |
|
477 */ |
|
478 void UpdateLabelsAndPopup(); |
|
479 |
|
480 /** |
|
481 * Draws album and artist titles. |
|
482 */ |
|
483 void DrawTitles(TReal aAlpha); |
|
484 |
|
485 |
|
486 /** |
|
487 * Initializes scroll bar. |
|
488 */ |
|
489 void InitScrollBarL(TBool aResize); |
|
490 |
|
491 /** |
|
492 * Initializes skin rendering. |
|
493 */ |
|
494 void InitSkinRendererL(); |
|
495 |
|
496 /** |
|
497 * Initializes whole rendering functionality. |
|
498 */ |
|
499 void InitRenderingL(TBool aRecreateSurface); |
|
500 |
|
501 /** |
|
502 * Frees videomemory used by items. |
|
503 */ |
|
504 void FreeItemsImages(); |
|
505 |
|
506 /** |
|
507 * Reloads images to items. |
|
508 */ |
|
509 void ReloadItemsImages(); |
|
510 |
|
511 /** |
|
512 * |
|
513 */ |
|
514 void HandleTapEventL(const TPoint& aPosition); |
|
515 |
|
516 /** |
|
517 * |
|
518 */ |
|
519 void HandleFlick(const TPoint& aSpeed); |
|
520 |
|
521 /** |
|
522 * |
|
523 */ |
|
524 void HandleDragging(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent); |
|
525 |
|
526 /** |
|
527 * |
|
528 */ |
|
529 TInt GetStepsFromSpeed(TInt aSpeed) const; |
|
530 |
|
531 /** |
|
532 * |
|
533 */ |
|
534 void StartAnimationTimer(); |
|
535 |
|
536 /** |
|
537 * |
|
538 */ |
|
539 TReal GetAsPercentageOfScreenWidth(TInt aPixels) const; |
|
540 |
|
541 /** |
|
542 * |
|
543 */ |
|
544 TReal GetAsPercentageOfScreenHeight(TInt aPixels) const; |
|
545 |
|
546 /** |
|
547 * |
|
548 */ |
|
549 void DrawScene(); |
|
550 |
|
551 /** |
|
552 * |
|
553 */ |
|
554 void HandleDragStart(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent); |
|
555 |
|
556 /** |
|
557 * |
|
558 */ |
|
559 void HandleDragOn(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent); |
|
560 |
|
561 /** |
|
562 * |
|
563 */ |
|
564 void HandleDragStop(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent); |
|
565 |
|
566 /** |
|
567 * |
|
568 */ |
|
569 void HandleTransitionAnimationStop(); |
|
570 |
|
571 /** |
|
572 * |
|
573 */ |
|
574 void DrawLetterStripAndTitles(); |
|
575 |
|
576 /** |
|
577 * |
|
578 */ |
|
579 void DrawButtonsAndScrollbar(); |
|
580 |
|
581 /** |
|
582 * |
|
583 */ |
|
584 void InitButtonsL(); |
|
585 |
|
586 /** |
|
587 * |
|
588 */ |
|
589 CGulIcon* CreateIconL(TInt aId1, TInt aId2, const TSize& aSize); |
|
590 |
|
591 /** |
|
592 * |
|
593 */ |
|
594 TBool HandleButtons(const TPointerEvent& aEvent); |
|
595 |
|
596 /** |
|
597 * |
|
598 */ |
|
599 TInt MaxViewPosition() const; |
|
600 |
|
601 |
|
602 /** |
|
603 * |
|
604 */ |
|
605 TBool BeginSelection(TInt aIndex); |
|
606 |
|
607 /** |
|
608 * |
|
609 */ |
|
610 void EndSelection(); |
|
611 |
|
612 /** |
|
613 * |
|
614 */ |
|
615 void DoStartOpeningAnimationL(); |
|
616 |
|
617 /** |
|
618 * |
|
619 */ |
|
620 void StartAnimationToPosition(TReal aX, TBool aUpdateScrollBar); |
|
621 |
|
622 /** |
|
623 * |
|
624 */ |
|
625 void StartAnimationToPosition(TReal aX, TReal aY, TBool aUpdateScrollBar); |
|
626 |
|
627 /** |
|
628 * |
|
629 */ |
|
630 CFbsBitmap* DrawToBitmap(); |
|
631 |
|
632 /** |
|
633 * |
|
634 */ |
|
635 void DestroyRendering(); |
|
636 |
|
637 /** |
|
638 * |
|
639 */ |
|
640 TBool DrawAll(); |
|
641 |
|
642 /** |
|
643 * |
|
644 */ |
|
645 void InitMediaWallFullScreenLandscapeL(); |
|
646 |
|
647 /** |
|
648 * |
|
649 */ |
|
650 void InitMediaWallTBonePortraitL(); |
|
651 |
|
652 /** |
|
653 * |
|
654 */ |
|
655 void InitMediaWallGridLandscapeL(); |
|
656 |
|
657 /** |
|
658 * |
|
659 */ |
|
660 void InitLabelsL(TInt aLayoutVariant); |
|
661 |
|
662 /** |
|
663 * |
|
664 */ |
|
665 void InitPopupL(TInt aLayoutVariant); |
|
666 |
|
667 protected: |
|
668 CHgScrollBufferManager* iManager; // Own |
|
669 |
|
670 HBufC* iEmptyText; // text for empty list or grid. |
|
671 |
|
672 // Observers |
|
673 MHgSelectionObserver* iSelectionObserver; // Not Own |
|
674 |
|
675 // Arrays |
|
676 RPointerArray<CHgVgItem> iItems; // Items |
|
677 |
|
678 // For dragging |
|
679 TTime iPrevTime; // Previous pointer position time. |
|
680 |
|
681 TInt iItemCount; // Total number of items |
|
682 |
|
683 TInt iItemsOnScreen; // Max items on screen. |
|
684 |
|
685 TInt iSelectedIndex; // The index of the selected item |
|
686 |
|
687 CGulIcon* iDefaultIcon; // Default item icon, owns |
|
688 |
|
689 THgVgAnimationState iAnimationState; // current animation state |
|
690 TInt64 iAnimationDuration; // total length of the animation |
|
691 TTime iAnimationStartTime; // starting time of the animation |
|
692 TReal iAnimationAlpha; // value going from 0-1 during animation |
|
693 CHgVgTimer* iAnimationTimer; |
|
694 |
|
695 TBool iScrollBarEnabled; |
|
696 CHgVgScrollBar* iScrollBar; // Scrollbar, owns |
|
697 TBool iScrollBarHit; |
|
698 TBool iUpdateScrollBar; |
|
699 |
|
700 CHgVgMediaWallRenderer* iRenderer; // Renderer for current media wall style, owns |
|
701 |
|
702 CHgVgSkinRenderer* iSkinRenderer; // Renderer for drawing skin, owns. |
|
703 |
|
704 THgVgMediaWallStyle iMediaWallStyle; // Style of mediawall. |
|
705 |
|
706 //TTime iKeyPressStartTime; |
|
707 |
|
708 AknTouchGestureFw::CAknTouchGestureFw* iTouchFw; // touch gesture fw, own. |
|
709 |
|
710 TReal iViewPositionAtDragStart; |
|
711 |
|
712 CHgVgPopup* iLetterPopup; // letter popup show when using scrollbar, own. |
|
713 |
|
714 CHgVgButton* iHideSKButton; // button for hiding softkeys, own. |
|
715 |
|
716 MHgVgMediaWallObserver* iMediaWallObserver; |
|
717 |
|
718 TRect iRect; |
|
719 |
|
720 THgVgOpeningAnimationType iOpeningAnimationType; |
|
721 |
|
722 TInt iPreviousPointerDelta; |
|
723 |
|
724 TBool iIsForeground; |
|
725 TBool iUsingDefaultIcon; |
|
726 |
|
727 TBool iButtonsHit; |
|
728 |
|
729 TBool iPointerDown; |
|
730 |
|
731 CHgVgLabel* iArtistLabel; // label for artist text, own. |
|
732 CHgVgLabel* iAlbumLabel; // label for album text, own. |
|
733 CHgVgLabel* iEmptyLabel; // label for empty text, own. |
|
734 |
|
735 enum TKeyScrollingState |
|
736 { |
|
737 ENoKeyScrolling = 0, |
|
738 EKeyScrollingUp, |
|
739 EKeyScrollingDown, |
|
740 EKeyScrollingLeft, |
|
741 EKeyScrollingRight |
|
742 } iKeyScrollingState; // State of the key scrolling |
|
743 |
|
744 TInt iKeyRepeats; |
|
745 CPeriodic* iKeyScrollingTimer; // Timer for key scrolling, own. |
|
746 |
|
747 CHgVgEGL* iEGL; // encapsulated egl stuff, own. |
|
748 |
|
749 TInt iRowCount; // number of rows in grid style |
|
750 |
|
751 TReal iCameraRotationFactor; // max amount of camera rotation in radians |
|
752 TReal iCameraZoomFactor; // max amount of zoom out |
|
753 TReal iSpringVelocityToAnimationFactor; // factor used to convert spring velocity to animation alpha |
|
754 |
|
755 RBuf iPopupText1; // text1 shown in popup |
|
756 RBuf iPopupText2; // text2 shown in popup |
|
757 |
|
758 TBool iSelectionMode; // used to indicate when user is selectin items in grid style |
|
759 |
|
760 THgVgSpring* iSpring; // spring physics simulator, own. |
|
761 |
|
762 TInt iBufferPosition; |
|
763 |
|
764 CHgVgItem* iTempItem; |
|
765 |
|
766 TInt iPickedGridItem; // item picked from grid |
|
767 |
|
768 TInt iPrevGridItem; // prev item selected from grid |
|
769 TInt iSelGridItem; // selected it from grid |
|
770 |
|
771 TReal iItemsToMoveOnFullScreenDrag; |
|
772 |
|
773 TInt iFlags; |
|
774 |
|
775 CAlfCompositionSource* iCompositionSource; |
|
776 |
|
777 CFbsBitmap* iSurfaceBitmap; |
|
778 }; |
|
779 |
|
780 |
|
781 #endif /*HGVGMEDIAWALL_H_*/ |