Class

APIRendererClass

Source

Class.New(options)

Parameters:
  • options — Objectoptional
Returns:
Renderer.Class

Source

Class::constructor()

Extends:
Renderer.Extension
Returns:
Class

Source

Class::name

Type:
String

This property is used in the Item::classes list to identify various classes.

Class::onNameChange(oldValue)

Parameters:
  • oldValue — String
Type:
Signal

Source

Class::target

Type:
Item

Reference to the Item on which this class has effects.

If state is created inside the Item, this property is set automatically.

Class::onTargetChange(oldValue)

Parameters:
  • oldValue — Item
Type:
Signal

Source

Class::changes

Type:
Object

This objects contains all properties to change on the target item.

Source

Class::priority

Type:
Integer
Default value:
0

Class::onPriorityChange(oldValue)

Parameters:
  • oldValue — Integer
Type:
Signal

Source

Class::running

Type:
Boolean

Indicates whether the class is active or not.

When it's true, this state is appended on the end of the Item::classes list.

Mostly used with bindings.

Grid {
    columns: 2
    // reduce to one column if the view width is lower than 500 pixels
    Class {
        running: windowItem.width < 500
        changes: {
            columns: 1
        }
    }
}

Class::onRunningChange(oldValue)

Parameters:
  • oldValue — Boolean
Type:
Signal

Source

Class::children

Type:
Object

Source

Class::children.length

Type:
Integer
Default value:
0

Source

Class::children.append(value)

Parameters:
  • value — Object
Returns:
Object

Source

Class::children.pop(index)

Parameters:
  • index — Integer
Returns:
Object

Source

Class::document

Type:
Object

Source

Class::onDocumentChange(document)

Parameters:
  • document — Object
Type:
Signal

Source

Class::document.onNodeAdd(node)

Parameters:
  • node — Element
Type:
Signal

Source

Class::document.onNodeRemove(node)

Parameters:
  • node — Element
Type:
Signal

Source

Class::document.query

Type:
String

Class::document.onQueryChange(oldValue)

Parameters:
  • oldValue — String
Type:
Signal

Source

Item::classes

Type:
List

Classes at the end of the list have the highest priority.

This property has a setter, which accepts a string and an array of strings.

Item::onClassesChange(added, removed)

Parameters:
  • added — String
  • removed — String
Type:
Signal

Source