OpenTTD Source 20260206-master-g4d4e37dbf1
CoreTextParagraphLayout Class Reference

Wrapper for doing layouts with CoreText. More...

Inheritance diagram for CoreTextParagraphLayout:
ParagraphLayouter

Data Structures

class  CoreTextVisualRun
 Visual run contains data about the bit of text with the same font. More...
class  CoreTextLine
 A single line worth of VisualRuns. 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 33 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 97 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 187 of file string_osx.cpp.

◆ Reflow()

void CoreTextParagraphLayout::Reflow ( )
inlineoverridevirtual

Implements ParagraphLayouter.

Definition at line 102 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 41 of file string_osx.cpp.

◆ font_map

const FontMap& CoreTextParagraphLayout::font_map
private

Definition at line 37 of file string_osx.cpp.

◆ length

ptrdiff_t CoreTextParagraphLayout::length
private

Definition at line 36 of file string_osx.cpp.

◆ text_buffer

const CoreTextParagraphLayoutFactory::CharType* CoreTextParagraphLayout::text_buffer
private

Definition at line 35 of file string_osx.cpp.

◆ typesetter

CFAutoRelease<CTTypesetterRef> CoreTextParagraphLayout::typesetter
private

Definition at line 39 of file string_osx.cpp.


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