8#include "../assert.hpp"
9#include "../enum_metadata.hpp"
13namespace hi::inline
v1 {
15enum class theme_mode { light, dark };
17constexpr auto theme_mode_metadata = enum_metadata{theme_mode::light,
"light", theme_mode::dark,
"dark"};
19[[nodiscard]]
inline std::string_view
to_string(theme_mode rhs)
noexcept
21 return theme_mode_metadata[rhs];
26 return lhs << theme_mode_metadata[rhs];
31template<
typename CharT>
32struct std::formatter<
hi::theme_mode, CharT> : std::formatter<std::string_view, CharT> {
33 auto format(hi::theme_mode
const &t,
auto &fc)
35 return std::formatter<std::string_view, CharT>::format(hi::theme_mode_metadata[t], fc);
Utilities used by the HikoGUI library itself.
DOXYGEN BUG.
Definition algorithm.hpp:15
The HikoGUI namespace.
Definition ascii.hpp:19