8#include "../utility/utility.hpp"
9#include "../font/font.hpp"
10#include "../unicode/unicode.hpp"
11#include "../container/container.hpp"
12#include "../macros.hpp"
13#include "text_style.hpp"
18hi_export_module(hikogui.text : text_style_set);
20hi_export
namespace hi {
inline namespace v1 {
34 [[nodiscard]]
constexpr bool empty()
const noexcept
36 return _text_styles.empty();
41 auto r = text_style{};
43 for (
auto const &[mask,
style] : _text_styles) {
44 if (matches(mask, attributes)) {
49 hi_assert(r.complete());
55 return get(attributes);
58 [[nodiscard]] text_style
const& front()
const
60 hi_assert(not _text_styles.empty());
61 return _text_styles.front().second;
64 constexpr void clear()
noexcept
71 _text_styles.emplace_back(mask,
style);
The HikoGUI namespace.
Definition array_generic.hpp:21
The HikoGUI API version 1.
Definition array_generic.hpp:22
A text-style-set includes styles for displaying text with markup.
Definition text_style_set.hpp:25
Definition grapheme_attributes.hpp:16
Definition grapheme_attributes.hpp:32