CListBoxData Class Reference

class CListBoxData : public CBase

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.

Since
ER5U

Inherits from

Public Member Functions
CListBoxData ()
~CListBoxData ()
CGraphicsContext::TTextAlign Alignment ()
IMPORT_C void ConstructL (const CFont *)
IMPORT_C void DrawItem ( CWindowGc &, const TRect &, const TDesC &, const CFont &, const TInt , const CGraphicsContext::TTextAlign )
IMPORT_C CFont * Font (const TListItemProperties &)
IMPORT_C const TListFontBoundValues & FontBoundValues ()
IMPORT_C TBool IsSearchString ()
void SetAlignmentL ( CGraphicsContext::TTextAlign )
IMPORT_C TInt SetFontHeight ( TInt )
IMPORT_C void SetSearchStringL (const TDesC *)
IMPORT_C void SetupGc (const TListItemProperties &, CWindowGc &)
IMPORT_C MAknsControlContext * SkinBackgroundControlContext ()
Protected Member Functions
IMPORT_C void ConstructFontL (const CFont *, TFontStyle , CFontsWithStyle &)
NONSHARABLE_CLASS (CFontsWithStyle)
IMPORT_C TInt RegenerateFonts (CFontsWithStyle &, TInt )
IMPORT_C void SetSkinBackgroundControlContextL ( MAknsControlContext *)
IMPORT_C void SetSkinEnabledL ( TBool )
IMPORT_C void UpdateFontBoundValues (const CFont &)
Private Member Functions
IMPORT_C void Reserved_1 ()
IMPORT_C void Reserved_2 ()
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()
Protected Attributes
CFontsWithStyle iBoldFont
CFontsWithStyle iBoldItalicFont
CFontsWithStyle iItalicFont
CFontsWithStyle iNormalFont
HBufC * iSearchString
Private Attributes
CGraphicsContext::TTextAlign iAlign
TListFontBoundValues iFontBoundValues
CListBoxDataExtension * iLBDExtension

Constructor & Destructor Documentation

CListBoxData()

IMPORT_C CListBoxData ( )

C++ default constructor.

class CListBoxData

~CListBoxData()

IMPORT_C ~CListBoxData ( )

Destructor

Member Functions Documentation

Alignment()

CGraphicsContext::TTextAlign Alignment ( ) const [inline]

Queries used text alignment.

ConstructFontL(const CFont *, TFontStyle, CFontsWithStyle &)

IMPORT_C void 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

const CFont * aBaseFont Base fontused in construction
TFontStyle aFontStyle A new font's style
CFontsWithStyle & aFonts New font is added to this font container.

ConstructL(const CFont *)

IMPORT_C void ConstructL ( const CFont * aBaseFont )

By default Symbian 2nd phase constructor is private. This one is public.

Parameters

const CFont * aBaseFont Parameter not used in the code.

DrawItem(CWindowGc &, const TRect &, const TDesC &, const CFont &, const TInt, const CGraphicsContext::TTextAlign)

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. Supports different drawing for the search string.

Font Draws list item text so that search string is drawed as bold underlined.

Parameters

CWindowGc & aGc Graphics context used.
const TRect & aItemTextRect The item's text rectangle.
const TDesC & aItemText Text of the item.
const CFont & aItemFont Used font.
const TInt aBaseLineOffset Item's base line offset.
const CGraphicsContext::TTextAlign aAlign = CGraphicsContext::ELeft Text alignment. Default alignment is CGraphicsContext::ELeft

Font(const TListItemProperties &)

IMPORT_C CFont * Font ( const TListItemProperties & aItemProperties ) const [virtual]

Returns a pointer to the type of font wanted.

Parameters

const TListItemProperties & aItemProperties Definition of font type wanted.

FontBoundValues()

IMPORT_C const TListFontBoundValues & FontBoundValues ( ) const

Queries boundary values of font size.

TListFontBoundValues & Reference to boundary value object.

IsSearchString()

IMPORT_C TBool IsSearchString ( ) const

Query is search string set

Returns ETrue if a search string with a non-zero length has been set for this list box.

NONSHARABLE_CLASS(CFontsWithStyle)

NONSHARABLE_CLASS ( CFontsWithStyle ) [protected, inline]

Parameters

CFontsWithStyle

RegenerateFonts(CFontsWithStyle &, TInt)

IMPORT_C TInt RegenerateFonts ( CFontsWithStyle & aFonts,
TInt aFontHeightInTwips
) [protected]

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

Parameters

CFontsWithStyle & aFonts Font set to modify
TInt aFontHeightInTwips New font height

Reserved_1()

IMPORT_C void Reserved_1 ( ) [private, virtual]

Reserved_2()

IMPORT_C void Reserved_2 ( ) [private, virtual]

SetAlignmentL(CGraphicsContext::TTextAlign)

void SetAlignmentL ( CGraphicsContext::TTextAlign aAlign ) [inline]

Sets list item's text alignment.

Parameters

CGraphicsContext::TTextAlign aAlign Text alignment to use.

SetFontHeight(TInt)

IMPORT_C TInt SetFontHeight ( TInt aFontHeightInTwips )

Sets a new height of fonts

Parameters

TInt aFontHeightInTwips New height for fonts.

SetSearchStringL(const TDesC *)

IMPORT_C void SetSearchStringL ( const TDesC * aSearchString )

Setter for a search string used for viewing search results

Set search string for search result viewing.

Parameters

const TDesC * aSearchString The search string.

SetSkinBackgroundControlContextL(MAknsControlContext *)

IMPORT_C void SetSkinBackgroundControlContextL ( MAknsControlContext * aContext ) [protected]

Sets a background skinning context. Set NULL to disable background skinning.

Since
Series 60 2.0

Parameters

MAknsControlContext * aContext Background skinning context.

SetSkinEnabledL(TBool)

IMPORT_C void SetSkinEnabledL ( TBool aEnabled ) [protected]

Sets whether skins are enabled.

Parameters

TBool aEnabled EFalse disable skinning, ETrue enable

SetupGc(const TListItemProperties &, CWindowGc &)

IMPORT_C void SetupGc ( const TListItemProperties & aItemProperties,
CWindowGc & aGc
) const

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

Parameters

const TListItemProperties & aItemProperties Contains properties to set.
CWindowGc & aGc Target of settings.

SkinBackgroundControlContext()

IMPORT_C MAknsControlContext * SkinBackgroundControlContext ( ) const

Access to skin contexts from plain listboxes.

Since
Series 60 2.0

UpdateFontBoundValues(const CFont &)

IMPORT_C void UpdateFontBoundValues ( const CFont & aFont ) [protected]

Updates width and heigh information. Used when font is changed.

Parameters

const CFont & aFont A font from which bound values are taken.

Member Data Documentation

CGraphicsContext::TTextAlign iAlign

CGraphicsContext::TTextAlign iAlign [private]

CFontsWithStyle iBoldFont

CFontsWithStyle iBoldFont [protected]

Bold style font

CFontsWithStyle iBoldItalicFont

CFontsWithStyle iBoldItalicFont [protected]

Font with normal and italic styles

TListFontBoundValues iFontBoundValues

TListFontBoundValues iFontBoundValues [private]

CFontsWithStyle iItalicFont

CFontsWithStyle iItalicFont [protected]

Italic style font

CListBoxDataExtension * iLBDExtension

CListBoxDataExtension * iLBDExtension [private]

CFontsWithStyle iNormalFont

CFontsWithStyle iNormalFont [protected]

Normal style font

HBufC * iSearchString

HBufC * iSearchString [protected]

String used in list box search field.