char TclSrc[] = "proc doStart { } {\n" \ "global run\n" \ "set run true\n" \ "}\n" \ "proc doStop { } {\n" \ "global run\n" \ "set run false\n" \ "}\n" \ "set tcl_prompt1 { }\n" \ "proc setup { } {\n" \ "global c\n" \ "set t .\n" \ "wm title $t \"Main3\"\n" \ "wm iconname $t \"graph\"\n" \ "set w \"\"\n" \ "label $w.msg -justify left -text \"This is the generic backfit tcl/tk code\"\n" \ "pack $w.msg -side top\n" \ "frame $w.frame\n" \ "pack $w.frame -side top -fill both -expand yes\n" \ "pad $w.pad -background black -width 600 -height 500\n" \ "pack $w.pad -side top -expand yes -fill both -pady 2m\n" \ "frame $w.buttons\n" \ "pack $w.buttons -side bottom -expand y -fill x -pady 2m\n" \ "button $w.buttons.quit -text Quit -command \"destroy $t\"\n" \ "button $w.buttons.debug -text Debug -command \"wm deiconify .dbInteract\"\n" \ "button $w.buttons.start -text \"Start\" -command \"doStart\"\n" \ "button $w.buttons.stop -text \"Stop\" -command \"doStop\"\n" \ "button $w.buttons.step -text \"Step\" -command \"loopStep\"\n" \ "pack $w.buttons.quit $w.buttons.debug $w.buttons.start \\\n" \ "$w.buttons.stop $w.buttons.step \\\n" \ "-side left -expand 1 \n" \ "bind $t \"destroy $t\"\n" \ "tkwait visibility $t\n" \ "update idletasks\n" \ "path2pointer $w.pad\n" \ "}\n" \ "set loopCount 1\n" \ "proc mainloop { } {\n" \ "global run c loopCount\n" \ "if { $run == \"true\" } {\n" \ "loopStep\n" \ "incr loopCount\n" \ "update idletasks\n" \ "after idle mainloop\n" \ "} else {\n" \ "after 1000 mainloop\n" \ "}\n" \ "}\n" \ "set dbInteractBold \"-background #43ce80 -relief raised -borderwidth 1\"\n" \ "set dbInteractNormal \"-background #c0c0c0 -relief flat\"\n" \ "set dbInteractTagcount 1;\n" \ "proc dbInteract {} {\n" \ "proc dodb {s w} {\n" \ "global dbInteractBold dbInteractNormal dbInteractTagcount;\n" \ "set tag [append tagnum $dbInteractTagcount];\n" \ "incr dbInteractTagcount 1;\n" \ ".dbInteract.text configure -state normal\n" \ ".dbInteract.text insert end $s $tag\n" \ "eval .dbInteract.text tag configure $tag $dbInteractNormal\n" \ ".dbInteract.text tag bind $tag \\\n" \ "\".dbInteract.text tag configure $tag $dbInteractBold\"\n" \ ".dbInteract.text tag bind $tag \\\n" \ "\".dbInteract.text tag configure $tag $dbInteractNormal\"\n" \ ".dbInteract.text tag bind $tag <1> \"dodb [list $s] .dbInteract\";\n" \ ".dbInteract.text insert end \\n; \n" \ ".dbInteract.text insert end [uplevel 1 $s]; \n" \ ".dbInteract.text insert end \\n\\n; \n" \ ".dbInteract.text configure -state disabled\n" \ ".dbInteract.text yview end\n" \ "}\n" \ "catch {destroy .dbInteract}\n" \ "toplevel .dbInteract\n" \ "wm title .dbInteract \"debug Interactor\"\n" \ "wm iconname .dbInteract \"debug\"\n" \ "frame .dbInteract.buttons\n" \ "pack .dbInteract.buttons -side bottom -fill x -pady 2m\n" \ "button .dbInteract.buttons.dismiss -text Dismiss \\\n" \ "-command \"wm withdraw .dbInteract\"\n" \ "pack .dbInteract.buttons.dismiss -side left -expand 1\n" \ "frame .dbInteract.file\n" \ "label .dbInteract.file.label -text \"Command:\" -width 10 -anchor w\n" \ "entry .dbInteract.file.entry -width 40 \n" \ "bind .dbInteract.file.entry {\n" \ "dodb [%W get] .dbInteract; %W delete 0 end}\n" \ "pack .dbInteract.file.label -side left\n" \ "pack .dbInteract.file.entry -side left -expand 1 -fill x\n" \ "text .dbInteract.text -yscrollcommand \".dbInteract.scroll set\" \\\n" \ "-setgrid true -width 60 -height 8 -wrap word\n" \ "scrollbar .dbInteract.scroll -command \".dbInteract.text yview\"\n" \ "pack .dbInteract.scroll -side right -fill y\n" \ "pack .dbInteract.text -side bottom -expand 1 -fill both\n" \ "pack .dbInteract.file -pady 3m -padx 2m -side bottom -fill x \n" \ ".dbInteract.text configure -state disabled\n" \ "wm withdraw .dbInteract\n" \ "}\n" \ "dbInteract;\n" \ "set run true\n" \ "setup\n" \ "after idle mainloop\n" \ "";