| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_CHROME_MENU_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_CHROME_MENU_H_ |
| 6 #define VIEWS_CONTROLS_MENU_CHROME_MENU_H_ | 6 #define VIEWS_CONTROLS_MENU_CHROME_MENU_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // Returns true if this menu item has a submenu. | 312 // Returns true if this menu item has a submenu. |
| 313 virtual bool HasSubmenu() const { return (submenu_ != NULL); } | 313 virtual bool HasSubmenu() const { return (submenu_ != NULL); } |
| 314 | 314 |
| 315 // Returns the view containing child menu items. | 315 // Returns the view containing child menu items. |
| 316 virtual SubmenuView* GetSubmenu() const { return submenu_; } | 316 virtual SubmenuView* GetSubmenu() const { return submenu_; } |
| 317 | 317 |
| 318 // Returns the parent menu item. | 318 // Returns the parent menu item. |
| 319 MenuItemView* GetParentMenuItem() const { return parent_menu_item_; } | 319 MenuItemView* GetParentMenuItem() const { return parent_menu_item_; } |
| 320 | 320 |
| 321 // Sets the font. | 321 // Sets the font. |
| 322 void SetFont(const ChromeFont& font) { font_ = font; } | 322 void SetFont(const gfx::Font& font) { font_ = font; } |
| 323 | 323 |
| 324 // Sets the title | 324 // Sets the title |
| 325 void SetTitle(const std::wstring& title) { | 325 void SetTitle(const std::wstring& title) { |
| 326 title_ = title; | 326 title_ = title; |
| 327 } | 327 } |
| 328 | 328 |
| 329 // Returns the title. | 329 // Returns the title. |
| 330 const std::wstring& GetTitle() const { return title_; } | 330 const std::wstring& GetTitle() const { return title_; } |
| 331 | 331 |
| 332 // Sets whether this item is selected. This is invoked as the user moves | 332 // Sets whether this item is selected. This is invoked as the user moves |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // Whether we're selected. | 453 // Whether we're selected. |
| 454 bool selected_; | 454 bool selected_; |
| 455 | 455 |
| 456 // Command id. | 456 // Command id. |
| 457 int command_; | 457 int command_; |
| 458 | 458 |
| 459 // Submenu, created via CreateSubmenu. | 459 // Submenu, created via CreateSubmenu. |
| 460 SubmenuView* submenu_; | 460 SubmenuView* submenu_; |
| 461 | 461 |
| 462 // Font. | 462 // Font. |
| 463 ChromeFont font_; | 463 gfx::Font font_; |
| 464 | 464 |
| 465 // Title. | 465 // Title. |
| 466 std::wstring title_; | 466 std::wstring title_; |
| 467 | 467 |
| 468 // Icon. | 468 // Icon. |
| 469 SkBitmap icon_; | 469 SkBitmap icon_; |
| 470 | 470 |
| 471 // Does the title have a mnemonic? | 471 // Does the title have a mnemonic? |
| 472 bool has_mnemonics_; | 472 bool has_mnemonics_; |
| 473 | 473 |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 // Task for scrolling the menu. If non-null indicates a scroll is currently | 940 // Task for scrolling the menu. If non-null indicates a scroll is currently |
| 941 // underway. | 941 // underway. |
| 942 scoped_ptr<MenuScrollTask> scroll_task_; | 942 scoped_ptr<MenuScrollTask> scroll_task_; |
| 943 | 943 |
| 944 DISALLOW_EVIL_CONSTRUCTORS(MenuController); | 944 DISALLOW_EVIL_CONSTRUCTORS(MenuController); |
| 945 }; | 945 }; |
| 946 | 946 |
| 947 } // namespace views | 947 } // namespace views |
| 948 | 948 |
| 949 #endif // VIEWS_CONTROLS_MENU_CHROME_MENU_H_ | 949 #endif // VIEWS_CONTROLS_MENU_CHROME_MENU_H_ |
| OLD | NEW |