TreeDragDest
Deprecated since version 4.10: List views use widgets to display their contents.
You can use DropTarget
to implement a drop destination
- class TreeDragDest(*args, **kwargs)
Implementations: ListStore
, TreeStore
Interface for Drag-and-Drop destinations in GtkTreeView
.
Methods
- class TreeDragDest
- drag_data_received(dest: TreePath, value: Any) bool
Asks the
GtkTreeDragDest
to insert a row before the pathdest
, deriving the contents of the row fromvalue
. Ifdest
is outside the tree so that inserting before it is impossible,False
will be returned. Also,False
may be returned if the new row is not created for some model-specific reason. Should robustly handle adest
no longer found in the model!Deprecated since version 4.10: Use list models instead
- Parameters:
dest – row to drop in front of
value – data to drop
- row_drop_possible(dest_path: TreePath, value: Any) bool
Determines whether a drop is possible before the given
dest_path
, at the same depth asdest_path
. i.e., can we drop the data invalue
at that location.dest_path
does not have to exist; the return value will almost certainly beFalse
if the parent ofdest_path
doesn’t exist, though.Deprecated since version 4.10: Use list models instead
- Parameters:
dest_path – destination row
value – the data being dropped
Virtual Methods
- class TreeDragDest
- do_drag_data_received(dest: TreePath, value: Any) bool
Asks the
GtkTreeDragDest
to insert a row before the pathdest
, deriving the contents of the row fromvalue
. Ifdest
is outside the tree so that inserting before it is impossible,False
will be returned. Also,False
may be returned if the new row is not created for some model-specific reason. Should robustly handle adest
no longer found in the model!Deprecated since version 4.10: Use list models instead
- Parameters:
dest – row to drop in front of
value – data to drop
- do_row_drop_possible(dest_path: TreePath, value: Any) bool
Determines whether a drop is possible before the given
dest_path
, at the same depth asdest_path
. i.e., can we drop the data invalue
at that location.dest_path
does not have to exist; the return value will almost certainly beFalse
if the parent ofdest_path
doesn’t exist, though.Deprecated since version 4.10: Use list models instead
- Parameters:
dest_path – destination row
value – the data being dropped