Package NetworkEditor :: Module simpleNE :: Class NetworkBuilder
[hide private]
[frames] | no frames]

Class NetworkBuilder

source code

  Tkinter.Misc --+            
                 |            
Tkinter.BaseWidget --+        
                     |        
      Tkinter.Pack --+        
                     |        
     Tkinter.Place --+        
                     |        
      Tkinter.Grid --+        
                     |        
        Tkinter.Widget --+    
                         |    
             Tkinter.Frame --+
                             |
                EditorBase --+
                             |
                            NetworkBuilder


  This class implements a simple network builder that provides a Canvas
to which NetworkNodes can be added. These nodes can be connected by
NetworkConnections.
  The builder stored Nodes and connections in 2 dictionaries where the key is a
unique tag (associated with the geometry in the Canvas) and the value is the
instance of either the node or the connection.
  The Builder also maintains a list of currently selected nodes.



Nested Classes [hide private]

Inherited from Tkinter.Misc: getdouble, getint


Instance Methods [hide private]
  __init__(self, name='NoName', master=None, font=None, withShell=1, **kw)
instance <- NetworkBuilder(name='NoName', master=None, font=None,...
  panelFromName(self, name)
  createUserPanel_cb(self, event=None)
  createUserPanel(self, name, **kw)
  deleteUserPanel_cb(self)
  getNetworkByName(self, name)
networkList <- getNetworkByName(self, name) Return all the network who's name match the name regular expression
  getNodeByName(self, name)
nodeList <- getNodeByName(self, name) Return all the nodes from the current network who's name match the name regular expression
  resize_cb(self, event=None)
  resizeNetworkArea(self)
  clearPyShell(self, event=None)
  createCallbackManager(self, event)
  addCallbackManager(self, event, func, doc, **kw)
  showGUI(self)
  hideGUI(self)
  toggleGuiVisibility(self)
  setFont(self, *args)
  interactiveExit_cb(self, event=None)
  exit_cb(self, event=None)
  handleSelectionChangeMenus(self)
This is called by callback manager on event select or deselect nodes and turns on/off menu entries and menu buttons.
  handleAddNetwork(self)
This is called by callback manager on the event add network and turns on menu entries.
  handleDeleteNetwork(self, **kw)
This is called by callback manager on the event delete network and turns on menu buttons.
  copyNetwork_cb(self, event=None)
  cutNetwork_cb(self, event=None)
  delete(self, event=None)
  freezeNetwork(self)
  unfreezeNetwork(self)
  toggleFreezeNetwork_cb(self, event=None)
  saveNetwork(self, filename, hide=False)
  saveNetwork_cb(self, event=None, hide=False)
  pasteNetwork_cb(self, event=None)
  loadNetwork_cb(self, event=None)
  mergeNetwork_cb(self, event=None)
  loadNetwork(self, filename, network=None, name=None)
  addNetwork(self, network)
None <- addNetwork(network) adds a Network object to the editor
  closeNetwork_cb(self)
called from File->Close
  deleteNetwork(self, network, saveValues=0)
None <- deleteNetwork(network) deletes a Network object from the editor
  selectNetwork(self, name)
get's called by Pmw with the original name used to create the page
  renameNetworkTab(self, network, newName)
  setNetwork(self, network)
  myButtonPress(self, event=None)
  makeNetworksMenu(self)
  makeFileMenu(self)
  makeEditMenu(self)
  createMenus(self, parent)
  setUndoLabel(self)
  undo(self, event=None)
  setupUndo(self, command, comment)
  scaleHyperToggle(self, event=None)
  scaleHyper_cb(self, event)
  createMacro_cb(self, event=None)
  createMacro(self, network, name)
  selectAll_cb(self, event=None)
  menuOption_cb(self, varName)
menuOptions(var, varTk toggle menu options...
  toggleSplineConnections(self, event=None)
  toggleColorNodeByLibrary(self, event=None)
  newNet_cb(self, event=None)
  renameNet_cb(self, event=None)
  runCurrentNet_cb(self, event=None)
  togglePauseCurrentNet_cb(self, event=None)
  stopCurrentNet_cb(self, event=None)
  refreshNet_cb(self, net=None, event=None)
  resetWidgetValues_cb(self, event=None)
  resetCache_cb(self, event=None)
  print_cb(self, event=None)
  extendTypesTable(self, lib)
add new typesTable to the typeManager
  extendSynonymsTable(self, lib)
add new synonymsTable to the typeManager
  extendWidgetsTable(self, lib)
add new widgets to widgetsTable
  configure(self, **kw)
Configure resources of a widget.
  setConfigValue(self, varName, value)
  setFreezeUnfreezeNetwork(self, value)
  togglePythonShell(self, event=None)
  sourceFile(self, resourceFile=None)

Inherited from Tkinter.BaseWidget: destroy

Inherited from Tkinter.BaseWidget (private): _do, _setup

Inherited from Tkinter.Misc: __getitem__, __setitem__, __str__, after, after_cancel, after_idle, bbox, bell, bind, bind_all, bind_class, bindtags, cget, clipboard_append, clipboard_clear, colormodel, columnconfigure, config, deletecommand, event_add, event_delete, event_generate, event_info, focus, focus_displayof, focus_force, focus_get, focus_lastfor, focus_set, getboolean, getvar, grab_current, grab_release, grab_set, grab_set_global, grab_status, grid_bbox, grid_columnconfigure, grid_location, grid_propagate, grid_rowconfigure, grid_size, grid_slaves, image_names, image_types, keys, lift, lower, mainloop, nametowidget, option_add, option_clear, option_get, option_readfile, pack_propagate, pack_slaves, place_slaves, propagate, quit, register, rowconfigure, selection_clear, selection_get, selection_handle, selection_own, selection_own_get, send, setvar, size, slaves, tk_bisque, tk_focusFollowsMouse, tk_focusNext, tk_focusPrev, tk_menuBar, tk_setPalette, tk_strictMotif, tkraise, unbind, unbind_all, unbind_class, update, update_idletasks, wait_variable, wait_visibility, wait_window, waitvar, winfo_atom, winfo_atomname, winfo_cells, winfo_children, winfo_class, winfo_colormapfull, winfo_containing, winfo_depth, winfo_exists, winfo_fpixels, winfo_geometry, winfo_height, winfo_id, winfo_interps, winfo_ismapped, winfo_manager, winfo_name, winfo_parent, winfo_pathname, winfo_pixels, winfo_pointerx, winfo_pointerxy, winfo_pointery, winfo_reqheight, winfo_reqwidth, winfo_rgb, winfo_rootx, winfo_rooty, winfo_screen, winfo_screencells, winfo_screendepth, winfo_screenheight, winfo_screenmmheight, winfo_screenmmwidth, winfo_screenvisual, winfo_screenwidth, winfo_server, winfo_toplevel, winfo_viewable, winfo_visual, winfo_visualid, winfo_visualsavailable, winfo_vrootheight, winfo_vrootwidth, winfo_vrootx, winfo_vrooty, winfo_width, winfo_x, winfo_y

Inherited from Tkinter.Misc (private): _bind, _configure, _displayof, _getboolean, _getdoubles, _getints, _grid_configure, _nametowidget, _options, _register, _report_exception, _root, _substitute

Inherited from Tkinter.Pack: forget, info, pack, pack_configure, pack_forget, pack_info

Inherited from Tkinter.Place: place, place_configure, place_forget, place_info

Inherited from Tkinter.Grid: grid, grid_configure, grid_forget, grid_info, grid_remove, location


Class Variables [hide private]

Inherited from Tkinter.Misc: _noarg_

Inherited from Tkinter.Misc (private): _subst_format, _subst_format_str, _tclCommands


Method Details [hide private]

__init__(self, name='NoName', master=None, font=None, withShell=1, **kw)
(Constructor)

source code 
instance <- NetworkBuilder(name='NoName', master=None, font=None,
         withShell=1, **kw)
master can be a Frame in which the editor has to be packed
withShell=0 will prevent the creation of an Idle shell (since the
            default shell is used)
kw can contain the following named arguments:
visibleWidth, visibleHeight,
totalWidth, totalHeight
any legal keyword for a Canvas

Overrides: Tkinter.Frame.__init__

panelFromName(self, name)

source code 
None

createUserPanel_cb(self, event=None)

source code 
None

createUserPanel(self, name, **kw)

source code 
None

deleteUserPanel_cb(self)

source code 
None

getNetworkByName(self, name)

source code 
networkList <- getNetworkByName(self, name) Return all the network who's name match the name regular expression

getNodeByName(self, name)

source code 
nodeList <- getNodeByName(self, name) Return all the nodes from the current network who's name match the name regular expression

resize_cb(self, event=None)

source code 
None

resizeNetworkArea(self)

source code 
None

clearPyShell(self, event=None)

source code 
None

createCallbackManager(self, event)

source code 
None

addCallbackManager(self, event, func, doc, **kw)

source code 
None

showGUI(self)

source code 
None

hideGUI(self)

source code 
None

toggleGuiVisibility(self)

source code 
None

setFont(self, *args)

source code 
None

interactiveExit_cb(self, event=None)

source code 
None

exit_cb(self, event=None)

source code 
None

handleSelectionChangeMenus(self)

source code 
This is called by callback manager on event select or deselect nodes and turns on/off menu entries and menu buttons.

handleAddNetwork(self)

source code 
This is called by callback manager on the event add network and turns on menu entries.

handleDeleteNetwork(self, **kw)

source code 
This is called by callback manager on the event delete network and turns on menu buttons.

copyNetwork_cb(self, event=None)

source code 
None

cutNetwork_cb(self, event=None)

source code 
None

delete(self, event=None)

source code 
None

freezeNetwork(self)

source code 
None

unfreezeNetwork(self)

source code 
None

toggleFreezeNetwork_cb(self, event=None)

source code 
None

saveNetwork(self, filename, hide=False)

source code 
None

saveNetwork_cb(self, event=None, hide=False)

source code 
None

pasteNetwork_cb(self, event=None)

source code 
None

loadNetwork_cb(self, event=None)

source code 
None

mergeNetwork_cb(self, event=None)

source code 
None

loadNetwork(self, filename, network=None, name=None)

source code 
None

addNetwork(self, network)

source code 
None <- addNetwork(network) adds a Network object to the editor

closeNetwork_cb(self)

source code 
called from File->Close

deleteNetwork(self, network, saveValues=0)

source code 
None <- deleteNetwork(network) deletes a Network object from the editor

selectNetwork(self, name)

source code 
get's called by Pmw with the original name used to create the page

renameNetworkTab(self, network, newName)

source code 
None

setNetwork(self, network)

source code 
None

myButtonPress(self, event=None)

source code 
None

makeNetworksMenu(self)

source code 
None

makeFileMenu(self)

source code 
None

makeEditMenu(self)

source code 
None

createMenus(self, parent)

source code 
None

setUndoLabel(self)

source code 
None

undo(self, event=None)

source code 
None

setupUndo(self, command, comment)

source code 
None

scaleHyperToggle(self, event=None)

source code 
None

scaleHyper_cb(self, event)

source code 
None

createMacro_cb(self, event=None)

source code 
None

createMacro(self, network, name)

source code 
None

selectAll_cb(self, event=None)

source code 
None

menuOption_cb(self, varName)

source code 
menuOptions(var, varTk toggle menu options
var: verbose
     colorNodeByLibrary
     flashNodesWhenRun

toggleSplineConnections(self, event=None)

source code 
None

toggleColorNodeByLibrary(self, event=None)

source code 
None

newNet_cb(self, event=None)

source code 
None

renameNet_cb(self, event=None)

source code 
None

runCurrentNet_cb(self, event=None)

source code 
None

togglePauseCurrentNet_cb(self, event=None)

source code 
None

stopCurrentNet_cb(self, event=None)

source code 
None

refreshNet_cb(self, net=None, event=None)

source code 
None

resetWidgetValues_cb(self, event=None)

source code 
None

resetCache_cb(self, event=None)

source code 
None

print_cb(self, event=None)

source code 
None

extendTypesTable(self, lib)

source code 
add new typesTable to the typeManager

extendSynonymsTable(self, lib)

source code 
add new synonymsTable to the typeManager

extendWidgetsTable(self, lib)

source code 
add new widgets to widgetsTable

configure(self, **kw)

source code 

Configure resources of a widget.

The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method keys.
Overrides: Tkinter.Misc.configure
(inherited documentation)

setConfigValue(self, varName, value)

source code 
None

setFreezeUnfreezeNetwork(self, value)

source code 
None

togglePythonShell(self, event=None)

source code 
None

sourceFile(self, resourceFile=None)

source code 
None