Skip to main content

Module context_menu

Module context_menu 

Source
Expand description

Headless right-click context menu state and item merging.

Structs§

ContextMenuCaps
Frontend-supplied capabilities the core cannot observe headlessly.
ContextMenuContext
Read-only snapshot passed to hooks contributing menu items.
ContextMenuItem
One row in the right-click context menu.
ContextMenuState
Headless open/closed menu state + resolved item list.
KeyHint
Structured keybinding hint for menu rows.

Constants§

COPY_ID
Well-known id for the built-in Copy action.
CUT_ID
Well-known context menu item ids for the built-in edit actions.
DELETE_ID
Well-known id for the built-in Delete action.
PASTE_ID
Well-known id for the built-in Paste action.
REDO_ID
Well-known id for the built-in Redo action.
SELECT_ALL_ID
Well-known id for the built-in Select All action.
UNDO_ID
Well-known id for the built-in Undo action.

Functions§

collect_context_items
Merges defaults with hook-contributed rows.
default_context_items
Builds the built-in edit rows for the given capabilities.