Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: ui/views/layout/grid_layout.h

Issue 2140103002: Fix a comment in the GridLayout explanation (refer to column set rather than colum). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_LAYOUT_GRID_LAYOUT_H_ 5 #ifndef UI_VIEWS_LAYOUT_GRID_LAYOUT_H_
6 #define UI_VIEWS_LAYOUT_GRID_LAYOUT_H_ 6 #define UI_VIEWS_LAYOUT_GRID_LAYOUT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "ui/gfx/geometry/insets.h" 13 #include "ui/gfx/geometry/insets.h"
14 #include "ui/gfx/geometry/size.h" 14 #include "ui/gfx/geometry/size.h"
15 #include "ui/views/layout/layout_manager.h" 15 #include "ui/views/layout/layout_manager.h"
16 16
17 // GridLayout is a LayoutManager that positions child Views in a grid. You 17 // GridLayout is a LayoutManager that positions child Views in a grid. You
18 // define the structure of the Grid first, then add the Views. 18 // define the structure of the Grid first, then add the Views.
19 // The following creates a trivial grid with two columns separated by 19 // The following creates a trivial grid with two columns separated by
20 // a column with padding: 20 // a column with padding:
21 // ColumnSet* columns = layout->AddColumnSet(0); // Give this column an 21 // ColumnSet* columns = layout->AddColumnSet(0); // Give this column set an
22 // // identifier of 0. 22 // // identifier of 0.
23 // columns->AddColumn(FILL, // Views are horizontally resized to fill column. 23 // columns->AddColumn(FILL, // Views are horizontally resized to fill column.
24 // FILL, // Views starting in this column are vertically 24 // FILL, // Views starting in this column are vertically
25 // // resized. 25 // // resized.
26 // 1, // This column has a resize weight of 1. 26 // 1, // This column has a resize weight of 1.
27 // USE_PREF, // Use the preferred size of the view. 27 // USE_PREF, // Use the preferred size of the view.
28 // 0, // Ignored for USE_PREF. 28 // 0, // Ignored for USE_PREF.
29 // 0); // A minimum width of 0. 29 // 0); // A minimum width of 0.
30 // columns->AddPaddingColumn(0, // The padding column is not resizable. 30 // columns->AddPaddingColumn(0, // The padding column is not resizable.
31 // 10); // And has a width of 10 pixels. 31 // 10); // And has a width of 10 pixels.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // The master column of those columns that are linked. See Column 367 // The master column of those columns that are linked. See Column
368 // for a description of what the master column is. 368 // for a description of what the master column is.
369 std::vector<Column*> master_columns_; 369 std::vector<Column*> master_columns_;
370 370
371 DISALLOW_COPY_AND_ASSIGN(ColumnSet); 371 DISALLOW_COPY_AND_ASSIGN(ColumnSet);
372 }; 372 };
373 373
374 } // namespace views 374 } // namespace views
375 375
376 #endif // UI_VIEWS_LAYOUT_GRID_LAYOUT_H_ 376 #endif // UI_VIEWS_LAYOUT_GRID_LAYOUT_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698