PresetSlot

class PresetSlot<P : Preset>(targets: List<StyleParameters>, val name: String, val contract: GlslContract, initial: P) : ReadWriteProperty<Any?, P> (source)

A property that holds a preset and sets it as the parameter name of every one of targets: shade styles, the passes of a filter, or the function of another preset. Assigned presets must have contract.

Constructors

Link copied to clipboard
constructor(targets: List<StyleParameters>, name: String, contract: GlslContract, initial: P)
constructor(parameters: StyleParameters, name: String, contract: GlslContract, initial: P)

a slot that sets its preset as the parameter name of parameters

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var preset: P

the preset in the slot; assigning one that does not have contract throws an IllegalArgumentException

Functions

Link copied to clipboard
open operator override fun getValue(thisRef: Any?, property: KProperty<*>): P
Link copied to clipboard
open operator override fun setValue(thisRef: Any?, property: KProperty<*>, value: P)