Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- auto_raise
Raise the GUI on pick ?
auto_raise = true(desc = 'whether to raise the picker GUI on pick')
- default_view
default_view = View(Group(Group(Item(name = 'pick_type'), Item(name = 'tolerance'), show_border = True), Group(Item(name = 'pick_handler', style = 'custom'), show_border = True, show_labels = False), Group(Item(name = 'show_gui'), Item(name = 'auto_raise'), show_border = True)), resizable = True, buttons = [ 'OK' ], handler = CloseHandler())
- pick_handler
The pick_handler. Set this to your own subclass if you want do do something different from the default.
pick_handler = Trait(DefaultPickHandler(), Instance(PickHandler))
- pick_type
Speficifies the pick type. The 'point_picker' and 'cell_picker' options are self-explanatory. The 'world_picker' picks a point using a WorldPointPicker and additionally uses a ProbeFilter to probe the data at the picked point.
pick_type = Trait('point', TraitRevPrefixMap({ Const('point_picker') : Const(1), Const('cell_picker') : Const(2), Const('world_picker') : Const(3) }), desc = 'specifies the picker type to use')
- show_gui
show the GUI on pick ?
show_gui = true(desc = 'whether to show the picker GUI on pick')
- tolerance
Picking tolerance.
tolerance = Range(0.0, 0.25, 0.025000000000000001)
Inherited from base classes
Method summary
- __get_pure_state__(self)
- __getstate__(self)
- __init__(self, renwin, **traits)
- __setstate__(self, str_state)
- on_ui_close(self)
- pick(self, x, y)
- pick_cell(self, x, y)
- pick_point(self, x, y)
- pick_world(self, x, y)
Inherited from base classes
- __deepcopy__(self, memo)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- 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)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- 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
- __get_pure_state__(self)
- __getstate__(self)
- __init__(self, renwin, **traits)
- __setstate__(self, str_state)
- on_ui_close(self)
This method makes the picker actor invisible when the GUI dialog is closed.
- pick(self, x, y)
Calls one of the current pickers and then passes the obtained data to the self.pick_handler object's handle_pick method.
Parameters
x : X position of the mouse in the window.
y : Y position of the mouse in the window.
Note that the origin of x, y must be at the left bottom corner of the window. Thus, for most GUI toolkits, y must be flipped appropriately such that y=0 is the bottom of the window.
- pick_cell(self, x, y)
Picks the nearest cell. Returns a PickedData instance.
- pick_point(self, x, y)
Picks the nearest point. Returns a PickedData instance.
- pick_world(self, x, y)
Picks a world point and probes for data there. Returns a PickedData instance.