@@ -0,0 +1,1794 @@
+#------------------------------------------------------------------------------%0A# Copyright (c) 2014, Enthought, Inc.%0A# All rights reserved.%0A#%0A# This software is provided without warranty under the terms of the BSD%0A# license included in LICENSE.txt and may be redistributed only%0A# under the conditions described in the aforementioned license.  The license%0A# is also available online at http://www.enthought.com/licenses/BSD.txt%0A# Thanks for using Enthought open source!%0A#------------------------------------------------------------------------------%0A%22%22%22 Abstract base class for tools that handle drag and drop %22%22%22%0A%0Afrom __future__ import absolute_import, print_function, division%0A%0Afrom enable.base_tool import BaseTool%0A%0A%0Aclass BaseDropTool(BaseTool):%0A    %22%22%22 Abstract base class for tools that handle drag and drop %22%22%22%0A%0A    def normal_drag_over(self, event):%0A        %22%22%22 Handle dragging over the component %22%22%22%0A        try:%0A            result = self.accepts_drop(event.obj)%0A            self.component.window.set_drag_result(result)%0A        except Exception:%0A            self.component.window.set_drag_result(%22error%22)%0A            raise%0A%0A    def normal_dropped_on(self, event):%0A        if self.accepts_drop(event.obj) != %22none%22:%0A            self.handle_drop(event.obj)%0A%0A    def accepts_drop(self, urls):%0A        %22%22%22 Whether or not to accept the drag, and the type of drag%0A%0A        The return value is either %22none%22, if the drag is refused for the%0A        dragged object types, or one of %22copy%22, %22move%22, or %22link%22.%0A%0A        Subclasses should override this method.%0A%0A        %22%22%22%0A        raise NotImplementedError%0A%0A    def handle_drop(self, urls):%0A        %22%22%22 Handle objects being dropped on the component%0A%0A        Subclasses should override this method.%0A        %22%22%22%0A        raise NotImplementedError%0A

Add base tool to facilitate drag and drop support.