33 #include "glxcontainerinfobubble.h" |
33 #include "glxcontainerinfobubble.h" |
34 #include "glxcloudinfo.h" |
34 #include "glxcloudinfo.h" |
35 #include <alf/alfeventhandler.h> |
35 #include <alf/alfeventhandler.h> |
36 |
36 |
37 #include <AknLayout2Def.h> |
37 #include <AknLayout2Def.h> |
|
38 #include <AknPhysicsObserverIface.h> //Physics - Kinetic scrolling listener |
38 using namespace Alf; |
39 using namespace Alf; |
39 |
40 |
40 |
41 |
41 // FORWARD DECLARATION |
42 // FORWARD DECLARATION |
42 class MMPXViewUtility; |
43 class MMPXViewUtility; |
50 class CGlxContainerInfoBubble; |
51 class CGlxContainerInfoBubble; |
51 class MTouchFeedback; |
52 class MTouchFeedback; |
52 class MGlxCloudViewMskObserver; |
53 class MGlxCloudViewMskObserver; |
53 class MGlxEnterKeyEventObserver; |
54 class MGlxEnterKeyEventObserver; |
54 class MGlxCloudViewLayoutObserver; |
55 class MGlxCloudViewLayoutObserver; |
|
56 class CAknPhysics; |
55 |
57 |
56 enum TTagEventType |
58 enum TTagEventType |
57 { |
59 { |
58 ECustomEventFocusDragScroll |
60 ECustomEventFocusDragScroll |
59 }; |
61 }; |
64 * |
66 * |
65 */ |
67 */ |
66 |
68 |
67 class CGlxCloudViewControl : public CAlfControl,public IAlfWidgetEventHandler |
69 class CGlxCloudViewControl : public CAlfControl,public IAlfWidgetEventHandler |
68 ,public MGlxMediaListObserver |
70 ,public MGlxMediaListObserver |
|
71 ,public MAknPhysicsObserver |
69 { |
72 { |
70 public: |
73 public: |
71 |
74 |
72 /** |
75 /** |
73 * Perform the two phase construction |
76 * Perform the two phase construction |
302 * @param aStartIndex value of aCloudInfo.iStartIndex |
305 * @param aStartIndex value of aCloudInfo.iStartIndex |
303 * @param aEndIndex value of aCloudInfo.iEndIndex |
306 * @param aEndIndex value of aCloudInfo.iEndIndex |
304 * */ |
307 * */ |
305 void AppendToCloudArrayL( TGlxCloudInfo& aCloudInfo, |
308 void AppendToCloudArrayL( TGlxCloudInfo& aCloudInfo, |
306 const TInt& aStartIndex, const TInt& aEndIndex ); |
309 const TInt& aStartIndex, const TInt& aEndIndex ); |
307 |
310 |
|
311 private: // from MAknPhysicsObserver |
|
312 |
|
313 /* |
|
314 * Observer to get notified about new position to be displayed in |
|
315 * @param aNewPosition The new point where the virtual port should start from |
|
316 * @param aDrawNow value to determine whether to draw at new position or not |
|
317 * @param aFags Special value (not used here) |
|
318 */ |
|
319 void ViewPositionChanged( const TPoint& aNewPosition, TBool aDrawNow, TUint /*aFlags*/ ); |
|
320 |
|
321 /* |
|
322 * Obsrever to get notified whether the physics emulation ended |
|
323 */ |
|
324 void PhysicEmulationEnded(); |
|
325 |
|
326 /* |
|
327 * Observer callback used by CAknPhysics to know our current viewposition |
|
328 * (which is with reference to displayable viewportposition + screeenheight/2) |
|
329 * Returns current viewposition point |
|
330 */ |
|
331 TPoint ViewPosition() const; |
|
332 |
|
333 |
308 private: |
334 private: |
309 |
335 |
|
336 TBool IsLandscape(); |
|
337 |
|
338 /* |
|
339 * Initializes the physcs library with total size, displayable size, etc |
|
340 */ |
|
341 void InitPhysicsL(); |
|
342 |
310 /** |
343 /** |
311 * Sets focused item color |
344 * Sets focused item color |
312 **/ |
345 **/ |
313 void SetFocusColor(); |
346 void SetFocusColor(); |
314 |
347 |
566 |
599 |
567 //direction of dragging |
600 //direction of dragging |
568 TInt iIsDragging; |
601 TInt iIsDragging; |
569 |
602 |
570 TAknWindowLineLayout iScrollPaneHandle; |
603 TAknWindowLineLayout iScrollPaneHandle; |
571 |
604 |
|
605 //View position w.r.t. viewportposition + (screeenwidth/2, screenheight/2) |
|
606 TPoint iViewPosition; |
|
607 |
|
608 //determins whether dragging is currently going on or not |
|
609 TBool iDragging; |
|
610 |
|
611 //Notes the time before dragging, when pointer down event happens |
|
612 TTime iStartTime; |
|
613 |
|
614 //Notes the last pointer co-ordinates |
|
615 TPoint iPrev; |
|
616 |
|
617 //The pointer coordinates before dragging when pointerDown event happened |
|
618 TPoint iStart; |
|
619 |
|
620 //owning - Physics library object |
|
621 CAknPhysics* iPhysics; |
|
622 |
|
623 //boolean to check whether physics emulation is going on or not |
|
624 TBool iPhysicsStarted; |
|
625 |
|
626 //boolean to check if dragging really happened |
|
627 TBool iViewDragged; |
572 }; |
628 }; |
573 |
629 |
574 #endif // C_GLXCLOUDVIEWCONTROL_H |
630 #endif // C_GLXCLOUDVIEWCONTROL_H |
575 |
631 |