OpenTTD
CoreTextParagraphLayout::CoreTextLine Class Reference

A single line worth of VisualRuns. More...

Inheritance diagram for CoreTextParagraphLayout::CoreTextLine:
AutoDeleteSmallVector< CoreTextVisualRun *, 4 > ParagraphLayouter::Line SmallVector< CoreTextVisualRun *, S >

Public Member Functions

 CoreTextLine (CTLineRef line, const FontMap &fontMapping, const CoreTextParagraphLayoutFactory::CharType *buff)
 
virtual int GetLeading () const
 Get the height of the line. More...
 
virtual int GetWidth () const
 Get the width of this line. More...
 
virtual int CountRuns () const
 
virtual const VisualRunGetVisualRun (int run) const
 
int GetInternalCharLength (WChar c) const
 
- Public Member Functions inherited from AutoDeleteSmallVector< CoreTextVisualRun *, 4 >
void Clear ()
 Remove all items from the list.
 
- Public Member Functions inherited from SmallVector< CoreTextVisualRun *, S >
 SmallVector (const SmallVector &other)
 Copy constructor. More...
 
 SmallVector (const SmallVector< CoreTextVisualRun *, X > &other)
 Generic copy constructor. More...
 
SmallVectoroperator= (const SmallVector &other)
 Assignment. More...
 
SmallVectoroperator= (const SmallVector< CoreTextVisualRun *, X > &other)
 Generic assignment. More...
 
void Assign (const SmallVector< CoreTextVisualRun *, X > &other)
 Assign items from other vector.
 
void Clear ()
 Remove all items from the list.
 
void Reset ()
 Remove all items from the list and free allocated memory.
 
void Compact ()
 Compact the list down to the smallest block size boundary.
 
CoreTextVisualRun * * Append (uint to_add=1)
 Append an item and return it. More...
 
void Resize (uint num_items)
 Set the size of the vector, effectively truncating items from the end or appending uninitialised ones. More...
 
CoreTextVisualRun * * Insert (CoreTextVisualRun * *item)
 Insert a new item at a specific position into the vector, moving all following items. More...
 
const CoreTextVisualRun * * Find (const CoreTextVisualRun * &item) const
 Search for the first occurrence of an item. More...
 
CoreTextVisualRun * * Find (const CoreTextVisualRun * &item)
 Search for the first occurrence of an item. More...
 
int FindIndex (const CoreTextVisualRun * &item) const
 Search for the first occurrence of an item. More...
 
bool Contains (const CoreTextVisualRun * &item) const
 Tests whether a item is present in the vector. More...
 
void Erase (CoreTextVisualRun * *item)
 Removes given item from this vector. More...
 
void ErasePreservingOrder (uint pos, uint count=1)
 Remove items from the vector while preserving the order of other items. More...
 
void ErasePreservingOrder (CoreTextVisualRun * *item, uint count=1)
 Remove items from the vector while preserving the order of other items. More...
 
bool Include (const CoreTextVisualRun * &item)
 Tests whether a item is present in the vector, and appends it to the end if not. More...
 
uint Length () const
 Get the number of items in the list. More...
 
const CoreTextVisualRun * * Begin () const
 Get the pointer to the first item (const) More...
 
CoreTextVisualRun * * Begin ()
 Get the pointer to the first item. More...
 
const CoreTextVisualRun * * End () const
 Get the pointer behind the last valid item (const) More...
 
CoreTextVisualRun * * End ()
 Get the pointer behind the last valid item. More...
 
const CoreTextVisualRun * * Get (uint index) const
 Get the pointer to item "number" (const) More...
 
CoreTextVisualRun * * Get (uint index)
 Get the pointer to item "number". More...
 
const CoreTextVisualRun * & operator[] (uint index) const
 Get item "number" (const) More...
 
CoreTextVisualRun * & operator[] (uint index)
 Get item "number". More...
 

Additional Inherited Members

- Protected Attributes inherited from SmallVector< CoreTextVisualRun *, S >
CoreTextVisualRun * * data
 The pointer to the first item.
 
uint items
 The number of items stored.
 
uint capacity
 The available space for storing items.
 

Detailed Description

A single line worth of VisualRuns.

Definition at line 68 of file string_osx.cpp.

Member Function Documentation

◆ GetLeading()

int CoreTextParagraphLayout::CoreTextLine::GetLeading ( ) const
virtual

Get the height of the line.

Returns
The maximum height of the line.

Implements ParagraphLayouter::Line.

Definition at line 243 of file string_osx.cpp.

References max().

◆ GetWidth()

int CoreTextParagraphLayout::CoreTextLine::GetWidth ( ) const
virtual

Get the width of this line.

Returns
The width of the line.

Implements ParagraphLayouter::Line.

Definition at line 257 of file string_osx.cpp.


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