pyface.drop_handler module¶
-
class
pyface.drop_handler.
BaseDropHandler
¶ Bases:
traits.has_traits.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)¶
-
handle_drop
(event, target)¶
-
-
class
pyface.drop_handler.
FileDropHandler
¶ Bases:
traits.has_traits.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)¶ Does the drop event contails file data with matching extensions
-
handle_drop
(event, target)¶ Open the file using the supplied callback
-