Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rethink how menus are instantiated in termshark
To make menus work originally, I added a gowid API, via the app struct, to register a menu. It was on the app because it replaces the app's top-level view of the UI with a menu which itself then pointed to the top-level view, but supported a menu overlay if the menu is activated. I implemented it this way because I needed to generate the lower app canvas first to return to the menu a list of coordinates which were menu "sites"; then the overlay will draw the menus at the right positions on the screen according to the coordinates. BUT - this API is unnecessary pollution in the app because the menu will work just as well by having the gowid app author use it as the top-level view. So now I am doing that, and also giving termshark the ability to layer a widget *above* the menus. This widget is the new key mapper, to provide vim-like key macros. Putting it above the menus means the macro-generated key sequences can be sent to menus too - this allowing macros to invokes menu options.
- Loading branch information