enable.tools.pyface.context_menu_tool module¶
This is a minimum example for adding a context menu to plot.
-
class
enable.tools.pyface.context_menu_tool.
ContextMenuTool
(component=None, **traits)[source]¶ Bases:
enable.base_tool.BaseTool
Pops up a context menu when the component receives a right click
-
controller
= Instance(ActionController)¶ an optional ActionController
-
is_showable
(x, y)[source]¶ Returns whether the (x, y) position is OK for showing the menu
By default checks that the point is in the component. Subclasses can override to provide more refined hit-testing.
-
menu_manager
= Instance(MenuManager)¶ the pyface action MenuManager instance
-
-
class
enable.tools.pyface.context_menu_tool.
EnableActionController
[source]¶ Bases:
pyface.action.action_controller.ActionController
An action controller that keeps a reference to the enable event that triggered the action.
-
enable_event
= Any¶ the enable event which triggered the popup menu
-
Previous topic
enable.tools.pyface.commands module
Next topic
enable.tools.pyface.move_command_tool module