Implement system menu bar support #97408
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This implements a prototype of
MenuBarwidgets that can both render a Material menu bar, and speak to a bundled plugin on the engine that will create and manage system generated menu bars on macOS, Windows, and Linux (a.k.a.PlatformMenuBar, submitted already).This implementation of the
MenuBaruses aMenuBarControllerto manager most of the communincation between widgets that need to occur to implement the menu bar. TheMenuBaruses a hierarchy ofMenuBarItemwidgets which extendMenuItemso that they are also useful for configuring a platform provided menu.For the Material
MenuBar,MenuBarItemwidgets have an internal_MenuNodeassigned by looking for a wrapping_MenuNodeWrapper, and then they register attributes with that node (things like the focus node associated with the button, and the menu builder function for the submenus).Related Issues
Tests
MenuBaroperations and configuration.Design Doc