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_WIN_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ |
6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ | 6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool resizable_columns, bool autosize_columns); | 144 bool resizable_columns, bool autosize_columns); |
145 virtual ~TableView(); | 145 virtual ~TableView(); |
146 | 146 |
147 // Assigns a new model to the table view, detaching the old one if present. | 147 // Assigns a new model to the table view, detaching the old one if present. |
148 // If |model| is NULL, the table view cannot be used after this call. This | 148 // If |model| is NULL, the table view cannot be used after this call. This |
149 // should be called in the containing view's destructor to avoid destruction | 149 // should be called in the containing view's destructor to avoid destruction |
150 // issues when the model needs to be deleted before the table. | 150 // issues when the model needs to be deleted before the table. |
151 void SetModel(ui::TableModel* model); | 151 void SetModel(ui::TableModel* model); |
152 ui::TableModel* model() const { return model_; } | 152 ui::TableModel* model() const { return model_; } |
153 | 153 |
| 154 // Returns this. Provided for implementations that need to wrap this in a |
| 155 // ScrollView. |
| 156 View* CreateParentIfNecessary(); |
| 157 |
154 // Resorts the contents. | 158 // Resorts the contents. |
155 void SetSortDescriptors(const SortDescriptors& sort_descriptors); | 159 void SetSortDescriptors(const SortDescriptors& sort_descriptors); |
156 | 160 |
157 // Current sort. | 161 // Current sort. |
158 const SortDescriptors& sort_descriptors() const { return sort_descriptors_; } | 162 const SortDescriptors& sort_descriptors() const { return sort_descriptors_; } |
159 | 163 |
160 // Returns the number of rows in the TableView. | 164 // Returns the number of rows in the TableView. |
161 int RowCount() const; | 165 int RowCount() const; |
162 | 166 |
163 // Returns the number of selected rows. | 167 // Returns the number of selected rows. |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 498 |
495 string16 alt_text_; | 499 string16 alt_text_; |
496 | 500 |
497 DISALLOW_COPY_AND_ASSIGN(TableView); | 501 DISALLOW_COPY_AND_ASSIGN(TableView); |
498 }; | 502 }; |
499 #endif // defined(OS_WIN) | 503 #endif // defined(OS_WIN) |
500 | 504 |
501 } // namespace views | 505 } // namespace views |
502 | 506 |
503 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ | 507 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ |
OLD | NEW |