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 --- .../-spinner-input/get-state.html | 15 ++ .../-spinner-input/index.html | 62 ++++- .../-spinner-input/observers.html | 14 ++ .../-spinner-input/subscribe.html | 15 ++ .../-spinner/get-state.html | 15 ++ .../-spinner/index.html | 259 +++++++++++++++------ .../-spinner/subscribe.html | 15 ++ api/pl.treksoft.kvision.form.spinner/index.html | 6 +- .../spinner-input.html | 4 +- 9 files changed, 330 insertions(+), 75 deletions(-) create mode 100644 api/pl.treksoft.kvision.form.spinner/-spinner-input/get-state.html create mode 100644 api/pl.treksoft.kvision.form.spinner/-spinner-input/observers.html create mode 100644 api/pl.treksoft.kvision.form.spinner/-spinner-input/subscribe.html create mode 100644 api/pl.treksoft.kvision.form.spinner/-spinner/get-state.html create mode 100644 api/pl.treksoft.kvision.form.spinner/-spinner/subscribe.html (limited to 'api/pl.treksoft.kvision.form.spinner') diff --git a/api/pl.treksoft.kvision.form.spinner/-spinner-input/get-state.html b/api/pl.treksoft.kvision.form.spinner/-spinner-input/get-state.html new file mode 100644 index 00000000..cf15e115 --- /dev/null +++ b/api/pl.treksoft.kvision.form.spinner/-spinner-input/get-state.html @@ -0,0 +1,15 @@ + + + +SpinnerInput.getState - kvision + + + +kvision / pl.treksoft.kvision.form.spinner / SpinnerInput / getState
+
+

getState

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

Get current state.

+ + diff --git a/api/pl.treksoft.kvision.form.spinner/-spinner-input/index.html b/api/pl.treksoft.kvision.form.spinner/-spinner-input/index.html index 45faf8d3..a69ec839 100644 --- a/api/pl.treksoft.kvision.form.spinner/-spinner-input/index.html +++ b/api/pl.treksoft.kvision.form.spinner/-spinner-input/index.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form.spinner / SpinnerInput

SpinnerInput

-(js) open class SpinnerInput : Widget, FormInput +(js) open class SpinnerInput : Widget, FormInput, ObservableState<Number?>

The basic component for spinner control.

Constructors

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

observers

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

placeholder

@@ -240,6 +248,15 @@
(js) +

getState

+
+

Get current state.

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

getValueAsString

@@ -273,6 +290,15 @@

Change value in plus.

fun spinUp(): SpinnerInput
+(js) +

subscribe

+
+

Subscribe for the state change notifications.

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

Extension Properties

@@ -284,6 +310,7 @@

changeFlow

+

Extension property returning Flow for a change event.

val <T : Widget> T.changeFlow: Flow<T> @@ -292,6 +319,7 @@

clickFlow

+

Extension property returning Flow for a click event.

val <T : Widget> T.clickFlow: Flow<T> @@ -300,8 +328,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

@@ -350,11 +388,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 @@ -362,14 +409,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.spinner/-spinner-input/observers.html b/api/pl.treksoft.kvision.form.spinner/-spinner-input/observers.html new file mode 100644 index 00000000..b9f76c5e --- /dev/null +++ b/api/pl.treksoft.kvision.form.spinner/-spinner-input/observers.html @@ -0,0 +1,14 @@ + + + +SpinnerInput.observers - kvision + + + +kvision / pl.treksoft.kvision.form.spinner / SpinnerInput / observers
+
+

observers

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

subscribe

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

Subscribe for the state change notifications.

+ + diff --git a/api/pl.treksoft.kvision.form.spinner/-spinner/get-state.html b/api/pl.treksoft.kvision.form.spinner/-spinner/get-state.html new file mode 100644 index 00000000..288d013a --- /dev/null +++ b/api/pl.treksoft.kvision.form.spinner/-spinner/get-state.html @@ -0,0 +1,15 @@ + + + +Spinner.getState - kvision + + + +kvision / pl.treksoft.kvision.form.spinner / Spinner / getState
+
+

getState

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

Get current state.

+ + diff --git a/api/pl.treksoft.kvision.form.spinner/-spinner/index.html b/api/pl.treksoft.kvision.form.spinner/-spinner/index.html index 0f24c7dd..14c648da 100644 --- a/api/pl.treksoft.kvision.form.spinner/-spinner/index.html +++ b/api/pl.treksoft.kvision.form.spinner/-spinner/index.html @@ -8,7 +8,7 @@ kvision / pl.treksoft.kvision.form.spinner / Spinner

Spinner

-(js) open class Spinner : SimplePanel, NumberFormControl +(js) open class Spinner : SimplePanel, NumberFormControl, ObservableState<Number?>

The form field component for spinner control.

Constructors

@@ -231,6 +231,15 @@ + + + + + + + +
(js) +

getState

+
+

Get current state.

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

getValueAsString

@@ -291,6 +300,15 @@

Style form control element for horizontal form panel.

open fun styleForHorizontalFormPanel(horizontalRatio: FormHorizontalRatio): Unit
+(js) +

subscribe

+
+

Subscribe for the state change notifications.

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

Extension Properties

@@ -302,6 +320,7 @@

changeFlow

+

Extension property returning Flow for a change event.

val <T : Widget> T.changeFlow: Flow<T> @@ -310,6 +329,7 @@

clickFlow

+

Extension property returning Flow for a click event.

val <T : Widget> T.clickFlow: Flow<T> @@ -318,8 +338,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

@@ -368,11 +398,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)

bold

DSL builder extension function.

-fun Container.bold(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String> = setOf(), init: (Bold.() -> Unit)? = null): Bold +fun Container.bold(content: String? = null, rich: Boolean = false, align: Align? = null, classes: Set<String>? = null, className: String? = null, init: (Bold.() -> Unit)? = null): Bold @@ -381,7 +420,7 @@

DSL builder extension function.

-fun Container.button(text: String, icon: String? = null, style: ButtonStyle = ButtonStyle.PRIMARY, type: ButtonType = ButtonType.BUTTON, disabled: Boolean = false, classes: Set<String> = setOf(), init: (Button.() -> Unit)? = null): Button +fun Container.button(text: String, icon: String? = null, style: ButtonStyle = ButtonStyle.PRIMARY, type: ButtonType = ButtonType.BUTTON, disabled: Boolean = false, separator: String? = null, labelFirst: Boolean = true, classes: Set<String>? = null, className: String? = null, init: (Button.() -> Unit)? = null): Button @@ -390,7 +429,7 @@

DSL builder extension function.

-fun Container.buttonGroup(size: ButtonGroupSize? = null, vertical: Boolean = false, classes: Set<String> = setOf(), init: (ButtonGroup.() -> Unit)? = null): ButtonGroup +fun Container.buttonGroup(size: ButtonGroupSize? = null, vertical: Boolean = false, classes: Set<String>? = null, className: String? = null, init: (ButtonGroup.() -> Unit)? = null): ButtonGroup @@ -399,7 +438,7 @@

DSL builder extension function.

-fun Container.canvas(canvasWidth: Int? = null, canvasHeight: Int? = null,