CFormattedCellListBoxItemDrawer Class Reference

class CFormattedCellListBoxItemDrawer : public CTextListItemDrawer

CFormattedCellListBoxItemDrawer draws a single list item and manages list item properties.

avkon

Inherits from

Public Member Functions
CFormattedCellListBoxItemDrawer(MTextListBoxModel *, const CFont *, CFormattedCellListBoxData *)
~CFormattedCellListBoxItemDrawer()
IMPORT_C voidClearAllPropertiesL()
IMPORT_C CFormattedCellListBoxData *ColumnData()
IMPORT_C voidDrawEmptyItem(TInt, TPoint, TBool)
IMPORT_C voidDrawItemMark(TBool, TBool, const TPoint &)
IMPORT_C voidDrawItemText(TInt, const TRect &, TBool, TBool, TBool)
IMPORT_C CFormattedCellListBoxData *FormattedCellData()
IMPORT_C TIntItemWidthInPixels(TInt)
TSize LafItemSize()
IMPORT_C TSizeMinimumCellSize()
IMPORT_C TListItemPropertiesProperties(TInt)
IMPORT_C voidSetItemCellSize(const TSize &)
IMPORT_C voidSetPropertiesL(TInt, TListItemProperties)
IMPORT_C voidSetTopItemIndex(TInt)
Protected Member Functions
voidDrawBackgroundAndSeparatorLines(const TRect &, TBool)
voidDrawCurrentItemRect(const TRect &)
voidWordWrapListItem(TPtr &, const TDesC &, TInt, TInt, TInt)
Private Member Functions
IMPORT_C voidCFormattedCellListBoxItemDrawer_Reserved()
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()
CListItemDrawer::BackColor()const
CListItemDrawer::CListItemDrawer()
CListItemDrawer::ClearFlags(TInt)
CListItemDrawer::ClearRect(const TRect &)const
CListItemDrawer::DimmedBackColor()const
CListItemDrawer::DimmedTextColor()const
CListItemDrawer::DrawFrame(CWindowGc &,const TRect &,TInt)const
CListItemDrawer::DrawItem(TInt,TPoint,TBool,TBool,TBool,TBool)const
CListItemDrawer::Flags()const
CListItemDrawer::Gc()const
CListItemDrawer::HighlightedBackColor()const
CListItemDrawer::HighlightedTextColor()const
CListItemDrawer::ItemCellSize()const
CListItemDrawer::MarkColor()const
CListItemDrawer::MarkColumn()const
CListItemDrawer::MarkGutter()const
CListItemDrawer::SetBackColor(TRgb)
CListItemDrawer::SetData(CListBoxData *)
CListItemDrawer::SetDimmedBackColor(TRgb)
CListItemDrawer::SetDimmedTextColor(TRgb)
CListItemDrawer::SetDrawMark(TBool)
CListItemDrawer::SetFlags(TInt)
CListItemDrawer::SetHighlightedBackColor(TRgb)
CListItemDrawer::SetHighlightedTextColor(TRgb)
CListItemDrawer::SetMarkColumnWidth(TInt)
CListItemDrawer::SetMarkGutter(TInt)
CListItemDrawer::SetSkinEnabledL(TBool)
CListItemDrawer::SetSymbolFont(const CFont *)
CListItemDrawer::SetTextColor(TRgb)
CListItemDrawer::SetVerticalInterItemGap(TInt)
CListItemDrawer::SetViewRect(const TRect &)
CListItemDrawer::SetupGc(TInt)const
CListItemDrawer::SkinBackgroundControlContext()const
CListItemDrawer::TextColor()const
CListItemDrawer::VerticalInterItemGap()const
CListItemDrawer::~CListItemDrawer()
CTextListItemDrawer::CTextListItemDrawer()
CTextListItemDrawer::CTextListItemDrawer(MTextListBoxModel *,const CFont *)
CTextListItemDrawer::ConstructL(const CFont *)
CTextListItemDrawer::DoDrawItemText(const TDesC &,const TRect &,TBool,TBool,TBool,TInt)const
CTextListItemDrawer::DrawActualItem(TInt,const TRect &,TBool,TBool,TBool,TBool)const
CTextListItemDrawer::Font(TInt)const
CTextListItemDrawer::ItemMarkPosition()const
CTextListItemDrawer::ItemMarkReplacement()const
CTextListItemDrawer::ItemMarkReverse()const
CTextListItemDrawer::MatcherCursorAscent(TInt)const
CTextListItemDrawer::MatcherCursorRect(const TDesC &,TInt,TInt,TInt)const
CTextListItemDrawer::ResetGc()const
CTextListItemDrawer::SetCellWidthInChars(TInt)
CTextListItemDrawer::SetFont(const CFont *)
CTextListItemDrawer::SetGc(CWindowGc *)
CTextListItemDrawer::SetItemMarkPosition(TInt)
CTextListItemDrawer::SetItemMarkReplacement(const TDesC &)
CTextListItemDrawer::SetItemMarkReverse(TBool)
CTextListItemDrawer::SetSearchStringL(const TDesC *)
CTextListItemDrawer::~CTextListItemDrawer()
Inherited Enumerations
CListItemDrawer:TFlags
CListItemDrawer:TListItemAttribute
Protected Attributes
CArrayFix< SListProperties > *iPropertyArray
TInt iTopItemIndex
Private Attributes
TInt iSpare
Inherited Attributes
CListItemDrawer::iBackColor
CListItemDrawer::iData
CListItemDrawer::iDimmedBackColor
CListItemDrawer::iDimmedTextColor
CListItemDrawer::iDrawMark
CListItemDrawer::iGc
CListItemDrawer::iHighlightedBackColor
CListItemDrawer::iHighlightedTextColor
CListItemDrawer::iItemCellSize
CListItemDrawer::iMarkColor
CListItemDrawer::iMarkColumnWidth
CListItemDrawer::iMarkGutter
CListItemDrawer::iTextColor
CListItemDrawer::iViewRect
CTextListItemDrawer::iFont
CTextListItemDrawer::iModel

Constructor & Destructor Documentation

CFormattedCellListBoxItemDrawer(MTextListBoxModel *, const CFont *, CFormattedCellListBoxData *)

IMPORT_CCFormattedCellListBoxItemDrawer(MTextListBoxModel *aTextListBoxModel,
const CFont *aFont,
CFormattedCellListBoxData *aFormattedCellData
)

C++ default constructor.

Parameters

MTextListBoxModel * aTextListBoxModelThe list box model class.
const CFont * aFontFont to be used in listbox.
CFormattedCellListBoxData * aFormattedCellDataPointer to the list layout drawer class.

~CFormattedCellListBoxItemDrawer()

IMPORT_C~CFormattedCellListBoxItemDrawer()

Destructor.

Member Functions Documentation

CFormattedCellListBoxItemDrawer_Reserved()

IMPORT_C voidCFormattedCellListBoxItemDrawer_Reserved()[private]

ClearAllPropertiesL()

IMPORT_C voidClearAllPropertiesL()

Clears all properties.

ColumnData()

IMPORT_C CFormattedCellListBoxData *ColumnData()const

Gets the list layout drawer.

Pointer to the list layout drawer object.

DrawBackgroundAndSeparatorLines(const TRect &, TBool)

voidDrawBackgroundAndSeparatorLines(const TRect &aItemTextRect,
TBoolaDrawSeparator
)const [protected]

Parameters

const TRect & aItemTextRect
TBool aDrawSeparator

DrawCurrentItemRect(const TRect &)

voidDrawCurrentItemRect(const TRect &aRect)const [protected]

Draws current item rectangle.

Parameters

const TRect & aRectCurrent item rectangle.

DrawEmptyItem(TInt, TPoint, TBool)

IMPORT_C voidDrawEmptyItem(TIntaItemIndex,
TPointaItemRectPos,
TBoolaViewIsDimmed
)const [virtual]

Draws an empty item to the list box.

Parameters

TInt aItemIndexNot used.
TPoint aItemRectPosPosition for the list box item rectangle.
TBool aViewIsDimmedNot used.

DrawItemMark(TBool, TBool, const TPoint &)

IMPORT_C voidDrawItemMark(TBoolaItemIsSelected,
TBoolaViewIsDimmed,
const TPoint &aMarkPos
)const [virtual]

From CTextListItemDrawer.

Draws an item tick mark.

A tick mark is used in multiple selection lists to indicate the item is selected.

This function is invoked by the framework to draw an item mark if iDrawMark is set. The mark should be drawn into this list item drawer's graphics context; by default, DrawItemMark() draws a tick using the standard symbol font.

This function does not need to be re-implemented for derived classes which do not draw item marks.

Parameters

TBool aItemIsSelectedWhether the item to draw for is selected.
TBool aViewIsDimmedWhether the item is dimmed.
const TPoint & aMarkPosPosition of the mark.

DrawItemText(TInt, const TRect &, TBool, TBool, TBool)

IMPORT_C voidDrawItemText(TIntaItemIndex,
const TRect &aItemTextRect,
TBoolaItemIsCurrent,
TBoolaViewIsEmphasized,
TBoolaItemIsSelected
)const [virtual]

From CTextListItemDrawer.

Draw an item in a list box.

Parameters

TInt aItemIndexThe index into the model's item array of the item to draw.
const TRect & aItemTextRectThe item s text rectangle.
TBool aItemIsCurrentETrue if the item is current. EFalse otherwise.
TBool aViewIsEmphasizedETrue if the view is emphasized. EFalse otherwise.
TBool aItemIsSelectedETrue if the item is selected. EFalse otherwise.

FormattedCellData()

IMPORT_C CFormattedCellListBoxData *FormattedCellData()const

Gets the list layout drawer.

Pointer to the list layout drawer object.

ItemWidthInPixels(TInt)

IMPORT_C TIntItemWidthInPixels(TIntaItemIndex)const [virtual]

From CListItemDrawer.

Gets the width in pixels of the specified item.

The specified item's width in pixels.

Parameters

TInt aItemIndexThe index of the item for which the width is obtained.

LafItemSize()

TSize LafItemSize()[inline]

Gets list box item cell size.

The list box item cell size.

MinimumCellSize()

IMPORT_C TSizeMinimumCellSize()const [virtual]

From CListItemDrawer.

Gets the minimum size of a cell based on the font and the number of characters in the cell.

The minimum size for a cell in pixels.

Properties(TInt)

IMPORT_C TListItemPropertiesProperties(TIntaItemIndex)const [virtual]

Function for getting properties of a certain list box item.

Colour and style properties of wanted list box item.

Parameters

TInt aItemIndexThe listbox item index.

SetItemCellSize(const TSize &)

IMPORT_C voidSetItemCellSize(const TSize &aSizeInPixels)[virtual]

From CListItemDrawer.

Sets the item cell size.

The cell size is the on-screen size of the entire item, including its text and its item mark.

Parameters

const TSize & aSizeInPixelsNew size for the item cell.

SetPropertiesL(TInt, TListItemProperties)

IMPORT_C voidSetPropertiesL(TIntaItemIndex,
TListItemPropertiesproperties
)

The SetProperties is convenience method for normal cases. NOTE that it does NOT work correctly if you can insert/delete items from the list -- You need to update all properties if any changes to the item text array happen! Often it is convenient to override the Properties() method. Further, use this only for small lists.

It has been implemented as sorted list of (index,Property) pairs.

If you're using find, aItemIndex for this method is the same as you give in MdcaPoint() points the default Properties() does conversion between indexes.

Parameters

TInt aItemIndexList box item index.
TListItemProperties propertiesColour and style properties for the list box item.

SetTopItemIndex(TInt)

IMPORT_C voidSetTopItemIndex(TIntaTop)

This function sets top item index.

Parameters

TInt aTopItem index value.

WordWrapListItem(TPtr &, const TDesC &, TInt, TInt, TInt)

voidWordWrapListItem(TPtr &aTarget,
const TDesC &aItemString,
TIntaFirstIndex,
TIntaSecondIndex,
TIntaItemIndex
)const [protected]

WordWrapListItem is used with CAknDouble* style listboxes. If listbox does not have 2nd line defined, WordWrapListItem wraps 1st line to 2nd line, if text does not fit to 1st line. If listbox does have 2nd line defined, this method truncates both lines.

Parameters

TPtr & aTarget
const TDesC & aItemString
TInt aFirstIndex
TInt aSecondIndex
TInt aItemIndex

Member Data Documentation

CArrayFix< SListProperties > * iPropertyArray

CArrayFix< SListProperties > *iPropertyArray[protected]

Array for list box item's properties. Own.

TInt iSpare

TInt iSpare[private]

TInt iTopItemIndex

TInt iTopItemIndex[protected]

Top item index.