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 voidConstructL(const CFont *)
IMPORT_C voidDrawItem(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 TBoolIsSearchString()
voidSetAlignmentL(CGraphicsContext::TTextAlign)
IMPORT_C TIntSetFontHeight(TInt)
IMPORT_C voidSetSearchStringL(const TDesC *)
IMPORT_C voidSetupGc(const TListItemProperties &, CWindowGc &)
IMPORT_C MAknsControlContext *SkinBackgroundControlContext()
Protected Member Functions
IMPORT_C voidConstructFontL(const CFont *, TFontStyle, CFontsWithStyle &)
NONSHARABLE_CLASS(CFontsWithStyle)
IMPORT_C TIntRegenerateFonts(CFontsWithStyle &, TInt)
IMPORT_C voidSetSkinBackgroundControlContextL(MAknsControlContext *)
IMPORT_C voidSetSkinEnabledL(TBool)
IMPORT_C voidUpdateFontBoundValues(const CFont &)
Private Member Functions
IMPORT_C voidReserved_1()
IMPORT_C voidReserved_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
CFontsWithStyleiBoldFont
CFontsWithStyleiBoldItalicFont
CFontsWithStyleiItalicFont
CFontsWithStyleiNormalFont
HBufC *iSearchString
Private Attributes
CGraphicsContext::TTextAlign iAlign
TListFontBoundValues iFontBoundValues
CListBoxDataExtension *iLBDExtension

Constructor & Destructor Documentation

CListBoxData()

IMPORT_CCListBoxData()

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 voidConstructFontL(const CFont *aBaseFont,
TFontStyleaFontStyle,
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 * aBaseFontBase fontused in construction
TFontStyle aFontStyleA new font's style
CFontsWithStyle & aFontsNew font is added to this font container.

ConstructL(const CFont *)

IMPORT_C voidConstructL(const CFont *aBaseFont)

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

Parameters

const CFont * aBaseFontParameter not used in the code.

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

IMPORT_C voidDrawItem(CWindowGc &aGc,
const TRect &aItemTextRect,
const TDesC &aItemText,
const CFont &aItemFont,
const TIntaBaseLineOffset,
const CGraphicsContext::TTextAlignaAlign = 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 & aGcGraphics context used.
const TRect & aItemTextRectThe item's text rectangle.
const TDesC & aItemTextText of the item.
const CFont & aItemFontUsed font.
const TInt aBaseLineOffsetItem's base line offset.
const CGraphicsContext::TTextAlign aAlign = CGraphicsContext::ELeftText 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 & aItemPropertiesDefinition 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 TBoolIsSearchString()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 TIntRegenerateFonts(CFontsWithStyle &aFonts,
TIntaFontHeightInTwips
)[protected]

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

Parameters

CFontsWithStyle & aFontsFont set to modify
TInt aFontHeightInTwipsNew font height

Reserved_1()

IMPORT_C voidReserved_1()[private, virtual]

Reserved_2()

IMPORT_C voidReserved_2()[private, virtual]

SetAlignmentL(CGraphicsContext::TTextAlign)

voidSetAlignmentL(CGraphicsContext::TTextAlignaAlign)[inline]

Sets list item's text alignment.

Parameters

CGraphicsContext::TTextAlign aAlignText alignment to use.

SetFontHeight(TInt)

IMPORT_C TIntSetFontHeight(TIntaFontHeightInTwips)

Sets a new height of fonts

Parameters

TInt aFontHeightInTwipsNew height for fonts.

SetSearchStringL(const TDesC *)

IMPORT_C voidSetSearchStringL(const TDesC *aSearchString)

Setter for a search string used for viewing search results

Set search string for search result viewing.

Parameters

const TDesC * aSearchStringThe search string.

SetSkinBackgroundControlContextL(MAknsControlContext *)

IMPORT_C voidSetSkinBackgroundControlContextL(MAknsControlContext *aContext)[protected]

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

Since
Series 60 2.0

Parameters

MAknsControlContext * aContextBackground skinning context.

SetSkinEnabledL(TBool)

IMPORT_C voidSetSkinEnabledL(TBoolaEnabled)[protected]

Sets whether skins are enabled.

Parameters

TBool aEnabledEFalse disable skinning, ETrue enable

SetupGc(const TListItemProperties &, CWindowGc &)

IMPORT_C voidSetupGc(const TListItemProperties &aItemProperties,
CWindowGc &aGc
)const

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

Parameters

const TListItemProperties & aItemPropertiesContains properties to set.
CWindowGc & aGcTarget 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 voidUpdateFontBoundValues(const CFont &aFont)[protected]

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

Parameters

const CFont & aFontA font from which bound values are taken.

Member Data Documentation

CGraphicsContext::TTextAlign iAlign

CGraphicsContext::TTextAlign iAlign[private]

CFontsWithStyle iBoldFont

CFontsWithStyleiBoldFont[protected]

Bold style font

CFontsWithStyle iBoldItalicFont

CFontsWithStyleiBoldItalicFont[protected]

Font with normal and italic styles

TListFontBoundValues iFontBoundValues

TListFontBoundValues iFontBoundValues[private]

CFontsWithStyle iItalicFont

CFontsWithStyleiItalicFont[protected]

Italic style font

CListBoxDataExtension * iLBDExtension

CListBoxDataExtension *iLBDExtension[private]

CFontsWithStyle iNormalFont

CFontsWithStyleiNormalFont[protected]

Normal style font

HBufC * iSearchString

HBufC *iSearchString[protected]

String used in list box search field.