CSPreset
class CSPreset<PresetListItem : CSPresetItem, PresetList : CSPresetItemList<PresetListItem>>(parent: CSHasDestruct, val parentStore: CSStore, key: String, val list: PresetList, notFoundItem: (CSStore) -> PresetListItem, defaultItemId: String? = null) : CSModel, CSHasChange<Unit>
Constructors
Link copied to clipboard
constructor(parent: CSHasDestruct, parentStore: CSStore, key: String, list: PresetList, notFoundItem: (CSStore) -> PresetListItem, defaultItemId: String? = null)
Properties
Link copied to clipboard
Link copied to clipboard
Fires once reload loaded data, with the data the store then holds.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Whether this preset differs from its item. Without a found item it has none to differ from.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Preset.intListProperty(parent: CSHasDestruct, key: String, getDefault: () -> List<Int>, onChange: ArgFun<List<Int>>? = null): CSIntListValuePresetProperty
Link copied to clipboard
Link copied to clipboard
fun Preset.itemTitle(parent: CSHasRegistrationsHasDestruct, withModified: Boolean = false, process: (String) -> String = { it }): CSHasChangeValue<String>
Link copied to clipboard
fun Preset.itemTitleWithModified(isModified: CSHasChangeValue<Boolean>, process: (String) -> String = { it }): CSHasChangeValue<String>
fun Preset.itemTitleWithModified(parent: CSHasRegistrationsHasDestruct, process: (String) -> String = { it }): CSHasChangeValue<String>
Link copied to clipboard
fun <T> Preset.modifiedState(parent: CSHasRegistrationsHasDestruct, state: (isModified: Boolean) -> T): CSHasChangeValue<T>
state computed with CSPreset.isModified after the same debounced changes, so a state that changes while the preset stays modified still updates and never disagrees with isModified.
Link copied to clipboard
fun <T> Preset.nullArrayItemProperty(parent: CSHasRegistrationsHasDestruct, key: String, values: Array<T>, default: T? = null, onChange: (value: T?) -> Unit? = null): CSListItemNullablePresetProperty<T?>
Link copied to clipboard
fun Preset.nullBoolProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Boolean? = null, onChange: ArgFun<Boolean?>? = null): CSBooleanNullablePresetProperty
Link copied to clipboard
fun Preset.nullDoubleProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Double? = null, onChange: (value: Double?) -> Unit? = null): CSDoubleNullablePresetProperty
Link copied to clipboard
fun Preset.nullFloatProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Float? = null, onChange: (value: Float?) -> Unit? = null): CSFloatNullablePresetProperty
Link copied to clipboard
fun Preset.nullIntProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Int? = null, onChange: (value: Int?) -> Unit? = null): CSIntNullablePresetProperty
Link copied to clipboard
fun <T> Preset.nullListItemProperty(parent: CSHasRegistrationsHasDestruct, key: String, getValues: () -> List<T>, default: T? = null, onChange: (value: T?) -> Unit? = null): CSListItemNullablePresetProperty<T?>
fun <T> Preset.nullListItemProperty(parent: CSHasRegistrationsHasDestruct, key: String, values: List<T>, default: T? = null, onChange: (value: T?) -> Unit? = null): CSListItemNullablePresetProperty<T?>
fun <T> Preset.nullListItemProperty(parent: CSHasRegistrationsHasDestruct, key: String, values: List<T>, getDefault: () -> T?, onChange: (value: T?) -> Unit? = null): CSListItemNullablePresetProperty<T?>
Link copied to clipboard
fun Preset.nullLongProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Long? = null, onChange: (value: Long?) -> Unit? = null): CSLongNullablePresetProperty
Link copied to clipboard
fun Preset.nullStringProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: String? = null, onChange: (value: String?) -> Unit? = null): CSStringNullablePresetProperty
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, noinline onChange: ArgFun<T>? = null): CSPresetProperty<T>
fun Preset.property(parent: CSHasDestruct, key: String, default: Boolean, onChange: ArgFun<Boolean>? = null): CSBooleanValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: Double, onChange: ArgFun<Double>? = null): CSDoubleValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: Float, onChange: ArgFun<Float>? = null): CSFloatValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: () -> Int, onChange: ArgFun<Int>? = null): CSIntValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, getDefault: () -> String, onChange: ArgFun<String>? = null): CSStringValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: Int, onChange: ArgFun<Int>? = null): CSIntValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: String, onChange: ArgFun<String>? = null): CSStringValuePresetProperty
inline fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, default: List<T> = emptyList(), noinline onChange: ArgFun<List<T>>? = null): CSPresetProperty<List<T>>
fun Preset.property(parent: CSHasDestruct, key: String, default: List<Int>, onChange: ArgFun<List<Int>>? = null): CSIntListValuePresetProperty
inline fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, default: MutableList<T> = mutableListOf(), noinline onChange: ArgFun<MutableList<T>>? = null): CSPresetProperty<MutableList<T>>
fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, type: KClass<T>, onChange: ArgFun<T>? = null): CSPresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: Array<T>, default: T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: Array<T>, defaultIndex: Int, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T : CSHasId> Preset.property(parent: CSHasDestruct, key: String, values: Array<T>, default: List<T> = emptyList(), onChange: ArgFun<List<T>>? = null): CSHasIdListValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: () -> Collection<T>, getDefault: () -> T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, getValues: () -> List<T>, default: T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, getValues: () -> List<T>, defaultIndex: Int, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, default: T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, getDefault: () -> T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, defaultIndex: Int, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T : CSHasId> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, default: List<T> = emptyList(), onChange: ArgFun<List<T>>? = null): CSHasIdListValuePresetProperty<T>
fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, listType: KClass<T>, default: List<T> = emptyList(), onChange: ArgFun<List<T>>? = null): CSPresetProperty<List<T>>
fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, listType: KClass<T>, default: MutableList<T> = mutableListOf(), onChange: ArgFun<MutableList<T>>? = null): CSPresetProperty<MutableList<T>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Runs onSaveToItem, then fires eventSave. A failing step reaches the caller and eventSave does not fire. edit changes the data the step saves into the item.
Link copied to clipboard
Link copied to clipboard
fun Preset.title(parent: CSHasRegistrationsHasDestruct, withModified: Boolean = false): CSHasChangeValue<String>
Link copied to clipboard