Location:
TXTGLOBL.H
Link against: etext.lib
class CGlobalText : public CPlainText, public MLayDoc, public MFormatText;
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.
MFormatText
- Specifies the mixin protocol for getting and setting character and paragraph format attributes
MLayDoc
- Specifies the interface for providing the information needed by the text layout engine to lay out a text object
CBase
- Base class for all classes to be instantiated on the heap
CEditableText
- An abstract base class which defines the behaviour common to all editable text classes
CPlainText
- Stores and manipulates plain text
CGlobalText
- Text with globally applied formatting
Defined in CGlobalText
:
ApplyCharFormatL()
, ApplyParaFormatL()
, CGlobalText()
, CGlobalText()
, CancelSelectLabel()
, EnquirePageBreak()
, GetCharFormat()
, GetChars()
, GetParaFormatL()
, GetParagraphFormatL()
, GetPictureSizeInTwips()
, GlobalCharFormatLayer()
, GlobalParaFormatLayer()
, LdDocumentLength()
, LdToParagraphStart()
, NewL()
, NewL()
, PictureHandleL()
, SelectParagraphLabel()
, SetGlobalCharFormat()
, SetGlobalParaFormat()
, iGlobalCharFormatLayer
, iGlobalParaFormatLayer
, ~CGlobalText()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CEditableText
:
EApostrophe
,
EBullet
,
EByteOrderMark
,
EDefaultTextGranularity
,
EEllipsis
,
EFlatStorage
,
EHyphen
,
EHyphenMinus
,
ELeftDoubleQuote
,
ELeftSingleQuote
,
ELineBreak
,
ENonBreakingHyphen
,
ENonBreakingSpace
,
EPageBreak
,
EParagraphDelimiter
,
EPictureCharacter
,
EPotentialHyphen
,
EReversedByteOrderMark
,
ERightDoubleQuote
,
ERightSingleQuote
,
ESegmentedStorage
,
ESpace
,
ETabCharacter
,
EZeroWidthNoBreakSpace
,
GetLengthOfInlineText()
,
GetPositionOfInlineTextInDocument()
,
HasChanged()
,
OverrideFormatOfInlineTextIfApplicable()
,
RestoreL()
,
SetHasChanged()
,
StoreL()
,
TDocumentStorage
,
iHasChanged
Inherited from CPlainText
:
CharPosOfParagraph()
,
ComponentInfo()
,
ConstructL()
,
ConsumeAdornmentL()
,
ConvertAllFieldsToText()
,
ConvertFieldToText()
,
CopyToStoreL()
,
DeleteL()
,
DoConstructL()
,
DoExternalizeFieldDataL()
,
DoExternalizePlainTextL()
,
DoInternalizeFieldDataL()
,
DoInternalizePlainTextL()
,
DoPtDelete()
,
DoPtInsertL()
,
DocumentLength()
,
EBiggestCharacterPaste
,
EExcludeInlineEditedText
,
EExtractAll
,
EExtractVisible
,
EImportBufSize
,
EOrganiseByLine
,
EOrganiseByParagraph
,
EScanBackwards
,
EScanEndOfData
,
EScanJoinDelimiters
,
EScanPictureIsDelimiter
,
EScanPunctuationIsDelimiter
,
EScanStayIfBoundary
,
EScanToUnitEnd
,
EScanToUnitStart
,
EUnitIsParagraph
,
EUnitIsWord
,
ExportAsTextL()
,
ExportTextL()
,
ExtendedInterface()
,
ExternalizeFieldDataL()
,
ExternalizeL()
,
ExternalizePlainTextL()
,
ExternalizePlainTextNoLengthCountL()
,
Extract()
,
ExtractSelectively()
,
FieldCount()
,
FieldFactory()
,
FindFields()
,
GetWordInfo()
,
ImportTextFileL()
,
ImportTextL()
,
InsertFieldL()
,
InsertL()
,
InternalizeFieldDataL()
,
InternalizeL()
,
InternalizePlainTextL()
,
NewTextFieldL()
,
PageContainingPos()
,
ParagraphCount()
,
ParagraphNumberForPos()
,
PasteFromStoreL()
,
PtInsertL()
,
Read()
,
RemoveField()
,
Reset()
,
RestoreComponentsL()
,
RestoreFieldComponentsL()
,
SScanData
,
ScanParas()
,
ScanWords()
,
SetFieldFactory()
,
SetPageTable()
,
StoreComponentsL()
,
StoreFieldComponentsL()
,
TImportExportParam
,
TImportExportResult
,
TScanDataEnd
,
TTextOrganisation
,
TUnitOfText
,
TextField()
,
ToParagraphStart()
,
UidFromStreamL()
,
UpdateAllFieldsL()
,
UpdateFieldL()
,
WordCount()
,
anonymous
,
iByteStore
,
iFieldFactory
,
iFieldSet
,
iPageTable
Inherited from MLayDoc
:
EForceLoadFalse
,
EForceLoadTrue
,
TForcePictureLoad
static IMPORT_C CGlobalText *NewL(const CParaFormatLayer *aGlobalParaLayer, const CCharFormatLayer *aGlobalCharLayer, TDocumentStorage
aStorage=ESegmentedStorage, TInt aDefaultTextGranularity=EDefaultTextGranularity);
Allocates and constructs an empty global text object with a paragraph and a character format layer. A single end-of-document delimiter is inserted.
|
|
static IMPORT_C CGlobalText *NewL(const CStreamStore &aStore, TStreamId aStreamId, const CParaFormatLayer *aGlobalParaLayer,
const CCharFormatLayer *aGlobalCharLayer, MTextFieldFactory *aFieldFactory=0, TDocumentStorage=ESegmentedStorage);
Returns a handle to a new instance of this class, whose textual content is restored from the specified read-stream. The global text object *uses* (does not own) the supplied global format layers.
|
|
IMPORT_C ~CGlobalText();
The destructor is empty, and is present only to cause the virtual function table to be defined in a unique module.
protected: IMPORT_C CGlobalText(const CParaFormatLayer *aGlobalParaLayer, const CCharFormatLayer *aGlobalCharLayer);
|
IMPORT_C void SetGlobalParaFormat(const CParaFormatLayer *aParaFormatLayer);
Replaces the paragraph format layer referenced by the global text object.
|
IMPORT_C void SetGlobalCharFormat(const CCharFormatLayer *aCharFormatLayer);
Replaces the character format layer referenced by the global text object.
|
inline const CParaFormatLayer *GlobalParaFormatLayer() const;
Gets the paragraph format layer referenced by the global text object.
|
inline const CCharFormatLayer *GlobalCharFormatLayer() const;
Gets the character format layer referenced by the global text object.
|
virtual IMPORT_C TInt LdDocumentLength() const;
Gets the the number of characters in the document.
Note: the count includes all non-printing characters but excludes the end of text paragraph delimiter, so that the smallest return value is always zero.
|
virtual IMPORT_C TInt LdToParagraphStart(TInt &aCurrentPos) const;
Gets the document position of the start of the paragraph containing a specified document position.
|
|
virtual IMPORT_C void GetParagraphFormatL(CParaFormat *aFormat, TInt aPos) const;
Gets the text object's effective paragraph formatting. The aPos value is only used in the rich text implementation of this function.
|
virtual IMPORT_C void GetChars(TPtrC &aView, TCharFormat &aFormat, TInt aStartPos) const;
Gets a constant pointer descriptor to a portion of the text object. The portion starts at document position aStartPos, and ends at the end of the document, or the end of the segment, if segmented storage is being used. Also fills a character format object with the text object's effective character formatting. The start position must be valid, or a panic occurs.
|
virtual IMPORT_C TInt GetPictureSizeInTwips(TSize &aSize, TInt aPos) const;
Global text provides no support for pictures, so this implementation of the function returns KErrNotFound.
|
|
virtual IMPORT_C CPicture *PictureHandleL(TInt aPos, MLayDoc::TForcePictureLoad aForceLoad) const;
Global text provides no support for pictures, so this implementation of the function returns NULL.
|
|
virtual IMPORT_C TBool EnquirePageBreak(TInt aPos, TInt aLength=0) const;
Tests whether a page break occurs within a range of characters. Returns false if no page table has been set up: see CPlainText::SetPageTable()
. The start and end of the range must be valid document positions, or a panic occurs.
|
|
virtual IMPORT_C TBool SelectParagraphLabel(TInt aPos);
Global text does not support paragraph labels, so this function returns EFalse.
|
|
virtual IMPORT_C void GetParaFormatL(CParaFormat *aFormat, TParaFormatMask &aVaries, TInt aPos, TInt aLength, CParaFormat::TParaFormatGetMode
aMode=CParaFormat::EAllAttributes) const;
Gets the the global text object's effective paragraph formatting. Note that the position and length arguments are only used in the rich text implementation of this function.
|
virtual IMPORT_C void ApplyParaFormatL(const CParaFormat *aFormat, const TParaFormatMask &aMask, TInt aPos, TInt aLength);
Changes the text object's paragraph formatting. The attributes which are set in the mask are read from aFormat into the text object's paragraph format layer. The attributes which are not set in the mask are not changed. Note that the position and length arguments are only used in the rich text implementation of this function.
|
virtual IMPORT_C void GetCharFormat(TCharFormat &aFormat, TCharFormatMask &aVaries, TInt aPos, TInt aLength) const;
Gets the global text object's effective character formatting. Note that the last three arguments are not relevant to the global text implementation of this function.
|
virtual IMPORT_C void ApplyCharFormatL(const TCharFormat &aFormat, const TCharFormatMask &aMask, TInt aPos, TInt aLength);
Changes the text object's character formatting. The attributes which are set in the mask are read from aFormat into the text object's character format layer. The attributes which are not set in the mask are not changed. Note that the position and length arguments are only used in the rich text implementation of this function.
|
protected: const CCharFormatLayer * iGlobalCharFormatLayer;