32 #include "../../Display/2D/color.h" 33 #include "style_value_type.h" 34 #include "style_dimension.h" 71 return _value.float_value.number;
87 return _value.float_value.dimension;
97 return Colorf(_value.color[0], _value.color[1], _value.color[2], _value.color[3]);
StyleValueType type() const
Variant type.
Definition: style_get_value.h:43
value is a percentage number
static StyleGetValue from_angle(float angle, StyleDimension dimension=StyleDimension::rad)
Create style value from an angle.
Definition: style_get_value.h:150
Floating point color description class (for float).
Definition: color.h:660
static StyleGetValue from_string(const char *text)
Create style value from a string.
Definition: style_get_value.h:144
bool is_keyword(const std::string &keyword) const
Definition: style_get_value.h:108
turns (1 in a full circle)
float number() const
Value number.
Definition: style_get_value.h:60
gradians/gons/grades (400 in a full circle)
Colorf color() const
Value color.
Definition: style_get_value.h:94
static StyleGetValue from_color(const Colorf &color)
Create style value from a color.
Definition: style_get_value.h:171
bool is_angle() const
Check if value is an angle.
Definition: style_get_value.h:114
bool is_time() const
Check if value is a time.
Definition: style_get_value.h:117
static StyleGetValue from_keyword(const char *keyword)
Create style value from a keyword.
Definition: style_get_value.h:141
StyleDimension dimension
Definition: style_get_value.h:182
static StyleGetValue from_length(float length, StyleDimension dimension=StyleDimension::px)
Create style value from a length.
Definition: style_get_value.h:147
bool is_keyword() const
Check if value is a keyword.
Definition: style_get_value.h:106
bool is_undefined() const
Check if value is undefined.
Definition: style_get_value.h:103
bool is_number() const
Check if value is a number.
Definition: style_get_value.h:129
Type a
Definition: vec4.h:83
bool is_resolution() const
Check if value is a resolution.
Definition: style_get_value.h:123
bool is_color() const
Check if value is a color.
Definition: style_get_value.h:138
bool is_length() const
Check if value is a length.
Definition: style_get_value.h:111
float number
Definition: style_get_value.h:181
bool is_string() const
Check if value is a string.
Definition: style_get_value.h:132
Type r
Definition: vec4.h:80
static StyleGetValue from_resolution(float resolution, StyleDimension dimension=StyleDimension::dppx)
Create style value from a resolution.
Definition: style_get_value.h:159
StyleDimension
Unit of a style value.
Definition: style_dimension.h:34
Style value returned by style classes.
Definition: style_get_value.h:39
static StyleGetValue from_time(float t, StyleDimension dimension=StyleDimension::s)
Create style value from a time.
Definition: style_get_value.h:153
StyleValueType
Style value type.
Definition: style_value_type.h:34
const char * text
Definition: style_get_value.h:178
static StyleGetValue from_percentage(float percentage)
Create style value from a percentage.
Definition: style_get_value.h:162
static StyleGetValue from_number(float number)
Create style value from a number.
Definition: style_get_value.h:165
bool is_frequency() const
Check if value is a frequency.
Definition: style_get_value.h:120
Type b
Definition: vec4.h:82
static StyleGetValue from_frequency(float freq, StyleDimension dimension=StyleDimension::hz)
Create style value from a frequency.
Definition: style_get_value.h:156
bool is_url() const
Check if value is an url.
Definition: style_get_value.h:135
StyleDimension dimension() const
Dimension used by value.
Definition: style_get_value.h:78
bool is_keyword(const char *keyword) const
Definition: style_get_value.h:107
struct clan::StyleGetValue::@27::@28 float_value
bool is_percentage() const
Check if value is a percentage.
Definition: style_get_value.h:126
Type g
Definition: vec4.h:81
const char * text() const
Text when the type is a text string.
Definition: style_get_value.h:46
static StyleGetValue from_url(const char *url)
Create style value from an url.
Definition: style_get_value.h:168