kvision / pl.treksoft.kvision.window / Window

Window

open class Window : SimplePanel

Floating window container.

Constructors

<init>

Window(caption: String? = null, contentWidth: CssSize? = CssSize(0, UNIT.auto), contentHeight: CssSize? = CssSize(0, UNIT.auto), isResizable: Boolean = true, isDraggable: Boolean = true, closeButton: Boolean = false, classes: Set<String> = setOf(), init: Window.() -> Unit = null)

Properties

caption

var caption: String?

Window caption text.

closeButton

var closeButton: Boolean

Determines if Close button is visible.

contentHeight

var contentHeight: CssSize?

Window content height.

contentWidth

var contentWidth: CssSize?

Window content width.

isDraggable

var isDraggable: Boolean

Determines if the window is draggable.

isResizable

var isResizable: Boolean

Determines if the window is resizable.

Functions

add

open fun add(child: Component): SimplePanel

Adds given component to the current container.

addAll

open fun addAll(children: List<Component>): SimplePanel

Adds a list of components to the current container.

afterCreate

open fun afterCreate(node: VNode): Unit

Method called after creating Snabbdom vnode.

getChildren

open fun getChildren(): List<Component>

Returns a list of children of the current container.

remove

open fun remove(child: Component): SimplePanel

Removes given component from the current container.

removeAll

open fun removeAll(): SimplePanel

Removes all children from the current container.

Inherited Functions

addInternal

fun addInternal(child: Component): SimplePanel

Protected and final method to add given component to the current container.

childrenVNodes

open fun childrenVNodes(): Array<VNode>

Returns the array of the children Snabbdom vnodes.

render

open fun render(): VNode

Renders current component as a Snabbdom vnode.

Companion Object Functions

window

fun Container.window(caption: String? = null, width: CssSize? = CssSize(0, UNIT.auto), height: CssSize? = CssSize(0, UNIT.auto), resizable: Boolean = true, draggable: Boolean = true, closeButton: Boolean = false, classes: Set<String> = setOf(), init: Window.() -> Unit = null): Window

DSL builder extension function.