MTmCustomExtension Class Reference

#include <tagma.h>

Link against: tagma.lib

class MTmCustomExtension
Public Member Functions
virtual IMPORT_C voidDrawText(CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &, const TTmCharFormat &, const TDesC &, const TInt, const TInt, const TPoint &, TInt)
IMPORT_C voidSetBrushColor(CGraphicsContext &, TLogicalRgb)
IMPORT_C voidSetPenColor(CGraphicsContext &, TLogicalRgb)
virtual IMPORT_C TRgbSystemColor(TUint, TRgb)
IMPORT_C TRgbSystemColor(TLogicalRgb)

Detailed Description

MTmSource Extension Interface abstract base class to enable further customisation of the source.

MTmSource derivers should also derive from this interface to enable drawing text in context

This interface should be returned by the overridden MTmSource::GetExtendedInterface function when KUidMTmSourceExtension is supplied as the UID.

See also: MTmSource KUidMTmSourceExtension

Member Function Documentation

DrawText ( CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &, const TTmCharFormat &, const TDesC &, const TInt, const TInt, const TPoint &, TInt )

IMPORT_C voidDrawText(CGraphicsContext &aGc,
const TPoint &aTopLeft,
const TRect &aRect,
const TTmLineInfo &aLineInfo,
const TTmCharFormat &aFormat,
const TDesC &aText,
const TIntaStart,
const TIntaEnd,
const TPoint &aTextOrigin,
TIntaExtraPixels
)const [virtual]

Draw text and its highlit background if any. The text should be drawn with its origin at aTextOrigin after optionally drawing the background in aRect; and the text should be expanded in width by aExtraPixels, normally by using letterspacing. The default function draws the text with no special effects and supports standard and rounded highlighting only. The font, colour, and text style, which are specified in aFormat, have already been selected into the graphics context.

SetBrushColor ( CGraphicsContext &, TLogicalRgb )

IMPORT_C voidSetBrushColor(CGraphicsContext &aGc,
TLogicalRgbaColor
)const

Sets the brush colour. The brush is used for filling shapes and the background of text boxes. The brush has colour, style, pattern and pattern origin parameters. If no brush colour has been set, it defaults to white. However the default brush style is null, so when drawing to a window the default appears to be the window's background colour.

See also: CGraphicsContext::SetDrawMode()

Parameters
aColorThe logical colour for the brush.

SetPenColor ( CGraphicsContext &, TLogicalRgb )

IMPORT_C voidSetPenColor(CGraphicsContext &aGc,
TLogicalRgbaColor
)const

Sets the pen colour. The pen is used to draw lines, the outlines of filled shapes, and text.

See also: CGraphicsContext::SetPenColor()

Parameters
aColorThe logical colour for the pen.

SystemColor ( TUint, TRgb )

IMPORT_C TRgbSystemColor(TUintaColorIndex,
TRgbaDefaultColor
)const [virtual]

Convert a system colour index to a system colour, using or modifying the supplied default colour if desired.

SystemColor ( TLogicalRgb )

IMPORT_C TRgbSystemColor(TLogicalRgbaColor)const

This function translates logical colours specified in FORM objects into real colours. It extracts the logical colour index stored in TLogicalRgb and invokes MtmCustom::SystemColor(TUint, TRgb) to convert the logical colour to real colour.

Parameters
aColorThe logical colour to translate.
Return Value
The real colour represesented by the logical colour.