| 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_ITEM_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Adds a separator to this menu | 208 // Adds a separator to this menu |
| 209 void AppendSeparator(); | 209 void AppendSeparator(); |
| 210 | 210 |
| 211 // Appends a menu item with an icon. This is for the menu item which | 211 // Appends a menu item with an icon. This is for the menu item which |
| 212 // needs an icon. Calling this function forces the Menu class to draw | 212 // needs an icon. Calling this function forces the Menu class to draw |
| 213 // the menu, instead of relying on Windows. | 213 // the menu, instead of relying on Windows. |
| 214 MenuItemView* AppendMenuItemWithIcon(int item_id, | 214 MenuItemView* AppendMenuItemWithIcon(int item_id, |
| 215 const string16& label, | 215 const string16& label, |
| 216 const gfx::ImageSkia& icon); | 216 const gfx::ImageSkia& icon); |
| 217 | 217 |
| 218 // Creates a menu item for the specified entry in the model and appends it as | |
| 219 // a child. | |
| 220 MenuItemView* AppendMenuItemFromModel(ui::MenuModel* model, | |
| 221 int index, | |
| 222 int id); | |
| 223 | |
| 224 // All the AppendXXX methods funnel into this. | 218 // All the AppendXXX methods funnel into this. |
| 225 MenuItemView* AppendMenuItemImpl(int item_id, | 219 MenuItemView* AppendMenuItemImpl(int item_id, |
| 226 const string16& label, | 220 const string16& label, |
| 227 const string16& sublabel, | 221 const string16& sublabel, |
| 228 const string16& minor_text, | 222 const string16& minor_text, |
| 229 const gfx::ImageSkia& icon, | 223 const gfx::ImageSkia& icon, |
| 230 Type type, | 224 Type type, |
| 231 ui::MenuSeparatorType separator_style); | 225 ui::MenuSeparatorType separator_style); |
| 232 | 226 |
| 233 // Returns the view that contains child menu items. If the submenu has | 227 // Returns the view that contains child menu items. If the submenu has |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 // If set to false, the right margin will be removed for menu lines | 530 // If set to false, the right margin will be removed for menu lines |
| 537 // containing other elements. | 531 // containing other elements. |
| 538 bool use_right_margin_; | 532 bool use_right_margin_; |
| 539 | 533 |
| 540 DISALLOW_COPY_AND_ASSIGN(MenuItemView); | 534 DISALLOW_COPY_AND_ASSIGN(MenuItemView); |
| 541 }; | 535 }; |
| 542 | 536 |
| 543 } // namespace views | 537 } // namespace views |
| 544 | 538 |
| 545 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 539 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| OLD | NEW |