Inherits from
- AbstractController: enthought.chaco.abstract_controller.AbstractController
Attributes
- dataspace_points
An Nx2 array of points in data space representing all selected points.
dataspace_points = Property(Array)
- disjoint_selections
A list of all the selection polygons.
disjoint_selections = Property(List)
- event_state
The possible event states of this selection tool (overrides enable.Interactor).
- normal:
- Nothing has been selected, and the user is not dragging the mouse.
- selecting:
- The user is dragging the mouse and is actively changing the selection region.
event_state = Enum('normal', 'selecting')
- incremental_select
If True, the selection mask is updated as the mouse moves, rather than only at the beginning and end of the selection operation.
incremental_select = Bool(False)
- plot
Mapping from screen space to data space. By default, it is just self.component.
plot = Property
- selection_changed
Fires when the selection mask changes.
selection_changed = Event
- selection_completed
Fires when the user release the mouse button and finalizes the selection.
selection_completed = Event
- selection_datasource
The data source that the mask of selected points is attached to. Note that the indices in this data source must match the indices of the data in the plot.
selection_datasource = Instance(AbstractDataSource)
- selection_mode
The selection mode of the lasso pointer: "include", "exclude" or "invert" points from the selection. The "include" and "exclude" settings essentially invert the selection mask. The "invert" setting differs from "exclude" in that "invert" inverses the selection of all points the the lasso'ed polygon, while "exclude" operates only on points included in a previous selection.
selection_mode = Enum('include', 'exclude', 'invert')
- updated
Fires whenever dataspace_points changes, necessitating a redraw of the selection region.
updated = Event
Inherited from base classes
Method summary
- normal_key_pressed(self, event)
- normal_left_down(self, event)
- selecting_left_up(self, event)
- selecting_mouse_leave(self, event)
- selecting_mouse_move(self, event)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, state, trait_change_notify = True)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- dispatch(self, event, suffix)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- get_event_transform(self, event = None, suffix = '')
- has_traits_interface(self, *interfaces)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- normal_key_pressed(self, event)
Handles the user pressing a key in the 'normal' state.
If the user presses the Escape key, the tool is reset.
- normal_left_down(self, event)
Handles the left mouse button being pressed while the tool is in the 'normal' state.
Puts the tool into 'selecting' mode, and starts defining the selection.
- selecting_left_up(self, event)
Handles the left mouse coming up in the 'selecting' state.
Completes the selection and switches to the 'normal' state.
- selecting_mouse_leave(self, event)
Handles the mouse leaving the plot when the tool is in the 'selecting' state.
Ends the selection operation.
- selecting_mouse_move(self, event)
Handles the mouse moving when the tool is in the 'selecting' state.
The selection is extended to the current mouse position.