class CGlobalText : public CPlainText |
Text with globally applied formatting.
Global text uses a single set of paragraph format attributes to describe the appearance of every paragraph and a single set of character format attributes to describe the appearance of every character.
The paragraph formatting is stored in a CParaFormatLayer and the character formatting is stored in a CCharFormatLayer. A format layer is a set of character or paragraph format attributes, which may own a pointer to another format layer. This pointer is called a based-on link. The effective formatting of a global text object is the set of attributes specified in its two format layers, as well as any attributes inherited from the layers' chain of based-on links. To get the effective formatting, the links are read in turn, so that each attribute's value is taken from the first layer in the chain in which it has been set. Use GetCharFormat() and GetParaFormatL() to get the text object's effective formatting.
A global text object references the two format layers; it does not own them. This allows more than one global text object to use the same formatting. The format layers may be modified (see ApplyParaFormatL() and ApplyCharFormatL()) or replaced (see SetGlobalParaFormat() and SetGlobalCharFormat()) during the text object's lifetime.
Protected Member Functions | |
---|---|
CGlobalText() | |
CGlobalText(const CParaFormatLayer *, const CCharFormatLayer *) |
Private Member Functions | |
---|---|
CGlobalText(const CGlobalText &) | |
CGlobalText & | operator=(const CGlobalText &) |
Protected Attributes | |
---|---|
__DECLARE_TEST | |
const CCharFormatLayer * | iGlobalCharFormatLayer |
const CParaFormatLayer * | iGlobalParaFormatLayer |
Private Attributes | |
---|---|
void * | iReserved_2 |
Inherited Attributes | |
---|---|
CEditableText::iHasChanged | |
CPlainText::iByteStore | |
CPlainText::iFieldFactory | |
CPlainText::iFieldSet | |
CPlainText::iPageTable |
IMPORT_C | CGlobalText | ( | const CParaFormatLayer * | aGlobalParaLayer, |
const CCharFormatLayer * | aGlobalCharLayer | |||
) | [protected] |
const CParaFormatLayer * aGlobalParaLayer | |
const CCharFormatLayer * aGlobalCharLayer |
CGlobalText | ( | const CGlobalText & | aGlobalText | ) | [private] |
const CGlobalText & aGlobalText |
IMPORT_C void | ApplyCharFormatL | ( | const TCharFormat & | aFormat, |
const TCharFormatMask & | aMask, | |||
TInt | aPos, | |||
TInt | aLength | |||
) | [virtual] |
const TCharFormat & aFormat | |
const TCharFormatMask & aMask | |
TInt aPos | |
TInt aLength |
IMPORT_C void | ApplyParaFormatL | ( | const CParaFormat * | aFormat, |
const TParaFormatMask & | aMask, | |||
TInt | aPos, | |||
TInt | aLength | |||
) | [virtual] |
const CParaFormat * aFormat | |
const TParaFormatMask & aMask | |
TInt aPos | |
TInt aLength |
IMPORT_C TBool | EnquirePageBreak | ( | TInt | aPos, |
TInt | aLength = 0 | |||
) | const [virtual] |
IMPORT_C void | GetCharFormat | ( | TCharFormat & | aFormat, |
TCharFormatMask & | aVaries, | |||
TInt | aPos, | |||
TInt | aLength | |||
) | const [virtual] |
TCharFormat & aFormat | |
TCharFormatMask & aVaries | |
TInt aPos | |
TInt aLength |
IMPORT_C void | GetChars | ( | TPtrC & | aView, |
TCharFormat & | aFormat, | |||
TInt | aStartPos | |||
) | const [virtual] |
TPtrC & aView | |
TCharFormat & aFormat | |
TInt aStartPos |
IMPORT_C void | GetParaFormatL | ( | CParaFormat * | aFormat, |
TParaFormatMask & | aVaries, | |||
TInt | aPos, | |||
TInt | aLength, | |||
CParaFormat::TParaFormatGetMode | aMode = CParaFormat::EAllAttributes | |||
) | const [virtual] |
CParaFormat * aFormat | |
TParaFormatMask & aVaries | |
TInt aPos | |
TInt aLength | |
CParaFormat::TParaFormatGetMode aMode = CParaFormat::EAllAttributes |
IMPORT_C void | GetParagraphFormatL | ( | CParaFormat * | aFormat, |
TInt | aPos | |||
) | const [virtual] |
CParaFormat * aFormat | |
TInt aPos |
IMPORT_C TInt | GetPictureSizeInTwips | ( | TSize & | aSize, |
TInt | aPos | |||
) | const [virtual] |
const CCharFormatLayer * | GlobalCharFormatLayer | ( | ) | const [inline] |
Gets the character format layer referenced by the global text object.
Pointer to the character format layer referenced by the global text object.
const CParaFormatLayer * | GlobalParaFormatLayer | ( | ) | const [inline] |
Gets the paragraph format layer referenced by the global text object.
Pointer to the paragraph format layer referenced by the global text object.
IMPORT_C TInt | LdToParagraphStart | ( | TInt & | aCurrentPos | ) | const [virtual] |
TInt & aCurrentPos |
IMPORT_C CGlobalText * | NewL | ( | const CParaFormatLayer * | aGlobalParaLayer, |
const CCharFormatLayer * | aGlobalCharLayer, | |||
TDocumentStorage | aStorage = ESegmentedStorage, | |||
TInt | aDefaultTextGranularity = EDefaultTextGranularity | |||
) | [static] |
const CParaFormatLayer * aGlobalParaLayer | |
const CCharFormatLayer * aGlobalCharLayer | |
TDocumentStorage aStorage = ESegmentedStorage | |
TInt aDefaultTextGranularity = EDefaultTextGranularity |
IMPORT_C CGlobalText * | NewL | ( | const CStreamStore & | aStore, |
TStreamId | aStreamId, | |||
const CParaFormatLayer * | aGlobalParaLayer, | |||
const CCharFormatLayer * | aGlobalCharLayer, | |||
MTextFieldFactory * | aFieldFactory = NULL, | |||
TDocumentStorage | = ESegmentedStorage | |||
) | [static] |
const CStreamStore & aStore | |
TStreamId aStreamId | |
const CParaFormatLayer * aGlobalParaLayer | |
const CCharFormatLayer * aGlobalCharLayer | |
MTextFieldFactory * aFieldFactory = NULL | |
TDocumentStorage = ESegmentedStorage |
IMPORT_C CPicture * | PictureHandleL | ( | TInt | aPos, |
MLayDoc::TForcePictureLoad | aForceLoad | |||
) | const [virtual] |
TInt aPos | |
MLayDoc::TForcePictureLoad aForceLoad |
IMPORT_C TBool | SelectParagraphLabel | ( | TInt | aPos | ) | [virtual] |
TInt aPos |
IMPORT_C void | SetGlobalCharFormat | ( | const CCharFormatLayer * | aCharFormatLayer | ) |
const CCharFormatLayer * aCharFormatLayer |
IMPORT_C void | SetGlobalParaFormat | ( | const CParaFormatLayer * | aParaFormatLayer | ) |
const CParaFormatLayer * aParaFormatLayer |
CGlobalText & | operator= | ( | const CGlobalText & | aGlobalText | ) | [private] |
const CGlobalText & aGlobalText |
const CCharFormatLayer * | iGlobalCharFormatLayer | [protected] |
const CParaFormatLayer * | iGlobalParaFormatLayer | [protected] |