59 label &operator=(
label const &other)
noexcept =
default;
61 label &operator=(
label &&other)
noexcept =
default;
70 return lhs.icon == rhs.icon and lhs.text == rhs.text;
80 return lhs << to_string(rhs);
90template<
typename CharT>
91struct std::formatter<tt::label, CharT> : std::formatter<std::string_view, CharT> {
94 return std::formatter<std::string_view, CharT>::format(
to_string(t), fc);
An image, in different formats.
Definition icon.hpp:19
A localizable message.
Definition l10n.hpp:149
A label consisting of localizable text and an icon.
Definition label.hpp:27
friend bool operator==(label const &lhs, label const &rhs) noexcept
Compare if both labels are equal.
Definition label.hpp:68
tt::icon icon
The icon.
Definition label.hpp:31
constexpr label() noexcept
Construct a empty label.
Definition label.hpp:56
l10n text
Localizable text.
Definition label.hpp:36
label(tt::icon icon, l10n text) noexcept
Construct a new label from an icon and text.
Definition label.hpp:42
label(l10n text) noexcept
Construct a new label from text.
Definition label.hpp:47
label(tt::icon icon) noexcept
Construct a new label from an icon.
Definition label.hpp:52