class CFormattedCellListBoxItemDrawer : public CTextListItemDrawer |
CFormattedCellListBoxItemDrawer draws a single list item and manages list item properties.
avkon
Public Member Functions | |
---|---|
CFormattedCellListBoxItemDrawer ( MTextListBoxModel *, const CFont *, CFormattedCellListBoxData *) | |
~CFormattedCellListBoxItemDrawer () | |
IMPORT_C void | ClearAllPropertiesL () |
IMPORT_C CFormattedCellListBoxData * | ColumnData () |
IMPORT_C void | DrawEmptyItem ( TInt , TPoint , TBool ) |
IMPORT_C void | DrawItemMark ( TBool , TBool , const TPoint &) |
IMPORT_C void | DrawItemText ( TInt , const TRect &, TBool , TBool , TBool ) |
IMPORT_C CFormattedCellListBoxData * | FormattedCellData () |
IMPORT_C TInt | ItemWidthInPixels ( TInt ) |
TSize | LafItemSize () |
IMPORT_C TSize | MinimumCellSize () |
IMPORT_C TListItemProperties | Properties ( TInt ) |
IMPORT_C void | SetItemCellSize (const TSize &) |
IMPORT_C void | SetPropertiesL ( TInt , TListItemProperties ) |
IMPORT_C void | SetTopItemIndex ( TInt ) |
Protected Member Functions | |
---|---|
void | DrawBackgroundAndSeparatorLines (const TRect &, TBool ) |
void | WordWrapListItem ( TPtr &, const TDesC &, TInt , TInt , TInt ) |
Private Member Functions | |
---|---|
IMPORT_C void | CFormattedCellListBoxItemDrawer_Reserved () |
Inherited Enumerations | |
---|---|
CListItemDrawer:TFlags | |
CListItemDrawer:TListItemAttribute |
Protected Attributes | |
---|---|
CArrayFix < SListProperties > * | iPropertyArray |
TInt | iTopItemIndex |
Private Attributes | |
---|---|
TInt | iSpare |
IMPORT_C | CFormattedCellListBoxItemDrawer | ( | MTextListBoxModel * | aTextListBoxModel, |
const CFont * | aFont, | |||
CFormattedCellListBoxData * | aFormattedCellData | |||
) |
C++ default constructor.
MTextListBoxModel * aTextListBoxModel | The list box model class. |
const CFont * aFont | Font to be used in listbox. |
CFormattedCellListBoxData * aFormattedCellData | Pointer to the list layout drawer class. |
IMPORT_C void | CFormattedCellListBoxItemDrawer_Reserved | ( | ) | [private] |
void | DrawBackgroundAndSeparatorLines | ( | const TRect & | aItemTextRect, |
TBool | aDrawSeparator | |||
) | const [protected] |
IMPORT_C void | DrawEmptyItem | ( | TInt | aItemIndex, |
TPoint | aItemRectPos, | |||
TBool | aViewIsDimmed | |||
) | const [virtual] |
Draws an empty item to the list box.
IMPORT_C void | DrawItemMark | ( | TBool | aItemIsSelected, |
TBool | aViewIsDimmed, | |||
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.
IMPORT_C void | DrawItemText | ( | TInt | aItemIndex, |
const TRect & | aItemTextRect, | |||
TBool | aItemIsCurrent, | |||
TBool | aViewIsEmphasized, | |||
TBool | aItemIsSelected | |||
) | const [virtual] |
TInt aItemIndex | The index into the model's item array of the item to draw. |
const TRect & aItemTextRect | The item s text rectangle. |
TBool aItemIsCurrent | ETrue if the item is current. EFalse otherwise. |
TBool aViewIsEmphasized | ETrue if the view is emphasized. EFalse otherwise. |
TBool aItemIsSelected | ETrue if the item is selected. EFalse otherwise. |
IMPORT_C CFormattedCellListBoxData * | FormattedCellData | ( | ) | const |
Gets the list layout drawer.
IMPORT_C TInt | ItemWidthInPixels | ( | TInt | aItemIndex | ) | const [virtual] |
TInt aItemIndex | The index of the item for which the width is obtained. |
IMPORT_C TSize | MinimumCellSize | ( | ) | const [virtual] |
From CListItemDrawer .
Gets the minimum size of a cell based on the font and the number of characters in the cell.
IMPORT_C TListItemProperties | Properties | ( | TInt | aItemIndex | ) | const [virtual] |
Function for getting properties of a certain list box item.
TInt aItemIndex | The listbox item index. |
IMPORT_C void | SetItemCellSize | ( | 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.
const TSize & aSizeInPixels | New size for the item cell. |
IMPORT_C void | SetPropertiesL | ( | TInt | aItemIndex, |
TListItemProperties | properties | |||
) |
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.
TInt aItemIndex | List box item index. |
TListItemProperties properties | Colour and style properties for the list box item. |
IMPORT_C void | SetTopItemIndex | ( | TInt | aTop | ) |
This function sets top item index.
TInt aTop | Item index value. |
void | WordWrapListItem | ( | TPtr & | aTarget, |
const TDesC & | aItemString, | |||
TInt | aFirstIndex, | |||
TInt | aSecondIndex, | |||
TInt | aItemIndex | |||
) | 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.
CArrayFix < SListProperties > * | iPropertyArray | [protected] |
Array for list box item's properties. Own.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.