uicore::StyleCascade Class Reference

Style value resolver. More...

#include <style_cascade.h>

Public Member Functions

 StyleCascade ()
 
 StyleCascade (std::vector< Style * > cascade, const StyleCascade *parent=nullptr)
 
int array_size (const char *property_name) const
 Value array size for the property. More...
 
int array_size (const std::string &property_name) const
 
StyleGetValue cascade_value (const char *property_name) const
 Find the first declared value in the cascade for the specified property. More...
 
StyleGetValue cascade_value (const std::string &property_name) const
 
StyleGetValue compute_angle (const StyleGetValue &angle) const
 Convert angle into radians. More...
 
StyleGetValue compute_frequency (const StyleGetValue &frequency) const
 Convert frequency to Hz. More...
 
StyleGetValue compute_length (const StyleGetValue &length) const
 Convert length into px (device independent pixel) units. More...
 
StyleGetValue compute_resolution (const StyleGetValue &resolution) const
 Convert resolution to dots per px unit (pixel ratio scale) More...
 
StyleGetValue compute_time (const StyleGetValue &time) const
 Convert time to seconds. More...
 
StyleGetValue computed_value (const char *property_name) const
 
StyleGetValue computed_value (const std::string &property_name) const
 
FontPtr font () const
 Font used by this style cascade. More...
 
void render_background (const CanvasPtr &canvas, const ViewGeometry &geometry) const
 Render styled background. More...
 
void render_border (const CanvasPtr &canvas, const ViewGeometry &geometry) const
 Render styled border. More...
 
StyleGetValue specified_value (const char *property_name) const
 Resolve any inheritance or initial values for the cascade value. More...
 
StyleGetValue specified_value (const std::string &property_name) const
 

Public Attributes

std::vector< Style * > cascade
 Property sets to be examined. More...
 
const StyleCascadeparent = nullptr
 Parent cascade used for inheritance. More...
 

Detailed Description

Style value resolver.

Constructor & Destructor Documentation

uicore::StyleCascade::StyleCascade ( )
inline
uicore::StyleCascade::StyleCascade ( std::vector< Style * >  cascade,
const StyleCascade parent = nullptr 
)
inline

Member Function Documentation

int uicore::StyleCascade::array_size ( const char *  property_name) const

Value array size for the property.

int uicore::StyleCascade::array_size ( const std::string property_name) const
inline

References array_size().

Referenced by array_size().

StyleGetValue uicore::StyleCascade::cascade_value ( const char *  property_name) const

Find the first declared value in the cascade for the specified property.

StyleGetValue uicore::StyleCascade::cascade_value ( const std::string property_name) const
inline

References cascade_value().

Referenced by cascade_value().

StyleGetValue uicore::StyleCascade::compute_angle ( const StyleGetValue angle) const

Convert angle into radians.

StyleGetValue uicore::StyleCascade::compute_frequency ( const StyleGetValue frequency) const

Convert frequency to Hz.

StyleGetValue uicore::StyleCascade::compute_length ( const StyleGetValue length) const

Convert length into px (device independent pixel) units.

StyleGetValue uicore::StyleCascade::compute_resolution ( const StyleGetValue resolution) const

Convert resolution to dots per px unit (pixel ratio scale)

StyleGetValue uicore::StyleCascade::compute_time ( const StyleGetValue time) const

Convert time to seconds.

StyleGetValue uicore::StyleCascade::computed_value ( const char *  property_name) const

Find the computed value for the specified value

The computed value is a simplified value for the property. Lengths are resolved to device independent pixels and so on.

StyleGetValue uicore::StyleCascade::computed_value ( const std::string property_name) const
inline

References computed_value().

Referenced by computed_value().

FontPtr uicore::StyleCascade::font ( ) const

Font used by this style cascade.

void uicore::StyleCascade::render_background ( const CanvasPtr canvas,
const ViewGeometry geometry 
) const

Render styled background.

void uicore::StyleCascade::render_border ( const CanvasPtr canvas,
const ViewGeometry geometry 
) const

Render styled border.

StyleGetValue uicore::StyleCascade::specified_value ( const char *  property_name) const

Resolve any inheritance or initial values for the cascade value.

StyleGetValue uicore::StyleCascade::specified_value ( const std::string property_name) const
inline

References specified_value().

Referenced by specified_value().

Member Data Documentation

std::vector<Style *> uicore::StyleCascade::cascade

Property sets to be examined.

const StyleCascade* uicore::StyleCascade::parent = nullptr

Parent cascade used for inheritance.


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