pub fn update_menu_commands(menu: &mut Menu, disabled_cmds: &CommandSet)Expand description
Regray the menu tree against the program’s live disabled-command set.
disabled_cmds is the set of commands currently disabled. For each
command item this sets disabled = disabled_cmds.has(command); it
recurses into submenus (a submenu’s own disabled flag is never touched —
only command items are regrayed, while the submenu’s contents are walked); and
it skips separators.
The write is unconditional because the whole tree is repainted each pump, so there is no need to report whether anything changed.
§Turbo Vision heritage
Ports TMenuView::updateMenu (tmnuview.cpp); the disabled-command set is a
denylist (deviation D1), and the changed/null-pointer bookkeeping is dropped
because the Menu is owned and the tree is redrawn every pump.