Location:
TXTMFMTX.H
class MFormatText;
Specifies the mixin protocol for getting and setting character and paragraph format attributes.
It is inherited by classes which support character and paragraph formatting, e.g. CRichText
and CGlobalText
. Its purpose is to allow developers to apply and retrieve formatting without needing to know which type of editable text
is involved.
All functions defined in this class use a document position and a length. These values are only relevant to rich text. In general, they must be valid (i.e. the range must not extend beyond the bounds of the document), or a panic occurs. In global text, formatting is applied globally, so that the length and position values are ignored.
Defined in MFormatText
:
ApplyCharFormatL()
, ApplyParaFormatL()
, GetCharFormat()
, GetParaFormatL()
virtual void GetParaFormatL(CParaFormat *aFormat, TParaFormatMask &aVaries, TInt aPos, TInt aLength, CParaFormat::TParaFormatGetMode
aMode=CParaFormat::EAllAttributes) const=0;
Gets the effective paragraph formatting which applies to a range of paragraphs. Also gets a bit mask which indicates which values change over the region, and whose value is therefore indeterminate.
|
virtual void ApplyParaFormatL(const CParaFormat *aFormat, const TParaFormatMask &aMask, TInt aPos, TInt aLength)=0;
Applies paragraph formatting to a range of paragraphs. The attributes which are set in the mask are taken from aFormat and applied. The attributes which are not set in the mask are not applied.
|
virtual void GetCharFormat(TCharFormat &aFormat, TCharFormatMask &aVaries, TInt aPos, TInt aLength) const=0;
Gets the effective character formatting which applies to a range of characters. Also gets a bit mask which indicates which values change over the region, and whose value is therefore indeterminate.
|
virtual void ApplyCharFormatL(const TCharFormat &aFormat, const TCharFormatMask &aMask, TInt aPos, TInt aLength)=0;
Applies character formatting to a range of characters. The attributes which are set in the mask are taken from aFormat and applied. The attributes which are not set in the mask are not applied.
|