HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
v1::detail::long_grapheme_table Class Reference

Public Member Functions

 long_grapheme_table (long_grapheme_table const &)=delete
 
 long_grapheme_table (long_grapheme_table &&)=delete
 
long_grapheme_tableoperator= (long_grapheme_table const &)=delete
 
long_grapheme_tableoperator= (long_grapheme_table &&)=delete
 
std::u32string get_grapheme (uint32_t start) const noexcept
 Get the grapheme from the table.
 
size_t get_grapheme_size (uint32_t start) const noexcept
 Get the size of the grapheme.
 
char32_t get_grapheme_starter (uint32_t start) const noexcept
 Get the starter (first) code-point of a grapheme.
 
template<typename CodePoints >
int32_t add_grapheme (CodePoints &&code_points) noexcept
 Find or insert a grapheme in the table.
 

Member Function Documentation

◆ add_grapheme()

template<typename CodePoints >
int32_t v1::detail::long_grapheme_table::add_grapheme ( CodePoints && code_points)
inlinenoexcept

Find or insert a grapheme in the table.

Parameters
code_pointsThe code-points forming a grapheme. The grapheme must be NFC normalized. The grapheme must be no more than 31 code-points (stream-safe).
Returns
Index where the grapheme is in the table. -1 if the table is full.

◆ get_grapheme()

std::u32string v1::detail::long_grapheme_table::get_grapheme ( uint32_t start) const
inlinenoexcept

Get the grapheme from the table.

Parameters
startThe start position of the grapheme in the table. If the start value came from another thread it is important that this was transferred properly, as this the only way that this function becomes thread safe.
Returns
The code-points of the grapheme.

◆ get_grapheme_size()

size_t v1::detail::long_grapheme_table::get_grapheme_size ( uint32_t start) const
inlinenoexcept

Get the size of the grapheme.

Parameters
startThe start position of the grapheme in the table. If the start value came from another thread it is important that this was transferred properly, as this the only way that this function becomes thread safe.
Returns
The number of code-points of the grapheme.

◆ get_grapheme_starter()

char32_t v1::detail::long_grapheme_table::get_grapheme_starter ( uint32_t start) const
inlinenoexcept

Get the starter (first) code-point of a grapheme.

Parameters
startThe start position of the grapheme in the table. If the start value came from another thread it is important that this was transferred properly, as this the only way that this function becomes thread safe.
Returns
The starter (first) code-point of the a grapheme.

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