manpagez: man pages & more
html files: pygtk
Home | html | info | man
gtk.TreeDragDest — an interface that manages the data transfer for a destination of a gtk.TreeView drag and drop operation

Synopsis

class gtk.TreeDragDest(gobject.GInterface):
    def drag_data_received(dest, selection_data)
def row_drop_possible(dest_path, selection_data)

Description

The gtk.TreeDragDest is an interface for checking and receiving the data for the destination of a gtk.TreeView drag and drop operation.

Methods

gtk.TreeDragDest.drag_data_received

    def drag_data_received(dest, selection_data)

dest :

the row to drop the data in front of

selection_data :

the data to drop

Returns :

True if a new row was created before position dest

The drag_data_received() method asks the gtk.TreeDragDest to insert a row before the path dest, deriving the contents of the row from selection_data. If dest 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.

gtk.TreeDragDest.row_drop_possible

    def row_drop_possible(dest_path, selection_data)

dest_path :

a destination row

selection_data :

the data being dragged

Returns :

True if a drop is possible before dest_path

The row_drop_possible() method determines if a drop is possible before the tree path specified by dest_path and at the same depth as dest_path. That is, can we drop the data specified by selection_data at that location. dest_path does not have to exist but the return value will almost certainly be False if the parent of dest_path doesn't exist, though.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.