| 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_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 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "app/gfx/chrome_font.h" | 10 #include "app/gfx/font.h" |
| 11 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "views/background.h" | 12 #include "views/background.h" |
| 13 #include "views/controls/button/text_button.h" | 13 #include "views/controls/button/text_button.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 | 16 |
| 17 class MouseEvent; | 17 class MouseEvent; |
| 18 class ViewMenuDelegate; | 18 class ViewMenuDelegate; |
| 19 | 19 |
| 20 | 20 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 void set_menu_delegate(ViewMenuDelegate* delegate) { | 38 void set_menu_delegate(ViewMenuDelegate* delegate) { |
| 39 menu_delegate_ = delegate; | 39 menu_delegate_ = delegate; |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Activate the button (called when the button is pressed). | 42 // Activate the button (called when the button is pressed). |
| 43 virtual bool Activate(); | 43 virtual bool Activate(); |
| 44 | 44 |
| 45 // Overridden to take into account the potential use of a drop marker. | 45 // Overridden to take into account the potential use of a drop marker. |
| 46 virtual gfx::Size GetPreferredSize(); | 46 virtual gfx::Size GetPreferredSize(); |
| 47 virtual void Paint(ChromeCanvas* canvas, bool for_drag); | 47 virtual void Paint(gfx::Canvas* canvas, bool for_drag); |
| 48 | 48 |
| 49 // These methods are overriden to implement a simple push button | 49 // These methods are overriden to implement a simple push button |
| 50 // behavior | 50 // behavior |
| 51 virtual bool OnMousePressed(const MouseEvent& e); | 51 virtual bool OnMousePressed(const MouseEvent& e); |
| 52 void OnMouseReleased(const MouseEvent& e, bool canceled); | 52 void OnMouseReleased(const MouseEvent& e, bool canceled); |
| 53 virtual bool OnKeyReleased(const KeyEvent& e); | 53 virtual bool OnKeyReleased(const KeyEvent& e); |
| 54 virtual void OnMouseExited(const MouseEvent& event); | 54 virtual void OnMouseExited(const MouseEvent& event); |
| 55 | 55 |
| 56 // Accessibility accessors, overridden from View. | 56 // Accessibility accessors, overridden from View. |
| 57 virtual bool GetAccessibleDefaultAction(std::wstring* action); | 57 virtual bool GetAccessibleDefaultAction(std::wstring* action); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 83 | 83 |
| 84 // Whether or not we're showing a drop marker. | 84 // Whether or not we're showing a drop marker. |
| 85 bool show_menu_marker_; | 85 bool show_menu_marker_; |
| 86 | 86 |
| 87 friend class TextButtonBackground; | 87 friend class TextButtonBackground; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace views | 90 } // namespace views |
| 91 | 91 |
| 92 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 92 #endif // VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| OLD | NEW |