Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- canvas
Enable canvas that displays the graph - The Block Canvas
canvas = Instance(Container)
- edited_function
Edited function
edited_function = Any
- execution_model
The execution model
execution_model = Instance(ExecutionModel)
- factory
The box factory
factory = Instance(BlockNodeFactory)
- gap
Event that we fire whenever the graph has been updated, i.e. new blocks are added or old ones removed.
gap = List([ 50, 100 ])
- layout_engine
Engine used to layout blocks for display
layout_engine = Instance(RowLayoutEngine)
- saved_node_positions
Saved box positions from file
saved_node_positions = Dict
Inherited from base classes
Method summary
- assign_binding(self, graph_node, variable, name)
- collapse_boxes(self)
- dim_not_active(self, active_uuids)
- expand_boxes(self)
- flag_node(self, graph_node)
- handle_drop(self, event)
- limit_scale(self, scale, min_scale = -Name('inf'), max_scale = inf)
- position_in_viewport(self, component)
- position_nodes(self)
- scale_and_center(self)
- undim_all(self)
- unflag_all(self)
- update_nodes(self, added = [ ], removed = [ ], modified = [ ])
- verify_drag(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)
- 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
- assign_binding(self, graph_node, variable, name)
Assign the binding of a variable for a graph node to a particular name.
- collapse_boxes(self)
Collapse all the boxes.
- dim_not_active(self, active_uuids)
Given an iterable (preferably a set, for speed) of block uuids, dim nodes whose uuids are not in the set.
- expand_boxes(self)
Expands all the boxes.
- flag_node(self, graph_node)
Flag the box on the canvas representing the specified Block
- handle_drop(self, event)
Item has been dropped on canvas. This is currently called from BlockCanvas._container_handle_mouse_event
- limit_scale(self, scale, min_scale = -Name('inf'), max_scale = inf)
Returns a valid scale for the viewport by limiting it to being between min_scale and max_scale
- position_in_viewport(self, component)
Places a component at the top center of the canvas just below the toolbar.
- position_nodes(self)
- scale_and_center(self)
Sets the zoom factor and centers the viewport to ensure that all boxes are visible.
- undim_all(self)
Undim all nodes in the block canvas.
- unflag_all(self)
Unflag all nodes in the block canvas.
- update_nodes(self, added = [ ], removed = [ ], modified = [ ])
Update the nodes in the canvas based on changes in the graph.
- verify_drag(self, event)
Determine whether the item being dragged is allowed on the canvas. currently called from BlockCanvas._container_handle_mouse_event