Chromium Code Reviews| Index: ui/views/controls/tree/tree_view.h |
| diff --git a/ui/views/controls/tree/tree_view.h b/ui/views/controls/tree/tree_view.h |
| index 2dc764e7f5688216ff6944f650fcb66feae0de1a..985fc7337c945643c9c3c8e1878707a800be9ebd 100644 |
| --- a/ui/views/controls/tree/tree_view.h |
| +++ b/ui/views/controls/tree/tree_view.h |
| @@ -294,12 +294,21 @@ class VIEWS_EXPORT TreeView : public ui::TreeModelObserver, |
| ui::TreeModelNode* model_node, |
| GetInternalNodeCreateType create_type); |
| - // Returns the bounds for a node. |
| - gfx::Rect GetBoundsForNode(InternalNode* node); |
| + // Returns the bounds for a node's background. |
| + gfx::Rect GetBackgroundBoundsForNode(InternalNode* node); |
| - // Implementation of GetBoundsForNode. Separated out as some callers already |
| - // know the row/depth. |
| - gfx::Rect GetBoundsForNodeImpl(InternalNode* node, int row, int depth); |
| + // Return the bounds for a node's foreground, which is the part containing the |
| + // expand/collapse symbol (if any), the icon (if any), and the text label. |
| + gfx::Rect GetForegroundBoundsForNode(InternalNode* node); |
| + |
| + // Returns the bounds for a node's text label. |
| + gfx::Rect GetTextBoundsForNode(InternalNode* node); |
| + |
| + // Implementation of GetTextBoundsForNode. Separated out as some callers |
| + // already know the row/depth. |
| + gfx::Rect GetForegroundBoundsForNodeImpl(InternalNode* node, |
| + int row, |
| + int depth); |
| // Returns the row and depth of a node. |
| int GetRowForInternalNode(InternalNode* node, int* depth); |
| @@ -331,6 +340,13 @@ class VIEWS_EXPORT TreeView : public ui::TreeModelObserver, |
| PrefixSelector* GetPrefixSelector(); |
| + // Returns the InternalNode (if any) lying under |point|. If no node lies |
| + // under |point|, this function returns nullptr. |
| + InternalNode* NodeAtPoint(const gfx::Point& point); |
|
sky
2016/06/16 17:34:39
GetNodeAtPoint and put above GetNodeByRow. Also ma
Elly Fong-Jones
2016/06/23 19:47:13
Done.
|
| + |
| + // Returns whether |point| is in the bounds of |node|'s expand/collapse arrow. |
| + bool HitsNodeArrow(InternalNode* node, const gfx::Point& point); |
|
sky
2016/06/16 17:34:39
nit: arrow refers to a specific rendering and isn'
Elly Fong-Jones
2016/06/23 19:47:13
Done.
|
| + |
| // The model, may be null. |
| ui::TreeModel* model_; |