| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TABLE_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ |
| 6 #define VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ | 6 #define VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 virtual bool ImplementPostPaint() { return false; } | 269 virtual bool ImplementPostPaint() { return false; } |
| 270 // Subclasses can implement in this method extra-painting for cells. | 270 // Subclasses can implement in this method extra-painting for cells. |
| 271 virtual void PostPaint(int model_row, int column, bool selected, | 271 virtual void PostPaint(int model_row, int column, bool selected, |
| 272 const gfx::Rect& bounds, HDC device_context) { } | 272 const gfx::Rect& bounds, HDC device_context) { } |
| 273 virtual void PostPaint() {} | 273 virtual void PostPaint() {} |
| 274 | 274 |
| 275 virtual HWND CreateNativeControl(HWND parent_container); | 275 virtual HWND CreateNativeControl(HWND parent_container); |
| 276 | 276 |
| 277 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param); | 277 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param); |
| 278 | 278 |
| 279 // Overriden to destroy the image list. | |
| 280 virtual void OnDestroy(); | |
| 281 | |
| 282 // Used to sort the two rows. Returns a value < 0, == 0 or > 0 indicating | 279 // Used to sort the two rows. Returns a value < 0, == 0 or > 0 indicating |
| 283 // whether the row2 comes before row1, row2 is the same as row1 or row1 comes | 280 // whether the row2 comes before row1, row2 is the same as row1 or row1 comes |
| 284 // after row2. This invokes CompareValues on the model with the sorted column. | 281 // after row2. This invokes CompareValues on the model with the sorted column. |
| 285 virtual int CompareRows(int model_row1, int model_row2); | 282 virtual int CompareRows(int model_row1, int model_row2); |
| 286 | 283 |
| 287 // Called before sorting. This does nothing and is intended for subclasses | 284 // Called before sorting. This does nothing and is intended for subclasses |
| 288 // that need to cache state used during sorting. | 285 // that need to cache state used during sorting. |
| 289 virtual void PrepareForSort() {} | 286 virtual void PrepareForSort() {} |
| 290 | 287 |
| 291 // Returns the width of the specified column by id, or -1 if the column isn't | 288 // Returns the width of the specified column by id, or -1 if the column isn't |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 scoped_array<int> view_to_model_; | 463 scoped_array<int> view_to_model_; |
| 467 scoped_array<int> model_to_view_; | 464 scoped_array<int> model_to_view_; |
| 468 | 465 |
| 469 DISALLOW_COPY_AND_ASSIGN(TableView); | 466 DISALLOW_COPY_AND_ASSIGN(TableView); |
| 470 }; | 467 }; |
| 471 #endif // defined(OS_WIN) | 468 #endif // defined(OS_WIN) |
| 472 | 469 |
| 473 } // namespace views | 470 } // namespace views |
| 474 | 471 |
| 475 #endif // VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ | 472 #endif // VIEWS_CONTROLS_TABLE_TABLE_VIEW_H_ |
| OLD | NEW |