HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
theme_mode.hpp
1// Copyright Take Vos 2020.
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 "../required.hpp"
8#include "../assert.hpp"
9#include <string>
10#include <ostream>
11
12namespace tt {
13
14enum class theme_mode {
15 light,
16 dark
17};
18
19[[nodiscard]] constexpr char const *to_const_string(theme_mode rhs) noexcept {
20 switch (rhs) {
21 case theme_mode::light: return "light";
22 case theme_mode::dark: return "dark";
23 default: tt_no_default();
24 }
25}
26
27[[nodiscard]] inline std::string to_string(theme_mode rhs) noexcept {
28 return to_const_string(rhs);
29}
30
31inline std::ostream &operator<<(std::ostream &lhs, theme_mode rhs) {
32 return lhs << to_const_string(rhs);
33}
34
35
36theme_mode read_os_theme_mode() noexcept;
37
38}
T to_string(T... args)