view include/gui/theme.h @ 369:47c9f8502269

*: clang-format all the things I've edited the formatting a bit. Now pointer asterisks (and reference ampersands) are on the variable instead of the type, as well as having newlines for function braces (but nothing else)
author Paper <paper@tflc.us>
date Fri, 25 Jul 2025 10:16:02 -0400
parents 657fda1b9cac
children
line wrap: on
line source

#ifndef MINORI_GUI_THEME_H_
#define MINORI_GUI_THEME_H_

#include <array>

namespace Theme {

enum class Theme {
	Default,
	Light,
	Dark
};

constexpr std::array<Theme, 3> Themes{Theme::Default, Theme::Light, Theme::Dark};

class ThemeManager final {
public:
	ThemeManager(Theme theme = Theme::Default);
	void SetTheme(Theme theme);
	Theme GetTheme() const;
	bool IsInDarkTheme() const;
	void RepaintCurrentTheme();

private:
	void SetToDarkTheme();
	void SetToLightTheme();
	void SetStyleSheet(Theme theme);
	Theme GetCurrentOSTheme() const;
	Theme theme;
};

} // namespace Theme

#endif // MINORI_GUI_THEME_H_