#!/usr/local/bin/wish8.2
#
#         Copyright  1997 Advanced Integrators, LC
#  All Rights Reserved - See the ``showabout'' function below
#  for limited release of these rights, or run the application
#  and invoke Help->About to render that copyright notice to
#  the window.
#
#   The TclTk and PerlTk documentation often SUCKS - this application
#  runs under wish (tested with v4.1 and 4.2 - tcl v 7.5/7.6) and
#  and with tcl7.6jp and wish4.2jp.  It is a simple database and
#  compendium and DEMONSTRATOR for Tk  While it doesn't generate the
#  resulting code, it does demo some of it.
#
#  
#
set version 1.01
set verdate {3 Aug 1997}
set verauth {Bruce Gingery}

set tclColor Blue

#
# First, let's create our appicon ...
# We'll be using our base WISH ``.'' window
set TkRef {
#define noname_width 32
#define noname_height 32
static char noname_bits[] = {
 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x7b,0x00,0x60,0x1c,0x73,
 0x00,0x20,0x1c,0x73,0x00,0x00,0x1c,0x70,0x00,0x00,0x0c,0x30,0x0e,0x00,0x0e,
 0x30,0x0e,0x00,0x0e,0x38,0x07,0x00,0x0e,0xb8,0x03,0x00,0x0e,0xf8,0x00,0x00,
 0x06,0xd8,0x01,0x00,0x07,0x98,0x01,0x00,0x07,0x9c,0x03,0x00,0x07,0x1c,0x07,
 0xc0,0x0f,0x1c,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0xc0,0x03,0x18,0x03,0x60,0x02,0x18,0x03,
 0x60,0x00,0x18,0xc3,0xf1,0x01,0x98,0x21,0x62,0x00,0xf8,0x30,0x66,0x00,0xd8,
 0xf1,0x67,0x00,0x98,0x33,0x60,0x00,0x18,0x67,0x60,0x00,0x3c,0xce,0xf7,0x00,
 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

}

#  If this weren't such an oddity, we'd put it in the setMainWin proc

#  We should modify this for a scratch area for Windows3.x and Mac!
#  But the icon seems to work directly in Win95 Tk4.2/Tcl7.6
#  So probably also on Mac.  We probably should be smaller for the
#  Windows95 start-bar, but what the heck  can't please everybody.
if [catch {wm iconbitmap . [image create bitmap -data $TkRef -foreground LightCyan -background Black]}] {
  if [string match unix $tcl_platform(platform)] {
    set iconfile [file join /tmp TkRefIcon.xbm]
  } elseif [string match windows $tcl_platform(platform)] {
    set iconfile [file join C: /windows temp TkRefIco.xbm]
  }
  if [info exists iconfile] {
    if ![file exists $iconfile] {
      set fh [open $iconfile w]
      if [info exists fh] {
        puts -nonewline $fh $TkRef
        close $fh
        catch {wm iconbitmap . @$iconfile}
      }
    } else {
      catch {wm iconbitmap . @$iconfile}
    }
  }
}
#  Create Bitmap is broken in v4.x wish for use as a program icon, at least
# on some platforms and versions... so we jump through hoops above if the
# direct method fails.
#
proc setMainWin {} {
  global tclColor
  wm withdraw .
  wm title . "Tcl/Tk Reference"
  wm iconname . TkRef
# wm iconbitmap . [image create ... done before this is called]

  set m .ctlmenu
  frame $m  -relief raised -bd   2 -width 200
  pack  $m  -side   top    -fill x
  set    m .ctlmenu.file.m
  menubutton .ctlmenu.file -text "File" -menu $m -underline 0 \
	-activebackground Yellow
  menu  $m -activebackground Yellow -tearoff 0
  $m add command -label "Print Code"    -underline 0 \
                 -command {} \
                 -state disabled
  $m add command -label "Print Setup ..." -underline 6 \
                 -command {} \
                 -state disabled
  $m add separator
  $m add command -label "Show Program Source" -underline 0 \
	-command {showsource} -state disabled
  $m add separator
  $m add command -label "Quit"          -underline 0 \
                 -command {destroy .} \
                 -accelerator <Alt+Q>
  bind . <Alt-q> {destroy .}

  set    m .ctlmenu.options.m
  menubutton .ctlmenu.options -text "Options" -menu $m -underline 0 \
	-activebackground Yellow
  menu  $m -activebackground Yellow
  $m add command -label "Not yet implemented" \
                 -command {} \
                 -state disabled

  set    m .ctlmenu.help.m
  menubutton .ctlmenu.help -text "Help" -menu $m -underline 0 \
	-activebackground Yellow
  menu  $m -activebackground Yellow -tearoff 0
  $m add command -label "About" -command {showabout}  -underline 0
  $m add command -label "Contextual Help" \
                 -command {} \
                 -state disabled
  $m add command -label "General Overview" -command {showoverview} \
	-underline 0
  $m add command -label "TkTcl References" \
                 -command {} \
                 -state disabled

  pack .ctlmenu.file .ctlmenu.options -side left
  pack .ctlmenu.help -side right

#  Okay, now we have a menu on our window building application...
#  Let's fill in the panel!
  set    w {}
  frame $w.b -borderwidth 2 -relief sunken
  pack  $w.b -side bottom -expand yes -fill both -anchor nw
  frame $w.b.l -borderwidth 0
  scrollbar $w.b.l.s -command "$w.b.l.l yview" -activebackground Yellow
  listbox $w.b.l.l -yscroll "$w.b.l.s set" -setgrid 1 -height 20 \
	-width 10 -selectmode single -relief sunken -borderwidth 2 \
	-background GhostWhite -foreground $tclColor \
	-selectbackground SpringGreen -selectforeground black
  pack $w.b.l.s $w.b.l.l -side left -fill y -anchor nw -expand yes
  scrollbar $w.b.s -command "$w.b.t yview" -activebackground Yellow
  text  $w.b.t -relief sunken -borderwidth 4 -relief sunken \
	-background GhostWhite -foreground black -exportselection yes \
	-font {-*-courier-bold-r-*-*-*-120-*-*-*-*-iso8859-1} \
	-setgrid yes -yscrollcommand "$w.b.s set" -height 20 -width 80 \
	-wrap word -spacing1 4 -spacing2 .8c -spacing3 .5c
  $w.b.t tag configure h1 -font {-*-courier-bold-r-*-*-*-160-*-*-*-*-iso8859-1} \
	-justify center
  $w.b.t tag configure i -font {-*-courier-medium-i-*-*-*-120-*-*-*-*-iso8859-1} \
	-spacing1 4 -spacing2 .8c -spacing3 .5c
  $w.b.t tag configure i1 -foreground navy -font \
	{-*-courier-medium-i-*-*-*-120-*-*-*-*-iso8859-1} \
	-spacing1 4 -spacing2 .8c -spacing3 .5c
  $w.b.t tag configure r1 -foreground navy -font \
	{-*-courier-bold-r-*-*-*-120-*-*-*-*-iso8859-1} \
	 -spacing1 4 -spacing2 .8c -spacing3 .5c
  pack $w.b.l -side left -fill y -anchor nw -expand yes
  pack $w.b.s -side right -fill y -expand yes -anchor nw
  pack $w.b.t -side left -fill both -expand yes -anchor nw
  bind $w.b.l.l <ButtonRelease-1> {
	.b.l.l selection set @%x,%y
	showCommand [.b.l.l get [.b.l.l index @%x,%y]] }
}
#  Now the nitty gritty of who-does-what-to-who in Widgets
#
# First, base tcl commands ...
#
set tclcmd(after)  {tcl {after ms} {after ms script-list} {after cancel id} {after cancel script-list} {after idle script-list} {after info id}}
set tclcmd(append) {tcl {append varName valuelist}}
set tclcmd(array)  {tcl {array anymore arrayName searchId} {array donesearch arrayName searchId} {array exists arrayName} {array get arrayName pattern} {array names arrayName pattern} {array nextelement arrayName searchId} {array set arrayName list} {array size arrayName} {array startsearch arrayName}}
set tclcmd(bell	   {tk  {bell -displayof window}}
set tclcmd(bgerror) {tcl {bgerror message}}
set tclcmd(bind)   {tk {bind tag} {bind tag sequence} {bind tag sequence script} {bind tag sequence +script}}
set tclcmd(bindtags) {tk {bindtags window tagList}}
set tclcmd(bitmap) {tk {image create bitmap imgName -background color -data string -file name -foreground color -maskdata string -maskfile name} {imgName cget option} {imgName configure option value}}
set tclcmd(button) {tk {button pathName -activebackground color -activeforeground color -anchor direction -background color -bitmap ? -borderwidth pixels -command script -cursor cursor -disabledforeground color -foreground color -font fontDesc -height size -hilightbackground color -hilightcolor color -hilightthickness size -image ? -justify style -padx pixels -pady pixels -relief rstyle -state state -takefocus bool -text string -textvariable varName -underline charPos -width size -wraplength wrapSpec} {pathName cget option} {pathName configure optList} {pathName flash} {pathName invoke}}
set tclcmd(canvas) {tk {canvas pathName -background color -borderwidth size -confine scrollRegion -closeenough fpoint -cursor cursor -height size -hilightbackground color -hilightthickness size -insertbackground color -insertborderwidth size -insertontime time -insertwidth size -relief rstyle -scrollregion coordlist -selectborderwidth size -selectforeground color -takefocus bool -width size -xscrollcommand script -xscrollincrement size -yscrollcommand script -yscrollincrement size} {pathName addtag tag searchSpec arglist} {pathName bbox tagOrId-list} {pathName bind tagOrId sequence command} {pathName canvasx screenx gridspacing} {pathName canvasy screeny gridspacing} {pathName cget option} {pathName configure option-value-list} {pathName coords tagOrId x0 y0 ...} {pathName create type x y ... option value ...} {pathName create arc x1 y1 x2 y2 -extent degrees -fill color -outline color  -outlinestipple bitmap -start degrees -stipple bitmap -style pieslice|chord -tags tagList -width outlineWidth} {pathName create bitmap x y -anchor direction -background color -bitmap bitmap -foreground color -tags tagList} {pathName create image x y -anchor direction -image name -tags tagList} {pathName create line x1 y1 ... xn yn -arrow where -arrowshape shape -capstyle butt|projecting|round -fill color -joinstyle bevel|miter|round -smooth bool -splinesteps number -stipple bitmap -tags tagList -width lineWidth} {pathName create oval x1 y1 x2 y2 -fill color -outline color -stipple bitmap -tags tagList -width outlineWidth} {pathName create polygon x1 y1 ... xn yn -fill color -outline color -smooth bool -splinesteps number -stipple bitmap -tags tagList -width outlineWidth} {pathName create rectangle x1 y1 x2 y2 -fill color -outline color -stipple bitmap -tags tagList -width outlineWidth} {pathName create text x y -anchor direction -fill color -font fontName -justify how -stipple bitmap -tags tagList -text string -width lineLength} {pathName create window x y -anchor direction -height pixels -tags tagList -width pixels -window pathName} {pathName dchars tagOrId first last} {pathName delete tagOrId first last} {pathName dtag  tagOrId tagToDelete} {pathName find searchCommand arglist} {pathName focus tagOrId} {pathName gettags tagOrId} {pathName icursor tagOrId index} {pathName index tagOrId index} {pathName insert tagOrId beforeThis string} {pathName itemcget tagOrId option} {pathName itemconfigure tagOrId option-value-list} {pathName lower tagOrId belowthis} {pathName move tagOrId xAmount yAmount} {pathName postscript option-value-list} {pathName raise tagOrId abovethis} {pathName scale tagOrId xOrigin yOrigin xScale yScale} {pathName scan mark x y} {pathName scan dragto x y} {pathName select adjust tagOrId index} {pathName select clear} {pathName select from tagOrId index} {pathName select item} {pathName select to tagOrId index} {pathName type tagOrId} {pathName xview} {pathName xview moveto fraction} {pathName xview scroll number what} {pathName yview} {pathName yview moveto fraction} {pathName yview scroll number what}}
set tclcmd(break)  {tcl {break}}
set tclcmd(case)   {tcl-defunct {case string in patList body ...}}
set tclcmd(catch)  {tcl {catch script varName}}
set tclcmd(cd)	   {tcl {cd dirname}}
set tclcmd(checkbutton) {tk {checkbutton pathName -activebackground color -activeForeground color -anchor direction -background color -bitmap ? -borderwidth size -command script -cursor cursor -disabledforeground color -font fontDesc -foreground color -height size -highlightbackground color -highlightcolor color -hilightthickness -size -image  ? -indicatoron bool -justify style -offvalue value -onvalue value -padx size -pady size -relief style -selectcolor color -selectimage image -state state -takefocus bool -text string -textvariable varName -variable varName -width size -wraplength size} {pathName cget option} {pathName configure option-value-list} {pathName deselect} {pathName flash} {pathName invoke} {pathName select} {pathName toggle}}
set tclcmd(chooseColor) {tk {tk_choosecolor -initialcolor color -parent window -title titleString}}
set tclcmd(clipboard) {tk {clipboard clear -displayof window} {clipboard append -displayof window -format format -type type -- data}}
set tclcmd(clock)  {tcl {clock clicks} {clock format value -format fmtstr -gmt bool} {clock scan dateStr -base clockVal -gmt bool} {clock seconds}}
set tclcmd(close)  {tcl {close c-hanId}}
set tclcmd(cmip)  {tix {cmip connect agent host} {cmip wait} {cmip info} {cmip get class instance -scope scope -atomic -filter filter -attributes attributes -callback callback} {cmip# set class instance attributes -scope scope -atomic -filter filter -callback callback -nonconfirmed} {cmip# action class instance action -scope scope -atomic -filter filter -callback callback -nonconfirmed} {cmip# create class -instance instance -superior superiorInst -reference referenceInst -attributes attributes -callback callback} {cmip# delete class instance -scope scope -atomic -filter filter -callback callback} {cmip# eventSink -callback callback} {cmip# requests} {cmip# wait} {cmip# release} {cmip# abort}}
set tclcmd(compound) {tk {image create compound -background color -borderwidth pixels -font font -foreground color -padx value -pady value -relief value -showbackground -window pathName} {imageName add line -anchor value -padx value -pady value} {imageName add bitmap -background color -bitmap name -foreground color} {imageName add image -image name} {imageName add space -width value -height value} {imageName add text -background color -font fontspec -foreground color -justify value -text string -underline position -wraplength value} {imageName cget option} {imageName configure option-value-list}}
set tclcmd(concat) {tcl {concat arglist}}
set tclcmd(continue) {tcl {continue}}
set tclcmd(destroy) {tk {destroy widgetlist}}
set tclcmd(dialog)  {tk {tk_dialog window title text bitmap default stringlist}}
set tclcmd(dns)     {tnm {dns -server server -timeout time -retries retries address host} {dns -server server -timeout time -retries retries name address} {dns -server server -timeout time -retries retries hinfo name} {dns -server server -timeout time -retries retries mx name} {dns -server server -timeout -time -retries retries soa name}}
set tclcmd(entry)    {tk {entry pathName -background color -borderwidth size -cursor cursor -exportselection bool -font fontSpec -foreground color -hilightbackground color -highlightcolor color -highlightthickness size -insertbackground color -insertborderwidth size -insertofftime time -insertontime time -insertwidth size -justify style -relief rstyle -selectbackground color -selectforeground color -show passechochar -state state -takefocus bool -xscrollcommand script -width size} {pathName bbox index} {pathName cget option} {pathName configure option-value-list} {pathName delete first last} {pathName get} {pathName icursor index} {pathName index index} {pathName insert index string} {pathName scan mark x} {pathName scan dragto x} {pathName selection adjust index} {pathName selection clear} {pathName selection from index} {pathName selection present} {pathName selection range start end} {pathName selection to index} {pathName xview} {pathName xview index} {pathName xview moveto fraction} {pathName xview scroll number what}}
set tclcmd(eof)	    {tcl {eof channId}}
set tclcmd(error)   {tcl {error message info code}}
set tclcmd(eval)    {tcl {eval arglist}}
set tclcmd(event)   {tk  {event add <<virtual>> sequence-list} {event delete <<virtual>> sequence-list} {event generate window event -above window -borderwidth size -button number -count number -detail detail -focus bool -height size -keycode number -keysym name -mode notifyMode -override bool -place where -root window -rootx coord -rooty coord -sendevent bool -serial number -state state -subwindow window -time integer -width size -when now|tail|head|mark  -x coord -y coord} {event info <<virtual>>}}
set tclcmd(exec)     {tcl {exec -keepnewline -- pipeline-list}}
set tclcmd(exit)     {tcl {exit returnCode}}
set tclcmd(expr)     {tcl {expr argAndOpList}}
set tclcmd(fblocked) {tcl {fblocked channId}}
set tclcmd(fconfigure) {tcl {fconfigure channId} {fconfigure channId -blocking|-buffering|-buffersize|-eofchar|-translation} {fconfigure channId -blocking bool --buffering full|line|none -buffersize size -eofchar "inChar outChar" -translation auto|binary|cr|crlf|lf}}
set tclcmd(file)     {tcl {file atime name} {file dirname name} {file executable name} {file exists name} {file extension name} {file isdirectory name} {file isfile name} {file join nameSegList} {file lstat name varName} {file mtime name} {file owned name} {file pathtype name} {file readable name} {file readlink name} {file rootname name} {file size name} {file split name} {file stat name varName} {file tail name} {file type name} {file writable name}}
set tclcmd(fileevent) {tcl {fileevent channId readable script} {fileevent channId writable script}}
set tclcmd(flush)     {tcl {flush channId}}
set tclcmd(focus)     {tk {focus} {focus window} {focus -displayof window} {focus -force window} {focus -lastfor window}}
set tclcmd(for)	      {tcl {for start test next bodyScript}}
set tclcmd(foreach)   {tcl {foreach varname list body} {foreach varList valList varList2 valList2 ...}}
set tclcmd(format)    {tcl {format formatString argList}}
set tclcmd(frame)     {tcl {frame pathName -background color -borderwidth size -colormap mapName|new -cursor cursor -height size -highlightbackground color -highlightcolor color -highlightthickness size -relief rstyle -takefocus bool -visual visValues -width size} {pathName cget option} {pathName configure option-value-list}}
set tclcmd(gdmo)      {tnm {gdmo load path} {gdmo info option} {gdmo class label exist} {gdmo class label superior} {gdmo class label mandatory} {gdmo class label conditional} {gdmo class label oid} {gdmo package label exist} {gdmo package label behaviours} {gdmo package label attributes} {gdmo package label groups} {gdmo package label actions} {gdmo package label notifications} {gdmo package label oid} {gdmo parameter label exist} {gdmo parameter label context} {gdmo parameter label choice} {gdmo parameter label behaviours} {gdmo parameter label oid} {gdmo namebinding label exist} {gdmo namebinding label subordinate} {gdmo namebinding label superior} {gdmo namebinding label attribute} {gdmo namebinding label behaviours} {gdmo namebinding label create} {gdmo namebinding label delete} {gdmo namebinding label oid} {gdmo attribute label exist} {gdmo attribute label choice} {gdmo attribute label matchesfor} {gdmo attribute label behaviours} {gdmo attribute label parameters} {gdmo attribute label oid} {gdmo group label exist} {gdmo group label attributes} {gdmo group label fixed} {gdmo group label description} {gdmo group label oid} {gdmo action label exist} {gdmo action label behaviours} {gdmo action label mode} {gdmo action label parameters} {gdmo action label infosyntax} {gdmo action label replysyntax} {gdmo action label oid} {gdmo notification label exist} {gdmo notification label behaviours} {gdmo notification label parameters} {gdmo notification label infosyntaxandids} {gdmo notification label replysyntax} {gdmo notification label oid} {gdmo behaviour label exist} {gdmo behaviour label definition}}
set tclcmd(getOpenFile) {tk {tk_getOpenFile -defaultextension extension -filetypes filePatternList -initialdir directory -initialfile directory -parent window -title titleString}}
set tclcmd(getSaveFile) {tk {tk_getSaveFile -defaultextension extension -filetypes filePatternList -initialdir directory -initialfile directory -parent window -title titleString}}
set tclcmd(gets)	{tcl {gets channId varName}}
set tclcmd(glob)	{tcl {glob -nocomplain -- patternList}}
set tclcmd(global)	{tcl {global varList}}
set tclcmd(grab)	{tk {grab -global window} {grab current window} {grab release window} {grab set -global window} {grab status window}}
set tclcmd(grid)	{tk {grid bbox master columnRowList} {grid columnconfigure master index -minsize size -weight weight -pad pad} {grid configure slaveList -column n columnspan n -in other -ipadx amount -ipady amount -padx amount -pady amount -row n -rowspan n -sticky direction} {grid forget slaveList} {grid info slave} {grid location master x y} {grid propagate master bool} {grid rowconfigure master index -minsize size -weight weight -pad amount} {grid remove slaveList} {grid size master} {grid slaves master} {grid slaves master -row value} {grid slaves master -column value}}
set tclcmd(history)	{tcl {history add command exec} {history change newValue event} {history info count} {history keep count} {history nextid} {history redo event} {history substitute old new event} {history words selector event}}
set tclcmd(http)	{tnm {http proxy url} {http head url} {http get url fileName} {http post url docFileName fileName} {http put url docFileName} {http delete url} {http server port} {http mime type extension} {http bind pattern method script}}
set tclcmd(icmp)	{tnm {icmp -timeout time -retries number -delay time -size number echo hosts} {icmp -timeout time -retries number -delay time -size number mask hosts} {icmp -timeout time -retries number -delay time -size number timestamp hosts} {icmp -timeout time -retries number -delay time -size number ttl num hosts} {icmp -timeout time -retries number -delay time -size number trace num hosts}}
set tclcmd(if)		{tcl {if expr1 then body1 elseif expr2 then body2 ... else bodyn }}
set tclcmd(image)	{tk {see-bitmap/composite/photo...} {image delete nameList} {image height name} {image type name} {image types} {image width name}}
set tclcmd(incr)	{tcl {incr varName increment}}
set tclcmd(ined)	{tnm {ined create NODE} {ined create NETWORK x1 y1 ...} {ined create LINK id1 id2 x1 y1 ...} {ined create GROUP ida idb ...} {ined create TEXT string} {ined create IMAGE filename} {ined create MENU name command1 command2 ...} {ined create INTERPRETER name} {ined create LOG} {ined create REFERENCE} {ined create STRIPCHART} {ined create BARCHART} {ined create GRAPH} {ined delete id} {ined type id} {ined id id} {ined name id string} {ined address id string} {ined oid id number} {ined attribute id attribute string} {ined select} {ined select id} {ined unselect id} {ined retrieve id} {ined icon id} {ined label id} {ined label id clear} {ined label id name} {ined label id address} {ined label id attribute} {ined font id fontDesc} {ined color id color} {ined flash id seconds} {ined move id x y} {ined size id} {ined text id text} {ined links id} {ined parent id} {ined members id list} {ined collapse id} {ined expand id} {ined collapsed id} {ined clear id} {ined append id text} {ined hyperlink id cmd text} {ined send id cmd} {ined values id number ...} {ined scale id value} {ined jump id number} {ined dump id} {ined acknowledge lineList} {ined confirm linelist buttonlist} {ined fileselect title directory file} {ined list title list buttonlist} {ined browse title text} {ined request title requestlist buttonlist} {ined size} {ined page size orientation} {ined trace callback} {ined restart command} {ined trace callback} {ined restart command}}
set tclcmd(info)	{tcl {info args procname} {info body procname} {info cmdcount} {info commands pattern} {info complete command} {info default procname arg varname} {info exists varName} {info globals pattern} {info hostname} {info level number} {info library} {info loaded} {info locals pattern} {info nameofexecutable} {info patchlevel} {info procs pattern} {info script} {info sharedlibextension} {info tclversion} {info vars pattern}}
set tclcmd(interp)	{tcl {interp alias srcPath srcCmd} {interp alias srcPath srcCmd {}} {interp alias srcPath srcCmd targetPath targetCmd arglist} {interp aliases path} {interp create -safe -- path} {interp delete path} {interp eval path arglist} {interp exists path} {interp issafe path} {interp share srcPath channId destPath} {interp slaves path} {interp target path alias} {interp transfer srcPath channId destPath} {slaveName aliases} {slaveName alias srcCmd} {slaveName alias srcCmd targetCmd arglist} {slaveName eval arglist} {slaveName issafe}}
set tclcmd(job)		{tnm {job create -command command -interval time -iterations number -status state -time time} {job current} {job info} {job schedule} {job wait} {job# attribute name value} {job# cget -command|-interval|0iterations|status|time} {job# configure -command command -interval time -iterations number -status state -time time} {job# destroy} {job# wait}}
set tclcmd(join)	 {tcl {join list joinStringVal}}
set tclcmd(label)	 {tk {label pathName -anchor direction -background color -bitmap bitmap -borderwidth size -cursor cursor -font fontDesc -foreground color -height size -highlightbackground color -highlightcolor color -highlightthickness size -image ? -justify style -padx pixels -pady pixels -relief rstyle -takefocus bool -text string -textvariable varName -width size -wraplength spec} {pathName cget option} {pathName configure option-value-list}}
set tclcmd(library)	{tcl {auto_execok cmd} {auto_load cmd} {auto_mkindex dir patternlist} {auto_reset} {parray arrayName}}
set tclcmd(lindex)	{tcl {lindex list index}}
set tclcmd(linsert)	{tcl {linsert list index elementList}}
set tclcmd(list)	{tcl {list arglist}}
set tclcmd(listbox)	{tk {listbox pathName -background color -borderwidth size -cursor cursor -exportselection bool -font fontDesc -foreground color -height size -highlightbackground color -highlightcolor color -highlightthickness size -relief rstyle -selectborderwidth size -selectforeground color -selectmode single|browse|multiple|extended -setgrid size -takefocus bool -width size -xscrollcommand script -yscrollcommand script} {pathName activate index} {pathName bbox index} {pathName cget option} {pathName configure option-value-list} {pathName curselection} {pathName delete first last} {pathName get first last} {pathName index index} {pathName insert index elementList} {pathName nearest y} {pathname scan mark x y} {pathName dragto x y} {pathName see index} {pathName selection anchor index} {pathName selection clear first last} {pathName selection includes index} {pathName selection set first last} {pathName size} {pathName xview} {pathName xview index} {pathName xview moveto fraction} {pathName xview xview scroll number what} {pathName yview} {pathName yview index} {pathName yview moveto fraction} {pathName yview scroll number what}}
set tclcmd(llength)	{tcl {llength list}}
set tclcmd(load)	{tcl {load fileName} {load fileName packageName} {load fileName packageName interp}}
set tclcmd(lower)	{tk {lower window belowThis}}
set tclcmd(lrange)	{tcl {lrange list first last}}
set tclcmd(lreplace)	{tcl {lreplace list first last elementList}}
set tclcmd(lsearch)	{tcl {lsearch -exact|-glob|-regexp list pattern}}
set tclcmd(lsort)	{tcl {lsort -ascii|-integer|-real -command compCommand -increasing|-decreasing list}}
set tclcmd(menu)	{tk {menu pathName -activebackground color -activeborderwidth size -activeforeground color -background color -borderwidth size -cursor cursor -disabledforeground color -font fontSpec -foreground color -relief rstyle -postcommand script -selectcolor color -tearoff bool -transient bool} {pathName activate index} {pathName add cascade -activebackground color -activeforeground color -accelerator value -background color -bitmap value -command script -font fontDefn -foreground color -image value -label text -menu submenu -selectcolor value -selectimage value -state state -underline position} {pathName add checkbutton -activebackground color -activeforeground color -accelerator value -background color -bitmap value -command script -font fontDefn -foreground color -image value -indicatoron bool -label text -offvalue value -onvalue value -selectcolor value -selectimage value -state state -variable varName -underline position} {pathName add command -activebackground color -activeforeground color -accelerator value -background color -bitmap value -command script -font fontDefn -foreground color -image value -indicatoron bool -label text -selectcolor color -selectimage value -state state -variable varName -underline position} {pathName add radiobutton -activebackground color -activeforeground color -accelerator value -background color -bitmap value -command script -font fontDefn -foreground color -image value -selectimage value -indicatoron bool -state state -selectcolor color -value value -variable varName -underline position} {pathName add separator} {pathName cget option} {pathName configure} {pathName configure option-value-list} {pathName delete index1 index2} {pathName entrycget index option} {pathName entryconfigure index} {pathName entryconfigure index option-value-list} {pathName index index} {pathName insert index type ... as in add} {pathName invoke index} {pathName post x y} {pathName postcascade index} {pathName type index} {pathName unpost} {pathName yposition index}}
set tclcmd(menubutton)   {tk {menubutton pathName -activebackground color -activeforeground color -anchor direction -background color -bitmap bitmap -borderwidth size -cursor cursor -disabledforeground color -font fontSpec -foreground color -height size -highlightbackground color -highlightcolor color -highlightthickness value -image image -indicatoron bool -justify style -menu menuName -padx value -pady value -relief rstyle -state state -takefocus bool -text string -textvariable varName -underline charPos -width size -wraplength value} {pathName cget option} {pathName configure option-value-list}}
set tclcmd(message)	{tk {message pathName -anchor direction -aspect ratio -background color -borderwidth size -cursor cursor -font fontSpec -foreground color -highlightbackground color -hilightcolor color -highlightthickness size -justify style -padx size -pady size -relief rstyle -takefocus bool -text string -textvariable varName -width size} {pathName cget option} {pathName configure option-value-list}}
set tclcmd(messageBox)  {tk {tk_messageBox -default name -icon image -message string -parent window -title string -type abortretryignore|ok|okcancel|retrycancel|yesno|yesnocancel}}
set tclcmd(mib)		{tnm {mib load file} {mib -exact name label} {mib -exact oid label} {mib -exact module label} {mib -exact macro label} {mib -exact syntax label} {mib -exact description label} {mib -exact successor label} {mib -exact parent label} {mib -exact access label} {mib -exact index label} {mib -exact tc label} {mib -exact filelabel} {mib format label value} {mib scan label value} {mib walk varName label body}}
set tclcmd(midiconfig)  {tclmidi {midiconfig mfileId format value division value tracks value}}
set tclcmd(midicopy)	{tclmidi {midicopy destMidiId destTrack destStartTime srcMidiId srcTrack srcStartTime srcEndTime}}
set tclcmd(mididelete) 	{tclmidi {mididelete MidiID track event} {mididelete MidiID track file ... ``range'' start end}}
set tclcmd(mididevice)  {tclmidi {mididevice name value midithru value}}
set tclcmd(midiefree)	{tclmidi {midifree MidiID}}
set tclcmd(midiget)	{tclmidi {midiget MidiID track index}}
set tclcmd(midimake}	{tclmidi {midimake}}
set tclcmd(midimerge)	{tclmidi {midimerge destMidiID destTrack srcMidiID srcTrack ...}}
set tclcmd(midimove)	{tclmidi {midimove destMidiID destTrack destStartTime srcMidiID srcTrack srcStartTime srcEndTime}}
set tclcmd(midiplay)	{tclmidi {midiplay MidiID repeat}}
set tclcmd(midiput)	{tclmidi {midiput MidiID track event}}
set tclcmd(midiread)	{tclmidi {midiread channId}}
set tclcmd(midirecord)	{tclmidi {midirecord RecMidiID PlayMidiID repeat}}
set tclcmd(midirewind)  {tclmidi {midirewind channId track}}
set tclcmd(midisplit)	{tclmidi {midisplit srcMidiId srcTrack metaMidiId metaTrack otherMidiId otherTrack}}
set tclcmd(midistop)	{tclmidi {midistop}}
set tclcmd(miditrack)	{tclmidi {miditrack channId track start|end}}
set tclcmd(midiversion)	{tclmidi {midiversion}}
set tclcmd(midiwait}	{tclmidi {midiwait}}
set tclcmd(midiwrite}	{tclmidi {midiwrite channId MidiID}}
set tclcmd(msqltcl)	{msql {msqlconnect hostname} {msqluse handle dbname} {msqlsel handle sqlCmd} {msqlexec handle sqlCmd} {msqlnext handle} {msqlmap handle bindList script} {msqlseek handle rowIndex}	{msqlcol handle tableName name} {msqlcol handle tableName type} {msqlcol handle tableName length} {msqlcol handle tableName non_null} {msqlcol handle tableName prim_key} {msqlinfo handle databases} {msqlinfo handle dbname} {msqlinfo handle dbname?} {msqlinfo handle host} {msqlinfo handle tables} {msqlresult handle cols} {msqlresult handle cols?} {msqlresult handle current} {msqlresult handle current?} {msqlresult handle rows} {msqlmstate numeric handle} {msqlclose handle}}
set tclcmd(netdb)	{tnm {netdb hosts} {netdb hosts name address} {netdb hosts address name} {netdb networks} {netdb networks name address} {netdb networks address name} {netdb protocols} {netdb protocols name number} {netdb protocols number name} {netdb services} {netdb services name number protocol} {netdb services number name protocol} {netdb sunrpcs} {netdb sunrpcs name number} {netdb sunrpcs number name} {netdb ip class address} {netdb ip range addres mask}}
set tclcmd(ntp)		{tnm {ntp -timeout time -retries number host arrayName}}
set tclcmd(open)	{tcl {open fileName} {open filename r|r+|w|w+|a|a+} {open filename RDONLY|WRONLY|RDWR APPEND|CREAT EXCL NOCTTY NONBLOCK TRUNC}	 {open filename r|r+|w|w+|a|a+ permMask}}
set tclcmd(option)	{tk {option add pattern value widgetDefault|startupFile|userDefault|interactive|numericPriority} {option clear} {option get window name class} {option readfile fileName priority}}
set tclcmd(optionMenu)	{tk {tk_optionMenu w varName valuelist}}
set tclcmd(pack)	{tk {pack after sibling window winopts - obsolete!} {pack append parent window options winwopts - obsolete!} {pack before parent sibling window options winopts - obsolete!} {pack unpack window - obsolete!} {pack configure slavelist -after other -anchor anchor -before other -expand bool -fill none|x|y|both -in other -ipadx amount -ipady amount -padx amount -pady amount -side left|right|top|bottom} {pack forget slavelist} {pack info slave} {pack propagate master bool} {pack slaves master}}
set tclcmd(package)	{tcl {package forget package} {package ifneeded package version script} {package names} {package provide package version} {package require -exact package version} {package unknown command} {package vcompare version1 version2} {package versions package} {package vsatisfies version1 version2}}
set tclcmd(palette)	{tk {tk_setPalette background} {tk_setPalette name-value-list} {tk_bisque - obsolete!}}
set tclcmd(pgtcl)	{postgresql {pg_connect dbName -host hostName -port port pgtty -option backendArglist} {pg_disconnect pgConn} {pg_exec pgConn sqlcmd} {pg_result resultId -status} {pg_result resultId -oid} {pg_result resultId -assign arrayName} {pg_result resultId -numTuples} {pg_result resultId -attributes} {pg_result resultId -getTuple tupleNum} {pg_result resultId -clear} {pg_lo_create pgConn objOid mode} {pg_lo_open pgConn objOid mode} {pg_lo_close pgConn backendFid} {pg_lo_read pgConn backendFid bufVar len} {pg_lo_write pgConn backendFid buf len} {pg_lo_lseek pgConn backendFid offset whence} {pg_lo_tell pgConn backendFid} {pg_lo_unlink pgConn lobjId} {pg_lo_import pgConn filename} {pg_lo_export pgConn lobjId filename}}
set tclcmd(photo)	{tk {image create photo imgName -data string -format data|file -file name -gamma value -height number -palette paletteSpec -width number} {imgName cget option} {imgName configure option-value-list} {imgName copy sourceImage -from x1 y1 x2 y2 -to x1 y1 x2 y2 -shrink -zoom x y -subsample x y} {imgName get x y} {imgName put data -to x1 y1 x2 y2} {imgName read filename -format formatName -from x1 y1 x2 y2 -shrink -to x y}	 {imgName redither} {imgName write filename -format formatName -from x1 y1 x2 y2}}
set tclcmd(pid)		{tcl {pid fileId}}
set tclcmd(pixmap)	{tix {image create pixmap imgName -data string -file name} {imgName cget option} {imgName configure} {imgName configure option-value-list}}
set tclcmd(pkg_mkIndex)	{tcl {pkg_mkIndex dir pattern-list}}
set tclcmd(place)	{tk {place window -in master -x location -relx location -y location -rely location -nachor where -width size -relwidth size -height size -relheight size -bordermode mode} {place configure window option-value-list} {place forget window} {place info window} {place slaves window}}
set tclcmd(popup)	{tk {tk_popup menu x y entry}}
set tclcmd(proc)	{tcl {proc name args body}}
set tclcmd(puts)	{tcl {puts -nonewline chanId string}}
set tclcmd(pwd)		{tcl {pwd}}
set tclcmd(radiobutton)	{tk {radiobutton pathName -activebackground color -activeforeground color -anchor position -background color -bitmap bitmap -borderwidth size -command script -cursor cursor -disabledforeground color -font fontSpec -height size -highlightbackground color -highlightcolor color -highlightthickness size -image image -indicatoron bool -justify style -padx size -pady size -selectcolor color -selectimage image -state state -takefocus bool -text string -textvariable varName -underline position -value value -variable varName -width size -wraplength value} {pathName cget option} {pathName configure option-value-list} {pathName deselect} {pathName flash} {pathName invoke} {pathName select}}
set tclcmd(raise)	{tk {raise window aboveThis}}
set tclcmd(read)	{tcl {read -nonewline chanId} {read chanId numBytes}}
set tclcmd(regexp)	{tcl {regexp -nocase -indices -- expression string match-var-list}}
set tclcmd(regsub)	{tcl {regsub -all -nocase -- expression string subspec varname}}
set tclcmd(rename)	{tcl {rename oldName newName}}
set tclcmd(return)	{tcl {return -code ok|error|return|break|continue -errorinfo info -errorcode code string}}
set tclcmd(rpc)		{tnm {rpc server port} {rpc client host port} {rpc delete handle} {rpc register rpchandle proc} {rpc unregister rpchandle proc} {rpc info} {rpc info rpchandle} {rpc# -async proc arglist}}
set tclcmd(scale)	{tk {scale pathName -activeforeground color -background color -bigincrement value -borderwidth size -command command -cursor cursor -digits integer -font fontSpec -foreground color -from realNum -highlightbackground color -highlightcolor color -hilightthickness size -label string -length size -orient orentation -relief rstyle -repeatdelay value -resolution value -repeatinterval value -showvalue bool -sliderlength size -sliderrelief fstyle -state state -tickinterval realValue -to realValue -variable varName -width size} {pathName cget option} {pathName configure option-value-list} {pathName coords} {pathName coords} {pathName get} {pathName get x y} {pathName identify x y} {pathName set value}}
set tclcmd(scan)	{tcl {scan string format varList}}
set tclcmd(scrollbar)	{tk {scrollbar pathName -activebackground color -background color -borderwidth size -command command -cursor cursor -elementborderwidth size -highlightbackground color -highlightcolor color -highlightthickness size -jump value -orient orientation -relief rstyle -repeatdelay time -repeatinterval time -takefocus bool -troughcolor color -width size} {pathName activate arrow1|slider|arrow2} {pathName cget option} {pathName configure} {pathName configure option-value-list} {pathName delta deltaX deltaY} {pathName fraction x y} {pathName get} {pathName identify x y} {pathName set first last}}
set tclcmd(seek)	{tcl {seek channId offset start|current|end}}
set tclcmd(selection)	{tk {selection clear -displayof window -selection selection} {selection get -displayof window -selection selection -type STRING|ATOM|INTEGER|FILE_NAME} {selection handle -selection selection -type STRING|ATOM|INTEGER|FILE_NAME -format format window command} {selection own -displayof window -selection selection} {selection own -command command -selection selection window}}
set tclcmd(send)	{tk {send -async -displayof pathName -- app cmd arglist}}
set tclcmd(set)		{tcl {set varName} {set varName value}}
set tclcmd(snmp)	{tnm {snmp session option-value-list} {snmp alias} {snmp alias name} {snmp alias name options} {snmp info} {snmp watch toggle} {snmp wait} {snmp# configure} {snmp# configure option-value-list} {snmp# cget option} {snmp# wait} {snmp# wait request} {snmp# destroy} {snmp# get varbindlist} {snmp# get varbindlist script} {snmp# getnext varbindlist} {snmp# getnext varbindlist script} {snmp# getbulk nr mr varbindlist} {snmp# getbulk nr mr varbindlist script} {snmp# set varbindlist} {snmp# set varbindlist callback} {snmp# trap snmpTrapOid varbindlist} {snmp# inform snmpTrapOid varbindlist} {snmp# inform snmptrapOid varbindlist script} {snmp# bind {} send} {snmp# bind {} send script} {snmp# bind {} recv} {snmp# bind {} recv script} {snmp# bind {} trap} {snmp# bind {} trap script} {snmp# bind {} inform} {snmp# bind {} inform script} {snmp# bind {} report} {snmp# bind {} report script} {snmp# walk varName varbindlist body} {snmp# scalars scalarlist arrayName} {snmp# instance label varName} {snmp# instance label varName default} {snmp# bind label event} {snmp# bind label event script}}
set tclcmd(socket)	{tcl {socket -myaddr addr -myport port -async} {socket -server -myaddr addr}}
set tclcmd(source)	{tcl {source fileName} {source -rsrc resourceName} {source -rsrc resourceName fileName} {source -rsrcid resourceId} {source -rsrcid resourceId fileName}}
set tclcmd(split)	{tcl {split string splitchars}}
set tclcmd(string)	{tcl {string compare string1 string2} {string first pattstring searchstr} {string index string charIndex} {string last pattstring searchstr} {string length string} {string match pattern string} {string range string first last} {string tolower string} {string toupper string} {string trim string} {string trim string charlist} {string trimleft string} {string trimleft string charlist} {string trimright string} {string trimright string charlist} {string wordend string index} {string wordstart string index}}
set tclcmd(subst)	{tcl {subst -nobackslashes -nocommands -novariables string}}
set tclcmd(sunrpc)	{tnm {sunrpc info host} {sunrpc probe host probram version protocol} {sunrpc stat host} {sunrpc mount host} {sunrpc exports host} {sunrpc ether host open} {sunrpc ether host close} {sunrpc pcnfs host info} {sunrpc pcnfs host info arrayName} {sunrpc pcnfs host list} {sunrpc pcnfs host list arrayName} {sunrpc pcnfs host queue printer} {sunrpc pcnfs host queue printer arrayName} {sunrpc pcnfs host status printer arrayName}}
set tclcmd(switch)	{tcl {switch -exact|-regexp|-glob -- string pattern body} {switch -exact|-regexp|-glob -- pattern-body list}}
set tclcmd(syslog)	{tnm {syslog emergency|alert|critical|error|warning|notice|info|debug message}}
set tclcmd(tell)	{tcl {tell channId}}
set tclcmd(text)	{tk {text pathName -background color -borderwidth size -cursor cursor -exportselection bool -font fontSpec -foreground color -height size -highlightbackground color -highlightcolor color -highlightthickness size -insertborderwidth size -insertofftime time -insertontime time -insertwidth size -insertbackground color -padx size -pady size -relief rstyle -setgrid grid -spacing1 kernAbove -spacing2 kernBelow -state state -selectborderwidth size -selectforeground color -takefocus bool -tabs tabStopList -width size -wrap none|char|word -xscrollcommand command -yscrollcommand command} {pathName tag configure -background color -bgstipple bitmap -borderwidth pixels -fgstipple bitmap -font fontSpec -foreground color -justify justify -lmargin1 pixelIndent -lmargin2 pixelMargin -offset pixels -overstrike bool -relief rstyle -rmargin pixels -spacing1 pixels -spacing2 pixels -spacing3 pixels -tabs tabList -underline bool -wrap none|char|word} {pathName bbox index} {pathName cget option} {pathName compare index1 op index2} {pathName configure option-value-list} {pathName debug bool} {pathName delete index1} {pathName delete index1 index2} {pathname dlineinfo index} {pathName dump -all -command command -mark -tag -text -window index1} {pathName dump -all -command command -mark -tag -text -window index1 index2} {pathName get index1} {pathName get index1 index2} {pathName index index} {pathName insert index chars tagList} {pathName mark gravity markName direction} {pathName mark names} {pathName mark next index} {pathName mark previous index} {pathName mark set markName index} {pathName mark unset markNameList} {pathName scan mark x y} {pathName scan dragto x y} {pathName search -forwards|-backwards -exact|-regexp|-nocase -count varName -- pattern index} {pathName search -forwards|-backwards -exact|-regexp|-nocase -count varName -- pattern index1 index2} {pathName see index} {pathName tag add tagName index1} {pathName tag add tagName indexList} {pathName tag bind tagName sequence script} {pathName tag cget tagName option} {pathName tag configure tagName option-value-list} {pathName tag delete tagNameList} {pathName tag lower tagName} {pathName tag lower tagName belowThis} {pathName tag names} {pathName tag names index} {pathName tag nextrange tagName index1} {pathName tag nextrange tagName index1 index2} {pathName tag prevrange tagName index1} {pathName tag prevrange tagName index1 index2} {pathName tag raise tagName} {pathName tag raise tagName aboveThis} {pathName tag ranges tagName} {pathName tag remove tagName index1} {pathName tag remove tagName indexList} {pathName window cget index option} {pathName window configure index option-value-list} {pathName window create index option-value-list} {pathName window names} {pathName xview} {pathName xview moveto fraction} {pathName xview scroll number what} {pathName yview} {pathName yview moveto fraction} {pathName yview scroll number what} {pathName yview index} {pathName yview -pickplace place index} {pathName yview number}}
set tclcmd(time)	 {tcl {time script} {time script repeats}}
set tclcmd(tix)		 {tix {tix -binding obsolete -debug bool -fontset TK|12Point|14Point -scheme TK|GrayBlue|Bisque|SGIGray|TixGray -schemepriority} {tix addbitmapdir directory} {tix cget option} {tix configure option-value-list} {tix filedialog tixFileSelectDialog|tixExFileSelectDialog} {tix getbitmap name} {tix getimage name} {tix option optName-optValue-list} {tix resetoptions newScheme newFontSet newScmPriority}}
set tclcmd(tk)		 {tk {tk appname newname}}
set tclcmd(tk_chooseColor) {tk {tk_chooseColor -initialcolor color -parent window -title titleString}}
set tclcmd(tk_dialog)	{tk {tk_dialog winName title text bitmap default btn-string-list}}
set tclcmd(tk_focusNext) {tk {tk_focusNext window}}
set tclcmd(tk_focusPrev) {tk {tk_focusPrev window}}
set tclcmd(tk_focusFollowsMouse} {tk {tk_focusFollowsMouse}}
set tclcmd(tk_getOpenFile) {tk {tk_getOpenFile -defaultextension extension -filetypes filePatternList -initialdir directory -initialfile filename -parent window -title titleString}}
set tclcmd(tk_getSaveFile) {tk {tk_getOpenFile -defaultextension extension -filetypes filePatternList -initialdir directory -initialfile filename -parent window -title titleString}}
set tclcmd(tkwait) 	{tk {tkwait variable name} {tkwait visibility name} {tkwait window name}}
set tclcmd(toplevel)	{tk {toplevel pathName -background color -borderwidth size -class className -colormap cmap -cursor cursor -height size -highlightbackground color -highlightcolor color -highlightthickness size -relief rstyle -takeinfo bool -visual visualParams -width size} {pathName cget option} {pathName configure option-value-list}}
set tclcmd(trace)	{tcl {trace variable name r w u command} {trace vdelete name r w u command} {trace vinfo name}}
set tclcmd(udp)		{tnm {udp open} {udp open port} {udp connect host port} {udp send handle message} {udp send handle host port message} {udp receive handle} {udp close handle} {udp close handle} {udp bind handle readable} {udp bind handle readable script} {udp bind handle writable} {udp bind handle writable script} {udp info} {udp info handle}}
set tclcmd(unknown)	{tcl {unknown cmdName arglist}}
set tclcmd(unset)	{tcl {unset varNameList}}
set tclcmd(update}	{tcl {update} {update idletasks}}
set tclcmd(uplevel)	{tcl {uplevel #0 argList} {uplevel #level argList} {uplevel levelOffset argList}}
set tclcmd(upvar)	{tcl {upvar #0 glblName localName ...} {upvar levelDistance frameVarName-localVarName-list} {upvar #levelNum frameVarName-localVarName-list}}
set tclcmd(vwait)	{tcl {vwait} {vwait varName}}
set tclcmd(while)	{tcl {while test body}}
set tclcmd(winfo)	{tk {winfo atom -displayof window name} {winfo atomname -displayof window id} {winfo cells window} {winfo children window} {winfo class window} {winfo colormapfull window} {winfo containnig -displayof window rootX rootY} {winfo depth window} {winfo exists window} {winfo fpixels window number} {winfo geometry window} {winfo height window} {wionfo id window} {winfo interps -displayof window} {winfo ismapped window} {winfo manager window} {winfo name window} {winfo parent window} {winfo pathname -displayof window id} {winfo pixels window number} {winfo pointerx window} {winfo pointerxy window} {winfo pointery window} {winfo reqheight window} {winfo reqwidth window} {winfo rgb window color} {winfo rootx window} {winfo rooty window} {winfo screen window} {winfo screencells window} {winfo screendepth window} {winfo screenheight window} {winfo screenmheight window} {winfo screenmwidth window} {winfo screenvisual window} {winfo screenwidth window} {winfo server window} {winfo toplevel window} {winfo viewable window} {winfo visual window} {winfo visualid window} {winfo visualsavailable window} {winfo visualsavailable window includeIdList} {winfo vrootheight window} {winfo vrootwidth window} {winfo vrootx window} {winfo vrooty window} {winfo width window} {winfo x window} {winfo y window}}
set tclcmd(wm)		{tk {wm aspect window} {wm aspect window minUmer minDemom maxNumer maxDemom} {wm client window} {wm client window machName} {wm colormapwindows window} {wm colormapwindows window windowList} {wm command window} {wm command window command} {wm deiconify window} {wm focusmodel window} {wm focusmodel window active|passive} {wm frame window} {wm geometry window} {wm geometry window newGeometry} {wm grid window} {wm grid window baseWidth baseHeight widthInc heightInc} {wm group window} {wm group window pathName} {wm iconbitmap window} {wm iconbitmap window bitmap} {wm iconify window} {wm iconmask window} {wm iconmask window bitmap} {wm iconname window} {wm iconname window bitmap} {wm iconposition window} {wm iconposition window x y} {wm iconwindow window} {wm iconwindow window pathName} {wm maxsize window} {wm maxsize window width height} {wm minsize window} {wm minsize window width height} {wm overrideredirect window} {wm overrideredirect window bool} {wm positionfrom window} {wm positionfrom window who} {wm protocol window} {wm protocol window name command} {wm resizable window} {wm resizable window width height} {wm sizefrom window} {wm sizefrom window who} {wm state window} {wm title window} {wm title window string} {wm transient window} {wm transient window master} {wm withdraw window}}

set safetcl [list after append array break case catch clock close concat continue eof error eval expr fblocked fileevent flush for foreach format gets global history if incr info interp join lappend lindex linsert list llength lower lrange lreplace lsearch lsort package pid proc puts read rename return scan seek set split string subst switch tell trace unset update uplevel upvar vwait while]

set widgets [list bitmap button canvas checkbutton compound entry frame image label listbox menu menubutton message photo pixmap radiobutton scale scrollbar text toplevel]


proc showCommand {cmdname} {
  global tclcmd safetcl widgets 
  .b.t delete 1.0 end
  .b.t insert end " [lindex $tclcmd($cmdname) 0]   " h1
  if {[lsearch -exact $safetcl $cmdname] > -1} {
    .b.t insert end " Safe Tcl " h1
  }
  if {[lsearch -exact $widgets $cmdname] > -1} {
    .b.t insert end " Widget " h1
  }
  .b.t insert end "\n"
  set alwaysital {ms id script-list varName valuelist arrayName searchId pattern message sequence script +script window tagList option value tag searchSpec arglist gridspacing option-value-list string patList body dirname chanId channId pathName imageName imgName optList tagOrId index first last tagToDelete belowThis xAmount yAmount aboveThis dateStr cmip# widgetlist title text bitmap default stringlist slave master x y x1 y1 x2 y2 xn yn expr expr1 body1 body2 bodyn name command1 command2 srcPath srcCmd targetPath targetCmd path fileName packageName}
  foreach l [lrange $tclcmd($cmdname) 1 end] {
    set nextItal 0
    set w [lindex $l 0]
    if  {[lsearch -exact $alwaysital $w] > -1} {
        .b.t insert end "$w " i1
    } else {
        .b.t insert end "$w " r1
    }
    foreach w [lrange $l 1 end] {
      if {[lsearch -exact $alwaysital $w] > -1} {
        .b.t insert end "$w " i
      } elseif {[string first - $w] == 0} {
        set nextItal 1
        .b.t insert end "$w "
      } elseif {$nextItal == 1} {
        .b.t insert end "$w " i
        set nextItal 0
      } else {
        .b.t insert end "$w "
      }
    }
    .b.t insert end "\n"
  }
}

proc fillBrowser {} {
  global tclcmd
  foreach n [lsort [array names tclcmd]] {
   .b.l.l insert end $n
  }
}

proc showabout {} {
  global version verdate verauth
  .b.t delete 1.0 end
  .b.t tag configure h1 -foreground SpringGreen -background black \
	-font {-*-times-bold-r-*-*-*-180-*-*-*-*-iso8859-1} \
	-justify center -spacing1 0 -spacing2 0 -spacing3 0
  .b.t tag configure h3 -foreground SpringGreen -background black \
	-font {-*-times-bold-r-*-*-*-140-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0
  .b.t tag configure n -foreground ForestGreen -background GhostWhite \
	-font {-*-times-medium-r-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0
  .b.t tag configure i -foreground ForestGreen -background GhostWhite \
	-font {-*-times-medium-i-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0
  .b.t tag configure b -foreground ForestGreen -background GhostWhite \
	-font {-*-times-bold-r-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0
  .b.t tag configure bi -foreground ForestGreen -background GhostWhite \
	-font {-*-times-bold-i-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0
  .b.t insert end {     TkRef - Tcl/Tk and Associated Items     } h1
  .b.t insert end {

This is really a reference tool on Tcl (} n tickle i {) and the extensions usable in Tcl, including Tk, Tix, Expect, Tcl-midi, Tnm, and TkGoodstuff.  It is written totally in Tcl/Tk, and should be compatible with version Tk4.1/Tcl7.5 and forward.  

} n
  .b.t insert end "Version $version, written by $verauth $verdate

This work is Copyright  1997 by Advanced Integrators, LC, with all rights reserved except those explicitly licensed here:

" n

  .b.t insert end " Use of this application " h3 {

By using this application, you agree not to hold Advanced Integrators, LC, Bruce Gingery, or any other contributing author, or any other person, liable for either operational accuracy or accuracy of the information presented by this application.  The only guarantee is that if you keep it on a disk, it will take space on that disk under normal operation of your system.  If you cannot live with that, don't install the application, or de-install it, and throw it away.  Since this is a plain-text script, you have had every opportunity to examine it BEFORE ever executing it.

This is ``Conscience Ware''.  You are not } n required b { to pay anything to keep a copy of it or use it.  If you find either the design or content of this application useful, please remit the amount of USD $1.00 to:

        Advanced Integrators, LC
        PO Box 923
        Cheyenne, WY 82003-0923
        USA

or a greater amount, to show your appreciation.  Whether you are private individual, or enormous corporation, we ask that your contribution be related directly to the benefit received.  We also realize that for some people the benefit will be negligible, but for others, it will become a companion.

} n { Copying and Distribution } h3 {

This application may be distributed on a CD-ROM or other fixed or changable media for which a moderate duplication charge is made, provided that no less than USD $.10 (10 cents) per copy is remitted to the copyright holder at the above address.  It is our belief that this application adds a small value to such a work.  Producers or distributors of media for which a significant charge is made (over USD $50.00 retail) shall render the full requested USD $1.00 ``conscience-ware'' fee described above, and document that such fee has already been paid.

Distribution channels for which no charge is made, such as a public FTP site owe nothing for distribution.  This application may be E-Mailed, FTP'd or transferred over any public networked channel, and may be shared over private intranets as well, where no charge is made directly to the users for access.  It may be placed on Electronic Bulletin Board Systems or other on-line services where no extra charge is made for access to this program.

All distributions of this application MUST contain this copyright notice, unmodified.  Additionally, any ``README'' or ``DESCR'' or comparable download description file must specify that this copyright notice exists and can be read without running the application.

} n { Derivative Works } h3 {

You may derive a work from this script, or modify and distribute it, under the provisions of this notice.  Any minorly changed (e.g. addition of new commands, spelling correction, translation into another language, or customization for a monochrome display) derived work must modify the version number above (please keep it in maj.minmin format), modify the author's name, and add an annotation below stating what has been modified.  Such a work } n must b { be distributed under the same ``conscience-ware unless sold'' provisions as the original, as explained above.  A reasonable conscience-ware increase may be made, with specification of to whom it is to be sent, provided that a proportional amount is sent to the original author for any such fees received.

A significantly different work derived from this work must preserve the liability disclaimer.  The person or company writing such a work must indemnify all prior authors and copyright holders against all liability for use of the work, and provide a copy of the new work to each preceeding author documented herein.  If a significant charge will be made for such a derived work, the prior authors must be compensated proportionate to their contribution to the new work.  The following disclaimer must be included in such a work:
} n {
        This work contains code developed by Advanced Integrators, LC, and
        copyrighted by that business.  Nevertheless, no liability may be
        assigned to Advanced Integrators, LC, for use, misuse, or abuse
        of this work.
} b {
It is the responsibility of the author/distributor of the derived work to adequately reveal this disclaimer of liability, or modify it to the least change-of-meaning possible to comply with law, and hold full responsibility for such modification.
} n
}

proc showcontext {} {
return
}

proc showoverview {} {
  global tclcmd safetcl
  .b.t delete 1.0 end
  .b.t tag configure h1 -foreground SpringGreen -background black \
	-font {-*-times-bold-r-*-*-*-180-*-*-*-*-iso8859-1} \
	-justify center -spacing1 0 -spacing2 0 -spacing3 0
  .b.t tag configure h3 -foreground ForestGreen -background GhostWhite \
	-font {-*-times-bold-r-*-*-*-140-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0 \
	-lmargin1 0 -lmargin2 0
  .b.t tag configure n -foreground ForestGreen -background GhostWhite \
	-font {-*-times-medium-r-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0 \
	-lmargin1 .5c -lmargin2 .8c
  .b.t tag configure i -foreground ForestGreen -background GhostWhite \
	-font {-*-times-medium-i-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0 \
	-lmargin1 .5c -lmargin2 .8c
  .b.t tag configure b -foreground ForestGreen -background GhostWhite \
	-font {-*-times-bold-r-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0 \
	-lmargin1 .5c -lmargin2 .8c
  .b.t tag configure bi -foreground ForestGreen -background GhostWhite \
	-font {-*-times-bold-i-*-*-*-120-*-*-*-*-iso8859-1} \
	-justify left -spacing1 0 -spacing2 0 -spacing3 0 \
	-lmargin1 .5c -lmargin2 .8c
  .b.t insert end {   About Tcl and the Packages   } h1 "\n\nTcl\n" h3
  .b.t insert end {Tcl (} n tickle i {) - the heart of the package is a multi-threaded scripted interpreter.  When linked for commandline and background use, it is usually consolidated into an executable called } n tclsh b {.  This brings in a group of commands capable of parsing, reporting, network telecommunications, scheduling, thread management, and sundry other things, including package-library management.  The base tcl commands also can be further restricted into a } n safetcl i { intepreter subset.  This provides the capacity to run untrusted scripts reasonably safely. } n {Safe Tcl} i { can be embedded in WWW pages, like Microsoft's Visual Basic derivative, and Netscape's JavaScript, and, because of the storage of local library code at the location of the browser, similarly to Sun's Java.  Although un-gzipping or un-zipping of code has not } n yet i { become a standard usage with Tcl or its additions below doesn't mean that it's not possible, and even easy.  Tcl development has seen some support by Sun, Inc., and is arguably the ``father of Java'', while C++ or another OO language may be its mother.

Platforms supported as of last check include nearly every flavor of Unix from FreeBSD, NetBSD,
OpenBSD, Solaris, IRIX, HP/UX, AIX, AUX, to MacOS (e.g. v7.3 and up m68k or PowerMac),
to 32-bit Windows (Windows95, WindowsNT, and Windows 3.1 with Win32S.
} n
  set maxl 0
  foreach l [array names tclcmd] {
    if [string match tcl [lindex $tclcmd($l) 0]] {
      if {[string length $l] > $maxl} { set maxl [string length $l] }
    }
  }
  set c 0
  foreach l [lsort [array names tclcmd]] {
    if [string match tcl [lindex $tclcmd($l) 0]] {
      .b.t insert end [format "%-${maxl}s " $l] n
      incr c
      if { $c == 10 } {
        .b.t insert end "\n" n
        set c 0
      }
    }
  }
   .b.t insert end "\n\nTk\n" h3 {Tk adds a GUI interface to the base tcl.  Normally the linked executable including the GUI operators is called } n wish b {.
  These widgets and facilities are basic (as of Tk4.1/4.2), but compound widgets are also possible, at times even easy, to build.
  } n
  set maxl 0
  foreach l [array names tclcmd] {
    if [string match tk [lindex $tclcmd($l) 0]] {
      if {[string length $l] > $maxl} { set maxl [string length $l] }
    }
  }

  foreach l [lsort [array names tclcmd]] {
    if [string match tk [lindex $tclcmd($l) 0]] {
      .b.t insert end [format "%-${maxl}s " $l] n
    }
  }
   .b.t insert end "\n\nExpect and expectk\n" h3 {Expect adds background processing of commandline style interfaces.  In normal operation, the } n expect i {script substitutes for a user, running a literal command shell or other interactive program in the background.  Expectk, similarly is expect linked as a Tk } n wish i { shell, giving the potential to writing GUI front ends to just about any shell-oriented interactive task.  Expect and Expectk are separatly linked shells, hence are not nearly as portable as Tcl and Tcl/Tk, however recent Tcl versions may be able to dynamically load them from the base shell.} n
   .b.t insert end "\n\nTix\n" h3 {Basically } n tix b { is an extension to tcl/tk adding wonderful widgets and a level of OO design.  } n
   .b.t insert end "\n\nTnm\n" h3 Tnm b { adds a network administration package to tcl and/or tcl/tk.  While the base tcl can handle TCP/IP connections directly with asyncronous I/O and servicing, Tnm adds NNTP, NTP, HTTP, UDP, network databases, and far more.  Like } n expect i { it can be used either with plain tcl or with Tk for GUI uses.} n
   .b.t insert end "\n\niTCL\n" h3 {Incremental Tcl} i { is an object oriented extension to the base Tcl, and includes a number of widgets for Tk.  While most plain tcl and tk scripts can run in iTCL, iTCL uses its own binaries, hence is not nearly as portable as the base Tcl and Tcl/Tk, although the availability of new iTcl releases for all platforms generally comes close to keeping apace to the base Tcl/Tk.} n
   .b.t insert end "\n\nobTCL\n" h3 obTCL b { is a script-only OO extension to Tcl.  This small package adds OO design paradigms much in the way that the Perl Tcl and Tcl::Tk objects do it in Perl, yet this is written all in tcl and should be portable.  Speed is the tradeoff for portability, however.} n
   .b.t insert end "\n\ntclmidi\n" h3 {The } n tclmidi i { package is a separate shell for Unix with primatives for handling MIDI (} n {Musical Instrument Digital Interface} i {) devices and their binary files.} n
   .b.t insert end "\n\nTkGoodstuff\n" h3 {Originally designed as just a desktop manager for Tk/Tcl, the tkgoodstuff package adds some goodies that are handy for use with the FVWM X-Windows window manager, such as the capacity to } n swallow i { other application windows into a concentrated GUI panel.} n
   .b.t insert end "\n\nTkDesk\n" h3 {TkDesk is a well developed desktop application which can achieve MOST functionality in basic Tcl/Tk, but has binary extensions for Unix system-load display and an animated icon.  It is much like the ``Dock'' in NeXTstep, or ``wharf'' in AfterStep, placing a button-bar on screen from which applications can be launched.  Yet it also has an excellent text editor and filesystem browser as built-ins.  Since it's written all in Tcl/Tk (or nearly so) it is EASILY customizable by the user.} n
   .b.t insert end "\n\nZircon and Eggdrop\n" h3 {... are other well-known Tcl applications.  Zircon is an IRC (Internet Relay Chat) client, and Eggdrop is an IRC robotic process.  Both are programmed in tcl and good at interactive telecommunications.  Both serve as good tcl references, in addition to their prime purposes.} n
   .b.t insert end "\n\nOther things\n" h3 {The other scripts and extensions are a growing compendium.  Some things are in small scripts.  Others are in extensive libraries of scripts, complete with dynamic library code or specialty shells.  Many will work on every platform supported by Tcl or Tcl/Tk.  A few oddities must be taken into account for different filesystems (DOS/Windows3 8+3 filenames, Mac colon-delimited directories, etc.), but otherwise, the GUI should be the same on each - a significant boon for quick or often modified code, especially.   vTcl was released after this was originally written. Commercial use is quickly on the increase, as Tcl vies with Perl for the lead, and both are often found to be more economical than Java.  The version 1 of ``Visual Tcl'' (a GUI - GUI builder for Tcl/Tk) was released after this documentation was written, and is in full distribution today.  It is also written in Tcl/Tk, as a Tcl/Tk authoring tool. 

A companion work, ``TkPerlRef'' is slated for follow-up release by the original author, which is based upon, and written to use the Perl Tk:: module-set, but also to include information about Tcl.pm and Tcl::Tk.  No guarantee, however, is made that either updates of this work, or that other work will ever be released.} n
 
}


proc showrefs {} {
return
}

proc showsource {} {
return
}


setMainWin
fillBrowser
wm deiconify .


