CCoeTextDrawerBase Class Reference

class CCoeTextDrawerBase : public CBase

This is the base class for all text drawers implementing different text effects (for example shadow or glowing/outlined text). The object can be created and deleted each time it's used, or Reset() and reused if it IsReusable(). The latter is recommended.

Note that the pure virtual DrawText() method is private. This ensures that the object is used through the XCoeTextDrawer class (which manages its life).

Note also that the accessor and set methods should be used via the owning XCoeTextDrawer object, and that the MObjectProvider mechanism can be used to identify the actual text drawer implementation.

Inherits from

Public Member Functions
~CCoeTextDrawerBase()
IMPORT_C TGulAlignmentAlignment()
IMPORT_C TMargins8EffectMargins()
IMPORT_C TBoolIsReusable()
IMPORT_C TIntLineGapInPixels()
IMPORT_C TMargins8Margins()
IMPORT_C voidReset()
IMPORT_C voidSetAlignment(const TGulAlignment &)
IMPORT_C voidSetAppLanguage(TLanguage)
IMPORT_C voidSetLineGapInPixels(TInt)
IMPORT_C voidSetMargins(const TMargins8 &)
IMPORT_C voidSetReusable(TBool)
voidSetTextColor(TRgb)
TRgb TextColor()
Protected Member Functions
CCoeTextDrawerBase()
IMPORT_C TGulHAlignmentActualHorizontalAlignment(const TCoeTextTypeAdaptor &)
IMPORT_C TIntConstruct()
Private Member Functions
IMPORT_C voidCCoeTextDrawerBase_Reserved10()
IMPORT_C voidCCoeTextDrawerBase_Reserved3()
IMPORT_C voidCCoeTextDrawerBase_Reserved4()
IMPORT_C voidCCoeTextDrawerBase_Reserved5()
IMPORT_C voidCCoeTextDrawerBase_Reserved6()
IMPORT_C voidCCoeTextDrawerBase_Reserved7()
IMPORT_C voidCCoeTextDrawerBase_Reserved8()
IMPORT_C voidCCoeTextDrawerBase_Reserved9()
voidDrawText(CGraphicsContext &, const TCoeTextTypeAdaptor &, const CFont &, const TRect &, const TRect &)
IMPORT_C voidDrawTextVertical(CGraphicsContext &, const TCoeTextTypeAdaptor &, const CFont &, const TRect &, const TRect &, TBool)
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()
Private Attributes
TGulAlignment iAlignment
CCoeTextDrawerBaseExt *iExtension
TBool iIsReusable
TInt iLineGap
TMargins8 iMargins

Constructor & Destructor Documentation

CCoeTextDrawerBase()

IMPORT_CCCoeTextDrawerBase()[protected]

~CCoeTextDrawerBase()

IMPORT_C~CCoeTextDrawerBase()

Member Functions Documentation

ActualHorizontalAlignment(const TCoeTextTypeAdaptor &)

IMPORT_C TGulHAlignmentActualHorizontalAlignment(const TCoeTextTypeAdaptor &aText)const [protected]

Parameters

const TCoeTextTypeAdaptor & aText

Alignment()

IMPORT_C TGulAlignmentAlignment()const

CCoeTextDrawerBase_Reserved10()

IMPORT_C voidCCoeTextDrawerBase_Reserved10()[private, virtual]

CCoeTextDrawerBase_Reserved3()

IMPORT_C voidCCoeTextDrawerBase_Reserved3()[private, virtual]

CCoeTextDrawerBase_Reserved4()

IMPORT_C voidCCoeTextDrawerBase_Reserved4()[private, virtual]

CCoeTextDrawerBase_Reserved5()

IMPORT_C voidCCoeTextDrawerBase_Reserved5()[private, virtual]

CCoeTextDrawerBase_Reserved6()

IMPORT_C voidCCoeTextDrawerBase_Reserved6()[private, virtual]

CCoeTextDrawerBase_Reserved7()

IMPORT_C voidCCoeTextDrawerBase_Reserved7()[private, virtual]

CCoeTextDrawerBase_Reserved8()

IMPORT_C voidCCoeTextDrawerBase_Reserved8()[private, virtual]

CCoeTextDrawerBase_Reserved9()

IMPORT_C voidCCoeTextDrawerBase_Reserved9()[private, virtual]

Construct()

IMPORT_C TIntConstruct()[protected]

DrawText(CGraphicsContext &, const TCoeTextTypeAdaptor &, const CFont &, const TRect &, const TRect &)

voidDrawText(CGraphicsContext &aGc,
const TCoeTextTypeAdaptor &aText,
const CFont &aFont,
const TRect &aTextRect,
const TRect &aClipRect
)const [private, pure virtual]

Any actual text drawer must implement this method to draw the text passed as argument. The implementation must draw the text inside the text rectangle, cropped to the clipping rectangle, and with the given margins and alignment taken into account.

Note that the actual horizontal alignment shall depend on the script directionality. Calling ActualHorizontalAlignment() will return the horizontal alignment where left and right has been swapped for right-to-left scripts.

Parameters

CGraphicsContext & aGc
const TCoeTextTypeAdaptor & aText
const CFont & aFont
const TRect & aTextRect
const TRect & aClipRect

DrawTextVertical(CGraphicsContext &, const TCoeTextTypeAdaptor &, const CFont &, const TRect &, const TRect &, TBool)

IMPORT_C voidDrawTextVertical(CGraphicsContext &aGc,
const TCoeTextTypeAdaptor &aText,
const CFont &aFont,
const TRect &aTextRect,
const TRect &aClipRect,
TBoolaUp
)const [private, virtual]

Draws the text vertically inside the text rectangle, cropped to the clipping rectangle, and with the given margins and alignment taken into account. If aUp is ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.

Note that the actual horizontal alignment shall depend on the script directionality. Calling ActualHorizontalAlignment() will return the horizontal alignment where left and right has been swapped for right-to-left scripts. Also note that the margines are relative to the orientation of the text.

Parameters

CGraphicsContext & aGc
const TCoeTextTypeAdaptor & aText
const CFont & aFont
const TRect & aTextRect
const TRect & aClipRect
TBool aUp

EffectMargins()

IMPORT_C TMargins8EffectMargins()[virtual]

IsReusable()

IMPORT_C TBoolIsReusable()const

LineGapInPixels()

IMPORT_C TIntLineGapInPixels()const

Margins()

IMPORT_C TMargins8Margins()const

Reset()

IMPORT_C voidReset()[virtual]

SetAlignment(const TGulAlignment &)

IMPORT_C voidSetAlignment(const TGulAlignment &aAlignment)

Parameters

const TGulAlignment & aAlignment

SetAppLanguage(TLanguage)

IMPORT_C voidSetAppLanguage(TLanguageaAppLang)

Parameters

TLanguage aAppLang

SetLineGapInPixels(TInt)

IMPORT_C voidSetLineGapInPixels(TIntaLineGapInPixels)

Parameters

TInt aLineGapInPixels

SetMargins(const TMargins8 &)

IMPORT_C voidSetMargins(const TMargins8 &aMargins)

Parameters

const TMargins8 & aMargins

SetReusable(TBool)

IMPORT_C voidSetReusable(TBoolaIsReusable)

Parameters

TBool aIsReusable

SetTextColor(TRgb)

voidSetTextColor(TRgbaColor)[pure virtual]

This method sets the main color to use to draw text.

Parameters

TRgb aColorThe color to use to draw text.

TextColor()

TRgb TextColor()const [pure virtual]

This method returns the main color used by the CCoeTextDrawer to draw text. The color used to draw text.

Member Data Documentation

TGulAlignment iAlignment

TGulAlignment iAlignment[private]

CCoeTextDrawerBaseExt * iExtension

CCoeTextDrawerBaseExt *iExtension[private]

TBool iIsReusable

TBool iIsReusable[private]

TInt iLineGap

TInt iLineGap[private]

TMargins8 iMargins

TMargins8 iMargins[private]