| 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_LAYOUT_GRID_LAYOUT_H_ | 5 #ifndef VIEWS_LAYOUT_GRID_LAYOUT_H_ |
| 6 #define VIEWS_LAYOUT_GRID_LAYOUT_H_ | 6 #define VIEWS_LAYOUT_GRID_LAYOUT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // created with. | 63 // created with. |
| 64 namespace views { | 64 namespace views { |
| 65 | 65 |
| 66 class Column; | 66 class Column; |
| 67 class ColumnSet; | 67 class ColumnSet; |
| 68 class Row; | 68 class Row; |
| 69 class View; | 69 class View; |
| 70 | 70 |
| 71 struct ViewState; | 71 struct ViewState; |
| 72 | 72 |
| 73 class VIEWS_API GridLayout : public LayoutManager { | 73 class VIEWS_EXPORT GridLayout : public LayoutManager { |
| 74 public: | 74 public: |
| 75 // An enumeration of the possible alignments supported by GridLayout. | 75 // An enumeration of the possible alignments supported by GridLayout. |
| 76 enum Alignment { | 76 enum Alignment { |
| 77 // Leading equates to left along the horizontal axis, and top along the | 77 // Leading equates to left along the horizontal axis, and top along the |
| 78 // vertical axis. | 78 // vertical axis. |
| 79 LEADING, | 79 LEADING, |
| 80 | 80 |
| 81 // Centers the view along the axis. | 81 // Centers the view along the axis. |
| 82 CENTER, | 82 CENTER, |
| 83 | 83 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 // Rows. | 256 // Rows. |
| 257 std::vector<Row*> rows_; | 257 std::vector<Row*> rows_; |
| 258 | 258 |
| 259 DISALLOW_COPY_AND_ASSIGN(GridLayout); | 259 DISALLOW_COPY_AND_ASSIGN(GridLayout); |
| 260 }; | 260 }; |
| 261 | 261 |
| 262 // ColumnSet is used to define a set of columns. GridLayout may have any | 262 // ColumnSet is used to define a set of columns. GridLayout may have any |
| 263 // number of ColumnSets. You don't create a ColumnSet directly, instead | 263 // number of ColumnSets. You don't create a ColumnSet directly, instead |
| 264 // use the AddColumnSet method of GridLayout. | 264 // use the AddColumnSet method of GridLayout. |
| 265 class VIEWS_API ColumnSet { | 265 class VIEWS_EXPORT ColumnSet { |
| 266 public: | 266 public: |
| 267 ~ColumnSet(); | 267 ~ColumnSet(); |
| 268 | 268 |
| 269 // Adds a column for padding. When adding views, padding columns are | 269 // Adds a column for padding. When adding views, padding columns are |
| 270 // automatically skipped. For example, if you create a column set with | 270 // automatically skipped. For example, if you create a column set with |
| 271 // two columns separated by a padding column, the first AddView automatically | 271 // two columns separated by a padding column, the first AddView automatically |
| 272 // skips past the padding column. That is, to add two views, do: | 272 // skips past the padding column. That is, to add two views, do: |
| 273 // layout->AddView(v1); layout->AddView(v2);, not: | 273 // layout->AddView(v1); layout->AddView(v2);, not: |
| 274 // layout->AddView(v1); layout->SkipColumns(1); layout->AddView(v2); | 274 // layout->AddView(v1); layout->SkipColumns(1); layout->AddView(v2); |
| 275 void AddPaddingColumn(float resize_percent, int width); | 275 void AddPaddingColumn(float resize_percent, int width); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 // The master column of those columns that are linked. See Column | 362 // The master column of those columns that are linked. See Column |
| 363 // for a description of what the master column is. | 363 // for a description of what the master column is. |
| 364 std::vector<Column*> master_columns_; | 364 std::vector<Column*> master_columns_; |
| 365 | 365 |
| 366 DISALLOW_COPY_AND_ASSIGN(ColumnSet); | 366 DISALLOW_COPY_AND_ASSIGN(ColumnSet); |
| 367 }; | 367 }; |
| 368 | 368 |
| 369 } // namespace views | 369 } // namespace views |
| 370 | 370 |
| 371 #endif // VIEWS_LAYOUT_GRID_LAYOUT_H_ | 371 #endif // VIEWS_LAYOUT_GRID_LAYOUT_H_ |
| OLD | NEW |