kvision / pl.treksoft.kvision.dropdown

Package pl.treksoft.kvision.dropdown

Bootstrap dropdown component with support for navigation bars and context menus.

Types

ContextMenu

open class ContextMenu : Div

Context menu component.

DD

enum class DD

Useful options for use in DropDown's elements parameter.

Direction

enum class Direction

Dropdown directions.

DropDown

open class DropDown : SimplePanel

Bootstrap dropdown component.

Header

open class Header : Tag

Menu header component.

Separator

open class Separator : Div

Menu separator component.

Functions

cmLink

fun ContextMenu.cmLink(label: String, url: String? = null, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf(), init: (Link.() -> Unit)? = null): Link

DSL builder extension function for a link in a context menu list.

cmLinkDisabled

fun ContextMenu.cmLinkDisabled(label: String, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf(), init: (Link.() -> Unit)? = null): Link

DSL builder extension function for a disabled link in a context menu list.

contextMenu

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

DSL builder extension function.

ddLink

fun DropDown.ddLink(label: String, url: String? = null, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf(), init: (Link.() -> Unit)? = null): Link

DSL builder extension function for a link in a dropdown list.

ddLinkDisabled

fun DropDown.ddLinkDisabled(label: String, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf(), init: (Link.() -> Unit)? = null): Link

DSL builder extension function for a disabled link in a dropdown list.

dropDown

fun Container.dropDown(text: String, elements: List<StringPair>? = null, icon: String? = null, style: ButtonStyle = ButtonStyle.PRIMARY, direction: Direction = Direction.DROPDOWN, disabled: Boolean = false, forNavbar: Boolean = false, forDropDown: Boolean = false, classes: Set<String> = setOf(), init: (DropDown.() -> Unit)? = null): DropDown

DSL builder extension function.

header

fun ContextMenu.header(content: String? = null, classes: Set<String> = setOf()): Header
fun DropDown.header(content: String? = null, classes: Set<String> = setOf()): Header

DSL builder extension function.

separator

fun ContextMenu.separator(classes: Set<String> = setOf()): Separator
fun DropDown.separator(classes: Set<String> = setOf()): Separator

DSL builder extension function.

setContextMenu

fun Widget.setContextMenu(contextMenu: ContextMenu): Widget

Sets context menu for the current widget.