From ea1fc4b19a5eac5d072646932e06205d6e51b08c Mon Sep 17 00:00:00 2001 From: "sadrul@chromium.org" Date: Thu, 16 Jun 2011 17:49:04 +0000 Subject: 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 --- views/view.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'views/view.h') 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); -- cgit v1.1