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_WIN_H_ | 5 #ifndef VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WIN_H_ |
6 #define VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WIN_H_ | 6 #define VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
11 #include "ui/base/models/table_model.h" | 11 #include "ui/base/models/table_model.h" |
12 #include "views/controls/native_control_win.h" | 12 #include "views/controls/native_control_win.h" |
13 #include "views/controls/table/native_table_wrapper.h" | 13 #include "views/controls/table/native_table_wrapper.h" |
14 | 14 |
15 typedef struct tagNMLVCUSTOMDRAW NMLVCUSTOMDRAW; | 15 typedef struct tagNMLVCUSTOMDRAW NMLVCUSTOMDRAW; |
16 | 16 |
17 using ui::TableColumn; | |
18 | |
19 namespace views { | 17 namespace views { |
20 | 18 |
21 class TableView2; | 19 class TableView2; |
22 | 20 |
23 // A View that hosts a native Windows table. | 21 // A View that hosts a native Windows table. |
24 class NativeTableWin : public NativeControlWin, public NativeTableWrapper { | 22 class NativeTableWin : public NativeControlWin, public NativeTableWrapper { |
25 public: | 23 public: |
26 explicit NativeTableWin(TableView2* table); | 24 explicit NativeTableWin(TableView2* table); |
27 virtual ~NativeTableWin(); | 25 virtual ~NativeTableWin(); |
28 | 26 |
29 // NativeTableWrapper implementation: | 27 // NativeTableWrapper implementation: |
30 virtual int GetRowCount() const; | 28 virtual int GetRowCount() const; |
31 virtual View* GetView(); | 29 virtual View* GetView(); |
32 virtual void SetFocus(); | 30 virtual void SetFocus(); |
33 virtual gfx::NativeView GetTestingHandle() const; | 31 virtual gfx::NativeView GetTestingHandle() const; |
34 virtual void InsertColumn(const TableColumn& column, int index); | 32 virtual void InsertColumn(const ui::TableColumn& column, int index); |
35 virtual void RemoveColumn(int index); | 33 virtual void RemoveColumn(int index); |
36 virtual int GetColumnWidth(int column_index) const; | 34 virtual int GetColumnWidth(int column_index) const; |
37 virtual void SetColumnWidth(int column_index, int width); | 35 virtual void SetColumnWidth(int column_index, int width); |
38 virtual int GetSelectedRowCount() const; | 36 virtual int GetSelectedRowCount() const; |
39 virtual int GetFirstSelectedRow() const; | 37 virtual int GetFirstSelectedRow() const; |
40 virtual int GetFirstFocusedRow() const; | 38 virtual int GetFirstFocusedRow() const; |
41 virtual void ClearSelection(); | 39 virtual void ClearSelection(); |
42 virtual void ClearRowFocus(); | 40 virtual void ClearRowFocus(); |
43 virtual void SetSelectedState(int model_row, bool state); | 41 virtual void SetSelectedState(int model_row, bool state); |
44 virtual void SetFocusState(int model_row, bool state); | 42 virtual void SetFocusState(int model_row, bool state); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 118 |
121 // Size (width and height) of images. | 119 // Size (width and height) of images. |
122 static const int kImageSize; | 120 static const int kImageSize; |
123 | 121 |
124 DISALLOW_COPY_AND_ASSIGN(NativeTableWin); | 122 DISALLOW_COPY_AND_ASSIGN(NativeTableWin); |
125 }; | 123 }; |
126 | 124 |
127 } // namespace views | 125 } // namespace views |
128 | 126 |
129 #endif // VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WIN_H_ | 127 #endif // VIEWS_CONTROLS_TABLE_NATIVE_TABLE_WIN_H_ |
OLD | NEW |