#include <style_set_value.h>
Public Member Functions | |
bool | is_angle () const |
Check if value is an angle. More... | |
bool | is_color () const |
Check if value is a color. More... | |
bool | is_frequency () const |
Check if value is a frequency. More... | |
bool | is_keyword () const |
Check if value is a keyword. More... | |
bool | is_keyword (const char *keyword) const |
bool | is_keyword (const std::string &keyword) const |
bool | is_length () const |
Check if value is a length. More... | |
bool | is_number () const |
Check if value is a number. More... | |
bool | is_percentage () const |
Check if value is a percentage. More... | |
bool | is_resolution () const |
Check if value is a resolution. More... | |
bool | is_string () const |
Check if value is a string. More... | |
bool | is_time () const |
Check if value is a time. More... | |
bool | is_undefined () const |
Check if value is undefined. More... | |
bool | is_url () const |
Check if value is an url. More... | |
Static Public Member Functions | |
static StyleSetValue | from_angle (float angle, StyleDimension dimension=StyleDimension::rad) |
Create style value from an angle. More... | |
static StyleSetValue | from_color (const Colorf &color) |
Create style value from a color. More... | |
static StyleSetValue | from_frequency (float freq, StyleDimension dimension=StyleDimension::hz) |
Create style value from a frequency. More... | |
static StyleSetValue | from_keyword (const std::string &keyword) |
Create style value from a keyword. More... | |
static StyleSetValue | from_length (float length, StyleDimension dimension=StyleDimension::px) |
Create style value from a length. More... | |
static StyleSetValue | from_number (float number) |
Create style value from a number. More... | |
static StyleSetValue | from_percentage (float percentage) |
Create style value from a percentage. More... | |
static StyleSetValue | from_resolution (float resolution, StyleDimension dimension=StyleDimension::dppx) |
Create style value from a resolution. More... | |
static StyleSetValue | from_string (const std::string &text) |
Create style value from a string. More... | |
static StyleSetValue | from_time (float t, StyleDimension dimension=StyleDimension::s) |
Create style value from a time. More... | |
static StyleSetValue | from_url (const std::string &url) |
Create style value from an url. More... | |
Public Attributes | |
Colorf | color |
Value color. More... | |
StyleDimension | dimension = StyleDimension::px |
Dimension used by value. More... | |
float | number = 0.0f |
Value number. More... | |
std::string | text |
Text when the type is a text string. More... | |
StyleValueType | type = StyleValueType::undefined |
Variant type. More... | |
Style value variable.
|
inlinestatic |
Create style value from an angle.
References uicore::angle, dimension, number, type, and uicore::v.
|
inlinestatic |
Create style value from a color.
References uicore::color, color, type, and uicore::v.
|
inlinestatic |
Create style value from a frequency.
References dimension, uicore::frequency, number, type, and uicore::v.
|
inlinestatic |
Create style value from a keyword.
References uicore::keyword, text, type, and uicore::v.
|
inlinestatic |
Create style value from a length.
References dimension, uicore::length, number, type, and uicore::v.
|
inlinestatic |
Create style value from a number.
References uicore::number, number, type, and uicore::v.
|
inlinestatic |
Create style value from a percentage.
References number, uicore::percentage, type, and uicore::v.
|
inlinestatic |
Create style value from a resolution.
References dimension, number, uicore::resolution, type, and uicore::v.
|
inlinestatic |
Create style value from a string.
References uicore::string, text, type, and uicore::v.
|
inlinestatic |
|
inlinestatic |
Create style value from an url.
References text, type, uicore::url, and uicore::v.
|
inline |
Check if value is an angle.
References uicore::angle.
|
inline |
Check if value is a color.
References uicore::color.
|
inline |
Check if value is a frequency.
References uicore::frequency.
|
inline |
Check if value is a keyword.
References uicore::keyword.
|
inline |
References is_keyword(), and uicore::keyword.
Referenced by is_keyword().
|
inline |
References is_keyword(), and uicore::keyword.
Referenced by is_keyword().
|
inline |
Check if value is a length.
References uicore::length.
|
inline |
Check if value is a number.
References uicore::number.
|
inline |
Check if value is a percentage.
References uicore::percentage.
|
inline |
Check if value is a resolution.
References uicore::resolution.
|
inline |
Check if value is a string.
References uicore::string.
|
inline |
Check if value is a time.
References uicore::time.
|
inline |
Check if value is undefined.
References uicore::undefined.
|
inline |
Check if value is an url.
References uicore::url.
Colorf uicore::StyleSetValue::color |
Value color.
Referenced by from_color().
StyleDimension uicore::StyleSetValue::dimension = StyleDimension::px |
Dimension used by value.
Referenced by from_angle(), from_frequency(), from_length(), from_resolution(), and from_time().
float uicore::StyleSetValue::number = 0.0f |
Value number.
Referenced by from_angle(), from_frequency(), from_length(), from_number(), from_percentage(), from_resolution(), and from_time().
std::string uicore::StyleSetValue::text |
Text when the type is a text string.
Referenced by from_keyword(), from_string(), and from_url().
StyleValueType uicore::StyleSetValue::type = StyleValueType::undefined |
Variant type.
Referenced by from_angle(), from_color(), from_frequency(), from_keyword(), from_length(), from_number(), from_percentage(), from_resolution(), from_string(), from_time(), and from_url().