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

Side by Side Diff: views/grid_layout.h

Issue 2812026: Auto-size the views version of the options dialog. (Closed)
Patch Set: Fix autosizing issue with gtk pref pages in chromeos options dialog. Created 10 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 | « views/examples/tabbed_pane_example.h ('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) 2010 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Returns the preferred size for the GridLayout. 176 // Returns the preferred size for the GridLayout.
177 virtual gfx::Size GetPreferredSize(View* host); 177 virtual gfx::Size GetPreferredSize(View* host);
178 178
179 virtual int GetPreferredHeightForWidth(View* host, int width); 179 virtual int GetPreferredHeightForWidth(View* host, int width);
180 180
181 private: 181 private:
182 // As both Layout and GetPreferredSize need to do nearly the same thing, 182 // As both Layout and GetPreferredSize need to do nearly the same thing,
183 // they both call into this method. This sizes the Columns/Rows as 183 // they both call into this method. This sizes the Columns/Rows as
184 // appropriate. If layout is true, width/height give the width/height the 184 // appropriate. If layout is true, width/height give the width/height the
185 // of the host, otherwise they are ignored. 185 // of the host, otherwise they are ignored.
186 void SizeRowsAndColumns(bool layout, int width, int height, 186 void SizeRowsAndColumns(bool layout, int width, int height, gfx::Size* pref);
187 gfx::Size* pref);
188 187
189 // Calculates the master columns of all the column sets. See Column for 188 // Calculates the master columns of all the column sets. See Column for
190 // a description of what a master column is. 189 // a description of what a master column is.
191 void CalculateMasterColumnsIfNecessary(); 190 void CalculateMasterColumnsIfNecessary();
192 191
193 // This is called internally from AddView. It adds the ViewState to the 192 // This is called internally from AddView. It adds the ViewState to the
194 // appropriate structures, and updates internal fields such as next_column_. 193 // appropriate structures, and updates internal fields such as next_column_.
195 void AddViewState(ViewState* view_state); 194 void AddViewState(ViewState* view_state);
196 195
197 // Returns the column set for the specified id, or NULL if one doesn't exist. 196 // Returns the column set for the specified id, or NULL if one doesn't exist.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 // The master column of those columns that are linked. See Column 358 // The master column of those columns that are linked. See Column
360 // for a description of what the master column is. 359 // for a description of what the master column is.
361 std::vector<Column*> master_columns_; 360 std::vector<Column*> master_columns_;
362 361
363 DISALLOW_COPY_AND_ASSIGN(ColumnSet); 362 DISALLOW_COPY_AND_ASSIGN(ColumnSet);
364 }; 363 };
365 364
366 } // namespace views 365 } // namespace views
367 366
368 #endif // VIEWS_GRID_LAYOUT_H_ 367 #endif // VIEWS_GRID_LAYOUT_H_
OLDNEW
« no previous file with comments | « views/examples/tabbed_pane_example.h ('k') | views/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698