chaco.examples.demo.chaco_trait_editor module¶
An example of how to use Chaco to render a visual TraitsUI editor. This particular editor allows the user to set two endpoints of an interval.
- 
class 
chaco.examples.demo.chaco_trait_editor.Interval(low=0, high=1, **metadata)¶ Bases:
traits.trait_type.TraitTypeTrait that represents an interval.
- 
create_editor()¶ Returns the default traits UI editor to use for a trait.
- 
info_text= 'an interval (x,y) where x < y'¶ 
- 
validate(object, name, value)¶ 
- 
 
- 
chaco.examples.demo.chaco_trait_editor.IntervalEditor¶ alias of
chaco.examples.demo.chaco_trait_editor.IntervalEditorFactory
- 
class 
chaco.examples.demo.chaco_trait_editor.IntervalEditorFactory(*args, **traits)¶ Bases:
traitsui.editor_factory.EditorFactory- 
simple_editor(ui, object, name, description, parent)¶ Generates an editor using the “simple” style.
- 
 
- 
class 
chaco.examples.demo.chaco_trait_editor.IntervalEditorImpl(parent, **traits)¶ Bases:
traitsui.qt4.editor.Editor- 
init(parent)¶ Create and initialize the underlying toolkit widget.
This method must be overriden by subclasses. Implementations must ensure that the
controltrait is set to an appropriate toolkit object.- Parameters
 parent (toolkit control) – The parent toolkit object of the editor’s toolkit objects.
- 
update_editor()¶ Updates the editor when the object trait changes externally to the editor.
- 
update_interval(event)¶ 
- 
 
- 
class 
chaco.examples.demo.chaco_trait_editor.IntervalTest¶ Bases:
traits.has_traits.HasTraits
- 
class 
chaco.examples.demo.chaco_trait_editor.RangeKnobsOverlay(component=None, *args, **kw)¶ Bases:
chaco.tools.range_selection_overlay.RangeSelectionOverlay- 
overlay(component, gc, view_bounds=None, mode='normal')¶ Draws this component overlaid on another component.
Overrides AbstractOverlay.
-