OLD | NEW |
1 // Copyright (c) 2010 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_GRID_LAYOUT_H_ | 5 #ifndef VIEWS_GRID_LAYOUT_H_ |
6 #define VIEWS_GRID_LAYOUT_H_ | 6 #define VIEWS_GRID_LAYOUT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // The column size is fixed. | 98 // The column size is fixed. |
99 FIXED, | 99 FIXED, |
100 | 100 |
101 // The preferred size of the view is used to determine the column size. | 101 // The preferred size of the view is used to determine the column size. |
102 USE_PREF | 102 USE_PREF |
103 }; | 103 }; |
104 | 104 |
105 explicit GridLayout(View* host); | 105 explicit GridLayout(View* host); |
106 virtual ~GridLayout(); | 106 virtual ~GridLayout(); |
107 | 107 |
| 108 // Creates a GridLayout with kPanel*Margin insets. |
| 109 static GridLayout* CreatePanel(View* host); |
| 110 |
108 // Sets the insets. All views are placed relative to these offsets. | 111 // Sets the insets. All views are placed relative to these offsets. |
109 void SetInsets(int top, int left, int bottom, int right); | 112 void SetInsets(int top, int left, int bottom, int right); |
110 void SetInsets(const gfx::Insets& insets); | 113 void SetInsets(const gfx::Insets& insets); |
111 | 114 |
112 // Creates a new column set with the specified id and returns it. | 115 // Creates a new column set with the specified id and returns it. |
113 // The id is later used when starting a new row. | 116 // The id is later used when starting a new row. |
114 // GridLayout takes ownership of the ColumnSet and will delete it when | 117 // GridLayout takes ownership of the ColumnSet and will delete it when |
115 // the GridLayout is deleted. | 118 // the GridLayout is deleted. |
116 ColumnSet* AddColumnSet(int id); | 119 ColumnSet* AddColumnSet(int id); |
117 | 120 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // The master column of those columns that are linked. See Column | 362 // The master column of those columns that are linked. See Column |
360 // for a description of what the master column is. | 363 // for a description of what the master column is. |
361 std::vector<Column*> master_columns_; | 364 std::vector<Column*> master_columns_; |
362 | 365 |
363 DISALLOW_COPY_AND_ASSIGN(ColumnSet); | 366 DISALLOW_COPY_AND_ASSIGN(ColumnSet); |
364 }; | 367 }; |
365 | 368 |
366 } // namespace views | 369 } // namespace views |
367 | 370 |
368 #endif // VIEWS_GRID_LAYOUT_H_ | 371 #endif // VIEWS_GRID_LAYOUT_H_ |
OLD | NEW |