Gtk.TreeDragSource

g GObject.GInterface GObject.GInterface Gtk.TreeDragSource Gtk.TreeDragSource GObject.GInterface->Gtk.TreeDragSource

Implementations:

Gtk.ListStore, Gtk.TreeModelFilter, Gtk.TreeModelSort, Gtk.TreeStore

Methods

drag_data_delete (path)

drag_data_get (path)

row_draggable (path)

Virtual Methods

do_drag_data_delete (path)

do_drag_data_get (path)

do_row_draggable (path)

Properties

None

Signals

None

Fields

None

Class Details

class Gtk.TreeDragSource
Bases:

GObject.GInterface

Structure:

Gtk.TreeDragSourceIface

Interface for Drag-and-Drop destinations in GtkTreeView.

Deprecated since version 4.10: List views use widgets to display their contents. You can use [class`Gtk`.DragSource] to implement a drag source

drag_data_delete(path)[source]
Parameters:

path (Gtk.TreePath) – row that was being dragged

Returns:

True if the row was successfully deleted

Return type:

bool

Asks the GtkTreeDragSource to delete the row at path, because it was moved somewhere else via drag-and-drop. Returns 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 since version 4.10: Use list models instead

drag_data_get(path)[source]
Parameters:

path (Gtk.TreePath) – row that was dragged

Returns:

a GdkContentProvider for the given path

Return type:

Gdk.ContentProvider or 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 since version 4.10: Use list models instead

row_draggable(path)[source]
Parameters:

path (Gtk.TreePath) – row on which user is initiating a drag

Returns:

True if the row can be dragged

Return type:

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

do_drag_data_delete(path) virtual
Parameters:

path (Gtk.TreePath) – row that was being dragged

Returns:

True if the row was successfully deleted

Return type:

bool

Asks the GtkTreeDragSource to delete the row at path, because it was moved somewhere else via drag-and-drop. Returns 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 since version 4.10: Use list models instead

do_drag_data_get(path) virtual
Parameters:

path (Gtk.TreePath) – row that was dragged

Returns:

a GdkContentProvider for the given path

Return type:

Gdk.ContentProvider or 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 since version 4.10: Use list models instead

do_row_draggable(path) virtual
Parameters:

path (Gtk.TreePath) – row on which user is initiating a drag

Returns:

True if the row can be dragged

Return type:

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