MTmSource Class Reference

class MTmSource : public MTmCustom

WARNING: this Class is for internal use ONLY. Compatibility is not guaranteed in future releases. MTmSource is an interface class that must be implemented by users of CTmTextLayout to provide text content and attributes. MTmSource is derived from MTmCustom, which contains the functions to customise the layout and display, so that this can be done in CTmText without affecting the content.

Inherits from

Public Member Functions
TInt DocumentLength()
MGraphicsDeviceMap &FormatDevice()
IMPORT_C TAny *GetExtendedInterface(const TUid &)
IMPORT_C TBoolGetLineBreakL(const TDesC &, TInt, TInt, TInt, TBool, TInt &, TInt &, TInt &)
voidGetParagraphFormatL(TInt, RTmParFormat &)
IMPORT_C TIntGetPictureSizeInTwipsL(TInt, TSize &)
IMPORT_C voidGetStandardLineBreak(const TDesC &, TInt, TInt, TInt &, TInt &)
voidGetText(TInt, TPtrC &, TTmCharFormat &)
MGraphicsDeviceMap &InterpretDevice()
IMPORT_C voidMTmSource_Reserved_1()
IMPORT_C voidMTmSource_Reserved_2()
IMPORT_C TBoolPageBreakInRange(TInt, TInt)
IMPORT_C TIntParagraphEnd(TInt)
TInt ParagraphStart(TInt)
IMPORT_C CPicture *PictureL(TInt)
Inherited Functions
MLineBreaker::ExtendedInterface(TUid &)const
MLineBreaker::GetLineBreak(const TDesC16 &,TInt,TInt,TBool,MContingentLineBreaker *,TInt &,TInt &)const
MLineBreaker::GetLineBreakL(const TDesC16 &,TInt,TInt,TBool,MContingentLineBreakerL *,TInt &,TInt &)const
MTmCustom::DrawBackground(CGraphicsContext &,const TPoint &,const TRect &,const TLogicalRgb &,TRect &)const
MTmCustom::DrawLineGraphics(CGraphicsContext &,const TPoint &,const TRect &,const TTmLineInfo &)const
MTmCustom::DrawPicture(CGraphicsContext &,const TPoint &,const TRect &,MGraphicsDeviceMap &,const CPicture &)const
MTmCustom::DrawText(CGraphicsContext &,const TPoint &,const TRect &,const TTmLineInfo &,const TTmCharFormat &,const TDesC &,const TPoint &,TInt)const
MTmCustom::GetLineBreakInContext(const TDesC &,TInt,TInt,TBool,TInt &)const
MTmCustom::IsHangingCharacter(TUint)const
MTmCustom::LineBreakClass(TUint,TUint &,TUint &)const
MTmCustom::LineBreakPossible(TUint,TUint,TBool)const
MTmCustom::Map(TUint)const
MTmCustom::SetBrushColor(CGraphicsContext &,TLogicalRgb)const
MTmCustom::SetLineHeight(const TLineHeightParam &,TInt &,TInt &)const
MTmCustom::SetPenColor(CGraphicsContext &,TLogicalRgb)const
MTmCustom::Stretch(TUint)const
MTmCustom::SystemColor(TLogicalRgb)const
MTmCustom::SystemColor(TUint,TRgb)const
Public Member Enumerations
enumanonymous { ELineBreakContext = 32 }
enumTLabelType { ENoLabel, EParLabel }
Inherited Enumerations
MLineBreaker:@126
MTmCustom:@128

Member Functions Documentation

DocumentLength()

TInt DocumentLength()const [pure virtual]

Return the length of the document in characters.

FormatDevice()

MGraphicsDeviceMap &FormatDevice()const [pure virtual]

Return the device used to format the text.

GetExtendedInterface(const TUid &)

IMPORT_C TAny *GetExtendedInterface(const TUid &aInterfaceId)[virtual]

Parameters

const TUid & aInterfaceId

GetLineBreakL(const TDesC &, TInt, TInt, TInt, TBool, TInt &, TInt &, TInt &)

IMPORT_C TBoolGetLineBreakL(const TDesC &aText,
TIntaDocPos,
TIntaMinBreakPos,
TIntaMaxBreakPos,
TBoolaForwards,
TInt &aBreakPos,
TInt &aHangingChars,
TInt &aBreakPosAfterSpaces
)const

Parameters

const TDesC & aText
TInt aDocPos
TInt aMinBreakPos
TInt aMaxBreakPos
TBool aForwards
TInt & aBreakPos
TInt & aHangingChars
TInt & aBreakPosAfterSpaces

GetParagraphFormatL(TInt, RTmParFormat &)

voidGetParagraphFormatL(TIntaPos,
RTmParFormat &aFormat
)const [pure virtual]

Return the paragraph format of the paragraph containing aPos. End-of-paragraph characters belong to the preceding paragraph.

Parameters

TInt aPos
RTmParFormat & aFormat

GetPictureSizeInTwipsL(TInt, TSize &)

IMPORT_C TIntGetPictureSizeInTwipsL(TIntaPos,
TSize &aSize
)const [virtual]

Parameters

TInt aPos
TSize & aSize

GetStandardLineBreak(const TDesC &, TInt, TInt, TInt &, TInt &)

IMPORT_C voidGetStandardLineBreak(const TDesC &aText,
TIntaMinBreakPos,
TIntaMaxBreakPos,
TInt &aBreakPos,
TInt &aNextLineStart
)[static]

Parameters

const TDesC & aText
TInt aMinBreakPos
TInt aMaxBreakPos
TInt & aBreakPos
TInt & aNextLineStart

GetText(TInt, TPtrC &, TTmCharFormat &)

voidGetText(TIntaPos,
TPtrC &aText,
TTmCharFormat &aFormat
)const [pure virtual]

Return at least one character of text, but preferably as many as possible, starting at aPos. Put its character format in aFormat. The text must be a run of characters sharing the same character format.

Parameters

TInt aPos
TPtrC & aText
TTmCharFormat & aFormat

InterpretDevice()

MGraphicsDeviceMap &InterpretDevice()const [pure virtual]

Return the device used to draw the text and when converting between x-y coordinates and document positions. If the formatting and interpreting devices are different, text is scaled appropriately when it is drawn; this allows text to be formatted for printer fonts and displayed on the screen, giving a wysiwyg print preview.

MTmSource_Reserved_1()

IMPORT_C voidMTmSource_Reserved_1()[virtual]

MTmSource_Reserved_2()

IMPORT_C voidMTmSource_Reserved_2()[virtual]

PageBreakInRange(TInt, TInt)

IMPORT_C TBoolPageBreakInRange(TIntaStartPos,
TIntaEndPos
)const [virtual]

Parameters

TInt aStartPos
TInt aEndPos

ParagraphEnd(TInt)

IMPORT_C TIntParagraphEnd(TIntaPos)const

Parameters

TInt aPos

ParagraphStart(TInt)

TInt ParagraphStart(TIntaPos)const [pure virtual]

Return the document position of the start of the paragraph containing aPos. End-of-paragraph characters belong to the preceding paragraph.

Parameters

TInt aPos

PictureL(TInt)

IMPORT_C CPicture *PictureL(TIntaPos)const [virtual]

Parameters

TInt aPos

Member Enumerations Documentation

Enum anonymous

Enumerators

ELineBreakContext = 32

The maximum number of characters supplied to GetLineBreak, after aMaxBreakPos, and after trailing whitespace, to provide context for line breaking decisions.

Enum TLabelType

Label type used in LabelModeSelect

Enumerators

ENoLabel

Not a label; used for TLabelTypes not yet assigned.

EParLabel

Paragraph label of the type supported by FORM.