| OLD | NEW |
| 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WRAPPER_H_ | 5 #ifndef VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WRAPPER_H_ |
| 6 #define VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WRAPPER_H_ | 6 #define VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WRAPPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 10 | 10 |
| 11 using ui::TableColumn; | 11 namespace ui { |
| 12 struct TableColumn; |
| 13 } |
| 12 | 14 |
| 13 namespace views { | 15 namespace views { |
| 14 | 16 |
| 15 class TableView2; | 17 class TableView2; |
| 16 class View; | 18 class View; |
| 17 | 19 |
| 18 // An interface implemented by an object that provides a platform-native | 20 // An interface implemented by an object that provides a platform-native |
| 19 // table. | 21 // table. |
| 20 class NativeTableWrapper { | 22 class NativeTableWrapper { |
| 21 public: | 23 public: |
| 22 // Returns the number of rows in the table. | 24 // Returns the number of rows in the table. |
| 23 virtual int GetRowCount() const = 0; | 25 virtual int GetRowCount() const = 0; |
| 24 | 26 |
| 25 // Inserts/removes a column at the specified index. | 27 // Inserts/removes a column at the specified index. |
| 26 virtual void InsertColumn(const TableColumn& column, int index) = 0; | 28 virtual void InsertColumn(const ui::TableColumn& column, int index) = 0; |
| 27 virtual void RemoveColumn(int index) = 0; | 29 virtual void RemoveColumn(int index) = 0; |
| 28 | 30 |
| 29 // Returns the number of rows that are selected. | 31 // Returns the number of rows that are selected. |
| 30 virtual int GetSelectedRowCount() const = 0; | 32 virtual int GetSelectedRowCount() const = 0; |
| 31 | 33 |
| 32 // Returns the first row that is selected/focused in terms of the model. | 34 // Returns the first row that is selected/focused in terms of the model. |
| 33 virtual int GetFirstSelectedRow() const = 0; | 35 virtual int GetFirstSelectedRow() const = 0; |
| 34 virtual int GetFirstFocusedRow() const = 0; | 36 virtual int GetFirstFocusedRow() const = 0; |
| 35 | 37 |
| 36 // Unselect all rows. | 38 // Unselect all rows. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // Creates an appropriate NativeTableWrapper for the platform. | 75 // Creates an appropriate NativeTableWrapper for the platform. |
| 74 static NativeTableWrapper* CreateNativeWrapper(TableView2* table); | 76 static NativeTableWrapper* CreateNativeWrapper(TableView2* table); |
| 75 | 77 |
| 76 protected: | 78 protected: |
| 77 virtual ~NativeTableWrapper() {} | 79 virtual ~NativeTableWrapper() {} |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace views | 82 } // namespace views |
| 81 | 83 |
| 82 #endif // VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WRAPPER_H_ | 84 #endif // VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WRAPPER_H_ |
| OLD | NEW |