pyface.drop_handler module

class pyface.drop_handler.BaseDropHandler[source]

Bases: HasTraits

Basic drop handler

on_can_handle = Callable

Returns True if the current drop handler can handle the given drag event occurring on the given target widget.

on_handle = Callable

Performs drop action when drop event occurs on target widget.

can_handle_drop(event, target)[source]
handle_drop(event, target)[source]
class pyface.drop_handler.FileDropHandler[source]

Bases: HasTraits

Class to handle backward compatible file drop events

extensions = List(Str)

supported extensions

open_file = Callable

Called when file is opened. Takes single argument: path of file

can_handle_drop(event, target)[source]

Does the drop event contails file data with matching extensions

handle_drop(event, target)[source]

Open the file using the supplied callback