menufw/menufwui/mmwidgets/inc/mmgrid.h
changeset 4 4d54b72983ae
parent 1 5315654608de
child 9 f966699dea19
equal deleted inserted replaced
3:fb3763350a08 4:4d54b72983ae
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  CMmGrid declaration
    14 * Description:  CMmGrid declaration
    15 *  Version     : %version: MM_32.1.20 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: MM_32.1.22 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #ifndef C_MMGRID_H
    20 #ifndef C_MMGRID_H
   396      * The reason such method is needed is that view rectangle is shifted
   396      * The reason such method is needed is that view rectangle is shifted
   397      * to the right in mirrored layout and does not cover the scrollbar
   397      * to the right in mirrored layout and does not cover the scrollbar
   398      * area. In normal (non-mirrored) mode this method does nothing.
   398      * area. In normal (non-mirrored) mode this method does nothing.
   399      */
   399      */
   400     void RedrawScrollbarBackground() const;
   400     void RedrawScrollbarBackground() const;
       
   401     
       
   402     /**
       
   403      * Does actual handling of scroll events.
       
   404      * 
       
   405      * @param aScrollBar Scrollbar being scrolled.
       
   406      * @param aEventType Type of scrollbar event.
       
   407      */
       
   408     void ProcessScrollEventL( CEikScrollBar* aScrollBar, 
       
   409             TEikScrollEvent aEventType );
       
   410     
       
   411     /**
       
   412      * Handles periodic events from @c iRedrawTimer.
       
   413      * Such events are generated at equal time intervals while
       
   414      * the view is being scrolled using the scrollbar.
       
   415      * This function typically calls @c ProcessScrollEventL,
       
   416      * which actually scrolls the view and causes a redraw. 
       
   417      */
       
   418     void HandleRedrawTimerEvent();
       
   419     
       
   420 private:
       
   421     /**
       
   422      * Callback function for @c iRedrawTimer.
       
   423      * It simply calls @c HandleRedrawTimerEvent and returns 0.
       
   424      * 
       
   425      * @param aPtr A pointer to CMmGrid object.
       
   426      * @return 0 (always).
       
   427      */
       
   428     static TInt RedrawTimerCallback( TAny* aPtr );
   401 
   429 
   402 private:
   430 private:
   403     /**
   431     /**
   404      * Grid model.
   432      * Grid model.
   405      */            
   433      */            
   446     /**
   474     /**
   447      * Blocks scrollbar drawing. When this flag is set scrollbars components
   475      * Blocks scrollbar drawing. When this flag is set scrollbars components
   448      * are blocked in the CountComponentControls() method;   
   476      * are blocked in the CountComponentControls() method;   
   449      */
   477      */
   450     TBool iDisableChildComponentDrawing;
   478     TBool iDisableChildComponentDrawing;
       
   479     
       
   480     /**
       
   481      * This member is only used in edit mode to store the position of the pointer
       
   482      * during EButton1Down event.
       
   483      */
       
   484     TPoint iButton1DownPos;
       
   485 
       
   486     /**
       
   487      * ETrue if the view is being scrolled with the scrollbar.
       
   488      */
       
   489     TBool iScrollbarThumbIsBeingDragged;
       
   490     
       
   491     /**
       
   492      * Stores the number of scrollbar events that were ignored.
       
   493      * It is only used while scrolling the view using scrollbar,
       
   494      * in such situation the scroll events that this object receives
       
   495      * are ignored, and actual scrolling is done only when
       
   496      * iRedrawTimer completes.
       
   497      */
       
   498     TInt iSkippedScrollbarEventsCount;
       
   499     
       
   500     /**
       
   501      * A timer that initiates redraws at certain time intervals.
       
   502      * It is used to refresh the view while scrolling with
       
   503      * the scrollbar.
       
   504      */
       
   505     CPeriodic* iRedrawTimer;
   451     };
   506     };
   452 
   507 
   453 #endif // C_MMGRID_H
   508 #endif // C_MMGRID_H