:right-sidebar: True TreeDragSource =================================================================== .. currentmodule:: gi.repository.Gtk .. deprecated:: 4.10 List views use widgets to display their contents. You can use :obj:`~gi.repository.Gtk.DragSource` to implement a drag source .. class:: TreeDragSource(*args, **kwargs) :no-contents-entry: Implementations: :class:`~gi.repository.Gtk.ListStore`, :class:`~gi.repository.Gtk.TreeModelFilter`, :class:`~gi.repository.Gtk.TreeModelSort`, :class:`~gi.repository.Gtk.TreeStore` Interface for Drag-and-Drop destinations in ``GtkTreeView``\. Methods ------- .. rst-class:: interim-class .. class:: TreeDragSource :no-index: .. method:: drag_data_delete(path: ~gi.repository.Gtk.TreePath) -> bool Asks the ``GtkTreeDragSource`` to delete the row at ``path``\, because it was moved somewhere else via drag-and-drop. Returns :const:`False` if the deletion fails because ``path`` no longer exists, or for some model-specific reason. Should robustly handle a ``path`` no longer found in the model! .. deprecated:: 4.10 Use list models instead :param path: row that was being dragged .. method:: drag_data_get(path: ~gi.repository.Gtk.TreePath) -> ~gi.repository.Gdk.ContentProvider | None Asks the ``GtkTreeDragSource`` to return a ``GdkContentProvider`` representing the row at ``path``\. Should robustly handle a ``path`` no longer found in the model! .. deprecated:: 4.10 Use list models instead :param path: row that was dragged .. method:: row_draggable(path: ~gi.repository.Gtk.TreePath) -> bool Asks the ``GtkTreeDragSource`` whether a particular row can be used as the source of a DND operation. If the source doesn’t implement this interface, the row is assumed draggable. .. deprecated:: 4.10 Use list models instead :param path: row on which user is initiating a drag Virtual Methods --------------- .. rst-class:: interim-class .. class:: TreeDragSource :no-index: .. method:: do_drag_data_delete(path: ~gi.repository.Gtk.TreePath) -> bool Asks the ``GtkTreeDragSource`` to delete the row at ``path``\, because it was moved somewhere else via drag-and-drop. Returns :const:`False` if the deletion fails because ``path`` no longer exists, or for some model-specific reason. Should robustly handle a ``path`` no longer found in the model! .. deprecated:: 4.10 Use list models instead :param path: row that was being dragged .. method:: do_drag_data_get(path: ~gi.repository.Gtk.TreePath) -> ~gi.repository.Gdk.ContentProvider | None Asks the ``GtkTreeDragSource`` to return a ``GdkContentProvider`` representing the row at ``path``\. Should robustly handle a ``path`` no longer found in the model! .. deprecated:: 4.10 Use list models instead :param path: row that was dragged .. method:: do_row_draggable(path: ~gi.repository.Gtk.TreePath) -> bool Asks the ``GtkTreeDragSource`` whether a particular row can be used as the source of a DND operation. If the source doesn’t implement this interface, the row is assumed draggable. .. deprecated:: 4.10 Use list models instead :param path: row on which user is initiating a drag