8#include "../i18n/i18n.hpp"
9#include "../utility/utility.hpp"
17hi_export_module(hikogui.unicode.markup);
19hi_export
namespace hi {
inline namespace v1 {
57hi_export
template<std::input_or_output_iterator It, std::sentinel_for<It> ItEnd>
60 requires std::same_as<typename It::value_type, grapheme>
62 enum class state_type { idle,
command };
86 auto state = state_type::idle;
90 if (state == state_type::idle) {
93 state = state_type::command;
98 }
else if (state == state_type::command) {
102 state = state_type::idle;
104 }
else if (c ==
']') {
111 }
else if (
command.size() == 1) {
118 }
else if (
auto p = to_phrasing(
command_c)) {
139 state = state_type::idle;
158 str.erase(
it, str.end());
@ grapheme
The gui_event has grapheme data.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
hi_export constexpr It apply_markup(It first, ItEnd last, language_tag default_language=language_tag{"en-US"}, phrasing default_phrasing=phrasing::regular) noexcept
Inplace-apply markup to a string of graphemes.
Definition markup.hpp:59
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
The IETF BCP 47 language tag.
Definition language_tag_intf.hpp:30