Please refer to the tree widget conceptual overview
for an overview of all the objects and data types related to the tree
widget and how they work together.
gtk.tree_view.TreeView has a main CSS node with name treeview and style class .view.
It has a subnode with name header, which is the parent for all the column
header widgets' CSS nodes.
Each column header consists of a button, which among other content, has a
child with name sort-indicator, which carries the .ascending or .descending
style classes when the column header should show a sort indicator. The CSS
is expected to provide a suitable image using the -gtk-icon-source property.
For rubberband selection, a subnode with name rubberband is used.
For the drop target location during DND, a subnode with name dndtarget is used.
A widget for displaying both trees and lists
Widget that displays any object that implements the gtk.tree_model.TreeModel interface.
Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.
Coordinate systems in GtkTreeView API
Several different coordinate systems are exposed in the gtk.tree_view.TreeView API. These are:
Several functions are available for converting between the different coordinate systems. The most common translations are between widget and bin window coordinates and between bin window and tree coordinates. For the former you can use gtk.tree_view.TreeView.convertWidgetToBinWindowCoords (and vice versa), for the latter gtk.tree_view.TreeView.convertBinWindowToTreeCoords (and vice versa).
gtk.tree_view.TreeView as gtk.buildable.Buildable
The gtk.tree_view.TreeView implementation of the gtk.buildable.Buildable interface accepts gtk.tree_view_column.TreeViewColumn objects as <child> elements and exposes the internal gtk.tree_selection.TreeSelection in UI definitions.
An example of a UI definition fragment with gtk.tree_view.TreeView:
CSS nodes
gtk.tree_view.TreeView has a main CSS node with name treeview and style class .view. It has a subnode with name header, which is the parent for all the column header widgets' CSS nodes.
Each column header consists of a button, which among other content, has a child with name sort-indicator, which carries the .ascending or .descending style classes when the column header should show a sort indicator. The CSS is expected to provide a suitable image using the -gtk-icon-source property.
For rubberband selection, a subnode with name rubberband is used.
For the drop target location during DND, a subnode with name dndtarget is used.