class CEditableText : public CBase |
An abstract base class which defines the behaviour common to all editable text classes.
It provides no storage for text or text formatting, so it is not directly usable. It defines protocols for editing the contents of a text object and for extracting format data from a text object which supports formatting.
Note: when specifying a position in a text object (the document position), zero is before the first character in the document. If the document contains n characters, position n is after the last character. Valid document positions are therefore between zero and the length of the document, inclusive. Many editable text functions raise a panic if a specified document position is invalid.
Note also that the functions which implement support for front-end-processor inline editing are intended for internal use only by Symbian.
Protected Member Functions | |
---|---|
IMPORT_C void | OverrideFormatOfInlineTextIfApplicable(TPtrC &, TCharFormat &, TInt) |
Private Member Functions | |
---|---|
void | DeleteInlineEditDataAndSetToNull() |
TBool | DeleteWithoutDestroyingFormatL(TInt, TInt) |
CInlineEditData * | InlineEditData() |
void | SetAndTransferOwnershipOfInlineEditDataL(CInlineEditData *) |
Public Member Enumerations | |
---|---|
enum | anonymous { EDefaultTextGranularity = 256 } |
enum | anonymous { ETabCharacter = 0x0009, EPageBreak = 0x000C, ESpace = 0x0020, EApostrophe = 0x0027, EHyphenMinus = 0x002D, ENonBreakingSpace = 0x00A0, EPotentialHyphen = 0x00AD, EHyphen = 0x2010, ENonBreakingHyphen = 0x2011, ELeftSingleQuote = 0x2018, ERightSingleQuote = 0x2019, ELeftDoubleQuote = 0x201C, ERightDoubleQuote = 0x201D, EBullet = 0x2022, EEllipsis = 0x2026, ELineBreak = 0x2028, EParagraphDelimiter = 0x2029, EPictureCharacter = 0xFFFC, EZeroWidthNoBreakSpace = 0xFEFF, EByteOrderMark = 0xFEFF, EReversedByteOrderMark = 0xFFFE } |
enum | TDocumentStorage { EFlatStorage, ESegmentedStorage } |
Protected Attributes | |
---|---|
TBool | iHasChanged |
Private Attributes | |
---|---|
CEditableTextOptionalData * | iOptionalData |
IMPORT_C void | CancelFepInlineEdit | ( | TBool & | aParagraphContainingStartPositionOfInlineTextHasChangedFormat, |
TInt & | aNumberOfCharactersSuccessfullyDeleted, | |||
TInt & | aNumberOfCharactersSuccessfullyInserted, | |||
TInt & | aPositionOfInsertionPointInDocument, | |||
TInt | aNewPositionOfInsertionPointInDocument | |||
) |
IMPORT_C void | CommitFepInlineEditL | ( | TBool & | aParagraphContainingStartPositionOfInlineTextHasChangedFormat, |
TInt & | aNumberOfCharactersSuccessfullyDeleted, | |||
TInt & | aNumberOfCharactersSuccessfullyInserted, | |||
TInt & | aPositionOfInsertionPointInDocument, | |||
TInt | aNewPositionOfInsertionPointInDocument | |||
) |
void | CopyToStoreL | ( | CStreamStore & | aStore, |
CStreamDictionary & | aDictionary, | |||
TInt | aPos, | |||
TInt | aLength | |||
) | const [pure virtual] |
Copies a portion of the text to the clipboard.
CStreamStore & aStore | The clipboard's store (see class CClipboard). |
CStreamDictionary & aDictionary | The clipboard's stream dictionary (see class CClipboard). |
TInt aPos | A valid document position from which to begin copying. |
TInt aLength | The number of characters to copy. |
TBool | DeleteL | ( | TInt | aPos, |
TInt | aLength | |||
) | [pure virtual] |
Deletes one or more characters beginning at (and including) the character at the specified document position.
Indicates whether or not two paragraphs have been merged as a result of the delete, so that the resulting paragraph needs to be reformatted. This value is only relevant to rich text, so for plain and global text implementations, the function always returns EFalse.
TBool | DeleteWithoutDestroyingFormatL | ( | TInt | aPos, |
TInt | aLength | |||
) | [private] |
TInt | DocumentLength | ( | ) | const [pure virtual] |
Returns a count of the number of characters in the document, excluding the end-of-text paragraph delimiter.
The number of characters in the document.
IMPORT_C void | ExtendedInterface | ( | TAny *& | aInterface, |
TUid | aInterfaceId | |||
) | [virtual] |
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [virtual] |
RWriteStream & aStream |
void | Extract | ( | TDes & | aBuf, |
TInt | aPos = 0 | |||
) | const [pure virtual] |
Copies a portion of the text into a descriptor.
Starts at the position specified and continues to the end of the document. A length may optionally be specified.
void | Extract | ( | TDes & | aBuf, |
TInt | aPos, | |||
TInt | aLength | |||
) | const [pure virtual] |
Copies a portion of the text into a descriptor. Starts at the position specified and continues to the end of the document. A length may optionally be specified.
void | GetWordInfo | ( | TInt | aCurrentPos, |
TInt & | aStartPos, | |||
TInt & | aLength, | |||
TBool | aPictureIsDelimiter, | |||
TBool | aPunctuationIsDelimiter | |||
) | const [pure virtual] |
Returns the start position and length of the word that contains the specified document position.
TInt aCurrentPos | A valid document position. |
TInt & aStartPos | On return, the document position of the first character in the word containing document position aCurrentPos. |
TInt & aLength | On return, the length of the word containing document position aCurrentPos. Does not include the trailing word delimiter character. |
TBool aPictureIsDelimiter | Specifies whether picture characters should be considered to be word delimiters. For example, this value might be EFalse when navigating a document, but ETrue when carrying out spell checking. |
TBool aPunctuationIsDelimiter | Specifies whether puncutation characters should be considered to be word delimiters. |
TBool | HasChanged | ( | ) | const [inline] |
Tests whether the editable text object has been changed by an operation on it, as set by SetHasChanged().
ETrue if a change has occurred to the text object. EFalse if there has been no change.
void | InsertL | ( | TInt | aInsertPos, |
const TChar & | aChar | |||
) | [pure virtual] |
Inserts a single character or a descriptor into the text object at a specified document position.
void | InsertL | ( | TInt | aInsertPos, |
const TDesC & | aBuf | |||
) | [pure virtual] |
Inserts a single character or a descriptor into the text object at a specified document position.
void | InternalizeL | ( | RReadStream & | aStream | ) | [virtual] |
RReadStream & aStream |
IMPORT_C void | OverrideFormatOfInlineTextIfApplicable | ( | TPtrC & | aView, |
TCharFormat & | aFormat, | |||
TInt | aStartPos | |||
) | const [protected] |
TPtrC & aView | |
TCharFormat & aFormat | |
TInt aStartPos |
TInt | ParagraphCount | ( | ) | const [pure virtual] |
Returns a count of the number of paragraphs in the document.
The number of paragraphs in the document. Notes: The end-of-text paragraph delimiter at the end of every document means this function always returns a count of at least one.
TInt | PasteFromStoreL | ( | const CStreamStore & | aStore, |
const CStreamDictionary & | aDictionary, | |||
TInt | aPos | |||
) | [pure virtual] |
Pastes the contents of the clipboard into the text object at the specified document position.
The number of characters pasted.
const CStreamStore & aStore | The clipboard's store (see class CClipboard). |
const CStreamDictionary & aDictionary | The clipboard's stream dictionary (see class CClipboard). |
TInt aPos | A valid document position at which to paste the text. |
TPtrC | Read | ( | TInt | aStartPos | ) | const [pure virtual] |
Gets a read-only pointer descriptor to a portion of the text.
Read-only pointer descriptor to a portion of the text.
TInt aStartPos | A valid document position from which to read. |
TPtrC | Read | ( | TInt | aStartPos, |
TInt | aLength | |||
) | const [pure virtual] |
Gets a read-only pointer descriptor to a portion of the text.
Read-only pointer descriptor to a portion of the text.
void | Reset | ( | ) | [pure virtual] |
Deletes the text content and components from the text object, leaving the single end-of-text paragraph delimiter.
void | RestoreComponentsL | ( | const CStreamStore & | aStore | ) | [pure virtual] |
Restores the text components, e.g. fields, pictures and formatting from the stream store. Does not restore the text content.
const CStreamStore & aStore | The stream store from which the text components are restored. |
IMPORT_C void | RestoreL | ( | const CStreamStore & | aStore, |
TStreamId | aStreamId | |||
) |
const CStreamStore & aStore | |
TStreamId aStreamId |
void | SetAndTransferOwnershipOfInlineEditDataL | ( | CInlineEditData * | aInlineEditData | ) | [private] |
CInlineEditData * aInlineEditData |
IMPORT_C void | SetHasChanged | ( | TBool | aHasChanged | ) | [virtual] |
TBool aHasChanged |
IMPORT_C void | StartFepInlineEditL | ( | TBool & | aParagraphContainingStartPositionOfInlineTextHasChangedFormat, |
TInt & | aNumberOfCharactersSuccessfullyDeleted, | |||
TInt & | aNumberOfCharactersSuccessfullyInserted, | |||
TInt & | aPositionOfInsertionPointInDocument, | |||
TInt | aNewPositionOfInsertionPointInDocument, | |||
const TDesC & | aInitialInlineText, | |||
TInt | aPositionOfInlineTextInDocument, | |||
TInt | aNumberOfCharactersToHide, | |||
MFepInlineTextFormatRetriever & | aInlineTextFormatRetriever | |||
) |
TBool & aParagraphContainingStartPositionOfInlineTextHasChangedFormat | |
TInt & aNumberOfCharactersSuccessfullyDeleted | |
TInt & aNumberOfCharactersSuccessfullyInserted | |
TInt & aPositionOfInsertionPointInDocument | |
TInt aNewPositionOfInsertionPointInDocument | |
const TDesC & aInitialInlineText | |
TInt aPositionOfInlineTextInDocument | |
TInt aNumberOfCharactersToHide | |
MFepInlineTextFormatRetriever & aInlineTextFormatRetriever |
void | StoreComponentsL | ( | CStreamStore & | aStore, |
CStoreMap & | aMap | |||
) | const [pure virtual] |
Stores the text components, e.g. fields, pictures and formatting to the stream store specified. Does not store the text content.
CStreamStore & aStore | Stream store to which the text components are written. |
CStoreMap & aMap | A store map. This binds the address of text components to the stream ID of aStore. This is needed to support deferred loading of pictures in rich text. |
IMPORT_C TStreamId | StoreL | ( | CStreamStore & | aStore | ) | const |
CStreamStore & aStore |
TInt | ToParagraphStart | ( | TInt & | aPos | ) | const [pure virtual] |
Updates a document position to the start of the paragraph.
The number of characters skipped in scanning to the start of the paragraph.
TInt & aPos | Initially specifies a valid document position. On return, set to the document position of the first character in the paragraph. |
IMPORT_C void | UpdateFepInlineTextL | ( | TBool & | aParagraphContainingStartPositionOfInlineTextHasChangedFormat, |
TInt & | aNumberOfCharactersSuccessfullyDeleted, | |||
TInt & | aNumberOfCharactersSuccessfullyInserted, | |||
TInt & | aPositionOfInsertionPointInDocument, | |||
TInt | aNewPositionOfInsertionPointInDocument, | |||
const TDesC & | aNewInlineText | |||
) |
TInt | WordCount | ( | ) | const [pure virtual] |
Returns a count of the number of words in the document.
The number of words in the document
Miscellaneous constants.
EDefaultTextGranularity = 256 |
Granularity of the buffer, default 256 characters. |
ETabCharacter = 0x0009 |
Tab stop. |
EPageBreak = 0x000C |
New page. |
ESpace = 0x0020 |
Visible space character. |
EApostrophe = 0x0027 | |
EHyphenMinus = 0x002D | |
ENonBreakingSpace = 0x00A0 |
A hard (non-breaking) space. |
EPotentialHyphen = 0x00AD |
A soft hyphen (ensures that a hyphen followed by a new line will be inserted at that point should a line break be required anywhere within the word). |
EHyphen = 0x2010 | |
ENonBreakingHyphen = 0x2011 |
A hard (non-breaking) hyphen. |
ELeftSingleQuote = 0x2018 | |
ERightSingleQuote = 0x2019 | |
ELeftDoubleQuote = 0x201C | |
ERightDoubleQuote = 0x201D | |
EBullet = 0x2022 | |
EEllipsis = 0x2026 | |
ELineBreak = 0x2028 |
Forced line break. |
EParagraphDelimiter = 0x2029 |
Paragraph delimiter. |
EPictureCharacter = 0xFFFC |
Represents a picture inserted into the text object. |
EZeroWidthNoBreakSpace = 0xFEFF | |
EByteOrderMark = 0xFEFF | |
EReversedByteOrderMark = 0xFFFE |