|
Aurore
A Switch-like interface for your app, on every screen
|
#include <aurore/core/style.hpp>
Public Member Functions | |
| StyleValues (std::initializer_list< std::pair< std::string, float > > list) | |
| The base metrics, of kind OTHER. | |
| StyleValues (std::initializer_list< StyleMetric > list) | |
| The base metrics, each with its kind. | |
| void | addMetric (const std::string &, float value) |
| void | addLength (const std::string &name, float value) |
| A length of the base (kind LENGTH): it follows the density. | |
| float | getMetric (const std::string &name) |
| float | getRawMetric (const std::string &name) |
| The metric as written, before the density. | |
| MetricKind | getKind (const std::string &name) const |
| The kind of a metric (OTHER when unknown). | |
| bool | hasMetric (const std::string &name) const |
| Whether the metric exists. | |
| void | setOverlay (const std::unordered_map< std::string, float > &overlay) |
| The theme file's metrics, over the base (empty: the base alone). | |
The metrics (sizes, margins, durations) by name, "aurore/sidebar/width"…: the ones the code adds, and over them a theme file's [metrics].
| aurore::StyleValues::StyleValues | ( | std::initializer_list< std::pair< std::string, float > > | list | ) |
The base metrics, of kind OTHER.
| aurore::StyleValues::StyleValues | ( | std::initializer_list< StyleMetric > | list | ) |
The base metrics, each with its kind.
| void aurore::StyleValues::addLength | ( | const std::string & | name, |
| float | value | ||
| ) |
A length of the base (kind LENGTH): it follows the density.
| void aurore::StyleValues::addMetric | ( | const std::string & | , |
| float | value | ||
| ) |
A metric of the base: what it is without a theme file. A name already known keeps its kind; a new one is of kind OTHER.
| MetricKind aurore::StyleValues::getKind | ( | const std::string & | name | ) | const |
The kind of a metric (OTHER when unknown).
| float aurore::StyleValues::getMetric | ( | const std::string & | name | ) |
A metric, a length at the density in use; an unknown name is logged as an error and gives 0.
| float aurore::StyleValues::getRawMetric | ( | const std::string & | name | ) |
The metric as written, before the density.
| bool aurore::StyleValues::hasMetric | ( | const std::string & | name | ) | const |
Whether the metric exists.
| void aurore::StyleValues::setOverlay | ( | const std::unordered_map< std::string, float > & | overlay | ) |
The theme file's metrics, over the base (empty: the base alone).