|
||
class TBidirectionalState;
The bidirectional state class. This class contains functions that implement the Unicode Bidirectional Algorithm, which changes text from logical order to display order for the correct display of right-to-left scripts, like Arabic and Hebrew. A TBidirectionalState object carries the embedding level and stack from one line to the next. On construction it is in its 'start of paragraph' state.
Defined in TBidirectionalState
:
ExternalizeL(RWriteStream &)
Serializes a bidirectional state to an output stream.InternalizeL(RReadStream &)
Reads a bidirectional state from an input stream, translating it from its serial...IsDefault()const
Returns Gets the default 'start of paragraph' state.ParRightToLeft()const
ReorderText(const TText *,TInt,TBool,TText *&)
Reorders text according to the Unicode Bidirectional Reordering algorithm.Reset()
Sets the object to its default 'start of paragraph' state. ReverseGroups(TText *,TInt)
A utility to reverse text apart from combining characters, which remains after t...TBidirectionalState()
Standard constructor. TRunInfo
Information about a run of characters with the same bidirectional category.operator==(const TBidirectionalState &)const
Return ETrue if two bidirectional states are identical.IMPORT_C void ReorderLine(TRunInfo *aRunInfo, TInt aRuns, TBool aParStart, TBool aParEnd, TBool aParRightToLeft, TChar::TBdCategory
aNextCategory, TChar::TBdCategory aNextStrongCategory, TBool &aVisualEndIsAmbiguous);
Reorders a line of text and updates the bidirectional state for the next line.
|
IMPORT_C void ReorderLine(TRunInfo *aRunInfo, TInt aRuns, TBool aParStart, TBool aParEnd, TBool aParRightToLeft, TChar::TBdCategory
aNextCategory, TChar::TBdCategory aNextStrongCategory);
Reorders a line of text and updates the bidirectional state for the next line.
|
IMPORT_C static TInt ReorderText(const TText *aText, TInt aLength, TBool aParRightToLeft, TText *&aNewText);
Reorders text according to the Unicode Bidirectional Reordering algorithm.
Reorders the input text from logical order (which may be bidirectional) to display order (strictly left to right).
|
|
IMPORT_C static void ReverseGroups(TText *aStart, TInt aLength);
A utility to reverse text apart from combining characters, which remains after their base characters. This is what is needed when drawing right-to-left text.
|
IMPORT_C TBool IsDefault() const;
Returns Gets the default 'start of paragraph' state.
|
IMPORT_C TBool operator==(const TBidirectionalState &aState) const;
Return ETrue if two bidirectional states are identical.
|
|
IMPORT_C void ExternalizeL(RWriteStream &aDest);
Serializes a bidirectional state to an output stream.
|
IMPORT_C void InternalizeL(RReadStream &aSource);
Reads a bidirectional state from an input stream, translating it from its serialized form.
|
class TRunInfo;
Information about a run of characters with the same bidirectional category.
An array of these representing a line is passed into, and reordered by, TBidirectionalState::ReorderLine(TRunInfo *,TInt,TBool,TBool,TBool,TChar::TBdCategory,TChar::TBdCategory,TBool &)
.
Defined in TBidirectionalState::TRunInfo
:
iCategory
Category of a run of text: passed to TBidirectionalState::ReorderLine(TRunInfo *...iDirection
Resolved direction of this run: 0 for left to right, 1 for right to left. iEmbeddingLevel
Embedding level of this run: used internally by TBidirectionalState::ReorderLine...iIndex
Index of this run after reordering. iLength
Length of text; returned by TBidirectionalState::ReorderText(const TText *,TInt,...iStart
Start of text; returned by TBidirectionalState::ReorderText(const TText *,TInt,T...iCategory
TUint iCategory;
Category of a run of text: passed to TBidirectionalState::ReorderLine(TRunInfo *,TInt,TBool,TBool,TBool,TChar::TBdCategory,TChar::TBdCategory,TBool &)
; these are passed in as TChar::TBdCategory
values but are modified for internal use.
iEmbeddingLevel
TUint8 iEmbeddingLevel;
Embedding level of this run: used internally by TBidirectionalState::ReorderLine(TRunInfo *,TInt,TBool,TBool,TBool,TChar::TBdCategory,TChar::TBdCategory,TBool &)
.
iDirection
TUint8 iDirection;
Resolved direction of this run: 0 for left to right, 1 for right to left.
iIndex
TInt iIndex;
Index of this run after reordering.
iStart
TInt iStart;
Start of text; returned by TBidirectionalState::ReorderText(const TText *,TInt,TBool,TText *&)
.
iLength
TInt iLength;
Length of text; returned by TBidirectionalState::ReorderText(const TText *,TInt,TBool,TText *&)
.