clan::StyleGetValue Class Reference - ClanLib SDK
Description: clan::StyleGetValue Class Reference

Public Member Functions | Static Public Member Functions | List of all members
clan::StyleGetValue Class Reference

Style value returned by style classes. More...

`#include <style_get_value.h>`

## Public Member Functions
Colorf | color () const
| Value color.
StyleDimension | dimension () const
| Dimension used by value.
bool | is_angle () const
| Check if value is an angle.
bool | is_color () const
| Check if value is a color.
bool | is_frequency () const
| Check if value is a frequency.
bool | is_keyword () const
| Check if value is a keyword.
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.
bool | is_number () const
| Check if value is a number.
bool | is_percentage () const
| Check if value is a percentage.
bool | is_resolution () const
| Check if value is a resolution.
bool | is_string () const
| Check if value is a string.
bool | is_time () const
| Check if value is a time.
bool | is_undefined () const
| Check if value is undefined.
bool | is_url () const
| Check if value is an url.
float | number () const
| Value number.
const char * | text () const
| Text when the type is a text string.
StyleValueType | type () const
| Variant type.

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

## 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 color, clan::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 number, clan::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

Value number.

References clan::angle, clan::frequency, clan::length, clan::number, clan::percentage, clan::resolution, and clan::time.

## ◆ 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

Referenced by from_angle(), from_frequency(), from_length(), from_resolution(), and from_time().

## ◆ [struct]

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:

- style_get_value.h