TLayDocTextSource Class Reference

class TLayDocTextSource : public MTmSource

Internal to Symbian

Inherits from

Public Member Functions
TLayDocTextSource ()
TBool CanMap ()
TInt DocumentLength ()
void DrawBackground ( CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb &, TRect &)
void DrawLine ( CGraphicsContext &, const TPoint &, const TPoint &)
void DrawLineGraphics ( CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &)
void DrawPicture ( CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap &, const CPicture &)
void DrawRect ( CGraphicsContext &, const TRect &)
void DrawText ( CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &, const TTmCharFormat &, const TDesC &, const TPoint &, TInt )
void DrawText ( CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &, const TTmCharFormat &, const TDesC &, const TInt , const TInt , const TPoint &, TInt )
void DrawText ( CGraphicsContext &, const TDesC &, const TPoint &)
MGraphicsDeviceMap & FormatDevice ()
TAny * GetExtendedInterface (const TUid &)
TBool GetLineBreakInContext (const TDesC &, TInt , TInt , TBool , TInt &)
void GetParagraphFormatL ( TInt , RTmParFormat &)
TInt GetPictureSizeInTwipsL ( TInt , TSize &)
void GetText ( TInt , TPtrC &, TTmCharFormat &)
MGraphicsDeviceMap & InterpretDevice ()
TBool IsHangingCharacter ( TUint )
void LabelMetrics ( TLabelType , TSize &, TInt &)
void LabelModeCancel ()
TBool LabelModeSelect ( TLabelType , TInt )
TUint LineBreakClass ( TUint , TUint &, TUint &)
TBool LineBreakPossible ( TUint , TUint , TBool )
TUint Map ( TUint )
TBool PageBreakInRange ( TInt , TInt )
TInt ParagraphStart ( TInt )
CPicture * PictureL ( TInt )
void ResetOpaque ( CGraphicsContext &)
void SetLineHeight (const TLineHeightParam &, TInt &, TInt &)
void SetOpaque ( CGraphicsContext &)
TRgb SystemColor ( TUint , TRgb )
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::SetBrushColor(CGraphicsContext &,TLogicalRgb)const
MTmCustom::SetPenColor(CGraphicsContext &,TLogicalRgb)const
MTmCustom::Stretch(TUint)const
MTmCustom::SystemColor(TLogicalRgb)const
MTmSource::GetLineBreakL(const TDesC &,TInt,TInt,TInt,TBool,TInt &,TInt &,TInt &)const
MTmSource::GetStandardLineBreak(const TDesC &,TInt,TInt,TInt &,TInt &)
MTmSource::MTmSource_Reserved_1()
MTmSource::MTmSource_Reserved_2()
MTmSource::ParagraphEnd(TInt)const
Public Member Enumerations
enum anonymous { EDefaultFontHeightIncreaseFactor  = 7, EDefaultMinimumLineDescent  = 3 }
enum anonymous { EWrap  = 1, ETruncateWithEllipsis  = 2, EUseLabelsDevice  = 4 }
Inherited Enumerations
MLineBreaker:@68
MTmCustom:@70
MTmSource:@73
MTmSource:TLabelType
Public Attributes
const MFormCustomDraw * iCustomDraw
const MFormCustomWrap * iCustomWrap
TBool iDrawOpaque
TChar iEllipsis
TInt iExcessHeightRequired
TUint iFlags
TInt iFontHeightIncreaseFactor
const MFormParam * iFormParam
MGraphicsDeviceMap * iFormatDevice
CLayoutData::TFormatMode iFormatMode
MGraphicsDeviceMap * iImageDevice
MFormCustomInterfaceProvider * iInterfaceProvider
MFormCustomInvisibleCharacterRemapper * iInvisibleCharacterRemapper
MGraphicsDeviceMap * iLabelsDevice
TInt iLabelsGutter
TInt iLabelsWidth
MLayDoc * iLayDoc
TInt iMinimumLineDescent
TNonPrintingCharVisibility iNonPrintingCharVisibility
TInt iWidth

Constructor & Destructor Documentation

TLayDocTextSource()

TLayDocTextSource ( )

Member Functions Documentation

CanMap()

TBool CanMap ( ) const

DocumentLength()

TInt DocumentLength ( ) const [virtual]

Return the length of the document in characters.

DrawBackground(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb &, TRect &)

void DrawBackground ( CGraphicsContext & aGc,
const TPoint & aTextLayoutTopLeft,
const TRect & aRect,
const TLogicalRgb & aBackground,
TRect & aRectDrawn
) const [virtual]

Parameters

CGraphicsContext & aGc
const TPoint & aTextLayoutTopLeft
const TRect & aRect
const TLogicalRgb & aBackground
TRect & aRectDrawn

DrawLine(CGraphicsContext &, const TPoint &, const TPoint &)

void DrawLine ( CGraphicsContext & aGc,
const TPoint & aPt1,
const TPoint & aPt2
) const [virtual]

Draws a line. Implements MTmTextDrawExt::DrawLine() . If the opaque drawing mode is active, then the line color will stay unchanged (it will not be alpha-blended in a case of a transparent window).

Parameters

CGraphicsContext & aGc A reference to a graphics context. If the drawing mode is opaque, then this is a CWindowGc reference.
const TPoint & aPt1 Line start point
const TPoint & aPt2 Line end point

DrawLineGraphics(CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &)

void DrawLineGraphics ( CGraphicsContext & aGc,
const TPoint & aTextLayoutTopLeft,
const TRect & aRect,
const TTmLineInfo & aLineInfo
) const [virtual]

Parameters

CGraphicsContext & aGc
const TPoint & aTextLayoutTopLeft
const TRect & aRect
const TTmLineInfo & aLineInfo

DrawPicture(CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap &, const CPicture &)

void DrawPicture ( CGraphicsContext & aGc,
const TPoint & aTextLayoutTopLeft,
const TRect & aRect,
MGraphicsDeviceMap & aDevice,
const CPicture & aPicture
) const [virtual]

Parameters

CGraphicsContext & aGc
const TPoint & aTextLayoutTopLeft
const TRect & aRect
MGraphicsDeviceMap & aDevice
const CPicture & aPicture

DrawRect(CGraphicsContext &, const TRect &)

void DrawRect ( CGraphicsContext & aGc,
const TRect & aRc
) const [virtual]

Draws a rectangle. Implements MTmTextDrawExt::DrawRect() . If the opaque drawing mode is active, then the rectabgle color will stay unchanged (it will not be alpha-blended in a case of a transparent window).

Parameters

CGraphicsContext & aGc A reference to a graphics context. If the drawing mode is opaqe, then this is a CWindowGc reference.
const TRect & aRc Rectangle coordinates

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

void DrawText ( CGraphicsContext & aGc,
const TPoint & aTextLayoutTopLeft,
const TRect & aRect,
const TTmLineInfo & aLineInfo,
const TTmCharFormat & aFormat,
const TDesC & aText,
const TPoint & aTextOrigin,
TInt aExtraPixels
) const [virtual]

Parameters

CGraphicsContext & aGc
const TPoint & aTextLayoutTopLeft
const TRect & aRect
const TTmLineInfo & aLineInfo
const TTmCharFormat & aFormat
const TDesC & aText
const TPoint & aTextOrigin
TInt aExtraPixels

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

void DrawText ( CGraphicsContext & aGc,
const TPoint & aTextLayoutTopLeft,
const TRect & aRect,
const TTmLineInfo & aLineInfo,
const TTmCharFormat & aFormat,
const TDesC & aText,
const TInt aStart,
const TInt aEnd,
const TPoint & aTextOrigin,
TInt aExtraPixels
) const

Parameters

CGraphicsContext & aGc
const TPoint & aTextLayoutTopLeft
const TRect & aRect
const TTmLineInfo & aLineInfo
const TTmCharFormat & aFormat
const TDesC & aText
const TInt aStart
const TInt aEnd
const TPoint & aTextOrigin
TInt aExtraPixels

DrawText(CGraphicsContext &, const TDesC &, const TPoint &)

void DrawText ( CGraphicsContext & aGc,
const TDesC & aText,
const TPoint & aPt
) const [virtual]

Draws a text. Implements MTmTextDrawExt::DrawText() . If the opaque drawing mode is active, then the text color will stay unchanged (it will not be alpha-blended in a case of a transparent window).

Parameters

CGraphicsContext & aGc A reference to a graphics context. If the drawing mode is opaqe, then this is a CWindowGc reference.
const TDesC & aText
const TPoint & aPt

FormatDevice()

MGraphicsDeviceMap & FormatDevice ( ) const [virtual]

Return the device used to format the text.

GetExtendedInterface(const TUid &)

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

This method is responsible for discovering interface extension objects requried by Form for the specified interface Uid.

Parameters

const TUid & aInterfaceId Identifier for the optional interface requried.

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

TBool GetLineBreakInContext ( const TDesC & aText,
TInt aMinBreakPos,
TInt aMaxBreakPos,
TBool aForwards,
TInt & aBreakPos
) const [virtual]

Parameters

const TDesC & aText
TInt aMinBreakPos
TInt aMaxBreakPos
TBool aForwards
TInt & aBreakPos

GetParagraphFormatL(TInt, RTmParFormat &)

void GetParagraphFormatL ( TInt aPos,
RTmParFormat & aFormat
) const [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 &)

TInt GetPictureSizeInTwipsL ( TInt aPos,
TSize & aSize
) const [virtual]

Parameters

TInt aPos
TSize & aSize

GetText(TInt, TPtrC &, TTmCharFormat &)

void GetText ( TInt aPos,
TPtrC & aText,
TTmCharFormat & aFormat
) const [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 [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.

IsHangingCharacter(TUint)

TBool IsHangingCharacter ( TUint aChar ) const [virtual]

Parameters

TUint aChar

LabelMetrics(TLabelType, TSize &, TInt &)

void LabelMetrics ( TLabelType aType,
TSize & aLabelSize,
TInt & aMarginSize
) const

Parameters

TLabelType aType
TSize & aLabelSize
TInt & aMarginSize

LabelModeCancel()

void LabelModeCancel ( )

LabelModeSelect(TLabelType, TInt)

TBool LabelModeSelect ( TLabelType aType,
TInt aPos
)

Parameters

TLabelType aType
TInt aPos

LineBreakClass(TUint, TUint &, TUint &)

TUint LineBreakClass ( TUint aCode,
TUint & aRangeStart,
TUint & aRangeEnd
) const [virtual]

Parameters

TUint aCode
TUint & aRangeStart
TUint & aRangeEnd

LineBreakPossible(TUint, TUint, TBool)

TBool LineBreakPossible ( TUint aPrevClass,
TUint aNextClass,
TBool aHaveSpaces
) const [virtual]

Parameters

TUint aPrevClass
TUint aNextClass
TBool aHaveSpaces

Map(TUint)

TUint Map ( TUint aChar ) const [virtual]

Parameters

TUint aChar

PageBreakInRange(TInt, TInt)

TBool PageBreakInRange ( TInt aStartPos,
TInt aEndPos
) const [virtual]

Parameters

TInt aStartPos
TInt aEndPos

ParagraphStart(TInt)

TInt ParagraphStart ( TInt aPos ) const [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)

CPicture * PictureL ( TInt aPos ) const [virtual]

Parameters

TInt aPos

ResetOpaque(CGraphicsContext &)

void ResetOpaque ( CGraphicsContext & aGc ) const

Resets opaque drawing mode.

Parameters

CGraphicsContext & aGc A reference to a graphics context. If the drawing mode is opaqe, then this is a CWindowGc reference.

SetLineHeight(const TLineHeightParam &, TInt &, TInt &)

void SetLineHeight ( const TLineHeightParam & aParam,
TInt & aAscent,
TInt & aDescent
) const [virtual]

Parameters

const TLineHeightParam & aParam
TInt & aAscent
TInt & aDescent

SetOpaque(CGraphicsContext &)

void SetOpaque ( CGraphicsContext & aGc ) const

Sets opaque drawing mode.

Parameters

CGraphicsContext & aGc A reference to a graphics context. If the drawing mode is opaqe, then this is a CWindowGc reference.

SystemColor(TUint, TRgb)

TRgb SystemColor ( TUint aColorIndex,
TRgb aDefaultColor
) const [virtual]

Parameters

TUint aColorIndex
TRgb aDefaultColor

Member Enumerations Documentation

Enum anonymous

Enumerators

EDefaultFontHeightIncreaseFactor = 7
EDefaultMinimumLineDescent = 3

Enum anonymous

Enumerators

EWrap = 1
ETruncateWithEllipsis = 2
EUseLabelsDevice = 4

Member Data Documentation

const MFormCustomDraw * iCustomDraw

const MFormCustomDraw * iCustomDraw

const MFormCustomWrap * iCustomWrap

const MFormCustomWrap * iCustomWrap

TBool iDrawOpaque

TBool iDrawOpaque

TChar iEllipsis

TChar iEllipsis

TInt iExcessHeightRequired

TInt iExcessHeightRequired

TUint iFlags

TUint iFlags

TInt iFontHeightIncreaseFactor

TInt iFontHeightIncreaseFactor

const MFormParam * iFormParam

const MFormParam * iFormParam

MGraphicsDeviceMap * iFormatDevice

MGraphicsDeviceMap * iFormatDevice

CLayoutData::TFormatMode iFormatMode

CLayoutData::TFormatMode iFormatMode

MGraphicsDeviceMap * iImageDevice

MGraphicsDeviceMap * iImageDevice

MFormCustomInterfaceProvider * iInterfaceProvider

MFormCustomInterfaceProvider * iInterfaceProvider

Optional object able to provide a concrete customisation object for use internally by Form.

MFormCustomInvisibleCharacterRemapper * iInvisibleCharacterRemapper

MFormCustomInvisibleCharacterRemapper * iInvisibleCharacterRemapper

MGraphicsDeviceMap * iLabelsDevice

MGraphicsDeviceMap * iLabelsDevice

TInt iLabelsGutter

TInt iLabelsGutter

TInt iLabelsWidth

TInt iLabelsWidth

MLayDoc * iLayDoc

MLayDoc * iLayDoc

TInt iMinimumLineDescent

TInt iMinimumLineDescent

TNonPrintingCharVisibility iNonPrintingCharVisibility

TNonPrintingCharVisibility iNonPrintingCharVisibility

TInt iWidth

TInt iWidth