CFormattedCellListBoxData Class Reference

class CFormattedCellListBoxData : public CListBoxData

CFormattedCellListBoxData can draw list items. This is similar class than CColumnListBoxData , but it can more freely layout the list items; more parameters can be used to position the elements. In particular, the position of the elements is free, and not tied to fixed width columns.

This class is used to draw most of the S60 list and grid layouts.

It also handles truncation of the text elements, centering and cropping of images, z-order/overlapping cells, bi-directional text drawing, backgrounds for lists, highlight drawing, various text and image properties and finally the parts of the separator lines that are inside list items.

This is a very low level class. The less you use this class, the better. Applications should be using CAknSelectionListDialog or CAknMarkableListDialog or CAknListQueryDialog to use lists. There are enough predefined list layouts available, so there should be no need for applications to use this class. See Style Guide for more information. Use of this class may cause your application to not look ok when properties of the device change.

avkon

Inherits from

Public Member Functions
~CFormattedCellListBoxData ()
IMPORT_C void AboutToDrawHighlightAnim ()
IMPORT_C CCoeControl * Control ()
void CreateMarqueeControlL ()
void CreatePictographInterfaceL ()
IMPORT_C TUint32 CurrentItemTextWasClipped ()
TInt CurrentMarqueeItemIndex ()
IMPORT_C void Draw ( TListItemProperties , CWindowGc &, const TDesC *, const TRect &, TBool , const TColors &)
void DrawDefaultHighlight ( CWindowGc &, const TRect &, TBool )
IMPORT_C TBool DrawHighlightAnim ( CBitmapContext &, const TRect &)
IMPORT_C void EnableMarqueeL ( TBool )
void EnableStretching (const TBool )
TBool FeedbackForAllItems ()
void FocusGained ()
void FocusLost ()
IMPORT_C CFont * Font (const TListItemProperties &, TInt )
TSize GetSubCellIconSize ( TInt )
void HandleResourceChange ( TInt )
IMPORT_C TBool HasHighlightAnim ()
void HideSecondRow (const TBool )
IMPORT_C const CAknsEffectAnim * HighlightAnim ()
IMPORT_C CArrayPtr < CGulIcon > * IconArray ()
void InitSmileyL ()
TBool IsBackgroundDrawingEnabled ()
IMPORT_C TBool IsMarqueeOn ()
TBool IsScrollbarBackgroundDrawingEnabled ()
TBool KineticScrollingEnabled ()
IMPORT_C CAknLayoutData * LayoutData ()
IMPORT_C TBool LayoutInit ()
CEikListBox * ListBox ()
IMPORT_C CFormattedCellListBoxData * NewL ()
void ResetMarquee ()
void ResetSLSubCellArray ()
IMPORT_C TBool RespectFocus ()
IMPORT_C const CFont * RowAndSubCellFont ( TInt , TInt )
TBool SecondRowHidden ()
IMPORT_C TAknSeparatorLinePosition SeparatorLinePosition ()
IMPORT_C void SetBackgroundSkinStyle (const TAknsItemID *, const TRect &)
void SetClippedByWrap ( TUint32 , TBool )
void SetConditionalSubCellL ( TInt , const TAknTextLineLayout &, TInt )
IMPORT_C void SetControl ( CCoeControl *)
void SetCurrentItemIndex ( TInt )
void SetCurrentMarqueeItemIndex ( TInt )
void SetCurrentlyDrawnItemIndex ( TInt )
IMPORT_C void SetDrawBackground (const TBool )
void SetDrawScrollbarBackground (const TBool )
void SetESSHighlightedTextColor ( TAknsQsnTextColorsIndex )
void SetESSTextColor ( TAknsQsnTextColorsIndex )
void SetFeedbackForAllItems ( TBool )
void SetGraphicSubCellL ( TInt , const TAknWindowLineLayout &)
IMPORT_C void SetGraphicsSubCellL ( TInt , TBool )
IMPORT_C void SetHighlightAnimBackgroundDrawer ( MListBoxAnimBackgroundDrawer *)
IMPORT_C void SetIconArray ( CArrayPtr < CGulIcon > *)
IMPORT_C void SetIconArrayL ( CArrayPtr < CGulIcon > *)
IMPORT_C void SetItemCellSize (const TSize &)
IMPORT_C void SetLayoutInit ( TBool )
IMPORT_C void SetListEndSkinStyle (const TAknsItemID *, const TRect &)
IMPORT_C void SetMarqueeParams (const TInt , const TInt , const TInt , const TInt )
IMPORT_C void SetNotAlwaysDrawnSubCellL ( TInt , TBool )
IMPORT_C void SetNumberCellL ( TInt , TBool )
IMPORT_C void SetRespectFocus ( TBool )
IMPORT_C void SetSeparatorLinePosition ( TAknSeparatorLinePosition )
IMPORT_C void SetSkinEnabledL ( TBool )
IMPORT_C void SetSkinHighlightFrame (const TAknsItemID *, const TAknsItemID *)
IMPORT_C void SetSkinParentPos (const TPoint &)
IMPORT_C void SetSkinPopupFrame (const TAknsItemID *, const TAknsItemID *)
IMPORT_C void SetSkinPopupFramePosition (const TRect &, const TRect &)
IMPORT_C void SetSkinStyle (const TAknsItemID *, const TRect &)
void SetSmileySubCellL ( TInt )
void SetStretchableConditionalSubCellL ( TInt , const TAknTextComponentLayout &, const TAknTextComponentLayout &, TInt , TInt )
void SetStretchableGraphicSubCellL ( TInt , const TAknWindowComponentLayout &, const TAknWindowComponentLayout &)
void SetStretchableTextSubCellL ( TInt , const TAknTextComponentLayout &, const TAknTextComponentLayout &)
IMPORT_C void SetSubCellAlignmentL ( TInt , CGraphicsContext::TTextAlign )
IMPORT_C void SetSubCellBaselinePosL ( TInt , TInt )
IMPORT_C void SetSubCellColorsL ( TInt , const TColors &)
IMPORT_C void SetSubCellFontForRowL ( TInt , TInt , const CFont *)
IMPORT_C void SetSubCellFontL ( TInt , const CFont *)
IMPORT_C void SetSubCellIconSize ( TInt , TSize )
IMPORT_C void SetSubCellMarginsL ( TInt , TMargins )
IMPORT_C void SetSubCellPositionL ( TInt , TPoint )
void SetSubCellRealSize ( TInt , TSize )
void SetSubCellRealTextSize ( TInt , TSize )
IMPORT_C void SetSubCellRightSeparatorStyleL ( TInt , CGraphicsContext::TPenStyle )
IMPORT_C void SetSubCellSizeL ( TInt , TSize )
IMPORT_C void SetSubCellTextClipGapL ( TInt , TInt )
IMPORT_C void SetSubcellUnderlined ( TBitFlags32 )
void SetTextSubCellL ( TInt , const TAknTextLineLayout &)
IMPORT_C void SetTransparentSubCellL ( TInt , TBool )
void SetWordWrappedSubcellIndices ( TInt , TInt )
void SetupSkinContextL ()
IMPORT_C MAknsControlContext * SkinBackgroundContext ()
IMPORT_C TBool SkinEnabled ()
TBool StretchingEnabled ()
IMPORT_C CGraphicsContext::TTextAlign SubCellAlignment ( TInt )
IMPORT_C TInt SubCellBaselinePos ( TInt )
IMPORT_C const TColors & SubCellColors ( TInt )
IMPORT_C const CFont * SubCellFont ( TInt )
IMPORT_C TBool SubCellIsGraphics ( TInt )
IMPORT_C TBool SubCellIsNotAlwaysDrawn ( TInt )
IMPORT_C TBool SubCellIsNumberCell ( TInt )
IMPORT_C TBool SubCellIsTransparent ( TInt )
IMPORT_C TMargins SubCellMargins ( TInt )
IMPORT_C TPoint SubCellPosition ( TInt )
TSize SubCellRealSize ( TInt )
TSize SubCellRealTextSize ( TInt )
IMPORT_C CGraphicsContext::TPenStyle SubCellRightSeparatorStyle ( TInt )
IMPORT_C TSize SubCellSize ( TInt )
IMPORT_C TInt SubCellTextClipGap ( TInt )
void SubCellsMightIntersect (const TBool )
void ToggleDropShadows (const TBool )
void UseHighlightIconSwapping ( TBool )
TBool UseHighlightIconSwapping ()
IMPORT_C void UseLogicalToVisualConversion ( TBool )
void UseScalableLayoutData ( TBool )
IMPORT_C TBool UseSubCellColors ( TInt )
TBool UsesScalableLayoutData ()
Protected Member Functions
CFormattedCellListBoxData ()
IMPORT_C void ConstructLD ()
IMPORT_C void ConstructLD (const TAknsItemID &)
IMPORT_C void DrawFormatted ( TListItemProperties , CWindowGc &, const TDesC *, const TRect &, TBool , const TColors &)
void DrawFormattedSimple ( TListItemProperties &, CWindowGc &, const TDesC *, const TRect &, TBool , const TColors &)
CFormattedCellListBoxDataExtension * Extension ()
CFormattedCellListBoxDataExtension * Extension ()
Private Member Functions
TInt AddActualFontL (const CFont *)
void AddSubCellL ( TInt )
SSubCell & At ( TInt )
const SSubCell & At ( TInt )
void BitBltColored ( CWindowGc &, TBool , const CGulIcon *, TInt , TBool , const TRect &)
void CheckIfSubCellsIntersect ( TAknTextLineLayout *, TBool *, const TDesC &, const TRect &)
const TColors & Colors ( TInt , TInt )
void DoConstructL (const TAknsItemID &)
void DrawFormattedOld ( TListItemProperties &, CWindowGc &, const TDesC *, const TRect &, TBool , const TColors &)
void DrawMarkingModeIcons ( TListItemProperties &, CWindowGc &, TRect &)
TInt FindSubCellIndex ( TInt &, TInt )
void FindSubCellIndexOrAddL ( TInt &, TInt )
TInt LastSubCell ()
void SetUnderlineStyle ( TListItemProperties , CWindowGc &, TInt )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CListBoxData::Alignment()const
CListBoxData::CListBoxData()
CListBoxData::ConstructFontL(const CFont *,TFontStyle,CFontsWithStyle &)
CListBoxData::ConstructL(const CFont *)
CListBoxData::DrawItem(CWindowGc &,const TRect &,const TDesC &,const CFont &,const TInt,const CGraphicsContext::TTextAlign)const
CListBoxData::Font(const TListItemProperties &)const
CListBoxData::FontBoundValues()const
CListBoxData::IsSearchString()const
CListBoxData::NONSHARABLE_CLASS(CFontsWithStyle)
CListBoxData::RegenerateFonts(CFontsWithStyle &,TInt)
CListBoxData::SetAlignmentL(CGraphicsContext::TTextAlign)
CListBoxData::SetFontHeight(TInt)
CListBoxData::SetSearchStringL(const TDesC *)
CListBoxData::SetSkinBackgroundControlContextL(MAknsControlContext *)
CListBoxData::SetupGc(const TListItemProperties &,CWindowGc &)const
CListBoxData::SkinBackgroundControlContext()const
CListBoxData::UpdateFontBoundValues(const CFont &)
CListBoxData::~CListBoxData()
Private Attributes
TColors defaultcolors
CFormattedCellListBoxDataExtension * iExtension
CArrayPtr < CGulIcon > * iIconArray
CArrayFix < SSubCell > * iSubCellArray
Inherited Attributes
CListBoxData::iBoldFont
CListBoxData::iBoldItalicFont
CListBoxData::iItalicFont
CListBoxData::iNormalFont
CListBoxData::iSearchString

Constructor & Destructor Documentation

CFormattedCellListBoxData()

IMPORT_C CFormattedCellListBoxData ( ) [protected]

C++ default constructor.

~CFormattedCellListBoxData()

IMPORT_C ~CFormattedCellListBoxData ( )

Destructor.

Member Functions Documentation

AboutToDrawHighlightAnim()

IMPORT_C void AboutToDrawHighlightAnim ( ) const

This method should be called before drawing animated highlight. It will sync the animation with the background under the current highlight (only when current item index has changed).

AddActualFontL(const CFont *)

TInt AddActualFontL ( const CFont * aBaseFont ) [private]

Parameters

const CFont * aBaseFont

AddSubCellL(TInt)

void AddSubCellL ( TInt aSubCell ) [private]

Parameters

TInt aSubCell

At(TInt)

SSubCell & At ( TInt aArrayIndex ) [private]

Parameters

TInt aArrayIndex

At(TInt)

const SSubCell & At ( TInt aArrayIndex ) const [private]

Parameters

TInt aArrayIndex

BitBltColored(CWindowGc &, TBool, const CGulIcon *, TInt, TBool, const TRect &)

void BitBltColored ( CWindowGc & aGc,
TBool aHighlight,
const CGulIcon * aIcon,
TInt aSubcell,
TBool aColorIcon,
const TRect & aGraphicRect
) const [private]

Parameters

CWindowGc & aGc
TBool aHighlight
const CGulIcon * aIcon
TInt aSubcell
TBool aColorIcon
const TRect & aGraphicRect

CheckIfSubCellsIntersect(TAknTextLineLayout *, TBool *, const TDesC &, const TRect &)

void CheckIfSubCellsIntersect ( TAknTextLineLayout * aLayouts,
TBool * aResults,
const TDesC & aText,
const TRect & aItemRect
) const [private]

Parameters

TAknTextLineLayout * aLayouts
TBool * aResults
const TDesC & aText
const TRect & aItemRect

Colors(TInt, TInt)

const TColors & Colors ( TInt aItemIndex,
TInt aSubCell
) const [private]

Parameters

TInt aItemIndex
TInt aSubCell

ConstructLD()

IMPORT_C void ConstructLD ( ) [protected]

Second phase constructor. Highlight animation will be created by default (if it is provided by the skin).

ConstructLD(const TAknsItemID &)

IMPORT_C void ConstructLD ( const TAknsItemID & aAnimationIID ) [protected]

Second phase constructor for subclasses that want to override highlight animation creation.

Parameters

const TAknsItemID & aAnimationIID Skin ItemID of the constructed animation. Passing KAknsIIDNone will disable highlight animation.

Control()

IMPORT_C CCoeControl * Control ( ) const

Ability for a skin subsystem to access Mop chain through current listbox control.

Since
Symbian 2.0

CreateMarqueeControlL()

void CreateMarqueeControlL ( )

Creates marquee control. Called by the listbox.

CreatePictographInterfaceL()

void CreatePictographInterfaceL ( )

Creates pictograph interface. Only effective in Japanese variant. Called by the listbox.

CurrentItemTextWasClipped()

IMPORT_C TUint32 CurrentItemTextWasClipped ( ) const
Tells whether current item has clipped text cells
Since
S60 3.2

CurrentMarqueeItemIndex()

TInt CurrentMarqueeItemIndex ( )

Gets the current list item index that is / was drawn by marquee.

DoConstructL(const TAknsItemID &)

void DoConstructL ( const TAknsItemID & aAnimationIID ) [private]

Parameters

const TAknsItemID & aAnimationIID

Draw(TListItemProperties, CWindowGc &, const TDesC *, const TRect &, TBool, const TColors &)

IMPORT_C void Draw ( TListItemProperties aProperties,
CWindowGc & aGc,
const TDesC * aText,
const TRect & aRect,
TBool aHighlight,
const TColors & aColors
) const [virtual]

From CListBoxData .

Draw() is the most important method in CEikFormattedCellListBoxData . This is the only method that needs to be implemented in this class and it draws the whole list item.

Parameters

TListItemProperties aProperties Properties attached to the list item.
CWindowGc & aGc Graphics Context used for drawing the list item.
const TDesC * aText A text string describing the list item cells.
const TRect & aRect The area of the screen for the whole list item.
TBool aHighlight Whether the list item is selected.
const TColors & aColors The colours used for drawing the item.

DrawDefaultHighlight(CWindowGc &, const TRect &, TBool)

void DrawDefaultHighlight ( CWindowGc & aGc,
const TRect & aItemRect,
TBool aHighlight
) const

Renders a default animated highlight.

Parameters

CWindowGc & aGc Graphics context used for drawing.
const TRect & aItemRect the area of the screen for drawing.
TBool aHighlight If ETrue highlight is rendered if EFalse, nothing is done.

DrawFormatted(TListItemProperties, CWindowGc &, const TDesC *, const TRect &, TBool, const TColors &)

IMPORT_C void DrawFormatted ( TListItemProperties aProperties,
CWindowGc & aGc,
const TDesC * aText,
const TRect & aRect,
TBool aHighlight,
const TColors & aColors
) const [protected]

Main drawing algorithm used for drawing S60 list item. Draw() method should call this method after clearing the list item area and drawing the highlight.

panic
EAknPanicFormattedCellListInvalidBitmapIndex The defined bitmap index is invalid.
panic
EAknPanicOutOfRange The defined index is out of the range.

Parameters

TListItemProperties aProperties Properties attached to the list item.
CWindowGc & aGc Graphics Context used for drawing the list item.
const TDesC * aText A text string describing the list item cells.
const TRect & aRect The area of the screen for the whole list item.
TBool aHighlight Whether the list item is selected.
const TColors & aColors The colors used for drawing the item.

DrawFormattedOld(TListItemProperties &, CWindowGc &, const TDesC *, const TRect &, TBool, const TColors &)

void DrawFormattedOld ( TListItemProperties & aProperties,
CWindowGc & aGc,
const TDesC * aText,
const TRect & aItemRect,
TBool aHighlight,
const TColors & aColors
) const [private]

Parameters

TListItemProperties & aProperties
CWindowGc & aGc
const TDesC * aText
const TRect & aItemRect
TBool aHighlight
const TColors & aColors

DrawFormattedSimple(TListItemProperties &, CWindowGc &, const TDesC *, const TRect &, TBool, const TColors &)

void DrawFormattedSimple ( TListItemProperties & aProperties,
CWindowGc & aGc,
const TDesC * aText,
const TRect & aRect,
TBool aHighlight,
const TColors & aColors
) const [protected]

Draws list items.

Parameters

TListItemProperties & aProperties Properties attached to the list item.
CWindowGc & aGc Graphics Context used for drawing the list item.
const TDesC * aText A text string describing the list item cells.
const TRect & aRect The area of the screen for the whole list item.
TBool aHighlight Whether the list item is selected.
const TColors & aColors The colors used for drawing the item.

DrawHighlightAnim(CBitmapContext &, const TRect &)

IMPORT_C TBool DrawHighlightAnim ( CBitmapContext & aGc,
const TRect & aRect
) const

The preferred method for drawing highlight animation in derived classes. Before calling this method you should check that highlight animation exists by calling HasHighlightAnim. In case of draw failure you should default to normal skinned highlight drawing. For example:

TBool drawOk = EFalse;

if( HasHighlightAnim() ) { drawOk = DrawHighlightAnim( gc, rect ); }

if( !drawOk ) { ...do normal skinned draw }

Since
3.1

Parameters

CBitmapContext & aGc Graphics context for blitting animation frame
const TRect & aRect Target rect for blitting animation frame

DrawMarkingModeIcons(TListItemProperties &, CWindowGc &, TRect &)

void DrawMarkingModeIcons ( TListItemProperties & aProperties,
CWindowGc & aGc,
TRect & aItemRect
) const [private]

Draws check boxes in marking mode

Parameters

TListItemProperties & aProperties Item properties
CWindowGc & aGc Graphics context
TRect & aItemRect Item area

EnableMarqueeL(TBool)

IMPORT_C void EnableMarqueeL ( TBool aEnable )

Enables or disables marquee.

Parameters

TBool aEnable ETrue if On, EFalse if Off.

EnableStretching(const TBool)

void EnableStretching ( const TBool aEnabled )

Parameters

const TBool aEnabled

Extension()

CFormattedCellListBoxDataExtension * Extension ( ) [protected]

Gets list box extension, which is used for adding more funtionality to list boxes without destroying compatibility with previous versions.

Extension()

CFormattedCellListBoxDataExtension * Extension ( ) const [protected]

Gets list box extension, which is used for adding more funtionality to list boxes without destroying compatibility with previous versions.

FeedbackForAllItems()

TBool FeedbackForAllItems ( )

FindSubCellIndex(TInt &, TInt)

TInt FindSubCellIndex ( TInt & aArrayIndex,
TInt aSubCell
) const [private]

Parameters

TInt & aArrayIndex
TInt aSubCell

FindSubCellIndexOrAddL(TInt &, TInt)

void FindSubCellIndexOrAddL ( TInt & aArrayIndex,
TInt aSubCell
) [private]

Parameters

TInt & aArrayIndex
TInt aSubCell

FocusGained()

void FocusGained ( )

Function that is called when the owning control has gained the focus. Causes that animation is continued because the control is visible and focused.

FocusLost()

void FocusLost ( )

Function that is called when the owning control has lost the focus. Causes the animation to pause, even if the control is partially visible.

Font(const TListItemProperties &, TInt)

IMPORT_C CFont * Font ( const TListItemProperties & aItemProperties,
TInt aSubCellIndex
) const

Font access to the font used in subcell.

Parameters

const TListItemProperties & aItemProperties Not used in code.
TInt aSubCellIndex Index number of the subcell.

GetSubCellIconSize(TInt)

TSize GetSubCellIconSize ( TInt aIndex )

Gets the size of the subcell's icon.

Parameters

TInt aIndex

HandleResourceChange(TInt)

void HandleResourceChange ( TInt aType )

Handles the skin change situation. Causes change of animation.

Parameters

TInt aType Type of resource change.

HasHighlightAnim()

IMPORT_C TBool HasHighlightAnim ( ) const
Since
3.1

HideSecondRow(const TBool)

void HideSecondRow ( const TBool aHide )

Parameters

const TBool aHide

HighlightAnim()

IMPORT_C const CAknsEffectAnim * HighlightAnim ( ) const

Gets animation used for drawing the list highlight. May return NULL, in which case the normal skinned highlight should be drawn. This pointer is valid only during the draw -> you should not store it locally outside draw scope.

IconArray()

IMPORT_C CArrayPtr < CGulIcon > * IconArray ( ) const

Gets the icon array used when drawing bitmaps for the listbox items.

InitSmileyL()

void InitSmileyL ( )

This method prepare smiley engine if it is not ready yet. apply new icon size to smiley icon.

IsBackgroundDrawingEnabled()

TBool IsBackgroundDrawingEnabled ( ) const

Checks if the list is transparent and drawing the background that would fall behind it.

IsMarqueeOn()

IMPORT_C TBool IsMarqueeOn ( )

Determines if marquee is on.

IsScrollbarBackgroundDrawingEnabled()

TBool IsScrollbarBackgroundDrawingEnabled ( ) const

Is the listbox drawing the background behind the scrollbar or not.

KineticScrollingEnabled()

TBool KineticScrollingEnabled ( ) const

Returns ETrue if kinetic scrolling is enabled.

LastSubCell()

TInt LastSubCell ( ) const [private]

LayoutData()

IMPORT_C CAknLayoutData * LayoutData ( ) const

Gets layout data needed for separator lines drawing.

LayoutInit()

IMPORT_C TBool LayoutInit ( ) const

Gets LayOutInit flag used for drawing separator lines in lists.

ListBox()

CEikListBox * ListBox ( ) const

Returns instance of CEikListBox .

NewL()

IMPORT_C CFormattedCellListBoxData * NewL ( ) [static]

Two-phased constructor.

ResetMarquee()

void ResetMarquee ( )

Resets the marquee animation data.

ResetSLSubCellArray()

void ResetSLSubCellArray ( )

RespectFocus()

IMPORT_C TBool RespectFocus ( ) const

Gets RespectFocus flag.

RowAndSubCellFont(TInt, TInt)

IMPORT_C const CFont * RowAndSubCellFont ( TInt aRow,
TInt aSubCellIndex
) const

Gets font attached to the row and cell.

Parameters

TInt aRow Index number of the row.
TInt aSubCellIndex Index number of the subcell.

SecondRowHidden()

TBool SecondRowHidden ( ) const

SeparatorLinePosition()

IMPORT_C TAknSeparatorLinePosition SeparatorLinePosition ( ) const

Gets separator line position.

SetBackgroundSkinStyle(const TAknsItemID *, const TRect &)

IMPORT_C void SetBackgroundSkinStyle ( const TAknsItemID * aId,
const TRect & aRect
)

Modify properties of the skin context (background).

Since
Symbian 2.0

Parameters

const TAknsItemID * aId Skin background identifier.
const TRect & aRect Skin background rectangle.

SetClippedByWrap(TUint32, TBool)

void SetClippedByWrap ( TUint32 aClippedCells,
TBool aUseClippedByWrap
)

Parameters

TUint32 aClippedCells
TBool aUseClippedByWrap

SetConditionalSubCellL(TInt, const TAknTextLineLayout &, TInt)

void SetConditionalSubCellL ( TInt aSubCell,
const TAknTextLineLayout & aTextLayout,
TInt aAffectedSubCell
)

Support for new layouts.

Parameters

TInt aSubCell
const TAknTextLineLayout & aTextLayout
TInt aAffectedSubCell

SetControl(CCoeControl *)

IMPORT_C void SetControl ( CCoeControl * aControlOrNull )

Ability for a skin subsystem to access mop chain through current listbox control.

Since
Symbian 2.0

Parameters

CCoeControl * aControlOrNull Current listbox instance or NULL. Cannot be other control than the current listbox!

SetCurrentItemIndex(TInt)

void SetCurrentItemIndex ( TInt aIndex )

Sets the current list item index (not for marquee). Since Symbian 3.0 causes highlight animation to change its background (only if the current item index changes). Don't call this method if the index is not the current item index.

Parameters

TInt aIndex Index number of list item.

SetCurrentMarqueeItemIndex(TInt)

void SetCurrentMarqueeItemIndex ( TInt aIndex )

Sets the current list item index that was drawn by marquee.

Parameters

TInt aIndex Index of list item.

SetCurrentlyDrawnItemIndex(TInt)

void SetCurrentlyDrawnItemIndex ( TInt aIndex )

Parameters

TInt aIndex

SetDrawBackground(const TBool)

IMPORT_C void SetDrawBackground ( const TBool aDrawBackground )

Enables or disables transparency effect i.e. does the listbox draw its own background or not.

Parameters

const TBool aDrawBackground EFalse enables transparency, ETrue disables.

SetDrawScrollbarBackground(const TBool)

void SetDrawScrollbarBackground ( const TBool aDrawBackground )

Enables or disables drawing background after scrollbar.

Parameters

const TBool aDrawBackground Default is ETrue which means that Scrollbar is drawn first.

SetESSHighlightedTextColor(TAknsQsnTextColorsIndex)

void SetESSHighlightedTextColor ( TAknsQsnTextColorsIndex aIndex )

Set a highlighted text color if enhanced skin support is available.

Parameters

TAknsQsnTextColorsIndex aIndex

SetESSTextColor(TAknsQsnTextColorsIndex)

void SetESSTextColor ( TAknsQsnTextColorsIndex aIndex )

Sets a text color if enhanced skin support is available.

Parameters

TAknsQsnTextColorsIndex aIndex

SetFeedbackForAllItems(TBool)

void SetFeedbackForAllItems ( TBool aFeedbackForAllItems )

Parameters

TBool aFeedbackForAllItems

SetGraphicSubCellL(TInt, const TAknWindowLineLayout &)

void SetGraphicSubCellL ( TInt aSubCell,
const TAknWindowLineLayout & aGraphicLayout
)

Set window line layout for the defined sub cell.

Parameters

TInt aSubCell
const TAknWindowLineLayout & aGraphicLayout

SetGraphicsSubCellL(TInt, TBool)

IMPORT_C void SetGraphicsSubCellL ( TInt aSubCellIndex,
TBool aIsGraphics
)

Sets whether drawing algorithm considers the text string in list item as unicode text string displayable on the screen, or as string representation of an index to icon array.

Parameters

TInt aSubCellIndex Index number of the subcell.
TBool aIsGraphics ETrue if graphics cell, EFalse if text cell.

SetHighlightAnimBackgroundDrawer(MListBoxAnimBackgroundDrawer *)

IMPORT_C void SetHighlightAnimBackgroundDrawer ( MListBoxAnimBackgroundDrawer * aDrawer )

Sets the observer for overriding default highlight input layer drawing functionality. Note that you should still call AboutToDrawHighlightAnim (it will call the observer if it is set).

Parameters

MListBoxAnimBackgroundDrawer * aDrawer Highlight animation drawer.

SetIconArray(CArrayPtr< CGulIcon > *)

IMPORT_C void SetIconArray ( CArrayPtr < CGulIcon > * aArray )

SetIconArray sets the icon array used when drawing bitmaps. The array can be modified (no need to call this method when modifying), even in MdcaPoint() or MdcaCount() methods of MDesCArray class. See also CTextListBoxModel::SetItemTextArray() .

The most common way to crash a listbox is by forgetting to call this method, or the list item string for graphics cell is not an index of a bitmap.

Parameters

CArrayPtr < CGulIcon > * aArray Pointer to the icon array.

SetIconArrayL(CArrayPtr< CGulIcon > *)

IMPORT_C void SetIconArrayL ( CArrayPtr < CGulIcon > * aArray )

Sets the icon array used when drawing bitmaps. The array can be modified (no need to call this method when modifying), even in MdcaPoint() or MdcaCount() methods of MDesCArray class. See also CTextListBoxModel::SetItemTextArray() .

The most common way to crash a listbox is by forgetting to call this method, or the list item string for graphics cell is not an index of a bitmap.

Parameters

CArrayPtr < CGulIcon > * aArray Pointer to the icon array.

SetItemCellSize(const TSize &)

IMPORT_C void SetItemCellSize ( const TSize & aSize )

Changes item cell size and resizes highlight animation. Called by list when item cell size changes. If you are using non-standard highlight sizes make sure to sync the list item cell size.

Parameters

const TSize & aSize New cell size.

SetLayoutInit(TBool)

IMPORT_C void SetLayoutInit ( TBool aValue )

Sets LayOutInit flag used for drawing separator lines in lists.

Parameters

TBool aValue

SetListEndSkinStyle(const TAknsItemID *, const TRect &)

IMPORT_C void SetListEndSkinStyle ( const TAknsItemID * listEndId,
const TRect & aRect
)

Modify properties of the skin context (list ending)*

Since
Symbian 2.0

Parameters

const TAknsItemID * listEndId List ending skin background identifier.
const TRect & aRect List ending background area from LAF.

SetMarqueeParams(const TInt, const TInt, const TInt, const TInt)

IMPORT_C void SetMarqueeParams ( const TInt aLoops,
const TInt aScrollAmount,
const TInt aScrollDelay,
const TInt aInterval
)

Customizes marquee default behavior. Use this before enabling marquee ( EnableMarqueeL() ), otherwise marquee behavior will change during animation.

Since
S60 2.8

Parameters

const TInt aLoops Max number of loops to be executed (default 1).
const TInt aScrollAmount The amount of pixels scrolled per frame (default 6).
const TInt aScrollDelay The delay between each loop (in microseconds, default 1000000 microseconds).
const TInt aInterval The interval between frame updates after the initial delay, in microseconds.

SetNotAlwaysDrawnSubCellL(TInt, TBool)

IMPORT_C void SetNotAlwaysDrawnSubCellL ( TInt aSubCellIndex,
TBool aIsNotAlwaysDrawn
)

Sets whether drawing algorithm always draws the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.
TBool aIsNotAlwaysDrawn If ETrue, empty string disables cell.

SetNumberCellL(TInt, TBool)

IMPORT_C void SetNumberCellL ( TInt aSubCellIndex,
TBool aIsNumberCell
)

Sets whether the cell is used for numbers.

Since
Symbian 2.0

Parameters

TInt aSubCellIndex Index number of the subcell.
TBool aIsNumberCell New value for the flag.

SetRespectFocus(TBool)

IMPORT_C void SetRespectFocus ( TBool aBool )

Sets RespectFocus flag.

Parameters

TBool aBool Value of RespectFocus flag. ETrue means that the list item highlight is only shown if list is focused on.

SetSeparatorLinePosition(TAknSeparatorLinePosition)

IMPORT_C void SetSeparatorLinePosition ( TAknSeparatorLinePosition aPosition )

Sets position of listbox separator line.

Parameters

TAknSeparatorLinePosition aPosition Position in which separator line is placed.

SetSkinEnabledL(TBool)

IMPORT_C void SetSkinEnabledL ( TBool aEnabled )

Sets whether skins are enabled on this list. The default value is determined from global setting from CAknAppUi .

Since
Symbian 2.0

Parameters

TBool aEnabled If ETrue skins are set enabled. If EFalse skins are set disabled.

SetSkinHighlightFrame(const TAknsItemID *, const TAknsItemID *)

IMPORT_C void SetSkinHighlightFrame ( const TAknsItemID * aFrameId,
const TAknsItemID * aFrameCenterId
)

Set list higlight skin style.

Since
Symbian 2.0

Parameters

const TAknsItemID * aFrameId The id for the frame.
const TAknsItemID * aFrameCenterId The id for the frame center.

SetSkinParentPos(const TPoint &)

IMPORT_C void SetSkinParentPos ( const TPoint & aPos )

Modify position of the parent for list default context.

Since
Symbian 2.0

Parameters

const TPoint & aPos The new position.

SetSkinPopupFrame(const TAknsItemID *, const TAknsItemID *)

IMPORT_C void SetSkinPopupFrame ( const TAknsItemID * aFrameId,
const TAknsItemID * aFrameCenterId
)

Set popup skin style.

Since
Symbian 2.0

Parameters

const TAknsItemID * aFrameId The id for the frame.
const TAknsItemID * aFrameCenterId The id for the frame center.

SetSkinPopupFramePosition(const TRect &, const TRect &)

IMPORT_C void SetSkinPopupFramePosition ( const TRect & aOuterRect,
const TRect & aInnerRect
)

Set popup skin frame position.

Since
Symbian 2.0

Parameters

const TRect & aOuterRect Outer position of the frame.
const TRect & aInnerRect Inner position of the frame.

SetSkinStyle(const TAknsItemID *, const TRect &)

IMPORT_C void SetSkinStyle ( const TAknsItemID * aId,
const TRect & aTileRect
)

Modify properties of the skin context (AB-column).

Since
Symbian 2.0

Parameters

const TAknsItemID * aId Skin background identifier.
const TRect & aTileRect Skin background area from LAF.

SetSmileySubCellL(TInt)

void SetSmileySubCellL ( TInt aSubCell )

Decide which subcell will draw smiley icon. Note that only text subcell can be set.

Parameters

TInt aSubCell Index Index number of the subcell.

SetStretchableConditionalSubCellL(TInt, const TAknTextComponentLayout &, const TAknTextComponentLayout &, TInt, TInt)

void SetStretchableConditionalSubCellL ( TInt aSubCell,
const TAknTextComponentLayout & aNormalLayout,
const TAknTextComponentLayout & aStretchedLayout,
TInt aNormalSubCell,
TInt aStretchedSubCell
)

Parameters

TInt aSubCell
const TAknTextComponentLayout & aNormalLayout
const TAknTextComponentLayout & aStretchedLayout
TInt aNormalSubCell
TInt aStretchedSubCell

SetStretchableGraphicSubCellL(TInt, const TAknWindowComponentLayout &, const TAknWindowComponentLayout &)

void SetStretchableGraphicSubCellL ( TInt aSubCell,
const TAknWindowComponentLayout & aNormalLayout,
const TAknWindowComponentLayout & aStretchedLayout
)

Parameters

TInt aSubCell
const TAknWindowComponentLayout & aNormalLayout
const TAknWindowComponentLayout & aStretchedLayout

SetStretchableTextSubCellL(TInt, const TAknTextComponentLayout &, const TAknTextComponentLayout &)

void SetStretchableTextSubCellL ( TInt aSubCell,
const TAknTextComponentLayout & aNormalLayout,
const TAknTextComponentLayout & aStretchedLayout
)

Parameters

TInt aSubCell
const TAknTextComponentLayout & aNormalLayout
const TAknTextComponentLayout & aStretchedLayout

SetSubCellAlignmentL(TInt, CGraphicsContext::TTextAlign)

IMPORT_C void SetSubCellAlignmentL ( TInt aSubCellIndex,
CGraphicsContext::TTextAlign aAlign
)

Sets the alignment attached to the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.
CGraphicsContext::TTextAlign aAlign Alignment that is attached to the cell

SetSubCellBaselinePosL(TInt, TInt)

IMPORT_C void SetSubCellBaselinePosL ( TInt aSubCellIndex,
TInt aPos
)

Sets baseline position from top of the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.
TInt aPos Position which is set for the item.

SetSubCellColorsL(TInt, const TColors &)

IMPORT_C void SetSubCellColorsL ( TInt aSubCellIndex,
const TColors & aColors
)

Sets colours attached to the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.
const TColors & aColors Text and background colors.

SetSubCellFontForRowL(TInt, TInt, const CFont *)

IMPORT_C void SetSubCellFontForRowL ( TInt aRowIndex,
TInt aSubCellIndex,
const CFont * aFont
)

Sets the font attached to the cell for each row separately.

Parameters

TInt aRowIndex Row, which subcells are to be changed.
TInt aSubCellIndex Index number of the subcell.
const CFont * aFont Font to be used.

SetSubCellFontL(TInt, const CFont *)

IMPORT_C void SetSubCellFontL ( TInt aSubCellIndex,
const CFont * aFont
)

Sets the font attached to the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.
const CFont * aFont Font to attach to the cell.

SetSubCellIconSize(TInt, TSize)

IMPORT_C void SetSubCellIconSize ( TInt aIndex,
TSize aSize
)

Sets the size of the subcell's icon.

Parameters

TInt aIndex
TSize aSize

SetSubCellMarginsL(TInt, TMargins)

IMPORT_C void SetSubCellMarginsL ( TInt aSubCellIndex,
TMargins aMargins
)

Sets margins for the content inside the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.
TMargins aMargins Margins for the content inside the cell.

SetSubCellPositionL(TInt, TPoint)

IMPORT_C void SetSubCellPositionL ( TInt aSubCellIndex,
TPoint aPosition
)

Sets cell position inside an item.

Parameters

TInt aSubCellIndex Index number of the subcell.
TPoint aPosition New position for cell.

SetSubCellRealSize(TInt, TSize)

void SetSubCellRealSize ( TInt aSubCellIndex,
TSize aRealSize
) const

Parameters

TInt aSubCellIndex
TSize aRealSize

SetSubCellRealTextSize(TInt, TSize)

void SetSubCellRealTextSize ( TInt aSubCellIndex,
TSize aRealSize
) const

Parameters

TInt aSubCellIndex
TSize aRealSize

SetSubCellRightSeparatorStyleL(TInt, CGraphicsContext::TPenStyle)

IMPORT_C void SetSubCellRightSeparatorStyleL ( TInt aSubCell,
CGraphicsContext::TPenStyle aStyle
)

Sets whether vertical line is drawn to the right side of the cell.

Parameters

TInt aSubCell Index number of the subcell.
CGraphicsContext::TPenStyle aStyle Style of a pen used to draw a line for the right side of the cell.

SetSubCellSizeL(TInt, TSize)

IMPORT_C void SetSubCellSizeL ( TInt aSubCellIndex,
TSize aSize
)

Sets cell size in pixels.

Parameters

TInt aSubCellIndex Index number of the subcell.
TSize aSize Cell size.

SetSubCellTextClipGapL(TInt, TInt)

IMPORT_C void SetSubCellTextClipGapL ( TInt aSubCellIndex,
TInt aGap
)

Sets the amount of pixels truncation grows a text element.

Parameters

TInt aSubCellIndex Index number of the subcell.
TInt aGap The amount of pixels that are required for growing the text element when it is truncated.

SetSubcellUnderlined(TBitFlags32)

IMPORT_C void SetSubcellUnderlined ( TBitFlags32 aUnderlinedCells )

Enables or disables underlining per text subcell only if TListItemProperties also has underlining enabled. If this method is not called and TListItemProperties has underlining enabled, drawing will revert to old style where only first text subcell will be underlined.

Since
S60 3.1

Parameters

TBitFlags32 aUnderlinedCells Bitmask of cells to be underlined.

SetTextSubCellL(TInt, const TAknTextLineLayout &)

void SetTextSubCellL ( TInt aSubCell,
const TAknTextLineLayout & aTextLayout
)

Support for new layouts.

Set text line layout for the defined sub cell.

Parameters

TInt aSubCell
const TAknTextLineLayout & aTextLayout

SetTransparentSubCellL(TInt, TBool)

IMPORT_C void SetTransparentSubCellL ( TInt aSubCellIndex,
TBool aIsTransparent
)

Modifies whether the cell can overlap with one of the previous cells.

Parameters

TInt aSubCellIndex Index number of the subcell.
TBool aIsTransparent ETrue if transparent, EFalse if not.

SetUnderlineStyle(TListItemProperties, CWindowGc &, TInt)

void SetUnderlineStyle ( TListItemProperties aProperties,
CWindowGc & aGc,
TInt aSubCell
) const [private]

Parameters

TListItemProperties aProperties
CWindowGc & aGc
TInt aSubCell

SetWordWrappedSubcellIndices(TInt, TInt)

void SetWordWrappedSubcellIndices ( TInt aFirstIndex,
TInt aSecondIndex
)

Disables logical-to-visual conversion in subcells between indexes.

Parameters

TInt aFirstIndex First subcell not to use logical-to-visual conversion.
TInt aSecondIndex Last subcell not to use logical-to-visual conversion.

SetupSkinContextL()

void SetupSkinContextL ( )

Create and set the defaul skin context. Needed by the dynamic skin support.

SkinBackgroundContext()

IMPORT_C MAknsControlContext * SkinBackgroundContext ( ) const

Access to the background context of the listbox.

Since
Symbian 2.0

SkinEnabled()

IMPORT_C TBool SkinEnabled ( ) const

SkinEnabled checks whether skins are enabled on this list.

Since
Symbian 2.0

StretchingEnabled()

TBool StretchingEnabled ( ) const

SubCellAlignment(TInt)

IMPORT_C CGraphicsContext::TTextAlign SubCellAlignment ( TInt aSubCellIndex ) const

Gets the alignment attached to the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellBaselinePos(TInt)

IMPORT_C TInt SubCellBaselinePos ( TInt aSubCellIndex ) const

Gets baseline position from top of the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellColors(TInt)

IMPORT_C const TColors & SubCellColors ( TInt aSubCellIndex ) const

Gets colours attached to the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellFont(TInt)

IMPORT_C const CFont * SubCellFont ( TInt aSubCellIndex ) const

Gets font attached to the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellIsGraphics(TInt)

IMPORT_C TBool SubCellIsGraphics ( TInt aSubCellIndex ) const

Checks whetherdrawing algorithm considers the text string in list item as unicode text string displayable on the screen, or as string representation of an index to icon array.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellIsNotAlwaysDrawn(TInt)

IMPORT_C TBool SubCellIsNotAlwaysDrawn ( TInt aSubCellIndex ) const

Checks whether drawing algorithm always draws the cell or whether empty string in list item can disable the drawing of the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellIsNumberCell(TInt)

IMPORT_C TBool SubCellIsNumberCell ( TInt aSubCellIndex ) const

Checks whether the cell is used for numbers.

Since
Symbian 2.0

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellIsTransparent(TInt)

IMPORT_C TBool SubCellIsTransparent ( TInt aSubCellIndex ) const

Determines whether this cell can overlap with one of the previous cells.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellMargins(TInt)

IMPORT_C TMargins SubCellMargins ( TInt aSubCellIndex ) const

Gets margins used for the content inside the cell.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellPosition(TInt)

IMPORT_C TPoint SubCellPosition ( TInt aSubCellIndex ) const

Gets cell position inside an item.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellRealSize(TInt)

TSize SubCellRealSize ( TInt aSubCellIndex ) const

Parameters

TInt aSubCellIndex

SubCellRealTextSize(TInt)

TSize SubCellRealTextSize ( TInt aSubCellIndex ) const

Parameters

TInt aSubCellIndex

SubCellRightSeparatorStyle(TInt)

IMPORT_C CGraphicsContext::TPenStyle SubCellRightSeparatorStyle ( TInt aColumn ) const

Checks whether vertical line is drawn to the right side of the cell.

Parameters

TInt aColumn Index number of the subcell.

SubCellSize(TInt)

IMPORT_C TSize SubCellSize ( TInt aSubCellIndex ) const

Gets cell size in pixels.

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellTextClipGap(TInt)

IMPORT_C TInt SubCellTextClipGap ( TInt aSubCellIndex ) const

Gets the amount of pixels text margins is grown if it is truncated. This is usually very small number used to make the layout look more balanced when text is truncated. (the glyph used for truncation is almost empty and on narrow text elements, it looks odd if the truncated text element is exactly same size as non-truncated version.)

Parameters

TInt aSubCellIndex Index number of the subcell.

SubCellsMightIntersect(const TBool)

void SubCellsMightIntersect ( const TBool aMightIntersect )

Parameters

const TBool aMightIntersect

ToggleDropShadows(const TBool)

void ToggleDropShadows ( const TBool aEnable )

Parameters

const TBool aEnable

UseHighlightIconSwapping(TBool)

void UseHighlightIconSwapping ( TBool aUse )

enables certain highlight skinning for radibutton / checkbox set style lists

should be used only by avkon internally

Since
S60 3.1

Parameters

TBool aUse

UseHighlightIconSwapping()

TBool UseHighlightIconSwapping ( ) const

UseLogicalToVisualConversion(TBool)

IMPORT_C void UseLogicalToVisualConversion ( TBool aUseConversion )

Enable or disable logical to visual reordering in listbox data text drawing. By default, it is enabled. This has any effect only when bidirectional text is rendered.

If you convert text to visual order prior to passing it to the listbox (for example by wrapping text to lines with methods in AknBidiTextUtils ), then you should disable conversion in listbox by calling this method.

Since
Symbian 2.0

Parameters

TBool aUseConversion Enable (ETrue) or disable (EFalse) conversion.

UseScalableLayoutData(TBool)

void UseScalableLayoutData ( TBool aUse )

Parameters

TBool aUse

UseSubCellColors(TInt)

IMPORT_C TBool UseSubCellColors ( TInt aSubCell ) const

Indicates if sub cell is using its own colors rather than common colors.

Parameters

TInt aSubCell Index number of the subcell.

UsesScalableLayoutData()

TBool UsesScalableLayoutData ( ) const

Checks if the list box uses scalable layouts.

Member Data Documentation

TColors defaultcolors

TColors defaultcolors [private]

CFormattedCellListBoxDataExtension * iExtension

CFormattedCellListBoxDataExtension * iExtension [private]

CArrayPtr< CGulIcon > * iIconArray

CArrayPtr < CGulIcon > * iIconArray [private]

CArrayFix< SSubCell > * iSubCellArray

CArrayFix < SSubCell > * iSubCellArray [private]