phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchercustomlistboxdata.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: CCA customized control. Code has been modified to
       
    15 *              suit CCA requirements. See CFormattedCellListBoxData
       
    16 *              in EIKFRLBD.H. 
       
    17 *              Ensure that this piece of code is in sync with Avkon EIKFRLBD.H (CFormattedCellListBoxData)
       
    18 *
       
    19 */
       
    20 
       
    21 #ifndef CCAPPCOMMLAUNCHERCUSTOMLISTBOXDATA_H_
       
    22 #define CCAPPCOMMLAUNCHERCUSTOMLISTBOXDATA_H_
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <gdi.h>
       
    26 
       
    27 #include <eiklbd.h>
       
    28 #include <eikfrlb.h>
       
    29 #include <avkon.hrh>
       
    30 #include <AknsDrawUtils.h> // for TAknsQsnTextColorsIndex
       
    31 #include <babitflags.h>    // for TBitFlags32
       
    32 
       
    33 class CWindowGc;
       
    34 class CGulIcon;
       
    35 class CCCAppCommLauncherCustomListBoxDataExtension;
       
    36 class MAknsControlContext;
       
    37 class TAknsItemID;
       
    38 class CAknLayoutData;
       
    39 class CAknsEffectAnim;
       
    40 class TAknTextLineLayout;
       
    41 class TAknWindowLineLayout;
       
    42 class TAknTextComponentLayout;
       
    43 class TAknWindowComponentLayout;
       
    44 
       
    45 class CCCAppCommLauncherCustomListBoxData : public CListBoxData
       
    46     {
       
    47     friend class CCCAppCommLauncherCustomListBoxDataExtension;
       
    48 
       
    49 public:
       
    50     
       
    51     //INNER CLASS DECLARATION
       
    52     /*
       
    53      * A container class for storage of colour values.                           
       
    54      * Used by @c CFormattedCellListBoxData.
       
    55      */
       
    56     class TColors
       
    57         {
       
    58     
       
    59     public:
       
    60     
       
    61         /**
       
    62          * C++ default constructor.
       
    63          */
       
    64          TColors();
       
    65 
       
    66     public:
       
    67     
       
    68         /** 
       
    69          * The text colour.
       
    70          */
       
    71         TRgb iText;
       
    72 
       
    73         /** 
       
    74          * The background colour.
       
    75          */
       
    76         TRgb iBack;
       
    77 
       
    78         /** 
       
    79          * The highlighted text colour.
       
    80          */
       
    81         TRgb iHighlightedText;
       
    82 
       
    83         /** 
       
    84          * The highlighted background colour.
       
    85          */
       
    86         TRgb iHighlightedBack;
       
    87         
       
    88         /** 
       
    89          * The separator line colour.
       
    90          *
       
    91          * @deprecated The separator line colour is no longer used because the
       
    92          *             separator lines are skinned.
       
    93          */
       
    94         TRgb iRightSeparatorColor;
       
    95         };
       
    96 
       
    97 public:
       
    98 
       
    99     /**
       
   100      * Two-phased constructor.
       
   101      *
       
   102      * @return Pointer to a new formatted cell listbox data object.
       
   103      */
       
   104      static CCCAppCommLauncherCustomListBoxData* NewL();
       
   105 
       
   106     /**
       
   107      * Destructor.
       
   108      */
       
   109      ~CCCAppCommLauncherCustomListBoxData();
       
   110 
       
   111 public:
       
   112 
       
   113     /**
       
   114      * Gets colours attached to the cell.
       
   115      *
       
   116      * @param aSubCellIndex Index number of the subcell.
       
   117      * @return Text and background colors.
       
   118      */
       
   119      const TColors& SubCellColors(TInt aSubCellIndex) const;
       
   120     
       
   121     /**
       
   122      * Sets colours attached to the cell.
       
   123      *
       
   124      * @param aSubCellIndex Index number of the subcell.
       
   125      * @param aColors Text and background colors.
       
   126      */
       
   127      void SetSubCellColorsL(TInt aSubCellIndex, const TColors &aColors);
       
   128 
       
   129     /**
       
   130      * Gets baseline position from top of the cell.
       
   131      *
       
   132      * @param aSubCellIndex Index number of the subcell.
       
   133      * @return Baseline y-position.
       
   134      */
       
   135      TInt SubCellBaselinePos(TInt aSubCellIndex) const;
       
   136     
       
   137     /**
       
   138      * Sets baseline position from top of the cell.
       
   139      *
       
   140      * @param aSubCellIndex Index number of the subcell.
       
   141      * @param aPos Position which is set for the item.
       
   142      */
       
   143      void SetSubCellBaselinePosL(TInt aSubCellIndex, TInt aPos);
       
   144 
       
   145     /**
       
   146      * Gets cell size in pixels.
       
   147      *
       
   148      * @param aSubCellIndex Index number of the subcell.
       
   149      * @return Cell size.
       
   150      */
       
   151      TSize SubCellSize(TInt aSubCellIndex) const;
       
   152     
       
   153     /**
       
   154      * Sets cell size in pixels.
       
   155      *
       
   156      * @param aSubCellIndex Index number of the subcell.
       
   157      * @param aSize Cell size.
       
   158      */
       
   159      void SetSubCellSizeL(TInt aSubCellIndex, TSize aSize);
       
   160 
       
   161     /**
       
   162      * Gets cell position inside an item.
       
   163      *
       
   164      * @param aSubCellIndex Index number of the subcell.
       
   165      * @return Cell position.
       
   166      */
       
   167      TPoint SubCellPosition(TInt aSubCellIndex) const;
       
   168     
       
   169     /**
       
   170      * Sets cell position inside an item.
       
   171      *
       
   172      * @param aSubCellIndex Index number of the subcell.
       
   173      * @param aPosition New position for cell.
       
   174      */
       
   175      void SetSubCellPositionL(TInt aSubCellIndex, TPoint aPosition);
       
   176 
       
   177     /**
       
   178      * Determines whether this cell can overlap with one of the previous cells.
       
   179      *
       
   180      * @param aSubCellIndex Index number of the subcell.
       
   181      * @return @c ETrue if cell overlaps another one, @c EFalse if cell allocates 
       
   182      *         area from other cells.
       
   183      */
       
   184      TBool SubCellIsTransparent(TInt aSubCellIndex) const;
       
   185 
       
   186     /**
       
   187      * Modifies whether the cell can overlap with one of the previous cells.
       
   188      *
       
   189      * @param aSubCellIndex Index number of the subcell.
       
   190      * @param aIsTransparent @c ETrue if transparent, @c EFalse if not.
       
   191      */
       
   192      void SetTransparentSubCellL(TInt aSubCellIndex, 
       
   193                                          TBool aIsTransparent);
       
   194 
       
   195     /**
       
   196      * Checks whether drawing algorithm always draws the cell or whether empty 
       
   197      * string in list item can disable the drawing of the cell.
       
   198      *
       
   199      * @param aSubCellIndex Index number of the subcell.
       
   200      * @return @c ETrue when empty string disables cell, 
       
   201      *         @c EFalse if always drawn.
       
   202      */
       
   203      TBool SubCellIsNotAlwaysDrawn(TInt aSubCellIndex) const;
       
   204 
       
   205     /**
       
   206      * Sets whether drawing algorithm always draws the cell.
       
   207      *
       
   208      * @param aSubCellIndex Index number of the subcell.
       
   209      * @param aIsNotAlwaysDrawn If @c ETrue, empty string disables cell.
       
   210      */
       
   211      void SetNotAlwaysDrawnSubCellL(TInt aSubCellIndex,
       
   212                                             TBool aIsNotAlwaysDrawn);
       
   213 
       
   214     /**
       
   215      * Gets margins used for the content inside the cell.
       
   216      *
       
   217      * @param aSubCellIndex Index number of the subcell.
       
   218      * @return Margins in pixels.
       
   219      */
       
   220      TMargins SubCellMargins(TInt aSubCellIndex) const;
       
   221 
       
   222     /**
       
   223      * Sets margins for the content inside the cell.
       
   224      *
       
   225      * @param aSubCellIndex Index number of the subcell.
       
   226      * @param aMargins Margins for the content inside the cell.
       
   227      */
       
   228      void SetSubCellMarginsL(TInt aSubCellIndex, TMargins aMargins);
       
   229 
       
   230     /**
       
   231      * Gets font attached to the cell.
       
   232      *
       
   233      * @param aSubCellIndex Index number of the subcell.
       
   234      * @return Handle to the attached font.
       
   235      */
       
   236      const CFont* SubCellFont(TInt aSubCellIndex) const;
       
   237 
       
   238     /**
       
   239      * Sets the font attached to the cell.
       
   240      *
       
   241      * @param aSubCellIndex Index number of the subcell.
       
   242      * @param aFont Font to attach to the cell.
       
   243      */
       
   244      void SetSubCellFontL(TInt aSubCellIndex, const CFont* aFont);
       
   245 
       
   246     /**
       
   247      * Gets the alignment attached to the cell.
       
   248      *
       
   249      * @param aSubCellIndex Index number of the subcell.
       
   250      * @return Alignment of the text.
       
   251      */
       
   252      CGraphicsContext::TTextAlign SubCellAlignment(TInt aSubCellIndex)
       
   253         const;
       
   254 
       
   255     /**
       
   256      * Sets the alignment attached to the cell.
       
   257      *
       
   258      * @param aSubCellIndex Index number of the subcell.
       
   259      * @param aAlign Alignment that is attached to the cell
       
   260      */
       
   261      void SetSubCellAlignmentL(TInt aSubCellIndex,
       
   262                                        CGraphicsContext::TTextAlign aAlign);
       
   263 
       
   264     /**
       
   265      * Checks whetherdrawing algorithm considers the text
       
   266      * string in list item as unicode text string displayable on the screen,
       
   267      * or as string representation of an index to icon array.
       
   268      *
       
   269      * @param aSubCellIndex Index number of the subcell.
       
   270      * @return @c ETrue if graphics cell, @c EFalse if text cell.
       
   271      */
       
   272      TBool SubCellIsGraphics(TInt aSubCellIndex) const;
       
   273 
       
   274     /**
       
   275      * Sets whether drawing algorithm considers the text string in list item as
       
   276      * unicode text string displayable on the screen, or as string 
       
   277      * representation of an index to icon array.
       
   278      *
       
   279      * @param aSubCellIndex Index number of the subcell.
       
   280      * @param aIsGraphics @c ETrue if graphics cell, @c EFalse if text cell.
       
   281      */
       
   282      void SetGraphicsSubCellL(TInt aSubCellIndex, TBool aIsGraphics);
       
   283 
       
   284     /**
       
   285      * Checks whether vertical line is drawn to the right side of the cell.
       
   286      *
       
   287      * @param aColumn Index number of the subcell.
       
   288      * @return Style of pen used to draw a line for the right side of the cell.
       
   289      */
       
   290      CGraphicsContext::TPenStyle 
       
   291         SubCellRightSeparatorStyle(TInt aColumn) const;
       
   292 
       
   293     /**
       
   294      * Sets whether vertical line is drawn to the right side of the cell.
       
   295      *
       
   296      * @param aSubCell Index number of the subcell.
       
   297      * @param aStyle Style of a pen used to draw a line for the right side of 
       
   298      *        the cell.
       
   299      */
       
   300      void SetSubCellRightSeparatorStyleL(TInt aSubCell,
       
   301                                             CGraphicsContext::TPenStyle aStyle);
       
   302 
       
   303     /**
       
   304      * Gets the amount of pixels text margins is grown if it is truncated. 
       
   305      * This is usually very small number used to make the layout look more 
       
   306      * balanced when text is truncated. (the glyph used for truncation is 
       
   307      * almost empty and on narrow text elements, it looks odd if the truncated
       
   308      * text element is exactly same size as non-truncated version.)
       
   309      *
       
   310      * @param aSubCellIndex Index number of the subcell.
       
   311      * @return Amount of pixels that are used for growing the text margins in 
       
   312      *         truncation.
       
   313      */
       
   314      TInt SubCellTextClipGap(TInt aSubCellIndex) const;
       
   315 
       
   316     /**
       
   317      * Sets the amount of pixels truncation grows a text element.
       
   318      *
       
   319      * @param aSubCellIndex Index number of the subcell.
       
   320      * @param aGap The amount of pixels that are required for growing the text 
       
   321      *        element when it is truncated. 
       
   322      */
       
   323      void SetSubCellTextClipGapL(TInt aSubCellIndex, TInt aGap);
       
   324 
       
   325     /**
       
   326      * SkinEnabled checks whether skins are enabled on this list.
       
   327      *
       
   328      * @since Symbian 2.0 
       
   329      * @return @c ETrue if enabled, @c EFalse if disabled.
       
   330      */
       
   331      TBool SkinEnabled() const;
       
   332 
       
   333     /**
       
   334      * Sets whether skins are enabled on this list.
       
   335      * The default value is determined from global setting from @c CAknAppUi.
       
   336      *
       
   337      * @since Symbian 2.0
       
   338      * @param aEnabled If @c ETrue skins are set enabled. 
       
   339      *        If @c EFalse skins are set disabled.
       
   340      */
       
   341      void SetSkinEnabledL(TBool aEnabled);
       
   342 
       
   343     /**
       
   344      * Checks whether the cell is used for numbers.
       
   345      *
       
   346      * @since Symbian 2.0
       
   347      * @param aSubCellIndex Index number of the subcell.
       
   348      * @return @c ETrue if enabled, @c EFalse if disabled.
       
   349      */
       
   350      TBool SubCellIsNumberCell(TInt aSubCellIndex) const;
       
   351 
       
   352     /**
       
   353      * Sets whether the cell is used for numbers.
       
   354      *
       
   355      * @since Symbian 2.0
       
   356      * @param aSubCellIndex Index number of the subcell.
       
   357      * @param aIsNumberCell New value for the flag.
       
   358      */
       
   359      void SetNumberCellL(TInt aSubCellIndex, TBool aIsNumberCell);
       
   360 
       
   361     /**
       
   362      * Gets the icon array used when drawing bitmaps for the listbox items.
       
   363      */
       
   364      CArrayPtr<CGulIcon>* IconArray() const;
       
   365 
       
   366     /**
       
   367      * Sets the icon array used when drawing bitmaps.
       
   368      * The array can be modified (no need to call this method when modifying),
       
   369      * even in @c MdcaPoint() or @c MdcaCount() methods of @c MDesCArray class.
       
   370      * See also @c CTextListBoxModel::SetItemTextArray().
       
   371      * 
       
   372      * The most common way to crash a listbox is by forgetting to call this 
       
   373      * method, or the list item string for graphics cell is not an index of 
       
   374      * a bitmap.
       
   375      *
       
   376      * @param aArray Pointer to the icon array.
       
   377      */
       
   378      void SetIconArrayL(CArrayPtr<CGulIcon>* aArray);
       
   379 
       
   380     /**
       
   381      * SetIconArray sets the icon array used when drawing bitmaps.
       
   382      * The array can be modified (no need to call this method when modifying),
       
   383      * even in @c MdcaPoint() or @c MdcaCount() methods of @c MDesCArray class.
       
   384      * See also @c CTextListBoxModel::SetItemTextArray().
       
   385      * 
       
   386      * The most common way to crash a listbox is by forgetting to call this
       
   387      * method, or the list item string for graphics cell is not an index of
       
   388      * a bitmap.
       
   389      *
       
   390      * @param aArray Pointer to the icon array.
       
   391      */
       
   392      void SetIconArray(CArrayPtr<CGulIcon>* aArray);
       
   393 
       
   394     /**
       
   395      * Font access to the font used in subcell.
       
   396      *
       
   397      * @param aItemProperties Not used in code.
       
   398      * @param aSubCellIndex Index number of the subcell.
       
   399      * @return Font used in subcell.
       
   400      */
       
   401      CFont* Font(const TListItemProperties& aItemProperties,
       
   402                          TInt aSubCellIndex) const;
       
   403     
       
   404     /**
       
   405      * From @c CListBoxData.
       
   406      *
       
   407      * @c Draw() is the most important method in 
       
   408      * @c CEikFormattedCellListBoxData.
       
   409      * This is the only method that needs to be implemented in this class and
       
   410      * it draws the whole list item.
       
   411      *
       
   412      * @param aProperties Properties attached to the list item.
       
   413      * @param aGc Graphics Context used for drawing the list item.
       
   414      * @param aText A text string describing the list item cells.
       
   415      * @param aRect The area of the screen for the whole list item.
       
   416      * @param aHighlight Whether the list item is selected.
       
   417      * @param aColors The colours used for drawing the item.
       
   418      */
       
   419      virtual void Draw(TListItemProperties aProperties,
       
   420                                CWindowGc& aGc,
       
   421                                const TDesC* aText,
       
   422                                const TRect& aRect,
       
   423                                TBool aHighlight,
       
   424                                const TColors& aColors) const;
       
   425 
       
   426     /**
       
   427      * Indicates if sub cell is using its own colors rather than common colors.
       
   428      *
       
   429      * @param aSubCell Index number of the subcell.
       
   430      * @return Boolean indicating whether own colors enabled.
       
   431      *         @c ETrue enabled, @c EFalse disabled.
       
   432      */
       
   433      TBool UseSubCellColors(TInt aSubCell) const;
       
   434 
       
   435     /**
       
   436      * Ability for a skin subsystem to access Mop chain through current 
       
   437      * listbox control.
       
   438      *
       
   439      * @since Symbian 2.0
       
   440      * @return Current listbox instance or NULL.
       
   441      */
       
   442      CCoeControl* Control() const;
       
   443     
       
   444     /**
       
   445      * Ability for a skin subsystem to access mop chain through current listbox
       
   446      * control.
       
   447      *
       
   448      * @since Symbian 2.0
       
   449      * @param aControlOrNull Current listbox instance or NULL. Cannot be other
       
   450      *        control than the current listbox!
       
   451      */
       
   452      void SetControl(CCoeControl* aControlOrNull);
       
   453     
       
   454     /**
       
   455      * Access to the background context of the listbox.
       
   456      *
       
   457      * @since Symbian 2.0
       
   458      * @return Skin background context.
       
   459      */
       
   460      MAknsControlContext* SkinBackgroundContext() const;
       
   461     /**
       
   462      * Modify properties of the skin context (background).
       
   463      *
       
   464      * @since Symbian 2.0
       
   465      * @param aId Skin background identifier.
       
   466      * @param aRect Skin background rectangle.
       
   467      */
       
   468      void SetBackgroundSkinStyle(const TAknsItemID *aId,
       
   469                                          const TRect &aRect);
       
   470     
       
   471     /**
       
   472      * Modify properties of the skin context (AB-column).
       
   473      *
       
   474      * @since Symbian 2.0
       
   475      * @param aId Skin background identifier.
       
   476      * @param aTileRect Skin background area from LAF.
       
   477      */
       
   478      void SetSkinStyle(const TAknsItemID* aId, const TRect& aTileRect);
       
   479     
       
   480     /**
       
   481      * Modify position of the parent for list default context.
       
   482      *
       
   483      * @since Symbian 2.0
       
   484      * @param aPos The new position.
       
   485      */
       
   486      void SetSkinParentPos(const TPoint& aPos);
       
   487    
       
   488     /**
       
   489      * Modify properties of the skin context (list ending)*
       
   490      
       
   491      * @since Symbian 2.0
       
   492      * @param listEndId List ending skin background identifier.
       
   493      * @param aRect List ending background area from LAF.
       
   494      */
       
   495      void SetListEndSkinStyle(const TAknsItemID *listEndId,
       
   496                                       const TRect &aRect);
       
   497 
       
   498     /**
       
   499      * Gets RespectFocus flag.
       
   500      *
       
   501      * @return RespectFocus flag. @c ETrue if list item highlights are only 
       
   502      *         shown  when the list is has been focused on.
       
   503      */
       
   504      TBool RespectFocus() const;
       
   505     
       
   506     /**
       
   507      * Sets RespectFocus flag.
       
   508      *
       
   509      * @param aBool Value of RespectFocus flag. @c ETrue means that the 
       
   510      *        list item highlight is only shown if list is focused on.
       
   511      */
       
   512      void SetRespectFocus(TBool aBool);
       
   513 
       
   514     /**
       
   515      * Set list higlight skin style.
       
   516      *
       
   517      * @since Symbian 2.0
       
   518      * @param aFrameId The id for the frame.
       
   519      * @param aFrameCenterId The id for the frame center.
       
   520      */
       
   521      void SetSkinHighlightFrame(const TAknsItemID* aFrameId,
       
   522                                         const TAknsItemID* aFrameCenterId);
       
   523     /**
       
   524      * Set popup skin style.
       
   525      *
       
   526      * @since Symbian 2.0
       
   527      * @param aFrameId The id for the frame.
       
   528      * @param aFrameCenterId The id for the frame center.
       
   529      */
       
   530      void SetSkinPopupFrame(const TAknsItemID* aFrameId, 
       
   531                                     const TAknsItemID* aFrameCenterId);
       
   532     
       
   533     /**
       
   534      * Set popup skin frame position.
       
   535      *
       
   536      * @since Symbian 2.0
       
   537      * @param aOuterRect Outer position of the frame.
       
   538      * @param aInnerRect Inner position of the frame.
       
   539      */
       
   540      void SetSkinPopupFramePosition(const TRect& aOuterRect,
       
   541                                             const TRect& aInnerRect);
       
   542 
       
   543     /**
       
   544      * Enable or disable logical to visual reordering in listbox data text
       
   545      * drawing. By default, it is enabled. This has any effect only when
       
   546      * bidirectional text is rendered.
       
   547      *
       
   548      * If you convert text to visual order prior to passing it to the listbox
       
   549      * (for example by wrapping text to lines with methods in
       
   550      * @c AknBidiTextUtils), then you should disable conversion in listbox by
       
   551      * calling this method.
       
   552      *
       
   553      * @since Symbian 2.0
       
   554      * @param aUseConversion Enable (@c ETrue) or disable 
       
   555      *        (@c EFalse) conversion.
       
   556      */
       
   557      void UseLogicalToVisualConversion( TBool aUseConversion );
       
   558 
       
   559     /**
       
   560      * Enables or disables marquee.
       
   561      *
       
   562      * @param aEnable @c ETrue if On, @c EFalse if Off.
       
   563      */
       
   564      void EnableMarqueeL(TBool aEnable);
       
   565     
       
   566     /**
       
   567      * Determines if marquee is on.
       
   568      *
       
   569      * @return Flag indicating if marquee is on (@c ETrue on, @c EFalse off)  
       
   570      */
       
   571 #ifdef __WINS__
       
   572      const TBool IsMarqueeOn();
       
   573 #else
       
   574      TBool IsMarqueeOn();
       
   575 #endif // __WINS__
       
   576     /**
       
   577      * Function that is called when the owning control has gained the focus.
       
   578      * Causes that animation is continued because the control is visible and
       
   579      * focused.
       
   580      */
       
   581     void FocusGained();
       
   582 
       
   583     /**
       
   584      * Function that is called when the owning control has lost the focus.
       
   585      * Causes the animation to pause, even if the control is partially
       
   586      * visible.
       
   587      */
       
   588     void FocusLost();
       
   589     
       
   590     /**
       
   591      * Handles the skin change situation. Causes change of animation.
       
   592      *
       
   593      * @param aType Type of resource change.
       
   594      */
       
   595     void HandleResourceChange( TInt aType );
       
   596     
       
   597     /**
       
   598      * Gets animation used for drawing the list highlight.
       
   599      * May return NULL, in which case the normal skinned highlight should be
       
   600      * drawn. This pointer is valid only during the draw -> you should not
       
   601      * store it locally outside draw scope.
       
   602      *
       
   603      * @return Animation used for drawing the list highlight.
       
   604      */
       
   605      const CAknsEffectAnim* HighlightAnim() const;
       
   606 
       
   607     /**
       
   608      * This method should be called before drawing animated highlight. It will
       
   609      * sync the animation with the background under the current highlight (only
       
   610      * when current item index has changed).
       
   611      */
       
   612      void AboutToDrawHighlightAnim() const;
       
   613 
       
   614     /**
       
   615      * Sets the observer for overriding default highlight input layer drawing
       
   616      * functionality. Note that you should still call 
       
   617      * @c AboutToDrawHighlightAnim (it will call the observer if it is set).
       
   618      *
       
   619      * @param aDrawer Highlight animation drawer.
       
   620      */
       
   621      void SetHighlightAnimBackgroundDrawer( 
       
   622                                        MListBoxAnimBackgroundDrawer* aDrawer );
       
   623 
       
   624     /**
       
   625      * Changes item cell size and resizes highlight animation. Called by list
       
   626      * when item cell size changes. If you are using non-standard highlight 
       
   627      * sizes make sure to sync the list item cell size.
       
   628      *
       
   629      * @param aSize New cell size.
       
   630      */
       
   631      void SetItemCellSize( const TSize& aSize );
       
   632 
       
   633     /**
       
   634     * @return ETrue if highlight animation exists, EFalse otherwise.
       
   635     *
       
   636     * @since 3.1
       
   637     */
       
   638      TBool HasHighlightAnim() const;
       
   639     /**
       
   640     * The preferred method for drawing highlight animation in derived classes.
       
   641     * Before calling this method you should check that highlight animation
       
   642     * exists by calling HasHighlightAnim. In case of draw failure you should
       
   643     * default to normal skinned highlight drawing. For example:
       
   644     *
       
   645     * TBool drawOk = EFalse;
       
   646     *
       
   647     * if( HasHighlightAnim() )
       
   648     *     {
       
   649     *     drawOk = DrawHighlightAnim( gc, rect );
       
   650     *     }
       
   651     *
       
   652     * if( !drawOk )
       
   653     *     {
       
   654     *     ...do normal skinned draw
       
   655     *     }
       
   656     *
       
   657     * @param aGc   Graphics context for blitting animation frame
       
   658     * @param aRect Target rect for blitting animation frame
       
   659     * @return The draw status, ETrue if drawing was ok, EFalse otherwise.
       
   660     *
       
   661     * @since 3.1
       
   662     */
       
   663      TBool DrawHighlightAnim( CBitmapContext& aGc, const TRect& aRect ) const;
       
   664     /**
       
   665     * Creates pictograph interface.
       
   666     * Only effective in Japanese variant.
       
   667     * Called by the listbox.
       
   668     */
       
   669     void CreatePictographInterfaceL();
       
   670 
       
   671     /**
       
   672      * Creates marquee control.
       
   673      * Called by the listbox.
       
   674      */
       
   675     void CreateMarqueeControlL();
       
   676 
       
   677     /**
       
   678      * Resets the marquee animation data.
       
   679      */
       
   680     void ResetMarquee();
       
   681 
       
   682     /**
       
   683      * Gets the current list item index that is / was drawn by marquee.
       
   684      *
       
   685      * @return Index of the item that is / was drawn by marquee.
       
   686      */
       
   687     TInt CurrentMarqueeItemIndex();
       
   688     
       
   689     /**
       
   690      * Sets the current list item index that was drawn by marquee.
       
   691      *
       
   692      * @param aIndex Index of list item.
       
   693      */
       
   694     void SetCurrentMarqueeItemIndex(TInt aIndex);
       
   695 
       
   696     /**
       
   697      * Sets the current list item index (not for marquee). Since Symbian 3.0 
       
   698      * causes highlight animation to change its background (only if the current
       
   699      * item index changes). Don't call this method if the index is not the 
       
   700      * current item index.
       
   701      *
       
   702      * @param aIndex Index number of list item.
       
   703      */
       
   704     void SetCurrentItemIndex(TInt aIndex);
       
   705 
       
   706     // previous method was used both as current item index AND as currently
       
   707     // drawn item index. Not really good idea.
       
   708     void SetCurrentlyDrawnItemIndex( TInt aIndex );
       
   709 
       
   710     /**
       
   711      * Sets the font attached to the cell for each row separately.
       
   712      *
       
   713      * @param aRowIndex Row, which subcells are to be changed.
       
   714      * @param aSubCellIndex Index number of the subcell.
       
   715      * @param aFont Font to be used.
       
   716      */
       
   717      void SetSubCellFontForRowL(TInt aRowIndex, 
       
   718                                         TInt aSubCellIndex, 
       
   719                                         const CFont* aFont);
       
   720 
       
   721     /**
       
   722      * Gets font attached to the row and cell.
       
   723      *
       
   724      * @param aRow Index number of the row.
       
   725      * @param aSubCellIndex Index number of the subcell.
       
   726      * @return Font handle.
       
   727      */
       
   728      const CFont* RowAndSubCellFont(TInt aRow, 
       
   729                                             TInt aSubCellIndex) const;
       
   730 
       
   731     /**
       
   732      * Enables or disables transparency effect i.e. does the listbox draw its
       
   733      * own background or not.
       
   734      *
       
   735      * @param aDrawBackground @c EFalse enables transparency, @c ETrue disables.
       
   736      */ 
       
   737      void SetDrawBackground(const TBool aDrawBackground);
       
   738 
       
   739     /**
       
   740      * Checks if the list is transparent and drawing the background 
       
   741      * that would fall behind it.
       
   742      * 
       
   743      * @return @c EFalse if transparent, @c ETrue otherwise.
       
   744      */ 
       
   745     TBool IsBackgroundDrawingEnabled() const;
       
   746 
       
   747     /**
       
   748      * Enables or disables drawing background after scrollbar.
       
   749      *
       
   750      * @param aDrawBackground Default is @c ETrue which means that Scrollbar
       
   751      *        is drawn first.
       
   752      */ 
       
   753     void SetDrawScrollbarBackground(const TBool aDrawBackground);
       
   754 
       
   755     /**
       
   756      * Is the listbox drawing the background behind the scrollbar or not.
       
   757      *
       
   758      * @return @c ETrue if background is drawn after scrollbar, @c EFalse
       
   759      *         otherwise. 
       
   760      */ 
       
   761     TBool IsScrollbarBackgroundDrawingEnabled() const;
       
   762 
       
   763     /**
       
   764      * Sets position of listbox separator line.
       
   765      *
       
   766      * @param aPosition Position in which separator line is placed.
       
   767      */
       
   768      void SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition);
       
   769 
       
   770     /**
       
   771      * Gets separator line position.
       
   772      *
       
   773      * @return Position of separator line.
       
   774      */
       
   775      TAknSeparatorLinePosition SeparatorLinePosition() const;
       
   776 
       
   777     /**
       
   778      *
       
   779      * @deprecated
       
   780      *
       
   781      * Gets layout data needed for separator lines drawing.
       
   782      *
       
   783      * @return Layout data.
       
   784      */
       
   785      CAknLayoutData* LayoutData() const;
       
   786 
       
   787     /**
       
   788      *
       
   789      * @deprecated
       
   790      *
       
   791      * Gets LayOutInit flag used for drawing separator lines in lists.
       
   792      *
       
   793      * @internal
       
   794      * @return LayOutInit flag.
       
   795      */
       
   796      TBool LayoutInit() const;
       
   797     
       
   798     /**
       
   799      *
       
   800      * @deprecated
       
   801      *
       
   802      * Sets LayOutInit flag used for drawing separator lines in lists.
       
   803      *
       
   804      * @internal
       
   805      * @param aValue LayOutInit flag value.
       
   806      */
       
   807      void SetLayoutInit(TBool aValue);
       
   808 
       
   809     /**
       
   810      * Enables or disables underlining per text subcell only if 
       
   811      * @c TListItemProperties also has underlining enabled. If this method is
       
   812      * not called and @c TListItemProperties has underlining enabled, drawing
       
   813      * will revert to old style where only first text subcell will be underlined.
       
   814      *
       
   815      * @since S60 3.1
       
   816      * @param aUnderlinedCells Bitmask of cells to be underlined.
       
   817      */    
       
   818      void SetSubcellUnderlined( TBitFlags32 aUnderlinedCells );
       
   819 
       
   820     /**
       
   821     *
       
   822     * enables certain highlight skinning for
       
   823     * radibutton / checkbox set style lists
       
   824     *
       
   825     * should be used only by avkon internally
       
   826     *
       
   827     * @since S60 3.1
       
   828     * 
       
   829     */
       
   830 
       
   831     void UseHighlightIconSwapping( TBool aUse );
       
   832     TBool UseHighlightIconSwapping() const;
       
   833 
       
   834     // next methods are only used inside the drawing algorithm.
       
   835     // The set methods are also const because they do not change observable behavior of the system.
       
   836     TSize SubCellRealSize(TInt aSubCellIndex) const;
       
   837     void SetSubCellRealSize(TInt aSubCellIndex, TSize aRealSize) const;
       
   838     //
       
   839     TSize SubCellRealTextSize(TInt aSubCellIndex) const;
       
   840     void SetSubCellRealTextSize(TInt aSubCellIndex, TSize aRealSize) const;
       
   841     
       
   842 
       
   843     struct SSubCell
       
   844         {
       
   845         SSubCell() { }
       
   846         TInt iSubCell; // Must be first entry
       
   847         
       
   848         TInt iWidth;
       
   849         TMargins iMargin;
       
   850         const CFont* iBaseFont;
       
   851         TInt iActualFontIndex;
       
   852         TBool iGraphics;
       
   853         TBool iTransparent;
       
   854         TBool iNotAlwaysDrawn;
       
   855         CGraphicsContext::TTextAlign iAlign;
       
   856         CGraphicsContext::TPenStyle iRightSeparatorStyle;
       
   857         
       
   858         TPoint iPosition;
       
   859         TInt iBaseline;
       
   860         TSize iSize;
       
   861 
       
   862         TBool iUseSubCellColors; // this is set if someone calls SetSubCellColorsL()
       
   863         TColors iColors;
       
   864         TInt iTextClipGap;
       
   865 
       
   866         TBool iNumberCell;
       
   867         // the next ones change during drawing algorithm
       
   868         __MUTABLE TSize iRealSize;
       
   869         __MUTABLE TSize iRealTextSize;
       
   870         };
       
   871 
       
   872 protected:
       
   873 
       
   874     /**
       
   875      * C++ default constructor.
       
   876      */
       
   877 	CCCAppCommLauncherCustomListBoxData();
       
   878 
       
   879     /**
       
   880      * Second phase constructor. Highlight animation will be 
       
   881      * created by default (if it is provided by the skin).
       
   882      */
       
   883      void ConstructLD();
       
   884 
       
   885     /**
       
   886      * Second phase constructor for subclasses that want to override highlight
       
   887      * animation creation.
       
   888      *
       
   889      * @param aAnimationIID Skin ItemID of the constructed animation. Passing
       
   890      *        @c KAknsIIDNone will disable highlight animation.
       
   891      */
       
   892      void ConstructLD(const TAknsItemID& aAnimationIID);
       
   893 
       
   894     /**
       
   895      * Main drawing algorithm used for drawing S60 list item. 
       
   896      * @c Draw() method should call this method after clearing the list item
       
   897      * area and drawing the highlight.
       
   898      *
       
   899      * @param aProperties Properties attached to the list item.
       
   900      * @param aGc Graphics Context used for drawing the list item.
       
   901      * @param aText A text string describing the list item cells.
       
   902      * @param aRect The area of the screen for the whole list item.
       
   903      * @param aHighlight Whether the list item is selected.
       
   904      * @param aColors The colors used for drawing the item.
       
   905      * @panic EAknPanicFormattedCellListInvalidBitmapIndex The defined bitmap
       
   906      *        index is invalid.
       
   907      * @panic EAknPanicOutOfRange The defined index is out of the range. 
       
   908      */
       
   909      void DrawFormatted(TListItemProperties aProperties,
       
   910                                 CWindowGc& aGc,
       
   911                                 const TDesC* aText,
       
   912                                 const TRect& aRect,
       
   913                                 TBool aHighlight,
       
   914                                 const TColors& aColors) const;
       
   915 
       
   916     /**
       
   917     * Draws list items.
       
   918     *
       
   919     * @param aProperties Properties attached to the list item.
       
   920     * @param aGc Graphics Context used for drawing the list item.
       
   921     * @param aText A text string describing the list item cells.
       
   922     * @param aRect The area of the screen for the whole list item.
       
   923     * @param aHighlight Whether the list item is selected.
       
   924     * @param aColors The colors used for drawing the item.
       
   925     * @internal
       
   926     */
       
   927     void DrawFormattedSimple( TListItemProperties& aProperties,
       
   928                               CWindowGc& aGc,
       
   929                               const TDesC* aText,
       
   930                               const TRect& aRect,
       
   931                               TBool aHighlight,
       
   932                               const TColors& aColors ) const;
       
   933 private:
       
   934     /**
       
   935     * @internal
       
   936     */
       
   937     void DrawFormattedOld( TListItemProperties& aProperties,
       
   938                            CWindowGc& aGc,
       
   939                            const TDesC* aText,
       
   940                            const TRect& aItemRect,
       
   941                            TBool aHighlight,
       
   942                            const TColors& aColors ) const;
       
   943 
       
   944     /**
       
   945     * @internal helper
       
   946     */
       
   947     void BitBltColored( CWindowGc&      aGc,
       
   948                         TBool           aHighlight,
       
   949                         const CGulIcon* aIcon,
       
   950                         TInt            aSubcell,
       
   951                         TBool           aColorIcon,
       
   952                         const TRect&    aGraphicRect ) const;
       
   953 
       
   954 
       
   955 public:
       
   956     /**
       
   957      * Customizes marquee default behavior. 
       
   958      * Use this before enabling marquee ( @c EnableMarqueeL() ), otherwise 
       
   959      * marquee behavior will change during animation.
       
   960      *
       
   961      * @since S60 2.8
       
   962      * @param aLoops Max number of loops to be executed (default 1).
       
   963      * @param aScrollAmount The amount of pixels scrolled per frame (default 6).
       
   964      * @param aScrollDelay The delay between each loop
       
   965      *                     (in microseconds, default 1000000 microseconds).
       
   966      * @param aInterval The interval between frame updates after
       
   967      *                  the initial delay, in microseconds.
       
   968      */
       
   969      void SetMarqueeParams(const TInt aLoops,
       
   970                                    const TInt aScrollAmount, 
       
   971                                    const TInt aScrollDelay, 
       
   972                                    const TInt aInterval);
       
   973 
       
   974 
       
   975     /**
       
   976     * @internal helper
       
   977     */
       
   978     void SetClippedByWrap( TUint32 aClippedCells, TBool aUseClippedByWrap );
       
   979             
       
   980     /**
       
   981     * Tells whether current item has clipped text cells
       
   982     * @since S60 3.2
       
   983     * @return bitfield of clipped subcells
       
   984     */
       
   985      TUint32 CurrentItemTextWasClipped() const;
       
   986 
       
   987 protected: // non-exported!
       
   988 
       
   989     /**
       
   990      * Gets list box extension, which is used for adding more funtionality to
       
   991      * list boxes without destroying compatibility with previous versions. 
       
   992      *
       
   993      * @return Pointer to the list box extension.
       
   994      */
       
   995 	CCCAppCommLauncherCustomListBoxDataExtension* Extension();
       
   996 
       
   997     /**
       
   998      * Gets list box extension, which is used for adding more funtionality to
       
   999      * list boxes without destroying compatibility with previous versions. 
       
  1000      *
       
  1001      * @return Pointer to the list box extension.
       
  1002      */
       
  1003 	CCCAppCommLauncherCustomListBoxDataExtension* Extension() const;
       
  1004 
       
  1005 public:
       
  1006     /**
       
  1007      * Renders a default animated highlight.
       
  1008      *
       
  1009      * @param aGc Graphics context used for drawing.
       
  1010      * @param aItemRect the area of the screen for drawing.
       
  1011      * @param aHighlight If @c ETrue highlight is rendered
       
  1012      *        if @c EFalse, nothing is done.
       
  1013      */
       
  1014     void DrawDefaultHighlight(CWindowGc &aGc,
       
  1015                               const TRect &aItemRect,
       
  1016                               TBool aHighlight) const;
       
  1017 
       
  1018     /**
       
  1019      * Renders a settings animated highlight.
       
  1020      *
       
  1021      * @param aGc Graphics context used for drawing.
       
  1022      * @param aItemRect the area of the screen for drawing.
       
  1023      * @param aHighlight If @c ETrue highlight is rendered 
       
  1024      *        if @c EFalse, nothing is done.
       
  1025      */
       
  1026     void DrawSettingHighlight(CWindowGc &aGc,
       
  1027                               const TRect &aItemRect,
       
  1028                               TBool aHighlight) const;
       
  1029 
       
  1030     /**
       
  1031      * Renders a popup animated highlight.
       
  1032      *
       
  1033      * @param aGc Graphics context used for drawing.
       
  1034      * @param aItemRect the area of the screen for drawing.
       
  1035      * @param aHighlight If @c ETrue highlight is rendered 
       
  1036      *        if @c EFalse, nothing is done.
       
  1037      */
       
  1038     void DrawPopupHighlight(CWindowGc &aGc,
       
  1039                             const TRect &aItemRect,
       
  1040                             TBool aHighlight) const;
       
  1041 
       
  1042     /**
       
  1043      * Draws a popup frame.
       
  1044      *
       
  1045      * @param aGc Graphics context used for drawing.
       
  1046      */
       
  1047     void DrawPopupFrame(CWindowGc &aGc) const;
       
  1048 
       
  1049     /**
       
  1050      * Disables logical-to-visual conversion in subcells between indexes.
       
  1051      *
       
  1052      * @param aFirstIndex First subcell not to use logical-to-visual conversion.
       
  1053      * @param aSecondIndex Last subcell not to use logical-to-visual conversion.
       
  1054      */
       
  1055     void SetWordWrappedSubcellIndices( TInt aFirstIndex, TInt aSecondIndex );
       
  1056 
       
  1057     /**
       
  1058      * Sets the size of the subcell's icon.
       
  1059      *
       
  1060      * @internal
       
  1061      * @param aIndex Subcell to modify.
       
  1062      * @param aSize New size for the icon.
       
  1063      */
       
  1064      void SetSubCellIconSize(TInt aIndex, TSize aSize);
       
  1065 
       
  1066     /**
       
  1067      * Gets the size of the subcell's icon.
       
  1068      *
       
  1069      * @internal
       
  1070      * @param aIndex Subcell to query.
       
  1071      * @return Size of the subcell's icon.
       
  1072      */
       
  1073     TSize GetSubCellIconSize(TInt aIndex);
       
  1074 
       
  1075     /**
       
  1076      * Create and set the defaul skin context. Needed by the dynamic skin support.
       
  1077      *
       
  1078      * @internal
       
  1079      * @panic EAknPanicNullPointer Panics if @c iExtension has not been defined.
       
  1080      */
       
  1081     void SetupSkinContextL();
       
  1082 
       
  1083     /**
       
  1084      * Sets a text color if enhanced skin support is available.
       
  1085      *
       
  1086      * @internal
       
  1087      * @param aIndex Index Number of text color in @c TAknsQsnTextColorsIndex.
       
  1088      * @see @c TAknsQsnTextColorsIndex.
       
  1089      */
       
  1090     void SetESSTextColor( TAknsQsnTextColorsIndex aIndex );
       
  1091 
       
  1092     /**
       
  1093      * Set a highlighted text color if enhanced skin support is available.
       
  1094      *
       
  1095      * @internal
       
  1096      * @param aIndex Index Number of text color in @c TAknsQsnTextColorsIndex.
       
  1097      * @see @c TAknsQsnTextColorsIndex.
       
  1098      */
       
  1099     void SetESSHighlightedTextColor( TAknsQsnTextColorsIndex aIndex );
       
  1100 
       
  1101     /**
       
  1102      * Set window line layout for the defined sub cell.
       
  1103      *
       
  1104      * @internal
       
  1105      * @param aSubCell Target cell for which the layout is changed.
       
  1106      * @param aGraphicLayout The new layout.
       
  1107      */
       
  1108     void SetGraphicSubCellL(TInt aSubCell, const TAknWindowLineLayout& aGraphicLayout);
       
  1109     
       
  1110     /**
       
  1111      * Support for new layouts.
       
  1112      *
       
  1113      * Set text line layout for the defined sub cell.
       
  1114      *
       
  1115      * @internal
       
  1116      * @param aSubCell Target cell.
       
  1117      * @param aTextLayout The new layout. 
       
  1118      */
       
  1119     void SetTextSubCellL(TInt aSubCell,const TAknTextLineLayout& aTextLayout);
       
  1120 
       
  1121 
       
  1122     /**
       
  1123      * Support for new layouts.
       
  1124      *
       
  1125      * @internal
       
  1126      * Changes setting of a graphical sub cell which is contained by the 
       
  1127      * defined text sub cell. 
       
  1128      *
       
  1129      * @param aSubCell Target text sub cell.
       
  1130      * @param aTextLayout New text layout. 
       
  1131      * @param aAffectedSubCell The graphical sub cell affected by the change. 
       
  1132      */
       
  1133     
       
  1134     TInt CorrectBaseline(TInt aParentHeight, TInt aBaseline, TInt aFontId);
       
  1135     
       
  1136     TBool IsParentRelative(TInt aVal);
       
  1137     
       
  1138     void SetConditionalSubCellL(TInt aSubCell,
       
  1139                                 const TAknTextLineLayout& aTextLayout,
       
  1140                                 TInt aAffectedSubCell);
       
  1141 
       
  1142     /**
       
  1143     * Checks if the list box uses scalable layouts.
       
  1144     *
       
  1145     * @internal
       
  1146     */
       
  1147     TBool UsesScalableLayoutData() const;
       
  1148     /**
       
  1149     * @internal. Do NOT use.
       
  1150     */
       
  1151     void  UseScalableLayoutData( TBool aUse );
       
  1152         
       
  1153     /**
       
  1154     * @internal
       
  1155     */
       
  1156     void SetStretchableGraphicSubCellL(TInt aSubCell, 
       
  1157                                        const TAknWindowComponentLayout& aNormalLayout, 
       
  1158                                        const TAknWindowComponentLayout& aStretchedLayout);
       
  1159     /**
       
  1160     * @internal
       
  1161     */
       
  1162     void SetStretchableTextSubCellL(TInt aSubCell,                                      
       
  1163                                        const TAknTextComponentLayout& aNormalLayout, 
       
  1164                                        const TAknTextComponentLayout& aStretchedLayout);
       
  1165     /**
       
  1166     * @internal
       
  1167     */
       
  1168     void SetStretchableConditionalSubCellL(TInt aSubCell,
       
  1169                                            const TAknTextComponentLayout& aNormalLayout,
       
  1170                                            const TAknTextComponentLayout& aStretchedLayout,
       
  1171                                            TInt aNormalSubCell,
       
  1172                                            TInt aStretchedSubCell );
       
  1173     /**
       
  1174     * @internal
       
  1175     */
       
  1176     void ResetSLSubCellArray();                                           
       
  1177 
       
  1178     /**
       
  1179     * @internal
       
  1180     */
       
  1181     void EnableStretching(const TBool aEnabled);
       
  1182     /**
       
  1183     * @internal
       
  1184     */
       
  1185     TBool StretchingEnabled() const;
       
  1186     /**
       
  1187     * @internal
       
  1188     */
       
  1189     void HideSecondRow(const TBool aHide);
       
  1190     /**
       
  1191     * @internal
       
  1192     */
       
  1193     TBool SecondRowHidden() const;
       
  1194     /**
       
  1195     * @internal
       
  1196     */
       
  1197     void SubCellsMightIntersect( const TBool aMightIntersect );
       
  1198 
       
  1199     // Drop shadows can be toggled on/off in
       
  1200     // "transparent" lists (eg. transparent camera setting page).
       
  1201     // ETrue = on, EFalse = off
       
  1202     /**
       
  1203     * @internal
       
  1204     */
       
  1205     void ToggleDropShadows( const TBool aEnable );
       
  1206 
       
  1207     // changes tactile feedback behaviour
       
  1208     // ETrue  - feedback for any item
       
  1209     // EFalse - feedback for focused item only
       
  1210     /**
       
  1211     * @internal
       
  1212     */
       
  1213     void SetFeedbackForAllItems( TBool aFeedbackForAllItems );
       
  1214     // gets tactile feedback behaviour
       
  1215     // ETrue  - feedback for any item
       
  1216     // EFalse - feedback for focused item only
       
  1217     /**
       
  1218     * @internal
       
  1219     */
       
  1220     TBool FeedbackForAllItems();
       
  1221 
       
  1222     /**
       
  1223     * Returns ETrue if kinetic scrolling is enabled.
       
  1224     * @internal
       
  1225     * @since S60 5.0
       
  1226     * @return ETrue if kinetic scrolling feature is enabled.
       
  1227     */
       
  1228     TBool KineticScrollingEnabled() const;
       
  1229     
       
  1230     /**
       
  1231     * Returns instance of CEikListBox.
       
  1232     * @internal
       
  1233     * @since S60 5.0
       
  1234     * @return Instance of CEikListBox.
       
  1235     */
       
  1236     CEikListBox* ListBox() const;
       
  1237     
       
  1238     void InitSmileyL();
       
  1239     
       
  1240     void SetSmileySubCellL( TInt aSubCell );
       
  1241 
       
  1242     
       
  1243 private:
       
  1244     void DoConstructL( const TAknsItemID& aAnimationIID );
       
  1245 
       
  1246     const TColors &Colors(TInt aItemIndex, TInt aSubCell) const;
       
  1247     TInt LastSubCell() const;
       
  1248     void AddSubCellL(TInt aSubCell);
       
  1249     SSubCell& At(TInt aArrayIndex);
       
  1250     const SSubCell& At(TInt aArrayIndex) const;
       
  1251     TInt FindSubCellIndex(TInt& aArrayIndex,TInt aSubCell) const;
       
  1252     void FindSubCellIndexOrAddL(TInt& aArrayIndex,TInt aSubCell);
       
  1253     TInt AddActualFontL(const CFont* aBaseFont);
       
  1254     void SetUnderlineStyle( TListItemProperties aProperties, CWindowGc& aGc, TInt aSubCell ) const;
       
  1255     void CheckIfSubCellsIntersect( TAknTextLineLayout* aLayouts, TBool* aResults, const TDesC& aText, const TRect& aItemRect ) const;
       
  1256 
       
  1257 private:
       
  1258     CArrayFix<SSubCell>* iSubCellArray;
       
  1259     CArrayPtr<CGulIcon>* iIconArray;
       
  1260     friend class CCCAppCommLauncherCustomListBoxItemDrawer; // this is for "lastsubcell" -access.
       
  1261     TColors defaultcolors;
       
  1262     CCCAppCommLauncherCustomListBoxDataExtension *iExtension; 
       
  1263     };
       
  1264 
       
  1265 
       
  1266 #endif /* CCAPPCOMMLAUNCHERCUSTOMLISTBOXDATA_H_ */