• Greg Spencer's avatar
    Implement Material MenuBar and MenuAnchor (#112239) · 8c271e5c
    Greg Spencer authored
    This implements a MenuBar widget that can render a Material menu bar, and a MenuAnchor widget used to create a cascading menu in a region. The menus are drawn in the overlay, while the menu bar itself is in the regular widget tree. Keyboard traversal works between the two.
    
    This implementation of the MenuBar uses MenuAnchor to create a cascading menu that contains widgets representing the menu items. These menu items can be any kind of widget, but are typically SubmenuButtons that host submenus, or MenuItemButtons that have shortcut hints (but don't actually activate the shortcuts) and don't host submenus.
    
    Cascading menus can be created outside of a MenuBar by using a MenuAnchor. They can be either given a specific location to appear (a coordinate), or they can be located by the MenuAnchor region that wraps the control that opens them.
    
    The developer may also create a MenuController to pass to the various menu primitives (MenuBar or MenuAnchor) to associate menus so that they can be traversed together and closed together. Creating a controller is not required.
    8c271e5c
Name
Last commit
Last update
..
automated_tests Loading commit data...
benchmarks Loading commit data...
bots Loading commit data...
ci Loading commit data...
conductor Loading commit data...
customer_testing Loading commit data...
devicelab Loading commit data...
docs Loading commit data...
forbidden_from_release_tests Loading commit data...
integration_tests Loading commit data...
manual_tests Loading commit data...
missing_dependency_tests Loading commit data...
snippets/config Loading commit data...
tools Loading commit data...
tracing_tests Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
md Loading commit data...