Inherits from
- ListCanvasPanel: enthought.developer.editors.list_canvas_editor.ListCanvasPanel
Attributes
- active_item
The current active item (if any):
active_item = Instance(ListCanvasItem)
- adapter
The adapter used to control canvas operations:
adapter = Instance(ListCanvasAdapter)
- add
The list of classes that can be added to the canvas using the canvas toolbar and/or context menu:
add = List
- add_classes
The list of classes referenced by the 'add_menu' and derived from the 'add' list:
add_classes = Any([ ])
- canvas
The wx Control acting as the list canvas:
canvas = Instance(wx.Window)
- editor
The Traits editor the list canvas is associated with:
editor = Instance(Editor)
- fast_layout
Can the canvas use the 'fast layout' algorithm (used when all canvas items are being replaced at once):
fast_layout = Bool(False)
- grid_info
The grid information to use:
grid_info = Instance(GridInfo, ())
- guide_info
The guide line information to use:
guide_info = Instance(GuideInfo, ())
- items
The current set of items on the canvas:
items = List(ListCanvasItem)
- operations
What operations are allowed on the list canvas:
operations = CanvasOperations
- position
The current position of the canvas:
position = Property
- preferred_position
The preferred position for the next item added to the canvas:
preferred_position = Tuple(Int, Int)
- scrollable
Is the canvas scrollable?
scrollable = Bool(False)
- size
The current size of the canvas:
size = Property
- snap_info
The snapping information to use:
snap_info = Instance(SnapInfo, ())
- status
The current adapter status:
status = Delegate('adapter')
Inherited from base classes
Method summary
- activate(self, item)
- add_left_up(self, x, y, event)
- add_object(self, object, hidden = False)
- add_to_menu(self, menu_item)
- add_to_toolbar(self, toolbar_item)
- adjust_positions_xl(self, x, y, dy0, dy)
- adjust_positions_xr(self, x, y, dy0, dx, dy)
- adjust_positions_y(self, x, y, dx0, dx, dy)
- begin_drag(self, item, mode, x, y, event)
- best_position_for(self, x, y, dx, dy, vertical = True)
- can_add_to_menu(self, action)
- can_add_to_toolbar(self, action)
- canvas_erase_background(self, event)
- canvas_paint(self, event)
- clear_left_up(self, x, y, event)
- create_control(self, parent, scrollable = False)
- create_object(self, object)
- dragging_left_up(self, x, y, event)
- dragging_motion(self, x, y, event)
- dropped_on(self, item, drop, x, y)
- initial_position_for(self, dx, dy)
- lego_set_for(self, item, strict)
- load_left_up(self, x, y, event)
- neighbor_set_for(self, item)
- perform(self, action)
- remove_item(self, item)
- replace_items(self, items = [ ], i = 0, j = -Const(1))
- save_left_up(self, x, y, event)
- snap_x(self, x, dx = 0)
- snap_y(self, y, dy = 0)
- update(self)
- wx_drag_any(self, x, y, data, drag_result)
- wx_dropped_on(self, x, y, data, drag_result)
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)
- capture_mouse(self)
- 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)
- in_control(self, x, y)
- init_control(self)
- layout(self)
- normal_left_down(self, x, y, event)
- normal_left_up(self, x, y, event)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- refresh(self, item = None)
- release_mouse(self)
- 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
- activate(self, item)
Activates a specified list canvas item.
- add_left_up(self, x, y, event)
Handles the user clicking the 'add' button.
- add_object(self, object, hidden = False)
Adds a new object to the canvas.
- add_to_toolbar(self, toolbar_item)
Adds a tool bar item to the tool bar being constructed.
- adjust_positions_xl(self, x, y, dy0, dy)
- adjust_positions_xr(self, x, y, dy0, dx, dy)
- adjust_positions_y(self, x, y, dx0, dx, dy)
Adjust the position of all windows that are immediately below and lined up with the specified window position.
- begin_drag(self, item, mode, x, y, event)
Handles a drag operation for a specified list item.
- best_position_for(self, x, y, dx, dy, vertical = True)
Returns the best position for an item of the specified width and height that is closest to a specified position.
- can_add_to_toolbar(self, action)
Returns whether the toolbar action should be defined in the user interface.
- canvas_erase_background(self, event)
Do not erase the background here (do it in the 'on_paint' handler).
- canvas_paint(self, event)
Handles repainting the canvas.
- clear_left_up(self, x, y, event)
Handles the user clicking the 'clear' button.
- create_control(self, parent, scrollable = False)
Creates the underlying wx.Panel control.
- create_object(self, object)
Creates a specified HasTraits object as a new list canvas item.
- dragging_left_up(self, x, y, event)
Handles the left mouse button being released while moving or resizing a list item.
- dragging_motion(self, x, y, event)
Handles one of the list items being moved or resized.
- dropped_on(self, item, drop, x, y)
Handles a single item dropped on a list item or canvas.
- initial_position_for(self, dx, dy)
Returns the initial position for an item of the specified width and height.
- lego_set_for(self, item, strict)
Return the 'lego' (i.e. connected) set for the specified item.
- load_left_up(self, x, y, event)
Handles the user clicking the 'load' button.
- neighbor_set_for(self, item)
Return the set of neighbors which share an edge with the specified item.
- perform(self, action)
Performs the action described by a specified Action object.
- remove_item(self, item)
Removes a specified list canvas item from the canvas.
- replace_items(self, items = [ ], i = 0, j = -Const(1))
Replaces the [i:j] items in the current items list with the specified set of replacement items.
- save_left_up(self, x, y, event)
Handles the user clicking the 'save' button.
- snap_x(self, x, dx = 0)
Adjust an x-coordinate to take into account any grid or guide line snapping in effect.
- snap_y(self, y, dy = 0)
Adjust an y-coordinate to take into account any grid or guide line snapping in effect.
- update(self)
Updates the contents of the canvas and its bounds.
- wx_drag_any(self, x, y, data, drag_result)
Handles a Python object being dragged over the tree.
- wx_dropped_on(self, x, y, data, drag_result)
Handles an object being dropped on a list canvas.