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

Side by Side Diff: ui/views/controls/table/table_view_win.h

Issue 9187027: Attempt 2 at: Adds a trivial views based table implementation (only supports single (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | « ui/views/controls/table/table_view_views.cc ('k') | ui/views/controls/table/table_view_win.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ 5 #ifndef UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_
6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ 6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 bool resizable_columns, bool autosize_columns); 144 bool resizable_columns, bool autosize_columns);
145 virtual ~TableView(); 145 virtual ~TableView();
146 146
147 // Assigns a new model to the table view, detaching the old one if present. 147 // Assigns a new model to the table view, detaching the old one if present.
148 // If |model| is NULL, the table view cannot be used after this call. This 148 // If |model| is NULL, the table view cannot be used after this call. This
149 // should be called in the containing view's destructor to avoid destruction 149 // should be called in the containing view's destructor to avoid destruction
150 // issues when the model needs to be deleted before the table. 150 // issues when the model needs to be deleted before the table.
151 void SetModel(ui::TableModel* model); 151 void SetModel(ui::TableModel* model);
152 ui::TableModel* model() const { return model_; } 152 ui::TableModel* model() const { return model_; }
153 153
154 // Returns this. Provided for implementations that need to wrap this in a
155 // ScrollView.
156 View* CreateParentIfNecessary();
157
154 // Resorts the contents. 158 // Resorts the contents.
155 void SetSortDescriptors(const SortDescriptors& sort_descriptors); 159 void SetSortDescriptors(const SortDescriptors& sort_descriptors);
156 160
157 // Current sort. 161 // Current sort.
158 const SortDescriptors& sort_descriptors() const { return sort_descriptors_; } 162 const SortDescriptors& sort_descriptors() const { return sort_descriptors_; }
159 163
160 // Returns the number of rows in the TableView. 164 // Returns the number of rows in the TableView.
161 int RowCount() const; 165 int RowCount() const;
162 166
163 // Returns the number of selected rows. 167 // Returns the number of selected rows.
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 498
495 string16 alt_text_; 499 string16 alt_text_;
496 500
497 DISALLOW_COPY_AND_ASSIGN(TableView); 501 DISALLOW_COPY_AND_ASSIGN(TableView);
498 }; 502 };
499 #endif // defined(OS_WIN) 503 #endif // defined(OS_WIN)
500 504
501 } // namespace views 505 } // namespace views
502 506
503 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_ 507 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_WIN_H_
OLDNEW
« no previous file with comments | « ui/views/controls/table/table_view_views.cc ('k') | ui/views/controls/table/table_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698