gtk.TreeDragSource

gtk.TreeDragSource — an interface that manages the source data transfer for a gtk.TreeView drag and drop operation

Synopsis

class gtk.TreeDragSource(gobject.GInterface):
    def row_draggable(path)
def drag_data_delete(path)
def drag_data_get(path, selection_data)

Description

A gtk.TreeDragSource is an interface that provides for the management of the source data for a gtk.TreeView drag and drop operation.

Methods

gtk.TreeDragSource.row_draggable

    def row_draggable(path)
path :the row from which the user is initiating a drag
Returns :TRUE if the row can be dragged

The row_draggable() method asks the gtk.TreeDragSource if the row specified by path can be used as the source of a DND operation. If the gtk.TreeDragSource doesn't implement this interface, the row is assumed draggable.

gtk.TreeDragSource.drag_data_delete

    def drag_data_delete(path)
path :the row that was being dragged
Returns :TRUE if the row was successfully deleted

The drag_data_delete() method asks the gtk.TreeDragSource to delete the row specified by path, because it was moved somewhere else via drag-and-drop. This method returns FALSE if the deletion fails because path no longer exists, or for some other model-specific reason.

gtk.TreeDragSource.drag_data_get

    def drag_data_get(path, selection_data)
path :the row that was dragged
selection_data :a gtk.SelectionData to fill with data from the dragged row
Returns :TRUE if data of the required type was provided

The drag_data_get() method asks the gtk.TreeDragSource to fill in the selection data object specified by selection_data with a representation of the row specified by path. The selection_data target attribute gives the required type of the data.