kvision / pl.treksoft.kvision.dropdown / ContextMenu

ContextMenu

open class ContextMenu : ListTag

Context menu component.

Constructors

<init>

ContextMenu(element: Widget? = null, fixedPosition: Boolean = false, classes: Set<String> = setOf(), init: (ContextMenu.() -> Unit)? = null)

Properties

fixedPosition

val fixedPosition: Boolean

use fixed positioning

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 Properties

DEFAULT_FIXED_POS_X

const val DEFAULT_FIXED_POS_X: Int

DEFAULT_FIXED_POS_Y

const val DEFAULT_FIXED_POS_Y: Int

Companion Object Functions

contextMenu

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

DSL builder extension function.

Extension Functions

createInstance

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

Helper function for creating JavaScript objects from dynamic constructors.