kvision / pl.treksoft.kvision.dropdown / ContextMenu

ContextMenu

open class ContextMenu : ListTag

Context menu component.

Constructors

<init>

ContextMenu(classes: Set<String> = setOf(), init: ContextMenu.() -> Unit = null)

Inherited Properties

elements

var elements: List<String>?

List of elements.

rich

var rich: Boolean

Determines if elements can contain HTML code.

type

var type: ListType

List type.

Functions

positionMenu

open fun positionMenu(mouseEvent: MouseEvent): ContextMenu

Positions and shows a context menu based on a mouse event.

Inherited Functions

childrenVNodes

open fun childrenVNodes(): Array<VNode>

Returns the array of the children Snabbdom vnodes.

getSnClass

open fun getSnClass(): List<StringBoolPair>

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

render

open fun render(): VNode

Renders current component as a Snabbdom vnode.

Companion Object Functions

contextMenu

fun Widget.contextMenu(classes: Set<String> = setOf(), init: ContextMenu.() -> Unit = null): ContextMenu

DSL builder extension function.