| OLD | NEW |
| 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_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
| 6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 // ui::TableModelObserver overrides: | 116 // ui::TableModelObserver overrides: |
| 117 virtual void OnModelChanged() OVERRIDE; | 117 virtual void OnModelChanged() OVERRIDE; |
| 118 virtual void OnItemsChanged(int start, int length) OVERRIDE; | 118 virtual void OnItemsChanged(int start, int length) OVERRIDE; |
| 119 virtual void OnItemsAdded(int start, int length) OVERRIDE; | 119 virtual void OnItemsAdded(int start, int length) OVERRIDE; |
| 120 virtual void OnItemsRemoved(int start, int length) OVERRIDE; | 120 virtual void OnItemsRemoved(int start, int length) OVERRIDE; |
| 121 | 121 |
| 122 protected: | 122 protected: |
| 123 // View overrides: | 123 // View overrides: |
| 124 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE; | 124 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE; |
| 125 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 125 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; |
| 126 virtual void OnFocus() OVERRIDE; | 126 virtual void OnFocus() OVERRIDE; |
| 127 virtual void OnBlur() OVERRIDE; | 127 virtual void OnBlur() OVERRIDE; |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 // Invoked when the number of rows changes in some way. | 130 // Invoked when the number of rows changes in some way. |
| 131 void NumRowsChanged(); | 131 void NumRowsChanged(); |
| 132 | 132 |
| 133 // Returns the bounds of the specified row. | 133 // Returns the bounds of the specified row. |
| 134 gfx::Rect GetRowBounds(int row); | 134 gfx::Rect GetRowBounds(int row); |
| 135 | 135 |
| 136 ui::TableModel* model_; | 136 ui::TableModel* model_; |
| 137 | 137 |
| 138 const TableTypes table_type_; | 138 const TableTypes table_type_; |
| 139 | 139 |
| 140 TableViewObserver* table_view_observer_; | 140 TableViewObserver* table_view_observer_; |
| 141 | 141 |
| 142 int selected_row_; | 142 int selected_row_; |
| 143 | 143 |
| 144 gfx::Font font_; | 144 gfx::Font font_; |
| 145 | 145 |
| 146 int row_height_; | 146 int row_height_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(TableView); | 148 DISALLOW_COPY_AND_ASSIGN(TableView); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace views | 151 } // namespace views |
| 152 | 152 |
| 153 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 153 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
| OLD | NEW |