TreeDragSource
Deprecated since version 4.10: List views use widgets to display their contents.
You can use DragSource
to implement a drag source
- class TreeDragSource(*args, **kwargs)
Implementations: ListStore
, TreeModelFilter
, TreeModelSort
, TreeStore
Interface for Drag-and-Drop destinations in GtkTreeView
.
Methods
- class TreeDragSource
- drag_data_delete(path: TreePath) bool
Asks the
GtkTreeDragSource
to delete the row atpath
, because it was moved somewhere else via drag-and-drop. ReturnsFalse
if the deletion fails becausepath
no longer exists, or for some model-specific reason. Should robustly handle apath
no longer found in the model!Deprecated since version 4.10: Use list models instead
- Parameters:
path – row that was being dragged
- drag_data_get(path: TreePath) ContentProvider | None
Asks the
GtkTreeDragSource
to return aGdkContentProvider
representing the row atpath
. Should robustly handle apath
no longer found in the model!Deprecated since version 4.10: Use list models instead
- Parameters:
path – row that was dragged
- row_draggable(path: 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 since version 4.10: Use list models instead
- Parameters:
path – row on which user is initiating a drag
Virtual Methods
- class TreeDragSource
- do_drag_data_delete(path: TreePath) bool
Asks the
GtkTreeDragSource
to delete the row atpath
, because it was moved somewhere else via drag-and-drop. ReturnsFalse
if the deletion fails becausepath
no longer exists, or for some model-specific reason. Should robustly handle apath
no longer found in the model!Deprecated since version 4.10: Use list models instead
- Parameters:
path – row that was being dragged
- do_drag_data_get(path: TreePath) ContentProvider | None
Asks the
GtkTreeDragSource
to return aGdkContentProvider
representing the row atpath
. Should robustly handle apath
no longer found in the model!Deprecated since version 4.10: Use list models instead
- Parameters:
path – row that was dragged
- do_row_draggable(path: 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 since version 4.10: Use list models instead
- Parameters:
path – row on which user is initiating a drag