| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 int FirstSelectedRow(); | 136 int FirstSelectedRow(); |
| 137 | 137 |
| 138 const ui::ListSelectionModel& selection_model() const { | 138 const ui::ListSelectionModel& selection_model() const { |
| 139 return selection_model_; | 139 return selection_model_; |
| 140 } | 140 } |
| 141 | 141 |
| 142 // Changes the visibility of the specified column (by id). | 142 // Changes the visibility of the specified column (by id). |
| 143 void SetColumnVisibility(int id, bool is_visible); | 143 void SetColumnVisibility(int id, bool is_visible); |
| 144 bool IsColumnVisible(int id) const; | 144 bool IsColumnVisible(int id) const; |
| 145 | 145 |
| 146 // Adds the specified column. |col| is not made visible. |
| 147 void AddColumn(const ui::TableColumn& col); |
| 148 |
| 149 // Returns true if the column with the specified id is known (either visible |
| 150 // or not). |
| 151 bool HasColumn(int id) const; |
| 152 |
| 146 // TODO(sky): rename to set_observer(). | 153 // TODO(sky): rename to set_observer(). |
| 147 void SetObserver(TableViewObserver* observer) { | 154 void SetObserver(TableViewObserver* observer) { |
| 148 table_view_observer_ = observer; | 155 table_view_observer_ = observer; |
| 149 } | 156 } |
| 150 TableViewObserver* observer() const { return table_view_observer_; } | 157 TableViewObserver* observer() const { return table_view_observer_; } |
| 151 | 158 |
| 152 const std::vector<VisibleColumn>& visible_columns() const { | 159 const std::vector<VisibleColumn>& visible_columns() const { |
| 153 return visible_columns_; | 160 return visible_columns_; |
| 154 } | 161 } |
| 155 | 162 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 scoped_ptr<TableViewRowBackgroundPainter> row_background_painter_; | 319 scoped_ptr<TableViewRowBackgroundPainter> row_background_painter_; |
| 313 | 320 |
| 314 TableGrouper* grouper_; | 321 TableGrouper* grouper_; |
| 315 | 322 |
| 316 DISALLOW_COPY_AND_ASSIGN(TableView); | 323 DISALLOW_COPY_AND_ASSIGN(TableView); |
| 317 }; | 324 }; |
| 318 | 325 |
| 319 } // namespace views | 326 } // namespace views |
| 320 | 327 |
| 321 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 328 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
| OLD | NEW |