HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
src
ttauri
GUI
theme_book.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 "theme_mode.hpp"
8
#include "theme.hpp"
9
#include <limits>
10
#include <vector>
11
#include <new>
12
13
14
namespace
tt {
15
20
class
theme_book
{
21
public
:
22
static
inline
std::unique_ptr<theme_book>
global;
23
24
theme_book
(
std::vector<URL>
const
&theme_directories)
noexcept
;
25
26
[[nodiscard]]
std::vector<std::string>
theme_names()
const
noexcept
;
27
28
[[nodiscard]] tt::theme_mode current_theme_mode()
const
noexcept
;
29
30
void
set_current_theme_mode(tt::theme_mode theme_mode)
noexcept
;
31
32
[[nodiscard]]
std::string
current_theme_name()
const
noexcept
;
33
34
void
set_current_theme_name(
std::string
const
&themeName)
noexcept
;
35
36
private
:
37
std::vector<std::unique_ptr<theme>
> themes;
38
std::string
_current_theme_name;
39
tt::theme_mode _current_theme_mode;
40
41
static
inline
char
const
*_default_theme_name =
"TTauri"
;
42
45
void
update_theme()
noexcept
;
46
};
47
48
}
tt::theme_book
theme_book keeps track of multiple themes.
Definition
theme_book.hpp:20
std::string
std::unique_ptr
std::vector
Generated on Mon Apr 22 2024 12:53:54 for HikoGUI by
1.10.0