Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: views/controls/table/table_model.cc

Issue 126184: Move TableModel out of views/ and into app/.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: addressed comments, build fixes Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/table/table_model.h ('k') | views/controls/table/table_model_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « views/controls/table/table_model.h ('k') | views/controls/table/table_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698