OpenTTD Source 20241224-master-gee860a5c8e
CoreTextParagraphLayoutFactory Class Reference

Helper class to construct a new CoreTextParagraphLayout. More...

#include <string_osx.h>

Public Types

typedef UniChar CharType
 Helper for GetLayouter, to get the right type.
 

Static Public Member Functions

static std::unique_ptr< ParagraphLayouterGetParagraphLayout (CharType *buff, CharType *buff_end, FontMap &font_mapping)
 Get the actual ParagraphLayout for the given buffer.
 
static size_t AppendToBuffer (CharType *buff, const CharType *buffer_last, char32_t c)
 Append a wide character to the internal buffer.
 

Static Public Attributes

static const bool SUPPORTS_RTL = true
 Helper for GetLayouter, to get whether the layouter supports RTL.
 

Detailed Description

Helper class to construct a new CoreTextParagraphLayout.

Definition at line 41 of file string_osx.h.

Member Typedef Documentation

◆ CharType

Helper for GetLayouter, to get the right type.

Definition at line 44 of file string_osx.h.

Member Function Documentation

◆ AppendToBuffer()

static size_t CoreTextParagraphLayoutFactory::AppendToBuffer ( CharType buff,
const CharType buffer_last,
char32_t  c 
)
inlinestatic

Append a wide character to the internal buffer.

Parameters
buffThe buffer to append to.
buffer_lastThe end of the buffer.
cThe character to add.
Returns
The number of buffer spaces that were used.

Definition at line 64 of file string_osx.h.

◆ GetParagraphLayout()

std::unique_ptr< ParagraphLayouter > CoreTextParagraphLayoutFactory::GetParagraphLayout ( CharType buff,
CharType buff_end,
FontMap font_mapping 
)
static

Get the actual ParagraphLayout for the given buffer.

Parameters
buffThe begin of the buffer.
buff_endThe location after the last element in the buffer.
font_mappingThe mapping of the fonts.
Returns
The ParagraphLayout instance.

Definition at line 151 of file string_osx.cpp.

References _font_cache, and MacOSVersionIsAtLeast().

Field Documentation

◆ SUPPORTS_RTL

const bool CoreTextParagraphLayoutFactory::SUPPORTS_RTL = true
static

Helper for GetLayouter, to get whether the layouter supports RTL.

Definition at line 46 of file string_osx.h.


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