»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Graphics GDI »
MLineBreaker
Location:
LineBreak.h
Link against: linebreak.lib
class MLineBreaker;
Description
Customizes the Unicode line-breaking algorithm.
Members
Defined in MLineBreaker
:
EAiLineBreakClass
, EAlLineBreakClass
, EB2LineBreakClass
, EBaLineBreakClass
, EBbLineBreakClass
, EBkLineBreakClass
, ECbLineBreakClass
, EClLineBreakClass
, ECmLineBreakClass
, ECrLineBreakClass
, EExLineBreakClass
, EGlLineBreakClass
, EHyLineBreakClass
, EIdLineBreakClass
, EInLineBreakClass
, EIsLineBreakClass
, ELfLineBreakClass
, ELineBreakClasses
, ENsLineBreakClass
, ENuLineBreakClass
, EOpLineBreakClass
, EPoLineBreakClass
, EPrLineBreakClass
, EQuLineBreakClass
, ESaLineBreakClass
, ESgLineBreakClass
, ESpLineBreakClass
, ESyLineBreakClass
, EXxLineBreakClass
, EZwLineBreakClass
, ExtendedInterface()
, GetLineBreak()
, GetLineBreakInContext()
, GetLineBreakL()
, IsHangingCharacter()
, LineBreakClass()
, LineBreakPossible()
, anonymous
Member functions
virtual IMPORT_C TUint LineBreakClass(TUint aCode, TUint &aRangeStart, TUint &aRangeEnd) const;
Description
Converts Unicode character into line breaking class.
Parameters
TUint aCode |
Input Unicode value.
|
TUint &aRangeStart |
Returns the start of the contiguous range of characters including aCode that have the returned line breaking class.
|
TUint &aRangeEnd |
Returns the end of the contiguous range of characters including aCode that have the returned line breaking class.
|
|
Return value
TUint
|
The line breaking class for aCode.
|
|
virtual IMPORT_C TBool LineBreakPossible(TUint aPrevClass, TUint aNextClass, TBool aHaveSpaces) const;
Description
Returns whether line breaks are legal between a character of line breaking class aPrevClass and aNextClass, with intervening
spaces or not as determined by aHaveSpaces.
Parameters
TUint aPrevClass |
The class before the potential line break.
|
TUint aNextClass |
The class after the potential line break.
|
TBool aHaveSpaces |
Whether spaces separate the characters.
|
|
Return value
TBool
|
ETrue if and only if a line break is legal in the situation described.
|
|
virtual IMPORT_C TBool GetLineBreakInContext(const TDesC16 &aText, TInt aMinBreakPos, TInt aMaxBreakPos, TBool aForwards,
TInt &aBreakPos) const;
Description
Returns whether a line break is possible within a run of characters all having the class ESaLineBreakClass (Complex content).
Languages with Unicocde characters having such a class include: Thai, Lao, Myanmar and Khmer. This default implementation
of the GetLineBreakInContext()
method only supports the Thai script. Breaks are determined in Thai based on a simple understanding of syllable boundaries.
When characters from the other unsupported Sa class languages are found the method exits with EFalse.
Parameters
const TDesC16 &aText |
The text to be searched, which is a contiguous run of characters of class SA (or CM attatched to SA). The break position may
be restricted further by aMinBreakPos and aMaxBreakPos, but more text is provided for extra context should it be needed.
|
TInt aMinBreakPos |
The start of the text to be considered for line breaks.
|
TInt aMaxBreakPos |
The end of the text to be considered for line breaks.
|
TBool aForwards |
ETrue if aBreakPos is to be set with the first legal break position, EFalse if aBreakPos is to be set with the last legal
break position.
|
TInt &aBreakPos |
If break position found on exit its value is >= Min and <= Max positions supplied.
|
|
Return value
TBool
|
TBool ETrue if and only if a legal break was found, EFalse otherwise.
|
|
virtual IMPORT_C TBool IsHangingCharacter(TUint aChar) const;
Description
Returns ETrue if the character value may be positioned outside the margins.
Parameters
TUint aChar |
Chatacter to test
|
|
Return value
TBool
|
ETrue if the character value may be positioned outside the margins.
|
|
IMPORT_C TBool GetLineBreak(const TDesC16 &aText, TInt aMinBreakPos, TInt aMaxBreakPos, TBool aForwards, MContingentLineBreaker
*aCbDelegate, TInt &aBreakPos, TInt &aBreakPosAfterSpaces) const;
Description
Parameters
Return value
IMPORT_C TBool GetLineBreakL(const TDesC16 &aText, TInt aMinBreakPos, TInt aMaxBreakPos, TBool aForwards, MContingentLineBreakerL
*aCbDelegate, TInt &aBreakPos, TInt &aBreakPosAfterSpaces) const;
Description
Parameters
Return value
virtual IMPORT_C void *ExtendedInterface(TUid &aUid) const;
Description
Returns an interface to more functions, or 0 if these are unsupported. Currently there are no other functions, so 0 is always
returned. If this function is overridden, it must base call if aUid is not recognised, rather than just returning 0.
Parameters
TUid &aUid |
Identifies the interface to be returned.
|
|
n/a
Description
The Unicode line breaking classes; see Unicode Technical Report 14. Not a named enumerated type, so that overriding classes
may add new line breaking classes freely. The description of each constant gives the name of the line-breaking class, an example
and a brief, imprecise description of the default behaviour of characters of that class.
EOpLineBreakClass |
Opening Punctuation (e.g. '['). Breaking after prohibited.
|
EClLineBreakClass |
Closing Punctuation (e.g. ']'). Breaking before prohibited.
|
EQuLineBreakClass |
Ambiguous Quotes (e.g. '"'). Breaking before and after prohibited.
|
EGlLineBreakClass |
Glue (e.g. Non-breaking space). Breaking before and after prohibited unless spaces are present.
|
ENsLineBreakClass |
Non-Starter (e.g. small Japanese kana). Breaking before prohibited if no spaces present.
|
EExLineBreakClass |
Exclamation or Interrogation (e.g. '?'). Like closing punctuation except before Postfix or Non-starter.
|
ESyLineBreakClass |
Symbol (e.g. '/'. Like Alphabetic, but allows breaking before Alphabetic.
|
EIsLineBreakClass |
Numeric Infix Separator (e.g. ','). Forbids breaking after any and before Numeric.
|
EPrLineBreakClass |
Numeric Prefix (e.g. '$'). Forbids breaking before Numeric.
|
EPoLineBreakClass |
Numeric Postfix (e.g. '%'). Forbids breaking after Numeric.
|
ENuLineBreakClass |
Numeric (e.g. '1').
|
EAlLineBreakClass |
Alphabetic (e.g. 'a').
|
EIdLineBreakClass |
Ideographic (e.g. Japanese Kanji). Generally break before or after
|
EInLineBreakClass |
Inseparable (e.g. ellipsis). Forbid breaks between Inseparables.
|
EHyLineBreakClass |
Hyphen (e.g. '-'). Allows a break after except before Numeric.
|
EBaLineBreakClass |
Break After. Generally allow a break after. Breaking between Break Afters not separated by spaces is prohibited.
|
EBbLineBreakClass |
Break Before. Generally allow a break before. Breaking between Break Befores not separated by spaces is prohibited.
|
EB2LineBreakClass |
Break Before and After. Generally allow a break before or after. Breaking between Break Before and Afters is prohibited, even
if spaces are present.
|
EZwLineBreakClass |
Zero-Width Space. Allow a break.
|
ECmLineBreakClass |
Combining Mark. Takes on the class of its base class.
|
EBkLineBreakClass |
Mandatory Break.
|
ECrLineBreakClass |
Carriage Return. Break after unless part of a CRLF pair.
|
ELfLineBreakClass |
Line Feed. Break after.
|
ESgLineBreakClass |
Surrogate. Half of a surrogate pair.
|
ECbLineBreakClass |
Contingent Break (e.g. embedded pictures). Uses external information
|
ESpLineBreakClass |
Space. Intervening characters of class Space are indicated by aHaveSpaces in LineBreakPossible.
|
ESaLineBreakClass |
Complex Context (e.g. Thai). Runs of Complex Context are passed to GetLineBreakInContext.
|
EAiLineBreakClass |
Ambiguous. Characters of ambiguous East Asian width are treated as Alphabetic, unless they are resolved as being "Wide", in
which case they are treated as Ideographic.
|
EXxLineBreakClass |
The Xx class is used when the class is unknown; e.g.; outside the provided context.
|
ELineBreakClasses |
The number of Unicode line break classes.
|
|