|
OpenTTD Source 20260311-master-g511d3794ce
|
Wrapper for doing layouts with CoreText. More...
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 |
| Reset the position to the start of the paragraph. | |
| std::unique_ptr< const Line > | NextLine (int max_width) override |
| Construct a new line with a maximum width. | |
| Public Member Functions inherited from ParagraphLayouter | |
| virtual | ~ParagraphLayouter ()=default |
| Ensure the destructor of the sub classes are called as well. | |
Private Attributes | |
| const CoreTextParagraphLayoutFactory::CharType * | text_buffer |
| ptrdiff_t | length |
| const FontMap & | font_map |
| CFAutoRelease< CTTypesetterRef > | typesetter |
| CFIndex | cur_offset = 0 |
| Offset from the start of the current run from where to output. | |
Wrapper for doing layouts with CoreText.
Definition at line 33 of file string_osx.cpp.
|
inline |
Definition at line 97 of file string_osx.cpp.
|
overridevirtual |
Construct a new line with a maximum width.
| max_width | The maximum width of the string. |
nullptr when at the end of the paragraph. Implements ParagraphLayouter.
Definition at line 191 of file string_osx.cpp.
References cur_offset.
|
inlineoverridevirtual |
Reset the position to the start of the paragraph.
Implements ParagraphLayouter.
Definition at line 102 of file string_osx.cpp.
|
private |
Offset from the start of the current run from where to output.
Definition at line 41 of file string_osx.cpp.
Referenced by NextLine().
|
private |
Definition at line 37 of file string_osx.cpp.
|
private |
Definition at line 36 of file string_osx.cpp.
|
private |
Definition at line 35 of file string_osx.cpp.
|
private |
Definition at line 39 of file string_osx.cpp.