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

Side by Side Diff: ui/base/models/table_model.h

Issue 7328011: Introduce ui.dll / libui.so for the component build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 UI_BASE_MODELS_TABLE_MODEL_H_ 5 #ifndef UI_BASE_MODELS_TABLE_MODEL_H_
6 #define UI_BASE_MODELS_TABLE_MODEL_H_ 6 #define UI_BASE_MODELS_TABLE_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "ui/ui_api.h"
12 #include "unicode/coll.h" 13 #include "unicode/coll.h"
13 14
14 class SkBitmap; 15 class SkBitmap;
15 16
16 namespace ui { 17 namespace ui {
17 18
18 class TableModelObserver; 19 class TableModelObserver;
19 20
20 // The model driving the TableView. 21 // The model driving the TableView.
21 class TableModel { 22 class UI_API TableModel {
22 public: 23 public:
23 // See HasGroups, get GetGroupID for details as to how this is used. 24 // See HasGroups, get GetGroupID for details as to how this is used.
24 struct Group { 25 struct Group {
25 // The title text for the group. 26 // The title text for the group.
26 string16 title; 27 string16 title;
27 28
28 // Unique id for the group. 29 // Unique id for the group.
29 int id; 30 int id;
30 }; 31 };
31 typedef std::vector<Group> Groups; 32 typedef std::vector<Group> Groups;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void ClearCollator(); 83 void ClearCollator();
83 84
84 protected: 85 protected:
85 virtual ~TableModel() {} 86 virtual ~TableModel() {}
86 87
87 // Returns the collator used by CompareValues. 88 // Returns the collator used by CompareValues.
88 icu::Collator* GetCollator(); 89 icu::Collator* GetCollator();
89 }; 90 };
90 91
91 // TableColumn specifies the title, alignment and size of a particular column. 92 // TableColumn specifies the title, alignment and size of a particular column.
92 struct TableColumn { 93 struct UI_API TableColumn {
93 enum Alignment { 94 enum Alignment {
94 LEFT, RIGHT, CENTER 95 LEFT, RIGHT, CENTER
95 }; 96 };
96 97
97 TableColumn(); 98 TableColumn();
98 TableColumn(int id, const string16& title, 99 TableColumn(int id, const string16& title,
99 Alignment alignment, int width); 100 Alignment alignment, int width);
100 TableColumn(int id, const string16& title, 101 TableColumn(int id, const string16& title,
101 Alignment alignment, int width, float percent); 102 Alignment alignment, int width, float percent);
102 103
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // to be visible. 137 // to be visible.
137 int min_visible_width; 138 int min_visible_width;
138 139
139 // Is this column sortable? Default is false 140 // Is this column sortable? Default is false
140 bool sortable; 141 bool sortable;
141 }; 142 };
142 143
143 } // namespace ui 144 } // namespace ui
144 145
145 #endif // UI_BASE_MODELS_TABLE_MODEL_H_ 146 #endif // UI_BASE_MODELS_TABLE_MODEL_H_
OLDNEW
« no previous file with comments | « ui/base/models/simple_menu_model.h ('k') | ui/base/models/tree_model.h » ('j') | ui/ui.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698