| 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_TREE_TREE_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_TREE_TREE_VIEW_H_ |
| 6 #define VIEWS_CONTROLS_TREE_TREE_VIEW_H_ | 6 #define VIEWS_CONTROLS_TREE_TREE_VIEW_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <commctrl.h> | 9 #include <commctrl.h> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // GetSelectedNode to find the current selection. | 29 // GetSelectedNode to find the current selection. |
| 30 virtual void OnTreeViewSelectionChanged(TreeView* tree_view) = 0; | 30 virtual void OnTreeViewSelectionChanged(TreeView* tree_view) = 0; |
| 31 | 31 |
| 32 // Returns true if the node can be edited. This is only used if the | 32 // Returns true if the node can be edited. This is only used if the |
| 33 // TreeView is editable. | 33 // TreeView is editable. |
| 34 virtual bool CanEdit(TreeView* tree_view, TreeModelNode* node) { | 34 virtual bool CanEdit(TreeView* tree_view, TreeModelNode* node) { |
| 35 return true; | 35 return true; |
| 36 } | 36 } |
| 37 | 37 |
| 38 // Invoked when a key is pressed on the tree view. | 38 // Invoked when a key is pressed on the tree view. |
| 39 virtual void OnTreeViewKeyDown(unsigned short virtual_keycode) {} | 39 virtual void OnTreeViewKeyDown(base::KeyboardCode keycode) {} |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 // TreeView ------------------------------------------------------------------- | 42 // TreeView ------------------------------------------------------------------- |
| 43 | 43 |
| 44 // TreeView displays hierarchical data as returned from a TreeModel. The user | 44 // TreeView displays hierarchical data as returned from a TreeModel. The user |
| 45 // can expand, collapse and edit the items. A Controller may be attached to | 45 // can expand, collapse and edit the items. A Controller may be attached to |
| 46 // receive notification of selection changes and restrict editing. | 46 // receive notification of selection changes and restrict editing. |
| 47 class TreeView : public NativeControl, TreeModelObserver { | 47 class TreeView : public NativeControl, TreeModelObserver { |
| 48 public: | 48 public: |
| 49 TreeView(); | 49 TreeView(); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 bool has_custom_icons_; | 299 bool has_custom_icons_; |
| 300 | 300 |
| 301 HIMAGELIST image_list_; | 301 HIMAGELIST image_list_; |
| 302 | 302 |
| 303 DISALLOW_COPY_AND_ASSIGN(TreeView); | 303 DISALLOW_COPY_AND_ASSIGN(TreeView); |
| 304 }; | 304 }; |
| 305 | 305 |
| 306 } // namespace views | 306 } // namespace views |
| 307 | 307 |
| 308 #endif // VIEWS_CONTROLS_TREE_TREE_VIEW_H_ | 308 #endif // VIEWS_CONTROLS_TREE_TREE_VIEW_H_ |
| OLD | NEW |