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