| 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Maps from the index in terms of the model to that of the view. | 159 // Maps from the index in terms of the model to that of the view. |
| 160 int ModelToView(int model_index) const; | 160 int ModelToView(int model_index) const; |
| 161 | 161 |
| 162 // Maps from the index in terms of the view to that of the model. | 162 // Maps from the index in terms of the view to that of the model. |
| 163 int ViewToModel(int view_index) const; | 163 int ViewToModel(int view_index) const; |
| 164 | 164 |
| 165 int row_height() const { return row_height_; } | 165 int row_height() const { return row_height_; } |
| 166 | 166 |
| 167 // View overrides: | 167 // View overrides: |
| 168 virtual void Layout() OVERRIDE; | 168 virtual void Layout() override; |
| 169 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 169 virtual gfx::Size GetPreferredSize() const override; |
| 170 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 170 virtual bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 171 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 171 virtual bool OnMousePressed(const ui::MouseEvent& event) override; |
| 172 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 172 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
| 173 virtual bool GetTooltipText(const gfx::Point& p, | 173 virtual bool GetTooltipText(const gfx::Point& p, |
| 174 base::string16* tooltip) const OVERRIDE; | 174 base::string16* tooltip) const override; |
| 175 virtual bool GetTooltipTextOrigin(const gfx::Point& p, | 175 virtual bool GetTooltipTextOrigin(const gfx::Point& p, |
| 176 gfx::Point* loc) const OVERRIDE; | 176 gfx::Point* loc) const override; |
| 177 | 177 |
| 178 // ui::TableModelObserver overrides: | 178 // ui::TableModelObserver overrides: |
| 179 virtual void OnModelChanged() OVERRIDE; | 179 virtual void OnModelChanged() override; |
| 180 virtual void OnItemsChanged(int start, int length) OVERRIDE; | 180 virtual void OnItemsChanged(int start, int length) override; |
| 181 virtual void OnItemsAdded(int start, int length) OVERRIDE; | 181 virtual void OnItemsAdded(int start, int length) override; |
| 182 virtual void OnItemsRemoved(int start, int length) OVERRIDE; | 182 virtual void OnItemsRemoved(int start, int length) override; |
| 183 | 183 |
| 184 protected: | 184 protected: |
| 185 // View overrides: | 185 // View overrides: |
| 186 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE; | 186 virtual gfx::Point GetKeyboardContextMenuLocation() override; |
| 187 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 187 virtual void OnPaint(gfx::Canvas* canvas) override; |
| 188 virtual void OnFocus() OVERRIDE; | 188 virtual void OnFocus() override; |
| 189 virtual void OnBlur() OVERRIDE; | 189 virtual void OnBlur() override; |
| 190 | 190 |
| 191 private: | 191 private: |
| 192 friend class TableViewTestHelper; | 192 friend class TableViewTestHelper; |
| 193 struct GroupSortHelper; | 193 struct GroupSortHelper; |
| 194 struct SortHelper; | 194 struct SortHelper; |
| 195 | 195 |
| 196 // Used during painting to determine the range of cells that need to be | 196 // Used during painting to determine the range of cells that need to be |
| 197 // painted. | 197 // painted. |
| 198 // NOTE: the row indices returned by this are in terms of the view and column | 198 // NOTE: the row indices returned by this are in terms of the view and column |
| 199 // indices in terms of |visible_columns_|. | 199 // indices in terms of |visible_columns_|. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 // True if in SetVisibleColumnWidth(). | 341 // True if in SetVisibleColumnWidth(). |
| 342 bool in_set_visible_column_width_; | 342 bool in_set_visible_column_width_; |
| 343 | 343 |
| 344 DISALLOW_COPY_AND_ASSIGN(TableView); | 344 DISALLOW_COPY_AND_ASSIGN(TableView); |
| 345 }; | 345 }; |
| 346 | 346 |
| 347 } // namespace views | 347 } // namespace views |
| 348 | 348 |
| 349 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ | 349 #endif // UI_VIEWS_CONTROLS_TABLE_TABLE_VIEW_VIEWS_H_ |
| OLD | NEW |