|
Aurore
A Switch-like interface for your app, on every screen
|
Simple wrapper around StyleValues for the array operator. More...
#include <aurore/core/style.hpp>
Public Member Functions | |
| Style (StyleValues *values) | |
A handle on values (not owned). | |
| float | operator[] (const std::string &name) |
The metric name (getMetric()). | |
| void | addMetric (const std::string &name, float value) |
| Adds or changes a metric of the base (StyleValues::addMetric). | |
| void | addLength (const std::string &name, float value) |
| Adds or changes a length of the base (StyleValues::addLength). | |
| float | getMetric (const std::string &name) |
| A metric; an unknown name is logged as an error and gives 0. | |
| bool | hasMetric (const std::string &name) |
| Whether the metric exists. | |
| StyleValues * | getValues () |
| The metrics behind the handle. | |
Simple wrapper around StyleValues for the array operator.
| aurore::Style::Style | ( | StyleValues * | values | ) |
A handle on values (not owned).
| void aurore::Style::addLength | ( | const std::string & | name, |
| float | value | ||
| ) |
Adds or changes a length of the base (StyleValues::addLength).
| void aurore::Style::addMetric | ( | const std::string & | name, |
| float | value | ||
| ) |
Adds or changes a metric of the base (StyleValues::addMetric).
| float aurore::Style::getMetric | ( | const std::string & | name | ) |
A metric; an unknown name is logged as an error and gives 0.
|
inline |
The metrics behind the handle.
| bool aurore::Style::hasMetric | ( | const std::string & | name | ) |
Whether the metric exists.
| float aurore::Style::operator[] | ( | const std::string & | name | ) |
The metric name (getMetric()).