OpenTTD
Public Member Functions
FallbackParagraphLayout::FallbackLine Class Reference

A single line worth of VisualRuns. More...

Inheritance diagram for FallbackParagraphLayout::FallbackLine:
AutoDeleteSmallVector< FallbackVisualRun *, 4 > ParagraphLayouter::Line SmallVector< FallbackVisualRun *, S >

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from SmallVector< FallbackVisualRun *, S >
FallbackVisualRun ** 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 264 of file gfx_layout.cpp.

Member Function Documentation

int FallbackParagraphLayout::FallbackLine::CountRuns ( ) const
virtual

Get the number of runs in this line.

Returns
The number of runs.

Implements ParagraphLayouter::Line.

Definition at line 406 of file gfx_layout.cpp.

int FallbackParagraphLayout::FallbackLine::GetLeading ( ) const
virtual

Get the height of the line.

Returns
The maximum height of the line.

Implements ParagraphLayouter::Line.

Definition at line 375 of file gfx_layout.cpp.

References max().

const ParagraphLayouter::VisualRun * FallbackParagraphLayout::FallbackLine::GetVisualRun ( int  run) const
virtual

Get a specific visual run.

Returns
The visual run.

Implements ParagraphLayouter::Line.

Definition at line 415 of file gfx_layout.cpp.

int FallbackParagraphLayout::FallbackLine::GetWidth ( ) const
virtual

Get the width of this line.

Returns
The width of the line.

Implements ParagraphLayouter::Line.

Definition at line 389 of file gfx_layout.cpp.

Referenced by FallbackParagraphLayout::NextLine().


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