Class · aurore

aurore::StyleValues

On this page
aurore/core/style.hpp
#include <aurore/core/style.hpp>

class aurore::StyleValues

Description

The metrics (sizes, margins, durations) by name, "aurore/sidebar/width"…: the ones the code adds, and over them a theme file's [metrics].

Constructors 2

StyleValues(std::initializer_list< std::pair< std::string, float > > list)

The base metrics, of kind OTHER.

style.hpp:84
StyleValues(std::initializer_list< StyleMetric > list)

The base metrics, each with its kind.

style.hpp:86

Functions 7

void 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.

style.hpp:90
void addLength(const std::string &name, float value)

A length of the base (kind LENGTH): it follows the density.

style.hpp:92
float 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.

style.hpp:95
float getRawMetric(const std::string &name)

The metric as written, before the density.

style.hpp:97
MetricKind getKind(const std::string &name) const

The kind of a metric (OTHER when unknown).

style.hpp:99
bool hasMetric(const std::string &name) const

Whether the metric exists.

style.hpp:101
void setOverlay(const std::unordered_map< std::string, float > &overlay)

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

style.hpp:104

Read from Aurore's headers by Doxygen at each build · library/include