| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Overriden to return a location based on the selected node. | 149 // Overriden to return a location based on the selected node. |
| 150 virtual gfx::Point GetKeyboardContextMenuLocation(); | 150 virtual gfx::Point GetKeyboardContextMenuLocation(); |
| 151 | 151 |
| 152 // Creates and configures the tree_view. | 152 // Creates and configures the tree_view. |
| 153 virtual HWND CreateNativeControl(HWND parent_container); | 153 virtual HWND CreateNativeControl(HWND parent_container); |
| 154 | 154 |
| 155 // Invoked when the native control sends a WM_NOTIFY message to its parent. | 155 // Invoked when the native control sends a WM_NOTIFY message to its parent. |
| 156 // Handles a variety of potential TreeView messages. | 156 // Handles a variety of potential TreeView messages. |
| 157 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param); | 157 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param); |
| 158 | 158 |
| 159 // Yes, we want to be notified of key down for two reasons. To circumvent | 159 // We pay attention to key down for two reasons: to circumvent VK_ENTER from |
| 160 // VK_ENTER from toggling the expaned state when processes_enter_ is false, | 160 // toggling the expaned state when processes_enter_ is false, and to have F2 |
| 161 // and to have F2 start editting. | 161 // start editting. |
| 162 virtual bool NotifyOnKeyDown() const { return true; } | |
| 163 virtual bool OnKeyDown(int virtual_key_code); | 162 virtual bool OnKeyDown(int virtual_key_code); |
| 164 | 163 |
| 165 virtual void OnContextMenu(const WTL::CPoint& location); | 164 virtual void OnContextMenu(const WTL::CPoint& location); |
| 166 | 165 |
| 167 // Returns the TreeModelNode for |tree_item|. | 166 // Returns the TreeModelNode for |tree_item|. |
| 168 TreeModelNode* GetNodeForTreeItem(HTREEITEM tree_item); | 167 TreeModelNode* GetNodeForTreeItem(HTREEITEM tree_item); |
| 169 | 168 |
| 170 // Returns the tree item for |node|. | 169 // Returns the tree item for |node|. |
| 171 HTREEITEM GetTreeItemForNode(TreeModelNode* node); | 170 HTREEITEM GetTreeItemForNode(TreeModelNode* node); |
| 172 | 171 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 bool has_custom_icons_; | 298 bool has_custom_icons_; |
| 300 | 299 |
| 301 HIMAGELIST image_list_; | 300 HIMAGELIST image_list_; |
| 302 | 301 |
| 303 DISALLOW_COPY_AND_ASSIGN(TreeView); | 302 DISALLOW_COPY_AND_ASSIGN(TreeView); |
| 304 }; | 303 }; |
| 305 | 304 |
| 306 } // namespace views | 305 } // namespace views |
| 307 | 306 |
| 308 #endif // VIEWS_CONTROLS_TREE_TREE_VIEW_H_ | 307 #endif // VIEWS_CONTROLS_TREE_TREE_VIEW_H_ |
| OLD | NEW |