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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
493 | 493 |
494 // Enable/Disable accelerated compositing. | 494 // Enable/Disable accelerated compositing. |
495 static void set_use_acceleration_when_possible(bool use); | 495 static void set_use_acceleration_when_possible(bool use); |
496 static bool get_use_acceleration_when_possible(); | 496 static bool get_use_acceleration_when_possible(); |
497 | 497 |
498 // Input --------------------------------------------------------------------- | 498 // Input --------------------------------------------------------------------- |
499 // The points (and mouse locations) in the following functions are in the | 499 // The points (and mouse locations) in the following functions are in the |
500 // view's coordinates, except for a RootView. | 500 // view's coordinates, except for a RootView. |
501 | 501 |
502 // Returns the deepest visible descendant that contains the specified point. | 502 // Returns the deepest visible descendant that contains the specified point. |
503 virtual View* GetEventHandlerForPoint(const gfx::Point& point); | 503 virtual View* GetEventHandlerForPoint(const gfx::Point& point); |
sky
2012/08/02 15:52:08
Add a comment to this that if overriding GetEventH
tdanderson
2012/08/02 18:11:37
Done.
| |
504 | 504 |
505 // Considers the bounding rectangles of all leaf descendant views that have | |
506 // at least views::kFuzzingOverlapPercentage of their area covered by | |
507 // |touch_rect|. Among these rectangles, choose one that is closest to the | |
sky
2012/08/02 15:52:08
touch_rect -> rect
Why is the rect in screen coor
tdanderson
2012/08/02 18:11:37
Done.
| |
508 // center line of |touch_rect| and return its corresponding View. If there | |
509 // are no such rectangles, NULL is returned. Note that |touch_rect| is in | |
510 // screen coordinates. | |
511 virtual View* GetEventHandlerForRect(const gfx::Rect& touch_rect); | |
512 | |
505 // Return the cursor that should be used for this view or the default cursor. | 513 // Return the cursor that should be used for this view or the default cursor. |
506 // The event location is in the receiver's coordinate system. The caller is | 514 // The event location is in the receiver's coordinate system. The caller is |
507 // responsible for managing the lifetime of the returned object, though that | 515 // responsible for managing the lifetime of the returned object, though that |
508 // lifetime may vary from platform to platform. On Windows and Aura, | 516 // lifetime may vary from platform to platform. On Windows and Aura, |
509 // the cursor is a shared resource. | 517 // the cursor is a shared resource. |
510 virtual gfx::NativeCursor GetCursor(const MouseEvent& event); | 518 virtual gfx::NativeCursor GetCursor(const MouseEvent& event); |
511 | 519 |
512 // Convenience to test whether a point is within this view's bounds | 520 // Convenience to test whether a point is within this view's bounds |
513 virtual bool HitTest(const gfx::Point& l) const; | 521 virtual bool HitTest(const gfx::Point& l) const; |
514 | 522 |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1468 base::win::ScopedComPtr<NativeViewAccessibilityWin> | 1476 base::win::ScopedComPtr<NativeViewAccessibilityWin> |
1469 native_view_accessibility_win_; | 1477 native_view_accessibility_win_; |
1470 #endif | 1478 #endif |
1471 | 1479 |
1472 DISALLOW_COPY_AND_ASSIGN(View); | 1480 DISALLOW_COPY_AND_ASSIGN(View); |
1473 }; | 1481 }; |
1474 | 1482 |
1475 } // namespace views | 1483 } // namespace views |
1476 | 1484 |
1477 #endif // UI_VIEWS_VIEW_H_ | 1485 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |