-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidation of termshark's menu code
I was accumulating menus in the widget hierarchy, so made things simpler. Instead there is now a struct called multiMenu which is essentially a menu holder. Other parts of termshark that want to open a menu are now provided with a IMenuOpener type. This is implemented by the openTermsharkMenu() function. This indirection is needed because the menu being opened has to be provided with the widget rendering the rest of the UI underneath because the menu widget needs to render the underlying widget so that it can inspect the canvas to find the coordinates at which it should open. So the IMenuOpener provides the link between the widget and the application it's opening inside, and so behind the scenes will adjust the menu being opened with the correct lower layer. Note that multiMenu only supports one open menu at a time. The conversations UI allows a cascaded menu to be opened, so I'm doing that the old way for now.
- Loading branch information
Showing
6 changed files
with
141 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.