|
__init__(self,
name='Noname')
|
|
getNodeByName(self,
name)
nodeList <- getNodeByName(self, name) Return all the nodes
who's name match the name regular expression
|
|
nodeIdToNumber(self,
id)
return the current index of this node in network.nodes if the
node's _id is given.
|
|
getNodesByIds(self,
ids)
returns a list of nodes based on a list of ids
|
|
freeze(self,
updateGUI=0)
|
|
unfreeze(self,
updateGUI=0)
|
|
isFrozen(self)
|
|
createCallbackManager(self,
event,
doc=None)
|
|
addCallbackManager(self,
event,
func)
|
|
describeCallbackManager(self,
event)
|
|
postCanvasMenu(self,
event)
|
|
delete(self,
saveValues=0)
|
|
destroyIcons(self,
saveValues=0)
|
|
destroyCanvas(self)
|
|
buildIcons(self)
|
|
rename(self,
name)
|
|
enter(self,
event=None)
|
|
configure(self,
event=None)
|
|
bindCallbacks(self)
|
|
createCanvas(self)
create the Canvas and Title widgets
|
|
setSplineConnections(self,
yesno)
|
|
getNetworkCreationSourceCode(self,
networkName='masterNet',
selectedOnly=0,
indent="",
withRun=True,
ignoreOriginal=False,
copyright=False)
returns code to re-create a network containing nodes and connections
selectedOnly: True/False.
|
|
buildLibraryImportCache(self,
cache,
network,
selectedOnly=False)
Loop recursively (if macro nodes are present) over all nodes and
build a dictionary containing the libraries needed to save a
network
|
|
getLibraryImportCode(self,
cache,
indent,
editor='masterNet.getEditor()',
importOnly=False)
Returns code to import libraries.
|
|
getNodesCreationSourceCode(self,
networkName,
selectedOnly=0,
indent="",
ignoreOriginal=False)
build a string representation of this network
|
|
getNodes(self,
nodesIds)
return a list of nodes corresponding to canvasIds
|
|
getNodesConnsPorts(self,
nodesIds)
find out what objects correspond to a list of canvasIds this
method is called by self.pickedItems()
|
|
getConnections(self,
nodes)
[2Connection], [1Connections], [1nodes] <- getConnections(nodes)...
|
|
getNodesAndInputPort(self,
nodesIds)
|
|
getNodesAndOutputPort(self,
nodesIds)
|
|
getNodesAndConnections(self,
nodesIds)
|
|
pickedItems(self,
event)
find out what has been picked
|
|
mouse1Up(self,
event=None)
|
|
mouse2Up(self,
event=None)
|
|
mouse1Down(self,
event=None,
nbClick=1)
|
|
mouse2Down(self,
event=None)
|
|
startDrawingSelectionBox(self,
event)
|
|
selectionBoxMotion(self,
event)
|
|
drawSelectionBox(self,
event)
|
|
selectionBoxEnd(self,
event)
|
|
moveCanvasStart(self,
event=None)
|
|
moveCanvas(self,
event=None)
|
|
moveCanvasEnd(self,
event=None)
|
|
moveSelectedNodesStart(self,
event)
|
|
moveSelectedNodes(self,
event=None)
|
|
moveSelectedNodesEnd(self,
event=None)
|
|
scale(self,
xscale,
yscale=None,
xo=0,
yo=0)
Scale the network
|
|
scaleNetworkStart(self,
event=None)
|
|
scaleNetworkMotion(self,
event)
|
|
scaleNetworkEnd(self,
event)
|
|
resetScaleSelectedNodes(self)
|
|
scaleHyper(self,
xc,
yc,
rad)
|
|
resetScale(self,
event=None)
|
|
getObjectsFromNames(self,
names,
objects)
[nodes] <- getObjectsFromNames(names) names can be a ';'
separated list of names objects has to be a ssequence of objects each
havinf a name attribute for each name in names, the first node
matching the name is returned regular expressions are allowed
|
|
objectsAsString(self,
objects)
|
|
expand(self,
objects,
objectList)
|
|
expandNodes(self,
objects)
|
|
expandConnections(self,
objects)
|
|
resetNodeCache(self)
|
|
addNode(self,
node,
posx,
posy,
tagModified=False,
undo=1)
None <- addNode(node, posx, posy)
Add a node to the network.
|
|
connectNodes(self,
node1,
node2,
portNode1=0,
portNode2=0,
mode='angles',
name=None,
blocking=True,
undo=1,
doNotScheduleOrCb=False,
**kw)
NetworkConnection <- connectNodes(node1, node2, portNode1=1,
portNode2=0, mode='angles', name='NoName', blocking=True, undo=1,
**kw) create a networkConnection object that connects these 2 nodes
if doNotScheduleOrCb is True, ScheduleNode() is not called, neither
the callbacks afterConnect and beforeConnect
|
|
specialConnectNodes(self,
node1,
node2,
portNode1=0,
portNode2=0,
mode='angles',
name='NoName',
undo=1,
**kw)
NetworkConnection <- specialConnectNodes(node1, node2,
portNode1=1, portNode2=0, mode='angles', name='NoName', undo=1, **kw)
create a networkConnection object that connects these 2 nodes
|
|
deleteNodes(self,
nodes,
undo=1)
|
|
deleteConnections(self,
connections,
undo=1,
schedule=True)
Call this method to delete connections.
|
|
deleteConnectionsNoCB(self,
c,
undo=1)
This method deletes connections without calling the
beforeDisconnect() and afterDisconnect() methods.
|
|
deleteConnection(self,
node1,
port1,
node2,
port2)
Delete a connection between port1 (output) and port2 (input).
|
|
toggleSelection(self,
nodes,
undo=1)
|
|
clearSelection(self,
undo=1)
|
|
clearSelectedNodes(self,
undo=1)
|
|
selectNodes(self,
nodes,
undo=1)
|
|
deselectNodes(self,
nodes,
undo=1)
|
|
clearSelectedConnections(self,
undo=1)
|
|
selectConnections(self,
connections,
undo=1)
|
|
deselectConnections(self,
connections,
undo=1)
|
|
arrowKeys_cb(self,
dx,
dy,
event=None)
move subgraph of selected nodes when arrow keys are pressed
|
|
moveSubGraph(self,
nodes,
dx,
dy,
absolute=False,
tagModified=True,
undo=1)
None <- moveSubGraph(nodes, dx, dy, absolute=False, undo=1)
update the nodes' coordinates and move node's icon, also update
connections If absolute is set to False (default), the graph moves by
dx,dy, else it move TO dx, dy All nodes have an attribute hasMoved
which will be set to True.
|
|
waitForCompletion(self)
|
|
stop(self)
set execStatus to 'stop'.
|
|
start(self)
set execStatus to 'pending'.
|
|
pause(self)
set execStatus to 'pause'.
|
|
togglePause(self,
event=None)
toggles execStatus between 'pause' and resume
|
|
resume(self)
set execStatus to 'running'.
|
|
getExecStatus(self)
|
|
checkExecStatus(self)
|
|
tagSubtree(self,
node,
val)
|
|
widthFirstChildren(self,
nodeIndex,
allNodes)
build a list of nodes corresponding to a width first traversal of
the network starting from the nodes specified in allNodes.
|
|
getAllNodes(self,
roots)
build a list of all the nodes under roots in the order they will
be executed
|
|
endOfRun(self,
net)
function called after an execution ends
|
|
run(self,
roots=None)
schedule the subtree of nodes under roots for execution in a
separate thread.
|
|
subRun(self,
roots=None)
|
|
runNodes(self,
allNodes,
resetList=True)
run the list of nodes in the same thread as the caller
|
|
resetWidgetValues(self)
Reset all widgets in the current network to the initialValue as
defined in node.widgetDescr.
|
|
createUserPanel(self,
name,
**kw)
|
|
deleteUserPanel(self,
name)
|
|
getSubRunNodes(self,
roots=None)
|
|
Inherited from mglutil.gui.Misc.Tk.KeybdModMonitor.KeyboardModifierMonitor:
getModifier,
isAlt,
isControl,
isShift,
modifierDown,
modifierUp
Inherited from itemBase.NetworkItemsBase:
delEditor,
getEditor,
setEditor
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|