Skip to content

Gtk.TreeDragSource

interface

:::warning Deprecated since 4.10 This API is deprecated. :::

Interface for Drag-and-Drop destinations in GtkTreeView.

Methods

drag_data_delete

def drag_data_delete(self, path: TreePath) -> bool

:::warning Deprecated since 4.10 This API is deprecated. :::

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!

Parameters:

  • path — row that was being dragged

drag_data_get

def drag_data_get(self, path: TreePath) -> Gdk.ContentProvider | None

:::warning Deprecated since 4.10 This API is deprecated. :::

Asks the GtkTreeDragSource to return a GdkContentProvider representing the row at path. Should robustly handle a path no longer found in the model!

Parameters:

  • path — row that was dragged

row_draggable

def row_draggable(self, path: TreePath) -> bool

:::warning Deprecated since 4.10 This API is deprecated. :::

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.

Parameters:

  • path — row on which user is initiating a drag

Virtual methods

do_drag_data_delete

def do_drag_data_delete(self, path: TreePath) -> bool

:::warning Deprecated since 4.10 This API is deprecated. :::

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!

Parameters:

  • path — row that was being dragged

do_drag_data_get

def do_drag_data_get(self, path: TreePath) -> Gdk.ContentProvider | None

:::warning Deprecated since 4.10 This API is deprecated. :::

Asks the GtkTreeDragSource to return a GdkContentProvider representing the row at path. Should robustly handle a path no longer found in the model!

Parameters:

  • path — row that was dragged

do_row_draggable

def do_row_draggable(self, path: TreePath) -> bool

:::warning Deprecated since 4.10 This API is deprecated. :::

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.

Parameters:

  • path — row on which user is initiating a drag