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

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.
 

Detailed Description

Simple wrapper around StyleValues for the array operator.

Constructor & Destructor Documentation

◆ Style()

aurore::Style::Style ( StyleValues *  values)

A handle on values (not owned).

Member Function Documentation

◆ addLength()

void aurore::Style::addLength ( const std::string &  name,
float  value 
)

Adds or changes a length of the base (StyleValues::addLength).

◆ addMetric()

void aurore::Style::addMetric ( const std::string &  name,
float  value 
)

Adds or changes a metric of the base (StyleValues::addMetric).

◆ getMetric()

float aurore::Style::getMetric ( const std::string &  name)

A metric; an unknown name is logged as an error and gives 0.

◆ getValues()

StyleValues * aurore::Style::getValues ( )
inline

The metrics behind the handle.

◆ hasMetric()

bool aurore::Style::hasMetric ( const std::string &  name)

Whether the metric exists.

◆ operator[]()

float aurore::Style::operator[] ( const std::string &  name)

The metric name (getMetric()).


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