Skip to content

Menu and toolbar system

drforbin edited this page Mar 20, 2020 · 1 revision

This page describes the "menus-v2" development branch and its current status. See also the Launchpad blueprint.

Overview

Menus and toolbars in gschem are currently defined in a variety of slightly inconsistent ways, which don't really do what we need them to do for the future. In particular, it would be good to have a consistent way to modify and update the menus and toolbars at run-time, in order to better support plugins and mode-specific menus.

There are several main objectives for the "menus-v2" project:

  • Remove all concept of menu support from libgeda.
  • Exploit gschem's "keymaps" and "actions" subsystems to populate icons, text, keybindings and tooltips.
  • Allow the contents of the context menu and tool bar to be controlled from Scheme.
  • Control menu and tool bar item sensitivity via action properties.

Current status

Not yet started.

Tasks

  • Add alist->keymap function to (gschem keymap) module.

Design notes

Use keymaps to describe menu contents, with sub-keymaps corresponding to sub-menus. The "key sequence" bound to should be a vector of symbols, e.g.

(bind-keys! %global-keymap #(<menubar> <file> <new>) &file-new)

How to implement separators?

Clone this wiki locally