| 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_VIEW_H_ | 5 #ifndef VIEWS_VIEW_H_ |
| 6 #define VIEWS_VIEW_H_ | 6 #define VIEWS_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 | 580 |
| 581 // This method is invoked when the mouse exits this control | 581 // This method is invoked when the mouse exits this control |
| 582 // The provided event location is always (0, 0) | 582 // The provided event location is always (0, 0) |
| 583 // Default implementation does nothing. Override as needed. | 583 // Default implementation does nothing. Override as needed. |
| 584 virtual void OnMouseExited(const MouseEvent& event); | 584 virtual void OnMouseExited(const MouseEvent& event); |
| 585 | 585 |
| 586 // This method is invoked for each touch event. Default implementation | 586 // This method is invoked for each touch event. Default implementation |
| 587 // does nothing. Override as needed. | 587 // does nothing. Override as needed. |
| 588 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event); | 588 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event); |
| 589 | 589 |
| 590 // This method is invoked for each GestureEvent recognized from GestureManager |
| 591 // Default implementation does nothing. Override as needed. |
| 592 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event); |
| 593 |
| 594 |
| 590 // Set the MouseHandler for a drag session. | 595 // Set the MouseHandler for a drag session. |
| 591 // | 596 // |
| 592 // A drag session is a stream of mouse events starting | 597 // A drag session is a stream of mouse events starting |
| 593 // with a MousePressed event, followed by several MouseDragged | 598 // with a MousePressed event, followed by several MouseDragged |
| 594 // events and finishing with a MouseReleased event. | 599 // events and finishing with a MouseReleased event. |
| 595 // | 600 // |
| 596 // This method should be only invoked while processing a | 601 // This method should be only invoked while processing a |
| 597 // MouseDragged or MousePressed event. | 602 // MouseDragged or MousePressed event. |
| 598 // | 603 // |
| 599 // All further mouse dragged and mouse up events will be sent | 604 // All further mouse dragged and mouse up events will be sent |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX | 1272 // RootView invokes these. These in turn invoke the appropriate OnMouseXXX |
| 1268 // method. If a drag is detected, DoDrag is invoked. | 1273 // method. If a drag is detected, DoDrag is invoked. |
| 1269 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info); | 1274 bool ProcessMousePressed(const MouseEvent& event, DragInfo* drop_info); |
| 1270 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info); | 1275 bool ProcessMouseDragged(const MouseEvent& event, DragInfo* drop_info); |
| 1271 void ProcessMouseReleased(const MouseEvent& event); | 1276 void ProcessMouseReleased(const MouseEvent& event); |
| 1272 | 1277 |
| 1273 // RootView will invoke this with incoming TouchEvents. Returns the | 1278 // RootView will invoke this with incoming TouchEvents. Returns the |
| 1274 // the result of OnTouchEvent. | 1279 // the result of OnTouchEvent. |
| 1275 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event); | 1280 ui::TouchStatus ProcessTouchEvent(const TouchEvent& event); |
| 1276 | 1281 |
| 1282 // GestureManager will invoke this with incoming GestureEvents. Returns the |
| 1283 // the result of OnGestureEvent. |
| 1284 ui::GestureStatus ProcessGestureEvent(const GestureEvent& event); |
| 1285 |
| 1277 // Accelerators -------------------------------------------------------------- | 1286 // Accelerators -------------------------------------------------------------- |
| 1278 | 1287 |
| 1279 // Registers this view's keyboard accelerators that are not registered to | 1288 // Registers this view's keyboard accelerators that are not registered to |
| 1280 // FocusManager yet, if possible. | 1289 // FocusManager yet, if possible. |
| 1281 void RegisterPendingAccelerators(); | 1290 void RegisterPendingAccelerators(); |
| 1282 | 1291 |
| 1283 // Unregisters all the keyboard accelerators associated with this view. | 1292 // Unregisters all the keyboard accelerators associated with this view. |
| 1284 // |leave_data_intact| if true does not remove data from accelerators_ array, | 1293 // |leave_data_intact| if true does not remove data from accelerators_ array, |
| 1285 // so it could be re-registered with other focus manager | 1294 // so it could be re-registered with other focus manager |
| 1286 void UnregisterAccelerators(bool leave_data_intact); | 1295 void UnregisterAccelerators(bool leave_data_intact); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 #if defined(OS_WIN) | 1455 #if defined(OS_WIN) |
| 1447 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; | 1456 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; |
| 1448 #endif | 1457 #endif |
| 1449 | 1458 |
| 1450 DISALLOW_COPY_AND_ASSIGN(View); | 1459 DISALLOW_COPY_AND_ASSIGN(View); |
| 1451 }; | 1460 }; |
| 1452 | 1461 |
| 1453 } // namespace views | 1462 } // namespace views |
| 1454 | 1463 |
| 1455 #endif // VIEWS_VIEW_H_ | 1464 #endif // VIEWS_VIEW_H_ |
| OLD | NEW |