From: zrinka Date: Fri, 2 Dec 2005 10:39:03 +0000 (+0000) Subject: source documentation for canvas.tcl X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=2aeea8304fc39c5e832599286996ba13c47cd7d7;p=imunes.git source documentation for canvas.tcl Bug found by: Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- diff --git a/canvas.tcl b/canvas.tcl index 1c36fdd..aa27a54 100755 --- a/canvas.tcl +++ b/canvas.tcl @@ -30,6 +30,29 @@ # 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 @@ -40,6 +63,20 @@ proc removeCanvas { 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 @@ -57,6 +94,18 @@ proc newCanvas { name } { 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 @@ -65,6 +114,17 @@ proc getCanvasName { 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