OLD | NEW |
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_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // TODO(sky): rename to observer_. | 334 // TODO(sky): rename to observer_. |
335 TableViewObserver* table_view_observer_; | 335 TableViewObserver* table_view_observer_; |
336 | 336 |
337 // The selection, in terms of the model. | 337 // The selection, in terms of the model. |
338 ui::ListSelectionModel selection_model_; | 338 ui::ListSelectionModel selection_model_; |
339 | 339 |
340 gfx::FontList font_list_; | 340 gfx::FontList font_list_; |
341 | 341 |
342 int row_height_; | 342 int row_height_; |
343 | 343 |
344 // The last width for which column sizes were calculated. | 344 // Width of the ScrollView last time Layout() was invoked. Used to determine |
345 int last_layout_width_; | 345 // when we should invoke UpdateVisibleColumnSizes(). |
| 346 int last_parent_width_; |
| 347 |
| 348 // The width we layout to. This may differ from |last_parent_width_|. |
| 349 int layout_width_; |
346 | 350 |
347 // Current sort. | 351 // Current sort. |
348 SortDescriptors sort_descriptors_; | 352 SortDescriptors sort_descriptors_; |
349 | 353 |
350 // Mappings used when sorted. | 354 // Mappings used when sorted. |
351 std::vector<int> view_to_model_; | 355 std::vector<int> view_to_model_; |
352 std::vector<int> model_to_view_; | 356 std::vector<int> model_to_view_; |
353 | 357 |
354 std::unique_ptr<TableViewRowBackgroundPainter> row_background_painter_; | 358 std::unique_ptr<TableViewRowBackgroundPainter> row_background_painter_; |
355 | 359 |
356 TableGrouper* grouper_; | 360 TableGrouper* grouper_; |
357 | 361 |
358 // True if in SetVisibleColumnWidth(). | 362 // True if in SetVisibleColumnWidth(). |
359 bool in_set_visible_column_width_; | 363 bool in_set_visible_column_width_; |
360 | 364 |
361 DISALLOW_COPY_AND_ASSIGN(TableView); | 365 DISALLOW_COPY_AND_ASSIGN(TableView); |
362 }; | 366 }; |
363 | 367 |
364 } // namespace views | 368 } // namespace views |
365 | 369 |
366 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 370 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
OLD | NEW |