32 #include "../../Core/Math/color.h"
33 #include "style_value_type.h"
34 #include "style_dimension.h"
bool is_resolution() const
Check if value is a resolution.
Definition: style_set_value.h:78
bool is_angle() const
Check if value is an angle.
Definition: style_set_value.h:69
static StyleSetValue from_percentage(float percentage)
Create style value from a percentage.
Definition: style_set_value.h:117
turns (1 in a full circle)
static StyleSetValue from_angle(float angle, StyleDimension dimension=StyleDimension::rad)
Create style value from an angle.
Definition: style_set_value.h:105
static StyleSetValue from_time(float t, StyleDimension dimension=StyleDimension::s)
Create style value from a time.
Definition: style_set_value.h:108
static StyleSetValue from_keyword(const std::string &keyword)
Create style value from a keyword.
Definition: style_set_value.h:96
bool is_url() const
Check if value is an url.
Definition: style_set_value.h:90
static StyleSetValue from_number(float number)
Create style value from a number.
Definition: style_set_value.h:120
Floating point color description class (for float).
Definition: color.h:630
std::string text
Text when the type is a text string.
Definition: style_set_value.h:46
StyleValueType
Style value type.
Definition: style_value_type.h:34
float number
Value number.
Definition: style_set_value.h:49
Colorf color
Value color.
Definition: style_set_value.h:55
StyleValueType type
Variant type.
Definition: style_set_value.h:43
StyleDimension
Unit of a style value.
Definition: style_dimension.h:34
bool is_number() const
Check if value is a number.
Definition: style_set_value.h:84
static StyleSetValue from_url(const std::string &url)
Create style value from an url.
Definition: style_set_value.h:123
bool is_frequency() const
Check if value is a frequency.
Definition: style_set_value.h:75
bool is_length() const
Check if value is a length.
Definition: style_set_value.h:66
Style value variable.
Definition: style_set_value.h:39
static StyleSetValue from_length(float length, StyleDimension dimension=StyleDimension::px)
Create style value from a length.
Definition: style_set_value.h:102
static StyleSetValue from_frequency(float freq, StyleDimension dimension=StyleDimension::hz)
Create style value from a frequency.
Definition: style_set_value.h:111
StyleDimension dimension
Dimension used by value.
Definition: style_set_value.h:52
static StyleSetValue from_resolution(float resolution, StyleDimension dimension=StyleDimension::dppx)
Create style value from a resolution.
Definition: style_set_value.h:114
value is a percentage number
bool is_string() const
Check if value is a string.
Definition: style_set_value.h:87
bool is_keyword(const char *keyword) const
Definition: style_set_value.h:62
bool is_time() const
Check if value is a time.
Definition: style_set_value.h:72
bool is_keyword(const std::string &keyword) const
Definition: style_set_value.h:63
bool is_keyword() const
Check if value is a keyword.
Definition: style_set_value.h:61
static StyleSetValue from_color(const Colorf &color)
Create style value from a color.
Definition: style_set_value.h:126
bool is_percentage() const
Check if value is a percentage.
Definition: style_set_value.h:81
bool is_color() const
Check if value is a color.
Definition: style_set_value.h:93
gradians/gons/grades (400 in a full circle)
Definition: Application/application.h:35
bool is_undefined() const
Check if value is undefined.
Definition: style_set_value.h:58
static StyleSetValue from_string(const std::string &text)
Create style value from a string.
Definition: style_set_value.h:99