| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTROLS_MENU_VIEWS_MENU_H_ | 5 #ifndef CONTROLS_MENU_VIEWS_MENU_H_ |
| 6 #define CONTROLS_MENU_VIEWS_MENU_H_ | 6 #define CONTROLS_MENU_VIEWS_MENU_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
| 13 #include "views/views_api.h" | 13 #include "views/views_export.h" |
| 14 | 14 |
| 15 class SkBitmap; | 15 class SkBitmap; |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Point; | 18 class Point; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace views { | 21 namespace views { |
| 22 | 22 |
| 23 class Accelerator; | 23 class Accelerator; |
| 24 | 24 |
| 25 class VIEWS_API Menu { | 25 class VIEWS_EXPORT Menu { |
| 26 public: | 26 public: |
| 27 ///////////////////////////////////////////////////////////////////////////// | 27 ///////////////////////////////////////////////////////////////////////////// |
| 28 // | 28 // |
| 29 // Delegate Interface | 29 // Delegate Interface |
| 30 // | 30 // |
| 31 // Classes implement this interface to tell the menu system more about each | 31 // Classes implement this interface to tell the menu system more about each |
| 32 // item as it is created. | 32 // item as it is created. |
| 33 // | 33 // |
| 34 ///////////////////////////////////////////////////////////////////////////// | 34 ///////////////////////////////////////////////////////////////////////////// |
| 35 class VIEWS_API Delegate { | 35 class VIEWS_EXPORT Delegate { |
| 36 public: | 36 public: |
| 37 virtual ~Delegate() {} | 37 virtual ~Delegate() {} |
| 38 | 38 |
| 39 // Whether or not an item should be shown as checked. | 39 // Whether or not an item should be shown as checked. |
| 40 virtual bool IsItemChecked(int id) const { | 40 virtual bool IsItemChecked(int id) const { |
| 41 return false; | 41 return false; |
| 42 } | 42 } |
| 43 | 43 |
| 44 // Whether or not an item should be shown as the default (using bold). | 44 // Whether or not an item should be shown as the default (using bold). |
| 45 // There can only be one default menu item. | 45 // There can only be one default menu item. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 // How this popup menu should be aligned relative to the point it is run at. | 266 // How this popup menu should be aligned relative to the point it is run at. |
| 267 AnchorPoint anchor_; | 267 AnchorPoint anchor_; |
| 268 | 268 |
| 269 DISALLOW_COPY_AND_ASSIGN(Menu); | 269 DISALLOW_COPY_AND_ASSIGN(Menu); |
| 270 }; | 270 }; |
| 271 | 271 |
| 272 } // namespace views | 272 } // namespace views |
| 273 | 273 |
| 274 #endif // CONTROLS_MENU_VIEWS_MENU_H_ | 274 #endif // CONTROLS_MENU_VIEWS_MENU_H_ |
| OLD | NEW |