CFormattedCellListBoxData Class Reference

#include <mw/eikfrlbd.h>

Link against: avkon

class CFormattedCellListBoxData : public CListBoxData

Inherits from

Public Member Functions
~CFormattedCellListBoxData()
IMPORT_C voidAboutToDrawHighlightAnim()
IMPORT_C CCoeControl *Control()
voidCreateMarqueeControlL()
voidCreatePictographInterfaceL()
IMPORT_C TUint32CurrentItemTextWasClipped()
TInt CurrentMarqueeItemIndex()
virtual IMPORT_C voidDraw(TListItemProperties, CWindowGc &, const TDesC *, const TRect &, TBool, const TColors &)
voidDrawDefaultHighlight(CWindowGc &, const TRect &, TBool)
IMPORT_C TBoolDrawHighlightAnim(CBitmapContext &, const TRect &)
IMPORT_C voidEnableMarqueeL(TBool)
voidEnableStretching(const TBool)
TBool FeedbackForAllItems()
voidFocusGained()
voidFocusLost()
IMPORT_C CFont *Font(const TListItemProperties &, TInt)
TSize GetSubCellIconSize(TInt)
voidHandleResourceChange(TInt)
IMPORT_C TBoolHasHighlightAnim()
voidHideSecondRow(const TBool)
IMPORT_C const CAknsEffectAnim *HighlightAnim()
IMPORT_C CArrayPtr< CGulIcon > *IconArray()
voidInitSmileyL()
TBool IsBackgroundDrawingEnabled()
IMPORT_C TBoolIsMarqueeOn()
TBool IsScrollbarBackgroundDrawingEnabled()
TBool KineticScrollingEnabled()
IMPORT_C CAknLayoutData *LayoutData()
IMPORT_C TBoolLayoutInit()
CEikListBox *ListBox()
IMPORT_C CFormattedCellListBoxData *NewL()
voidResetMarquee()
voidResetSLSubCellArray()
IMPORT_C TBoolRespectFocus()
IMPORT_C const CFont *RowAndSubCellFont(TInt, TInt)
TBool SecondRowHidden()
IMPORT_C TAknSeparatorLinePositionSeparatorLinePosition()
IMPORT_C voidSetBackgroundSkinStyle(const TAknsItemID *, const TRect &)
voidSetClippedByWrap(TUint32, TBool)
voidSetConditionalSubCellL(TInt, const TAknTextLineLayout &, TInt)
IMPORT_C voidSetControl(CCoeControl *)
voidSetCurrentItemIndex(TInt)
voidSetCurrentMarqueeItemIndex(TInt)
voidSetCurrentlyDrawnItemIndex(TInt)
IMPORT_C voidSetDrawBackground(const TBool)
voidSetDrawScrollbarBackground(const TBool)
voidSetESSHighlightedTextColor(TAknsQsnTextColorsIndex)
voidSetESSTextColor(TAknsQsnTextColorsIndex)
voidSetFeedbackForAllItems(TBool)
voidSetGraphicSubCellL(TInt, const TAknWindowLineLayout &)
IMPORT_C voidSetGraphicsSubCellL(TInt, TBool)
IMPORT_C voidSetHighlightAnimBackgroundDrawer(MListBoxAnimBackgroundDrawer *)
IMPORT_C voidSetIconArray(CArrayPtr< CGulIcon > *)
IMPORT_C voidSetIconArrayL(CArrayPtr< CGulIcon > *)
IMPORT_C voidSetItemCellSize(const TSize &)
IMPORT_C voidSetLayoutInit(TBool)
IMPORT_C voidSetListEndSkinStyle(const TAknsItemID *, const TRect &)
IMPORT_C voidSetMarqueeParams(const TInt, const TInt, const TInt, const TInt)
IMPORT_C voidSetNotAlwaysDrawnSubCellL(TInt, TBool)
IMPORT_C voidSetNumberCellL(TInt, TBool)
IMPORT_C voidSetRespectFocus(TBool)
IMPORT_C voidSetSeparatorLinePosition(TAknSeparatorLinePosition)
IMPORT_C voidSetSkinEnabledL(TBool)
IMPORT_C voidSetSkinHighlightFrame(const TAknsItemID *, const TAknsItemID *)
IMPORT_C voidSetSkinParentPos(const TPoint &)
IMPORT_C voidSetSkinPopupFrame(const TAknsItemID *, const TAknsItemID *)
IMPORT_C voidSetSkinPopupFramePosition(const TRect &, const TRect &)
IMPORT_C voidSetSkinStyle(const TAknsItemID *, const TRect &)
voidSetSmileySubCellL(TInt)
voidSetStretchableConditionalSubCellL(TInt, const TAknTextComponentLayout &, const TAknTextComponentLayout &, TInt, TInt)
voidSetStretchableGraphicSubCellL(TInt, const TAknWindowComponentLayout &, const TAknWindowComponentLayout &)
voidSetStretchableTextSubCellL(TInt, const TAknTextComponentLayout &, const TAknTextComponentLayout &)
IMPORT_C voidSetSubCellAlignmentL(TInt, CGraphicsContext::TTextAlign)
IMPORT_C voidSetSubCellBaselinePosL(TInt, TInt)
IMPORT_C voidSetSubCellColorsL(TInt, const TColors &)
IMPORT_C voidSetSubCellFontForRowL(TInt, TInt, const CFont *)
IMPORT_C voidSetSubCellFontL(TInt, const CFont *)
IMPORT_C voidSetSubCellIconSize(TInt, TSize)
IMPORT_C voidSetSubCellMarginsL(TInt, TMargins)
IMPORT_C voidSetSubCellPositionL(TInt, TPoint)
voidSetSubCellRealSize(TInt, TSize)
voidSetSubCellRealTextSize(TInt, TSize)
IMPORT_C voidSetSubCellRightSeparatorStyleL(TInt, CGraphicsContext::TPenStyle)
IMPORT_C voidSetSubCellSizeL(TInt, TSize)
IMPORT_C voidSetSubCellTextClipGapL(TInt, TInt)
IMPORT_C voidSetSubcellUnderlined(TBitFlags32)
voidSetTextSubCellL(TInt, const TAknTextLineLayout &)
IMPORT_C voidSetTransparentSubCellL(TInt, TBool)
voidSetWordWrappedSubcellIndices(TInt, TInt)
voidSetupSkinContextL()
IMPORT_C MAknsControlContext *SkinBackgroundContext()
IMPORT_C TBoolSkinEnabled()
TBool StretchingEnabled()
IMPORT_C CGraphicsContext::TTextAlignSubCellAlignment(TInt)
IMPORT_C TIntSubCellBaselinePos(TInt)
IMPORT_C const TColors &SubCellColors(TInt)
IMPORT_C const CFont *SubCellFont(TInt)
IMPORT_C TBoolSubCellIsGraphics(TInt)
IMPORT_C TBoolSubCellIsNotAlwaysDrawn(TInt)
IMPORT_C TBoolSubCellIsNumberCell(TInt)
IMPORT_C TBoolSubCellIsTransparent(TInt)
IMPORT_C TMarginsSubCellMargins(TInt)
IMPORT_C TPointSubCellPosition(TInt)
TSize SubCellRealSize(TInt)
TSize SubCellRealTextSize(TInt)
IMPORT_C CGraphicsContext::TPenStyleSubCellRightSeparatorStyle(TInt)
IMPORT_C TSizeSubCellSize(TInt)
IMPORT_C TIntSubCellTextClipGap(TInt)
voidSubCellsMightIntersect(const TBool)
voidToggleDropShadows(const TBool)
voidUseHighlightIconSwapping(TBool)
TBool UseHighlightIconSwapping()
IMPORT_C voidUseLogicalToVisualConversion(TBool)
voidUseScalableLayoutData(TBool)
IMPORT_C TBoolUseSubCellColors(TInt)
TBool UsesScalableLayoutData()
Protected Member Functions
CFormattedCellListBoxData()
IMPORT_C voidConstructLD()
IMPORT_C voidConstructLD(const TAknsItemID &)
IMPORT_C voidDrawFormatted(TListItemProperties, CWindowGc &, const TDesC *, const TRect &, TBool, const TColors &)
voidDrawFormattedSimple(TListItemProperties &, CWindowGc &, const TDesC *, const TRect &, TBool, const TColors &)
CFormattedCellListBoxDataExtension *Extension()
CFormattedCellListBoxDataExtension *Extension()
Inherited Attributes
CListBoxData::iBoldFont
CListBoxData::iBoldItalicFont
CListBoxData::iItalicFont
CListBoxData::iNormalFont
CListBoxData::iSearchString
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()

Detailed Description

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.

Constructor & Destructor Documentation

CFormattedCellListBoxData ( )

IMPORT_CCFormattedCellListBoxData()[protected]

C++ default constructor.

~CFormattedCellListBoxData ( )

IMPORT_C~CFormattedCellListBoxData()

Destructor.

Member Function Documentation

AboutToDrawHighlightAnim ( )

IMPORT_C voidAboutToDrawHighlightAnim()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).

ConstructLD ( )

IMPORT_C voidConstructLD()[protected]

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

ConstructLD ( const TAknsItemID & )

IMPORT_C voidConstructLD(const TAknsItemID &aAnimationIID)[protected]

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

ParameterDescription
aAnimationIIDSkin 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

Returns: Current listbox instance or NULL.

CreateMarqueeControlL ( )

voidCreateMarqueeControlL()

Creates marquee control. Called by the listbox.

CreatePictographInterfaceL ( )

voidCreatePictographInterfaceL()

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

CurrentItemTextWasClipped ( )

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

Returns: bitfield of clipped subcells

CurrentMarqueeItemIndex ( )

TInt CurrentMarqueeItemIndex()

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

Returns: Index of the item that is / was drawn by marquee.

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

IMPORT_C voidDraw(TListItemPropertiesaProperties,
CWindowGc &aGc,
const TDesC *aText,
const TRect &aRect,
TBoolaHighlight,
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.

ParameterDescription
aPropertiesProperties attached to the list item.
aGcGraphics Context used for drawing the list item.
aTextA text string describing the list item cells.
aRectThe area of the screen for the whole list item.
aHighlightWhether the list item is selected.
aColorsThe colours used for drawing the item.

DrawDefaultHighlight ( CWindowGc &, const TRect &, TBool )

voidDrawDefaultHighlight(CWindowGc &aGc,
const TRect &aItemRect,
TBoolaHighlight
)const

Renders a default animated highlight.

ParameterDescription
aGcGraphics context used for drawing.
aItemRectthe area of the screen for drawing.
aHighlightIf ETrue highlight is rendered if EFalse, nothing is done.

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

IMPORT_C voidDrawFormatted(TListItemPropertiesaProperties,
CWindowGc &aGc,
const TDesC *aText,
const TRect &aRect,
TBoolaHighlight,
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.
ParameterDescription
aPropertiesProperties attached to the list item.
aGcGraphics Context used for drawing the list item.
aTextA text string describing the list item cells.
aRectThe area of the screen for the whole list item.
aHighlightWhether the list item is selected.
aColorsThe colors used for drawing the item.

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

voidDrawFormattedSimple(TListItemProperties &aProperties,
CWindowGc &aGc,
const TDesC *aText,
const TRect &aRect,
TBoolaHighlight,
const TColors &aColors
)const [protected]

Draws list items.

ParameterDescription
aPropertiesProperties attached to the list item.
aGcGraphics Context used for drawing the list item.
aTextA text string describing the list item cells.
aRectThe area of the screen for the whole list item.
aHighlightWhether the list item is selected.
aColorsThe colors used for drawing the item.

DrawHighlightAnim ( CBitmapContext &, const TRect & )

IMPORT_C TBoolDrawHighlightAnim(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
ParameterDescription
aGcGraphics context for blitting animation frame
aRectTarget rect for blitting animation frame

Returns: The draw status, ETrue if drawing was ok, EFalse otherwise.

EnableMarqueeL ( TBool )

IMPORT_C voidEnableMarqueeL(TBoolaEnable)

Enables or disables marquee.

ParameterDescription
aEnableETrue if On, EFalse if Off.

EnableStretching ( const TBool )

voidEnableStretching(const TBoolaEnabled)

Extension ( )

CFormattedCellListBoxDataExtension *Extension()[protected]

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

Returns: Pointer to the list box extension.

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.

Returns: Pointer to the list box extension.

FeedbackForAllItems ( )

TBool FeedbackForAllItems()

FocusGained ( )

voidFocusGained()

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 ( )

voidFocusLost()

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,
TIntaSubCellIndex
)const

Font access to the font used in subcell.

ParameterDescription
aItemPropertiesNot used in code.
aSubCellIndexIndex number of the subcell.

Returns: Font used in subcell.

GetSubCellIconSize ( TInt )

TSize GetSubCellIconSize(TIntaIndex)

Gets the size of the subcell's icon.

HandleResourceChange ( TInt )

voidHandleResourceChange(TIntaType)

Handles the skin change situation. Causes change of animation.

ParameterDescription
aTypeType of resource change.

HasHighlightAnim ( )

IMPORT_C TBoolHasHighlightAnim()const
Since
3.1

Returns: ETrue if highlight animation exists, EFalse otherwise.

HideSecondRow ( const TBool )

voidHideSecondRow(const TBoolaHide)

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.

Returns: Animation used for drawing the list highlight.

IconArray ( )

IMPORT_C CArrayPtr< CGulIcon > *IconArray()const

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

InitSmileyL ( )

voidInitSmileyL()

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.

Returns: EFalse if transparent, ETrue otherwise.

IsMarqueeOn ( )

IMPORT_C TBoolIsMarqueeOn()

Determines if marquee is on.

Returns: Flag indicating if marquee is on (ETrue on, EFalse off)

IsScrollbarBackgroundDrawingEnabled ( )

TBool IsScrollbarBackgroundDrawingEnabled()const

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

Returns: ETrue if background is drawn after scrollbar, EFalse otherwise.

KineticScrollingEnabled ( )

TBool KineticScrollingEnabled()const

Returns ETrue if kinetic scrolling is enabled.

LayoutData ( )

IMPORT_C CAknLayoutData *LayoutData()const

Deprecated

Gets layout data needed for separator lines drawing.

Returns: Layout data.

LayoutInit ( )

IMPORT_C TBoolLayoutInit()const

Deprecated

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.

Returns: Pointer to a new formatted cell listbox data object.

ResetMarquee ( )

voidResetMarquee()

Resets the marquee animation data.

ResetSLSubCellArray ( )

voidResetSLSubCellArray()

RespectFocus ( )

IMPORT_C TBoolRespectFocus()const

Gets RespectFocus flag.

Returns: RespectFocus flag. ETrue if list item highlights are only shown when the list is has been focused on.

RowAndSubCellFont ( TInt, TInt )

IMPORT_C const CFont *RowAndSubCellFont(TIntaRow,
TIntaSubCellIndex
)const

Gets font attached to the row and cell.

ParameterDescription
aRowIndex number of the row.
aSubCellIndexIndex number of the subcell.

Returns: Font handle.

SecondRowHidden ( )

TBool SecondRowHidden()const

SeparatorLinePosition ( )

IMPORT_C TAknSeparatorLinePositionSeparatorLinePosition()const

Gets separator line position.

Returns: Position of separator line.

SetBackgroundSkinStyle ( const TAknsItemID *, const TRect & )

IMPORT_C voidSetBackgroundSkinStyle(const TAknsItemID *aId,
const TRect &aRect
)

Modify properties of the skin context (background).

Since
Symbian 2.0
ParameterDescription
aIdSkin background identifier.
aRectSkin background rectangle.

SetClippedByWrap ( TUint32, TBool )

voidSetClippedByWrap(TUint32aClippedCells,
TBoolaUseClippedByWrap
)

SetConditionalSubCellL ( TInt, const TAknTextLineLayout &, TInt )

voidSetConditionalSubCellL(TIntaSubCell,
const TAknTextLineLayout &aTextLayout,
TIntaAffectedSubCell
)

Support for new layouts.

SetControl ( CCoeControl * )

IMPORT_C voidSetControl(CCoeControl *aControlOrNull)

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

Since
Symbian 2.0
ParameterDescription
aControlOrNullCurrent listbox instance or NULL. Cannot be other control than the current listbox!

SetCurrentItemIndex ( TInt )

voidSetCurrentItemIndex(TIntaIndex)

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.

ParameterDescription
aIndexIndex number of list item.

SetCurrentMarqueeItemIndex ( TInt )

voidSetCurrentMarqueeItemIndex(TIntaIndex)

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

ParameterDescription
aIndexIndex of list item.

SetCurrentlyDrawnItemIndex ( TInt )

voidSetCurrentlyDrawnItemIndex(TIntaIndex)

SetDrawBackground ( const TBool )

IMPORT_C voidSetDrawBackground(const TBoolaDrawBackground)

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

ParameterDescription
aDrawBackgroundEFalse enables transparency, ETrue disables.

SetDrawScrollbarBackground ( const TBool )

voidSetDrawScrollbarBackground(const TBoolaDrawBackground)

Enables or disables drawing background after scrollbar.

ParameterDescription
aDrawBackgroundDefault is ETrue which means that Scrollbar is drawn first.

SetESSHighlightedTextColor ( TAknsQsnTextColorsIndex )

voidSetESSHighlightedTextColor(TAknsQsnTextColorsIndexaIndex)

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

SetESSTextColor ( TAknsQsnTextColorsIndex )

voidSetESSTextColor(TAknsQsnTextColorsIndexaIndex)

Sets a text color if enhanced skin support is available.

SetFeedbackForAllItems ( TBool )

voidSetFeedbackForAllItems(TBoolaFeedbackForAllItems)

SetGraphicSubCellL ( TInt, const TAknWindowLineLayout & )

voidSetGraphicSubCellL(TIntaSubCell,
const TAknWindowLineLayout &aGraphicLayout
)

Set window line layout for the defined sub cell.

SetGraphicsSubCellL ( TInt, TBool )

IMPORT_C voidSetGraphicsSubCellL(TIntaSubCellIndex,
TBoolaIsGraphics
)

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.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aIsGraphicsETrue if graphics cell, EFalse if text cell.

SetHighlightAnimBackgroundDrawer ( MListBoxAnimBackgroundDrawer * )

IMPORT_C voidSetHighlightAnimBackgroundDrawer(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).

ParameterDescription
aDrawerHighlight animation drawer.

SetIconArray ( CArrayPtr< CGulIcon > * )

IMPORT_C voidSetIconArray(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.

ParameterDescription
aArrayPointer to the icon array.

SetIconArrayL ( CArrayPtr< CGulIcon > * )

IMPORT_C voidSetIconArrayL(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.

ParameterDescription
aArrayPointer to the icon array.

SetItemCellSize ( const TSize & )

IMPORT_C voidSetItemCellSize(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.

ParameterDescription
aSizeNew cell size.

SetLayoutInit ( TBool )

IMPORT_C voidSetLayoutInit(TBoolaValue)

Deprecated

Sets LayOutInit flag used for drawing separator lines in lists.

SetListEndSkinStyle ( const TAknsItemID *, const TRect & )

IMPORT_C voidSetListEndSkinStyle(const TAknsItemID *listEndId,
const TRect &aRect
)

Modify properties of the skin context (list ending)*

Since
Symbian 2.0
ParameterDescription
listEndIdList ending skin background identifier.
aRectList ending background area from LAF.

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

IMPORT_C voidSetMarqueeParams(const TIntaLoops,
const TIntaScrollAmount,
const TIntaScrollDelay,
const TIntaInterval
)

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

Since
S60 2.8
ParameterDescription
aLoopsMax number of loops to be executed (default 1).
aScrollAmountThe amount of pixels scrolled per frame (default 6).
aScrollDelayThe delay between each loop (in microseconds, default 1000000 microseconds).
aIntervalThe interval between frame updates after the initial delay, in microseconds.

SetNotAlwaysDrawnSubCellL ( TInt, TBool )

IMPORT_C voidSetNotAlwaysDrawnSubCellL(TIntaSubCellIndex,
TBoolaIsNotAlwaysDrawn
)

Sets whether drawing algorithm always draws the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aIsNotAlwaysDrawnIf ETrue, empty string disables cell.

SetNumberCellL ( TInt, TBool )

IMPORT_C voidSetNumberCellL(TIntaSubCellIndex,
TBoolaIsNumberCell
)

Sets whether the cell is used for numbers.

Since
Symbian 2.0
ParameterDescription
aSubCellIndexIndex number of the subcell.
aIsNumberCellNew value for the flag.

SetRespectFocus ( TBool )

IMPORT_C voidSetRespectFocus(TBoolaBool)

Sets RespectFocus flag.

ParameterDescription
aBoolValue of RespectFocus flag. ETrue means that the list item highlight is only shown if list is focused on.

SetSeparatorLinePosition ( TAknSeparatorLinePosition )

IMPORT_C voidSetSeparatorLinePosition(TAknSeparatorLinePositionaPosition)

Sets position of listbox separator line.

ParameterDescription
aPositionPosition in which separator line is placed.

SetSkinEnabledL ( TBool )

IMPORT_C voidSetSkinEnabledL(TBoolaEnabled)

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

Since
Symbian 2.0
ParameterDescription
aEnabledIf ETrue skins are set enabled. If EFalse skins are set disabled.

SetSkinHighlightFrame ( const TAknsItemID *, const TAknsItemID * )

IMPORT_C voidSetSkinHighlightFrame(const TAknsItemID *aFrameId,
const TAknsItemID *aFrameCenterId
)

Set list higlight skin style.

Since
Symbian 2.0
ParameterDescription
aFrameIdThe id for the frame.
aFrameCenterIdThe id for the frame center.

SetSkinParentPos ( const TPoint & )

IMPORT_C voidSetSkinParentPos(const TPoint &aPos)

Modify position of the parent for list default context.

Since
Symbian 2.0
ParameterDescription
aPosThe new position.

SetSkinPopupFrame ( const TAknsItemID *, const TAknsItemID * )

IMPORT_C voidSetSkinPopupFrame(const TAknsItemID *aFrameId,
const TAknsItemID *aFrameCenterId
)

Set popup skin style.

Since
Symbian 2.0
ParameterDescription
aFrameIdThe id for the frame.
aFrameCenterIdThe id for the frame center.

SetSkinPopupFramePosition ( const TRect &, const TRect & )

IMPORT_C voidSetSkinPopupFramePosition(const TRect &aOuterRect,
const TRect &aInnerRect
)

Set popup skin frame position.

Since
Symbian 2.0
ParameterDescription
aOuterRectOuter position of the frame.
aInnerRectInner position of the frame.

SetSkinStyle ( const TAknsItemID *, const TRect & )

IMPORT_C voidSetSkinStyle(const TAknsItemID *aId,
const TRect &aTileRect
)

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

Since
Symbian 2.0
ParameterDescription
aIdSkin background identifier.
aTileRectSkin background area from LAF.

SetSmileySubCellL ( TInt )

voidSetSmileySubCellL(TIntaSubCell)

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

ParameterDescription
aSubCellIndex Index number of the subcell.

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

voidSetStretchableConditionalSubCellL(TIntaSubCell,
const TAknTextComponentLayout &aNormalLayout,
const TAknTextComponentLayout &aStretchedLayout,
TIntaNormalSubCell,
TIntaStretchedSubCell
)

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

voidSetStretchableGraphicSubCellL(TIntaSubCell,
const TAknWindowComponentLayout &aNormalLayout,
const TAknWindowComponentLayout &aStretchedLayout
)

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

voidSetStretchableTextSubCellL(TIntaSubCell,
const TAknTextComponentLayout &aNormalLayout,
const TAknTextComponentLayout &aStretchedLayout
)

SetSubCellAlignmentL ( TInt, CGraphicsContext::TTextAlign )

IMPORT_C voidSetSubCellAlignmentL(TIntaSubCellIndex,
CGraphicsContext::TTextAlignaAlign
)

Sets the alignment attached to the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aAlignAlignment that is attached to the cell

SetSubCellBaselinePosL ( TInt, TInt )

IMPORT_C voidSetSubCellBaselinePosL(TIntaSubCellIndex,
TIntaPos
)

Sets baseline position from top of the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aPosPosition which is set for the item.

SetSubCellColorsL ( TInt, const TColors & )

IMPORT_C voidSetSubCellColorsL(TIntaSubCellIndex,
const TColors &aColors
)

Sets colours attached to the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aColorsText and background colors.

SetSubCellFontForRowL ( TInt, TInt, const CFont * )

IMPORT_C voidSetSubCellFontForRowL(TIntaRowIndex,
TIntaSubCellIndex,
const CFont *aFont
)

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

ParameterDescription
aRowIndexRow, which subcells are to be changed.
aSubCellIndexIndex number of the subcell.
aFontFont to be used.

SetSubCellFontL ( TInt, const CFont * )

IMPORT_C voidSetSubCellFontL(TIntaSubCellIndex,
const CFont *aFont
)

Sets the font attached to the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aFontFont to attach to the cell.

SetSubCellIconSize ( TInt, TSize )

IMPORT_C voidSetSubCellIconSize(TIntaIndex,
TSizeaSize
)

Sets the size of the subcell's icon.

SetSubCellMarginsL ( TInt, TMargins )

IMPORT_C voidSetSubCellMarginsL(TIntaSubCellIndex,
TMarginsaMargins
)

Sets margins for the content inside the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aMarginsMargins for the content inside the cell.

SetSubCellPositionL ( TInt, TPoint )

IMPORT_C voidSetSubCellPositionL(TIntaSubCellIndex,
TPointaPosition
)

Sets cell position inside an item.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aPositionNew position for cell.

SetSubCellRealSize ( TInt, TSize )

voidSetSubCellRealSize(TIntaSubCellIndex,
TSizeaRealSize
)const

SetSubCellRealTextSize ( TInt, TSize )

voidSetSubCellRealTextSize(TIntaSubCellIndex,
TSizeaRealSize
)const

SetSubCellRightSeparatorStyleL ( TInt, CGraphicsContext::TPenStyle )

IMPORT_C voidSetSubCellRightSeparatorStyleL(TIntaSubCell,
CGraphicsContext::TPenStyleaStyle
)

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

ParameterDescription
aSubCellIndex number of the subcell.
aStyleStyle of a pen used to draw a line for the right side of the cell.

SetSubCellSizeL ( TInt, TSize )

IMPORT_C voidSetSubCellSizeL(TIntaSubCellIndex,
TSizeaSize
)

Sets cell size in pixels.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aSizeCell size.

SetSubCellTextClipGapL ( TInt, TInt )

IMPORT_C voidSetSubCellTextClipGapL(TIntaSubCellIndex,
TIntaGap
)

Sets the amount of pixels truncation grows a text element.

ParameterDescription
aSubCellIndexIndex number of the subcell.
aGapThe amount of pixels that are required for growing the text element when it is truncated.

SetSubcellUnderlined ( TBitFlags32 )

IMPORT_C voidSetSubcellUnderlined(TBitFlags32aUnderlinedCells)

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
ParameterDescription
aUnderlinedCellsBitmask of cells to be underlined.

SetTextSubCellL ( TInt, const TAknTextLineLayout & )

voidSetTextSubCellL(TIntaSubCell,
const TAknTextLineLayout &aTextLayout
)

Support for new layouts.

Set text line layout for the defined sub cell.

SetTransparentSubCellL ( TInt, TBool )

IMPORT_C voidSetTransparentSubCellL(TIntaSubCellIndex,
TBoolaIsTransparent
)

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

ParameterDescription
aSubCellIndexIndex number of the subcell.
aIsTransparentETrue if transparent, EFalse if not.

SetWordWrappedSubcellIndices ( TInt, TInt )

voidSetWordWrappedSubcellIndices(TIntaFirstIndex,
TIntaSecondIndex
)

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

ParameterDescription
aFirstIndexFirst subcell not to use logical-to-visual conversion.
aSecondIndexLast subcell not to use logical-to-visual conversion.

SetupSkinContextL ( )

voidSetupSkinContextL()

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

Returns: Skin background context.

SkinEnabled ( )

IMPORT_C TBoolSkinEnabled()const

SkinEnabled checks whether skins are enabled on this list.

Since
Symbian 2.0

Returns: ETrue if enabled, EFalse if disabled.

StretchingEnabled ( )

TBool StretchingEnabled()const

SubCellAlignment ( TInt )

IMPORT_C CGraphicsContext::TTextAlignSubCellAlignment(TIntaSubCellIndex)const

Gets the alignment attached to the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Alignment of the text.

SubCellBaselinePos ( TInt )

IMPORT_C TIntSubCellBaselinePos(TIntaSubCellIndex)const

Gets baseline position from top of the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Baseline y-position.

SubCellColors ( TInt )

IMPORT_C const TColors &SubCellColors(TIntaSubCellIndex)const

Gets colours attached to the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Text and background colors.

SubCellFont ( TInt )

IMPORT_C const CFont *SubCellFont(TIntaSubCellIndex)const

Gets font attached to the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Handle to the attached font.

SubCellIsGraphics ( TInt )

IMPORT_C TBoolSubCellIsGraphics(TIntaSubCellIndex)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.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: ETrue if graphics cell, EFalse if text cell.

SubCellIsNotAlwaysDrawn ( TInt )

IMPORT_C TBoolSubCellIsNotAlwaysDrawn(TIntaSubCellIndex)const

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

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: ETrue when empty string disables cell, EFalse if always drawn.

SubCellIsNumberCell ( TInt )

IMPORT_C TBoolSubCellIsNumberCell(TIntaSubCellIndex)const

Checks whether the cell is used for numbers.

Since
Symbian 2.0
ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: ETrue if enabled, EFalse if disabled.

SubCellIsTransparent ( TInt )

IMPORT_C TBoolSubCellIsTransparent(TIntaSubCellIndex)const

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

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: ETrue if cell overlaps another one, EFalse if cell allocates area from other cells.

SubCellMargins ( TInt )

IMPORT_C TMarginsSubCellMargins(TIntaSubCellIndex)const

Gets margins used for the content inside the cell.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Margins in pixels.

SubCellPosition ( TInt )

IMPORT_C TPointSubCellPosition(TIntaSubCellIndex)const

Gets cell position inside an item.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Cell position.

SubCellRealSize ( TInt )

TSize SubCellRealSize(TIntaSubCellIndex)const

SubCellRealTextSize ( TInt )

TSize SubCellRealTextSize(TIntaSubCellIndex)const

SubCellRightSeparatorStyle ( TInt )

IMPORT_C CGraphicsContext::TPenStyleSubCellRightSeparatorStyle(TIntaColumn)const

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

ParameterDescription
aColumnIndex number of the subcell.

Returns: Style of pen used to draw a line for the right side of the cell.

SubCellSize ( TInt )

IMPORT_C TSizeSubCellSize(TIntaSubCellIndex)const

Gets cell size in pixels.

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Cell size.

SubCellTextClipGap ( TInt )

IMPORT_C TIntSubCellTextClipGap(TIntaSubCellIndex)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.)

ParameterDescription
aSubCellIndexIndex number of the subcell.

Returns: Amount of pixels that are used for growing the text margins in truncation.

SubCellsMightIntersect ( const TBool )

voidSubCellsMightIntersect(const TBoolaMightIntersect)

ToggleDropShadows ( const TBool )

voidToggleDropShadows(const TBoolaEnable)

UseHighlightIconSwapping ( TBool )

voidUseHighlightIconSwapping(TBoolaUse)

enables certain highlight skinning for radibutton / checkbox set style lists

should be used only by avkon internally

Since
S60 3.1

UseHighlightIconSwapping ( )

TBool UseHighlightIconSwapping()const

UseLogicalToVisualConversion ( TBool )

IMPORT_C voidUseLogicalToVisualConversion(TBoolaUseConversion)

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
ParameterDescription
aUseConversionEnable (ETrue) or disable (EFalse) conversion.

UseScalableLayoutData ( TBool )

voidUseScalableLayoutData(TBoolaUse)

UseSubCellColors ( TInt )

IMPORT_C TBoolUseSubCellColors(TIntaSubCell)const

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

ParameterDescription
aSubCellIndex number of the subcell.

Returns: Boolean indicating whether own colors enabled. ETrue enabled, EFalse disabled.

UsesScalableLayoutData ( )

TBool UsesScalableLayoutData()const

Checks if the list box uses scalable layouts.