def wx_drag_any ( self, x, y, data, drag_result ):
        ui_provider = isinstance( data, IDockUIProvider )
        if ui_provider or isinstance( data, DockControl ):
            if (ui_provider and
               (not self.handler.can_drop( *(self.handler_args + ( data, )) ))):
                return wx.DragNone

            # Check to see if we are in 'drag mode' yet:
            cur_dock_info = self._dock_info
            if cur_dock_info is None:
                cur_dock_info = no_dock_info
                if isinstance( data, DockControl ):
                    self._dock_size = data.tab_width
                else:
                    self._dock_size = 80

            # Get the window and DockInfo object associated with the event:
            window          = self.control
            self._dock_info = dock_info = \
                              self.sizer.DockInfoAt( x, y, self._dock_size,
                                                     False )

            # If the DockInfo has changed, then update the screen:
            if ((cur_dock_info.kind != dock_info.kind)         or
                (cur_dock_info.region is not dock_info.region) or
                (cur_dock_info.bounds != dock_info.bounds)     or
                (cur_dock_info.tab_bounds != dock_info.tab_bounds)):

                # Erase the old region:
                cur_dock_info.draw( window )

                # Draw the new region:
                dock_info.draw( window )

            return drag_result

        # Handle the case of dragging a normal object over a 'feature':
        if self._can_drop_on_feature( x, y, data ) is not None:
            return drag_result

        return wx.DragNone

    #---------------------------------------------------------------------------
    #  Handles a dragged Python object leaving the window:
    #---------------------------------------------------------------------------
Handles a Python object being dragged over the control.
dataset/ETHPy150Open enthought/pyface/pyface/dock/dock_window.py/DockWindow.wx_drag_any