| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 47 // Indicates the drop should occur after the item. | 47 // Indicates the drop should occur after the item. |
| 48 DROP_AFTER, | 48 DROP_AFTER, |
| 49 | 49 |
| 50 // Indicates the drop should occur on the item. | 50 // Indicates the drop should occur on the item. |
| 51 DROP_ON | 51 DROP_ON |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 virtual ~MenuDelegate(); |
| 55 |
| 54 // Whether or not an item should be shown as checked. This is invoked for | 56 // Whether or not an item should be shown as checked. This is invoked for |
| 55 // radio buttons and check buttons. | 57 // radio buttons and check buttons. |
| 56 virtual bool IsItemChecked(int id) const; | 58 virtual bool IsItemChecked(int id) const; |
| 57 | 59 |
| 58 // The string shown for the menu item. This is only invoked when an item is | 60 // The string shown for the menu item. This is only invoked when an item is |
| 59 // added with an empty label. | 61 // added with an empty label. |
| 60 virtual std::wstring GetLabel(int id) const; | 62 virtual std::wstring GetLabel(int id) const; |
| 61 | 63 |
| 62 // The font for the menu item label. | 64 // The font for the menu item label. |
| 63 virtual const gfx::Font& GetLabelFont(int id) const; | 65 virtual const gfx::Font& GetLabelFont(int id) const; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // Invoked prior to a menu being shown. | 191 // Invoked prior to a menu being shown. |
| 190 virtual void WillShowMenu(MenuItemView* menu); | 192 virtual void WillShowMenu(MenuItemView* menu); |
| 191 | 193 |
| 192 // Invoked prior to a menu being hidden. | 194 // Invoked prior to a menu being hidden. |
| 193 virtual void WillHideMenu(MenuItemView* menu); | 195 virtual void WillHideMenu(MenuItemView* menu); |
| 194 }; | 196 }; |
| 195 | 197 |
| 196 } // namespace views | 198 } // namespace views |
| 197 | 199 |
| 198 #endif // VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ | 200 #endif // VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ |
| OLD | NEW |