| 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_BASE_MODELS_MENU_MODEL_H_ | 5 #ifndef UI_BASE_MODELS_MENU_MODEL_H_ |
| 6 #define UI_BASE_MODELS_MENU_MODEL_H_ | 6 #define UI_BASE_MODELS_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "ui/base/models/menu_model_delegate.h" | 9 #include "ui/base/models/menu_model_delegate.h" |
| 10 #include "ui/base/models/menu_separator_types.h" | 10 #include "ui/base/models/menu_separator_types.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // Returns true if the menu item (label/sublabel/icon) at the specified | 68 // Returns true if the menu item (label/sublabel/icon) at the specified |
| 69 // index can change over the course of the menu's lifetime. If this function | 69 // index can change over the course of the menu's lifetime. If this function |
| 70 // returns true, the label, sublabel and icon of the menu item will be | 70 // returns true, the label, sublabel and icon of the menu item will be |
| 71 // updated each time the menu is shown. | 71 // updated each time the menu is shown. |
| 72 virtual bool IsItemDynamicAt(int index) const = 0; | 72 virtual bool IsItemDynamicAt(int index) const = 0; |
| 73 | 73 |
| 74 // Returns the font list used for the label at the specified index. | 74 // Returns the font list used for the label at the specified index. |
| 75 // If NULL, then the default font list should be used. | 75 // If NULL, then the default font list should be used. |
| 76 virtual const gfx::FontList* GetLabelFontListAt(int index) const; | 76 virtual const gfx::FontList* GetLabelFontListAt(int index) const; |
| 77 | 77 |
| 78 // Gets the acclerator information for the specified index, returning true if | 78 // Gets the accelerator information for the specified index, returning true if |
| 79 // there is a shortcut accelerator for the item, false otherwise. | 79 // there is a shortcut accelerator for the item, false otherwise. |
| 80 virtual bool GetAcceleratorAt(int index, | 80 virtual bool GetAcceleratorAt(int index, |
| 81 ui::Accelerator* accelerator) const = 0; | 81 ui::Accelerator* accelerator) const = 0; |
| 82 | 82 |
| 83 // Returns the checked state of the item at the specified index. | 83 // Returns the checked state of the item at the specified index. |
| 84 virtual bool IsItemCheckedAt(int index) const = 0; | 84 virtual bool IsItemCheckedAt(int index) const = 0; |
| 85 | 85 |
| 86 // Returns the id of the group of radio items that the item at the specified | 86 // Returns the id of the group of radio items that the item at the specified |
| 87 // index belongs to. | 87 // index belongs to. |
| 88 virtual int GetGroupIdAt(int index) const = 0; | 88 virtual int GetGroupIdAt(int index) const = 0; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // true if an item with the specified command id is found. |model| is inout, | 131 // true if an item with the specified command id is found. |model| is inout, |
| 132 // and specifies the model to start searching from. | 132 // and specifies the model to start searching from. |
| 133 static bool GetModelAndIndexForCommandId(int command_id, | 133 static bool GetModelAndIndexForCommandId(int command_id, |
| 134 MenuModel** model, | 134 MenuModel** model, |
| 135 int* index); | 135 int* index); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace ui | 138 } // namespace ui |
| 139 | 139 |
| 140 #endif // UI_BASE_MODELS_MENU_MODEL_H_ | 140 #endif // UI_BASE_MODELS_MENU_MODEL_H_ |
| OLD | NEW |