// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ #define UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ #include <memory> #include <set> #include <string> #include <utility> #include <vector> #include "base/memory/raw_ptr.h" #include "ui/views/animation/scroll_animator.h" #include "ui/views/controls/menu/menu_delegate.h" #include "ui/views/controls/menu/menu_host.h" #include "ui/views/controls/prefix_delegate.h" #include "ui/views/controls/prefix_selector.h" #include "ui/views/view.h" namespace ui { struct OwnedWindowAnchor; } // namespace ui namespace views { class MenuControllerTest; class MenuItemView; class MenuScrollViewContainer; // SubmenuView is the parent of all menu items. // // SubmenuView has the following responsibilities: // . It positions and sizes all child views (any type of View may be added, // not just MenuItemViews). // . Forwards the appropriate events to the MenuController. This allows the // MenuController to update the selection as the user moves the mouse around. // . Renders the drop indicator during a drop operation. // . Shows and hides the window (a NativeWidget) when the menu is shown on // screen. // // SubmenuView is itself contained in a MenuScrollViewContainer. // MenuScrollViewContainer handles showing as much of the SubmenuView as the // screen allows. If the SubmenuView is taller than the screen, scroll buttons // are provided that allow the user to see all the menu items. class VIEWS_EXPORT SubmenuView : public View, public PrefixDelegate, public ScrollDelegate { … }; } // namespace views #endif // UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_