#include <mw/eiklbi.h>
class CTextListItemDrawer : public CListItemDrawer |
Protected Attributes | |
---|---|
const CFont * | iFont |
MTextListBoxModel * | iModel |
Public Member Functions | |
---|---|
CTextListItemDrawer() | |
CTextListItemDrawer(MTextListBoxModel *, const CFont *) | |
~CTextListItemDrawer() | |
IMPORT_C void | ConstructL(const CFont *) |
virtual IMPORT_C void | DrawActualItem(TInt, const TRect &, TBool, TBool, TBool, TBool) |
IMPORT_C const CFont * | Font(TInt) |
TInt | ItemMarkPosition() |
TPtrC | ItemMarkReplacement() |
TBool | ItemMarkReverse() |
virtual IMPORT_C TInt | ItemWidthInPixels(TInt) |
virtual IMPORT_C TInt | MatcherCursorAscent(TInt) |
virtual IMPORT_C TRect | MatcherCursorRect(const TDesC &, TInt, TInt, TInt) |
virtual IMPORT_C TSize | MinimumCellSize() |
IMPORT_C void | SetCellWidthInChars(TInt) |
IMPORT_C void | SetFont(const CFont *) |
virtual IMPORT_C void | SetGc(CWindowGc *) |
void | SetItemMarkPosition(TInt) |
void | SetItemMarkReplacement(const TDesC &) |
void | SetItemMarkReverse(TBool) |
IMPORT_C void | SetSearchStringL(const TDesC *) |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | DoDrawItemText(const TDesC &, const TRect &, TBool, TBool, TBool, TInt) |
virtual IMPORT_C void | DrawItemText(TInt, const TRect &, TBool, TBool, TBool) |
virtual IMPORT_C void | ResetGc() |
Inherited Enumerations | |
---|---|
CListItemDrawer:TFlags | |
CListItemDrawer:TListItemAttribute |
Item drawer which can handle text.
Used by CListBoxView to draw individual list box items for a CEikTextListBox
IMPORT_C | CTextListItemDrawer | ( | MTextListBoxModel * | aTextListBoxModel, |
const CFont * | aFont | |||
) |
C++ default constructor.
Constructs a new text item drawer which draws the data of the specified model using the supplied font.
Parameter | Description |
---|---|
aTextListBoxModel | The model whose items will be drawn. |
aFont | The font in which the items will be drawn. |
IMPORT_C void | ConstructL | ( | const CFont * | aFont | ) |
Handles 2nd phase construction.
Parameter | Description |
---|---|
aFont | The font in which the list box items will be drawn. |
IMPORT_C void | DoDrawItemText | ( | const TDesC & | aDes, |
const TRect & | aItemTextRect, | |||
TBool | aItemIsCurrent, | |||
TBool | aViewIsEmphasized, | |||
TBool | aItemIsSelected, | |||
TInt | aItemIndex | |||
) | const [protected, virtual] |
Draws text.
This function is invoked by DrawItemText() to draw a string into a rectangular area of iGc.
Parameter | Description |
---|---|
aDes | The string to draw. |
aItemTextRect | Area to draw into. |
aItemIsCurrent | ETrue if the item is current. |
aViewIsEmphasized | ETrue if the view is emphasised. |
aItemIsSelected | ETrue if the item is selected. |
aItemIndex | The item s index. |
IMPORT_C void | DrawActualItem | ( | TInt | aItemIndex, |
const TRect & | aActualItemRect, | |||
TBool | aItemIsCurrent, | |||
TBool | aViewIsEmphasized, | |||
TBool | aViewIsDimmed, | |||
TBool | aItemIsSelected | |||
) | const [virtual] |
Draws the actual item contents for the specified item in the specified rectangle.
Parameter | Description |
---|---|
aItemIndex | Index of the item to draw. |
aActualItemRect | Area to draw into. |
aItemIsCurrent | ETrue if the item is current. |
aViewIsEmphasized | ETrue if the view is emphasised. |
aViewIsDimmed | Ignored |
aItemIsSelected | ETrue if the item is selected. |
IMPORT_C void | DrawItemText | ( | TInt | aItemIndex, |
const TRect & | aItemTextRect, | |||
TBool | aItemIsCurrent, | |||
TBool | aViewIsEmphasized, | |||
TBool | aItemIsSelected | |||
) | const [protected, virtual] |
Draw item text.
This function is invoked by DrawActualItem() to draw the item text.
Parameter | Description |
---|---|
aItemIndex | Index of the item to draw. |
aItemTextRect | Area to draw into. |
aItemIsCurrent | ETrue if the item is current. |
aViewIsEmphasized | ETrue if the view is emphasised. |
aItemIsSelected | ETrue if the item is selected. |
Reimplemented from CListItemDrawer::Font(TInt)const
Gets font for the specified item.
Parameter | Description |
---|---|
aIndex | The index of the target item. |
Returns: Specified item's font.
TPtrC | ItemMarkReplacement | ( | ) | const [inline] |
Gets item mark replacement.
Returns: Pointer to the replacement string.
TBool | ItemMarkReverse | ( | ) | const [inline] |
Check if the item has been marked reversed is active.
Returns: Indicates if active or not. ETrue if active
Reimplemented from CListItemDrawer::ItemWidthInPixels(TInt)const
Gets the width in pixels of the specified item.
Parameter | Description |
---|---|
aItemIndex | The index of the item for which the width is obtained. |
Returns: The specified item s width in pixels.
Reimplemented from CListItemDrawer::MatcherCursorAscent(TInt)const
No Implementation.
Derived classes that deal with text and want to support incremental matching in listboxes need to redefine this function. Should be used to get the ascent of the matcher cursor in pixels.
Parameter | Description |
---|---|
aCurrentItemIndex | Index of the current item. Not Used. |
Returns: Always returns 0;
IMPORT_C TRect | MatcherCursorRect | ( | const TDesC & | aMatchableText, |
TInt | aCharPos, | |||
TInt | aItemCellYPos, | |||
TInt | aCurrentItemIndex | |||
) | const [virtual] |
Reimplemented from CListItemDrawer::MatcherCursorRect(const TDesC &,TInt,TInt,TInt)const
Gets the position and size of the matcher cursor.
Parameter | Description |
---|---|
aMatchableText | String currently being matched. Not Used. |
aCharPos | Position within the string. Not Used. |
aItemCellYPos | Y position of the item cell in pixels. Not Used. |
aCurrentItemIndex | Item index for the current item. Not Used. |
Returns: The rectangle covered by the matcher cursor, in pixels.
IMPORT_C TSize | MinimumCellSize | ( | ) | const [virtual] |
Reimplemented from CListItemDrawer::MinimumCellSize()const
Gets the minimum size of a cell based on the font and the number of characters in the cell.
Returns: The minimum size for a cell, in pixels.
IMPORT_C void | ResetGc | ( | ) | const [protected, virtual] |
Reimplemented from CListItemDrawer::ResetGc()const
Resets the graphics context. This function invokes CListItemDrawer::ResetGc() and resets the pen colour to iTextColor.
IMPORT_C void | SetCellWidthInChars | ( | TInt | aNumOfCharsToDisplayInCell | ) |
Sets the number of characters in a cell. This value affects only MinimumCellSize().
Parameter | Description |
---|---|
aNumOfCharsToDisplayInCell | Number of characters to display in a cell. |
IMPORT_C void | SetGc | ( | CWindowGc * | aGc | ) | [virtual] |
Reimplemented from CListItemDrawer::SetGc(CWindowGc *)
Sets the graphics context.
Parameter | Description |
---|---|
aGc | The graphics context to use. |
void | SetItemMarkPosition | ( | TInt | aPos | ) | [inline] |
Sets item mark position.
Parameter | Description |
---|---|
aPos | The new position. |
void | SetItemMarkReplacement | ( | const TDesC & | aReplacement | ) | [inline] |
Sets the item mark replacement.
Parameter | Description |
---|---|
aReplacement | The new replacement descriptor. |
void | SetItemMarkReverse | ( | TBool | aReverse | ) | [inline] |
Sets item mark reverse to be active or not.
Parameter | Description |
---|---|
aReverse | The new setting. ETrue if item is marked reversed. |
IMPORT_C void | SetSearchStringL | ( | const TDesC * | aSearchString | ) |
Sets the search string.
Parameter | Description |
---|---|
aSearchString | The new search string. |