kvision / pl.treksoft.kvision.core / Component

Component

interface Component

Base interface for all components.

Properties

parent

abstract var parent: Container?

Parent of the current component.

visible

abstract var visible: Boolean

Visibility state of the current component.

Functions

addCssClass

abstract fun addCssClass(css: String): Component

Adds given value to the set of CSS classes generated in html code of current component.

abstract fun addCssClass(css: Style): Component

Adds given style object to the set of CSS classes generated in html code of current component.

addSurroundingCssClass

abstract fun addSurroundingCssClass(css: String): Component

Adds given value to the set of CSS classes generated in html code of parent component.

abstract fun addSurroundingCssClass(css: Style): Component

Adds given style object to the set of CSS classes generated in html code of parent component.

getElement

abstract fun getElement(): Node?

Returns DOM element bound to the current component.

getElementJQuery

abstract fun getElementJQuery(): JQuery?

Returns JQuery element bound to the current component.

getElementJQueryD

abstract fun getElementJQueryD(): dynamic

Returns JQuery element bound to the current component as a dynamic type.

removeCssClass

abstract fun removeCssClass(css: String): Component

Removes given value from the set of CSS classes generated in html code of current component.

abstract fun removeCssClass(css: Style): Component

Removes given style object from the set of CSS classes generated in html code of current component.

removeSurroundingCssClass

abstract fun removeSurroundingCssClass(css: String): Component

Removes given value from the set of CSS classes generated in html code of parent component.

abstract fun removeSurroundingCssClass(css: Style): Component

Removes given style object from the set of CSS classes generated in html code of parent component.

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.

Inheritors

Container

interface Container : Component

Base interface for all containers.

FormControl

interface FormControl : Component

Base interface of a form control.

FormInput

interface FormInput : Component

StyledComponent

abstract class StyledComponent : Component

Base class for components supporting CSS styling.