view include/gui/theme.h @ 291:9a88e1725fd2

*: refactor lots of stuff I forgot to put this into different commits, oops! anyway, it doesn't really matter *that* much since this is an unfinished hobby project anyway. once it starts getting stable commit history will be more important, but for now it's not that big of a deal
author Paper <paper@paper.us.eu.org>
date Sun, 12 May 2024 16:31:07 -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_