simvx.editor.menus¶
Editor Menus: Menu bar setup and keyboard shortcuts.
Module Contents¶
Functions¶
Build a |
|
Create the editor’s menu bar with all menus wired to state. |
|
Register all editor keyboard shortcuts. |
API¶
- simvx.editor.menus.make_shortcut_listener(state: simvx.editor.state.State) → collections.abc.Callable[[str], bool][source]¶
Build a
_shortcut_handlercallable wired tostate.shortcuts.The returned function is suitable for installation on a
- Class:
UIInputManagerviatree._shortcut_handler = .... It reads currently-held modifier keys from :class:Inputso the GLFW/SDL3 platform path (which setsInput._keys["ctrl"]=Truebefore firing theui_input(key=...)event) works without any extra plumbing.
Accepts either a bare key (
"s") or a combo string with embedded modifiers ("shift+tab"), and unions both modifier sources.
- simvx.editor.menus.build_menu_bar(state: simvx.editor.state.State) → simvx.core.MenuBar[source]¶
Create the editor’s menu bar with all menus wired to state.
- simvx.editor.menus.register_shortcuts(state: simvx.editor.state.State)[source]¶
Register all editor keyboard shortcuts.