HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
hikogui
theme
theme_mode.hpp
1
// Copyright Take Vos 2020-2021.
2
// Distributed under the Boost Software License, Version 1.0.
3
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5
#pragma once
6
7
#include "../utility/module.hpp"
8
#include <string>
9
#include <ostream>
10
11
namespace
hi::inline
v1
{
12
13
enum class
theme_mode {
light
, dark };
14
15
constexpr
auto
theme_mode_metadata = enum_metadata{theme_mode::light,
"light"
, theme_mode::dark,
"dark"
};
16
17
[[nodiscard]]
inline
std::string_view
to_string
(theme_mode rhs)
noexcept
18
{
19
return
theme_mode_metadata[rhs];
20
}
21
22
inline
std::ostream
&operator<<(
std::ostream
&lhs, theme_mode rhs)
23
{
24
return
lhs << theme_mode_metadata[rhs];
25
}
26
27
}
// namespace hi::inline v1
28
29
template
<
typename
CharT>
30
struct
std::formatter<
hi
::theme_mode, CharT> : std::formatter<std::string_view, CharT> {
31
auto
format(hi::theme_mode
const
&t,
auto
&fc)
32
{
33
return
std::formatter<std::string_view, CharT>::format(hi::theme_mode_metadata[t], fc);
34
}
35
};
v1
DOXYGEN BUG.
Definition
algorithm.hpp:13
v1::font_weight::light
@ light
300: Light
hi
geometry/margins.hpp
Definition
cache.hpp:11
std::ostream
std::to_string
T to_string(T... args)
Generated on Mon Apr 22 2024 12:52:52 for HikoGUI by
1.10.0