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_GROUP_TABLE_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ |
6 #define VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ | 6 #define VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ |
7 | 7 |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "views/controls/table/table_view.h" | 9 #include "views/controls/table/table_view.h" |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 virtual std::string GetClassName() const; | 41 virtual std::string GetClassName() const; |
42 | 42 |
43 protected: | 43 protected: |
44 // Notification from the ListView that the selected state of an item has | 44 // Notification from the ListView that the selected state of an item has |
45 // changed. | 45 // changed. |
46 void OnSelectedStateChanged(); | 46 void OnSelectedStateChanged(); |
47 | 47 |
48 // Extra-painting required to draw the separator line between groups. | 48 // Extra-painting required to draw the separator line between groups. |
49 virtual bool ImplementPostPaint() { return true; } | 49 virtual bool ImplementPostPaint() { return true; } |
50 virtual void PostPaint(int model_row, int column, bool selected, | 50 virtual void PostPaint(int model_row, int column, bool selected, |
51 const CRect& bounds, HDC device_context); | 51 const gfx::Rect& bounds, HDC device_context); |
52 | 52 |
53 // In order to make keyboard navigation possible (using the Up and Down | 53 // In order to make keyboard navigation possible (using the Up and Down |
54 // keys), we must take action when an arrow key is pressed. The reason we | 54 // keys), we must take action when an arrow key is pressed. The reason we |
55 // need to process this message has to do with the manner in which the focus | 55 // need to process this message has to do with the manner in which the focus |
56 // needs to be set on a group item when a group is selected. | 56 // needs to be set on a group item when a group is selected. |
57 virtual void OnKeyDown(unsigned short virtual_keycode); | 57 virtual void OnKeyDown(unsigned short virtual_keycode); |
58 | 58 |
59 // Overriden to make sure rows in the same group stay grouped together. | 59 // Overriden to make sure rows in the same group stay grouped together. |
60 virtual int CompareRows(int model_row1, int model_row2); | 60 virtual int CompareRows(int model_row1, int model_row2); |
61 | 61 |
(...skipping 11 matching lines...) Expand all Loading... |
73 | 73 |
74 // Maps from model row to start of group. | 74 // Maps from model row to start of group. |
75 std::map<int,int> model_index_to_range_start_map_; | 75 std::map<int,int> model_index_to_range_start_map_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(GroupTableView); | 77 DISALLOW_COPY_AND_ASSIGN(GroupTableView); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace views | 80 } // namespace views |
81 | 81 |
82 #endif // VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ | 82 #endif // VIEWS_CONTROLS_TABLE_GROUP_TABLE_VIEW_H_ |
OLD | NEW |