Package-level declarations

Classes supporting the observer pattern, including the implementation of the observable list.

Properties

Link copied to clipboard
val <S> MutableSignal<S>.mutableState: MutableState<S>

Extension property returning a MutableState for a MutableSignal.

Link copied to clipboard

Extension property returning an ObservableState for a Signal.

Functions

Link copied to clipboard
fun <S, W : Component> W.bind(signal: Signal<S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(S) -> Unit): W

An extension function which binds the widget to the given signal.

fun <S, T, W : Component> W.bind(signal: Signal<S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the given signal using the substate extractor.

Link copied to clipboard
fun <S, W : SimplePanel> W.bindEach(signal: Signal<List<S>>, equalizer: (S, S) -> Boolean? = null, factory: W.(S) -> Unit): W

An extension function which binds the container to the given signal with a list of items.

fun <S, T, W : SimplePanel> W.bindEach(signal: Signal<S>, sub: (S) -> List<T>, equalizer: (T, T) -> Boolean? = null, factory: SimplePanel.(T) -> Unit): W

An extension function which binds the container to the given signal with a list of items using the substate extractor.

Link copied to clipboard
fun <S, W : Component> W.bindSync(signal: Signal<S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(S) -> Unit): W

An extension function which binds the widget to the given signal synchronously. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

fun <S, T, W : Component> W.bindSync(signal: Signal<S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the given signal synchronously using the substate extractor. It's less efficient than bind, but fully compatible with KVision 4 state bindings.

Link copied to clipboard
fun <S, T : GenericFormComponent<S>> T.bindTo(state: MutableSignal<S>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(state: MutableSignal<Double?>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(state: MutableSignal<Double>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(state: MutableSignal<Int?>): T
fun <T : GenericFormComponent<Number?>> T.bindTo(state: MutableSignal<Int>): T
fun <T : GenericFormComponent<String?>> T.bindTo(state: MutableSignal<String>): T
fun <T : GenericFormComponent<Date?>> T.bindTo(state: MutableSignal<Date>): T

Bidirectional data binding to the MutableSignal instance.

Link copied to clipboard
fun <S, W : SimplePanel> W.insert(signal: Signal<S>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given signal.

fun <S, T, W : SimplePanel> W.insert(signal: Signal<S>, sub: (S) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given signal using the substate extractor.

Link copied to clipboard
fun <S, W : SimplePanel> W.insertNotNull(signal: Signal<S?>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given signal when the state value is not null.

fun <S, T, W : SimplePanel> W.insertNotNull(signal: Signal<S>, sub: (S) -> T?, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given signal using the substate extractor when the state value is not null.

Link copied to clipboard
fun <S, W : SimplePanel> W.insertWhen(signal: Signal<S>, condition: (S) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(S) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the observable state when the given condition is true.

fun <S, T, W : SimplePanel> W.insertWhen(signal: Signal<S>, sub: (S) -> T, condition: (T) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(T) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given signal using the substate extractor when the given condition is true.