OpenTTD Source 20241224-master-gee860a5c8e
CoreTextParagraphLayout Class Reference

Wrapper for doing layouts with CoreText. More...

Inheritance diagram for CoreTextParagraphLayout:
ParagraphLayouter

Data Structures

class  CoreTextLine
 A single line worth of VisualRuns. More...
 
class  CoreTextVisualRun
 Visual run contains data about the bit of text with the same font. More...
 

Public Member Functions

 CoreTextParagraphLayout (CFAutoRelease< CTTypesetterRef > typesetter, const CoreTextParagraphLayoutFactory::CharType *buffer, ptrdiff_t len, const FontMap &font_mapping)
 
void Reflow () override
 
std::unique_ptr< const LineNextLine (int max_width) override
 

Private Attributes

const CoreTextParagraphLayoutFactory::CharTypetext_buffer
 
ptrdiff_t length
 
const FontMapfont_map
 
CFAutoRelease< CTTypesetterRef > typesetter
 
CFIndex cur_offset = 0
 Offset from the start of the current run from where to output.
 

Detailed Description

Wrapper for doing layouts with CoreText.

Definition at line 59 of file string_osx.cpp.

Constructor & Destructor Documentation

◆ CoreTextParagraphLayout()

CoreTextParagraphLayout::CoreTextParagraphLayout ( CFAutoRelease< CTTypesetterRef >  typesetter,
const CoreTextParagraphLayoutFactory::CharType buffer,
ptrdiff_t  len,
const FontMap font_mapping 
)
inline

Definition at line 123 of file string_osx.cpp.

Member Function Documentation

◆ NextLine()

std::unique_ptr< const ParagraphLayouter::Line > CoreTextParagraphLayout::NextLine ( int  max_width)
overridevirtual

Implements ParagraphLayouter.

Definition at line 215 of file string_osx.cpp.

◆ Reflow()

void CoreTextParagraphLayout::Reflow ( )
inlineoverridevirtual

Implements ParagraphLayouter.

Definition at line 128 of file string_osx.cpp.

Field Documentation

◆ cur_offset

CFIndex CoreTextParagraphLayout::cur_offset = 0
private

Offset from the start of the current run from where to output.

Definition at line 67 of file string_osx.cpp.

◆ font_map

const FontMap& CoreTextParagraphLayout::font_map
private

Definition at line 63 of file string_osx.cpp.

◆ length

ptrdiff_t CoreTextParagraphLayout::length
private

Definition at line 62 of file string_osx.cpp.

◆ text_buffer

const CoreTextParagraphLayoutFactory::CharType* CoreTextParagraphLayout::text_buffer
private

Definition at line 61 of file string_osx.cpp.

◆ typesetter

CFAutoRelease<CTTypesetterRef> CoreTextParagraphLayout::typesetter
private

Definition at line 65 of file string_osx.cpp.


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