| 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_VIEW_H_ | 5 #ifndef UI_VIEWS_VIEW_H_ |
| 6 #define UI_VIEWS_VIEW_H_ | 6 #define UI_VIEWS_VIEW_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 // view hierarchy with a Widget. | 646 // view hierarchy with a Widget. |
| 647 virtual InputMethod* GetInputMethod(); | 647 virtual InputMethod* GetInputMethod(); |
| 648 | 648 |
| 649 // Overridden from ui::EventTarget: | 649 // Overridden from ui::EventTarget: |
| 650 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; | 650 virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE; |
| 651 virtual ui::EventTarget* GetParentTarget() OVERRIDE; | 651 virtual ui::EventTarget* GetParentTarget() OVERRIDE; |
| 652 | 652 |
| 653 // Overridden from ui::EventHandler: | 653 // Overridden from ui::EventHandler: |
| 654 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 654 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
| 655 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 655 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 656 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 656 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
| 657 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 657 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
| 658 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 658 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 659 | 659 |
| 660 // Accelerators -------------------------------------------------------------- | 660 // Accelerators -------------------------------------------------------------- |
| 661 | 661 |
| 662 // Sets a keyboard accelerator for that view. When the user presses the | 662 // Sets a keyboard accelerator for that view. When the user presses the |
| 663 // accelerator key combination, the AcceleratorPressed method is invoked. | 663 // accelerator key combination, the AcceleratorPressed method is invoked. |
| 664 // Note that you can set multiple accelerators for a view by invoking this | 664 // Note that you can set multiple accelerators for a view by invoking this |
| 665 // method several times. Note also that AcceleratorPressed is invoked only | 665 // method several times. Note also that AcceleratorPressed is invoked only |
| 666 // when CanHandleAccelerators() is true. | 666 // when CanHandleAccelerators() is true. |
| 667 virtual void AddAccelerator(const ui::Accelerator& accelerator); | 667 virtual void AddAccelerator(const ui::Accelerator& accelerator); |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 void DestroyLayer(); | 1289 void DestroyLayer(); |
| 1290 | 1290 |
| 1291 // Input --------------------------------------------------------------------- | 1291 // Input --------------------------------------------------------------------- |
| 1292 | 1292 |
| 1293 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX | 1293 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX |
| 1294 // method. If a drag is detected, DoDrag is invoked. | 1294 // method. If a drag is detected, DoDrag is invoked. |
| 1295 bool ProcessMousePressed(const ui::MouseEvent& event, DragInfo* drop_info); | 1295 bool ProcessMousePressed(const ui::MouseEvent& event, DragInfo* drop_info); |
| 1296 bool ProcessMouseDragged(const ui::MouseEvent& event, DragInfo* drop_info); | 1296 bool ProcessMouseDragged(const ui::MouseEvent& event, DragInfo* drop_info); |
| 1297 void ProcessMouseReleased(const ui::MouseEvent& event); | 1297 void ProcessMouseReleased(const ui::MouseEvent& event); |
| 1298 | 1298 |
| 1299 // RootView will invoke this with incoming TouchEvents. Returns the result | 1299 // RootView will invoke this with incoming TouchEvents. |
| 1300 // of OnTouchEvent. | 1300 void ProcessTouchEvent(ui::TouchEvent* event); |
| 1301 ui::EventResult ProcessTouchEvent(ui::TouchEvent* event); | |
| 1302 | 1301 |
| 1303 // RootView will invoke this with incoming GestureEvents. This invokes | 1302 // RootView will invoke this with incoming GestureEvents. This invokes |
| 1304 // OnGestureEvent. | 1303 // OnGestureEvent. |
| 1305 void ProcessGestureEvent(ui::GestureEvent* event); | 1304 void ProcessGestureEvent(ui::GestureEvent* event); |
| 1306 | 1305 |
| 1307 // Accelerators -------------------------------------------------------------- | 1306 // Accelerators -------------------------------------------------------------- |
| 1308 | 1307 |
| 1309 // Registers this view's keyboard accelerators that are not registered to | 1308 // Registers this view's keyboard accelerators that are not registered to |
| 1310 // FocusManager yet, if possible. | 1309 // FocusManager yet, if possible. |
| 1311 void RegisterPendingAccelerators(); | 1310 void RegisterPendingAccelerators(); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 base::win::ScopedComPtr<NativeViewAccessibilityWin> | 1492 base::win::ScopedComPtr<NativeViewAccessibilityWin> |
| 1494 native_view_accessibility_win_; | 1493 native_view_accessibility_win_; |
| 1495 #endif | 1494 #endif |
| 1496 | 1495 |
| 1497 DISALLOW_COPY_AND_ASSIGN(View); | 1496 DISALLOW_COPY_AND_ASSIGN(View); |
| 1498 }; | 1497 }; |
| 1499 | 1498 |
| 1500 } // namespace views | 1499 } // namespace views |
| 1501 | 1500 |
| 1502 #endif // UI_VIEWS_VIEW_H_ | 1501 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |