clan::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
 
Font font (Canvas &canvas) const
 Font used by this style cascade. More...
 
void render_background (Canvas &canvas, const ViewGeometry &geometry) const
 Render styled background. More...
 
void render_border (Canvas &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

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

Member Function Documentation

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

Value array size for the property.

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

References array_size().

Referenced by array_size().

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

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

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

References cascade_value().

Referenced by cascade_value().

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

Convert angle into radians.

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

Convert frequency to Hz.

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

Convert length into px (device independent pixel) units.

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

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

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

Convert time to seconds.

StyleGetValue clan::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 clan::StyleCascade::computed_value ( const std::string property_name) const
inline

References computed_value().

Referenced by computed_value().

Font clan::StyleCascade::font ( Canvas canvas) const

Font used by this style cascade.

void clan::StyleCascade::render_background ( Canvas canvas,
const ViewGeometry geometry 
) const

Render styled background.

void clan::StyleCascade::render_border ( Canvas canvas,
const ViewGeometry geometry 
) const

Render styled border.

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

Resolve any inheritance or initial values for the cascade value.

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

References specified_value().

Referenced by specified_value().

Member Data Documentation

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

Property sets to be examined.

const StyleCascade* clan::StyleCascade::parent = nullptr

Parent cascade used for inheritance.


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