Location:
BIDI.H
Link against: gdi.lib
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()
, InternalizeL()
, IsDefault()
, ParRightToLeft()
, ReorderLine()
, ReorderLine()
, ReorderText()
, Reset()
, ReverseGroups()
, TBidirectionalState()
, TRunInfo
, operator==()
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.
|
static IMPORT_C 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).
|
|
static IMPORT_C 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, ReorderLine()
.
Defined in TBidirectionalState::TRunInfo
:
iCategory
, iDirection
, iEmbeddingLevel
, iIndex
, iLength
, iStart
iCategory
TUint iCategory;
Category of a run of text: passed to ReorderLine()
; 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 ReorderLine()
.
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 ReorderText()
.
iLength
TInt iLength;
Length of text; returned by ReorderText()
.