Context menu — version history
The Windows context menu in the theme of the application: a cascading list opened at the cursor, under a control or at a point of the screen. Introduced in 5.0.
5.0 #
New #
- An invisible launcher: drop it anywhere with no size, it only exists while its menu is open.
- Entries named by their address, as deep as needed:
"copy"at the top,"export/pdf"in the cascade of anexportentry (of_add_item, short form or with an icon and a check mark).ue_item_selected(as_keys)hands back that same address, so two cascades may name their entries alike. of_add_itemrefuses (-5) a parent that does not exist, an address already taken, an empty level (export/,/pdf) and a key containing|or starting with__.- Three ways to open: at the cursor (
of_show(), from the right-click of the control the user clicked), under a control (of_show_under: below its bottom edge, aligned on its start edge, above it when the screen ends below — for a More or…button), or at a point of the screen (of_show(x, y), negative coordinates included). - One answer per opening: a choice (
ue_item_selected) or none (ue_dismissed— a click outside, Escape,of_close, or a menu with nothing to show). An entry disabled, hidden or removed while the menu is open can no longer be chosen;of_remove_item,of_clearandof_resetclose an open menu.of_is_opentells whether a menu is on screen. - Separators (
of_add_separator) and section headers (of_add_header) at the top of the menu or in a cascade, never chosen nor counted; a separator is never shown leading, trailing or doubled, and a header whose entries are all hidden goes with them. - Through the handle of an entry (
of_item(address), a bare key resolved to the one entry that carries it): label (is_text), disabled (ib_enabled), hidden (ib_visible, cascade included), check mark (ib_checked), icon changed in place (is_image), radio group (is_group: the entries of one group under the same parent are exclusive, with a round bullet), shortcut shown at the right (is_shortcut, shown only: the key belongs to the control the menu is about), and the five colours of an item. of_remove_itemremoves one entry and its cascade;of_clearandof_resetempty the menu; the handles of what leaves are released.ib_track_hoverandue_item_hover(as_keys)tell which entry the pointer or the keyboard is on — a disabled one too — and an empty address when the menu closes: the help line of a status bar.- Keyboard: arrows that skip disabled entries, Right to open a cascade, Left to close it, Enter to choose, Escape to go back one level then close; the letter after
&in a label chooses the entry, and typing the first letters of a label goes to it. Long lists scroll and stay fluid. - Right-to-left applications are followed: the menu aligns on the right and the cascades open to the left.