OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
6 #define UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; | 70 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; |
71 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 71 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
72 virtual void OnDragExited() OVERRIDE; | 72 virtual void OnDragExited() OVERRIDE; |
73 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 73 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
74 | 74 |
75 // Scrolls on menu item boundaries. | 75 // Scrolls on menu item boundaries. |
76 virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE; | 76 virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE; |
77 | 77 |
78 // Overridden from ui::EventHandler. | 78 // Overridden from ui::EventHandler. |
79 // Scrolls on menu item boundaries. | 79 // Scrolls on menu item boundaries. |
80 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 80 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
81 | 81 |
82 // Returns true if the menu is showing. | 82 // Returns true if the menu is showing. |
83 bool IsShowing(); | 83 bool IsShowing(); |
84 | 84 |
85 // Shows the menu at the specified location. Coordinates are in screen | 85 // Shows the menu at the specified location. Coordinates are in screen |
86 // coordinates. max_width gives the max width the view should be. | 86 // coordinates. max_width gives the max width the view should be. |
87 void ShowAt(Widget* parent, | 87 void ShowAt(Widget* parent, |
88 const gfx::Rect& bounds, | 88 const gfx::Rect& bounds, |
89 bool do_capture); | 89 bool do_capture); |
90 | 90 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 // The submenu's scroll animator | 204 // The submenu's scroll animator |
205 scoped_ptr<ScrollAnimator> scroll_animator_; | 205 scoped_ptr<ScrollAnimator> scroll_animator_; |
206 | 206 |
207 DISALLOW_COPY_AND_ASSIGN(SubmenuView); | 207 DISALLOW_COPY_AND_ASSIGN(SubmenuView); |
208 }; | 208 }; |
209 | 209 |
210 } // namespace views | 210 } // namespace views |
211 | 211 |
212 #endif // UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ | 212 #endif // UI_VIEWS_CONTROLS_MENU_SUBMENU_VIEW_H_ |
OLD | NEW |