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 CHROME_VIEWS_MENU_BUTTON_H__ | 5 #ifndef CHROME_VIEWS_MENU_BUTTON_H__ |
6 #define CHROME_VIEWS_MENU_BUTTON_H__ | 6 #define CHROME_VIEWS_MENU_BUTTON_H__ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "chrome/common/gfx/chrome_font.h" | 10 #include "chrome/common/gfx/chrome_font.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 // Create a Button | 31 // Create a Button |
32 MenuButton(const std::wstring& text, | 32 MenuButton(const std::wstring& text, |
33 ViewMenuDelegate* menu_delegate, | 33 ViewMenuDelegate* menu_delegate, |
34 bool show_menu_marker); | 34 bool show_menu_marker); |
35 virtual ~MenuButton(); | 35 virtual ~MenuButton(); |
36 | 36 |
37 // Activate the button (called when the button is pressed). | 37 // Activate the button (called when the button is pressed). |
38 virtual bool Activate(); | 38 virtual bool Activate(); |
39 | 39 |
40 // Overridden to take into account the potential use of a drop marker. | 40 // Overridden to take into account the potential use of a drop marker. |
41 void GetPreferredSize(CSize* result); | 41 virtual gfx::Size GetPreferredSize(); |
42 virtual void Paint(ChromeCanvas* canvas, bool for_drag); | 42 virtual void Paint(ChromeCanvas* canvas, bool for_drag); |
43 | 43 |
44 // These methods are overriden to implement a simple push button | 44 // These methods are overriden to implement a simple push button |
45 // behavior | 45 // behavior |
46 virtual bool OnMousePressed(const ChromeViews::MouseEvent& e); | 46 virtual bool OnMousePressed(const ChromeViews::MouseEvent& e); |
47 void OnMouseReleased(const ChromeViews::MouseEvent& e, bool canceled); | 47 void OnMouseReleased(const ChromeViews::MouseEvent& e, bool canceled); |
48 virtual bool OnKeyReleased(const KeyEvent& e); | 48 virtual bool OnKeyReleased(const KeyEvent& e); |
49 virtual void OnMouseExited(const MouseEvent& event); | 49 virtual void OnMouseExited(const MouseEvent& event); |
50 | 50 |
51 // Returns the MSAA default action of the current view. The string returned | 51 // Returns the MSAA default action of the current view. The string returned |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Whether or not we're showing a drop marker. | 89 // Whether or not we're showing a drop marker. |
90 bool show_menu_marker_; | 90 bool show_menu_marker_; |
91 | 91 |
92 friend class TextButtonBackground; | 92 friend class TextButtonBackground; |
93 }; | 93 }; |
94 | 94 |
95 } // namespace | 95 } // namespace |
96 | 96 |
97 #endif // CHROME_VIEWS_MENU_BUTTON_H__ | 97 #endif // CHROME_VIEWS_MENU_BUTTON_H__ |
98 | 98 |
OLD | NEW |