Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: ui/views/view.h

Issue 2348143003: MacViews: Implement Force Touch/Mac dictionary lookup for Textfields. (Closed)
Patch Set: --- Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // Returns the View that should be the target of an event having |rect| as 566 // 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 567 // its location, or NULL if no such target exists. |rect| is in the local
568 // coordinate space of |this|. 568 // coordinate space of |this|.
569 View* GetEventHandlerForRect(const gfx::Rect& rect); 569 View* GetEventHandlerForRect(const gfx::Rect& rect);
570 570
571 // Returns the deepest visible descendant that contains the specified point 571 // Returns the deepest visible descendant that contains the specified point
572 // and supports tooltips. If the view does not contain the point, returns 572 // and supports tooltips. If the view does not contain the point, returns
573 // NULL. 573 // NULL.
574 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); 574 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point);
575 575
576 // Retreives the |word| displayed at the given |point|. If no word is
577 // displayed at the |point|, returns a nearby word. |baseline_point| should
578 // correspond to the left baseline point of the leftmost glyph of the |word|
579 // in the view's coordinates. Returns false, if no word can be retreived.
580 virtual bool GetWordAtPoint(const gfx::Point& point,
tapted 2016/09/21 04:44:14 ooh - also I don't think we can justify adding thi
karandeepb 2016/09/21 05:37:12 Yeah it seems similar to tooltips but is very Mac
tapted 2016/09/22 00:50:03 What about putting a GetRenderText() directly on v
karandeepb 2016/09/22 08:17:39 We also need a method which returns non const Rend
581 gfx::NativeStyledString word,
582 gfx::Point* baseline_point);
583
576 // Return the cursor that should be used for this view or the default cursor. 584 // 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 585 // 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 586 // responsible for managing the lifetime of the returned object, though that
579 // lifetime may vary from platform to platform. On Windows and Aura, 587 // lifetime may vary from platform to platform. On Windows and Aura,
580 // the cursor is a shared resource. 588 // the cursor is a shared resource.
581 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event); 589 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event);
582 590
583 // A convenience function which calls HitTestRect() with a rect of size 591 // 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 592 // 1x1 and an origin of |point|. |point| is in the local coordinate space
585 // of |this|. 593 // of |this|.
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // Belongs to this view, but it's reference-counted on some platforms 1572 // 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. 1573 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1566 NativeViewAccessibility* native_view_accessibility_; 1574 NativeViewAccessibility* native_view_accessibility_;
1567 1575
1568 DISALLOW_COPY_AND_ASSIGN(View); 1576 DISALLOW_COPY_AND_ASSIGN(View);
1569 }; 1577 };
1570 1578
1571 } // namespace views 1579 } // namespace views
1572 1580
1573 #endif // UI_VIEWS_VIEW_H_ 1581 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698