API Reference for Enthought Tool Suite 3.0.1
Simple user interface for viewing/editing code in a LocalPythonFunction.
The UI has read-only tables for the input/outputs of the function. Below that has a code window that allows users to edit the function. When the function is edited, the inputs/outputs should update appropriately. If there is a syntax error (load_error) in the text, the error is reported in a text box at the bottom of the UI.
Since we don't really do this in the application (we edit the FunctionCall), the UI has been made private. It is useful for testing that a LocalPythonFunction is updating correctly based on changes to its code.
input_columns = [ ObjectColumn(name = 'name', label = 'Name', editable = False, width = 0.40000000000000002), ObjectColumn(name = 'default', label = 'Default', editable = False, width = 0.59999999999999998) ]
output_columns = [ ObjectColumn(name = 'name', label = 'Name', editable = False, width = 0.40000000000000002), ObjectColumn(name = 'name', label = 'Name', editable = False, width = 0.59999999999999998) ]
view = View(VSplit(HGroup(VGroup(Label('Inputs'), Item('inputs', editor = TableEditor(columns = input_columns, editable = True, configurable = False, sortable = False, sort_model = True, selection_bg_color = 'white', selection_color = 'black', label_bg_color = WindowColor, cell_bg_color = 'white'), show_label = False)), VGroup(Label('Outputs'), Item('outputs', editor = TableEditor(columns = output_columns, editable = True, configurable = False, sortable = False, sort_model = True, selection_bg_color = 'white', selection_color = 'black', label_bg_color = WindowColor, cell_bg_color = 'white'), show_label = False))), Group(Item('code', editor = CodeEditor(), show_label = False), Item('load_error', show_label = False))), width = 720, height = 700, resizable = True, buttons = menu.OKCancelButtons, close_result = False)
| Local name | Refers to |
|---|---|
| CodeEditor | enthought.traits.ui.editors.CodeEditor |
| Group | enthought.traits.ui.group.Group |
| HGroup | enthought.traits.ui.group.HGroup |
| Item | enthought.traits.ui.item.Item |
| Label | enthought.traits.ui.item.Label |
| ObjectColumn | enthought.traits.ui.table_column.ObjectColumn |
| TableEditor | enthought.traits.ui.editors.TableEditor |
| VGroup | enthought.traits.ui.group.VGroup |
| View | enthought.traits.ui.view.View |
| VSplit | enthought.traits.ui.group.VSplit |
© Copyright 2002-2008 Enthought, Inc.