CSPresetListItem

Constructors

Link copied to clipboard
constructor(preset: CSPreset<PresetItem, PresetList>, notFoundPresetItem: (CSStore) -> PresetItem, defaultItemId: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override var isDestructed: Boolean
Link copied to clipboard

Whether the stored id has no item in the list, so the preset holds only its own data.

Link copied to clipboard
open override val key: String
Link copied to clipboard

The id this preset links, which stays as loaded or linked while its item is not found.

Link copied to clipboard
open override val preset: CSPreset<PresetItem, PresetList>
Link copied to clipboard
Link copied to clipboard
open override var value: PresetItem

Functions

Link copied to clipboard
fun <T> CSHasChangeValue<T>.actionPausedBy(preset: CSPreset<*, *>, function: (T) -> Unit): CSRegistration
fun CSHasChange<*>.actionPausedBy(preset: CSPreset<*, *>, function: () -> Unit): CSRegistration
Link copied to clipboard
open override fun clear()
Link copied to clipboard
open override fun clearKeyData()
Link copied to clipboard
open override fun fireChange()
Link copied to clipboard
open fun getAndSet(newValue: PresetItem): PresetItem
Link copied to clipboard
open operator override fun getValue(thisRef: Any?, property: KProperty<*>): PresetItem
Link copied to clipboard
open override fun isTrackedModifiedIn(store: CSStore): Boolean
Link copied to clipboard
fun link(id: String)

Selects the item with id, or keeps linking id without an item while the list has none.

Link copied to clipboard
open override fun onChange(function: (PresetItem) -> Unit): CSRegistration
Link copied to clipboard
inline fun CSHasChange<*>.onChange(preset: Preset, crossinline function: Fun): CSRegistration
Link copied to clipboard
fun <T> CSHasChangeValue<T>.onChangePausedBy(preset: CSPreset<*, *>, function: (T) -> Unit): CSRegistration
fun CSHasChange<*>.onChangePausedBy(preset: CSPreset<*, *>, function: () -> Unit): CSRegistration
Link copied to clipboard
open override fun onDestruct()
Link copied to clipboard
open override fun onStoreLoaded()
Link copied to clipboard
open fun pause()
Link copied to clipboard

Takes the list's current instance of the selected item, which may hold newer saved data.

Link copied to clipboard
open fun resume(fireChange: Boolean)
Link copied to clipboard
open override fun saveTo(store: CSStore)
Link copied to clipboard
open operator override fun setValue(thisRef: Any?, property: KProperty<*>, value: PresetItem)
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun value(newValue: PresetItem, fire: Boolean)