|
Aurore
A Switch-like interface for your app, on every screen
|
#include <aurore/core/theme.hpp>
Public Member Functions | |
| ThemeValues (std::initializer_list< std::pair< std::string, NVGcolor > > list) | |
| The base colours. | |
| void | addColor (const std::string &, NVGcolor color) |
| A colour of the base: what the variant is without a theme file. | |
| NVGcolor | getColor (const std::string &) |
| A colour as drawn now; an unknown key is fatal (check with hasColor()). | |
| bool | hasColor (const std::string &) const |
| Whether the key exists. | |
| void | setOverlay (const std::unordered_map< std::string, NVGcolor > &overlay) |
| The theme file's colours, over the base (empty: the base alone). | |
| const std::unordered_map< std::string, NVGcolor > & | getColors () const |
| Every colour as drawn now, and the base alone. | |
| const std::unordered_map< std::string, NVGcolor > & | getBaseColors () const |
One variant's colours by key ("aurore/text", "cadran/teal"…): the ones the code adds (the base), and over them the ones of the theme file in use.
| aurore::ThemeValues::ThemeValues | ( | std::initializer_list< std::pair< std::string, NVGcolor > > | list | ) |
The base colours.
| void aurore::ThemeValues::addColor | ( | const std::string & | , |
| NVGcolor | color | ||
| ) |
A colour of the base: what the variant is without a theme file.
|
inline |
| NVGcolor aurore::ThemeValues::getColor | ( | const std::string & | ) |
A colour as drawn now; an unknown key is fatal (check with hasColor()).
|
inline |
Every colour as drawn now, and the base alone.
| bool aurore::ThemeValues::hasColor | ( | const std::string & | ) | const |
Whether the key exists.
| void aurore::ThemeValues::setOverlay | ( | const std::unordered_map< std::string, NVGcolor > & | overlay | ) |
The theme file's colours, over the base (empty: the base alone).