ICU 76.1 76.1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends
icu::ParagraphLayout::Line Class Reference

This class represents a single line of text in a ParagraphLayout. More...

#include <ParagraphLayout.h>

Inheritance diagram for icu::ParagraphLayout::Line:
icu::UObject icu::UMemory

Public Member Functions

 ~Line ()
 The constructor is private since these objects can only be created by ParagraphLayout.
 
le_int32 countRuns () const
 Count the number of visual runs in the line.
 
le_int32 getAscent () const
 Get the ascent of the line.
 
le_int32 getDescent () const
 Get the descent of the line.
 
le_int32 getLeading () const
 Get the leading of the line.
 
le_int32 getWidth () const
 Get the width of the line.
 
const VisualRungetVisualRun (le_int32 runIndex) const
 Get a ParagraphLayout::VisualRun object for a given visual run in the line.
 
UClassID getDynamicClassID () const override
 ICU "poor man's RTTI", returns a UClassID for the actual class.
 
- Public Member Functions inherited from icu::UObject
virtual ~UObject ()
 Destructor.
 

Static Public Member Functions

static UClassID getStaticClassID ()
 ICU "poor man's RTTI", returns a UClassID for this class.
 

Friends

class ParagraphLayout
 

Detailed Description

This class represents a single line of text in a ParagraphLayout.

They can only be created by calling ParagraphLayout::nextLine(). Each line consists of multiple visual runs, represented by ParagraphLayout::VisualRun objects.

See also
ParagraphLayout
ParagraphLayout::VisualRun
Stable:
ICU 3.2

Definition at line 67 of file ParagraphLayout.h.

Constructor & Destructor Documentation

◆ ~Line()

icu::ParagraphLayout::Line::~Line ( )

The constructor is private since these objects can only be created by ParagraphLayout.

However, it is the clients responsibility to destroy the objects, so the destructor is public.

Stable:
ICU 3.2

Member Function Documentation

◆ countRuns()

le_int32 icu::ParagraphLayout::Line::countRuns ( ) const
inline

Count the number of visual runs in the line.

Returns
the number of visual runs.
Stable:
ICU 3.2

Definition at line 675 of file ParagraphLayout.h.

◆ getAscent()

le_int32 icu::ParagraphLayout::Line::getAscent ( ) const

Get the ascent of the line.

This is the maximum ascent of all the fonts on the line.

Returns
the ascent of the line.
Stable:
ICU 3.2

◆ getDescent()

le_int32 icu::ParagraphLayout::Line::getDescent ( ) const

Get the descent of the line.

This is the maximum descent of all the fonts on the line.

Returns
the descent of the line.
Stable:
ICU 3.2

◆ getDynamicClassID()

UClassID icu::ParagraphLayout::Line::getDynamicClassID ( ) const
inlineoverridevirtual

ICU "poor man's RTTI", returns a UClassID for the actual class.

Stable:
ICU 3.2

Reimplemented from icu::UObject.

Definition at line 159 of file ParagraphLayout.h.

◆ getLeading()

le_int32 icu::ParagraphLayout::Line::getLeading ( ) const

Get the leading of the line.

This is the maximum leading of all the fonts on the line.

Returns
the leading of the line.
Stable:
ICU 3.2

◆ getStaticClassID()

static UClassID icu::ParagraphLayout::Line::getStaticClassID ( )
inlinestatic

ICU "poor man's RTTI", returns a UClassID for this class.

Stable:
ICU 3.2

Definition at line 152 of file ParagraphLayout.h.

◆ getVisualRun()

const VisualRun * icu::ParagraphLayout::Line::getVisualRun ( le_int32  runIndex) const

Get a ParagraphLayout::VisualRun object for a given visual run in the line.

Parameters
runIndexis the index of the run, in visual order.
Returns
the ParagraphLayout::VisualRun object representing the visual run. This object is owned by the Line object which created it, and will remain valid for as long as the Line object is valid.
See also
ParagraphLayout::VisualRun
Stable:
ICU 3.2

◆ getWidth()

le_int32 icu::ParagraphLayout::Line::getWidth ( ) const

Get the width of the line.

This is a convenience method which returns the last X position of the last visual run in the line.

Returns
the width of the line.
Stable:
ICU 2.8

Friends And Related Symbol Documentation

◆ ParagraphLayout

Definition at line 169 of file ParagraphLayout.h.


The documentation for this class was generated from the following file: