| 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_MENU_DELEGATE_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ |
| 6 #define VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ | 6 #define VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 namespace views { | 26 namespace views { |
| 27 | 27 |
| 28 class DropTargetEvent; | 28 class DropTargetEvent; |
| 29 class MenuButton; | 29 class MenuButton; |
| 30 | 30 |
| 31 // MenuDelegate -------------------------------------------------------------- | 31 // MenuDelegate -------------------------------------------------------------- |
| 32 | 32 |
| 33 // Delegate for a menu. This class is used as part of MenuItemView, see it | 33 // Delegate for a menu. This class is used as part of MenuItemView, see it |
| 34 // for details. | 34 // for details. |
| 35 // TODO(sky): merge this with ui::MenuModel. | 35 // TODO(sky): merge this with ui::MenuModel. |
| 36 class VIEWS_API MenuDelegate { | 36 class VIEWS_EXPORT MenuDelegate { |
| 37 public: | 37 public: |
| 38 // Used during drag and drop to indicate where the drop indicator should | 38 // Used during drag and drop to indicate where the drop indicator should |
| 39 // be rendered. | 39 // be rendered. |
| 40 enum DropPosition { | 40 enum DropPosition { |
| 41 // Indicates a drop is not allowed here. | 41 // Indicates a drop is not allowed here. |
| 42 DROP_NONE, | 42 DROP_NONE, |
| 43 | 43 |
| 44 // Indicates the drop should occur before the item. | 44 // Indicates the drop should occur before the item. |
| 45 DROP_BEFORE, | 45 DROP_BEFORE, |
| 46 | 46 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Invoked prior to a menu being shown. | 191 // Invoked prior to a menu being shown. |
| 192 virtual void WillShowMenu(MenuItemView* menu); | 192 virtual void WillShowMenu(MenuItemView* menu); |
| 193 | 193 |
| 194 // Invoked prior to a menu being hidden. | 194 // Invoked prior to a menu being hidden. |
| 195 virtual void WillHideMenu(MenuItemView* menu); | 195 virtual void WillHideMenu(MenuItemView* menu); |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace views | 198 } // namespace views |
| 199 | 199 |
| 200 #endif // VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ | 200 #endif // VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ |
| OLD | NEW |