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

Side by Side Diff: views/grid_layout.h

Issue 6384002: views: Make CreatePanelGridLayout a static method of GridLayout class. (Closed)
Patch Set: fix trybots Created 9 years, 11 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 | « views/controls/message_box_view.cc ('k') | views/grid_layout.cc » ('j') | 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) 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
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
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_
OLDNEW
« no previous file with comments | « views/controls/message_box_view.cc ('k') | views/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698