HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
ThemeBook.hpp
1// Copyright 2020 Pokitec
2// All rights reserved.
3
4#pragma once
5
6#include "TTauri/GUI/ThemeMode.hpp"
7#include "TTauri/GUI/Theme.hpp"
8#include <limits>
9#include <vector>
10#include <new>
11
12
13namespace tt {
14
19class ThemeBook {
21 std::string _themeName;
22 ThemeMode _themeMode;
23
24 static inline char const *defaultThemeName = "TTauri";
25
26public:
27 ThemeBook(std::vector<URL> const &theme_directories) noexcept;
28
29 [[nodiscard]] std::vector<std::string> themeNames() const noexcept;
30
31 [[nodiscard]] ThemeMode themeMode() const noexcept;
32
33 void setThemeMode(ThemeMode themeMode) noexcept;
34
35 [[nodiscard]] std::string themeName() const noexcept;
36
37 void setThemeName(std::string const &themeName) noexcept;
38
39 void updateTheme() noexcept;
40};
41
45inline ThemeBook *themeBook;
46
47}
ThemeBook keeps track of multiple themes.
Definition ThemeBook.hpp:19