MAknPictographDrawer Class Reference

#include <mw/AknPictographDrawerInterface.h>

Link against: N/A

class MAknPictographDrawer
Public Member Functions
virtual ~MAknPictographDrawer()
pure virtual TBool ContainsPictographs(const TDesC &)
pure virtual voidDrawPictograph(CBitmapContext &, const TPoint &, TText, TAknPictographHeight)
pure virtual voidDrawPictograph(CBitmapContext &, const TRect &, TText, TAknPictographHeight)
pure virtual voidDrawPictograph(CBitmapContext &, const TRect &, const TRect &, TText, TAknPictographHeight)
pure virtual voidDrawPictographsInText(CBitmapContext &, const CFont &, const TDesC &, const TPoint &)
pure virtual voidDrawPictographsInText(CBitmapContext &, const CFont &, const TDesC &, const TRect &, TInt, CGraphicsContext::TTextAlign, TInt)
pure virtual voidDrawText(CBitmapContext &, const CFont &, const TDesC &, const TPoint &)
pure virtual voidDrawText(CBitmapContext &, const CFont &, const TDesC &, const TRect &, TInt, CGraphicsContext::TTextAlign, TInt)
pure virtual TBool IsAnimated(TText, TAknPictographHeight)
pure virtual TBool IsPictograph(TText)
pure virtual TInt SelectPictographHeightForFont(const CFont &, TAknPictographHeight &)
pure virtual TAknPictographDrawingMode SetPictographDrawingMode(TAknPictographDrawingMode)
pure virtual HBufC *SupportedPictographCodesL()

Detailed Description

Pictograph drawer interface

Since
2.6

Constructor & Destructor Documentation

~MAknPictographDrawer ( )

~MAknPictographDrawer()[inline, virtual]

Destructor.

Member Function Documentation

ContainsPictographs ( const TDesC & )

TBool ContainsPictographs(const TDesC &aText)const [pure virtual]

Tells whether the text contains any pictographs.

Since
2.6
ParameterDescription
aTextText.

Returns: ETrue if the text contains any pictographs, EFalse if not.

DrawPictograph ( CBitmapContext &, const TPoint &, TText, TAknPictographHeight )

voidDrawPictograph(CBitmapContext &aGc,
const TPoint &aTopLeft,
TTextaCode,
TAknPictographHeightaHeight
)const [pure virtual]

Draws pictograph bitmap in the given position. This method sets aGc to use CGraphicsContext::ENullBrush.

Since
2.6
ParameterDescription
aGcGraphics context.
aTopLeftTop left coordinates of the rendering position .
aCodePictograph code in Unicode.
aHeightPictograph height.

DrawPictograph ( CBitmapContext &, const TRect &, TText, TAknPictographHeight )

voidDrawPictograph(CBitmapContext &aGc,
const TRect &aRect,
TTextaCode,
TAknPictographHeightaHeight
)const [pure virtual]

Draws pictograph bitmap centered in the given rect. This method sets aGc to use CGraphicsContext::ENullBrush.

Since
2.6
ParameterDescription
aGcGraphics context.
aRectRectangle, where the pictograph is centered in.
aCodePictograph code in Unicode.
aHeightPictograph height.

DrawPictograph ( CBitmapContext &, const TRect &, const TRect &, TText, TAknPictographHeight )

voidDrawPictograph(CBitmapContext &aGc,
const TRect &aRect,
const TRect &aClipRect,
TTextaCode,
TAknPictographHeightaHeight
)const [pure virtual]

Draws pictograph bitmap centered in the given rect, clipped with clipping rect. This method sets aGc to use CGraphicsContext::ENullBrush.

Since
2.6
ParameterDescription
aGcGraphics context.
aRectRectangle, where the pictograph is centered in.
aClipRectClipping rectangle.
aCodePictograph code in Unicode.
aHeightPictograph height.

DrawPictographsInText ( CBitmapContext &, const CFont &, const TDesC &, const TPoint & )

voidDrawPictographsInText(CBitmapContext &aGc,
const CFont &aFont,
const TDesC &aText,
const TPoint &aPosition
)const [pure virtual]

Draws pictographs that are encountered in the text. Suitable pictograph height is chosen based on aFont. This method sets aGc to use CGraphicsContext::ENullBrush.

Since
2.6
ParameterDescription
aGcGraphics context.
aFontUsed font.
aTextText.
aPositionText baseline coordinates of the starting position.

DrawPictographsInText ( CBitmapContext &, const CFont &, const TDesC &, const TRect &, TInt, CGraphicsContext::TTextAlign, TInt )

voidDrawPictographsInText(CBitmapContext &aGc,
const CFont &aFont,
const TDesC &aText,
const TRect &aBox,
TIntaBaselineOffset,
CGraphicsContext::TTextAlignaAlignment = CGraphicsContext::ELeft,
TIntaLeftMargin = 0
)const [pure virtual]

Draws pictographs that are encountered in the text. This method sets aGc to use CGraphicsContext::ENullBrush.

Since
2.6
ParameterDescription
aGcGraphics context.
aFontUsed font.
aTextText.
aBoxRectangle, where the text is rendered.
aBaselineOffsetOffset from the top of the rectangle to the baseline to the text.
aAlignmentText alignment.
aLeftMarginThe left margin for left-aligned text, or the right margin for right-aligned text

DrawText ( CBitmapContext &, const CFont &, const TDesC &, const TPoint & )

voidDrawText(CBitmapContext &aGc,
const CFont &aFont,
const TDesC &aText,
const TPoint &aPosition
)const [pure virtual]

Draws text using CGraphicsContext::DrawText and then draws pictographs on top of that.

Suitable pictograph height is chosen based on aFont.

The graphics context aGc must be set to use font aFont before calling this method.

This method sets aGc to use CGraphicsContext::ENullBrush.

Since
2.6
ParameterDescription
aGcGraphics context.
aFontUsed font.
aTextText.
aPositionText baseline coordinates of the starting position.

DrawText ( CBitmapContext &, const CFont &, const TDesC &, const TRect &, TInt, CGraphicsContext::TTextAlign, TInt )

voidDrawText(CBitmapContext &aGc,
const CFont &aFont,
const TDesC &aText,
const TRect &aBox,
TIntaBaselineOffset,
CGraphicsContext::TTextAlignaAlignment = CGraphicsContext::ELeft,
TIntaLeftMargin = 0
)const [pure virtual]

Draws text using CGraphicsContext::DrawText and then draws pictographs on top of that.

Suitable pictograph height is chosen based on aFont.

The graphics context aGc must be set to use font aFont before calling this method.

This method sets aGc to use CGraphicsContext::ENullBrush.

Since
2.6
ParameterDescription
aGcGraphics context.
aFontUsed font.
aTextText.
aBoxRectangle, where the text is rendered.
aBaselineOffsetOffset from the top of the rectangle to the baseline to the text.
aAlignmentText alignment.
aLeftMarginThe left margin for left-aligned text, or the right margin for right-aligned text

IsAnimated ( TText, TAknPictographHeight )

TBool IsAnimated(TTextaCode,
TAknPictographHeightaHeight
)const [pure virtual]

Tells whether the given pictograph is animated or not.

Since
2.6
ParameterDescription
aCodePictograph code in Unicode.

IsPictograph ( TText )

TBool IsPictograph(TTextaCode)const [pure virtual]

Tells whether the character is in the pictograph code range.

Since
2.6
ParameterDescription
aCodeCharacter code in Unicode.

Returns: ETrue if in pictograph code range, EFalse if not.

SelectPictographHeightForFont ( const CFont &, TAknPictographHeight & )

TInt SelectPictographHeightForFont(const CFont &aFont,
TAknPictographHeight &aHeight
)const [pure virtual]

Tries to find a matching pictograph height for a given font.

Since
2.8
ParameterDescription
aFontUsed font.
aHeightPictograph height.

Returns: KErrNone if a supported pictograph height is found that matches aFont otherwise returns KErrNotSupported

SetPictographDrawingMode ( TAknPictographDrawingMode )

TAknPictographDrawingMode SetPictographDrawingMode(TAknPictographDrawingModeaDrawingMode)[pure virtual]

Sets the pictograph drawing mode for DrawPictograph calls. Other functions e.g. DrawText, etc are unaffected by this function. The drawing mode is set to EDrawingModeNormal by default. Note: When drawing mode EDrawingModeWhite is set only a single DrawPictograph call is supported per component->Draw() call.

Since
2.8
ParameterDescription
aDrawingModethe new pictograph drawing mode to be used.

Returns: the value of the previous pictograph drawing mode.

SupportedPictographCodesL ( )

HBufC *SupportedPictographCodesL()const [pure virtual]

Returns a heap descriptor filled with all supported pictograph codes. They are sorted in ascending pictograph code order. Ownership of the returned object is transferred to the caller.

Since
2.6

Returns: Heap descriptor filled with all supported pictograph codes.