Basic-Widgets

basic.checkbox basic.color basic.flip basic.glue basic.icon basic.input basic.listview basic.offset basic.print basic.roundslider basic.select basic.shutter basic.slider basic.stateswitch basic.symbol basic.tank basic.trigger basic.window


basic.icon

show an icon, optionally colored statically or dynamically by item

Parameters
{{ basic.icon(pic, color, item, type) }}
pic
icon to show
- smartVISU icons and icons in ./dropins/icons/ws: path and extension may be omitted (e.g. "light_light")
- others: full dile name with path and extension
- to avoid SVG embedding, use full filename with path and extension and add "/ne" at the end, e.g. "dropins/icons/ws/myicon.svg/ne"
color
the color in any CSS form (e.g. '#f00' for red) or classes 'icon0' through 'icon5' (default 'icon0' of the design)
To use dynamic coloring by item give one of the following color models: 'rgb', 'hsl' or 'hsv'
item
either one item which sends all three color parts as array or an array of three items each sending one of the color parts.
type
icon type / size. valid types: 'micro','mini','midi','icon' (optional, default = 'icon')
Examples
Simple static icon
{{ basic.icon('light_light') }}
Colored icon
{{ basic.icon('light_light', '#0b0') }}
{{ basic.icon(icon.light('','','bath.light.value'), 'icon1') }}
Dynamically colored icon
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b']) }}
{{ basic.icon(icon.light('','','bath.light.value'), 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b']) }}
Use this color selector to change icon color.
New in v3.0: icon sizes may be altered
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'micro') }}
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'mini') }}
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'midi') }}
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'icon') }}

Author: Stefan Widmer

Widgets

Design

Misc