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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 // Convenience functions which calls into GetEventHandler() with | 570 // Convenience functions which calls into GetEventHandler() with |
571 // a 1x1 rect centered at |point|. | 571 // a 1x1 rect centered at |point|. |
572 View* GetEventHandlerForPoint(const gfx::Point& point); | 572 View* GetEventHandlerForPoint(const gfx::Point& point); |
573 | 573 |
574 // If point-based targeting should be used, return the deepest visible | 574 // If point-based targeting should be used, return the deepest visible |
575 // descendant that contains the center point of |rect|. | 575 // descendant that contains the center point of |rect|. |
576 // If rect-based targeting (i.e., fuzzing) should be used, return the | 576 // If rect-based targeting (i.e., fuzzing) should be used, return the |
577 // closest visible descendant having at least kRectTargetOverlap of | 577 // closest visible descendant having at least kRectTargetOverlap of |
578 // its area covered by |rect|. If no such descendant exists, return the | 578 // its area covered by |rect|. If no such descendant exists, return the |
579 // deepest visible descendant that contains the center point of |rect|. | 579 // deepest visible descendant that contains the center point of |rect|. |
| 580 // See http://goo.gl/3Jp2BD for more information about rect-based targeting. |
580 virtual View* GetEventHandlerForRect(const gfx::Rect& rect); | 581 virtual View* GetEventHandlerForRect(const gfx::Rect& rect); |
581 | 582 |
582 // Returns the deepest visible descendant that contains the specified point | 583 // Returns the deepest visible descendant that contains the specified point |
583 // and supports tooltips. If the view does not contain the point, returns | 584 // and supports tooltips. If the view does not contain the point, returns |
584 // NULL. | 585 // NULL. |
585 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); | 586 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); |
586 | 587 |
587 // Return the cursor that should be used for this view or the default cursor. | 588 // Return the cursor that should be used for this view or the default cursor. |
588 // The event location is in the receiver's coordinate system. The caller is | 589 // The event location is in the receiver's coordinate system. The caller is |
589 // responsible for managing the lifetime of the returned object, though that | 590 // responsible for managing the lifetime of the returned object, though that |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 // Belongs to this view, but it's reference-counted on some platforms | 1558 // Belongs to this view, but it's reference-counted on some platforms |
1558 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1559 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
1559 NativeViewAccessibility* native_view_accessibility_; | 1560 NativeViewAccessibility* native_view_accessibility_; |
1560 | 1561 |
1561 DISALLOW_COPY_AND_ASSIGN(View); | 1562 DISALLOW_COPY_AND_ASSIGN(View); |
1562 }; | 1563 }; |
1563 | 1564 |
1564 } // namespace views | 1565 } // namespace views |
1565 | 1566 |
1566 #endif // UI_VIEWS_VIEW_H_ | 1567 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |