Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::ThemeValues Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ThemeValues()

aurore::ThemeValues::ThemeValues ( std::initializer_list< std::pair< std::string, NVGcolor > >  list)

The base colours.

Member Function Documentation

◆ addColor()

void aurore::ThemeValues::addColor ( const std::string &  ,
NVGcolor  color 
)

A colour of the base: what the variant is without a theme file.

◆ getBaseColors()

const std::unordered_map< std::string, NVGcolor > & aurore::ThemeValues::getBaseColors ( ) const
inline

◆ getColor()

NVGcolor aurore::ThemeValues::getColor ( const std::string &  )

A colour as drawn now; an unknown key is fatal (check with hasColor()).

◆ getColors()

const std::unordered_map< std::string, NVGcolor > & aurore::ThemeValues::getColors ( ) const
inline

Every colour as drawn now, and the base alone.

◆ hasColor()

bool aurore::ThemeValues::hasColor ( const std::string &  ) const

Whether the key exists.

◆ setOverlay()

void aurore::ThemeValues::setOverlay ( const std::unordered_map< std::string, NVGcolor > &  overlay)

The theme file's colours, over the base (empty: the base alone).


The documentation for this class was generated from the following file: