| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "views/controls/table/table_model.h" | |
| 6 | |
| 7 #include "app/l10n_util.h" | |
| 8 | |
| 9 namespace views { | |
| 10 | |
| 11 TableColumn::TableColumn() | |
| 12 : id(0), | |
| 13 title(), | |
| 14 alignment(LEFT), | |
| 15 width(-1), | |
| 16 percent(), | |
| 17 min_visible_width(0), | |
| 18 sortable(false) { | |
| 19 } | |
| 20 | |
| 21 TableColumn::TableColumn(int id, const std::wstring& title, | |
| 22 Alignment alignment, | |
| 23 int width) | |
| 24 : id(id), | |
| 25 title(title), | |
| 26 alignment(alignment), | |
| 27 width(width), | |
| 28 percent(0), | |
| 29 min_visible_width(0), | |
| 30 sortable(false) { | |
| 31 } | |
| 32 | |
| 33 TableColumn::TableColumn(int id, const std::wstring& title, | |
| 34 Alignment alignment, int width, float percent) | |
| 35 : id(id), | |
| 36 title(title), | |
| 37 alignment(alignment), | |
| 38 width(width), | |
| 39 percent(percent), | |
| 40 min_visible_width(0), | |
| 41 sortable(false) { | |
| 42 } | |
| 43 | |
| 44 // It's common (but not required) to use the title's IDS_* tag as the column | |
| 45 // id. In this case, the provided conveniences look up the title string on | |
| 46 // bahalf of the caller. | |
| 47 TableColumn::TableColumn(int id, Alignment alignment, int width) | |
| 48 : id(id), | |
| 49 alignment(alignment), | |
| 50 width(width), | |
| 51 percent(0), | |
| 52 min_visible_width(0), | |
| 53 sortable(false) { | |
| 54 title = l10n_util::GetString(id); | |
| 55 } | |
| 56 | |
| 57 TableColumn::TableColumn(int id, Alignment alignment, int width, float percent) | |
| 58 : id(id), | |
| 59 alignment(alignment), | |
| 60 width(width), | |
| 61 percent(percent), | |
| 62 min_visible_width(0), | |
| 63 sortable(false) { | |
| 64 title = l10n_util::GetString(id); | |
| 65 } | |
| 66 | |
| 67 } // namespace views | |
| 68 | |
| OLD | NEW |