| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 int command, | 365 int command, |
| 366 MenuItemView::Type type, | 366 MenuItemView::Type type, |
| 367 MenuDelegate* delegate); | 367 MenuDelegate* delegate); |
| 368 | 368 |
| 369 // The RunXXX methods call into this to set up the necessary state before | 369 // The RunXXX methods call into this to set up the necessary state before |
| 370 // running. |is_first_menu| is true if no menus are currently showing. | 370 // running. |is_first_menu| is true if no menus are currently showing. |
| 371 void PrepareForRun(bool is_first_menu, | 371 void PrepareForRun(bool is_first_menu, |
| 372 bool has_mnemonics, | 372 bool has_mnemonics, |
| 373 bool show_mnemonics); | 373 bool show_mnemonics); |
| 374 | 374 |
| 375 // Returns the flags passed to DrawStringInt. | 375 // Returns the flags passed to DrawStringRect. |
| 376 int GetDrawStringFlags(); | 376 int GetDrawStringFlags(); |
| 377 | 377 |
| 378 // Returns the font list to use for menu text. | 378 // Returns the font list to use for menu text. |
| 379 const gfx::FontList& GetFontList(); | 379 const gfx::FontList& GetFontList(); |
| 380 | 380 |
| 381 // If this menu item has no children a child is added showing it has no | 381 // If this menu item has no children a child is added showing it has no |
| 382 // children. Otherwise AddEmtpyMenus is recursively invoked on child menu | 382 // children. Otherwise AddEmtpyMenus is recursively invoked on child menu |
| 383 // items that have children. | 383 // items that have children. |
| 384 void AddEmptyMenus(); | 384 void AddEmptyMenus(); |
| 385 | 385 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 // If set to false, the right margin will be removed for menu lines | 525 // If set to false, the right margin will be removed for menu lines |
| 526 // containing other elements. | 526 // containing other elements. |
| 527 bool use_right_margin_; | 527 bool use_right_margin_; |
| 528 | 528 |
| 529 DISALLOW_COPY_AND_ASSIGN(MenuItemView); | 529 DISALLOW_COPY_AND_ASSIGN(MenuItemView); |
| 530 }; | 530 }; |
| 531 | 531 |
| 532 } // namespace views | 532 } // namespace views |
| 533 | 533 |
| 534 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ | 534 #endif // UI_VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ |
| OLD | NEW |