Style property set. More...

#include <style.h>

Public Member Functions

 Style ()
 
 Style (const Style &)=delete
 
 ~Style ()
 
StyleGetValue declared_value (const char *property_name) const
 Retrieve the declared value for a property. More...
 
StyleGetValue declared_value (const std::string &property_name) const
 
Styleoperator= (const Style &)=delete
 
void set (const std::string &properties)
 
template<class Arg1 , typename... Values>
void set (const std::string &properties, Arg1 arg1, Values...values)
 

Static Public Member Functions

static std::string to_rgba (const Colorf &c)
 Static helper that generates a "rgba(%1,%2,%3,%4)" string for the given color. More...
 

Detailed Description

Style property set.

Constructor & Destructor Documentation

uicore::Style::Style ( )
uicore::Style::Style ( const Style )
delete
uicore::Style::~Style ( )

Member Function Documentation

StyleGetValue uicore::Style::declared_value ( const char *  property_name) const

Retrieve the declared value for a property.

StyleGetValue uicore::Style::declared_value ( const std::string property_name) const
inline

References declared_value().

Referenced by declared_value().

Style& uicore::Style::operator= ( const Style )
delete
void uicore::Style::set ( const std::string properties)

Parse and apply CSS properties to property set

The properties string uses the same syntax as when styles are specified using the 'style' attribute in HTML. This function does not clear the current properties already set and can be called multiple times with individual sets of properties.

Additional arguments can be passed in and will be inserted with the same syntax as when using the string_format function.

Referenced by set().

template<class Arg1 , typename... Values>
void uicore::Style::set ( const std::string properties,
Arg1  arg1,
Values...  values 
)
inline

References set(), and uicore::string_format().

static std::string uicore::Style::to_rgba ( const Colorf c)
inlinestatic

Static helper that generates a "rgba(%1,%2,%3,%4)" string for the given color.

References uicore::clamp, uicore::string_format(), uicore::Vec4< Type >::w, uicore::Vec4< Type >::x, uicore::Vec4< Type >::y, and uicore::Vec4< Type >::z.


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