OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <algorithm> | 5 #include <algorithm> |
6 #include <windowsx.h> | 6 #include <windowsx.h> |
7 | 7 |
8 #include "chrome/views/table_view.h" | 8 #include "chrome/views/table_view.h" |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 if (percent == 0.f && available_width > 0 && | 1089 if (percent == 0.f && available_width > 0 && |
1090 col_index == column_count_ - 1) { | 1090 col_index == column_count_ - 1) { |
1091 col_width += available_width; | 1091 col_width += available_width; |
1092 } | 1092 } |
1093 ListView_SetColumnWidth(list_view_, col_index, col_width); | 1093 ListView_SetColumnWidth(list_view_, col_index, col_width); |
1094 } | 1094 } |
1095 } | 1095 } |
1096 } | 1096 } |
1097 } | 1097 } |
1098 | 1098 |
1099 void TableView::SetPreferredSize(const CSize& preferred_size) { | 1099 gfx::Size TableView::GetPreferredSize() { |
1100 preferred_size_ = preferred_size; | 1100 return preferred_size_; |
1101 } | |
1102 | |
1103 void TableView::GetPreferredSize(CSize* out) { | |
1104 DCHECK(out); | |
1105 *out = preferred_size_; | |
1106 } | 1101 } |
1107 | 1102 |
1108 void TableView::UpdateListViewCache0(int start, int length, bool add) { | 1103 void TableView::UpdateListViewCache0(int start, int length, bool add) { |
1109 if (is_sorted()) { | 1104 if (is_sorted()) { |
1110 if (add) | 1105 if (add) |
1111 UpdateItemsLParams(start, length); | 1106 UpdateItemsLParams(start, length); |
1112 else | 1107 else |
1113 UpdateItemsLParams(0, 0); | 1108 UpdateItemsLParams(0, 0); |
1114 } | 1109 } |
1115 | 1110 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 } | 1289 } |
1295 | 1290 |
1296 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { | 1291 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { |
1297 if (view_index_ == -1) | 1292 if (view_index_ == -1) |
1298 model_index_ = -1; | 1293 model_index_ = -1; |
1299 else | 1294 else |
1300 model_index_ = table_view_->view_to_model(view_index_); | 1295 model_index_ = table_view_->view_to_model(view_index_); |
1301 } | 1296 } |
1302 | 1297 |
1303 } // namespace | 1298 } // namespace |
OLD | NEW |