| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_GRID_LAYOUT_H__ | 5 #ifndef CHROME_VIEWS_GRID_LAYOUT_H__ |
| 6 #define CHROME_VIEWS_GRID_LAYOUT_H__ | 6 #define CHROME_VIEWS_GRID_LAYOUT_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Notification that a view has been added. | 158 // Notification that a view has been added. |
| 159 virtual void ViewAdded(View* host, View* view); | 159 virtual void ViewAdded(View* host, View* view); |
| 160 | 160 |
| 161 // Notification that a view has been removed. | 161 // Notification that a view has been removed. |
| 162 virtual void ViewRemoved(View* host, View* view); | 162 virtual void ViewRemoved(View* host, View* view); |
| 163 | 163 |
| 164 // Layouts out the components. | 164 // Layouts out the components. |
| 165 virtual void Layout(View* host); | 165 virtual void Layout(View* host); |
| 166 | 166 |
| 167 // Returns the preferred size for the GridLayout. | 167 // Returns the preferred size for the GridLayout. |
| 168 virtual void GetPreferredSize(View* host, CSize* out); | 168 virtual gfx::Size GetPreferredSize(View* host); |
| 169 | 169 |
| 170 virtual int GetPreferredHeightForWidth(View* host, int width); | 170 virtual int GetPreferredHeightForWidth(View* host, int width); |
| 171 | 171 |
| 172 private: | 172 private: |
| 173 // As both Layout and GetPreferredSize need to do nearly the same thing, | 173 // As both Layout and GetPreferredSize need to do nearly the same thing, |
| 174 // they both call into this method. This sizes the Columns/Rows as | 174 // they both call into this method. This sizes the Columns/Rows as |
| 175 // appropriate. If layout is true, width/height give the width/height the | 175 // appropriate. If layout is true, width/height give the width/height the |
| 176 // of the host, otherwise they are ignored. | 176 // of the host, otherwise they are ignored. |
| 177 void SizeRowsAndColumns(bool layout, int width, int height, CSize* pref); | 177 void SizeRowsAndColumns(bool layout, int width, int height, CSize* pref); |
| 178 | 178 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 // for a description of what the master column is. | 345 // for a description of what the master column is. |
| 346 std::vector<Column*> master_columns_; | 346 std::vector<Column*> master_columns_; |
| 347 | 347 |
| 348 DISALLOW_EVIL_CONSTRUCTORS(ColumnSet); | 348 DISALLOW_EVIL_CONSTRUCTORS(ColumnSet); |
| 349 }; | 349 }; |
| 350 | 350 |
| 351 } // namespace | 351 } // namespace |
| 352 | 352 |
| 353 #endif // CHROME_VIEWS_GRID_LAYOUT_H__ | 353 #endif // CHROME_VIEWS_GRID_LAYOUT_H__ |
| 354 | 354 |
| OLD | NEW |