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

Side by Side Diff: app/table_model.h

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 | « app/app.gyp ('k') | app/table_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 VIEWS_CONTROLS_TABLE_TABLE_MODEL_H_ 5 #ifndef APP_TABLE_MODEL_H_
6 #define VIEWS_CONTROLS_TABLE_TABLE_MODEL_H_ 6 #define APP_TABLE_MODEL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "unicode/coll.h" 12 #include "unicode/coll.h"
13 13
14 class SkBitmap; 14 class SkBitmap;
15 15
16 namespace views {
17
18 class TableModelObserver; 16 class TableModelObserver;
19 17
20 // The model driving the TableView. 18 // The model driving the TableView.
21 class TableModel { 19 class TableModel {
22 public: 20 public:
23 // See HasGroups, get GetGroupID for details as to how this is used. 21 // See HasGroups, get GetGroupID for details as to how this is used.
24 struct Group { 22 struct Group {
25 // The title text for the group. 23 // The title text for the group.
26 std::wstring title; 24 std::wstring title;
27 25
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual void SetObserver(TableModelObserver* observer) = 0; 83 virtual void SetObserver(TableModelObserver* observer) = 0;
86 84
87 // Compares the values in the column with id |column_id| for the two rows. 85 // Compares the values in the column with id |column_id| for the two rows.
88 // Returns a value < 0, == 0 or > 0 as to whether the first value is 86 // Returns a value < 0, == 0 or > 0 as to whether the first value is
89 // <, == or > the second value. 87 // <, == or > the second value.
90 // 88 //
91 // This implementation does a case insensitive locale specific string 89 // This implementation does a case insensitive locale specific string
92 // comparison. 90 // comparison.
93 virtual int CompareValues(int row1, int row2, int column_id); 91 virtual int CompareValues(int row1, int row2, int column_id);
94 92
93 // Reset the collator.
94 void ClearCollator();
95
95 protected: 96 protected:
96 // Returns the collator used by CompareValues. 97 // Returns the collator used by CompareValues.
97 Collator* GetCollator(); 98 Collator* GetCollator();
98 }; 99 };
99 100
100 // TableColumn specifies the title, alignment and size of a particular column. 101 // TableColumn specifies the title, alignment and size of a particular column.
101 struct TableColumn { 102 struct TableColumn {
102 enum Alignment { 103 enum Alignment {
103 LEFT, RIGHT, CENTER 104 LEFT, RIGHT, CENTER
104 }; 105 };
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 143
143 // The minimum width required for all items in this column 144 // The minimum width required for all items in this column
144 // (including the header) 145 // (including the header)
145 // to be visible. 146 // to be visible.
146 int min_visible_width; 147 int min_visible_width;
147 148
148 // Is this column sortable? Default is false 149 // Is this column sortable? Default is false
149 bool sortable; 150 bool sortable;
150 }; 151 };
151 152
152 } // namespace views 153 #endif // APP_TABLE_MODEL_H_
153
154 #endif // VIEWS_CONTROLS_TABLE_TABLE_MODEL_H_
OLDNEW
« no previous file with comments | « app/app.gyp ('k') | app/table_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698