BasicMenuBehavior

class BasicMenuBehavior(textMetrics: TextMetrics, pathMetrics: PathMetrics, config: BasicMenuBehavior.Config = Config()) : MenuBehavior(source)

Controls the look/feel of Menus and their subcomponents.

Parameters

textMetrics

used to measure text dimensions

pathMetrics

used to measure Path dimensions

config

that changes how the behavior works

Constructors

Link copied to clipboard
constructor(textMetrics: TextMetrics, pathMetrics: PathMetrics, config: BasicMenuBehavior.Config = Config())

Types

Link copied to clipboard
data class Config(val menuInset: Double = 5.0, val menuRadius: Double = 6.0, val menuFillPaint: Paint = White.paint, val itemTextPaint: Paint = Black.paint, val itemIconWidth: Double = 20.0, val itemSelectedRadius: Double = 4.0, val itemIconTextSpacing: Double = 6.0, val itemHighlightPaint: Paint = Color(0xD2DEFAu).paint, val itemVerticalPadding: Double = 4.0, val itemHorizontalPadding: Double = 14.0, val itemTextSelectedPaint: Paint = itemTextPaint, val itemDisabledTextPaint: Paint = Color(0xA9ADBCu).paint, val subMenuIconPaint: Paint = Color(0x818593u).paint, val subMenuIconSelectedPaint: Paint = subMenuIconPaint, val subMenuIconDisabledPaint: Paint = itemDisabledTextPaint, val subMenuIconTextSpacing: Double = itemHorizontalPadding, val separatorPaint: Paint = (Black opacity 0.07f).paint, val separatorHeight: Double = 11.0, val subMenuIconPath: Path = path("M1 1L5 5L1 9")!!, val subMenuShowDelay: Measure<Time> = 100 * milliseconds)

Configuration for BasicMenuBehavior.

Inherited properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open override fun install(view: Menu)
Link copied to clipboard
Link copied to clipboard
open override fun render(view: Menu, canvas: Canvas)
Link copied to clipboard
Link copied to clipboard

Inherited functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun contains(view: Menu, point: Point): Boolean
Link copied to clipboard
Link copied to clipboard
open fun uninstall(view: Menu)