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 // Width of the ScrollView last time Layout() was invoked. Used to determine | 344 // The last width for which column sizes were calculated. |
345 // when we should invoke UpdateVisibleColumnSizes(). | 345 int last_layout_width_; |
346 int last_parent_width_; | |
347 | |
348 // The width we layout to. This may differ from |last_parent_width_|. | |
349 int layout_width_; | |
350 | 346 |
351 // Current sort. | 347 // Current sort. |
352 SortDescriptors sort_descriptors_; | 348 SortDescriptors sort_descriptors_; |
353 | 349 |
354 // Mappings used when sorted. | 350 // Mappings used when sorted. |
355 std::vector<int> view_to_model_; | 351 std::vector<int> view_to_model_; |
356 std::vector<int> model_to_view_; | 352 std::vector<int> model_to_view_; |
357 | 353 |
358 std::unique_ptr<TableViewRowBackgroundPainter> row_background_painter_; | 354 std::unique_ptr<TableViewRowBackgroundPainter> row_background_painter_; |
359 | 355 |
360 TableGrouper* grouper_; | 356 TableGrouper* grouper_; |
361 | 357 |
362 // True if in SetVisibleColumnWidth(). | 358 // True if in SetVisibleColumnWidth(). |
363 bool in_set_visible_column_width_; | 359 bool in_set_visible_column_width_; |
364 | 360 |
365 DISALLOW_COPY_AND_ASSIGN(TableView); | 361 DISALLOW_COPY_AND_ASSIGN(TableView); |
366 }; | 362 }; |
367 | 363 |
368 } // namespace views | 364 } // namespace views |
369 | 365 |
370 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 366 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
OLD | NEW |