diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-03 00:00:08 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-03 00:00:08 +0000 |
commit | 77a08750506ab0effb763f8c91866a11e0c96af0 (patch) | |
tree | f0971c507472a8ecd222391c345d6fb0083f86f0 /views/view.h | |
parent | 023208cfc6ab411f3ea79b99abda4a882bec943e (diff) | |
download | chromium_src-77a08750506ab0effb763f8c91866a11e0c96af0.zip chromium_src-77a08750506ab0effb763f8c91866a11e0c96af0.tar.gz chromium_src-77a08750506ab0effb763f8c91866a11e0c96af0.tar.bz2 |
views: Fix some comments of the Tree View API.
BUG=None
TEST=None
R=sky@chromium.org
Review URL: http://codereview.chromium.org/7088023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r-- | views/view.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/views/view.h b/views/view.h index ecdd2e4..cc15c5a 100644 --- a/views/view.h +++ b/views/view.h @@ -190,35 +190,34 @@ class View : public AcceleratorTarget { virtual const Widget* GetWidget() const; virtual Widget* GetWidget(); - // Add a child View, optionally at |index|. + // Adds |view| as a child of this view, optionally at |index|. void AddChildView(View* view); void AddChildViewAt(View* view, int index); - // Remove a child view from this view. The view's parent will change to NULL. - void RemoveChildView(View* views); + // Removes |view| from this view. The view's parent will change to NULL. + void RemoveChildView(View* view); - // Remove all child view from this view. If |delete_views| is true, the views - // are deleted, unless marked as not parent owned. - void RemoveAllChildViews(bool delete_views); + // Removes all the children from this view. If |delete_children| is true, + // the views are deleted, unless marked as not parent owned. + void RemoveAllChildViews(bool delete_children); - // Returns the View at the specified |index|. + // Returns the child view at |index|. const View* GetChildViewAt(int index) const; View* GetChildViewAt(int index); - // Get the number of child Views. + // Returns the number of child views. int child_count() const { return static_cast<int>(children_.size()); } bool has_children() const { return !children_.empty(); } - // Get the parent View + // Returns the parent view. const View* parent() const { return parent_; } View* parent() { return parent_; } - // Returns true if |child| is contained within this View's hierarchy, even as - // an indirect descendant. Will return true if child is also this View. + // Returns true if |view| is contained within this View's hierarchy, even as + // an indirect descendant. Will return true if child is also this view. bool Contains(const View* view) const; - // Returns the index of the specified |view| in this view's children, or -1 - // if the specified view is not a child of this view. + // Returns the index of |view|, or -1 if |view| is not a child of this view. int GetIndexOf(const View* view) const; // TODO(beng): REMOVE (Views need not know about Window). |