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.
TBool | DeleteWithoutDestroyingFormatL | ( | TInt | aPos, |
TInt | aLength | |||
) | [private] |
Deletes a range of characters. For rich text the format of the deleted character at position aPos is preserved, so that any text subsequently inserted at aPos will have that format applied to it.
TInt | DocumentLength | ( | ) | const [pure virtual] |
Returns a count of the number of characters in the document, excluding the end-of-text paragraph delimiter.
IMPORT_C void | ExtendedInterface | ( | TAny *& | aInterface, |
TUid | aInterfaceId | |||
) | [virtual] |
Returns the interface corresponding to the specified UID if it exists, or 0 if not. Overridden versions should base call rather than returning 0.
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() .
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.
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.
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.
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.
TInt aStartPos | A valid document position from which to read. |
TInt aLength | If specified, the number of characters to read, inclusive of the character at position aStartPos. If not specified, the read continues to the end of the document, or the end of the segment if using segmented storage. |
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 | |||
) |
Restores the text and its components from a stream store.
const CStreamStore & aStore | Stream store containing the text and its components. |
TStreamId aStreamId | The ID of the stream store in which the text was previously stored. |
IMPORT_C TInt | ScanParas | ( | TInt & | aPos, |
TUint & | aScanMask | |||
) | const [virtual] |
Scans the text from a specified document position to a location determined by the flags specified in a bitmask. The function can scan forwards or backwards to the beginning or end of a paragraph.
IMPORT_C TInt | ScanWords | ( | TInt & | aPos, |
TUint & | aScanMask | |||
) | const [virtual] |
Scans the text from a specified document position to a location determined by the flags specified in a bitmask. The function can scan forwards or backwards to the beginning or end of a word.
void | SetAndTransferOwnershipOfInlineEditDataL | ( | CInlineEditData * | aInlineEditData | ) | [private] |
CInlineEditData * aInlineEditData |
IMPORT_C void | SetHasChanged | ( | TBool | aHasChanged | ) | [virtual] |
Sets whether a change has occurred to the editable text object. This is called by functions which change the text object in some way.
TBool aHasChanged | ETrue if a change has occurred to the text object. EFalse if no change has occurred. |
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 |
Stores the text and its components. The components (e.g. fields and pictures) are stored in separate streams within the stream store.
CStreamStore & aStore | Stream store to which the text and text components are written. |
TInt | ToParagraphStart | ( | TInt & | aPos | ) | const [pure virtual] |
Updates a document position 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.
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 |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.