TreeDragSource#
Deprecated since version 4.10:
- List views use widgets to display their contents.
You can use
DragSourceto 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
GtkTreeDragSourceto delete the row atpath, because it was moved somewhere else via drag-and-drop. ReturnsFalseif the deletion fails becausepathno longer exists, or for some model-specific reason. Should robustly handle apathno 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
GtkTreeDragSourceto return aGdkContentProviderrepresenting the row atpath. Should robustly handle apathno 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
GtkTreeDragSourcewhether 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
GtkTreeDragSourceto delete the row atpath, because it was moved somewhere else via drag-and-drop. ReturnsFalseif the deletion fails becausepathno longer exists, or for some model-specific reason. Should robustly handle apathno 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
GtkTreeDragSourceto return aGdkContentProviderrepresenting the row atpath. Should robustly handle apathno 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
GtkTreeDragSourcewhether 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