TrayMenuHost
class TrayMenuHost(parentContext: CompositionContext, display: (popup: JPopupMenu, x: Int, y: Int) -> Unit = ::showPopupAtCursor, menu: @Composable () -> Unit)
Builds and presents the popup menu of a Tray. On each showMenu call it composes menu fresh into a JPopupMenu nested in parentContext, so the menu reflects the current composition state, then hands the populated popup to display. The menu composition is disposed when the popup closes, when a newer showMenu call replaces it, or when closeMenu closes it.
Parameters
parentContext
the composition context the popup menu nests into.
display
presents the populated popup at the gesture point; the production default shows it over a transient invoker at those screen coordinates.
menu
the composable menu tree opened on each showMenu call.
Constructors
Link copied to clipboard
constructor(parentContext: CompositionContext, display: (popup: JPopupMenu, x: Int, y: Int) -> Unit = ::showPopupAtCursor, menu: @Composable () -> Unit)