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.

ER5U

Inherits from

Nested Classes and Structures

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 &)
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
CFontsWithStyle iBoldFont
CFontsWithStyle iBoldItalicFont
CFontsWithStyle iItalicFont
CFontsWithStyle iNormalFont
HBufC *iSearchString
Private Attributes
CGraphicsContext::TTextAlign iAlign
TListFontBoundValues iFontBoundValues
CListBoxDataExtension *iLBDExtension

Constructor & Destructor Documentation

CListBoxData()

IMPORT_CCListBoxData()

C++ default constructor.

~CListBoxData()

IMPORT_C~CListBoxData()

Destructor

Member Functions Documentation

Alignment()

CGraphicsContext::TTextAlign Alignment()const [inline]

Queries used text alignment.

CGraphicsContext::TTextAlign The 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.

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.

CFont* Handle to the font or NULL.

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

TBool ETrue if search string set and has non zero length. EFalse if no search string set or length is 0.

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

TInt Symbian error code, KErrNone if success.

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

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.

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.

Series 60 2.0

MAknsControlContext* Used skin context

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

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.