|
HikoGUI
A low latency retained GUI
|
Public Types | |
| using | callback_ptr_type = typename notifier<void()>::callback_ptr_type |
Public Member Functions | |
| language (language_tag tag) noexcept | |
| language (language const &)=delete | |
| language (language &&)=delete | |
| language & | operator= (language const &)=delete |
| language & | operator= (language &&)=delete |
| ssize_t | plurality (long long n, ssize_t max) const noexcept |
Static Public Member Functions | |
| static language * | find (language_tag const &tag) noexcept |
| static std::vector< language * > | preferred_languages () |
| static language & | find_or_create (language_tag const &tag) noexcept |
| static std::vector< language_tag > | add_short_names (std::vector< language_tag > tags) noexcept |
| Add short language names to the list of names. | |
| static void | set_preferred_languages (std::vector< language_tag > tags) noexcept |
| static std::vector< language_tag > | read_os_preferred_languages () noexcept |
| Get the preferred language tags from the operating system. | |
| static callback_ptr_type | subscribe (callback_ptr_type const &callback) noexcept |
|
template<typename Callback > requires (std::is_invocable_v<Callback>) | |
| static callback_ptr_type | subscribe (Callback &&callback) noexcept |
| static void | unsubscribe (callback_ptr_type const &callback) noexcept |
Data Fields | |
| language_tag | tag |
| std::function< int(int)> | plurality_func |
|
inlinestaticnoexcept |
Add short language names to the list of names.
The short names are inserted right after a consecutive group of long names with the same short name.
|
staticnoexcept |
Get the preferred language tags from the operating system.
Language tags are based on IETF BCP-47/RFC-5646