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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
43 #include "base/win/scoped_comptr.h" | 43 #include "base/win/scoped_comptr.h" |
44 #endif | 44 #endif |
45 | 45 |
46 using ui::OSExchangeData; | 46 using ui::OSExchangeData; |
47 | 47 |
48 namespace gfx { | 48 namespace gfx { |
49 class Canvas; | 49 class Canvas; |
50 class Insets; | 50 class Insets; |
51 class Path; | 51 class Path; |
| 52 class RenderText; |
52 class Transform; | 53 class Transform; |
53 } | 54 } |
54 | 55 |
55 namespace ui { | 56 namespace ui { |
56 struct AXViewState; | 57 struct AXViewState; |
57 class Compositor; | 58 class Compositor; |
58 class InputMethod; | 59 class InputMethod; |
59 class Layer; | 60 class Layer; |
60 class NativeTheme; | 61 class NativeTheme; |
61 class PaintContext; | 62 class PaintContext; |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 // Returns the View that should be the target of an event having |rect| as | 567 // Returns the View that should be the target of an event having |rect| as |
567 // its location, or NULL if no such target exists. |rect| is in the local | 568 // its location, or NULL if no such target exists. |rect| is in the local |
568 // coordinate space of |this|. | 569 // coordinate space of |this|. |
569 View* GetEventHandlerForRect(const gfx::Rect& rect); | 570 View* GetEventHandlerForRect(const gfx::Rect& rect); |
570 | 571 |
571 // Returns the deepest visible descendant that contains the specified point | 572 // Returns the deepest visible descendant that contains the specified point |
572 // and supports tooltips. If the view does not contain the point, returns | 573 // and supports tooltips. If the view does not contain the point, returns |
573 // NULL. | 574 // NULL. |
574 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); | 575 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); |
575 | 576 |
| 577 // Returns the RenderText instance corresponding to the view. Currently, only |
| 578 // views which have at most one RenderText instance, should implement this. |
| 579 virtual gfx::RenderText* GetRenderText(); |
| 580 |
576 // Return the cursor that should be used for this view or the default cursor. | 581 // Return the cursor that should be used for this view or the default cursor. |
577 // The event location is in the receiver's coordinate system. The caller is | 582 // The event location is in the receiver's coordinate system. The caller is |
578 // responsible for managing the lifetime of the returned object, though that | 583 // responsible for managing the lifetime of the returned object, though that |
579 // lifetime may vary from platform to platform. On Windows and Aura, | 584 // lifetime may vary from platform to platform. On Windows and Aura, |
580 // the cursor is a shared resource. | 585 // the cursor is a shared resource. |
581 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event); | 586 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event); |
582 | 587 |
583 // A convenience function which calls HitTestRect() with a rect of size | 588 // A convenience function which calls HitTestRect() with a rect of size |
584 // 1x1 and an origin of |point|. |point| is in the local coordinate space | 589 // 1x1 and an origin of |point|. |point| is in the local coordinate space |
585 // of |this|. | 590 // of |this|. |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 // Belongs to this view, but it's reference-counted on some platforms | 1569 // Belongs to this view, but it's reference-counted on some platforms |
1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1570 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
1566 NativeViewAccessibility* native_view_accessibility_; | 1571 NativeViewAccessibility* native_view_accessibility_; |
1567 | 1572 |
1568 DISALLOW_COPY_AND_ASSIGN(View); | 1573 DISALLOW_COPY_AND_ASSIGN(View); |
1569 }; | 1574 }; |
1570 | 1575 |
1571 } // namespace views | 1576 } // namespace views |
1572 | 1577 |
1573 #endif // UI_VIEWS_VIEW_H_ | 1578 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |