Package-level declarations
CSPreset and its property factories, plus Preset.init() and the save/reload lifecycle (saveAsCurrent, reloadInternal).
Types
Link copied to clipboard
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>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class CSPresetListItem<PresetItem : CSPresetItem, PresetList : CSPresetItemList<PresetItem>>(val preset: CSPreset<PresetItem, PresetList>, notFoundPresetItem: (CSStore) -> PresetItem, defaultItemId: String? = null) : CSPropertyWrapper<PresetItem> , CSPresetKeyData
Link copied to clipboard
Lets a parent store only what a preset changes from its item, so the rest follows the item. On load the stored data lies over the item's data, unless the parent's item stores this preset whole. changes holds the keys the parent stored and those changed since that load, with null for a key the preset removed from the item's data.
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
inline fun <T, V : CSHasChangeValue<T>> V.action(preset: Preset, crossinline function: (T) -> Unit): CSRegistration
fun <T : Preset> T.action(parent: CSHasRegistrations, hasChange: CSHasChange<*>, onChange: Fun): CSRegistration
Link copied to clipboard
fun <T> CSHasChangeValue<T>.actionPausedBy(preset: CSPreset<*, *>, function: (T) -> Unit): CSRegistration
Link copied to clipboard
Link copied to clipboard
fun <PresetListItem : CSPresetItem, PresetList : CSPresetItemList<PresetListItem>, Preset : CSPreset<PresetListItem, PresetList>> Preset.init(): Preset
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
fun <T : Preset> T.onChange(paused: List<CSRegistration>, before: Fun = {}, onChange: Fun): CSRegistration
fun <T : Preset> T.onChange(parent: CSHasRegistrations, hasChange: CSHasChange<*>, onChange: Fun): CSRegistration
fun <T : Preset> T.onChange(paused: CSRegistration, before: Fun = {}, onChange: Fun): CSRegistration
Link copied to clipboard
inline fun <T : CSHasChange<*>> List<T>.onChangeLater(preset: Preset, crossinline function: Fun): CSRegistration
Link copied to clipboard
fun <T> CSHasChangeValue<T>.onChangePausedBy(preset: CSPreset<*, *>, function: (T) -> Unit): CSRegistration
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
fun Preset.title(parent: CSHasRegistrationsHasDestruct, withModified: Boolean = false): CSHasChangeValue<String>
Link copied to clipboard