OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "views/controls/table/native_table_gtk.h" | 5 #include "views/controls/table/native_table_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 void NativeTableGtk::InsertColumn(const TableColumn& column, int index) { | 68 void NativeTableGtk::InsertColumn(const TableColumn& column, int index) { |
69 NOTIMPLEMENTED(); | 69 NOTIMPLEMENTED(); |
70 } | 70 } |
71 | 71 |
72 void NativeTableGtk::RemoveColumn(int index) { | 72 void NativeTableGtk::RemoveColumn(int index) { |
73 NOTIMPLEMENTED(); | 73 NOTIMPLEMENTED(); |
74 } | 74 } |
75 | 75 |
76 int NativeTableGtk::GetColumnWidth(int column_index) const { | 76 int NativeTableGtk::GetColumnWidth(int column_index) const { |
77 NOTIMPLEMENTED(); | 77 GtkTreeViewColumn* column = gtk_tree_view_get_column(tree_view_, |
78 return -1; | 78 column_index); |
| 79 return gtk_tree_view_column_get_width(column); |
79 } | 80 } |
80 | 81 |
81 void NativeTableGtk::SetColumnWidth(int column_index, int width) { | 82 void NativeTableGtk::SetColumnWidth(int column_index, int width) { |
82 NOTIMPLEMENTED(); | 83 NOTIMPLEMENTED(); |
83 } | 84 } |
84 | 85 |
85 int NativeTableGtk::GetSelectedRowCount() const { | 86 int NativeTableGtk::GetSelectedRowCount() const { |
86 return gtk_tree_selection_count_selected_rows(tree_selection_); | 87 return gtk_tree_selection_count_selected_rows(tree_selection_); |
87 } | 88 } |
88 | 89 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 SkBitmap icon = table_->model()->GetIcon(row); | 345 SkBitmap icon = table_->model()->GetIcon(row); |
345 return gfx::GdkPixbufFromSkBitmap(&icon); | 346 return gfx::GdkPixbufFromSkBitmap(&icon); |
346 } | 347 } |
347 | 348 |
348 // static | 349 // static |
349 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { | 350 NativeTableWrapper* NativeTableWrapper::CreateNativeWrapper(TableView2* table) { |
350 return new NativeTableGtk(table); | 351 return new NativeTableGtk(table); |
351 } | 352 } |
352 | 353 |
353 } // namespace views | 354 } // namespace views |
OLD | NEW |