| 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_OBSERVER_H_ | 5 #ifndef VIEWS_CONTROLS_TABLE_TABLE_VIEW_OBSERVER_H_ |
| 6 #define VIEWS_CONTROLS_TABLE_TABLE_VIEW_OBSERVER_H_ | 6 #define VIEWS_CONTROLS_TABLE_TABLE_VIEW_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/keyboard_codes.h" |
| 9 |
| 8 namespace views { | 10 namespace views { |
| 9 | 11 |
| 10 class TableView; | 12 class TableView; |
| 11 | 13 |
| 12 // TableViewObserver is notified about the TableView selection. | 14 // TableViewObserver is notified about the TableView selection. |
| 13 class TableViewObserver { | 15 class TableViewObserver { |
| 14 public: | 16 public: |
| 15 virtual ~TableViewObserver() {} | 17 virtual ~TableViewObserver() {} |
| 16 | 18 |
| 17 // Invoked when the selection changes. | 19 // Invoked when the selection changes. |
| 18 virtual void OnSelectionChanged() = 0; | 20 virtual void OnSelectionChanged() = 0; |
| 19 | 21 |
| 20 // Optional method invoked when the user double clicks on the table. | 22 // Optional method invoked when the user double clicks on the table. |
| 21 virtual void OnDoubleClick() {} | 23 virtual void OnDoubleClick() {} |
| 22 | 24 |
| 23 // Optional method invoked when the user middle clicks on the table. | 25 // Optional method invoked when the user middle clicks on the table. |
| 24 virtual void OnMiddleClick() {} | 26 virtual void OnMiddleClick() {} |
| 25 | 27 |
| 26 // Optional method invoked when the user hits a key with the table in focus. | 28 // Optional method invoked when the user hits a key with the table in focus. |
| 27 virtual void OnKeyDown(base::KeyboardCode virtual_keycode) {} | 29 virtual void OnKeyDown(base::KeyboardCode virtual_keycode) {} |
| 28 | 30 |
| 29 // Invoked when the user presses the delete key. | 31 // Invoked when the user presses the delete key. |
| 30 virtual void OnTableViewDelete(TableView* table_view) {} | 32 virtual void OnTableViewDelete(TableView* table_view) {} |
| 31 }; | 33 }; |
| 32 | 34 |
| 33 } // namespace views | 35 } // namespace views |
| 34 | 36 |
| 35 #endif // VIEWS_CONTROLS_TABLE_TABLE_VIEW_OBSERVER_H_ | 37 #endif // VIEWS_CONTROLS_TABLE_TABLE_VIEW_OBSERVER_H_ |
| OLD | NEW |