Style value returned by style classes. More...

#include <style_get_value.h>

Public Member Functions

Colorf color () const
 Value color. More...
 
StyleDimension dimension () const
 Dimension used by value. More...
 
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...
 
float number () const
 Value number. More...
 
const char * text () const
 Text when the type is a text string. More...
 
StyleValueType type () const
 Variant type. More...
 

Static Public Member Functions

static StyleGetValue from_angle (float angle, StyleDimension dimension=StyleDimension::rad)
 Create style value from an angle. More...
 
static StyleGetValue from_color (const Colorf &color)
 Create style value from a color. More...
 
static StyleGetValue from_frequency (float freq, StyleDimension dimension=StyleDimension::hz)
 Create style value from a frequency. More...
 
static StyleGetValue from_keyword (const char *keyword)
 Create style value from a keyword. More...
 
static StyleGetValue from_length (float length, StyleDimension dimension=StyleDimension::px)
 Create style value from a length. More...
 
static StyleGetValue from_number (float number)
 Create style value from a number. More...
 
static StyleGetValue from_percentage (float percentage)
 Create style value from a percentage. More...
 
static StyleGetValue from_resolution (float resolution, StyleDimension dimension=StyleDimension::dppx)
 Create style value from a resolution. More...
 
static StyleGetValue from_string (const char *text)
 Create style value from a string. More...
 
static StyleGetValue from_time (float t, StyleDimension dimension=StyleDimension::s)
 Create style value from a time. More...
 
static StyleGetValue from_url (const char *url)
 Create style value from an url. More...
 

Detailed Description

Style value returned by style classes.

Member Function Documentation

◆ color()

Colorf clan::StyleGetValue::color ( ) const
inline

Value color.

References clan::color.

◆ dimension()

StyleDimension clan::StyleGetValue::dimension ( ) const
inline

Dimension used by value.

References clan::angle, clan::frequency, clan::length, clan::px, clan::resolution, and clan::time.

◆ from_angle()

static StyleGetValue clan::StyleGetValue::from_angle ( float  angle,
StyleDimension  dimension = StyleDimension::rad 
)
inlinestatic

Create style value from an angle.

References clan::angle, dimension, and clan::v.

◆ from_color()

static StyleGetValue clan::StyleGetValue::from_color ( const Colorf color)
inlinestatic

Create style value from a color.

References clan::color, color, and clan::v.

◆ from_frequency()

static StyleGetValue clan::StyleGetValue::from_frequency ( float  freq,
StyleDimension  dimension = StyleDimension::hz 
)
inlinestatic

Create style value from a frequency.

References dimension, clan::frequency, and clan::v.

◆ from_keyword()

static StyleGetValue clan::StyleGetValue::from_keyword ( const char *  keyword)
inlinestatic

Create style value from a keyword.

References clan::keyword, and clan::v.

◆ from_length()

static StyleGetValue clan::StyleGetValue::from_length ( float  length,
StyleDimension  dimension = StyleDimension::px 
)
inlinestatic

Create style value from a length.

References dimension, clan::length, and clan::v.

◆ from_number()

static StyleGetValue clan::StyleGetValue::from_number ( float  number)
inlinestatic

Create style value from a number.

References clan::number, number, and clan::v.

◆ from_percentage()

static StyleGetValue clan::StyleGetValue::from_percentage ( float  percentage)
inlinestatic

Create style value from a percentage.

References clan::percentage, and clan::v.

◆ from_resolution()

static StyleGetValue clan::StyleGetValue::from_resolution ( float  resolution,
StyleDimension  dimension = StyleDimension::dppx 
)
inlinestatic

Create style value from a resolution.

References dimension, clan::resolution, and clan::v.

◆ from_string()

static StyleGetValue clan::StyleGetValue::from_string ( const char *  text)
inlinestatic

Create style value from a string.

References clan::string, text, and clan::v.

◆ from_time()

static StyleGetValue clan::StyleGetValue::from_time ( float  t,
StyleDimension  dimension = StyleDimension::s 
)
inlinestatic

Create style value from a time.

References dimension, clan::t, clan::time, and clan::v.

◆ from_url()

static StyleGetValue clan::StyleGetValue::from_url ( const char *  url)
inlinestatic

Create style value from an url.

References clan::url, and clan::v.

◆ is_angle()

bool clan::StyleGetValue::is_angle ( ) const
inline

Check if value is an angle.

References clan::angle.

◆ is_color()

bool clan::StyleGetValue::is_color ( ) const
inline

Check if value is a color.

References clan::color.

◆ is_frequency()

bool clan::StyleGetValue::is_frequency ( ) const
inline

Check if value is a frequency.

References clan::frequency.

◆ is_keyword() [1/3]

bool clan::StyleGetValue::is_keyword ( ) const
inline

Check if value is a keyword.

References clan::keyword.

◆ is_keyword() [2/3]

bool clan::StyleGetValue::is_keyword ( const char *  keyword) const
inline

References is_keyword(), and clan::keyword.

Referenced by is_keyword().

◆ is_keyword() [3/3]

bool clan::StyleGetValue::is_keyword ( const std::string &  keyword) const
inline

References is_keyword(), and clan::keyword.

Referenced by is_keyword().

◆ is_length()

bool clan::StyleGetValue::is_length ( ) const
inline

Check if value is a length.

References clan::length.

◆ is_number()

bool clan::StyleGetValue::is_number ( ) const
inline

Check if value is a number.

References clan::number.

◆ is_percentage()

bool clan::StyleGetValue::is_percentage ( ) const
inline

Check if value is a percentage.

References clan::percentage.

◆ is_resolution()

bool clan::StyleGetValue::is_resolution ( ) const
inline

Check if value is a resolution.

References clan::resolution.

◆ is_string()

bool clan::StyleGetValue::is_string ( ) const
inline

Check if value is a string.

References clan::string.

◆ is_time()

bool clan::StyleGetValue::is_time ( ) const
inline

Check if value is a time.

References clan::time.

◆ is_undefined()

bool clan::StyleGetValue::is_undefined ( ) const
inline

Check if value is undefined.

References clan::undefined.

◆ is_url()

bool clan::StyleGetValue::is_url ( ) const
inline

Check if value is an url.

References clan::url.

◆ number()

float clan::StyleGetValue::number ( ) const
inline

◆ text()

const char* clan::StyleGetValue::text ( ) const
inline

Text when the type is a text string.

References clan::keyword, clan::string, and clan::url.

◆ type()

StyleValueType clan::StyleGetValue::type ( ) const
inline

Variant type.

Member Data Documentation

◆ color

float clan::StyleGetValue::color[4]

Referenced by from_color().

◆ dimension

StyleDimension clan::StyleGetValue::dimension

◆ float_value

struct { ... } clan::StyleGetValue::float_value

◆ number

float clan::StyleGetValue::number

Referenced by from_number().

◆ text

const char* clan::StyleGetValue::text

Referenced by from_string().


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