summaryrefslogtreecommitdiffstats
path: root/views/view.h
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 17:49:04 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 17:49:04 +0000
commitea1fc4b19a5eac5d072646932e06205d6e51b08c (patch)
tree46f339940327014094152621ef255132215101f8 /views/view.h
parentcc5e6d0e30b7d0b51d1d84e2286626f3b0fb79a1 (diff)
downloadchromium_src-ea1fc4b19a5eac5d072646932e06205d6e51b08c.zip
chromium_src-ea1fc4b19a5eac5d072646932e06205d6e51b08c.tar.gz
chromium_src-ea1fc4b19a5eac5d072646932e06205d6e51b08c.tar.bz2
Add View::ReorderChildView and Widget::MoveToTop.
The z-ordering of child views is currently maintained (implicitly?) by the order they are added to the parent view. It may often be necessary to change the z-order of views, and View::ReorderChildView can be used to do that. I changed views_desktop to have the two pure-views windows to have overlapping regions, and View::ReorderChildView is used to change the z-ordering of the two windows. So it is possible to click a window to activate it and bring it on top of the other. It could have been done without adding Widget::MoveToTop, but given Widget::MoveAbove and MoveAboveWidget, it sounded like a good idea to have Widget::MoveToTop (MoveToFront?). I do now know what the implementation for windows should be, though. So left it as NOTIMPLEMENTED. BUG=none TEST=none Review URL: http://codereview.chromium.org/7185005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r--views/view.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/views/view.h b/views/view.h
index 1c412ab..3a37e75 100644
--- a/views/view.h
+++ b/views/view.h
@@ -177,6 +177,10 @@ class View : public AcceleratorTarget {
void AddChildView(View* view);
void AddChildViewAt(View* view, int index);
+ // Moves |view| to the specified |index|. A negative value for |index| moves
+ // the view at the end.
+ void ReorderChildView(View* view, int index);
+
// Removes |view| from this view. The view's parent will change to NULL.
void RemoveChildView(View* view);