drawing
TCL/TK UseCase3
Abstract : Used by both the Tcl code and the PP Group's C++ code to
           create objects and display them.
Comments : The names of the calls in here are the exact ones called in the
           C++. First the object structure is created, then it is displayed.
#All this procs basically do the same thing. Each creates the data 
#structure (either vertex or edge) and sets the variables for that structure.
#Then the proc will call createEdge or createVertex to place the egde or 
#vertex on the canvas.  These function calls are also the onces called by
#the C++ Propagation Pattern Group to give them display control.
#Construction vertex.
proc tclCVert { lbl coords {lblCoords {0 -20}} } {
    newVertex $lbl Constr $lbl $lblCoords $coords
    createVertex $lbl
}
#Alternation vertex.
proc tclAVert { lbl coords {lblCoords {0 -20}} } {
    newVertex $lbl Alter $lbl $lblCoords $coords
    createVertex $lbl
}
#Construction edge.
proc tclCEdge { lbl srcVert dstVert {lblCoords {0 -10}} {nodes {}} } {
    newEdge $lbl Constr $srcVert $dstVert $lblCoords $nodes
    createEdge $lbl
}
#Alternation edge.
proc tclAEdge { srcVert dstVert {nodes {}} } {
    newEdge $srcVert-none-$dstVert Alter $srcVert $dstVert {} $nodes
    createEdge $srcVert-none-$dstVert
}
#This proc moves a vertex label.
#Propagation Patterns do not use this function.
proc tclCMoveLabelTo { name coords } {
    moveVertexLabel $name $coords
}
 
 
 
 
 
 
 
 
