menufw/menufwui/mmwidgets/inc/mmlistboxitemdrawer.h
branchRCL_3
changeset 25 137ebc85284b
parent 19 79311d856354
child 26 1b758917cafc
equal deleted inserted replaced
23:7be2816dbabd 25:137ebc85284b
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  CMmListBoxItemDrawer
    14 * Description:  CMmListBoxItemDrawer
    15 *  Version     : %version: MM_38.1.17 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: MM_38.1.18 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #ifndef C_MMLISTBOXITEMDRAWER_H
    20 #ifndef C_MMLISTBOXITEMDRAWER_H
    63      * @param aMmListBoxModel The listbox model.
    63      * @param aMmListBoxModel The listbox model.
    64      * @param aFont Font.
    64      * @param aFont Font.
    65      * @param aFormattedCellData Cell data.
    65      * @param aFormattedCellData Cell data.
    66      * @param aWidgetType Widget type.
    66      * @param aWidgetType Widget type.
    67      */
    67      */
    68 	static CMmListBoxItemDrawer* NewL(
    68   static CMmListBoxItemDrawer* NewL(
    69 	        CMmListBoxModel* aMmListBoxModel,
    69           CMmListBoxModel* aMmListBoxModel,
    70 		    const CFont* aFont,
    70         const CFont* aFont,
    71 		    CFormattedCellListBoxData* aFormattedCellData,
    71         CFormattedCellListBoxData* aFormattedCellData,
    72 		    TMmWidgetType aWidgetType,
    72         TMmWidgetType aWidgetType,
    73 		    CMmTemplateLibrary* aTemplateLibrary );
    73         CMmTemplateLibrary* aTemplateLibrary );
    74 
    74 
    75     /**
    75     /**
    76      * Two-phased constructor.
    76      * Two-phased constructor.
    77      *
    77      *
    78      * @since S60 v3.0
    78      * @since S60 v3.0
    79      * @param aMmListBoxModel The listbox model.
    79      * @param aMmListBoxModel The listbox model.
    80      * @param aFont Font.
    80      * @param aFont Font.
    81      * @param aFormattedCellData Cell data.
    81      * @param aFormattedCellData Cell data.
    82      * @param aWidgetType Widget type.
    82      * @param aWidgetType Widget type.
    83      */
    83      */
    84 	static CMmListBoxItemDrawer* NewLC(
    84   static CMmListBoxItemDrawer* NewLC(
    85 	        CMmListBoxModel* aMmListBoxModel,
    85           CMmListBoxModel* aMmListBoxModel,
    86 		    const CFont* aFont,
    86         const CFont* aFont,
    87 		    CFormattedCellListBoxData* aFormattedCellData,
    87         CFormattedCellListBoxData* aFormattedCellData,
    88 		    TMmWidgetType aWidgetType,
    88         TMmWidgetType aWidgetType,
    89 		    CMmTemplateLibrary* aTemplateLibrary );
    89         CMmTemplateLibrary* aTemplateLibrary );
    90 
    90 
    91     /**
    91     /**
    92      * Destructor.
    92      * Destructor.
    93      *
    93      *
    94      * @since S60 v3.0
    94      * @since S60 v3.0
   224      * Sets the background context.
   224      * Sets the background context.
   225      *
   225      *
   226      * @since S60 5.0
   226      * @since S60 5.0
   227      * @param aBgContext Background context.
   227      * @param aBgContext Background context.
   228      */
   228      */
   229 	void SetBgContext(
   229   void SetBgContext(
   230 			CAknsBasicBackgroundControlContext* aBgContext );
   230       CAknsBasicBackgroundControlContext* aBgContext );
   231 
   231 
   232     /**
   232     /**
   233      * Sets condition if background should be redrawn.
   233      * Sets condition if background should be redrawn.
   234      *
   234      *
   235      * @since S60 v3.0
   235      * @since S60 v3.0
   456      * Sets the flag which tells that a scrollbar event is running.
   456      * Sets the flag which tells that a scrollbar event is running.
   457      *
   457      *
   458      * @since S60 v3.0
   458      * @since S60 v3.0
   459      * @param aIsRunning Is scrollbar event running.
   459      * @param aIsRunning Is scrollbar event running.
   460      */
   460      */
   461 	void SetScrollbarEventRunning( TBool aIsRunning );
   461   void SetScrollbarEventRunning( TBool aIsRunning );
   462 
   462 
   463     /**
   463     /**
   464      * Sets number of columns in view.
   464      * Sets number of columns in view.
   465      *
   465      *
   466      * @since S60 v3.0
   466      * @since S60 v3.0
   467      * @param aNumberOfColumns Number of columns in view.
   467      * @param aNumberOfColumns Number of columns in view.
   468      */
   468      */
   469 	void SetNumberOfColsInView( TInt aNumberOfColumns );
   469   void SetNumberOfColsInView( TInt aNumberOfColumns );
   470 
   470 
   471 	/**
   471   /**
   472 	 * Used in non-touch edit mode to block drawing of move indicators and highlight
   472    * Used in non-touch edit mode to block drawing of move indicators and highlight
   473 	 * to clean screen for animation.
   473    * to clean screen for animation.
   474 	 *
   474    *
   475 	 * @since S60 v3.0
   475    * @since S60 v3.0
   476 	 * @param aDrawn Should highlight and move indicators be drawn.
   476    * @param aDrawn Should highlight and move indicators be drawn.
   477 	 */
   477    */
   478 	void SetHighlightShown( TBool aDrawn );
   478   void SetHighlightShown( TBool aDrawn );
   479 
   479 
   480     /**
   480     /**
   481      * Draws background.
   481      * Draws background.
   482      *
   482      *
   483      * @since S60 v3.0
   483      * @since S60 v3.0
   510      * @param aItemIsCurrent Is item current.
   510      * @param aItemIsCurrent Is item current.
   511      * @param aViewIsEmphasized Is view emphasized.
   511      * @param aViewIsEmphasized Is view emphasized.
   512      * @param aItemIsSelected Is item selected.
   512      * @param aItemIsSelected Is item selected.
   513      */
   513      */
   514     void DrawItemText( TInt aItemIndex, const TRect& aItemTextRect,
   514     void DrawItemText( TInt aItemIndex, const TRect& aItemTextRect,
   515     		TBool aItemIsCurrent, TBool aViewIsEmphasized,
   515         TBool aItemIsCurrent, TBool aViewIsEmphasized,
   516     		TBool aItemIsSelected ) const;
   516         TBool aItemIsSelected ) const;
   517     /**
   517     /**
   518      * Draws the actual item contents for the specified item in the specified
   518      * Draws the actual item contents for the specified item in the specified
   519      * rectangle.
   519      * rectangle.
   520      *
   520      *
   521      * @param aItemIndex Index of the item to draw.
   521      * @param aItemIndex Index of the item to draw.
   524      * @param aViewIsEmphasized @c ETrue if the view is emphasised.
   524      * @param aViewIsEmphasized @c ETrue if the view is emphasised.
   525      * @param aViewIsDimmed Ignored
   525      * @param aViewIsDimmed Ignored
   526      * @param aItemIsSelected @c ETrue if the item is selected.
   526      * @param aItemIsSelected @c ETrue if the item is selected.
   527      */
   527      */
   528     void DrawActualItem(TInt aItemIndex, const TRect& aActualItemRect,
   528     void DrawActualItem(TInt aItemIndex, const TRect& aActualItemRect,
   529 			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed,
   529       TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed,
   530 			TBool aItemIsSelected) const;
   530       TBool aItemIsSelected) const;
   531 
   531 
   532     /**
   532     /**
   533      * Sets up item currently drawn item subcells.
   533      * Sets up item currently drawn item subcells.
   534      * Also, fills-in/updates the cache information for the item at index
   534      * Also, fills-in/updates the cache information for the item at index
   535      * aItemIndex.
   535      * aItemIndex.
   658      * @param aItemIndex Index of currently drawn item.
   658      * @param aItemIndex Index of currently drawn item.
   659      * @param aItemText Text used to format item subcell content.
   659      * @param aItemText Text used to format item subcell content.
   660      * @param aSubcellIncrement Is incremented if backdrop subcell template is appended.
   660      * @param aSubcellIncrement Is incremented if backdrop subcell template is appended.
   661      */
   661      */
   662     void SetupBackdropSubcellL(
   662     void SetupBackdropSubcellL(
   663     		RArray<TTemplateChild>& aTemplateChildArray, TInt aItemIndex,
   663         RArray<TTemplateChild>& aTemplateChildArray, TInt aItemIndex,
   664             RBuf& aItemText, TInt& aSubcellIncrement ) const;
   664             RBuf& aItemText, TInt& aSubcellIncrement ) const;
   665 
   665 
   666     /**
   666     /**
   667      * Sets up icon image subcell.
   667      * Sets up icon image subcell.
   668      *
   668      *
   672      * @param aItemIndex Index of currently drawn item.
   672      * @param aItemIndex Index of currently drawn item.
   673      * @param aItemText Text used to format item subcell content.
   673      * @param aItemText Text used to format item subcell content.
   674      * @param aSubcellIncrement Is incremented if backdrop subcell template is appended.
   674      * @param aSubcellIncrement Is incremented if backdrop subcell template is appended.
   675      */
   675      */
   676     void SetupIconSubcellL(
   676     void SetupIconSubcellL(
   677     		RArray<TTemplateChild>& aTemplateChildArray, TInt aChildIndex, TInt aItemIndex,
   677         RArray<TTemplateChild>& aTemplateChildArray, TInt aChildIndex, TInt aItemIndex,
   678     		RBuf& aItemText, TInt& aSubcellIncrement ) const;
   678         RBuf& aItemText, TInt& aSubcellIncrement ) const;
   679 
   679 
   680     /**
   680     /**
   681      * Determines whether a bitmap of given size needs scaling to be displayed
   681      * Determines whether a bitmap of given size needs scaling to be displayed
   682      * in a rectangular area of some given target size.
   682      * in a rectangular area of some given target size.
   683      *
   683      *
   709      * @param aItemText Text used to format item subcell content.
   709      * @param aItemText Text used to format item subcell content.
   710      * @param aSubcellIncrement Is incremented if backdrop subcell template is appended.
   710      * @param aSubcellIncrement Is incremented if backdrop subcell template is appended.
   711      * @param aChildIndex Index of a template child.
   711      * @param aChildIndex Index of a template child.
   712      */
   712      */
   713     void SetupTextSubcellL(
   713     void SetupTextSubcellL(
   714     		RArray<TTemplateChild>& aTemplateChildArray, TInt aChildIndex, TInt aItemIndex,
   714         RArray<TTemplateChild>& aTemplateChildArray, TInt aChildIndex, TInt aItemIndex,
   715     		RBuf& aItemText, TInt& aSubcellIncrement ) const;
   715         RBuf& aItemText, TInt& aSubcellIncrement ) const;
   716 
   716 
   717     /**
   717     /**
   718      * Appends text if there is enough free memory.
   718      * Appends text if there is enough free memory.
   719      *
   719      *
   720      * @since S60 v3.0
   720      * @since S60 v3.0
   740      * @param aAllowHighlightForNonDraggedItem Should highlight be shown
   740      * @param aAllowHighlightForNonDraggedItem Should highlight be shown
   741      * 	(set in case when effects are used).
   741      * 	(set in case when effects are used).
   742      * @return ETrue if highlight is drawn for the actually drawn item.
   742      * @return ETrue if highlight is drawn for the actually drawn item.
   743      */
   743      */
   744     TBool GetHighlightVisibility(  TInt aItemIndex,
   744     TBool GetHighlightVisibility(  TInt aItemIndex,
   745     		TBool aItemIsCurrent, TBool aAllowHighlightForNonDraggedItem  ) const;
   745         TBool aItemIsCurrent, TBool aAllowHighlightForNonDraggedItem  ) const;
   746 
   746 
   747     /**
   747     /**
   748      * Returns backdrop visibility.
   748      * Returns backdrop visibility.
   749      *
   749      *
   750      * @param aItemIndex An index of a currently drawn item.
   750      * @param aItemIndex An index of a currently drawn item.
   941     /**
   941     /**
   942      * ETrue if the item that was last drawn was a floating item.
   942      * ETrue if the item that was last drawn was a floating item.
   943      */
   943      */
   944     mutable TBool iLastDrawnItemWasFloating;
   944     mutable TBool iLastDrawnItemWasFloating;
   945 
   945 
   946 	};
   946     /**
       
   947      * ETrue if the drawing item is floating item of swap transition type.
       
   948      */
       
   949     mutable TBool iIsSwapFloating;
       
   950 
       
   951   };
   947 
   952 
   948 #endif // MMLISTBOXITEMDRAWER_H
   953 #endif // MMLISTBOXITEMDRAWER_H