menufw/menufwui/mmwidgets/inc/mmlistbox.h
changeset 4 4d54b72983ae
parent 0 f72a12da539e
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:  CMmListBox
    14 * Description:  CMmListBox
    15 *  Version     : %version: MM_22.1.14 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: MM_22.1.16 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #ifndef C_MMLISTBOX_H
    20 #ifndef C_MMLISTBOX_H
   273     /**
   273     /**
   274      * Disables/enables child component (scrollbar) drawing.
   274      * Disables/enables child component (scrollbar) drawing.
   275      */
   275      */
   276     void SetDisableChildComponentDrawing( TBool aDisable );
   276     void SetDisableChildComponentDrawing( TBool aDisable );
   277     
   277     
       
   278     /**
       
   279      * Handles scrolling event.
       
   280      *
       
   281      * @since S60 v3.0
       
   282      * @param aScrollBar Scrollbar being scrolled.
       
   283      * @param aEventType Type of scrollbar event.
       
   284      */
       
   285     void HandleScrollEventL( CEikScrollBar* aScrollBar, 
       
   286             TEikScrollEvent aEventType );
       
   287     
   278 private:
   288 private:
   279     /**
   289     /**
   280      * Default constructor.
   290      * Default constructor.
   281      * 
   291      * 
   282      * @since S60 v3.0
   292      * @since S60 v3.0
   361      * to the right in mirrored layout and does not cover the scrollbar
   371      * to the right in mirrored layout and does not cover the scrollbar
   362      * area. In normal (non-mirrored) mode this method does nothing.
   372      * area. In normal (non-mirrored) mode this method does nothing.
   363      */
   373      */
   364     void RedrawScrollbarBackground() const;
   374     void RedrawScrollbarBackground() const;
   365     
   375     
       
   376     /**
       
   377      * Does actual handling of scroll events.
       
   378      * 
       
   379      * @param aScrollBar Scrollbar being scrolled.
       
   380      * @param aEventType Type of scrollbar event.
       
   381      */
       
   382     void ProcessScrollEventL( CEikScrollBar* aScrollBar, 
       
   383             TEikScrollEvent aEventType );
       
   384     
       
   385     /**
       
   386      * Handles periodic events from @c iRedrawTimer.
       
   387      * Such events are generated at equal time intervals while
       
   388      * the view is being scrolled using the scrollbar.
       
   389      * This function typically calls @c ProcessScrollEventL,
       
   390      * which actually scrolls the view and causes a redraw. 
       
   391      */
       
   392     void HandleRedrawTimerEvent();
       
   393     
       
   394 private:
       
   395     /**
       
   396      * Callback function for @c iRedrawTimer.
       
   397      * It simply calls @c HandleRedrawTimerEvent and returns 0.
       
   398      * 
       
   399      * @param aPtr A pointer to CMmListBox object.
       
   400      * @return 0 (always).
       
   401      */
       
   402     static TInt RedrawTimerCallback( TAny* aPtr );
       
   403     
   366 private: // Data
   404 private: // Data
   367     /**
   405     /**
   368      * Item drawer.
   406      * Item drawer.
   369      */
   407      */
   370     CMmListBoxItemDrawer* iMmDrawer;
   408     CMmListBoxItemDrawer* iMmDrawer;
   382     /**
   420     /**
   383      * Blocks scrollbar drawing. When this flag is set scrollbars components
   421      * Blocks scrollbar drawing. When this flag is set scrollbars components
   384      * are blocked in the CountComponentControls() method;   
   422      * are blocked in the CountComponentControls() method;   
   385      */
   423      */
   386 	TBool iDisableChildComponentDrawing;
   424 	TBool iDisableChildComponentDrawing;
       
   425 	
       
   426 	/**
       
   427      * This member is only used in edit mode to store the position of the pointer
       
   428      * during EButton1Down event.
       
   429      */
       
   430     TPoint iButton1DownPos;
       
   431     
       
   432     /**
       
   433      * ETrue if the view is being scrolled with the scrollbar.
       
   434      */
       
   435     TBool iScrollbarThumbIsBeingDragged;
       
   436     
       
   437     /**
       
   438      * Stores the number of scrollbar events that were ignored.
       
   439      * It is only used while scrolling the view using scrollbar,
       
   440      * in such situation the scroll events that this object receives
       
   441      * are ignored, and actual scrolling is done only when
       
   442      * iRedrawTimer completes.
       
   443      */
       
   444     TInt iSkippedScrollbarEventsCount;
       
   445     
       
   446     /**
       
   447      * A timer that initiates redraws at certain time intervals.
       
   448      * It is used to refresh the view while scrolling with
       
   449      * the scrollbar.
       
   450      */
       
   451     CPeriodic* iRedrawTimer;
   387 	};
   452 	};
   388 	
   453 	
   389 #endif // MMLISTBOX_H
   454 #endif // MMLISTBOX_H