OpenTTD Source: CoreTextParagraphLayoutFactory Class Reference

OpenTTD Source 12.0-beta1

Public Types | Static Public Member Functions | Static Public Attributes
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 ParagraphLayouter * | GetParagraphLayout (CharType *buff, CharType *buff_end, FontMap &fontMapping)
| Get the actual ParagraphLayout for the given buffer. More...
static size_t | AppendToBuffer (CharType *buff, const CharType *buffer_last, WChar c)
| Append a wide character to the internal buffer. More...

## 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 42 of file string_osx.h.

## Member Function Documentation

## ◆ AppendToBuffer()

static size_t CoreTextParagraphLayoutFactory::AppendToBuffer | ( | CharType * | buff,
|  | const CharType * | buffer_last,
|  | WChar | c
| ) |  |
| inlinestatic

Append a wide character to the internal buffer.

Parameters

  buff | The buffer to append to.
  buffer_last | The end of the buffer.
  c | The character to add.

Returns
  The number of buffer spaces that were used.

Definition at line 65 of file string_osx.h.

## ◆ GetParagraphLayout()

ParagraphLayouter * CoreTextParagraphLayoutFactory::GetParagraphLayout | ( | CharType * | buff,
|  | CharType * | buff_end,
|  | FontMap & | fontMapping
| ) |  |
| static

Get the actual ParagraphLayout for the given buffer.

Parameters

  buff | The begin of the buffer.
  buff_end | The location after the last element in the buffer.
  fontMapping | THe mapping of the fonts.

Returns
  The ParagraphLayout instance.

Definition at line 151 of file string_osx.cpp.

References _font_cache, and MacOSVersionIsAtLeast().

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

- src/os/macosx/string_osx.h
- src/os/macosx/string_osx.cpp