| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VIEWS_VIEW_H_ | 5 #ifndef VIEWS_VIEW_H_ |
| 6 #define VIEWS_VIEW_H_ | 6 #define VIEWS_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Tree operations ----------------------------------------------------------- | 170 // Tree operations ----------------------------------------------------------- |
| 171 | 171 |
| 172 // Get the Widget that hosts this View, if any. | 172 // Get the Widget that hosts this View, if any. |
| 173 virtual const Widget* GetWidget() const; | 173 virtual const Widget* GetWidget() const; |
| 174 virtual Widget* GetWidget(); | 174 virtual Widget* GetWidget(); |
| 175 | 175 |
| 176 // Adds |view| as a child of this view, optionally at |index|. | 176 // Adds |view| as a child of this view, optionally at |index|. |
| 177 void AddChildView(View* view); | 177 void AddChildView(View* view); |
| 178 void AddChildViewAt(View* view, int index); | 178 void AddChildViewAt(View* view, int index); |
| 179 | 179 |
| 180 // Moves |view| to the specified |index|. A negative value for |index| moves |
| 181 // the view at the end. |
| 182 void ReorderChildView(View* view, int index); |
| 183 |
| 180 // Removes |view| from this view. The view's parent will change to NULL. | 184 // Removes |view| from this view. The view's parent will change to NULL. |
| 181 void RemoveChildView(View* view); | 185 void RemoveChildView(View* view); |
| 182 | 186 |
| 183 // Removes all the children from this view. If |delete_children| is true, | 187 // Removes all the children from this view. If |delete_children| is true, |
| 184 // the views are deleted, unless marked as not parent owned. | 188 // the views are deleted, unless marked as not parent owned. |
| 185 void RemoveAllChildViews(bool delete_children); | 189 void RemoveAllChildViews(bool delete_children); |
| 186 | 190 |
| 187 // Returns the child view at |index|. | 191 // Returns the child view at |index|. |
| 188 const View* GetChildViewAt(int index) const; | 192 const View* GetChildViewAt(int index) const; |
| 189 View* GetChildViewAt(int index); | 193 View* GetChildViewAt(int index); |
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 #if defined(OS_WIN) | 1415 #if defined(OS_WIN) |
| 1412 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; | 1416 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; |
| 1413 #endif | 1417 #endif |
| 1414 | 1418 |
| 1415 DISALLOW_COPY_AND_ASSIGN(View); | 1419 DISALLOW_COPY_AND_ASSIGN(View); |
| 1416 }; | 1420 }; |
| 1417 | 1421 |
| 1418 } // namespace views | 1422 } // namespace views |
| 1419 | 1423 |
| 1420 #endif // VIEWS_VIEW_H_ | 1424 #endif // VIEWS_VIEW_H_ |
| OLD | NEW |