enable.tools.move_tool module

class enable.tools.move_tool.MoveTool(component=None, **traits)[source]

Bases: enable.tools.drag_tool.DragTool

Generic tool for moving a component’s position relative to its container

drag_start(event)[source]

Called when the drag operation starts.

The event parameter is the mouse event that established the drag operation; its x and y attributes correspond to the current location of the mouse, and not to the position of the mouse when the initial left_down or right_down event happened.

dragging(event)[source]

This method is called for every mouse_move event that the tool receives while the user is dragging the mouse.

It is recommended that subclasses do most of their work in this method.

is_draggable(x, y)[source]

Returns whether the (x,y) position is in a region that is OK to drag.

Used by the tool to determine when to start a drag.