| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <commctrl.h> | 10 #include <commctrl.h> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Invoked when a key is pressed on the tree view. | 39 // Invoked when a key is pressed on the tree view. |
| 40 virtual void OnTreeViewKeyDown(ui::KeyboardCode keycode) {} | 40 virtual void OnTreeViewKeyDown(ui::KeyboardCode keycode) {} |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // TreeView ------------------------------------------------------------------- | 43 // TreeView ------------------------------------------------------------------- |
| 44 | 44 |
| 45 // TreeView displays hierarchical data as returned from a TreeModel. The user | 45 // TreeView displays hierarchical data as returned from a TreeModel. The user |
| 46 // can expand, collapse and edit the items. A Controller may be attached to | 46 // can expand, collapse and edit the items. A Controller may be attached to |
| 47 // receive notification of selection changes and restrict editing. | 47 // receive notification of selection changes and restrict editing. |
| 48 class VIEWS_API TreeView : public NativeControl, ui::TreeModelObserver { | 48 class VIEWS_EXPORT TreeView : public NativeControl, ui::TreeModelObserver { |
| 49 public: | 49 public: |
| 50 TreeView(); | 50 TreeView(); |
| 51 virtual ~TreeView(); | 51 virtual ~TreeView(); |
| 52 | 52 |
| 53 // Is dragging enabled? The default is false. | 53 // Is dragging enabled? The default is false. |
| 54 void set_drag_enabled(bool drag_enabled) { drag_enabled_ = drag_enabled; } | 54 void set_drag_enabled(bool drag_enabled) { drag_enabled_ = drag_enabled; } |
| 55 bool drag_enabled() const { return drag_enabled_; } | 55 bool drag_enabled() const { return drag_enabled_; } |
| 56 | 56 |
| 57 // Sets the model. TreeView does not take ownership of the model. | 57 // Sets the model. TreeView does not take ownership of the model. |
| 58 void SetModel(ui::TreeModel* model); | 58 void SetModel(ui::TreeModel* model); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 bool has_custom_icons_; | 333 bool has_custom_icons_; |
| 334 | 334 |
| 335 HIMAGELIST image_list_; | 335 HIMAGELIST image_list_; |
| 336 | 336 |
| 337 DISALLOW_COPY_AND_ASSIGN(TreeView); | 337 DISALLOW_COPY_AND_ASSIGN(TreeView); |
| 338 }; | 338 }; |
| 339 | 339 |
| 340 } // namespace views | 340 } // namespace views |
| 341 | 341 |
| 342 #endif // VIEWS_CONTROLS_TREE_TREE_VIEW_H_ | 342 #endif // VIEWS_CONTROLS_TREE_TREE_VIEW_H_ |
| OLD | NEW |