IKontextMenuArea

interface IKontextMenuArea<T> : TextContextMenu

Main interface for creating custom context menus in text fields.

This interface implements the TextContextMenu interface and provides a way to create custom context menus with a list of items and a composable function to display them.

In most cases, the default KontextMenuArea class should be used to create a context menu. The kontextMenuArea function provides public access to the builder pattern for creating custom context menus.

Parameters

T

The type of items to be displayed in the context menu

Properties

Link copied to clipboard
abstract val items: List<T>

The list of items to be displayed in the context menu

Link copied to clipboard
abstract val menuContent: @Composable (items: List<T>, onDismissRequest: () -> Unit?) -> Unit

A composable function that renders the content of the menu

Functions

Link copied to clipboard
abstract fun Area(textManager: TextContextMenu.TextManager, state: ContextMenuState, content: () -> Unit)