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

Public Member Functions | Public Attributes | List of all members
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 (PropertyHash hash) const
| Value array size for the property.
StyleGetValue | cascade_value (PropertyHash hash) const
| Find the first declared value in the cascade for the specified property.
StyleGetValue | compute_angle (const StyleGetValue &angle) const
| Convert angle into radians.
StyleGetValue | compute_frequency (const StyleGetValue &frequency) const
| Convert frequency to Hz.
StyleGetValue | compute_length (const StyleGetValue &length) const
| Convert length into px (device independent pixel) units.
StyleGetValue | compute_resolution (const StyleGetValue &resolution) const
| Convert resolution to dots per px unit (pixel ratio scale).
StyleGetValue | compute_time (const StyleGetValue &time) const
| Convert time to seconds.
StyleGetValue | computed_value (PropertyHash hash) const
Font | font (Canvas &canvas) const
| Font used by this style cascade.
void | render_background (Canvas &canvas, const ViewGeometry &geometry) const
| Render styled background.
void | render_border (Canvas &canvas, const ViewGeometry &geometry) const
| Render styled border.
StyleGetValue | specified_value (PropertyHash hash) const
| Resolve any inheritance or initial values for the cascade value.

## Public Attributes
std::vector< Style * > | cascade
| Property sets to be examined.
const StyleCascade * | parent = nullptr
| Parent cascade used for inheritance.

## Detailed Description

Style value resolver.

## Constructor & Destructor Documentation

## ◆ StyleCascade() [1/2]

clan::StyleCascade::StyleCascade | ( |  | ) |
| inline

Referenced by StyleCascade().

## ◆ StyleCascade() [2/2]

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

References StyleCascade(), cascade, and parent.

## Member Function Documentation

## ◆ array_size()

int clan::StyleCascade::array_size | ( | PropertyHash | hash | ) | const

Value array size for the property.

## ◆ cascade_value()

StyleGetValue clan::StyleCascade::cascade_value | ( | PropertyHash | hash | ) | const

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

## ◆ compute_angle()

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

Convert angle into radians.

## ◆ compute_frequency()

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

Convert frequency to Hz.

## ◆ compute_length()

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

Convert length into px (device independent pixel) units.

## ◆ compute_resolution()

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

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

## ◆ compute_time()

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

Convert time to seconds.

## ◆ computed_value()

StyleGetValue clan::StyleCascade::computed_value | ( | PropertyHash | hash | ) | 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.

## ◆ font()

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

Font used by this style cascade.

## ◆ render_background()

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

Render styled background.

## ◆ render_border()

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

Render styled border.

## ◆ specified_value()

StyleGetValue clan::StyleCascade::specified_value | ( | PropertyHash | hash | ) | const

Resolve any inheritance or initial values for the cascade value.

## Member Data Documentation

## ◆ cascade

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

Property sets to be examined.

Referenced by StyleCascade().

## ◆ parent

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

Parent cascade used for inheritance.

Referenced by StyleCascade().

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

- style_cascade.h