CListBoxData Class Reference

API published in: S60 1st Ed

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

Capability Information

Required Capabilities

None


#include <eiklbd.h>

Inherited by CColumnListBoxData, and CFormattedCellListBoxData.


Detailed Description

The CListBoxData class is the base class for list box data classes.

It stores one or more instances of fonts in normal, bold and italic styles.


Public Member Functions

IMPORT_C  CListBoxData ()
  C++ default constructor.
IMPORT_C  ~CListBoxData ()
  Destructor.
IMPORT_C void  ConstructL (const CFont *aBaseFont)
  By default Symbian 2nd phase constructor is private.
virtual IMPORT_C CFont *  Font (const TListItemProperties &aItemProperties) const
  Returns a pointer to the type of font wanted.
IMPORT_C void  SetupGc (const TListItemProperties &aItemProperties, CWindowGc &aGc) const
  Sets properties (underlining on / off, pen colorm and font) of graphical context.
IMPORT_C const TListFontBoundValues FontBoundValues () const
  Queries boundary values of font size.
IMPORT_C TInt  SetFontHeight (TInt aFontHeightInTwips)
  Sets a new height of fonts.
IMPORT_C void  SetSearchStringL (const TDesC *aSearchString)
  Setter for a search string used for viewing search results.
IMPORT_C TBool  IsSearchString () const
  Query is search string set.
IMPORT_C void  DrawItem (CWindowGc &aGc, const TRect &aItemTextRect, const TDesC &aItemText, const CFont &aItemFont, const TInt aBaseLineOffset, const CGraphicsContext::TTextAlign aAlign=CGraphicsContext::ELeft) const
  Draws list item text.
void  SetAlignmentL (CGraphicsContext::TTextAlign aAlign)
  Sets list item's text alignment.
CGraphicsContext::TTextAlign  Alignment () const
  Queries used text alignment.
IMPORT_C MAknsControlContext SkinBackgroundControlContext () const
  Access to skin contexts from plain listboxes.

Protected Member Functions

IMPORT_C void  SetSkinBackgroundControlContextL (MAknsControlContext *aContext)
  Sets a background skinning context.
IMPORT_C void  SetSkinEnabledL (TBool aEnabled)
  Sets whether skins are enabled.
IMPORT_C void  ConstructFontL (const CFont *aBaseFont, TFontStyle aFontStyle, CFontsWithStyle &aFonts)
  Constructs a new font based on the base font and font style given.
IMPORT_C void  UpdateFontBoundValues (const CFont &aFont)
  Updates width and heigh information.
IMPORT_C TInt  RegenerateFonts (CFontsWithStyle &aFonts, TInt aFontHeightInTwips)
  Changes fonts' height.

Protected Attributes

CFontsWithStyle  iNormalFont
  Normal style font.
CFontsWithStyle  iBoldFont
  Bold style font.
CFontsWithStyle  iItalicFont
  Italic style font.
CFontsWithStyle  iBoldItalicFont
  Font with normal and italic styles.
HBufC *  iSearchString
  String used in list box search field.

Friends

class  CListItemDrawer

Data Structures

class   CFontsWithStyle

Constructor & Destructor Documentation

IMPORT_C CListBoxData::CListBoxData  ) 
 

C++ default constructor.

IMPORT_C CListBoxData::~CListBoxData  ) 
 

Destructor.


Member Function Documentation

CGraphicsContext::TTextAlign CListBoxData::Alignment  )  const [inline]
 

Queries used text alignment.

Returns:
CGraphicsContext::TTextAlign The text alignment.
IMPORT_C void CListBoxData::ConstructFontL const CFont *  aBaseFont,
TFontStyle  aFontStyle,
CFontsWithStyle aFonts
[protected]
 

Constructs a new font based on the base font and font style given.

Constructed font is added to CFontsWithStyle.

Parameters:
aBaseFont  Base fontused in construction
aFontStyle  A new font's style
aFonts  New font is added to this font container.
IMPORT_C void CListBoxData::ConstructL const CFont *  aBaseFont  ) 
 

By default Symbian 2nd phase constructor is private.

This one is public.

Parameters:
aBaseFont  Parameter not used in the code.
IMPORT_C void CListBoxData::DrawItem CWindowGc &  aGc,
const TRect &  aItemTextRect,
const TDesC &  aItemText,
const CFont &  aItemFont,
const TInt  aBaseLineOffset,
const CGraphicsContext::TTextAlign  aAlign = CGraphicsContext::ELeft
const
 

Draws list item text.

Supports different drawing for the search string.

Parameters:
aGc  Graphics context used.
aItemTextRect  The item's text rectangle.
aItemText  Text of the item.
aItemFont  Used font.
aBaseLineOffset  Item's base line offset.
aAlign  Text alignment. Default alignment is CGraphicsContext::ELeft
virtual IMPORT_C CFont* CListBoxData::Font const TListItemProperties aItemProperties  )  const [virtual]
 

Returns a pointer to the type of font wanted.

Parameters:
aItemProperties  Definition of font type wanted.
Returns:
CFont* Handle to the font or NULL.
IMPORT_C const TListFontBoundValues& CListBoxData::FontBoundValues  )  const
 

Queries boundary values of font size.

TListFontBoundValues& Reference to boundary value object.

IMPORT_C TBool CListBoxData::IsSearchString  )  const
 

Query is search string set.

Returns:
TBool ETrue if search string set and has non zero length. EFalse if no search string set or length is 0.
IMPORT_C TInt CListBoxData::RegenerateFonts CFontsWithStyle aFonts,
TInt  aFontHeightInTwips
[protected]
 

Changes fonts' height.

Takes new height as argument and regenerates font set so that height is modified.

Parameters:
aFonts  Font set to modify
aFontHeightInTwips  New font height
void CListBoxData::SetAlignmentL CGraphicsContext::TTextAlign  aAlign  )  [inline]
 

Sets list item's text alignment.

Parameters:
aAlign  Text alignment to use.
IMPORT_C TInt CListBoxData::SetFontHeight TInt  aFontHeightInTwips  ) 
 

Sets a new height of fonts.

Parameters:
aFontHeightInTwips  New height for fonts.
Returns:
TInt Symbian error code, KErrNone if success.
IMPORT_C void CListBoxData::SetSearchStringL const TDesC *  aSearchString  ) 
 

Setter for a search string used for viewing search results.

Parameters:
aSearchString  The search string.
IMPORT_C void CListBoxData::SetSkinBackgroundControlContextL MAknsControlContext aContext  )  [protected]
 

Sets a background skinning context.

Set NULL to disable background skinning.

Parameters:
aContext  Background skinning context.
IMPORT_C void CListBoxData::SetSkinEnabledL TBool  aEnabled  )  [protected]
 

Sets whether skins are enabled.

Parameters:
aEnabled  EFalse disable skinning, ETrue enable

Reimplemented in CColumnListBoxData, and CFormattedCellListBoxData.

IMPORT_C void CListBoxData::SetupGc const TListItemProperties aItemProperties,
CWindowGc &  aGc
const
 

Sets properties (underlining on / off, pen colorm and font) of graphical context.

Parameters:
aItemProperties  Contains properties to set.
aGc  Target of settings.
IMPORT_C MAknsControlContext* CListBoxData::SkinBackgroundControlContext  )  const
 

Access to skin contexts from plain listboxes.

Returns:
MAknsControlContext* Used skin context
IMPORT_C void CListBoxData::UpdateFontBoundValues const CFont &  aFont  )  [protected]
 

Updates width and heigh information.

Used when font is changed.

Parameters:
aFont  A font from which bound values are taken.

Friends And Related Function Documentation

friend class CListItemDrawer [friend]
 

Field Documentation

CFontsWithStyle CListBoxData::iBoldFont [protected]
 

Bold style font.

CFontsWithStyle CListBoxData::iBoldItalicFont [protected]
 

Font with normal and italic styles.

CFontsWithStyle CListBoxData::iItalicFont [protected]
 

Italic style font.

CFontsWithStyle CListBoxData::iNormalFont [protected]
 

Normal style font.

HBufC* CListBoxData::iSearchString [protected]
 

String used in list box search field.


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

Copyright © Nokia Corporation 2001-2008
Back to top