#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 StyleCascade * | parent = nullptr |
Parent cascade used for inheritance. More... | |
Style value resolver.
|
inline |
|
inline |
int uicore::StyleCascade::array_size | ( | const char * | property_name | ) | const |
Value array size for the property.
|
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.
|
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.
|
inline |
References computed_value().
Referenced by computed_value().
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.
|
inline |
References specified_value().
Referenced by specified_value().
std::vector<Style *> uicore::StyleCascade::cascade |
Property sets to be examined.
const StyleCascade* uicore::StyleCascade::parent = nullptr |
Parent cascade used for inheritance.