:right-sidebar: True TreeDragDest =================================================================== .. currentmodule:: gi.repository.Gtk .. deprecated:: 4.10 List views use widgets to display their contents. You can use :obj:`~gi.repository.Gtk.DropTarget` to implement a drop destination .. class:: TreeDragDest(*args, **kwargs) :no-contents-entry: Implementations: :class:`~gi.repository.Gtk.ListStore`, :class:`~gi.repository.Gtk.TreeStore` Interface for Drag-and-Drop destinations in ``GtkTreeView``. Methods ------- .. rst-class:: interim-class .. class:: TreeDragDest :no-index: .. method:: drag_data_received(dest: ~gi.repository.Gtk.TreePath, value: ~gi.repository.GObject.Value) -> bool Asks the ``GtkTreeDragDest`` to insert a row before the path ``dest``, deriving the contents of the row from ``value``. If ``dest`` is outside the tree so that inserting before it is impossible, :const:`False` will be returned. Also, :const:`False` may be returned if the new row is not created for some model-specific reason. Should robustly handle a ``dest`` no longer found in the model! .. deprecated:: 4.10 Use list models instead :param dest: row to drop in front of :param value: data to drop .. method:: row_drop_possible(dest_path: ~gi.repository.Gtk.TreePath, value: ~gi.repository.GObject.Value) -> bool Determines whether a drop is possible before the given ``dest_path``, at the same depth as ``dest_path``. i.e., can we drop the data in ``value`` at that location. ``dest_path`` does not have to exist; the return value will almost certainly be :const:`False` if the parent of ``dest_path`` doesn’t exist, though. .. deprecated:: 4.10 Use list models instead :param dest_path: destination row :param value: the data being dropped Virtual Methods --------------- .. rst-class:: interim-class .. class:: TreeDragDest :no-index: .. method:: do_drag_data_received(type, self, dest: ~gi.repository.Gtk.TreePath, value: ~gi.repository.GObject.Value) -> bool Asks the ``GtkTreeDragDest`` to insert a row before the path ``dest``, deriving the contents of the row from ``value``. If ``dest`` is outside the tree so that inserting before it is impossible, :const:`False` will be returned. Also, :const:`False` may be returned if the new row is not created for some model-specific reason. Should robustly handle a ``dest`` no longer found in the model! .. deprecated:: 4.10 Use list models instead :param type: :param self: :param dest: row to drop in front of :param value: data to drop .. method:: do_row_drop_possible(type, self, dest_path: ~gi.repository.Gtk.TreePath, value: ~gi.repository.GObject.Value) -> bool Determines whether a drop is possible before the given ``dest_path``, at the same depth as ``dest_path``. i.e., can we drop the data in ``value`` at that location. ``dest_path`` does not have to exist; the return value will almost certainly be :const:`False` if the parent of ``dest_path`` doesn’t exist, though. .. deprecated:: 4.10 Use list models instead :param type: :param self: :param dest_path: destination row :param value: the data being dropped