# SUCH DAMAGE.
#
+#****h* imunes/canvas.tcl
+# NAME
+# canvas.tcl -- file used for manipultaion with canvases in IMUNES
+# FUNCTION
+# This module is used to define all the actions used for configuring
+# canvases in IMUNES. On each canvas a part of the simulation is presented
+# If there is no additional canvas defined, simulation is presented on the
+# defalut canvas.
+#
+#****
+
+#****f* nodecfg.tcl/removeCanvas
+# NAME
+# removeCanvas -- remove canvas
+# SYNOPSIS
+# removeCanvas $canvas_id
+# FUNCTION
+# Removes the canvas from simulation. This function does not change the
+# configuration of the nodes, i.e. nodes attached to the removed canvas
+# remain attached to the same non existing canvas.
+# INPUTS
+# * canvas_id -- canvas id
+#****
proc removeCanvas { canvas } {
global canvas_list $canvas
return
}
+#****f* nodecfg.tcl/newCanvas
+# NAME
+# newCanvas -- craete new canvas
+# SYNOPSIS
+# set canvas_id [newCanvas $canvas_name]
+# FUNCTION
+# Creates new canvas. Returns the canvas_id of the new canvas.
+# If the canvas_name parameter is empty, the name of the new canvas
+# is set to CanvasN, where N represents the canvas_id of the new canvas.
+# INPUTS
+# * canvas_name -- canvas name
+# RESULT
+# * canvas_id -- canvas id
+#****
proc newCanvas { name } {
global canvas_list
return $canvas
}
+#****f* nodecfg.tcl/getCanvasName
+# NAME
+# getCanvasName -- get canvas name
+# SYNOPSIS
+# set canvas_name [getCanvasName $canvas_id]
+# FUNCTION
+# Returns the name of the canvas.
+# INPUTS
+# * canvas_id -- canvas id
+# RESULT
+# * canvas_name -- canvas name
+#****
proc getCanvasName { canvas } {
global $canvas
return [string trim $entry \{\}]
}
+#****f* nodecfg.tcl/setCanvasName
+# NAME
+# setCanvasName -- set canvas name
+# SYNOPSIS
+# setCanvasName $canvas_id $canvas_name
+# FUNCTION
+# Sets the name of the canvas.
+# INPUTS
+# * canvas_id -- canvas id
+# * canvas_name -- canvas name
+#****
proc setCanvasName { canvas name } {
global $canvas