|
OpenTTD
|
String iterator using CoreText as a backend. More...
#include <string_osx.h>
Data Structures | |
| struct | CharInfo |
| Break info for a character. More... | |
Public Member Functions | |
| virtual void | SetString (const char *s) |
| Set a new iteration string. More... | |
| virtual size_t | SetCurPosition (size_t pos) |
| Change the current string cursor. More... | |
| virtual size_t | Next (IterType what) |
| Advance the cursor by one iteration unit. More... | |
| virtual size_t | Prev (IterType what) |
| Move the cursor back by one iteration unit. More... | |
Static Public Member Functions | |
| static StringIterator * | Create () |
Static Public Member Functions inherited from StringIterator | |
| static StringIterator * | Create () |
| Create a new iterator instance. More... | |
Private Attributes | |
| std::vector< CharInfo > | str_info |
| Break information for each code point. | |
| std::vector< size_t > | utf16_to_utf8 |
| Mapping from UTF-16 code point position to index in the UTF-8 source string. | |
| size_t | cur_pos |
| Current iteration position. | |
Additional Inherited Members | |
Public Types inherited from StringIterator | |
| enum | IterType { ITER_CHARACTER, ITER_WORD } |
| Type of the iterator. More... | |
Static Public Attributes inherited from StringIterator | |
| static const size_t | END = SIZE_MAX |
| Sentinel to indicate end-of-iteration. More... | |
String iterator using CoreText as a backend.
Definition at line 20 of file string_osx.h.
|
virtual |
Advance the cursor by one iteration unit.
Implements StringIterator.
Definition at line 397 of file string_osx.cpp.
|
virtual |
Move the cursor back by one iteration unit.
Implements StringIterator.
Definition at line 411 of file string_osx.cpp.
|
virtual |
Change the current string cursor.
| pos | New cursor position. |
Implements StringIterator.
Definition at line 379 of file string_osx.cpp.
|
virtual |
Set a new iteration string.
Must also be called if the string contents changed. The cursor is reset to the start of the string.
| s | New string. |
< UTF-16 copy of the string.
Implements StringIterator.
Definition at line 317 of file string_osx.cpp.