ToolbarModeBase¶
- class glue.viewers.matplotlib.toolbar_mode.ToolbarModeBase(viewer, **kwargs)[source]¶
Bases:
MouseMode
,CheckableTool
All ToolbarModes are both MouseModes and CheckableTools
Attributes Summary
A property that callback functions can be added to.
Methods Summary
activate
()Activates all MPL event handlers associated with this mouse mode.
close
()Deactivates all MPL event handlers associated with this mouse mode.
key
(event)Handles key press events.
List of QtWidgets.QActions to be attached to this tool as a context menu.
move
(event)Handles mouse move events.
press
(event)Handles mouse presses.
release
(event)Handles mouse release events.
Attributes Documentation
- action_text = None¶
- enabled¶
A property that callback functions can be added to.
When a callback property changes value, each callback function is called with information about the state change. Otherwise, callback properties behave just like normal instance variables.
CallbackProperties must be defined at the class level. Use the helper function
add_callback()
to attach a callback to a specific instance of a class with CallbackProperties- Parameters:
- default
The initial value for the property
- docstringstr
The docstring for the property
- getter, setterfunc
Custom getter and setter functions (advanced)
- icon = None¶
- shortcut = None¶
- status_tip = None¶
- tool_id = None¶
- tool_tip = None¶
Methods Documentation
- activate()¶
Activates all MPL event handlers associated with this mouse mode.
- close()¶
- deactivate()¶
Deactivates all MPL event handlers associated with this mouse mode.
- key(event)¶
Handles key press events.
Calls key_callback method.
- Parameters:
- event
matplotlib.backend_bases.KeyEvent
The event that was triggered
- event
List of QtWidgets.QActions to be attached to this tool as a context menu.
- move(event)¶
Handles mouse move events.
Logs mouse position and calls move_callback method.
- Parameters:
- event
matplotlib.backend_bases.MouseEvent
The event that was triggered
- event
- press(event)¶
Handles mouse presses.
Logs mouse position and calls press_callback method.
- Parameters:
- event
matplotlib.backend_bases.MouseEvent
The event that was triggered
- event
- release(event)¶
Handles mouse release events.
Logs mouse position and calls release_callback method.
- Parameters:
- event
matplotlib.backend_bases.MouseEvent
The event that was triggered
- event