Skip to main content

Module context_menu

Module context_menu 

Source
Expand description

A view’s menu: a right press on a text surface, a ··· on a row, a + in a header.

It holds the keyboard while it is open: the arrows walk its rows and its submenus, enter runs the live row or opens its submenu, and escape backs out of a submenu and then closes it, under KEY_CONTEXT, whose bindings are in crate::menu::bindings. Closing by key or by a chosen row hands the focus back to whatever held it before the menu opened. A press elsewhere closes it and leaves the focus to that press.

One ContextMenu serves every menu a view has: K names which one is open, so opening one closes the rest.

Structs§

ContextMenu
A view’s menu: closed, or open with its rows and what choosing one does.

Enums§

Place
Where an open menu stands.

Constants§

KEY_CONTEXT
The key context an open menu claims.

Type Aliases§

Slot
Where an owning view keeps its menu.