Fetch the main-menu structure under the configured root.
Optionalmenu: MenuTargetOptionalbase_id: numberOptionalmax_id: numberDispatch the previously-allocated menu id, or a raw command
string. Returns false if the id cannot be mapped.
Choose the top-level menu root (e.g. 'File' / 'Playback').
MainMenuManager— Main-menu (File / Edit / Playback / ...) wrapper.Backend mapping:
BuildMenu(menu, base_id, max_id)→menu.getMainMenu({ root })ExecuteByID(id)→menu.runMainMenuCommand({ command })The root sub-menu (
Init('File'),Init('Playback'), ...) is set once and forwarded to the host. Allocated ids map to the host-suppliedguid(plus the nodesubGuidfor a dynamic child). Explicitly unaddressable nodes remain unmapped; older hosts can supply apathinstead. ThecommandIdmain-menu rows also carry is deliberately never used: it is a transient Win32 menu id that addresses nothing once the menu that produced it is gone.