// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_VIEWS_CONTROLS_TREE_TREE_VIEW_H_ #define UI_VIEWS_CONTROLS_TREE_TREE_VIEW_H_ #include <memory> #include <vector> #include "base/memory/raw_ptr.h" #include "ui/base/models/image_model.h" #include "ui/base/models/tree_node_model.h" #include "ui/gfx/font_list.h" #include "ui/gfx/image/image_skia.h" #include "ui/views/controls/prefix_delegate.h" #include "ui/views/controls/textfield/textfield_controller.h" #include "ui/views/controls/tree/tree_view_drawing_provider.h" #include "ui/views/focus/focus_manager.h" #include "ui/views/view.h" namespace ui { struct AXActionData; struct AXNodeData; } // namespace ui namespace gfx { class Rect; } // namespace gfx namespace views { class AXVirtualView; class PrefixSelector; class ScrollView; class Textfield; class TreeViewController; // TreeView displays hierarchical data as returned from a TreeModel. The user // can expand, collapse and edit the items. A Controller may be attached to // receive notification of selection changes and restrict editing. // // In addition to tracking selection, TreeView also tracks the active node, // which is the item that receives keyboard input when the tree has focus. // Active/focus is like a pointer for keyboard navigation, and operations such // as selection are performed at the point of focus. The active node is synced // to the selected node. When the active node is nullptr, the TreeView itself is // the target of keyboard input. // // Note on implementation. This implementation doesn't scale well. In particular // it does not store any row information, but instead calculates it as // necessary. But it's more than adequate for current uses. class VIEWS_EXPORT TreeView : public View, public ui::TreeModelObserver, public TextfieldController, public FocusChangeListener, public PrefixDelegate { … }; } // namespace views #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_H_