8 #ifndef __PARAGRAPHLAYOUT_H
10 #define __PARAGRAPHLAYOUT_H
22 #if ! UCONFIG_NO_BREAK_ITERATION
160 static const char fgClassID;
175 inline Line &operator=(
const Line & ) {
return *
this; };
177 void computeMetrics();
180 const LEGlyphID glyphs[],
const float positions[],
const le_int32 glyphToCharMap[]);
232 inline le_int32 getGlyphCount()
const;
244 inline const LEGlyphID *getGlyphs()
const;
259 inline const float *getPositions()
const;
271 inline const le_int32 *getGlyphToCharMap()
const;
323 static const char fgClassID;
331 const float *fPositions;
341 const LEGlyphID glyphs[],
const float positions[],
const le_int32 glyphToCharMap[]);
482 virtual le_int32 getDescent()
const;
492 virtual le_int32 getLeading()
const;
500 inline void reflow();
529 Line *nextLine(
float width);
552 static const char fgClassID;
573 void computeLevels(
UBiDiLevel paragraphLevel);
575 Line *computeVisualRuns();
578 void computeScripts();
580 void computeLocales();
584 void computeMetrics();
625 StyleRunInfo *fStyleRunInfo;
634 float fVisualRunLastX;
635 float fVisualRunLastY;
653 inline ParagraphLayout::Line::Line()
654 :
UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(
NULL)
659 inline ParagraphLayout::Line::Line(
const Line & )
660 :
UObject(), fAscent(0), fDescent(0), fLeading(0), fRunCount(0), fRunCapacity(0), fRuns(
NULL)
697 return fGlyphToCharMap;
702 return fFont->getAscent();
707 return fFont->getDescent();
712 return fFont->getLeading();
715 inline ParagraphLayout::VisualRun::VisualRun()
721 inline ParagraphLayout::VisualRun::VisualRun(
const VisualRun &)
728 const LEGlyphID glyphs[],
const float positions[],
const le_int32 glyphToCharMap[])
729 : fFont(font), fDirection(direction), fGlyphCount(glyphCount),
730 fGlyphs(glyphs), fPositions(positions), fGlyphToCharMap(glyphToCharMap)
le_int32 countRuns() const
Count the number of visual runs in the line.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
void reflow()
Reset line breaking to start from the beginning of the paragraph.
le_int32 getGlyphCount() const
Get the number of glyphs in the visual run.
The BreakIterator class implements methods for finding the location of boundaries in text...
The FontRuns class associates pointers to LEFontInstance objects with runs of text.
This object represents a single visual run in a line of text in a paragraph.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
This is a virtual base class used to do complex text layout.
const float * getPositions() const
Get the (x, y) positions of the glyphs in the visual run.
UBiDiDirection getTextDirection()
Return the directionality of the text in the paragraph.
UScriptCode
Constants for ISO 15924 script codes.
uint8_t UBiDiLevel
UBiDiLevel is the type of the level values in this Bidi implementation.
C API: Basic definitions for the ICU LayoutEngine.
int32_t le_int32
A type used for signed, 32-bit integers.
UBool le_bool
A type used for boolean values.
le_int32 getLeading() const
A convenience method which returns the leading value for the font associated with this run...
C API: Unicode Script Information.
UBiDiDirection getDirection() const
Get the direction of the visual run.
UBiDiDirection
UBiDiDirection values indicate the text direction.
const LEGlyphID * getGlyphs() const
Get the glyphs in the visual run.
UBiDiDirection ubidi_getDirection(const UBiDi *pBiDi)
Get the directionality of the text.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
This is a virtual base class that serves as the interface between a LayoutEngine and the platform fon...
le_int32 getDescent() const
A convenience method which returns the descent value for the font associated with this run...
#define NULL
Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.
UBiDiLevel ubidi_getParaLevel(const UBiDi *pBiDi)
Get the paragraph level of the text.
The ValueRuns class associates integer values with runs of text.
This class represents a single line of text in a ParagraphLayout.
C++ API: Virtual base class for complex text layout.
The LocaleRuns class associates pointers to Locale objects with runs of text.
LEErrorCode
Error codes returned by the LayoutEngine.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
le_int32 getAscent() const
A convenience method which returns the ascent value for the font associated with this run...
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UObject is the common ICU "boilerplate" class.
#define U_LAYOUTEX_API
Set to export library symbols from inside the layout extensions library, and to import them from outs...
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
C++ API: base class for building classes which represent data that is associated with runs of text...
UChar LEUnicode
Used to represent 16-bit Unicode code points.
le_uint32 LEGlyphID
Used for glyph indices.
const LEFontInstance * getFont() const
Get the LEFontInstance object which represents the font of the visual run.
const le_int32 * getGlyphToCharMap() const
Get the glyph-to-character map for this visual run.
UBiDiLevel getParagraphLevel()
Return the resolved paragraph level.
C++ API: Layout Engine Font Instance object.
A Locale object represents a specific geographical, political, or cultural region.