| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| 6 #define VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 6 #define VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // . Forwards the appropriate events to the MenuController. This allows the | 25 // . Forwards the appropriate events to the MenuController. This allows the |
| 26 // MenuController to update the selection as the user moves the mouse around. | 26 // MenuController to update the selection as the user moves the mouse around. |
| 27 // . Renders the drop indicator during a drop operation. | 27 // . Renders the drop indicator during a drop operation. |
| 28 // . Shows and hides the window (a NativeWidgetWin) when the menu is shown on | 28 // . Shows and hides the window (a NativeWidgetWin) when the menu is shown on |
| 29 // screen. | 29 // screen. |
| 30 // | 30 // |
| 31 // SubmenuView is itself contained in a MenuScrollViewContainer. | 31 // SubmenuView is itself contained in a MenuScrollViewContainer. |
| 32 // MenuScrollViewContainer handles showing as much of the SubmenuView as the | 32 // MenuScrollViewContainer handles showing as much of the SubmenuView as the |
| 33 // screen allows. If the SubmenuView is taller than the screen, scroll buttons | 33 // screen allows. If the SubmenuView is taller than the screen, scroll buttons |
| 34 // are provided that allow the user to see all the menu items. | 34 // are provided that allow the user to see all the menu items. |
| 35 class VIEWS_API SubmenuView : public View { | 35 class VIEWS_EXPORT SubmenuView : public View { |
| 36 public: | 36 public: |
| 37 // The submenu's class name. | 37 // The submenu's class name. |
| 38 static const char kViewClassName[]; | 38 static const char kViewClassName[]; |
| 39 | 39 |
| 40 // Creates a SubmenuView for the specified menu item. | 40 // Creates a SubmenuView for the specified menu item. |
| 41 explicit SubmenuView(MenuItemView* parent); | 41 explicit SubmenuView(MenuItemView* parent); |
| 42 virtual ~SubmenuView(); | 42 virtual ~SubmenuView(); |
| 43 | 43 |
| 44 // Returns the number of child views that are MenuItemViews. | 44 // Returns the number of child views that are MenuItemViews. |
| 45 // MenuItemViews are identified by ID. | 45 // MenuItemViews are identified by ID. |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 // Minimum width returned in GetPreferredSize(). | 185 // Minimum width returned in GetPreferredSize(). |
| 186 int minimum_preferred_width_; | 186 int minimum_preferred_width_; |
| 187 | 187 |
| 188 DISALLOW_COPY_AND_ASSIGN(SubmenuView); | 188 DISALLOW_COPY_AND_ASSIGN(SubmenuView); |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 } // namespace views | 191 } // namespace views |
| 192 | 192 |
| 193 #endif // VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 193 #endif // VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
| OLD | NEW |