def OnData(self, x, y, default_drag_result):
        """ Called when OnDrop returns True. """

        # First, if we have a source in the clipboard and the source
        # doesn't allow moves then change the default to copy
        if clipboard.drop_source is not None and \
           not clipboard.drop_source.allow_move:
            default_drag_result = wx.DragCopy
        elif clipboard.drop_source is None:
            # This means we might be receiving a file; try to import
            # the right packages to nicely handle a file drop.  If those
            # packages can't be imported, then just pass through.
            if self.GetData():
                try:
                    from apptools.io import File
                    from apptools.naming.api import Binding

                    names = self.file_data.GetFilenames()
                    files = []
                    bindings = []
                    for name in names:
                        f = File(name)
                        files.append(f)
                        bindings.append(Binding(name = name, obj = f))
                    clipboard.data = files
                    clipboard.node = bindings
                except __HOLE__:
                    pass

        # Pass the object on the clipboard it to the handler.
        #
        # fixme: We allow 'wx_dropped_on' and 'on_drop' because both Dave
        # and Martin want different things! Unify!
        if hasattr(self.handler, 'wx_dropped_on'):
            drag_result = self.handler.wx_dropped_on(
                x, y, clipboard.data, default_drag_result
            )

        elif hasattr(self.handler, 'on_drop'):
            drag_result = self.handler.on_drop(
                x, y, clipboard.data, default_drag_result
            )

        else:
            self.handler(x, y, clipboard.data)
            drag_result = default_drag_result

        # Let the source of the drag/drop know that the operation is complete.
        drop_source = clipboard.drop_source
        if drop_source is not None:
            drop_source.on_dropped(drag_result)

        # Clean out the drop source!
        clipboard.drop_source = None

        # The return value tells the source what to do with the original data
        # (move, copy, etc.).  In this case we just return the suggested value
        # given to us.
        return default_drag_result

    # Some virtual methods that track the progress of the drag.
dataset/ETHPy150Open enthought/pyface/pyface/wx/drag_and_drop.py/PythonDropTarget.OnData