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

Unified Diff: ui/views/controls/tree/tree_view.h

Issue 2050813002: MacViews: support backgrounds for selected rows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: placate msvc Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/tree/tree_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bb56735c67a82908ee848df656e525aad640729f 100644
--- a/ui/views/controls/tree/tree_view.h
+++ b/ui/views/controls/tree/tree_view.h
@@ -294,16 +294,29 @@ 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);
+ // Returns the InternalNode (if any) whose foreground bounds contain |point|.
+ // If no node's foreground contains |point|, this function returns nullptr.
+ InternalNode* GetNodeAtPoint(const gfx::Point& point);
+
// Returns the row and depth of the specified node.
InternalNode* GetNodeByRow(int row, int* depth);
@@ -331,6 +344,10 @@ class VIEWS_EXPORT TreeView : public ui::TreeModelObserver,
PrefixSelector* GetPrefixSelector();
+ // Returns whether |point| is in the bounds of |node|'s expand/collapse
+ // control.
+ bool IsPointInExpandControl(InternalNode* node, const gfx::Point& point);
+
// The model, may be null.
ui::TreeModel* model_;
« no previous file with comments | « no previous file | ui/views/controls/tree/tree_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698