From bfd5aa358e141d6c86d476d8bb66b104a80a3b96 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 21 May 2020 00:13:50 +0200 Subject: API documentation for KVision 3.10.0 --- .../-abstract-text-input/get-state.html | 15 ++++++ .../-abstract-text-input/index.html | 62 +++++++++++++++++++++- .../-abstract-text-input/observers.html | 14 +++++ .../-abstract-text-input/subscribe.html | 15 ++++++ 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 api/pl.treksoft.kvision.form.text/-abstract-text-input/get-state.html create mode 100644 api/pl.treksoft.kvision.form.text/-abstract-text-input/observers.html create mode 100644 api/pl.treksoft.kvision.form.text/-abstract-text-input/subscribe.html (limited to 'api/pl.treksoft.kvision.form.text/-abstract-text-input') diff --git a/api/pl.treksoft.kvision.form.text/-abstract-text-input/get-state.html b/api/pl.treksoft.kvision.form.text/-abstract-text-input/get-state.html new file mode 100644 index 00000000..65a3ec85 --- /dev/null +++ b/api/pl.treksoft.kvision.form.text/-abstract-text-input/get-state.html @@ -0,0 +1,15 @@ + + + +AbstractTextInput.getState - kvision + + + +kvision / pl.treksoft.kvision.form.text / AbstractTextInput / getState
+
+

getState

+(js) +open fun getState(): String? +

Get current state.

+ + diff --git a/api/pl.treksoft.kvision.form.text/-abstract-text-input/index.html b/api/pl.treksoft.kvision.form.text/-abstract-text-input/index.html index 5bca3381..c3363e31 100644 --- a/api/pl.treksoft.kvision.form.text/-abstract-text-input/index.html +++ b/api/pl.treksoft.kvision.form.text/-abstract-text-input/index.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form.text / AbstractTextInput

AbstractTextInput

-(js) abstract class AbstractTextInput : Widget, FormInput +(js) abstract class AbstractTextInput : Widget, FormInput, ObservableState<String?>

Base class for basic text components.

Constructors

@@ -65,6 +65,14 @@ + + + + + + + + + + + +
(js) +

observers

+
+val observers: MutableList<(String?) -> Unit>
+(js)

placeholder

@@ -166,6 +174,24 @@

Returns list of CSS class names for current widget in the form of a List.

open fun getSnClass(): List<StringBoolPair>
+(js) +

getState

+
+

Get current state.

+open fun getState(): String?
+(js) +

subscribe

+
+

Subscribe for the state change notifications.

+open fun subscribe(observer: (String?) -> Unit): () -> Unit

Extension Properties

@@ -177,6 +203,7 @@

changeFlow

+

Extension property returning Flow for a change event.

val <T : Widget> T.changeFlow: Flow<T> @@ -185,6 +212,7 @@

clickFlow

+

Extension property returning Flow for a click event.

val <T : Widget> T.clickFlow: Flow<T> @@ -193,8 +221,18 @@

inputFlow

+

Extension property returning Flow for an input event.

val <T : Widget> T.inputFlow: Flow<T> + + +(js) +

stateFlow

+ + +

Extension property returning StateFlow for an ObservableState.

+val <S> ObservableState<S>.stateFlow: StateFlow<S> +

Extension Functions

@@ -243,11 +281,20 @@ (js) +

bind

+ + +

An extension function which binds the widget to the observable state.

+fun <S, W : Widget> W.bind(observableState: ObservableState<S>, factory: W.(S) -> Unit): W + + + +(js)

contextMenu

DSL builder extension function.

-fun Widget.contextMenu(fixedPosition: Boolean = false, classes: Set<String> = setOf(), init: (ContextMenu.() -> Unit)? = null): ContextMenu +fun Widget.contextMenu(fixedPosition: Boolean = false, classes: Set<String>? = null, className: String? = null, init: (ContextMenu.() -> Unit)? = null): ContextMenu @@ -255,14 +302,25 @@

eventFlow

+

Extension property returning Flow<Pair<Widget, Event>> for a given event

fun <T : Widget> T.eventFlow(event: String): Flow<Pair<T, Event>> (js) +

onClick

+ + +

An extension function for defining on click event handlers.

+fun <T : Widget> T.onClick(handler: T.(MouseEvent) -> Unit): Int + + + +(js)

onEvent

+

An extension function for defining event handlers.

fun <T : Widget> T.onEvent(block: SnOn<T>.() -> Unit): Int diff --git a/api/pl.treksoft.kvision.form.text/-abstract-text-input/observers.html b/api/pl.treksoft.kvision.form.text/-abstract-text-input/observers.html new file mode 100644 index 00000000..4ad61d21 --- /dev/null +++ b/api/pl.treksoft.kvision.form.text/-abstract-text-input/observers.html @@ -0,0 +1,14 @@ + + + +AbstractTextInput.observers - kvision + + + +kvision / pl.treksoft.kvision.form.text / AbstractTextInput / observers
+
+

observers

+(js) +protected val observers: MutableList<(String?) -> Unit> + + diff --git a/api/pl.treksoft.kvision.form.text/-abstract-text-input/subscribe.html b/api/pl.treksoft.kvision.form.text/-abstract-text-input/subscribe.html new file mode 100644 index 00000000..1f9d665d --- /dev/null +++ b/api/pl.treksoft.kvision.form.text/-abstract-text-input/subscribe.html @@ -0,0 +1,15 @@ + + + +AbstractTextInput.subscribe - kvision + + + +kvision / pl.treksoft.kvision.form.text / AbstractTextInput / subscribe
+
+

subscribe

+(js) +open fun subscribe(observer: (String?) -> Unit): () -> Unit +

Subscribe for the state change notifications.

+ + -- cgit