MTmCustom Class Reference

class MTmCustom : public MLineBreaker

The text customization interface. You can customize the colors, word spacing, line breaking, line height calculation, background drawing, and text appearance, of a text object by supplying an implementation of the MTmCustom class, either directly (as in CTmText::CustomizeL, which takes a pointer to MTmCustom) or indirectly, making use of the fact that MTmSource is derived from MTmCustom (as in CTmTextLayout::SetTextL, which takes a reference to MTmSource).

Inherits from

Nested Classes and Structures

Public Member Functions
IMPORT_C voidDrawBackground(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb &, TRect &)
IMPORT_C voidDrawLineGraphics(CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &)
IMPORT_C voidDrawPicture(CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap &, const CPicture &)
IMPORT_C voidDrawText(CGraphicsContext &, const TPoint &, const TRect &, const TTmLineInfo &, const TTmCharFormat &, const TDesC &, const TPoint &, TInt)
IMPORT_C TBoolGetLineBreakInContext(const TDesC &, TInt, TInt, TBool, TInt &)
IMPORT_C TBoolIsHangingCharacter(TUint)
IMPORT_C TUintLineBreakClass(TUint, TUint &, TUint &)
IMPORT_C TBoolLineBreakPossible(TUint, TUint, TBool)
IMPORT_C TUintMap(TUint)
IMPORT_C voidSetBrushColor(CGraphicsContext &, TLogicalRgb)
IMPORT_C voidSetLineHeight(const TLineHeightParam &, TInt &, TInt &)
IMPORT_C voidSetPenColor(CGraphicsContext &, TLogicalRgb)
IMPORT_C TIntStretch(TUint)
IMPORT_C TRgbSystemColor(TUint, TRgb)
IMPORT_C TRgbSystemColor(TLogicalRgb)
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
Public Member Enumerations
enumanonymous {
EOpLineBreakClass, EClLineBreakClass, EQuLineBreakClass, EGlLineBreakClass, ENsLineBreakClass, EExLineBreakClass, ESyLineBreakClass, EIsLineBreakClass, EPrLineBreakClass, EPoLineBreakClass, ENuLineBreakClass, EAlLineBreakClass, EIdLineBreakClass, EInLineBreakClass, EHyLineBreakClass, EBaLineBreakClass, EBbLineBreakClass, EB2LineBreakClass, EZwLineBreakClass, ECmLineBreakClass, EBkLineBreakClass, ECrLineBreakClass, ELfLineBreakClass, ESgLineBreakClass, ECbLineBreakClass, ESpLineBreakClass, ESaLineBreakClass, EAiLineBreakClass, EXxLineBreakClass, ELineBreakClasses
}
Inherited Enumerations
MLineBreaker:@126

Member Functions Documentation

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

IMPORT_C voidDrawBackground(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

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

IMPORT_C voidDrawLineGraphics(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 &)

IMPORT_C voidDrawPicture(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

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

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

Parameters

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

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

IMPORT_C TBoolGetLineBreakInContext(const TDesC &aText,
TIntaMinBreakPos,
TIntaMaxBreakPos,
TBoolaForwards,
TInt &aBreakPos
)const [virtual]

Parameters

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

IsHangingCharacter(TUint)

IMPORT_C TBoolIsHangingCharacter(TUintaChar)const [virtual]

Parameters

TUint aChar

LineBreakClass(TUint, TUint &, TUint &)

IMPORT_C TUintLineBreakClass(TUintaCode,
TUint &aRangeStart,
TUint &aRangeEnd
)const [virtual]

Parameters

TUint aCode
TUint & aRangeStart
TUint & aRangeEnd

LineBreakPossible(TUint, TUint, TBool)

IMPORT_C TBoolLineBreakPossible(TUintaPrevClass,
TUintaNextClass,
TBoolaHaveSpaces
)const [virtual]

Parameters

TUint aPrevClass
TUint aNextClass
TBool aHaveSpaces

Map(TUint)

IMPORT_C TUintMap(TUintaChar)const [virtual]

Parameters

TUint aChar

SetBrushColor(CGraphicsContext &, TLogicalRgb)

IMPORT_C voidSetBrushColor(CGraphicsContext &aGc,
TLogicalRgbaColor
)const

Parameters

CGraphicsContext & aGc
TLogicalRgb aColor

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

IMPORT_C voidSetLineHeight(const TLineHeightParam &aParam,
TInt &aAscent,
TInt &aDescent
)const [virtual]

Parameters

const TLineHeightParam & aParam
TInt & aAscent
TInt & aDescent

SetPenColor(CGraphicsContext &, TLogicalRgb)

IMPORT_C voidSetPenColor(CGraphicsContext &aGc,
TLogicalRgbaColor
)const

Parameters

CGraphicsContext & aGc
TLogicalRgb aColor

Stretch(TUint)

IMPORT_C TIntStretch(TUintaChar)const [virtual]

Parameters

TUint aChar

SystemColor(TUint, TRgb)

IMPORT_C TRgbSystemColor(TUintaColorIndex,
TRgbaDefaultColor
)const [virtual]

Parameters

TUint aColorIndex
TRgb aDefaultColor

SystemColor(TLogicalRgb)

IMPORT_C TRgbSystemColor(TLogicalRgbaColor)const

Parameters

TLogicalRgb aColor

Member Enumerations Documentation

Enum anonymous

The Unicode line breaking classes; see Unicode Technical Report 14. Not a named enumerated type, so that overriding applications can add new line breaking classes freely. The description of each constant gives the name of the line-breaking class, an example and a brief, imprecise description of the default behaviour of characters of that class.

Enumerators

EOpLineBreakClass

Opening Punctuation (e.g. '['). Breaking after prohibited.

EClLineBreakClass

Closing Punctuation (e.g. ']'). Breaking before prohibited.

EQuLineBreakClass

Ambiguous Quotes (e.g. '"'). Breaking before and after prohibited.

EGlLineBreakClass

Glue (e.g. Non-breaking space). Breaking before and after prohibited unless spaces are present.

ENsLineBreakClass

Non-Starter (e.g. small Japanese kana). Breaking before prohibited if no spaces present.

EExLineBreakClass

Exclamation or Interrogation (e.g. '?'). Like closing punctuation except before Postfix or Non-starter.

ESyLineBreakClass

Symbol (e.g. '/'. Like Alphabetic, but allows breaking before Alphabetic.

EIsLineBreakClass

Numeric Infix Separator (e.g. ','). Forbids breaking after any and before Numeric.

EPrLineBreakClass

Numeric Prefix (e.g. '$'). Forbids breaking before Numeric.

EPoLineBreakClass

Numeric Postfix (e.g. ''). Forbids breaking after Numeric.

ENuLineBreakClass

Numeric (e.g. '1').

EAlLineBreakClass

Alphabetic (e.g. 'a').

EIdLineBreakClass

Ideographic (e.g. Japanese Kanji). Generally break before or after

EInLineBreakClass

Inseparable (e.g. ellipsis). Forbid breaks between Inseparables.

EHyLineBreakClass

Hyphen (e.g. '-'). Allows a break after except before Numeric.

EBaLineBreakClass

Break After. Generally allow a break after. Breaking between Break Afters not separated by spaces is prohibited.

EBbLineBreakClass

Break Before. Generally allow a break before. Breaking between Break Befores not separated by spaces is prohibited.

EB2LineBreakClass

Break Before and After. Generally allow a break before or after. Breaking between Break Before and Afters is prohibited, even if spaces are present.

EZwLineBreakClass

Zero-Width Space. Allow a break.

ECmLineBreakClass

Combining Mark. Takes on the class of its base class.

EBkLineBreakClass

Mandatory Break.

ECrLineBreakClass

Carriage Return. Break after unless part of a CRLF pair.

ELfLineBreakClass

Line Feed. Break after.

ESgLineBreakClass

Surrogate. Half of a surrogate pair.

ECbLineBreakClass

Contingent Break (e.g. embedded pictures). Uses external information

ESpLineBreakClass

Space. Intervening characters of class Space are indicated by aHaveSpaces in LineBreakPossible.

ESaLineBreakClass

Complex Context (e.g. Thai). Runs of Complex Context are passed to GetLineBreakInContext.

EAiLineBreakClass

Ambiguous. Characters of ambiguous East Asian width are treated as Alphabetic, unless they are resolved as being "Wide", in which case they are treated as Ideographic.

EXxLineBreakClass

The Xx class is used when the class is unknown; e.g.; outside the provided context.

ELineBreakClasses

The number of Unicode line break classes.