CColumnListBoxItemDrawer Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib

Capability Information

Required Capabilities

None


#include <eikclb.h>

Inherits CTextListItemDrawer.

Inherited by CSingleHeadingStyleItemDrawer.


Detailed Description

Draws the contents of list box items.

Public Member Functions

IMPORT_C  CColumnListBoxItemDrawer ()
IMPORT_C  CColumnListBoxItemDrawer (MTextListBoxModel *aTextListBoxModel, const CFont *aFont, CColumnListBoxData *aColumnData)
  C++ default constructor.
IMPORT_C  ~CColumnListBoxItemDrawer ()
  Destructor.
IMPORT_C CColumnListBoxData ColumnData () const
  Gets a pointer to the column list box data as set during construction.
IMPORT_C void  ClearAllPropertiesL ()
  Clears all properties from the CColumnListBoxItemDrawer.
IMPORT_C void  SetPropertiesL (TInt aItemIndex, TListItemProperties aProperty)
  Set the property for an item with aItemIndex.
virtual IMPORT_C TListItemProperties  Properties (TInt aItemIndex) const
  Get properties for an item.
IMPORT_C void  DrawItemText (TInt aItemIndex, const TRect &aItemTextRect, TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aItemIsSelected) const
  From CTextListItemDrawer.
IMPORT_C void  DrawItemMark (TBool aItemIsSelected, TBool aViewIsDimmed, const TPoint &aMarkPos) const
  Not used in S60.
IMPORT_C TSize  MinimumCellSize () const
  From CListItemDrawer.
IMPORT_C TInt  ItemWidthInPixels (TInt aItemIndex) const
  From CListItemDrawer.
IMPORT_C void  SetItemCellSize (const TSize &aSizeInPixels)
  From CListItemDrawer.
TSize  LafItemSize ()
  Get Item Cell Size.

Protected Member Functions

void  DrawCurrentItemRect (const TRect &aRect) const
  Draw the item background.

Protected Attributes

CArrayFix< SListProperties > *  iPropertyArray
  Array of properties.
TInt  iSpare
  Not used.

Data Structures

struct   SListProperties
  The structure holding given item properties. More...

Constructor & Destructor Documentation

IMPORT_C CColumnListBoxItemDrawer::CColumnListBoxItemDrawer  ) 
 
IMPORT_C CColumnListBoxItemDrawer::CColumnListBoxItemDrawer MTextListBoxModel aTextListBoxModel,
const CFont *  aFont,
CColumnListBoxData aColumnData
 

C++ default constructor.

Initialises the list box item drawer with the specified model, font and data.

Parameters:
aTextListBoxModel  The model whose items will be drawn. This provides the item text that is drawn using DrawItemText().
aFont  The font in which the items will be drawn.
aColumnData  The column list box data. This comprises: the column widths, gaps, fonts, aligments and bitmaps.
IMPORT_C CColumnListBoxItemDrawer::~CColumnListBoxItemDrawer  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CColumnListBoxItemDrawer::ClearAllPropertiesL  ) 
 

Clears all properties from the CColumnListBoxItemDrawer.

IMPORT_C CColumnListBoxData* CColumnListBoxItemDrawer::ColumnData  )  const
 

Gets a pointer to the column list box data as set during construction.

Does not transfer ownership.

Returns:
The column list box data.
void CColumnListBoxItemDrawer::DrawCurrentItemRect const TRect &  aRect  )  const [protected]
 

Draw the item background.

Internal member, not intended for use.

Parameters:
aRect  Drawing area.
IMPORT_C void CColumnListBoxItemDrawer::DrawItemMark TBool  aItemIsSelected,
TBool  aViewIsDimmed,
const TPoint &  aMarkPos
const [virtual]
 

Not used in S60.

Reimplemented from CListItemDrawer.

IMPORT_C void CColumnListBoxItemDrawer::DrawItemText TInt  aItemIndex,
const TRect &  aItemTextRect,
TBool  aItemIsCurrent,
TBool  aViewIsEmphasized,
TBool  aItemIsSelected
const [virtual]
 

From CTextListItemDrawer.

Draw item text.

Parameters:
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 CTextListItemDrawer.

IMPORT_C TInt CColumnListBoxItemDrawer::ItemWidthInPixels TInt  aItemIndex  )  const [virtual]
 

From CListItemDrawer.

Gets the width of the specified item.

Parameters:
aItemIndex  The index of the item whose width is to be returned.
Returns:
The width of the item. This is 0 in CListItemDrawer

Reimplemented from CTextListItemDrawer.

TSize CColumnListBoxItemDrawer::LafItemSize  )  [inline]
 

Get Item Cell Size.

Returns:
Cell size of an item.
IMPORT_C TSize CColumnListBoxItemDrawer::MinimumCellSize  )  const [virtual]
 

From CListItemDrawer.

Gets the minimum cell size.

Returns:
The minimum size for a cell. This is TSize(0, 0) in CListItemDrawer.

Reimplemented from CTextListItemDrawer.

virtual IMPORT_C TListItemProperties CColumnListBoxItemDrawer::Properties TInt  aItemIndex  )  const [virtual]
 

Get properties for an item.

Parameters:
aItemIndex  Item's index for identifying.
Returns:
Wanted property set.

Reimplemented from CListItemDrawer.

IMPORT_C void CColumnListBoxItemDrawer::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.

Parameters:
aSizeInPixels  New size for the item cell.

Reimplemented from CListItemDrawer.

IMPORT_C void CColumnListBoxItemDrawer::SetPropertiesL TInt  aItemIndex,
TListItemProperties  aProperty
 

Set the property for an item with aItemIndex.

Parameters:
aItemIndex  Item index
aProperty  The new property setting The SetProperties is convinience 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 convinient to override the Properties() method. Further, use this only for small lists as it causes O(n) time if you need to set all properties.

Field Documentation

CArrayFix<SListProperties>* CColumnListBoxItemDrawer::iPropertyArray [protected]
 

Array of properties.

TInt CColumnListBoxItemDrawer::iSpare [protected]
 

Not used.

Reimplemented from CListItemDrawer.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top