menufw/menufwui/mmwidgets/inc/mmgrid.h
changeset 4 4d54b72983ae
parent 1 5315654608de
child 9 f966699dea19
--- a/menufw/menufwui/mmwidgets/inc/mmgrid.h	Fri Jan 22 09:35:14 2010 +0200
+++ b/menufw/menufwui/mmwidgets/inc/mmgrid.h	Tue Jan 26 11:48:23 2010 +0200
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  CMmGrid declaration
-*  Version     : %version: MM_32.1.20 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_32.1.22 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -398,6 +398,34 @@
      * area. In normal (non-mirrored) mode this method does nothing.
      */
     void RedrawScrollbarBackground() const;
+    
+    /**
+     * Does actual handling of scroll events.
+     * 
+     * @param aScrollBar Scrollbar being scrolled.
+     * @param aEventType Type of scrollbar event.
+     */
+    void ProcessScrollEventL( CEikScrollBar* aScrollBar, 
+            TEikScrollEvent aEventType );
+    
+    /**
+     * Handles periodic events from @c iRedrawTimer.
+     * Such events are generated at equal time intervals while
+     * the view is being scrolled using the scrollbar.
+     * This function typically calls @c ProcessScrollEventL,
+     * which actually scrolls the view and causes a redraw. 
+     */
+    void HandleRedrawTimerEvent();
+    
+private:
+    /**
+     * Callback function for @c iRedrawTimer.
+     * It simply calls @c HandleRedrawTimerEvent and returns 0.
+     * 
+     * @param aPtr A pointer to CMmGrid object.
+     * @return 0 (always).
+     */
+    static TInt RedrawTimerCallback( TAny* aPtr );
 
 private:
     /**
@@ -448,6 +476,33 @@
      * are blocked in the CountComponentControls() method;   
      */
     TBool iDisableChildComponentDrawing;
+    
+    /**
+     * This member is only used in edit mode to store the position of the pointer
+     * during EButton1Down event.
+     */
+    TPoint iButton1DownPos;
+
+    /**
+     * ETrue if the view is being scrolled with the scrollbar.
+     */
+    TBool iScrollbarThumbIsBeingDragged;
+    
+    /**
+     * Stores the number of scrollbar events that were ignored.
+     * It is only used while scrolling the view using scrollbar,
+     * in such situation the scroll events that this object receives
+     * are ignored, and actual scrolling is done only when
+     * iRedrawTimer completes.
+     */
+    TInt iSkippedScrollbarEventsCount;
+    
+    /**
+     * A timer that initiates redraws at certain time intervals.
+     * It is used to refresh the view while scrolling with
+     * the scrollbar.
+     */
+    CPeriodic* iRedrawTimer;
     };
 
 #endif // C_MMGRID_H