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 VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 5 #ifndef VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
6 #define VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 6 #define VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "ui/gfx/font.h" | 12 #include "ui/gfx/font.h" |
13 #include "views/background.h" | 13 #include "views/background.h" |
14 #include "views/controls/button/text_button.h" | 14 #include "views/controls/button/text_button.h" |
15 | 15 |
16 namespace views { | 16 namespace views { |
17 | 17 |
18 class MouseEvent; | 18 class MouseEvent; |
19 class ViewMenuDelegate; | 19 class ViewMenuDelegate; |
20 | 20 |
21 | 21 |
22 //////////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////////// |
23 // | 23 // |
24 // MenuButton | 24 // MenuButton |
25 // | 25 // |
26 // A button that shows a menu when the left mouse button is pushed | 26 // A button that shows a menu when the left mouse button is pushed |
27 // | 27 // |
28 //////////////////////////////////////////////////////////////////////////////// | 28 //////////////////////////////////////////////////////////////////////////////// |
29 class VIEWS_API MenuButton : public TextButton { | 29 class VIEWS_EXPORT MenuButton : public TextButton { |
30 public: | 30 public: |
31 // The menu button's class name. | 31 // The menu button's class name. |
32 static const char kViewClassName[]; | 32 static const char kViewClassName[]; |
33 | 33 |
34 // Create a Button. | 34 // Create a Button. |
35 MenuButton(ButtonListener* listener, | 35 MenuButton(ButtonListener* listener, |
36 const std::wstring& text, | 36 const std::wstring& text, |
37 ViewMenuDelegate* menu_delegate, | 37 ViewMenuDelegate* menu_delegate, |
38 bool show_menu_marker); | 38 bool show_menu_marker); |
39 virtual ~MenuButton(); | 39 virtual ~MenuButton(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // If non-null the destuctor sets this to true. This is set while the menu is | 96 // If non-null the destuctor sets this to true. This is set while the menu is |
97 // showing and used to detect if the menu was deleted while running. | 97 // showing and used to detect if the menu was deleted while running. |
98 bool* destroyed_flag_; | 98 bool* destroyed_flag_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 100 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace views | 103 } // namespace views |
104 | 104 |
105 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 105 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
OLD | NEW |