| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // radio buttons and check buttons. | 66 // radio buttons and check buttons. |
| 67 virtual bool IsItemChecked(int id) const; | 67 virtual bool IsItemChecked(int id) const; |
| 68 | 68 |
| 69 // The string shown for the menu item. This is only invoked when an item is | 69 // The string shown for the menu item. This is only invoked when an item is |
| 70 // added with an empty label. | 70 // added with an empty label. |
| 71 virtual base::string16 GetLabel(int id) const; | 71 virtual base::string16 GetLabel(int id) const; |
| 72 | 72 |
| 73 // The font for the menu item label. | 73 // The font for the menu item label. |
| 74 virtual const gfx::FontList* GetLabelFontList(int id) const; | 74 virtual const gfx::FontList* GetLabelFontList(int id) const; |
| 75 | 75 |
| 76 // Whether this item should be displayed with a bolder color when disabled. | 76 // Whether this item should be displayed with the normal text color, even if |
| 77 virtual bool GetShouldUseDisabledEmphasizedForegroundColor( | 77 // it's disabled. |
| 78 int command_id) const; | 78 virtual bool GetShouldUseNormalForegroundColor(int command_id) const; |
| 79 | 79 |
| 80 // Override the text color of a given menu item dependent on the | 80 // Override the text color of a given menu item dependent on the |
| 81 // |command_id| and its |is_hovered| state. Returns true if it chooses to | 81 // |command_id| and its |is_hovered| state. Returns true if it chooses to |
| 82 // override the color. | 82 // override the color. |
| 83 // | 83 // |
| 84 // TODO(erg): Remove this interface. Injecting raw colors into the menu | 84 // TODO(erg): Remove this interface. Injecting raw colors into the menu |
| 85 // circumvents the NativeTheme. | 85 // circumvents the NativeTheme. |
| 86 virtual bool GetForegroundColor(int command_id, | 86 virtual bool GetForegroundColor(int command_id, |
| 87 bool is_hovered, | 87 bool is_hovered, |
| 88 SkColor* override_color) const; | 88 SkColor* override_color) const; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 int* left_margin, | 247 int* left_margin, |
| 248 int* right_margin) const; | 248 int* right_margin) const; |
| 249 // Returns true if the labels should reserve additional spacing for e.g. | 249 // Returns true if the labels should reserve additional spacing for e.g. |
| 250 // submenu indicators at the end of the line. | 250 // submenu indicators at the end of the line. |
| 251 virtual bool ShouldReserveSpaceForSubmenuIndicator() const; | 251 virtual bool ShouldReserveSpaceForSubmenuIndicator() const; |
| 252 }; | 252 }; |
| 253 | 253 |
| 254 } // namespace views | 254 } // namespace views |
| 255 | 255 |
| 256 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ | 256 #endif // UI_VIEWS_CONTROLS_MENU_MENU_DELEGATE_H_ |
| OLD | NEW |