#include <tagma.h>
Link against: tagma.lib
class MTmCustomExtension |
Public Member Functions | |
---|---|
virtual IMPORT_C void | DrawText(CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &, const TTmCharFormat &, const TDesC &, const TInt, const TInt, const TPoint &, TInt) |
IMPORT_C void | SetBrushColor(CGraphicsContext &, TLogicalRgb) |
IMPORT_C void | SetPenColor(CGraphicsContext &, TLogicalRgb) |
virtual IMPORT_C TRgb | SystemColor(TUint, TRgb) |
IMPORT_C TRgb | SystemColor(TLogicalRgb) |
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
IMPORT_C void | DrawText | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
const TRect & | aRect, | |||
const TTmLineInfo & | aLineInfo, | |||
const TTmCharFormat & | aFormat, | |||
const TDesC & | aText, | |||
const TInt | aStart, | |||
const TInt | aEnd, | |||
const TPoint & | aTextOrigin, | |||
TInt | aExtraPixels | |||
) | 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.
IMPORT_C void | SetBrushColor | ( | CGraphicsContext & | aGc, |
TLogicalRgb | aColor | |||
) | 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 | |
---|---|
aColor | The logical colour for the brush. |
IMPORT_C void | SetPenColor | ( | CGraphicsContext & | aGc, |
TLogicalRgb | aColor | |||
) | const |
Sets the pen colour. The pen is used to draw lines, the outlines of filled shapes, and text.
See also: CGraphicsContext::SetPenColor()
Parameters | |
---|---|
aColor | The logical colour for the pen. |
Convert a system colour index to a system colour, using or modifying the supplied default colour if desired.
IMPORT_C TRgb | SystemColor | ( | TLogicalRgb | aColor | ) | 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 | |
---|---|
aColor | The logical colour to translate. |