| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
| 6 #define UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class TreeViewController; | 28 class TreeViewController; |
| 29 class PrefixSelector; | 29 class PrefixSelector; |
| 30 | 30 |
| 31 // TreeView displays hierarchical data as returned from a TreeModel. The user | 31 // TreeView displays hierarchical data as returned from a TreeModel. The user |
| 32 // can expand, collapse and edit the items. A Controller may be attached to | 32 // can expand, collapse and edit the items. A Controller may be attached to |
| 33 // receive notification of selection changes and restrict editing. | 33 // receive notification of selection changes and restrict editing. |
| 34 // | 34 // |
| 35 // Note on implementation. This implementation doesn't scale well. In particular | 35 // Note on implementation. This implementation doesn't scale well. In particular |
| 36 // it does not store any row information, but instead calculates it as | 36 // it does not store any row information, but instead calculates it as |
| 37 // necessary. But it's more than adequate for current uses. | 37 // necessary. But it's more than adequate for current uses. |
| 38 class VIEWS_EXPORT TreeView : public ui::TreeModelObserver, | 38 class VIEWS_EXPORT TreeView : public View, |
| 39 public ui::TreeModelObserver, |
| 39 public TextfieldController, | 40 public TextfieldController, |
| 40 public FocusChangeListener, | 41 public FocusChangeListener, |
| 41 public PrefixDelegate { | 42 public PrefixDelegate { |
| 42 public: | 43 public: |
| 43 // The tree view's class name. | 44 // The tree view's class name. |
| 44 static const char kViewClassName[]; | 45 static const char kViewClassName[]; |
| 45 | 46 |
| 46 TreeView(); | 47 TreeView(); |
| 47 ~TreeView() override; | 48 ~TreeView() override; |
| 48 | 49 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 int text_offset_; | 405 int text_offset_; |
| 405 | 406 |
| 406 std::unique_ptr<PrefixSelector> selector_; | 407 std::unique_ptr<PrefixSelector> selector_; |
| 407 | 408 |
| 408 DISALLOW_COPY_AND_ASSIGN(TreeView); | 409 DISALLOW_COPY_AND_ASSIGN(TreeView); |
| 409 }; | 410 }; |
| 410 | 411 |
| 411 } // namespace views | 412 } // namespace views |
| 412 | 413 |
| 413 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 414 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
| OLD | NEW |