Package-level declarations

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

Functions

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : Component> W.bind(viewModel: BallastViewModel<Inputs, Events, State>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(State) -> Unit): W

An extension function which binds the widget to the given ballast view model.

fun <Inputs : Any, Events : Any, State : Any, T, W : Component> W.bind(viewModel: BallastViewModel<Inputs, Events, State>, sub: (State) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

An extension function which binds the widget to the given ballast view model using the sub extractor function.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State, W : SimplePanel> W.bindEach(viewModel: BallastViewModel<Inputs, Events, List<State>>, equalizer: (State, State) -> Boolean? = null, factory: SimplePanel.(State) -> Unit): W

An extension function which binds the container to the given ballast view model of a list of items.

fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.bindEach(viewModel: BallastViewModel<Inputs, Events, State>, sub: (State) -> List<T>, equalizer: (T, T) -> Boolean? = null, factory: SimplePanel.(T) -> Unit): W

An extension function which binds the container to the given ballast view model using the sub extractor function to get a list of items.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : Component> W.bindSync(viewModel: BallastViewModel<Inputs, Events, State>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(State) -> Unit): W

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

fun <Inputs : Any, Events : Any, State : Any, T, W : Component> W.bindSync(viewModel: BallastViewModel<Inputs, Events, State>, sub: (State) -> T, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: W.(T) -> Unit): W

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

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : SimplePanel> W.insert(viewModel: BallastViewModel<Inputs, Events, State>, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(State) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given ballast view model.

fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.insert(viewModel: BallastViewModel<Inputs, Events, State>, sub: (State) -> 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 ballast view model using the sub extractor function.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.insertNotNull(viewModel: BallastViewModel<Inputs, Events, State>, sub: (State) -> 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 ballast view model using the sub extractor function when the sub state value is not null.

Link copied to clipboard
fun <Inputs : Any, Events : Any, State : Any, W : SimplePanel> W.insertWhen(viewModel: BallastViewModel<Inputs, Events, State>, condition: (State) -> Boolean, removeChildren: Boolean = true, runImmediately: Boolean = true, factory: SimplePanel.(State) -> Unit): SimplePanel

An extension function which inserts child component and binds it to the given ballast view model when the given condition is true.

fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.insertWhen(viewModel: BallastViewModel<Inputs, Events, State>, sub: (State) -> 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 ballast view model using the sub extractor function when the given condition is true.