summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2011-02-17 15:05:13 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2011-02-17 15:05:13 +0000
commit9fc19ef8e2dcd8bcf6a1d034b95c1de2b88e485c (patch)
treeee28de37fe0de6137d535fee2e64ecafaffefb91 /Master/tlpkg
parent73b942cfb4ccf168f9c2b7f20a289b06f1f54a4b (diff)
New tlperl part II
git-svn-id: svn://tug.org/texlive/trunk@21424 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/804delta.pod110
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Adjuster.pm438
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Adjuster.pod223
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/After.pm105
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Animation.pm230
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Animation.pod92
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Balloon.pm644
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Balloon.pod282
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Bitmap.pm10
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Bitmap.pod103
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pm524
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pod210
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Button.pm247
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Button.pod255
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Camel.xpm41
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Canvas.pm1436
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Canvas.pod2394
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Checkbutton.pm42
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Checkbutton.pod347
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Clipboard.pm122
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Clipboard.pod89
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/CmdLine.pm497
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/CmdLine.pod454
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ColorEdit.xpm58
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ColorEditor.pm781
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ColorEditor.pod120
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Common.pod16
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Compound.pm40
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Compound.pod298
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Config.pm13
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ConfigSpecs.pod262
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Configure.pm68
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Credits7
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DItem.pod439
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Derived.pm512
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Derived.pod89
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Dialog.pm68
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Dialog.pod107
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DialogBox.pm152
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DialogBox.pod156
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DirTree.pm261
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DirTree.pod172
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Dirlist.pm113
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop.pm332
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/Common.pm61
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/LocalDrop.pm61
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/Rect.pm110
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/SunConst.pm34
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/SunDrop.pm200
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/SunSite.pm107
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Drop.pm8
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Site.pm50
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDDrop.pm145
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDSite.pm159
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DropSite.pm257
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DropSite.pod33
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/DummyEncode.pm46
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/English.pm307
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Entry.pm615
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Entry.pod693
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Error.pod145
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ErrorDialog.pm129
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Event.pm14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Event/IO.pm132
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Eventloop.pod62
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/FBox.pm1061
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/FBox.pod67
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/FileSelect.pm578
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/FileSelect.pod150
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/FloatEntry.pm109
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Font.pm163
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Font.pod407
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Frame.pm378
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Frame.pod146
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/HList.pm685
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/HList.pod1050
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/IO.pm183
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/IO.pod51
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/IconList.pm712
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/IconList.pod82
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Image.pm74
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Image.pod145
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/InputO.pod50
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Internals.pod142
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ItemStyle.pm38
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/JPEG.pm57
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/LabEntry.pm31
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/LabFrame.pm138
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/LabFrame.pod110
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/LabRadio.pm63
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Label.pm21
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Label.pod133
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Labelframe.pm16
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Labelframe.pod206
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Listbox.pm910
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Listbox.pod794
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/MMtry.pm60
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/MMutil.pm607
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/MainWindow.pm212
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/MainWindow.pod85
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/MakeDepend.pm293
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Menu.pm1201
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Menu.pod876
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Menu/Item.pm178
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Menu/Item.pod96
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Menubar.pm15
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Menubutton.pm401
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Menubutton.pod249
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Message.pm20
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Message.pod151
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/MsgBox.pm506
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/MsgBox.pod83
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Mwm.pod109
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/NBFrame.pm20
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/NoteBook.pm480
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/NoteBook.pod235
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Optionmenu.pm128
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Optionmenu.pod100
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/PNG.pm50
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Pane.pm544
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Panedwindow.pm221
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Panedwindow.pod326
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Photo.pm22
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Photo.pod475
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Pixmap.pm19
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Pixmap.pod64
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Popup.pod89
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Pretty.pm93
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ProgressBar.pm498
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/README.Adjust77
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ROText.pm48
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ROText.pod48
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Radiobutton.pm45
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Radiobutton.pod333
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Region.pm182
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Reindex.pm233
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ReindexedROText.pm13
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/ReindexedText.pm13
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Scale.pm278
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Scale.pod356
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Scrollbar.pm429
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Scrollbar.pod429
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Scrolled.pod86
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Spinbox.pm115
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Spinbox.pod819
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Stats.pm26
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Submethods.pm45
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Submethods.pod27
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/SunConst.pod18
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TList.pm416
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TList.pod597
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Table.pm597
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Table.pod97
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Tcl-perl.pod200
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Text.pm1671
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Text.pod2220
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Text/Tag.pm46
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TextEdit.pm509
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TextList.pm982
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TextUndo.pm1023
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TextUndo.pod73
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Tiler.pm202
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Tiler.pod32
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TixGrid.pm1597
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TixGrid.pod539
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Tk.xbm44
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Tk.xpm41
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/TkXSUB.def62
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Toplevel.pm211
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Toplevel.pod199
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Trace.pm405
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Tree.pm313
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Tree.pod274
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/UserGuide.pod586
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Widget.pm1774
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Widget.pod678
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/WidgetDemo.pod59
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Wm.pm174
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Wm.pod667
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X.pm391
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X.pod373
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/X.h677
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/Xatom.h79
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/Xfuncproto.h60
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/Xlib.h1214
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/Xutil.h855
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/cursorfont.h79
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/keysym.h39
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/keysymdef.h1169
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11/license.terms39
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11Font.pm184
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/X11Font.pod88
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Xcamel.gifbin0 -> 4193 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Xlib.pm15
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Xrm.pm9
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/Xrm.pod45
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/act_folder.xbm5
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/act_folder.xpm22
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/after.pod168
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/anim.gifbin0 -> 2533 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/arrowdownwin.xbm5
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/balArrow.xbm4
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/bind.pod583
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/bindtags.pod107
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/callbacks.pod104
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/cbxarrow.xbm6
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/chooseColor.pod64
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/chooseDirectory.pod95
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/composite.pod171
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/LabEnLabRad.pm41
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPB.xpm48
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPBa.xpm48
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/c.icon16
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.curbin0 -> 326 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.mask6
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.xbm8
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/dir.icon16
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/dir.mask16
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/earth.gifbin0 -> 51552 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/earthris.gifbin0 -> 6343 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/face173
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/flagdown27
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/flagup27
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/grey.256
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/grey.56
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/letters27
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/mickey.gifbin0 -> 9344 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/ned.xpm69
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/noletters27
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/page.icon16
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/page.mask16
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/pattern6
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/images/teapot.ppm31
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Ball.pm143
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList.pl65
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList2.pl124
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Plot.pm198
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/WidgetDemo.pm130
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/arrows.pl242
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/balloon.pl168
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bind.pl65
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bitmaps.pl44
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bounce.pl274
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl34
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry2.pl39
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/button.pl28
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/check.pl44
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/choosedir.pl39
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/clrpick.pl45
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/colors.pl85
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/cscroll.pl86
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ctext.pl170
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog1.pl33
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog2.pl33
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dirtree.pl7
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry1.pl28
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry2.pl33
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry3.pl199
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/filebox.pl106
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/floor.pl1324
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form.pl31
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form_mgr.pl21
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hello.pl51
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hscale.pl48
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/icon.pl64
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl28
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image2.pl104
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/items.pl358
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/keysyms.pl20
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl74
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labels.pl43
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labframe.pl13
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/mega.pl135
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menbut.pl122
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus.pl196
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus2.pl216
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/msgBox.pl82
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/notebook.pl59
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned1.pl26
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned2.pl65
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo1.pl30
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo2.pl156
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl28
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/progress.pl46
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/puzzle.pl86
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/radio.pl78
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ruler.pl146
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/sayings.pl48
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/search.pl177
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/showVars.pl37
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/slide.pl178
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/spin.pl36
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/states.pl28
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/style.pl154
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/texts.pl71
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace1.pl49
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace2.pl188
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/transtile.pl113
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/twind.pl186
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/unicodeout.pl64
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/virtevents1.pl59
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/vscale.pl48
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Gedi.pl429
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/TEMPLATE.pl92
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Tiler.pl15
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/all.pl315
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/cursor.pl65
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/lib/npuz/Xcamel.npuzbin0 -> 26699 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/npuz.pl226
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/demos/widtrib/plop.pl381
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/event.pod417
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/exit.pod42
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/file.xbm5
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/file.xpm18
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/fileevent.pod112
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/focus.pod166
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/folder.xbm5
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/folder.xpm21
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/form.pod397
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/getOpenFile.pod182
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/grab.pod140
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/grid.pod409
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/icon.gifbin0 -> 1924 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/install.pm37
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/license.terms35
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/mega.pod423
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/messageBox.pod67
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/openfile.xbm5
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/openfolder.xbm5
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/openfolder.xpm21
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/option.pod217
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/options.pod787
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/overview.pod138
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk.pod550
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Lang.h206
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Lang.m192
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Lang.t217
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Lang_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Tcl-pTk260
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.h149
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.m661
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.t657
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/Xlib_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/compat/limits.h22
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/compat/stdlib.h45
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/compat/unistd.h87
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/default.h36
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/img.h41
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.h75
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.m62
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.t93
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/imgInt_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/ks_names.h925
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/mkVFunc433
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/moredefs.h131
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/port.h32
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tcl.h2411
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.h4143
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.m538
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.t675
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclIntDecls.h1324
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclIntPlatDecls.h585
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclMath.h27
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclPlatDecls.h197
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tclWinInt.h145
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tix.h512
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tix.m126
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tix.t170
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixBitmaps.h618
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixDef.h173
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixForm.h143
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixGrData.h88
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixGrid.h458
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixHList.h323
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.h134
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.m34
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.t49
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.h886
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.m171
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.t249
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixInt_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixPort.h110
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixTList.h148
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixWinInt.h23
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tixWinPort.h40
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tix_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tk.h1857
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tk.m94
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tk.t151
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tk3d.h102
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkButton.h320
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvas.h334
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvases.h81
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkColor.h89
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkConfig.h12
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.h2277
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.m870
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.t1158
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.h122
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.m274
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.t304
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkFileFilter.h92
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkFont.h226
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.h36
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.m55
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.t66
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkInitScript.h58
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.h1200
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.m125
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.t182
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.h1572
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.m466
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.t642
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.h1227
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.m474
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.t845
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.h2436
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.m446
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.t1521
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkInt_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkMenu.h588
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkMenubutton.h240
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.h17
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.m26
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.t26
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkOption_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.h300
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.m114
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.t190
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls_f.h15
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkPort.h53
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkScale.h257
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkScrollbar.h209
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkSelect.h187
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkText.h927
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkUndo.h90
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkVMacro.h69
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkWin.h60
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkWinDefault.h525
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkWinInt.h211
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkWinPort.h156
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tkXrm.h12
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/tk_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pTk/xbytes.h58
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/pack.pod324
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/palette.pod89
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/place.pod283
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/prolog.ps284
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/selection.pod159
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/send.pod118
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/srcfile.xpm18
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/textfile.xpm18
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tixWm.pod73
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tkGlue.def130
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tkGlue.h79
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tkGlue.m74
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tkGlue.t70
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tkGlue_f.h14
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tkvars.pod107
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/tranicon.gifbin0 -> 1718 bytes
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/typemap96
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/vtab.def90
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/widgets.pm20
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/widgets.pod20
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/win.xbm6
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/winfolder.xpm39
-rw-r--r--Master/tlpkg/tlperl/lib/Tk/wintext.xpm42
475 files changed, 119286 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/Tk/804delta.pod b/Master/tlpkg/tlperl/lib/Tk/804delta.pod
new file mode 100644
index 00000000000..1472f38c86b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/804delta.pod
@@ -0,0 +1,110 @@
+=head1 NAME
+
+Tk::804delta - what is new for perl/Tk 804
+
+=head1 DESCRIPTION
+
+This document describes differences between the Tk800 series and the
+Tk804 series.
+
+=head1 Incompatible Changes
+
+In Tk804.028, there are some additional incompatible changes:
+
+Return values of some B<Tk::Wm> methods (e.g. B<aspect>, B<wmGrid>,
+B<iconposition>, B<resizable> ...) were changed from returning tclish
+lists (e.g. "1 2 3 4") to perlish lists (1,2,3,4).
+
+B<Tk::Wm::wmTracing> needs argument for setting on/off, without argument
+just return the current value.
+
+All Tk804 releases have the following incompatible changes:
+
+Tk804 will only work with perl 5.8.0 and above. For older perl
+versions look for Tk800.025.
+
+B<curselection> of B<Tk::Listbox> now returns an array reference in
+scalar context. This means you have to write
+
+ my(@selected) = $listbox->curselection
+
+or
+
+ my(@selected) = @{ $listbox->curselection }
+
+now.
+
+The B<fontActual> method now returns the pixel value instead of the
+point value for B<-size>. Pixel values are expressed as negative
+numbers.
+
+Some enhancements from the E<quot>dashE<quot> patches are lost for now
+(i.e. B<-tile>, B<-troughtile> ...).
+
+The B<-state> option is not available anymore for B<Tk::Text> tags.
+Use B<-elide> instead.
+
+=head1 Enhancements
+
+Tk804 is Unicode-aware.
+
+It is possible to build Tk with Xft support on X11. This is strongly
+recommened if you are planning to make use of Unicode rendering
+capabilities of Tk. It also gives anti-aliased fonts for regular text
+(if you have TrueType or Type1 fonts and they are in your fontconfig
+config file).
+
+The new method B<chooseDirectory> is available as a standard directory
+selector.
+
+B<Tk::PNG> and B<Tk::JPEG> are bundled now with the perl/Tk
+distribution, providing support for the image formats B<png> and
+B<jpeg>.
+
+Improvements to B<Tk::Listbox>: new option B<-activestyle>, new
+methods B<itemconfigure> and B<itemcget>, new virtual event B<<<
+<<ListboxSelect>> >>>.
+
+More tests.
+
+=head1 New Widgets
+
+=over
+
+=item Tk::Labelframe
+
+An alternative to B<Tk::LabFrame>.
+
+=item Tk::Panedwindow
+
+An alternative to B<Tk::Adjuster>.
+
+=item Tk::Spinbox
+
+An alternative to the CPAN module B<Tk::NumEntry>.
+
+=back
+
+=head1 Selected Bug Fixes
+
+=head1 Changed Internals
+
+=head1 Platform Specific Problems
+
+=head1 Future Directions
+
+=head1 Reporting Bugs
+
+If you find what you think is a bug, you might check the articles
+recently posted to the comp.lang.perl.tk newsgroup.
+
+If you believe you have an unreported bug, please send a mail to <ptk@lists.stanford.edu> and/or <nick@ing-simmons.net>. Be sure to trim your bug down
+to a tiny but sufficient test case.
+
+=head1 SEE ALSO
+
+L<Tk>, C<Changes> file in the Perl/Tk distribution.
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Adjuster.pm b/Master/tlpkg/tlperl/lib/Tk/Adjuster.pm
new file mode 100644
index 00000000000..bbe44f33dc8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Adjuster.pm
@@ -0,0 +1,438 @@
+package Tk::Adjuster;
+
+use vars qw($VERSION);
+$VERSION = '4.008'; # $Id: //depot/Tkutf8/Tk/Adjuster.pm#7 $
+
+use base qw(Tk::Frame);
+
+# We cannot do this :
+
+# Construct Tk::Widget 'packAdjust';
+
+# because if managed object is Derived (e.g. a Scrolled) then our 'new'
+# will be delegated and hierachy gets turned inside-out
+# So packAdjust is autoloaded in Widget.pm
+
+
+Construct Tk::Widget qw(Adjuster);
+
+{package Tk::Adjuster::Item;
+
+use strict;
+use base qw(Tk::Frame);
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<1>',['BDown', 1]);
+ $mw->bind($class,'<Shift-1>',['BDown', 0]);
+ $mw->bind($class,'<B1-Motion>',['Motion',1]);
+ $mw->bind($class,'<Shift-B1-Motion>',['Motion',0]);
+ $mw->bind($class,'<ButtonRelease-1>',['Motion',0]);
+ return $class;
+}
+
+sub BDown
+{
+ my($w, $delay_mask) = @_;
+ $w->{'start_x'} = $w->XEvent->x;
+ $w->{'start_y'} = $w->XEvent->y;
+ my $adj = $w->Parent;
+ delete $adj->{'lin_info'};
+ my $delay = $delay_mask && $adj->cget('-delay');
+ if ($delay)
+ {
+ $adj->vert ? $adj->delta_width_bar(0) : $adj->delta_height_bar(0);
+ }
+}
+
+sub Motion
+{
+ my($w, $delay_mask) = @_;
+ my $ev = $w->XEvent;
+ my $adj = $w->Parent;
+
+ my $delay = $delay_mask && $adj->cget('-delay');
+ if ($adj->vert)
+ {
+ my $dx = $ev->x - $w->{'start_x'};
+ $delay ? $adj->delta_width_bar($dx) : $adj->delta_width($dx);
+ }
+ else
+ {
+ my $dy = $ev->y - $w->{'start_y'};
+ $delay ? $adj->delta_height_bar($dy) : $adj->delta_height($dy);
+ }
+}
+
+}
+
+
+
+sub packAfter
+{
+ my ($w,$s,%args) = @_;
+ my $side = $args{'-side'} ? $args{'-side'} : 'top';
+ $w->configure(-side => $side, -widget => $s);
+ $w->packed($s, %args);
+}
+
+sub packForget
+{
+ my ($w,$forget_slave) = @_;
+ $w->Tk::Widget::packForget;
+ $w->slave->packForget if $forget_slave;
+}
+
+# Called by Tk::Widget::packAdjust. It was here before packAfter was added
+sub packed
+{
+ my ($w,$s,%args) = @_;
+ delete $args{'-before'};
+ delete $args{'-in'};
+ $args{'-expand'} = 0;
+ $args{'-after'} = $s;
+ $args{'-fill'} = (($w->vert) ? 'y' : 'x');
+ $w->pack(%args);
+}
+
+sub gridded
+{
+ my ($w,$s,%args) = @_;
+ # delete $args{'-before'};
+ # $args{'-expand'} = 0;
+ # $args{'-after'} = $s;
+ # $args{'-fill'} = (($w->vert) ? 'y' : 'x');
+ $w->grid(%args);
+}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Configure>','SizeChange');
+ $mw->bind($class,'<Unmap>','Restore');
+ $mw->bind($class,'<Map>','Mapped');
+ return $class;
+}
+
+sub SizeChange
+{
+ my $w = shift;
+ # reqwidth/height of Adjuster is stored here. If it is partially pushed out
+ # of the window, then $w->width/height returns that of the visible part.
+ if ($w->vert)
+ {
+ my $sx = ($w->Width - $w->{'sep'}->Width)/2;
+ $w->{'but'}->place('-x' => 0, '-y' => $w->Height-18);
+ $w->{'sep'}->place('-x' => $sx, '-y' => 0, -relheight => 1);
+ $w->configure(-width => $w->{'but'}->ReqWidth);
+ $w->{'reqwidth'} = $w->reqwidth;
+ }
+ else
+ {
+ my $sy = ($w->Height - $w->{'sep'}->Height)/2;
+ $w->{'but'}->place('-x' => $w->Width-18, '-y' => 0);
+ $w->{'sep'}->place('-x' => 0, '-y' => $sy, -relwidth => 1);
+ $w->configure(-height => $w->{'but'}->ReqHeight);
+ $w->{'reqheight'} = $w->reqheight;
+ }
+ # Turn off geometry propagation in the slave. Do only if necessary, as this
+ # causes repacking.
+ my $s = $w->slave;
+ $s->packPropagate('0') if $s->packSlaves && $s->packPropagate();
+ $s->gridPropagate('0') if $s->gridSlaves && $s->gridPropagate();
+}
+
+sub Mapped
+{
+ my $w = shift;
+ $w->idletasks;
+ my $m = $w->manager;
+ if ($m =~ /^(?:pack|grid)$/)
+ {
+ my %info = $w->$m('info');
+ my $master = $info{'-in'};
+ $master->$m('propagate',0);
+ $w->{'master'} = $master;
+ }
+ $w->slave_expand_off;
+}
+
+sub Populate
+{
+ my ($w,$args) = @_;
+ $w->SUPER::Populate($args);
+ $w->{'sep'} = Tk::Adjuster::Item->new($w,-bd => 1, -relief => 'sunken');
+ $w->{'but'} = Tk::Adjuster::Item->new($w,-bd => 1, -width => 8, -height => 8, -relief => 'raised');
+
+ # Force creation of Frame in widget's Toplevel. This makes a difference
+ # where the widget's Toplevel has Delegates('Construct') set.
+ # Need to explicitly set frame width to 0 for Win32
+ my $l = $w->{'lin'} = Tk::Frame->new($w->toplevel, -bd => 0);
+ # my $l = $w->{'lin'} = $w->toplevel->Frame(-bd => 0);
+
+ my $cs = $w->ConfigSpecs(-widget => ['PASSIVE','widget','Widget',$w->Parent],
+ -side => ['METHOD','side','Side','top'],
+ -delay => ['PASSIVE','delay','Delay', 1],
+ -background => [['SELF',$w->{'sep'},$w->{'but'}],'background','Background',undef],
+ -foreground => [Tk::Configure->new($w->{'lin'},'-background'),'foreground','Foreground','black'],
+ -restore => ['PASSIVE','restore', 'Restore', 1],
+ );
+ $w->_OnDestroy(qw(sep but lin master));
+}
+
+sub side
+{
+ my ($w,$val) = @_;
+ if (@_ > 1)
+ {
+ $w->{'side'} = $val;
+ my $cursor;
+ if ($w->vert)
+ {
+ $cursor = 'sb_h_double_arrow';
+ $w->{'sep'}->configure(-width => 2, -height => 10000);
+ }
+ else
+ {
+ $cursor = 'sb_v_double_arrow';
+ $w->{'sep'}->configure(-height => 2, -width => 10000);
+ }
+ my $x;
+ foreach $x ($w->{'sep'},$w->{'but'})
+ {
+ $x->configure(-cursor => $cursor);
+ }
+ }
+ return $w->{'side'};
+}
+
+sub slave
+{
+ my $w = shift;
+ my $s = $w->cget('-widget');
+ return $s;
+}
+
+sub vert
+{
+ my $w = shift;
+ my $side = $w->cget('-side');
+ return 1 if $side eq 'left';
+ return -1 if $side eq 'right';
+ return 0;
+}
+
+# If the Adjuster gets unmapped, it attempts to restore itself. If its
+# slave is mapped, then it reduces the size of the slave so that there is
+# then room in the master for the Adjuster widget.
+sub Restore
+{
+ my $w = shift;
+ return if ! $w->toplevel->IsMapped ||
+ ! $w->slave->IsMapped ||
+ ! $w->cget('-restore');
+ $w->vert ? $w->delta_width(0) : $w->delta_height(0);
+}
+
+sub delta_width_bar
+{
+ my ($w,$dx) = @_;
+ my $l = $w->{'lin'};
+ my $r = $w->{'sep'};
+ my $t = $w->toplevel;
+ my $m = $w->{'master'};
+ my $s = $w->slave;
+ my ($min_rootx, $max_rootx, $t_border);
+ if (! $w->{'lin_info'})
+ {
+ my $m_border = $m->cget('-bd') + $m->cget('-highlightthickness');
+ $t_border = $t->cget('-bd') + $t->cget('-highlightthickness');
+ if ($w->cget('-side') eq 'right')
+ {
+ $min_rootx = $m->rootx + $m_border;
+ $max_rootx = $s->rootx + $s->width - 1;
+ }
+ else
+ {
+ $min_rootx = $s->rootx;
+ $max_rootx = $m->rootx + $m->width - $m_border - 1;
+ }
+ $w->{'lin_info'} = [$min_rootx, $max_rootx, $t_border];
+ }
+ else
+ {
+ ($min_rootx, $max_rootx, $t_border) = @{$w->{'lin_info'}};
+ }
+ $l->configure(-width => 1, -height => $w->height) unless $l->IsMapped;
+
+ my $new_rootx = $w->rootx + $w->{'reqwidth'}/2 + $dx;
+ $new_rootx = $min_rootx if $new_rootx < $min_rootx;
+ $new_rootx = $max_rootx if $new_rootx > $max_rootx;
+ my $placex = $new_rootx - $t->rootx - $t_border;
+ my $placey = $w->rooty - $t->rooty - $t_border;
+ $l->place(-in => $t, -anchor => 'n', '-x' => $placex, '-y' => $placey);
+ my $this = $w->containing($new_rootx, $w->rooty + 1);
+ $l->raise($this) if $this && $this ne $t;
+}
+
+sub delta_width
+{
+ my ($w,$dx) = @_;
+ my $l = $w->{'lin'};
+ $l->placeForget;
+ my $s = $w->slave;
+ if ($s)
+ {
+ my $m = $w->{'master'};
+ my $m_border = $m->cget('-bd') + $m->cget('-highlightthickness');
+ my $w_width = $w->{'reqwidth'};
+ my $m_width = $m->width;
+ my $s_width = $s->width;
+ my $max_width = $m_width - $w_width;
+ my $max_s_width;
+ if ($w->cget('-side') eq 'right')
+ {
+ $dx = -$dx;
+ $max_s_width = $max_width -
+ ($m->rootx + $m_width - ($s->rootx+$s_width)) - $m_border;
+ }
+ else
+ {
+ $max_s_width = $max_width - ($s->rootx - $m->rootx) - $m_border;
+ }
+ my $new_width = $s_width+$dx;
+ $new_width = $max_s_width if $new_width > $max_s_width;
+ $new_width = 0 if $new_width < 0;
+ $s->GeometryRequest($new_width, $s->height);
+ }
+}
+
+sub delta_height_bar
+{
+ my ($w,$dy) = @_;
+ my $l = $w->{'lin'};
+ my $r = $w->{'sep'};
+ my $t = $w->toplevel;
+ my $m = $w->{'master'};
+ my $s = $w->slave;
+ my ($min_rooty, $max_rooty, $t_border);
+ if (! $w->{'lin_info'})
+ {
+ my $m_border = $m->cget('-bd') + $m->cget('-highlightthickness');
+ $t_border = $t->cget('-bd') + $t->cget('-highlightthickness');
+ if ($w->cget('-side') eq 'bottom')
+ {
+ $min_rooty = $m->rooty + $m_border;
+ $max_rooty = $s->rooty + $s->height - 1;
+ }
+ else
+ {
+ $min_rooty = $s->rooty;
+ $max_rooty = $m->rooty + $m->height - $m_border - 1;
+ }
+ $w->{'lin_info'} = [$min_rooty, $max_rooty, $t_border];
+ }
+ else
+ {
+ ($min_rooty, $max_rooty, $t_border) = @{$w->{'lin_info'}};
+ }
+ $l->configure(-height => 1, -width => $w->width) unless $l->IsMapped;
+
+ my $new_rooty = $w->rooty + $w->{'reqheight'}/2 + $dy;
+ $new_rooty = $min_rooty if $new_rooty < $min_rooty;
+ $new_rooty = $max_rooty if $new_rooty > $max_rooty;
+ my $placey = $new_rooty - $t->rooty - $t_border;
+ my $placex = $w->rootx - $t->rootx - $t_border;
+ $l->place(-in => $t, -anchor => 'w', '-x' => $placex, '-y' => $placey);
+ my $this = $w->containing($w->rootx + 1, $new_rooty);
+ $l->raise($this) if $this && $this ne $t;
+}
+
+sub delta_height
+{
+ my ($w,$dy) = @_;
+ my $l = $w->{'lin'};
+ $l->placeForget;
+ my $s = $w->slave;
+ if ($s)
+ {
+ my $m = $w->{'master'};
+ my $m_border = $m->cget('-bd') + $m->cget('-highlightthickness');
+ my $w_height = $w->{'reqheight'};
+ my $m_height = $m->height;
+ my $s_height = $s->height;
+ my $max_height = $m_height - $w_height;
+ my $max_s_height;
+ if ($w->cget('-side') eq 'bottom')
+ {
+ $dy = -$dy;
+ $max_s_height = $max_height -
+ ($m->rooty + $m_height - ($s->rooty+$s_height)) - $m_border;
+ }
+ else
+ {
+ $max_s_height = $max_height - ($s->rooty - $m->rooty) - $m_border;
+ }
+ my $new_height = $s_height+$dy;
+
+ $new_height = $max_s_height if $new_height > $max_s_height;
+ $new_height = 0 if $new_height < 0;
+ $s->GeometryRequest($s->width, $new_height);
+ }
+}
+
+# Turn off expansion in the slave.
+# This is done only if necessary, as calls to pack/gridConfigure cause
+# repacking.
+# Before call to pack/gridConfigure, the reqwidth/reqheight is set to the
+# current width/height. This is because the geometry managers use
+# the requested values, not the actual, to calculate the new geometry.
+sub slave_expand_off
+{
+ my $w = shift;
+ my $s = $w->slave;
+ return if ! $s;
+
+ my $manager = $s->manager;
+ if ($manager eq 'pack')
+ {
+ my %info = $s->packInfo;
+ my $expand = $info{'-expand'};
+ if ($expand)
+ {
+ $s->GeometryRequest($s->width, $s->height);
+ $s->packConfigure(-expand => 0);
+ }
+ }
+ elsif ($manager eq 'grid')
+ {
+ my %info = $s->gridInfo;
+ my $master = $info{'-in'};
+ if ($w->vert)
+ {
+ my $col = $info{'-column'};
+ my $expand = $master->gridColumnconfigure($col, '-weight');
+ if ($expand)
+ {
+ $s->GeometryRequest($s->width, $s->height);
+ $master->gridColumnconfigure($col, -weight => 0);
+ }
+ }
+ else
+ {
+ my $row = $info{'-row'};
+ my $expand = $master->gridRowconfigure($row, '-weight');
+ if ($expand)
+ {
+ $s->GeometryRequest($s->width, $s->height);
+ $master->gridRowconfigure($row, -weight => 0);
+ }
+ }
+ }
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Adjuster.pod b/Master/tlpkg/tlperl/lib/Tk/Adjuster.pod
new file mode 100644
index 00000000000..7d094f4e262
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Adjuster.pod
@@ -0,0 +1,223 @@
+
+=head1 NAME
+
+Tk::Adjuster - Allow size of packed widgets to be adjusted by user
+
+=for pm Tk/Adjuster.pm
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+use Tk::Adjuster;
+
+I<$adjuster> = I<$widget>->B<Adjuster>I<(?options?)>;
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<restore>
+
+=item Class: B<Restore>
+
+=item Switch: B<-restore>
+
+Specifies a boolean value that determines whether the Adjuster
+should forcibly attempt to make room
+for itself (by reducing the size of its managed widget) when it is
+unmapped (for example, due to a size change in a top level window).
+The default value is 1.
+
+=item Name: B<side>
+
+=item Class: B<Side>
+
+=item Switch: B<-side>
+
+Specifies the side on which the managed widget lies relative to the
+Adjuster. In conjunction with the pack geometry manager, this relates to
+the side of the master against which the managed widget and the Adjuster
+are packed.
+Must be B<left>, B<right>, B<top>, or B<bottom>. Defaults to B<top>.
+
+=item Name: B<widget>
+
+=item Class: B<Widget>
+
+=item Switch: B<-widget>
+
+Specifies the widget which is to be managed by the Adjuster.
+
+=back
+
+=head1 DESCRIPTION
+
+B<Tk::Adjuster> is a Frame containing a "line" and a "blob".
+
+Dragging with Mouse Button-1 results in a line being dragged
+to indicate new size. Releasing Button-1 submits GeometryRequests
+on behalf of the managed widget which will cause the packer to change the
+widget's size.
+
+If Drag is done with Shift button down, then GeometryRequests are made
+in "real time" so that text-flow effects can be seen, but as a lot more
+work is done behaviour may be sluggish.
+
+If widget is packed with -side => left or -side => right then width is
+adjusted. If packed -side => top or -side => bottom then height is adjusted.
+
+B<packPropagate> is turned off for the master window to prevent adjustment
+changing overall window size. Similarly B<packPropagate> is turned off
+for the managed widget if it has things packed inside it. This is so that
+the GeometryRequests made by B<Tk::Adjuster> are not overridden by pack.
+
+In addition, the managed widget is made non-expandable
+to prevent the geometry manager reallocating freed space in the master
+back to the managed widget.
+Note however that expansion is turned off only after the Adjuster is mapped,
+which allows the managed widget to expand naturally on window creation.
+
+The Tk::Widget method, B<packAdjust>, calls pack on the widget, then
+creates an instance of B<Tk::Adjuster>,
+and packs that "after" the widget. Its use has two disadvantages however: the
+Adjuster widget is not made available to the caller, and
+options cannot be set on the Adjuster. For these reasons, the Tk::Adjuster
+method, B<packAfter> is preferred, but B<packAdjust> is retained
+for backwards compatibility.
+
+=head1 WIDGET METHODS
+
+=over 4
+
+=item I<$adjuster>->B<packAfter>(I<managed_widget, ?pack_options?>)
+
+This command configures the Adjuster's B<-widget> and B<-side> options
+respectively to I<managed_widget> and the B<-side> value specified in
+I<pack_options> (B<top> if not specified). It then packs the Adjuster
+after I<managed_widget>, with B<-fill> set to B<x> or B<y> as appropriate.
+
+=item I<$adjuster>->B<packForget>I<?(boolean)?>
+
+This command calls B<Tk::Widget::packForget> on the Adjuster.
+If a parameter is provided and it has a true boolean value, then
+B<packForget> is also called on the managed widget.
+
+=item I<$adjuster>->B<slave>
+
+This command returns the value I<$adjuster>->I<cget('-widget')>, ie. the
+reference to the managed widget.
+
+=back
+
+=head1 EXAMPLES
+
+B<Using an Adjuster to separate two widgets, whereby the left widget
+is managed, and right widget expands to fill space on a window resize>
+
+a) Using packAfter (preferred interface)
+
+ use Tk;
+ use Tk::Adjuster;
+
+ my $f = MainWindow->new;
+ my $lst1 = $f->Listbox();
+ my $adj1 = $f->Adjuster();
+ my $lst2 = $f->Listbox();
+
+ my $side = 'left';
+ $lst1->pack(-side => $side, -fill => 'both', -expand => 1);
+ $adj1->packAfter($lst1, -side => $side);
+ $lst2->pack(-side => $side, -fill => 'both', -expand => 1);
+ MainLoop;
+
+b) Using packAdjust
+
+ use Tk;
+ use Tk::Adjuster;
+
+ my $f = MainWindow->new;
+ my $lst1 = $f->Listbox();
+ my $lst2 = $f->Listbox();
+
+ my $side = 'left';
+ $lst1->packAdjust(-side => $side, -fill => 'both');
+ $lst2->pack (-side => $side, -fill => 'both', -expand => 1);
+ MainLoop;
+
+c) Using the standard Tk::Widget::pack
+
+ use Tk;
+ use Tk::Adjuster;
+
+ my $f = MainWindow->new;
+ my $side = 'left';
+ my $lst1 = $f->Listbox();
+ my $adj = $f->Adjuster(-widget => $lst1, -side => $side);
+ my $lst2 = $f->Listbox();
+
+ $lst1->pack(-side => $side, -fill => 'both', -expand => 1);
+ $adj->pack (-side => $side, -fill => 'y');
+ $lst2->pack(-side => $side, -fill => 'both', -expand => 1);
+
+ MainLoop;
+
+Changing the above examples so that $side has the value 'right' means the
+left widget expands to fill space on a window resize.
+
+Changing the above examples so that $side has the value 'top'
+produces a testcase with a horizontal Adjuster.
+Here the bottom widget expands to fill space on a window resize.
+Packing to the 'bottom' makes the top widget expand to fill space on window
+resize.
+
+B<Using -restore =E<gt> 0 for multiple columns>
+
+In the case of multiple columns (or rows) the "restore" functionality of the
+Adjuster can be inconvenient. When the user adjusts the width of one column
+and thereby pushes the Adjuster of another column off the window, this
+adjuster tries to restore itself by reducing the size of its managed widget.
+This has the effect that column widths shrink; and the original size
+is not restored when
+the user reverses the originating change. The B<-restore> option can be
+used to turn off this functionality. (It makes some sense, however, to
+leave B<-restore>
+turned on for the first-packed Adjuster, so that at least one Adjuster
+always remains visible.)
+
+ use Tk;
+ use Tk::Adjuster;
+ my $f = MainWindow->new;
+ my $lst1 = $f->Listbox();
+ my $adj1 = $f->Adjuster();
+ my $lst2 = $f->Listbox();
+ my $adj2 = $f->Adjuster(-restore => 0);
+ my $lst3 = $f->Listbox();
+
+ my $side = 'left';
+ $lst1->pack(-side => $side, -fill => 'both', -expand => 1);
+ $adj1->packAfter($lst1, -side => $side);
+ $lst2->pack(-side => $side, -fill => 'both', -expand => 1);
+ $adj2->packAfter($lst2, -side => $side);
+ $lst3->pack(-side => $side, -fill => 'both', -expand => 1);
+
+ MainLoop;
+
+=head1 BUGS
+
+It is currently not possible to configure the appearance of the Adjuster.
+It would be nice to be able to set the width and relief of the Adjuster "line"
+and the presence/absence of the "blob" on the Adjuster.
+
+Tk::Adjuster works theoretically with the grid geometry manager but there
+are currently some problems which seem to be due to bugs in grid:
+
+ a) There's never an Unmap event for the adjuster, so the "restore"
+ functionality has no effect.
+ b) After adjusting, widgets protrude into the border of the master.
+ c) grid('Propagate', 0) on MainWindow has no effect - window shrinks/grows
+ when widgets are adjusted.
+ d) Widgets shuffle to correct position on startup
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/After.pm b/Master/tlpkg/tlperl/lib/Tk/After.pm
new file mode 100644
index 00000000000..9b36ff24b9c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/After.pm
@@ -0,0 +1,105 @@
+# Copyright (c) 1995-2004 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::After;
+use Carp;
+
+use vars qw($VERSION);
+$VERSION = '4.008'; # $Id: //depot/Tkutf8/Tk/After.pm#11 $
+
+sub _cancelAll
+{
+ my $w = shift;
+ my $h = delete $w->{_After_};
+ foreach my $obj (values %$h)
+ {
+ # carp "Auto cancel ".$obj->[1]." for ".$obj->[0]->PathName;
+ $obj->cancel;
+ bless $obj,"Tk::After::Cancelled";
+ }
+}
+
+sub Tk::After::Cancelled::once { }
+sub Tk::After::Cancelled::repeat { }
+sub Tk::After::Cancelled::cancel { }
+
+sub submit
+{
+ my $obj = shift;
+ my $w = $obj->[0];
+ my $id = $obj->[1];
+ my $t = $obj->[2];
+ my $method = $obj->[3];
+ delete($w->{_After_}{$id}) if (defined $id);
+ $id = $w->Tk::after($t,[$method => $obj]);
+ unless (exists $w->{_After_})
+ {
+ $w->{_After_} = {};
+ $w->OnDestroy([\&_cancelAll, $w]);
+ }
+ $w->{_After_}{$id} = $obj;
+ $obj->[1] = $id;
+ return $obj;
+}
+
+sub DESTROY
+{
+ my $obj = shift;
+ $obj->cancel;
+ undef $obj->[0];
+ undef $obj->[4];
+}
+
+sub new
+{
+ my ($class,$w,$t,$method,@cb) = @_;
+ my $cb = (@cb == 1) ? shift(@cb) : [@cb];
+ my $obj = bless [$w,undef,$t,$method,Tk::Callback->new($cb)],$class;
+ return $obj->submit;
+}
+
+sub cancel
+{
+ my $obj = shift;
+ my $id = $obj->[1];
+ my $w = $obj->[0];
+ if ($id)
+ {
+ $w->Tk::after('cancel'=> $id) if Tk::Exists($w);
+ delete $w->{_After_}{$id} if exists $w->{_After_};
+ $obj->[1] = undef;
+ }
+ return $obj;
+}
+
+sub repeat
+{
+ my $obj = shift;
+ $obj->submit;
+ local $Tk::widget = $obj->[0];
+ $obj->[4]->Call;
+}
+
+sub once
+{
+ my $obj = shift;
+ my $w = $obj->[0];
+ my $id = $obj->[1];
+ delete $w->{_After_}{$id};
+ local $Tk::widget = $w;
+ $obj->[4]->Call;
+}
+
+sub time {
+ my $obj = shift;
+ my $delay = shift;
+ if (defined $delay) {
+ $obj->cancel if $delay == 0;
+ $obj->[2] = $delay;
+ }
+ $obj->[2];
+}
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Animation.pm b/Master/tlpkg/tlperl/lib/Tk/Animation.pm
new file mode 100644
index 00000000000..24cfacb4a7c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Animation.pm
@@ -0,0 +1,230 @@
+package Tk::Animation;
+
+use vars qw($VERSION);
+$VERSION = '4.008'; # $Id: //depot/Tkutf8/Tk/Animation.pm#8 $
+
+use Tk::Photo;
+use base qw(Tk::Photo);
+
+Construct Tk::Widget 'Animation';
+
+sub MainWindow
+{
+ return shift->{'_MainWIndow_'};
+}
+
+sub add_frame
+{
+ my $obj = shift;
+ $obj->{'_frames_'} = [] unless exists $obj->{'_frames_'};
+ push(@{$obj->{'_frames_'}},@_);
+}
+
+sub new
+{
+ my ($class,$widget,%args) = @_;
+ my $obj = $class->SUPER::new($widget,%args);
+ $obj->{'_MainWIndow_'} = $widget->MainWindow;
+ if ($args{'-format'} eq 'gif')
+ {
+ my @images;
+ local $@;
+ while (1)
+ {
+ my $index = @images;
+ $args{'-format'} = "gif -index $index";
+ my $img;
+ eval {local $SIG{'__DIE__'}; $img = $class->SUPER::new($widget,%args) };
+ last if $@;
+ push(@images,$img);
+ }
+ if (@images > 1)
+ {
+ $obj->add_frame(@images);
+ $obj->{'_frame_index_'} = 0;
+ }
+ }
+ $obj->set_image( 0 );
+ $obj->_get_gif_info;
+ return $obj;
+}
+
+sub fast_forward {
+
+ my( $self, $delta) = @_;
+
+ $self->{_delta_} = $delta;
+ if( not exists $self->{_playing_} ) {
+ my $playing = exists $self->{'_NextId_'};
+ $self->{_playing_} = $playing;
+ $self->resume_animation if not $playing;
+ } else {
+ my $playing = delete $self->{_playing_};
+ $self->pause_animation if not $playing;
+ }
+
+} # end fast_forward
+
+*fast_reverse = \&fast_forward;
+
+sub frame_count {
+ my $frames = shift->{'_frames_'};
+ return -1 unless $frames;
+ return @$frames;
+}
+
+sub set_disposal_method {
+ my( $self, $blank ) = @_;
+ $blank = 1 if not defined $blank;
+ $self->{_blank_} = $blank;
+ $blank;
+}
+
+sub set_image
+{
+ my ($obj,$index) = @_;
+ my $frames = $obj->{'_frames_'};
+ return unless $frames && @$frames;
+ $index = 0 unless $index < @$frames;
+ $obj->blank if $obj->{_blank_}; # helps some make others worse
+ $obj->copy($frames->[$index]);
+ $obj->{'_frame_index_'} = $index;
+}
+
+sub next_image
+{
+ my ($obj, $delta) = @_;
+ $obj->_next_image($delta);
+}
+
+sub _next_image
+{
+ my ($obj, $delta, $in_animation) = @_;
+ $delta = $obj->{_delta_} unless $delta;
+ my $frames = $obj->{'_frames_'};
+ return unless $frames && @$frames;
+ my $next_index = (($obj->{'_frame_index_'} || 0) + $delta);
+ if ($next_index > @$frames && $in_animation && $obj->{'_loop_'} ne 'forever')
+ {
+ return 0; # signal to stop animation
+ }
+ $next_index %= @$frames;
+ $obj->set_image($next_index);
+ 1;
+}
+
+sub prev_image { shift->next_image( -1 ) }
+
+sub next_image_in_animation
+{
+ my ($obj, $delta) = @_;
+ my $continue = $obj->_next_image($delta, 1);
+ if (!$continue && $self->{'_NextId_'})
+ {
+ $obj->pause_animation;
+ }
+}
+
+sub pause_animation {
+ my $self = shift;
+ my $id = delete $self->{'_NextId_'};
+ Tk::catch { $id->cancel } if $id;
+}
+
+sub resume_animation {
+ my( $self, $period ) = @_;
+ if( not defined $self->{'_period_'} ) {
+ $self->{'_period_'} = defined( $period ) ? $period : 100;
+ }
+ $period = $self->{'_period_'};
+ my $w = $self->MainWindow;
+ $self->{'_NextId_'} = $w->repeat( $period => [ $self => 'next_image_in_animation' ] );
+}
+
+sub start_animation
+{
+ my ($obj,$period) = @_;
+ my $frames = $obj->{'_frames_'};
+ return unless $frames && @$frames;
+ my $w = $obj->MainWindow;
+ $obj->stop_animation;
+ $obj->{'_period_'} = $period if $period;
+ $obj->{'_NextId_'} = $w->repeat($obj->{'_period_'},[$obj,'next_image_in_animation']);
+}
+
+sub stop_animation
+{
+ my ($obj) = @_;
+ my $id = delete $obj->{'_NextId_'};
+ Tk::catch { $id->cancel } if $id;
+ $obj->set_image(0);
+}
+
+sub _get_gif_info
+{
+ my ($obj) = @_;
+ my $info;
+ if (defined(my $file = $obj->cget(-file)) && eval { require Image::Info; 1; })
+ {
+ $info = Image::Info::image_info($file);
+ }
+ elsif (defined(my $data = $obj->cget(-data)))
+ {
+ if ($data =~ m{^GIF8} && eval { require Image::Info; 1; })
+ {
+ $info = Image::Info::image_info(\$data);
+ }
+ elsif (eval { require Image::Info; require MIME::Base64; 1; })
+ {
+ $data = MIME::Base64::decode_base64($data);
+ $info = Image::Info::image_info(\$data);
+ }
+ }
+ if ($info)
+ {
+ $obj->{'_blank_'} = $info->{DisposalMethod} == 2 || $info->{DisposalMethod} == 3;
+ $obj->{'_period_'} = $info->{Delay}*1000 if defined $info->{Delay};
+ $obj->{'_loop_'} = $info->{GIF_Loop};
+ }
+ $obj->{'_blank_'} = 0 if !defined $obj->{'_blank_'};
+ $obj->{'_period_'} = 100 if !defined $obj->{'_period_'};
+ $obj->{'_loop_'} = 'forever' if !defined $obj->{'_loop_'};
+ $obj->{'_delta_'} = 1;
+}
+
+1;
+
+__END__
+
+#
+# This almost works for changing the animation on the fly
+# but does not resize things correctly
+#
+
+sub gif_sequence
+{
+ my ($obj,%args) = @_;
+ my $widget = $obj->MainWindow;
+ my @images;
+ local $@;
+ while (1)
+ {
+ my $index = @images;
+ $args{'-format'} = "gif -index $index";
+ my $img;
+ eval
+ {local $SIG{'__DIE__'};
+ my $img = $widget->Photo(%args);
+ push(@images,$img);
+ };
+ last if $@;
+ }
+ if (@images)
+ {
+ delete $obj->{'_frames_'};
+ $obj->add_frame(@images);
+ $obj->configure(-width => 0, -height => 0);
+ $obj->set_frame(0);
+ }
+}
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Animation.pod b/Master/tlpkg/tlperl/lib/Tk/Animation.pod
new file mode 100644
index 00000000000..996b035b1c5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Animation.pod
@@ -0,0 +1,92 @@
+
+=head1 NAME
+
+Tk::Animation - Display sequence of Tk::Photo images
+
+=for pm Tk/Animation.pm
+
+=for category Tk Image Classes
+
+=head1 SYNOPSIS
+
+ use Tk::Animation
+ my $img = $widget->Animation('-format' => 'gif', -file => 'somefile.gif');
+
+ $img->add_frame(@images);
+
+ $img->start_animation;
+ $img->start_animation( $period );
+
+ $img->next_image;
+ $img->prev_image;
+ $img->set_image( 0 .. $#frames );
+
+ $img->pause_animation;
+ $img->resume_animation( $period );
+
+ $img->fast_forward( $multiplier );
+ $img->fast_reverse( $multiplier );
+
+ $img->stop_animation;
+
+ $img->set_disposal_method( $boolean );
+
+=head1 DESCRIPTION
+
+In the simple case when C<Animation> is passed a GIF89 style GIF with
+multiple 'frames', it will build an internal array of C<Photo> images.
+
+The C<add_frame> method adds images to the sequence. It is provided
+to allow animations to be constructed from separate images.
+All images must be C<Photo>s and should all be the same size.
+
+C<start_animation($period)> then initiates a C<repeat> with specified
+I<$period> to sequence through these images. As for raw C<repeat>
+I<$period> is in milliseconds, for a 50Hz monitor it should be at
+least 20ms. If I<$period> is omitted it is determined from the GIF
+metadata (see below), or if this is not possible it defaults to 100
+milliseconds.
+
+C<stop_animation> cancels the C<repeat> and resets the image to the first
+image in the sequence.
+
+For fine-grained control C<next_image> and C<prev_image> move one frame forward
+or backward. C<set_image> randomly positions the animation to a particular frame.
+
+C<pause_animation> pauses the movie and C<resume_animation> continues from the
+pause point.
+
+C<fast_forward> and C<fast_reverse> speed through the movie either
+forwards or backwards. $multiplier specifies how much faster the
+animation moves.
+
+If L<Image::Info> is installed, then the repeat period time and
+disposal method of GIF animations are determined from the GIF metadata
+directly. Otherwise the disposal method must be set manually by using
+C<set_disposal_method> (1 for blanking the previous images, 0 for
+leaving the previous images as is). The repeat period time may be
+given in the C<start_animation> method.
+
+=head1 NOTES
+
+C<set_disposal_method> was formerly known as C<blank> method, but the
+naming of this method was a mistake.
+
+If the disposal method is not set correctly, either by
+C<set_disposal_method> or by determining from the GIF metadata, then
+the following may happen: By default Animation leaves the previous
+movie frame in the animation photo. Many times overlaying subsequent
+frames produces a composite that looks blurred.
+
+=head1 BUGS
+
+This module should not depend on a module which is not declared as a
+dependency (Image::Info).
+
+The delays between images may vary in a GIF animation. This cannot be
+handled by this module yet.
+
+The handling of the various disposal methods is not correct.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Balloon.pm b/Master/tlpkg/tlperl/lib/Tk/Balloon.pm
new file mode 100644
index 00000000000..4be9f6db9ae
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Balloon.pm
@@ -0,0 +1,644 @@
+#
+# The help widget that provides both "balloon" and "status bar"
+# types of help messages.
+#
+# This is a patched version of Balloon 3.037 - it adds support
+# for different orientations of the balloon widget, depending
+# on wether there's enough space for it. The little arrow now
+# should always point directly to the client.
+# Added by Gerhard Petrowitsch (gerhard.petrowitsch@philips.com)
+#
+# Nov 1, 2003 - Jack Dunnigan
+# Added support for more than one screen in single logical
+# screen mode (i.e. xinerama, dual monitors)
+
+package Tk::Balloon;
+
+use vars qw($VERSION);
+$VERSION = '4.012'; # was: sprintf '4.%03d', q$Revision: #10 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw(Ev Exists);
+use Carp;
+require Tk::Toplevel;
+
+Tk::Widget->Construct('Balloon');
+use base qw(Tk::Toplevel);
+
+# use UNIVERSAL; avoid the UNIVERSAL.pm file subs are XS in perl core
+
+use strict;
+
+my @balloons;
+my $button_up = 0;
+my %arrows = ( TL => 'R0lGODlhBgAGAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAGAAYAAAINjA0HAEdwLCwMKIQfBQA7',
+ TR => 'R0lGODlhBgAGAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAGAAYAAAIRBGMDwAEQkgAIAAoCABEEuwAAOw==',
+ BR => 'R0lGODlhBgAGAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAGAAYAAAIPDOHHhYVRAIgIAEISQLELADs=',
+ BL => 'R0lGODlhBgAGAJEAANnZ2QAAAP///////yH5BAEAAAAALAAAAAAGAAYAAAIPhB1xAUFALCIMKAaAWQAVADs=',
+ NO => 'R0lGODlhAQABAJEAANnZ2f///////////yH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='
+ );
+
+
+sub ClassInit {
+ my ($class, $mw) = @_;
+ $mw->bind('all', '<Motion>', ['Tk::Balloon::Motion', Ev('X'), Ev('Y'), Ev('s')]);
+ $mw->bind('all', '<Leave>', ['Tk::Balloon::Motion', Ev('X'), Ev('Y'), Ev('s')]);
+ $mw->bind('all', '<Button>', 'Tk::Balloon::ButtonDown');
+ $mw->bind('all', '<ButtonRelease>', 'Tk::Balloon::ButtonUp');
+ return $class;
+}
+
+sub Populate {
+ my ($w, $args) = @_;
+
+ $w->SUPER::Populate($args);
+
+ $w->overrideredirect(1);
+ $w->withdraw;
+ # Only the container frame's background should be black... makes it
+ # look better.
+ $w->configure(-background => 'black');
+
+ # the balloon arrows
+ $w->{img_tl} = $w->Photo(-data => $arrows{TL}, -format => 'gif');
+ $w->{img_tr} = $w->Photo(-data => $arrows{TR}, -format => 'gif');
+ $w->{img_bl} = $w->Photo(-data => $arrows{BL}, -format => 'gif');
+ $w->{img_br} = $w->Photo(-data => $arrows{BR}, -format => 'gif');
+ $w->{img_no} = $w->Photo(-data => $arrows{NO}, -format => 'gif');
+ $w->OnDestroy([$w, '_destroyed']);
+
+ $w->{'pointer'} = $w->Label(-bd=>0, -relief=>'flat',-image=>$w->{img_no});
+
+ # the balloon message
+ # We give the Label a big borderwidth
+ # ..enough to slide a 6x6 gif image along the border including some space
+
+ my $ml = $w->Label(-bd => 0,
+ -padx => 10,
+ -pady => 3,
+ -justify => 'left',
+ -relief=>'flat');
+ $w->Advertise('message' => $ml);
+
+ $ml->pack(
+ -side => 'top',
+ -anchor => 'nw',
+ -expand => 1,
+ -fill => 'both',
+ -padx => 0,
+ -pady => 0);
+
+ # append to global list of balloons
+ push(@balloons, $w);
+ $w->{'popped'} = 0;
+ $w->{'buttonDown'} = 0;
+ $w->{'menu_index'} = 'none';
+ $w->{'menu_index_over'} = 'none';
+ $w->{'canvas_tag'} = '';
+ $w->{'canvas_tag_over'} = '';
+ $w->{'current_screen'} = 0;
+
+ $w->ConfigSpecs(-installcolormap => ['PASSIVE', 'installColormap', 'InstallColormap', 0],
+ -initwait => ['PASSIVE', 'initWait', 'InitWait', 350],
+ -state => ['PASSIVE', 'state', 'State', 'both'],
+ -statusbar => ['PASSIVE', 'statusBar', 'StatusBar', undef],
+ -statusmsg => ['PASSIVE', 'statusMsg', 'StatusMsg', ''],
+ -balloonmsg => ['PASSIVE', 'balloonMsg', 'BalloonMsg', ''],
+ -balloonposition => ['PASSIVE', 'balloonPosition', 'BalloonPosition', 'widget'],
+ -postcommand => ['CALLBACK', 'postCommand', 'PostCommand', undef],
+ -cancelcommand => ['CALLBACK', 'cancelCommand', 'CancelCommand', undef],
+ -motioncommand => ['CALLBACK', 'motionCommand', 'MotionCommand', undef],
+ -background => ['DESCENDANTS', 'background', 'Background', '#C0C080'],
+ -foreground => ['DESCENDANTS', 'foreground', 'Foreground', undef],
+ -font => [$ml, 'font', 'Font', '-*-helvetica-medium-r-normal--*-120-*-*-*-*-*-*'],
+ -borderwidth => ['SELF', 'borderWidth', 'BorderWidth', 1],
+ -numscreens=>['PASSIVE', 'numScreens','NumScreens',1],
+ );
+}
+
+sub _get_client {
+ my ($w, $client) = @_;
+ if ($client->can("Subwidget") and my $scrolled = $client->Subwidget("scrolled")) {
+ $scrolled;
+ } else {
+ $client;
+ }
+}
+
+# attach a client to the balloon
+sub attach {
+ my ($w, $client, %args) = @_;
+ $client = $w->_get_client($client);
+ foreach my $key (grep(/command$/,keys %args))
+ {
+ $args{$key} = Tk::Callback->new($args{$key});
+ }
+ my $msg = delete $args{-msg};
+ $args{-balloonmsg} = $msg unless exists $args{-balloonmsg};
+ $args{-statusmsg} = $msg unless exists $args{-statusmsg};
+ $w->{'clients'}{$client} = \%args;
+ $client->OnDestroy([$w, 'detach', $client]);
+}
+
+# detach a client from the balloon.
+sub detach {
+ my ($w, $client) = @_;
+ $client = $w->_get_client($client);
+ if (Exists($w))
+ {
+ $w->Deactivate if ($client->IS($w->{'client'}));
+ }
+ delete $w->{'clients'}{$client};
+}
+
+sub GetOption
+{
+ my ($w,$opt,$client) = @_;
+ $client = $w->{'client'} unless defined $client;
+ if (defined $client)
+ {
+ my $info = $w->{'clients'}{$client};
+ return $info->{$opt} if exists $info->{$opt};
+ }
+ return $w->cget($opt);
+}
+
+sub Motion {
+ my ($ewin, $x, $y, $s) = @_;
+
+ return if not defined $ewin;
+
+ # Find which window we are over
+ my $over = $ewin->Containing($x, $y);
+
+ return if &grabBad($ewin, $over);
+
+ foreach my $w (@balloons) {
+ # if cursor has moved over the balloon -- ignore
+ next if defined $over and $over->toplevel eq $w;
+
+ # find the client window that matches
+ my $client = $over;
+ while (defined $client) {
+ last if (exists $w->{'clients'}{$client});
+ if ($client->can("MasterMenu")) {
+ my $master = $client->MasterMenu;
+ if ($master && exists $w->{'clients'}{$master}) {
+ $w->{'clients'}{$client} = $w->{'clients'}{$master};
+ last;
+ }
+ }
+ $client = $client->Parent;
+ }
+ if (defined $client) {
+ # popping up disabled -- ignore
+ my $state = $w->GetOption(-state => $client);
+ next if $state eq 'none';
+ # Check if a button was recently released:
+ my $deactivate = 0;
+ if ($button_up) {
+ $deactivate = 1;
+ $button_up = 0;
+ }
+ # Deactivate it if the motioncommand says to:
+ my $command = $w->GetOption(-motioncommand => $client);
+ $deactivate = $command->Call($client, $x, $y) if defined $command;
+ if ($deactivate)
+ {
+ $w->Deactivate;
+ }
+ else
+ {
+ # warn "deact: $client $w->{'client'}";
+ $w->Deactivate unless $client->IS($w->{'client'});
+ my $msg = $client->BalloonInfo($w,$x,$y,'-statusmsg','-balloonmsg');
+ if (defined($msg))
+ {
+ my $delay = delete $w->{'delay'};
+ $delay->cancel if defined $delay;
+ my $initwait = $w->GetOption(-initwait => $client);
+ $w->{'delay'} = $client->after($initwait, sub {$w->SwitchToClient($client);});
+ $w->{'client'} = $client;
+ }
+ }
+ } else {
+ # cursor is at a position covered by a non client
+ # pop down the balloon if it is up or scheduled.
+ $w->Deactivate;
+ }
+ }
+}
+
+sub ButtonDown {
+ my ($ewin) = @_;
+
+ foreach my $w (@balloons) {
+ $w->Deactivate;
+ }
+}
+
+sub ButtonUp {
+ $button_up = 1;
+}
+
+# switch the balloon to a new client
+sub SwitchToClient {
+ my ($w, $client) = @_;
+ return unless Exists($w);
+ return unless Exists($client);
+ return unless $client->IS($w->{'client'});
+ return if &grabBad($w, $client);
+ my $command = $w->GetOption(-postcommand => $client);
+ if (defined $command) {
+ # Execute the user's command and return if it returns false:
+ my $pos = $command->Call($client);
+ return if not $pos;
+ if ($pos =~ /^(\d+),(\d+)$/) {
+ # Save the returned position so the Popup method can use it:
+ $w->{'clients'}{$client}{'postposition'} = [$1, $2];
+ }
+ }
+ my $state = $w->GetOption(-state => $client);
+ $w->Popup if ($state =~ /both|balloon/);
+ $w->SetStatus if ($state =~ /both|status/);
+ $w->{'popped'} = 1;
+ $w->{'delay'} = $w->repeat(200, ['Verify', $w, $client]);
+}
+
+sub grabBad {
+
+ my ($w, $client) = @_;
+
+ return 0 unless Exists($client);
+ my $g = $w->grabCurrent;
+ return 0 unless defined $g;
+ return 0 if $g->isa('Tk::Menu');
+ return 0 if $g eq $client;
+
+ # Ignore grab check if $w is the balloon itself.
+ # XXX Why is this necessary? Is it possible to remove the grabBad
+ # condition in SwitchToClient altogether?
+ return 0 if $w->isa(__PACKAGE__);
+
+ # The grab is OK if $client is a decendant of $g. Use the internal Tcl/Tk
+ # pathname (yes, it's cheating, but it's legal).
+
+ return 0 if $g == $w->MainWindow;
+ my $wp = $w->PathName;
+ my $gp = $g->PathName;
+ return 0 if $wp =~ /^$gp/;
+ return 1; # bad grab
+
+} # end grabBad
+
+
+sub Subclient
+{
+ my ($w,$data) = @_;
+ if (defined($w->{'subclient'}) && (!defined($data) || $w->{'subclient'} ne $data))
+ {
+ $w->Deactivate;
+ }
+ $w->{'subclient'} = $data;
+}
+
+sub Verify {
+ my $w = shift;
+ my $client = shift;
+ my ($X,$Y) = (@_) ? @_ : ($w->pointerxy);
+ my $over = $w->Containing($X,$Y);
+ return if not defined $over or ($over->toplevel eq $w);
+ my $deactivate = # DELETE? or move it to the isa-Menu section?:
+ # ($over ne $client) or
+ not $client->IS($w->{'client'})
+# or (!$client->isa('Tk::Menu') && $w->grabCurrent);
+# or $w->grabbad($client);
+ or &grabBad($w, $client);
+ if ($deactivate)
+ {
+ $w->Deactivate;
+ }
+ else
+ {
+ $client->BalloonInfo($w,$X,$Y,'-statusmsg','-balloonmsg');
+ }
+}
+
+sub Deactivate {
+ my ($w) = @_;
+ my $delay = delete $w->{'delay'};
+ $delay->cancel if defined $delay;
+ if ($w->{'popped'}) {
+ my $client = $w->{'client'};
+ my $command = $w->GetOption(-cancelcommand => $client);
+ if (defined $command) {
+ # Execute the user's command and return if it returns false:
+ return if not $command->Call($client);
+ }
+ $w->withdraw;
+ $w->ClearStatus;
+ $w->{'popped'} = 0;
+ $w->{'menu_index'} = 'none';
+ $w->{'canvas_tag'} = '';
+ }
+ $w->{'client'} = undef;
+ $w->{'subclient'} = undef;
+ $w->{'location'} = undef;
+}
+
+sub Popup {
+ my ($w) = @_;
+ if ($w->cget(-installcolormap)) {
+ $w->colormapwindows($w->winfo('toplevel'))
+ }
+ my $client = $w->{'client'};
+ return if not defined $client or not exists $w->{'clients'}{$client};
+ my $msg = $client->BalloonInfo($w, $w->pointerxy,'-balloonmsg');
+ # Dereference it if it looks like a scalar reference:
+ $msg = $$msg if UNIVERSAL::isa($msg, 'SCALAR');
+
+ $w->Subwidget('message')->configure(-text => $msg);
+ $w->idletasks;
+
+ return unless Exists($w);
+ return unless Exists($client);
+ return if $msg eq ''; # Don't popup empty balloons.
+
+ my ($x, $y);
+ my $pos = $w->GetOption(-balloonposition => $client);
+ my $postpos = delete $w->{'clients'}{$client}{'postposition'};
+ if (defined $postpos) {
+ # The postcommand must have returned a position for the balloon - I will use that:
+ ($x,$y) = @{$postpos};
+ } elsif ($pos eq 'mouse') {
+ ($x,$y)=$client->pointerxy; # We adjust the position later
+ } elsif ($pos eq 'widget') {
+ $x = int($client->rootx + $client->width/2);
+ $y = int($client->rooty + int ($client->height/1.3));
+ } else {
+ croak "'$pos' is not a valid position for the balloon - it must be one of: 'widget', 'mouse'.";
+ }
+
+ $w->idletasks;
+
+ # Explanation of following code. [JD]
+ # PREMISE: We want to ensure that the balloon is always "on screen".
+ # To do this we use calculate the size of the
+ # toplevel before it is mapped. Then we adjust it's position with respect to the
+ # mouse cursor or widget. Balloons are usually shown below and to the right of the target.
+ # From extensive KDE experience using Xinerama, and from using dual monitors on WinXP..
+ # the balloon will extend across two monitors in single logical screen mode (SLS).
+ # This is an undesirable characteristic indeed. Trying to read a disjointed balloon
+ # across monitors is not fun.
+ #
+ # The intent of the following code is to fix this problem. We do this by avoiding
+ # placement of any part of the balloon over,say, the "half screenwidth" mark (for two
+ # monitors in SLS mode) or "thirds of screenwidth" mark (for 3 monitors) and so on...
+ # i.e. In SLS mode these *WILL BE* separate screens and as such, should be considered hard
+ # boundaries to be avoided.
+ #
+ # The only drawback of this code, is I know of no way to actually determine this on a
+ # user by user basis. This means that the developer or administrator will have to know
+ # the hardware (monitor) setup for which the application is designed.
+ #
+ # This code uses Gerhard's GIF images but changes *how* the image gets shown. Instead
+ # of creating four separate labels, we configure only ONE label with the proper image.
+ # Then using the place geometry manager, this image/label can be "slid" along the
+ # appropriate side of the toplevel so that it always points directly at the target widget.
+ #
+ # Here we go..
+
+ my ($width, $height) = ($w->reqwidth, $w->reqheight);
+ my ($sw, $sh) = ($w->screenwidth, $w->screenheight);
+ my $numscreen = $w->cget(-numscreens);
+ my $deltax = $sw/$numscreen;
+ my $leftedge;
+ my $rightedge;
+ my $count = 0;
+ for (my $i=0; $i<$sw; $i+=$deltax){
+ $leftedge = $i;
+ $rightedge = $i + $deltax;
+ if ($x >= $leftedge && $x < $rightedge ){
+ last;
+ }
+ $count++;
+ }
+
+ # Force another look at balloon location because mouse has switched
+ # virtual screens.
+ $w->{'location'} = undef unless ( $count == $w->{'current_screen'} );
+ $w->{'current_screen'} = $count;
+
+ my $xx=undef;
+ my $yy=undef; # to hold final toplevel placement
+ my $slideOffsetX = 0;
+ my $slideOffsetY = 0;
+ my $cornerOffset = 5; #default - keep corner away from pointer
+ my $testtop = $y - $height - $cornerOffset;
+ my $testbottom = $y + $height + (2*$cornerOffset);
+ my $testright = $x + $width + (2*$cornerOffset);
+ my $testleft = $x - $width - $cornerOffset;
+ my $vert='bottom'; #default
+ my $horiz='right'; #default
+
+
+ if ( defined $w->{'location'} ){
+ # Once balloon is activated, **don't** change the location of the balloon.
+ # It is annoying to have it jump from one location to another.
+ ( $w->{'location'}=~/top/ ) ? ( $vert = 'top' ) : ( $vert = 'bottom' );
+ ( $w->{'location'}=~/left/ ) ? ( $horiz = 'left' ) : ( $horiz = 'right' );
+
+ if ($vert eq 'top' && $testtop < 0) {
+ $yy = 0;
+ $slideOffsetY = $testtop;
+ }
+ elsif ($vert eq 'bottom' && $testbottom > $sh) {
+ $slideOffsetY = $testbottom - $sh;
+ }
+
+ if ($horiz eq 'left' && $testleft < $leftedge) {
+ $xx = $leftedge;
+ }
+ elsif ($horiz eq 'right' && $testright > $rightedge) {
+ $slideOffsetX = $testright - $rightedge;
+ }
+ }
+ else {
+ #Test balloon positions in the vertical
+ if ($testbottom > $sh) {
+ #Then offscreen to bottom, check top
+ if ($testtop >= 0) {
+ $vert = 'top';
+ }
+ elsif ($y > $sh/2) {
+ #still offscreen to top but there is more room above then below
+ $vert = 'top';
+ $yy=0;
+ $slideOffsetY = $testtop;
+ }
+ if ($vert eq 'bottom'){
+ #Calculate Yoffset to fit entire balloon onto screen
+ $slideOffsetY = $testbottom - $sh;
+ }
+ }
+ #Test balloon positions in the horizontal
+
+ if ($testright > $rightedge) {
+ #The offscreen, check left
+ if ($testleft >= $leftedge) {
+ $horiz = 'left';
+ }
+ elsif ($x > ($leftedge+$deltax) ) {
+ #still offscreen to left but there is more room to left than right
+ $horiz = 'left';
+ $xx=0;
+ $slideOffsetX = $testleft;
+ }
+ if ($horiz eq 'right'){
+ #Calculate Xoffset to fit entire balloon onto screen
+ $slideOffsetX = $testright - $rightedge;
+ }
+ }
+ }
+
+ $w->{'location'} = $vert.$horiz unless (defined $w->{'location'});
+
+ if ($w->{'location'} eq 'bottomright') {
+ if ( $slideOffsetX or $slideOffsetY ) {
+ $w->{'pointer'}->configure(-image => $w->{img_no});
+ }
+ else {
+ $w->{'pointer'}->configure(-image => $w->{img_tl});
+ }
+
+ $w->{'pointer'}->place(
+ -in=>$w,
+# -relx=>0, -x=>$slideOffsetX + 2,
+# -rely=>0, -y=>$slideOffsetY + 2,
+ -relx=>0, -x=>2,
+ -rely=>0, -y=>2,
+ -bordermode=>'outside',
+ -anchor=>'nw');
+
+ $xx=$x-$slideOffsetX+(2*$cornerOffset) unless (defined $xx);
+ $yy=$y-$slideOffsetY+(2*$cornerOffset) unless (defined $yy);
+
+ }
+ elsif ($w->{'location'} eq 'bottomleft') {
+ if ( $slideOffsetX or $slideOffsetY ) {
+ $w->{'pointer'}->configure(-image => $w->{img_no});
+ }
+ else {
+ $w->{'pointer'}->configure(-image => $w->{img_tr});
+ }
+
+ $w->{'pointer'}->place(-in=>$w,
+# -relx=>1, -x=>$slideOffsetX - 2,
+# -rely=>0, -y=>$slideOffsetY + 2,
+ -relx=>1, -x=>-2,
+ -rely=>0, -y=>2,
+ -bordermode=>'outside',
+ -anchor=>'ne');
+
+ $xx=$x-$width-$slideOffsetX-$cornerOffset unless (defined $xx);
+ $yy=$y-$slideOffsetY+(2*$cornerOffset) unless (defined $yy);
+
+ }
+ elsif ($w->{'location'} eq 'topright') {
+ if ( $slideOffsetX or $slideOffsetY ) {
+ $w->{'pointer'}->configure(-image => $w->{img_no});
+ }
+ else {
+ $w->{'pointer'}->configure(-image => $w->{img_bl});
+ }
+
+ $w->{'pointer'}->place(-in=>$w,
+# -relx=>0, -x=>$slideOffsetX + 2,
+# -rely=>1, -y=>$slideOffsetY - 2,
+ -relx=>0, -x=>2,
+ -rely=>1, -y=>-2,
+ -bordermode=>'outside',
+ -anchor=>'sw');
+
+ $xx=$x-$slideOffsetX+$cornerOffset unless (defined $xx);
+ $yy=$y-$height-$slideOffsetY-$cornerOffset unless (defined $yy);
+ }
+ elsif ($w->{'location'} eq 'topleft') {
+ if ( $slideOffsetX or $slideOffsetY ) {
+ $w->{'pointer'}->configure(-image => $w->{img_no});
+ }
+ else {
+ $w->{'pointer'}->configure(-image => $w->{img_br});
+ }
+
+ $w->{'pointer'}->place(-in=>$w,
+# -relx=>1, -x=>$slideOffsetX - 2,
+# -rely=>1, -y=>$slideOffsetY - 2,
+ -relx=>1, -x=>-2,
+ -rely=>1, -y=>-2,
+ -bordermode=>'outside',
+ -anchor=>'se');
+
+ $xx=$x-$width-$slideOffsetX-$cornerOffset unless (defined $xx);
+ $yy=$y-$height-$slideOffsetY-$cornerOffset unless (defined $yy);
+ }
+
+ $w->{'pointer'}->raise;
+ $xx = int($xx);
+ $yy = int($yy);
+ $w->geometry("+$xx+$yy");
+ $w->deiconify();
+ $w->raise;
+}
+
+sub SetStatus {
+ my ($w) = @_;
+ my $client = $w->{'client'};
+ my $s = $w->GetOption(-statusbar => $client);
+ if (defined $s and $s->winfo('exists')) {
+ my $vref = $s->cget(-textvariable);
+ return if not defined $client or not exists $w->{'clients'}{$client};
+ my $msg = $client->BalloonInfo($w, $w->pointerxy,'-statusmsg');
+ # Dereference it if it looks like a scalar reference:
+ $msg = $$msg if UNIVERSAL::isa($msg, 'SCALAR');
+ if (not defined $vref) {
+ eval { $s->configure(-text => $msg); };
+ } else {
+ $$vref = $msg;
+ }
+ }
+}
+
+sub ClearStatus {
+ my ($w) = @_;
+ my $client = $w->{'client'};
+ my $s = $w->GetOption(-statusbar => $client);
+ if (defined $s and $s->winfo('exists')) {
+ my $vref = $s->cget(-textvariable);
+ if (defined $vref) {
+ $$vref = '';
+ } else {
+ eval { $s->configure(-text => ''); }
+ }
+ }
+}
+
+sub _destroyed {
+ my ($w) = @_;
+ # This is called when widget is destroyed (no matter how!)
+ # via the ->OnDestroy hook set in Populate.
+ # remove ourselves from the list of baloons.
+ @balloons = grep($w != $_, @balloons);
+
+ # FIXME: If @balloons is now empty perhaps remove the 'all' bindings
+ # to reduce overhead until another balloon is created?
+
+ # Delete the images
+ for (qw(no tl tr bl br)) {
+ my $img = delete $w->{"img_$_"};
+ $img->delete if defined $img;
+ }
+}
+
+1;
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Balloon.pod b/Master/tlpkg/tlperl/lib/Tk/Balloon.pod
new file mode 100644
index 00000000000..c5afb91e089
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Balloon.pod
@@ -0,0 +1,282 @@
+
+=head1 NAME
+
+Tk::Balloon - pop up help balloons.
+
+=for pm Tixish/Balloon.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+ use Tk::Balloon;
+ ...
+ $b = $top->Balloon(-statusbar => $status_bar_widget);
+
+ # Normal Balloon:
+ $b->attach($widget,
+ -balloonmsg => "Balloon help message",
+ -statusmsg => "Status bar message");
+
+ # Balloon attached to entries in a menu widget:
+ $b->attach($menu, -state => 'status',
+ -msg => ['first menu entry',
+ 'second menu entry',
+ ...
+ ],
+ );
+
+ # Balloon attached to individual items in a canvas widget:
+ $b->attach($canvas, -balloonposition => 'mouse',
+ -msg => {'item1' => 'msg1',
+ 'tag2' => 'msg2',
+ ...
+ },
+ );
+
+ # Balloon attached to items in a listbox widget:
+ $b->attach($listbox, -balloonposition => 'mouse',
+ -msg => ['first listbox element',
+ '2nd listbox element',
+ ...
+ ],
+ );
+
+=head1 DESCRIPTION
+
+B<Balloon> provides the framework to create and attach help
+balloons to various widgets so that when the mouse pauses over the
+widget for more than a specified amount of time, a help balloon is
+popped up.
+
+=head2 Balloons and Menus or Listboxes
+
+If the balloon is attached to a B<Menu> or B<Listbox> widget and the
+message arguments are array references, then each element in the array
+will be the message corresponding to a menu entry or listbox element.
+The balloon message will then be shown for the entry which the mouse
+pauses over. Otherwise it is assumed that the balloon is to be
+attached to the B<Menu> or B<Listbox> as a whole. You can have
+separate status and balloon messages just like normal balloons.
+
+=head2 Balloons and Canvases
+
+If the balloon is attached to a B<Canvas> widget and the message
+arguments are hash references, then each hash key should correspond to
+a canvas item ID or tag and the associated value will correspond to the
+message for that canvas item. The balloon message will then be shown for
+the current item (the one at the position of the mouse). Otherwise it is
+assumed that the balloon is to be attached to the B<Canvas> as a whole.
+You can have separate status and balloon messages just like normal
+balloons.
+
+=head2 Balloon Position
+
+By default, the balloon pops up at the lower right side of the client.
+If it would extend outside the lower screen border, its positioned at the
+upper right side. If it would extend outside the right screen border
+it's shown on the lower left side of the client. If it would extend
+outside both the lower and the right screen border, it's positioned
+at the upper left side of the client. Thus, the little arrow always
+points to the attached client.
+
+=head1 OPTIONS
+
+B<Balloon> accepts all of the options that the B<Frame> widget
+accepts. In addition, the following options are also recognized.
+
+=over 4
+
+=item B<-initwait>
+
+Specifies the amount of time to wait without activity before
+popping up a help balloon. Specified in milliseconds. Defaults to
+350 milliseconds. This applies to both the popped up balloon and
+the status bar message.
+
+=item B<-state>
+
+Can be one of B<'balloon'>, B<'status'>, B<'both'> or B<'none'>
+indicating that the help balloon, status bar help, both or none
+respectively should be activated when the mouse pauses over the
+client widget. Default is B<'both'>.
+
+=item B<-statusbar>
+
+Specifies the widget used to display the status message. This
+widget should accept the B<-text> option and is typically a
+B<Label>. If the widget accepts the B<-textvariable> option and
+that option is defined then it is used instead of the B<-text>
+option.
+
+=item B<-balloonposition>
+
+Can be one of B<'widget'> or B<'mouse'>. It controls where the balloon
+will popup. B<'widget'> makes the balloon appear at the lower right
+corner of the widget it is attached to (default), and B<'mouse'> makes
+the balloon appear below and to the right of the current mouse position.
+
+=item B<-postcommand>
+
+This option takes a B<CODE> reference which will be executed before the
+balloon and statusbar messages are displayed and should return a true
+or false value to indicate whether you want the balloon to be displayed
+or not. This also lets you control where the balloon is positioned by
+returning a true value that looks like I<X,Y> (matches this regular
+expression: C</^(\d+),(\d+)$/>). If the postcommand returns a value that
+matches that re then those coordinates will be used as the position to
+post the balloon. I<Warning:> this subroutine should return quickly or
+the balloon response will appear slow.
+
+=item B<-cancelcommand>
+
+This option takes a B<CODE> reference which will be executed before the
+balloon and statusbar messages are canceled and should return a true
+or false value to indicate whether you want the balloon to be canceled
+or not. I<Warning:> this subroutine should return quickly or the balloon
+response will appear slow.
+
+=item B<-motioncommand>
+
+This option takes a B<CODE> reference which will be executed for any
+motion event and should return a true or false value to indicate
+whether the currently displayed balloon should be canceled (deactivated).
+If it returns true then the balloon will definitely be canceled, if it
+returns false then it may still be canceled depending the internal rules.
+I<Note:> a new balloon may be posted after the B<-initwait> time
+interval, use the B<-postcommand> option to control that behavior.
+I<Warning:> the subroutine should be extremely fast or the balloon
+response will appear slow and consume a lot of CPU time (it is executed
+every time the mouse moves over the widgets the balloon is attached to).
+
+=item B<-numscreens>
+
+This option accepts an integer 1 or greater. This option should be used
+to avoid disjointed balloons across multiple screens in single logical
+sceen (SLS) mode. This only currently works in the horizontal direction.
+Example: If you are running dual screens in SLS mode then you would set
+this value to 2. Default value is 1.
+
+=back
+
+=head1 METHODS
+
+The B<Balloon> widget supports only three non-standard methods:
+
+=head2 B<attach(>I<widget>, I<options>B<)>
+
+Attaches the widget indicated by I<widget> to the help system. The
+allowed options are:
+
+=over 4
+
+=item B<-statusmsg>
+
+The argument is the message to be shown on the status bar when the
+mouse pauses over this client. If this is not specified, but
+B<-msg> is specified then the message displayed on the status bar
+is the same as the argument for B<-msg>. If you give it a scalar
+reference then it is dereferenced before being displayed. Useful
+if the postcommand is used to change the message.
+
+=item B<-balloonmsg>
+
+The argument is the message to be displayed in the balloon that
+will be popped up when the mouse pauses over this client. As with
+B<-statusmsg> if this is not specified, then it takes its value
+from the B<-msg> specification if any. If neither B<-balloonmsg>
+nor B<-msg> are specified, or they are the empty string then
+no balloon is popped up instead of an empty balloon. If you
+give it a scalar reference then it is dereferenced before being
+displayed. Useful if the postcommand is used to change the message.
+
+=item B<-msg>
+
+The catch-all for B<-statusmsg> and B<-balloonmsg>. This is a
+convenient way of specifying the same message to be displayed in
+both the balloon and the status bar for the client.
+
+=item B<-initwait>
+
+=item B<-state>
+
+=item B<-statusbar>
+
+=item B<-balloonposition>
+
+=item B<-postcommand>
+
+=item B<-cancelcommand>
+
+=item B<-motioncommand>
+
+These options allow you to override the balloon's default value for
+those option for some of the widgets it is attached to. It accepts the
+same values as above and will default to the B<Balloon>'s value.
+
+=back
+
+=head2 B<detach(>I<widget>B<)>
+
+Detaches the specified I<widget> from the help system.
+
+=head2 B<destroy>
+
+Destroys the specified balloon.
+
+=head1 ADVERTISED SUBWIDGETS
+
+The balloon label is advertised as C<message>.
+
+=head1 EXAMPLES
+
+See the balloon demo included with the widget demo script that came with
+the distribution for examples on various ways to use balloons.
+
+=head1 NOTES
+
+Because of the overhead associated with each balloon you create (from
+tracking the mouse movement to know when to activate and deactivate
+them) you will see the best performance (low CPU consumption) if you
+create as few balloons as possible and attach them to as many widgets
+as you can. In other words, don't create a balloon for each widget
+you want to attach one to.
+
+=head1 CAVEATS
+
+Pressing any button will deactivate (cancel) the current balloon,
+if one exists. You can usually make the balloon reappear by moving
+the mouse a little. Creative use of the 3 command options can help
+you out also. If the mouse is over the balloon when a menu is unposted
+then the balloon will remain until you move off of it.
+
+=head1 BUGS
+
+If using balloons attached to listbox entries or canvas items in a
+scrolled widget, then the subwidget have to be used:
+
+ $balloon->attach($w->Subwidget("scrolled"), -msg => ...);
+
+=head1 AUTHORS
+
+B<Rajappa Iyer> <rsi@earthling.net> did the original coding.
+
+B<Jason A. Smith> <smithj4@rpi.edu> added support for menus and made some
+other enhancements.
+
+B<Slaven Rezic> <srezic@cpan.org> added support for canvas items.
+
+B<Gerhard Petrowitsch> <gerhard@petrowitsch.de> added intelligent positioning
+
+B<Jack Dunnigan> <dunniganj@cpan.org> Made positioning I<more> intelligent and
+added support for multiple monitors under single logical screen.
+
+=head1 HISTORY
+
+The code and documentation was derived from Balloon.tcl from the
+Tix4.0 distribution by Ioi Lam and modified by the above mentioned
+authors. This code may be redistributed under the same terms as Perl.
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Bitmap.pm b/Master/tlpkg/tlperl/lib/Tk/Bitmap.pm
new file mode 100644
index 00000000000..d081a393804
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Bitmap.pm
@@ -0,0 +1,10 @@
+package Tk::Bitmap;
+require Tk;
+require Tk::Image;
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/Bitmap.pm#4 $
+use base qw(Tk::Image);
+Construct Tk::Image 'Bitmap';
+sub Tk_image { 'bitmap' }
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Bitmap.pod b/Master/tlpkg/tlperl/lib/Tk/Bitmap.pod
new file mode 100644
index 00000000000..49bf20ce4b4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Bitmap.pod
@@ -0,0 +1,103 @@
+# Copyright (c) 1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Bitmap - Images that display two colors
+
+=for category Tk Image Classes
+
+=head1 SYNOPSIS
+
+S< >I<$image> = I<$widget>-E<gt>B<Bitmap>?(I<name>??,I<options>?)
+
+=head1 DESCRIPTION
+
+A bitmap is an image whose pixels can display either of two colors
+or be transparent.
+A bitmap image is defined by four things: a background color,
+a foreground color, and two bitmaps, called the I<source>
+and the I<mask>.
+Each of the bitmaps specifies 0/1 values for a rectangular
+array of pixels, and the two bitmaps must have the same
+dimensions.
+For pixels where the mask is zero, the image displays nothing,
+producing a transparent effect.
+For other pixels, the image displays the foreground color if
+the source data is one and the background color if the source
+data is zero.
+
+=head1 CREATING BITMAPS
+
+Bitmaps are created using I<$widget>-E<gt>B<Bitmap>.
+Bitmaps support the following I<options>:
+
+=over 4
+
+=item B<-background> =E<gt> I<color>
+
+Specifies a background color for the image in any of the standard
+ways accepted by Tk. If this option is set to an empty string
+then the background pixels will be transparent. This effect
+is achieved by using the source bitmap as the mask bitmap, ignoring
+any B<-maskdata> or B<-maskfile> options.
+
+=item B<-data> =E<gt> I<string>
+
+Specifies the contents of the source bitmap as a string.
+The string must adhere to X11 bitmap format (e.g., as generated
+by the B<bitmap> program).
+If both the B<-data> and B<-file> options are specified,
+the B<-data> option takes precedence.
+
+=item B<-file> =E<gt> I<name>
+
+I<name> gives the name of a file whose contents define the
+source bitmap.
+The file must adhere to X11 bitmap format (e.g., as generated
+by the B<bitmap> program).
+
+=item B<-foreground> =E<gt> I<color>
+
+Specifies a foreground color for the image in any of the standard
+ways accepted by Tk.
+
+=item B<-maskdata> =E<gt> I<string>
+
+Specifies the contents of the mask as a string.
+The string must adhere to X11 bitmap format (e.g., as generated
+by the B<bitmap> program).
+If both the B<-maskdata> and B<-maskfile> options are specified,
+the B<-maskdata> option takes precedence.
+
+=item B<-maskfile> =E<gt> I<name>
+
+I<name> gives the name of a file whose contents define the
+mask.
+The file must adhere to X11 bitmap format (e.g., as generated
+by the B<bitmap> program).
+
+=back
+
+=head1 IMAGE METHODS
+
+When a bitmap image is created, Tk also creates a new object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+
+=head1 SEE ALSO
+
+L<Tk::Image|Tk::Image>
+L<Tk::Pixmap|Tk::Pixmap>
+L<Tk::Photo|Tk::Photo>
+
+=head1 KEYWORDS
+
+bitmap, image
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pm b/Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pm
new file mode 100644
index 00000000000..b421480127d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pm
@@ -0,0 +1,524 @@
+#
+# BrowseEntry is a stripped down version of ComboBox.tcl from Tix4.0
+#
+# Some additions by Slaven Rezic <slaven@rezic.de> to make the widget
+# look like the Windows' Combobox. There are also additional options.
+#
+
+package Tk::BrowseEntry;
+
+use vars qw($VERSION);
+$VERSION = '4.015'; # was: sprintf '4.%03d', q$Revision: #13 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw(Ev);
+use Carp;
+use strict;
+
+use base qw(Tk::Frame);
+Construct Tk::Widget 'BrowseEntry';
+
+require Tk::LabEntry;
+
+sub LabEntryWidget { "LabEntry" }
+sub ButtonWidget { "Button" }
+sub ListboxWidget { "Listbox" }
+
+sub Populate {
+ my ($w, $args) = @_;
+
+ my %labelArgs;
+ while(my($k,$v) = each %$args) {
+ $labelArgs{$k} = $v;
+ delete $args->{$k};
+ }
+
+ $w->Tk::Frame::Populate($args);
+
+ while(my($k,$v) = each %labelArgs) {
+ $args->{$k} = $v;
+ }
+
+ # entry widget and arrow button
+ my $lpack = delete $args->{-labelPack};
+ if (not defined $lpack) {
+ $lpack = [-side => 'left', -anchor => 'e'];
+ }
+ $w->{_BE_Style} = delete $args->{-style} || $Tk::platform;
+ my $LabEntry = $w->LabEntryWidget;
+ my $Listbox = $w->ListboxWidget;
+ my $Button = $w->ButtonWidget;
+ # XXX should this be retained?
+# if (defined $args->{-state} and $args->{-state} eq 'readonly') { # XXX works only at construction time
+# $LabEntry = "NoSelLabEntry";
+# require Tk::NoSelLabEntry;
+# }
+ my $e;
+ my $var = "";
+ my @LabEntry_args = (-textvariable => \$var);
+ if (exists $args->{-label}) {
+ $e = $w->$LabEntry(-labelPack => $lpack,
+ -label => delete $args->{-label},
+ @LabEntry_args,
+ );
+ } else {
+ $e = $w->$LabEntry(@LabEntry_args);
+ }
+ my $b = $w->$Button(-bitmap => '@' . Tk->findINC($w->{_BE_Style} eq 'MSWin32' ? 'arrowdownwin.xbm' : 'cbxarrow.xbm'));
+ $w->Advertise('entry' => $e);
+ $w->Advertise('arrow' => $b);
+
+ # Pack the button to align vertically with the entry widget
+ my @anch;
+ my $edge = {@$lpack}->{-side};
+ push(@anch,-anchor => 's') if ($edge && $edge eq 'top');
+ push(@anch,-anchor => 'n') if ($edge && $edge eq 'bottom');
+ $b->pack(-side => 'right', -padx => 1, @anch);
+
+ $e->pack(-side => 'right', -fill => 'x', -expand => 1); #XXX, -padx => 1);
+
+ # popup shell for listbox with values.
+ my $c = $w->Toplevel(-bd => 2,
+ -relief => ($w->{_BE_Style} eq 'MSWin32'
+ ? "solid" : "raised"));
+ $c->overrideredirect(1);
+ $c->withdraw;
+ my $sl = $c->Scrolled( $Listbox, qw/-selectmode browse -scrollbars oe/ );
+ if ($w->{_BE_Style} eq 'MSWin32' and $Tk::platform eq 'MSWin32') {
+ $sl->configure(-bg => 'SystemWindow', -relief => "flat");
+ }
+ $w->Advertise('choices' => $c);
+ $w->Advertise('slistbox' => $sl);
+ $sl->pack(-expand => 1, -fill => 'both');
+
+ $sl->Subwidget("scrolled")->bind("<Motion>",sub {
+ return unless ($w->{_BE_Style} eq 'MSWin32');
+ my $e = $_[0]->XEvent;
+ my $y = $e->y;
+ my $inx = $sl->nearest($y);
+ if (defined $inx) {
+ $sl->selectionClear(0, "end");
+ $sl->selectionSet($inx);
+ }
+ });
+
+ # other initializations
+ $w->SetBindings;
+ $w->{'_BE_popped'} = 0;
+ $w->Delegates(get => $sl, DEFAULT => $e);
+ $w->ConfigSpecs(
+ -font => [qw/DESCENDANTS font Font/],
+ -listwidth => [qw/PASSIVE listWidth ListWidth/, undef],
+ -listheight => [{-height => $sl}, qw/listHeight ListHeight/, undef],
+ -listcmd => [qw/CALLBACK listCmd ListCmd/, undef],
+ -autolistwidth => [qw/PASSIVE autoListWidth AutoListWidth/, undef],
+ -autolimitheight => [qw/PASSIVE autoLimitHeight AutoLimitHeight 0/],
+ -browsecmd => [qw/CALLBACK browseCmd BrowseCmd/, undef],
+ -browse2cmd => [qw/CALLBACK browse2Cmd Browse2Cmd/, undef],
+ -choices => [qw/METHOD choices Choices/, undef],
+ -state => [qw/METHOD state State normal/],
+ -arrowimage => [ {-image => $b}, qw/arrowImage ArrowImage/, undef],
+ -variable => [ {'-textvariable' => $e} ],
+ -colorstate => [qw/PASSIVE colorState ColorState/, undef],
+ -command => '-browsecmd',
+ -options => '-choices',
+ -label => [qw/PASSIVE label Label/, undef],
+ -labelPack => [qw/PASSIVE labelPack LabelPack/, undef],
+ #-background => [$e, qw/background Background/, undef],
+ #-foreground => [$e, qw/foreground Foreground/, undef],
+ -buttontakefocus => [{-takefocus => $b}, 'buttonTakefocus',
+ 'ButtonTakefocus', 1],
+ DEFAULT => [$e] );
+}
+
+sub SetBindings {
+ my ($w) = @_;
+
+ my $e = $w->Subwidget('entry');
+ my $b = $w->Subwidget('arrow');
+
+ # set bind tags
+ $w->bindtags([$w, 'Tk::BrowseEntry', $w->toplevel, 'all']);
+ # as we don't bind $e here leave its tags alone ...
+ # $e->bindtags([$e, ref($e), $e->toplevel, 'all']);
+
+ # bindings for the button and entry
+ $b->bind('<1>',[$w,'BtnDown']);
+ $b->toplevel->bind('<ButtonRelease-1>',[$w,'ButtonHack']);
+ $b->bind('<space>',[$w,'space']);
+
+ # bindings for listbox
+ my $sl = $w->Subwidget('slistbox');
+ my $l = $sl->Subwidget('listbox');
+ $l->bind('<ButtonRelease-1>',[$w,'ListboxRelease',Ev('x'),Ev('y')]);
+ $l->bind('<Escape>' => [$w,'LbClose']);
+ $l->bind('<Return>' => [$w,'Return',$l]);
+
+ # allow click outside the popped up listbox to pop it down.
+ $w->bind('<1>','BtnDown');
+}
+
+sub space
+{
+ my $w = shift;
+ $w->BtnDown;
+ $w->{'_BE_savefocus'} = $w->focusCurrent;
+ $w->Subwidget('slistbox')->focus;
+}
+
+
+sub ListboxRelease
+{
+ my ($w,$x,$y) = @_;
+ $w->ButtonHack;
+ $w->LbChoose($x, $y);
+}
+
+sub Return
+{
+ my ($w,$l) = @_;
+ my($x, $y) = $l->bbox($l->curselection);
+ $w->LbChoose($x, $y)
+}
+
+
+sub BtnDown {
+ my ($w) = @_;
+ return if $w->cget( '-state' ) eq 'disabled';
+
+ if ($w->{'_BE_popped'}) {
+ $w->Popdown;
+ $w->{'_BE_buttonHack'} = 0;
+ } else {
+ $w->PopupChoices;
+ $w->{'_BE_buttonHack'} = 1;
+ }
+}
+
+sub PopupChoices {
+ my ($w) = @_;
+
+ if (!$w->{'_BE_popped'}) {
+ $w->Callback(-listcmd => $w);
+ my $e = $w->Subwidget('entry');
+ my $c = $w->Subwidget('choices');
+ my $s = $w->Subwidget('slistbox');
+ my $a = $w->Subwidget('arrow');
+ my $y1 = ($w->{_BE_Style} eq 'MSWin32'
+ ? $a->rooty + $a->height
+ : $e->rooty + $e->height + 3
+ );
+ my $bd = $c->cget(-bd) + $c->cget(-highlightthickness);
+ # using the real listbox reqheight rather than the
+ # container frame one, which does not change after resizing the
+ # listbox
+ my $ht = $s->Subwidget("scrolled")->reqheight + 2 * $bd;
+ my $x1 = ($w->{_BE_Style} eq 'MSWin32'
+ ? $e->Subwidget("entry")->rootx
+ : $e->rootx
+ );
+ my ($width, $x2);
+ if (defined $w->cget(-listwidth)) {
+ $width = $w->cget(-listwidth);
+ $x2 = $x1 + $width;
+ } else {
+ $x2 = $a->rootx + $a->width;
+ $width = $x2 - $x1;
+ }
+ my $rw = $c->reqwidth;
+ if ($rw < $width) {
+ $rw = $width
+ } else {
+ if ($rw > $width * 3) {
+ $rw = $width * 3;
+ }
+ if ($rw > $w->vrootwidth) {
+ $rw = $w->vrootwidth;
+ }
+ }
+ $width = $rw;
+
+ # if listbox is too far right, pull it back to the left
+ #
+ if ($x2 > $w->vrootwidth) {
+ $x1 = $w->vrootwidth - $width;
+ }
+
+ # if listbox is too far left, pull it back to the right
+ #
+ if ($x1 < 0) {
+ $x1 = 0;
+ }
+
+ # if listbox is below bottom of screen, pull it up.
+ # check the Win32 taskbar, if possible
+ my $rootheight;
+ if ($Tk::platform eq 'MSWin32' and $^O eq 'MSWin32') {
+ eval {
+ require Win32Util; # XXX should not use a non-CPAN widget
+ $rootheight = (Win32Util::screen_region($w))[3];
+ };
+ }
+ if (!defined $rootheight) {
+ $rootheight = $w->vrootheight;
+ }
+
+ my $y2 = $y1 + $ht;
+ if ($y2 > $rootheight) {
+ $y1 = $y1 - $ht - ($e->height - 5);
+ }
+ $c->geometry(sprintf('%dx%d+%d+%d', $rw, $ht, $x1, $y1));
+ $c->deiconify;
+ $c->raise;
+ $e->focus;
+ $w->{'_BE_popped'} = 1;
+
+ # highlight current selection
+ my $current_sel = $e->get;
+ if (defined $current_sel) {
+ my $i = 0;
+ foreach my $str ($s->get(0, "end")) {
+ local $^W = 0; # in case of undefined strings
+ if ($str eq $current_sel) {
+ $s->selectionClear(0, "end");
+ $s->selectionSet($i);
+ last;
+ }
+ $i++;
+ }
+ }
+
+ $c->configure(-cursor => 'arrow');
+ $w->{'_BE_grabinfo'} = $w->grabSave;
+ $w->grabGlobal;
+ }
+}
+
+# choose value from listbox if appropriate
+sub LbChoose {
+ my ($w, $x, $y) = @_;
+ my $l = $w->Subwidget('slistbox')->Subwidget('listbox');
+ if ((($x < 0) || ($x > $l->Width)) ||
+ (($y < 0) || ($y > $l->Height))) {
+ # mouse was clicked outside the listbox... close the listbox
+ $w->LbClose;
+ } else {
+ # select appropriate entry and close the listbox
+ $w->LbCopySelection;
+ $w->Callback(-browsecmd, $w, $w->Subwidget('entry')->get());
+ $w->Callback(-browse2cmd => $w, $w->LbIndex);
+ }
+}
+
+# close the listbox after clearing selection
+sub LbClose {
+ my ($w) = @_;
+ my $l = $w->Subwidget('slistbox')->Subwidget('listbox');
+ $l->selection('clear', 0, 'end');
+ $w->Popdown;
+}
+
+# copy the selection to the entry and close listbox
+sub LbCopySelection {
+ my ($w) = @_;
+ my $index = $w->LbIndex;
+ if (defined $index) {
+ $w->{'_BE_curIndex'} = $index;
+ my $l = $w->Subwidget('slistbox')->Subwidget('listbox');
+ my $var_ref = $w->cget( '-textvariable' );
+ $$var_ref = $l->get($index);
+ if ($w->{'_BE_popped'}) {
+ $w->Popdown;
+ }
+ }
+ $w->Popdown;
+}
+
+sub LbIndex {
+ my ($w, $flag) = @_;
+ my ($sel) = $w->Subwidget('slistbox')->Subwidget('listbox')->curselection;
+ if (defined $sel) {
+ return int($sel);
+ } else {
+ if (defined $flag && ($flag eq 'emptyOK')) {
+ return undef;
+ } else {
+ return 0;
+ }
+ }
+}
+
+# pop down the listbox
+sub Popdown {
+ my ($w) = @_;
+ if ($w->{'_BE_savefocus'} && Tk::Exists($w->{'_BE_savefocus'})) {
+ $w->{'_BE_savefocus'}->focus;
+ delete $w->{'_BE_savefocus'};
+ }
+ if ($w->{'_BE_popped'}) {
+ my $c = $w->Subwidget('choices');
+ $c->withdraw;
+ $w->grabRelease;
+ if (ref $w->{'_BE_grabinfo'} eq 'CODE') {
+ $w->{'_BE_grabinfo'}->();
+ delete $w->{'_BE_grabinfo'};
+ }
+ $w->{'_BE_popped'} = 0;
+ }
+}
+
+# This hack is to prevent the ugliness of the arrow being depressed.
+#
+sub ButtonHack {
+ my ($w) = @_;
+ if ($w->{'_BE_buttonHack'}) {
+ my $b = $w->Subwidget('arrow');
+ if (Tk::Exists($b)) {
+ $b->butUp;
+ }
+ }
+}
+
+sub choices
+{
+ my ($w,$choices) = @_;
+ if (@_ > 1)
+ {
+ $w->delete( qw/0 end/ );
+ my %hash;
+ my $var = $w->cget('-textvariable');
+ my $old = $$var;
+ foreach my $val (@$choices)
+ {
+ local $^W = 0; # in case of undefined values
+ $w->insert( 'end', $val);
+ $hash{$val} = 1;
+ }
+ $old = $choices->[0]
+ if defined $old && !exists $hash{$old} && defined $choices->[0];
+ $$var = $old;
+ }
+ else
+ {
+ return( $w->get( qw/0 end/ ) );
+ }
+}
+
+sub _set_edit_state {
+ my( $w, $state ) = @_;
+
+ my $entry = $w->Subwidget( 'entry' );
+ my $button = $w->Subwidget( 'arrow' );
+
+ if ($w->cget( '-colorstate' )) {
+ my $color;
+ if( $state eq 'normal' ) { # Editable
+ $color = 'gray95';
+ } else { # Not Editable
+ $color = $w->cget( -background ) || 'lightgray';
+ }
+ $entry->Subwidget( 'entry' )->configure( -background => $color );
+ }
+
+ if( $state eq 'readonly' ) {
+ $entry->configure( -state => 'disabled' );
+ $button->configure( -state => 'normal' );
+ if ($w->{_BE_Style} eq 'MSWin32') {
+ $entry->bind('<1>',[$w,'BtnDown']);
+ $w->{_BE_OriginalCursor} = $entry->cget( -cursor );
+ $entry->configure( -cursor => 'left_ptr' );
+ }
+ } else {
+ $entry->configure( -state => $state );
+ if (exists $w->{_BE_OriginalCursor}) {
+ $entry->configure(-cursor => delete $w->{_BE_OriginalCursor});
+ }
+ $button->configure( -state => $state );
+ if ($w->{_BE_Style} eq 'MSWin32') {
+ $entry->bind('<1>',['Button1',Tk::Ev('x')]);
+ }
+ }
+}
+
+sub state {
+ my $w = shift;
+ unless( @_ ) {
+ return( $w->{Configure}{-state} );
+ } else {
+ my $state = shift;
+ $w->{Configure}{-state} = $state;
+ $w->_set_edit_state( $state );
+ }
+}
+
+sub _max {
+ my $max = shift;
+ foreach my $val (@_) {
+ $max = $val if $max < $val;
+ }
+ return( $max );
+}
+
+sub shrinkwrap {
+ my( $w, $size ) = @_;
+
+ unless( defined $size ) {
+ $size = _max( map( length, $w->get( qw/0 end/ ) ) ) || 0;;
+ }
+
+ my $lb = $w->Subwidget( 'slistbox' )->Subwidget( 'listbox' );
+ $w->configure( -width => $size );
+ $lb->configure( -width => $size );
+}
+
+sub limitheight {
+ my $w = shift;
+ my $choices_number = shift || $w->Subwidget('slistbox')->index("end");
+ $choices_number = 10 if $choices_number > 10;
+ $w->configure(-listheight => $choices_number) if ($choices_number > 0);
+}
+
+sub insert {
+ my $w = shift;
+ $w->Subwidget("slistbox")->insert(@_);
+ if ($w->cget(-autolimitheight)) {
+ $w->limitheight;
+ }
+ if ($w->cget(-autolistwidth)) {
+ $w->updateListWidth(@_[1..$#_]);
+ }
+}
+
+sub delete {
+ my $w = shift;
+ $w->Subwidget("slistbox")->delete(@_);
+ if ($w->cget(-autolimitheight)) {
+ $w->limitheight;
+ }
+ if ($w->cget(-autolistwidth)) {
+ $w->updateListWidth();
+ }
+}
+
+sub updateListWidth {
+ my $w = shift;
+ my @ins = @_;
+ if (!@ins) {
+ @ins = $w->get(0, "end");
+ }
+
+ my $max_width = 0;
+ foreach my $ins (@ins) {
+ my $new_width = $w->fontMeasure($w->cget(-font), $ins);
+ if ($new_width > $max_width) {
+ $max_width = $new_width;
+ }
+ }
+ if ($max_width > 20) { # be sane
+ $w->configure(-listwidth => $max_width + 32); # XXX for scrollbar
+ }
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pod b/Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pod
new file mode 100644
index 00000000000..98a547c4084
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/BrowseEntry.pod
@@ -0,0 +1,210 @@
+
+=head1 NAME
+
+Tk::BrowseEntry - entry widget with popup choices.
+
+=for pm Tixish/BrowseEntry.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+ use Tk::BrowseEntry;
+
+ $b = $frame->BrowseEntry(-label => "Label", -variable => \$var);
+ $b->insert("end", "opt1");
+ $b->insert("end", "opt2");
+ $b->insert("end", "opt3");
+ ...
+ $b->pack;
+
+=head1 SUPER-CLASS
+
+The C<BrowseEntry> class is derived from the C<Frame> class and
+inherits all the methods, options and subwidgets of its super-class.
+By default, options and methods are delegated to the entry subwidget.
+
+=head1 DESCRIPTION
+
+BrowseEntry is a poor man's ComboBox. It may be considered an
+enhanced version of LabEntry which provides a button to popup the
+choices of the possible values that the Entry may
+take. BrowseEntry supports all the options LabEntry supports
+except B<-textvariable>. This is replaced by B<-variable>. Other
+options that BrowseEntry supports:
+
+=over 4
+
+=item B<-arrowimage>
+
+Specifies the image to be used in the arrow button beside the entry
+widget. The default is an downward arrow image in the file cbxarrow.xbm
+
+=item B<-autolimitheight>
+
+If set to a true value, then the height of the listbox will be at most
+the number of entries in the list. The overall maximum of
+C<-listheight> still applies.
+
+=item B<-autolistwidth>
+
+If set to a true value, then the width of the listbox will match the
+width of the largest entry.
+
+=item B<-browsecmd>
+
+Specifies a function to call when a selection is made in the
+popped up listbox. It is passed the widget and the text of the
+entry selected. This function is called after the entry variable
+has been assigned the value.
+
+=item B<-browse2cmd>
+
+Like C<-browsecmd>, but the callback is called with the listbox index
+instead of the selected value.
+
+=item B<-buttontakefocus>
+
+Set the C<-takefocus> option of the button subwidget.
+
+=item B<-choices>
+
+Specifies the list of choices to pop up. This is a reference to an
+array of strings specifying the choices.
+
+=item B<-colorstate>
+
+The state of the widget is reflected by color. A non-editable entry
+widget will get a light gray background, while an editable entry will
+be almost white. [This may change]
+
+=item B<-listcmd>
+
+Specifies the function to call when the button next to the entry
+is pressed to popup the choices in the listbox. This is called before
+popping up the listbox, so can be used to populate the entries in
+the listbox.
+
+=item B<-listheight>
+
+Set the height of the listbox. See also C<-autolimitheight>.
+
+=item B<-listwidth>
+
+Specifies the width of the popup listbox.
+
+=item B<-state>
+
+Specifies one of three states for the widget: normal, readonly, or
+disabled. If the widget is disabled then the value may not be changed
+and the arrow button won't activate. If the widget is readonly, the
+entry may not be edited, but it may be changed by choosing a value
+from the popup listbox. normal is the default.
+
+=item B<-style>
+
+Set the "style" of the widget. Permitted values are C<MSWin32> and
+C<unix>. By default C<-style> is set to the current platform. Widgets
+with the C<unix> style will look like a normal C<BrowseEntry> widget,
+whereas with the C<MSWin32> style the arrow will look close to the
+Windows' standard combobox widget, while moving the mouse the entries
+will be highlighted, and probably includes other changes.
+
+=item B<-variable>
+
+Specifies the variable in which the entered value is to be stored.
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item B<insert(>I<index>, I<string>B<)>
+
+Inserts the text of I<string> at the specified I<index>. This string
+then becomes available as one of the choices.
+
+=item B<delete(>I<index1>, I<index2>B<)>
+
+Deletes items from I<index1> to I<index2>.
+
+=item B<get>
+
+The get method is delegated to the choices listbox.
+
+=back
+
+=head1 ADVERTISED WIDGETS
+
+The following widgets are advertised:
+
+=over
+
+=item entry
+
+The entry widget.
+
+=item arrow
+
+The button with the arrow image.
+
+=item choices
+
+The toplevel widget containing the choice listbox.
+
+=item slistbox
+
+The scrolled listbox with the choices.
+
+=back
+
+=head1 SUBCLASSING
+
+To make subclassing easier, the following methods may be overridden to
+use other standard widgets in composing the mega widget:
+
+=over
+
+=item LabEntryWidget
+
+A widget class compatible with Tk::LabEntry used for the entry.
+
+=item ButtonWidget
+
+A widget class compatible with Tk::Button used for the arrow button.
+
+=item ListboxWidget
+
+A widget class compatible with Tk::Listbox used for the choices
+listbox.
+
+=back
+
+For example to use a C<NumEntry> widget (from the Tk-GBARR CPAN
+distribution) instead of the normal C<Entry> widget:
+
+ package Tk::NumBrowseEntry;
+ use base qw(Tk::BrowseEntry);
+ use Tk::NumEntry;
+ Construct Tk::Widget 'NumBrowseEntry';
+ sub LabEntryWidget { "NumEntry" }
+
+=head1 BUGS
+
+BrowseEntry should really provide more of the ComboBox options.
+
+=head1 AUTHOR
+
+B<Rajappa Iyer> rsi@earthling.net
+
+B<Chris Dean> ctdean@cogit.com made additions.
+
+More additions by B<Slaven Rezic> slaven@rezic.de
+
+This code was inspired by ComboBox.tcl in Tix4.0 by Ioi Lam and
+bears more than a passing resemblance to ComboBox code. This may
+be distributed under the same conditions as Perl.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Button.pm b/Master/tlpkg/tlperl/lib/Tk/Button.pm
new file mode 100644
index 00000000000..b423f8caaa5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Button.pm
@@ -0,0 +1,247 @@
+package Tk::Button;
+# Conversion from Tk4.0 button.tcl competed.
+#
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+
+use vars qw($VERSION);
+$VERSION = '4.010'; # $Id: //depot/Tkutf8/Tk/Button.pm#8 $
+
+# modify it under the same terms as Perl itself, subject
+# to additional disclaimer in license.terms due to partial
+# derivation from Tk4.0 sources.
+
+use strict;
+
+require Tk::Widget;
+use base qw(Tk::Widget);
+
+use vars qw($buttonWindow $afterId $repeated);
+
+Tk::Methods('deselect','flash','invoke','select','toggle');
+
+sub Tk_cmd { \&Tk::button }
+
+Construct Tk::Widget 'Button';
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Enter>', 'Enter');
+ $mw->bind($class,'<Leave>', 'Leave');
+ $mw->bind($class,'<1>', 'butDown');
+ $mw->bind($class,'<ButtonRelease-1>', 'butUp');
+ $mw->bind($class,'<space>', 'Invoke');
+ $mw->bind($class,'<Return>', 'Invoke');
+ return $class;
+}
+
+# tkButtonEnter --
+# The procedure below is invoked when the mouse pointer enters a
+# button widget. It records the button we're in and changes the
+# state of the button to active unless the button is disabled.
+#
+# Arguments:
+# w - The name of the widget.
+
+sub Enter
+{
+ my $w = shift;
+ my $E = shift;
+ if ($w->cget('-state') ne 'disabled')
+ {
+ # On unix the state is active just with mouse-over
+ $w->configure(-state => 'active');
+
+ # If the mouse button is down, set the relief to sunken on entry.
+ # Overwise, if there's an -overrelief value, set the relief to that.
+ $w->{__relief__} = $w->cget('-relief');
+ if (defined $buttonWindow && $w == $buttonWindow)
+ {
+ $w->configure(-relief => 'sunken');
+ $w->{__prelief__} = 'sunken';
+ }
+ elsif ((my $over = $w->cget('-overrelief')) ne '')
+ {
+ $w->configure(-relief => $over);
+ $w->{__prelief__} = $over;
+ }
+ }
+ $Tk::window = $w;
+}
+
+# tkButtonLeave --
+# The procedure below is invoked when the mouse pointer leaves a
+# button widget. It changes the state of the button back to
+# inactive. If we're leaving the button window with a mouse button
+# pressed (tkPriv(buttonWindow) == $w), restore the relief of the
+# button too.
+#
+# Arguments:
+# w - The name of the widget.
+sub Leave
+{
+ my $w = shift;
+ $w->configure('-state'=>'normal') if ($w->cget('-state') ne 'disabled');
+ # Restore the original button relief if it was changed by Tk.
+ # That is signaled by the existence of Priv($w,prelief).
+ if (exists $w->{__relief__})
+ {
+ if (exists $w->{__prelief__} &&
+ $w->{__prelief__} eq $w->cget('-relief'))
+ {
+ $w->configure(-relief => $w->{__relief__});
+ }
+ delete $w->{__relief__};
+ delete $w->{__prelief__};
+ }
+ undef $Tk::window;
+}
+
+# tkButtonDown --
+# The procedure below is invoked when the mouse button is pressed in
+# a button widget. It records the fact that the mouse is in the button,
+# saves the button's relief so it can be restored later, and changes
+# the relief to sunken.
+#
+# Arguments:
+# w - The name of the widget.
+sub butDown
+{
+ my $w = shift;
+
+ # Only save the button's relief if it does not yet exist. If there
+ # is an overrelief setting, Priv($w,relief) will already have been set,
+ # and the current value of the -relief option will be incorrect.
+
+ if (!exists $w->{__relief__})
+ {
+ $w->{__relief__} = $w->cget('-relief');
+ }
+
+ if ($w->cget('-state') ne 'disabled')
+ {
+ $buttonWindow = $w;
+ $w->configure('-relief' => 'sunken', '-state' => 'active');
+ $w->{__prelief__} = 'sunken';
+
+ # If this button has a repeatdelay set up, get it going with an after
+ $w->afterCancel($afterId);
+ my $delay = $w->cget('-repeatdelay');
+ $repeated = 0;
+ if ($delay > 0)
+ {
+ $afterId = $w->after($delay, [$w, 'AutoInvoke']);
+ }
+ }
+}
+
+# tkButtonUp --
+# The procedure below is invoked when the mouse button is released
+# in a button widget. It restores the button's relief and invokes
+# the command as long as the mouse hasn't left the button.
+#
+# Arguments:
+# w - The name of the widget.
+sub butUp
+{
+ my $w = shift;
+ if (defined($buttonWindow) && $buttonWindow == $w)
+ {
+ undef $buttonWindow;
+
+ # Restore the button's relief if it was cached.
+ if (exists $w->{__relief__})
+ {
+ if (exists $w->{__prelief__} &&
+ $w->{__prelief__} eq $w->cget('-relief'))
+ {
+ $w->configure(-relief => $w->{__relief__});
+ }
+ delete $w->{__relief__};
+ delete $w->{__prelief__};
+ }
+
+ # Clean up the after event from the auto-repeater
+ $w->afterCancel($afterId);
+
+ if ($w->IS($Tk::window) && $w->cget('-state') ne 'disabled')
+ {
+ $w->configure(-state => 'normal');
+ # Only invoke the command if it wasn't already invoked by the
+ # auto-repeater functionality
+ if ($repeated == 0)
+ {
+ $w->invoke;
+ }
+ }
+ }
+}
+
+# tkButtonInvoke --
+# The procedure below is called when a button is invoked through
+# the keyboard. It simulate a press of the button via the mouse.
+#
+# Arguments:
+# w - The name of the widget.
+sub Invoke
+{
+ my $w = shift;
+ if ($w->cget('-state') ne 'disabled')
+ {
+ my $oldRelief = $w->cget('-relief');
+ my $oldState = $w->cget('-state');
+ $w->configure('-state' => 'active', '-relief' => 'sunken');
+ $w->idletasks;
+ $w->after(100);
+ $w->configure('-state' => $oldState, '-relief' => $oldRelief);
+ $w->invoke;
+ }
+}
+
+# ::tk::ButtonAutoInvoke --
+#
+# Invoke an auto-repeating button, and set it up to continue to repeat.
+#
+# Arguments:
+# w button to invoke.
+#
+# Results:
+# None.
+#
+# Side effects:
+# May create an after event to call ::tk::ButtonAutoInvoke.
+sub AutoInvoke
+{
+ my $w = shift;
+ $w->afterCancel($afterId);
+ my $delay = $w->cget('-repeatinterval');
+ if ($w->IS($Tk::window))
+ {
+ $repeated++;
+ $w->invoke;
+ }
+ if ($delay > 0)
+ {
+ $afterId = $w->after($delay, [$w, 'AutoInvoke']);
+ }
+}
+
+# Used for Tk::Widget::AmpWidget
+sub AmpWidgetPostHook
+{
+ my $w = shift;
+ $w->bind('<<AltUnderlined>>' => ['invoke']);
+}
+
+
+1;
+
+__END__
+
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Button.pod b/Master/tlpkg/tlperl/lib/Tk/Button.pod
new file mode 100644
index 00000000000..2eb6401ca9d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Button.pod
@@ -0,0 +1,255 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Button - Create and manipulate Button widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$button> = I<$parent>-E<gt>B<Button>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground>
+B<-activeforeground>
+B<-anchor>
+B<-background>
+B<-bitmap>
+B<-borderwidth>
+B<-compound>
+B<-cursor>
+B<-disabledforeground>
+B<-font>
+B<-foreground>
+B<-highlightbackground>
+B<-highlightcolor>
+B<-highlightthickness>
+B<-image>
+B<-justify>
+B<-padx>
+B<-pady>
+B<-relief>
+B<-repeatdelay>
+B<-repeatinterval>
+B<-takefocus>
+B<-text>
+B<-textvariable>
+B<-underline>
+B<-wraplength>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies a L<Perl/Tk callback|Tk::callbacks> to associate with the
+button. This command is typically invoked when mouse button 1 is
+released over the button window.
+
+=item Command-Line Name: B<-compound>
+
+=item Database Name: B<compound>
+
+=item Database Class: B<Compound>
+
+Specifies whether the button should display both an image and text,
+and if so, where the image should be placed relative to the text.
+Valid values for this option are B<bottom>, B<center>, B<left>,
+B<none>, B<right> and B<top>. The default value is B<none>, meaning
+that the button will display either an image or text, depending on the
+values of the -image and -bitmap options.
+
+=item Name: B<default>
+
+=item Class: B<Default>
+
+=item Switch: B<-default>
+
+Specifies one of three states for the default ring: B<normal>,
+B<active>, or B<disabled>. In active state, the button is drawn
+with the platform specific appearance for a default button. In normal
+state, the button is drawn with the platform specific appearance for a
+non-default button, leaving enough space to draw the default button
+appearance. The normal and active states will result in buttons of
+the same size. In disabled state, the button is drawn with the
+non-default button appearance without leaving space for the default
+appearance. The disabled state may result in a smaller button than
+the active state.
+ring.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies a desired height for the button.
+If an image or bitmap is being displayed in the button then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in lines of text.
+If this option isn't specified, the button's desired height is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=item Command-Line Name: B<-overrelief>
+
+=item Database Name: B<overRelief>
+
+=item Database Class: B<OverRelief>
+
+Specifies an alternative relief for the button, to be used when
+the mouse cursor is over the widget. This option can be used to
+make toolbar buttons, by configuring B<-relief flat -overrelief
+raised>. If the value of this option is the empty string, then
+no alternative relief is used when the mouse cursor is over the
+button. The empty string is the default value.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of three states for the button: B<normal>, B<active>,
+or B<disabled>. In normal state the button is displayed using the
+B<foreground> and B<background> options. The active state is
+typically used when the pointer is over the button. In active state
+the button is displayed using the B<activeForeground> and
+B<activeBackground> options. Disabled state means that the button
+should be insensitive: the default bindings will refuse to activate
+the widget and will ignore mouse button presses.
+In this state the B<disabledForeground> and
+B<background> options determine how the button is displayed.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies a desired width for the button.
+If an image or bitmap is being displayed in the button then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in characters.
+If this option isn't specified, the button's desired width is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Button> method creates a new window (given by the
+$widget argument) and makes it into a button widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the button such as its colors, font,
+text, and initial relief. The B<button> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A button is a widget that displays a textual string, bitmap or image.
+If text is displayed, it must all be in a single font, but it
+can occupy multiple lines on the screen (if it contains newlines
+or if wrapping occurs because of the B<-wraplength> option) and
+one of the characters may optionally be underlined using the
+B<-underline> option.
+It can display itself in either of three different ways, according
+to
+the B<-state> option;
+it can be made to appear raised, sunken, or flat;
+and it can be made to flash. When a user invokes the
+button (by pressing mouse button 1 with the cursor over the
+button), then the L<perl/Tk callback|Tk::callbacks> specified in the B<-command>
+option is invoked.
+
+=head1 WIDGET METHODS
+
+The B<Button> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for button widgets:
+
+=over 4
+
+=item I<$button>-E<gt>B<flash>
+
+Flash the button. This is accomplished by redisplaying the button
+several times, alternating between active and normal colors. At
+the end of the flash the button is left in the same normal/active
+state as when the command was invoked.
+This command is ignored if the button's state is B<disabled>.
+
+=item I<$button>-E<gt>B<invoke>
+
+Invoke the L<callback|Tk::callbacks> associated with the buttons
+B<-command> option, if there is one.
+The return value is the return value from the callback, or the
+undefined value if there is no callback associated with the button.
+This command is ignored if the button's state is B<disabled>.
+
+=back
+
+=head1 DEFAULT BINDINGS
+
+Tk automatically creates class bindings for buttons that give them
+default behavior:
+
+=over 4
+
+=item [1]
+
+A button activates whenever the mouse passes over it and deactivates
+whenever the mouse leaves the button.
+Under Windows, this binding is only active when mouse button 1 has
+been pressed over the button.
+
+=item [2]
+
+A button's relief is changed to sunken whenever mouse button 1 is
+pressed over the button, and the relief is restored to its original
+value when button 1 is later released.
+
+=item [3]
+
+If mouse button 1 is pressed over a button and later released over
+the button, the button is invoked. However, if the mouse is not
+over the button when button 1 is released, then no invocation occurs.
+
+=item [4]
+
+When a button has the input focus, the space key causes the button
+to be invoked.
+
+If the button's state is B<disabled> then none of the above
+actions occur: the button is completely non-responsive.
+
+The behavior of buttons can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 KEYWORDS
+
+button, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Camel.xpm b/Master/tlpkg/tlperl/lib/Tk/Camel.xpm
new file mode 100644
index 00000000000..ba33c0149ec
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Camel.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static char *Camel[] = {
+/* width height num_colors chars_per_pixel */
+" 32 32 2 1",
+/* colors */
+". c #ffffff",
+"# c #7f7f00",
+/* pixels */
+"................................",
+"................................",
+"...................###..........",
+".......####......######.........",
+"....####.##.....########........",
+"....########....#########.......",
+"......######..###########.......",
+"......#####..#############......",
+".....######.##############......",
+".....######.###############.....",
+".....######################.....",
+".....#######################....",
+".....#######################....",
+"......#######################...",
+".......####################.#...",
+"........###################.#...",
+"........###############.###.#...",
+"............#######.###.###.#...",
+"............###.###.##...##.....",
+"............###.###..#...##.....",
+"............##.####..#....#.....",
+"............##.###...#....#.....",
+"............##.##...#.....#.....",
+"............#...#...#.....#.....",
+"............#....#..#.....#.....",
+"............#.....#.#.....#.....",
+"............#.....###.....#.....",
+"...........##....##.#....#......",
+"...........#..............#.....",
+".........###.............#......"
+"................................",
+"................................",
+};
diff --git a/Master/tlpkg/tlperl/lib/Tk/Canvas.pm b/Master/tlpkg/tlperl/lib/Tk/Canvas.pm
new file mode 100644
index 00000000000..beaa2a13866
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Canvas.pm
@@ -0,0 +1,1436 @@
+package Tk::Canvas;
+use vars qw($VERSION);
+$VERSION = '4.013'; # sprintf '4.%03d', q$Revision: #12 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw($XS_VERSION);
+
+use base qw(Tk::Widget);
+Construct Tk::Widget 'Canvas';
+
+bootstrap Tk::Canvas;
+
+sub Tk_cmd { \&Tk::canvas }
+
+Tk::Methods('addtag','bbox','bind','canvasx','canvasy','coords','create',
+ 'dchars','delete','dtag','find','focus','gettags','icursor',
+ 'index','insert','itemcget','itemconfigure','lower','move',
+ 'postscript','raise','scale','scan','select','type','xview','yview');
+
+use Tk::Submethods ( 'create' => [qw(arc bitmap grid group image line oval
+ polygon rectangle text window)],
+ 'scan' => [qw(mark dragto)],
+ 'select' => [qw(from clear item to)],
+ 'xview' => [qw(moveto scroll)],
+ 'yview' => [qw(moveto scroll)],
+ );
+
+*CanvasBind = \&Tk::bind;
+*CanvasFocus = \&Tk::focus;
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->XYscrollBind($class);
+ return $class;
+}
+
+sub BalloonInfo
+{
+ my ($canvas,$balloon,$X,$Y,@opt) = @_;
+ my @tags = ($canvas->find('withtag', 'current'),$canvas->gettags('current'));
+ foreach my $opt (@opt)
+ {
+ my $info = $balloon->GetOption($opt,$canvas);
+ if ($opt =~ /^-(statusmsg|balloonmsg)$/ && UNIVERSAL::isa($info,'HASH'))
+ {
+ $balloon->Subclient($tags[0]);
+ foreach my $tag (@tags)
+ {
+ return $info->{$tag} if exists $info->{$tag};
+ }
+ return '';
+ }
+ return $info;
+ }
+}
+
+sub get_corners
+{
+ my $c = shift;
+ my(@xview) = $c->xview;
+ my(@yview) = $c->yview;
+ my(@scrollregion) = @{$c->cget(-scrollregion)};
+ return (
+ $xview[0] * ($scrollregion[2]-$scrollregion[0]) + $scrollregion[0],
+ $yview[0] * ($scrollregion[3]-$scrollregion[1]) + $scrollregion[1],
+ $xview[1] * ($scrollregion[2]-$scrollregion[0]) + $scrollregion[0],
+ $yview[1] * ($scrollregion[3]-$scrollregion[1]) + $scrollregion[1],
+ );
+}
+
+# List of adobe glyph names. Converted from glyphlist.txt, downloaded
+# from Adobe
+
+$Tk::psglyphs = {qw(
+ 0020 space
+ 0021 exclam
+ 0022 quotedbl
+ 0023 numbersign
+ 0024 dollar
+ 0025 percent
+ 0026 ampersand
+ 0027 quotesingle
+ 0028 parenleft
+ 0029 parenright
+ 002A asterisk
+ 002B plus
+ 002C comma
+ 002D hyphen
+ 002E period
+ 002F slash
+ 0030 zero
+ 0031 one
+ 0032 two
+ 0033 three
+ 0034 four
+ 0035 five
+ 0036 six
+ 0037 seven
+ 0038 eight
+ 0039 nine
+ 003A colon
+ 003B semicolon
+ 003C less
+ 003D equal
+ 003E greater
+ 003F question
+ 0040 at
+ 0041 A
+ 0042 B
+ 0043 C
+ 0044 D
+ 0045 E
+ 0046 F
+ 0047 G
+ 0048 H
+ 0049 I
+ 004A J
+ 004B K
+ 004C L
+ 004D M
+ 004E N
+ 004F O
+ 0050 P
+ 0051 Q
+ 0052 R
+ 0053 S
+ 0054 T
+ 0055 U
+ 0056 V
+ 0057 W
+ 0058 X
+ 0059 Y
+ 005A Z
+ 005B bracketleft
+ 005C backslash
+ 005D bracketright
+ 005E asciicircum
+ 005F underscore
+ 0060 grave
+ 0061 a
+ 0062 b
+ 0063 c
+ 0064 d
+ 0065 e
+ 0066 f
+ 0067 g
+ 0068 h
+ 0069 i
+ 006A j
+ 006B k
+ 006C l
+ 006D m
+ 006E n
+ 006F o
+ 0070 p
+ 0071 q
+ 0072 r
+ 0073 s
+ 0074 t
+ 0075 u
+ 0076 v
+ 0077 w
+ 0078 x
+ 0079 y
+ 007A z
+ 007B braceleft
+ 007C bar
+ 007D braceright
+ 007E asciitilde
+ 00A0 space
+ 00A1 exclamdown
+ 00A2 cent
+ 00A3 sterling
+ 00A4 currency
+ 00A5 yen
+ 00A6 brokenbar
+ 00A7 section
+ 00A8 dieresis
+ 00A9 copyright
+ 00AA ordfeminine
+ 00AB guillemotleft
+ 00AC logicalnot
+ 00AD hyphen
+ 00AE registered
+ 00AF macron
+ 00B0 degree
+ 00B1 plusminus
+ 00B2 twosuperior
+ 00B3 threesuperior
+ 00B4 acute
+ 00B5 mu
+ 00B6 paragraph
+ 00B7 periodcentered
+ 00B8 cedilla
+ 00B9 onesuperior
+ 00BA ordmasculine
+ 00BB guillemotright
+ 00BC onequarter
+ 00BD onehalf
+ 00BE threequarters
+ 00BF questiondown
+ 00C0 Agrave
+ 00C1 Aacute
+ 00C2 Acircumflex
+ 00C3 Atilde
+ 00C4 Adieresis
+ 00C5 Aring
+ 00C6 AE
+ 00C7 Ccedilla
+ 00C8 Egrave
+ 00C9 Eacute
+ 00CA Ecircumflex
+ 00CB Edieresis
+ 00CC Igrave
+ 00CD Iacute
+ 00CE Icircumflex
+ 00CF Idieresis
+ 00D0 Eth
+ 00D1 Ntilde
+ 00D2 Ograve
+ 00D3 Oacute
+ 00D4 Ocircumflex
+ 00D5 Otilde
+ 00D6 Odieresis
+ 00D7 multiply
+ 00D8 Oslash
+ 00D9 Ugrave
+ 00DA Uacute
+ 00DB Ucircumflex
+ 00DC Udieresis
+ 00DD Yacute
+ 00DE Thorn
+ 00DF germandbls
+ 00E0 agrave
+ 00E1 aacute
+ 00E2 acircumflex
+ 00E3 atilde
+ 00E4 adieresis
+ 00E5 aring
+ 00E6 ae
+ 00E7 ccedilla
+ 00E8 egrave
+ 00E9 eacute
+ 00EA ecircumflex
+ 00EB edieresis
+ 00EC igrave
+ 00ED iacute
+ 00EE icircumflex
+ 00EF idieresis
+ 00F0 eth
+ 00F1 ntilde
+ 00F2 ograve
+ 00F3 oacute
+ 00F4 ocircumflex
+ 00F5 otilde
+ 00F6 odieresis
+ 00F7 divide
+ 00F8 oslash
+ 00F9 ugrave
+ 00FA uacute
+ 00FB ucircumflex
+ 00FC udieresis
+ 00FD yacute
+ 00FE thorn
+ 00FF ydieresis
+ 0100 Amacron
+ 0101 amacron
+ 0102 Abreve
+ 0103 abreve
+ 0104 Aogonek
+ 0105 aogonek
+ 0106 Cacute
+ 0107 cacute
+ 0108 Ccircumflex
+ 0109 ccircumflex
+ 010A Cdotaccent
+ 010B cdotaccent
+ 010C Ccaron
+ 010D ccaron
+ 010E Dcaron
+ 010F dcaron
+ 0110 Dcroat
+ 0111 dcroat
+ 0112 Emacron
+ 0113 emacron
+ 0114 Ebreve
+ 0115 ebreve
+ 0116 Edotaccent
+ 0117 edotaccent
+ 0118 Eogonek
+ 0119 eogonek
+ 011A Ecaron
+ 011B ecaron
+ 011C Gcircumflex
+ 011D gcircumflex
+ 011E Gbreve
+ 011F gbreve
+ 0120 Gdotaccent
+ 0121 gdotaccent
+ 0122 Gcommaaccent
+ 0123 gcommaaccent
+ 0124 Hcircumflex
+ 0125 hcircumflex
+ 0126 Hbar
+ 0127 hbar
+ 0128 Itilde
+ 0129 itilde
+ 012A Imacron
+ 012B imacron
+ 012C Ibreve
+ 012D ibreve
+ 012E Iogonek
+ 012F iogonek
+ 0130 Idotaccent
+ 0131 dotlessi
+ 0132 IJ
+ 0133 ij
+ 0134 Jcircumflex
+ 0135 jcircumflex
+ 0136 Kcommaaccent
+ 0137 kcommaaccent
+ 0138 kgreenlandic
+ 0139 Lacute
+ 013A lacute
+ 013B Lcommaaccent
+ 013C lcommaaccent
+ 013D Lcaron
+ 013E lcaron
+ 013F Ldot
+ 0140 ldot
+ 0141 Lslash
+ 0142 lslash
+ 0143 Nacute
+ 0144 nacute
+ 0145 Ncommaaccent
+ 0146 ncommaaccent
+ 0147 Ncaron
+ 0148 ncaron
+ 0149 napostrophe
+ 014A Eng
+ 014B eng
+ 014C Omacron
+ 014D omacron
+ 014E Obreve
+ 014F obreve
+ 0150 Ohungarumlaut
+ 0151 ohungarumlaut
+ 0152 OE
+ 0153 oe
+ 0154 Racute
+ 0155 racute
+ 0156 Rcommaaccent
+ 0157 rcommaaccent
+ 0158 Rcaron
+ 0159 rcaron
+ 015A Sacute
+ 015B sacute
+ 015C Scircumflex
+ 015D scircumflex
+ 015E Scedilla
+ 015F scedilla
+ 0160 Scaron
+ 0161 scaron
+ 0162 Tcommaaccent
+ 0163 tcommaaccent
+ 0164 Tcaron
+ 0165 tcaron
+ 0166 Tbar
+ 0167 tbar
+ 0168 Utilde
+ 0169 utilde
+ 016A Umacron
+ 016B umacron
+ 016C Ubreve
+ 016D ubreve
+ 016E Uring
+ 016F uring
+ 0170 Uhungarumlaut
+ 0171 uhungarumlaut
+ 0172 Uogonek
+ 0173 uogonek
+ 0174 Wcircumflex
+ 0175 wcircumflex
+ 0176 Ycircumflex
+ 0177 ycircumflex
+ 0178 Ydieresis
+ 0179 Zacute
+ 017A zacute
+ 017B Zdotaccent
+ 017C zdotaccent
+ 017D Zcaron
+ 017E zcaron
+ 017F longs
+ 0192 florin
+ 01A0 Ohorn
+ 01A1 ohorn
+ 01AF Uhorn
+ 01B0 uhorn
+ 01E6 Gcaron
+ 01E7 gcaron
+ 01FA Aringacute
+ 01FB aringacute
+ 01FC AEacute
+ 01FD aeacute
+ 01FE Oslashacute
+ 01FF oslashacute
+ 0218 Scommaaccent
+ 0219 scommaaccent
+ 021A Tcommaaccent
+ 021B tcommaaccent
+ 02BC afii57929
+ 02BD afii64937
+ 02C6 circumflex
+ 02C7 caron
+ 02C9 macron
+ 02D8 breve
+ 02D9 dotaccent
+ 02DA ring
+ 02DB ogonek
+ 02DC tilde
+ 02DD hungarumlaut
+ 0300 gravecomb
+ 0301 acutecomb
+ 0303 tildecomb
+ 0309 hookabovecomb
+ 0323 dotbelowcomb
+ 0384 tonos
+ 0385 dieresistonos
+ 0386 Alphatonos
+ 0387 anoteleia
+ 0388 Epsilontonos
+ 0389 Etatonos
+ 038A Iotatonos
+ 038C Omicrontonos
+ 038E Upsilontonos
+ 038F Omegatonos
+ 0390 iotadieresistonos
+ 0391 Alpha
+ 0392 Beta
+ 0393 Gamma
+ 0394 Delta
+ 0395 Epsilon
+ 0396 Zeta
+ 0397 Eta
+ 0398 Theta
+ 0399 Iota
+ 039A Kappa
+ 039B Lambda
+ 039C Mu
+ 039D Nu
+ 039E Xi
+ 039F Omicron
+ 03A0 Pi
+ 03A1 Rho
+ 03A3 Sigma
+ 03A4 Tau
+ 03A5 Upsilon
+ 03A6 Phi
+ 03A7 Chi
+ 03A8 Psi
+ 03A9 Omega
+ 03AA Iotadieresis
+ 03AB Upsilondieresis
+ 03AC alphatonos
+ 03AD epsilontonos
+ 03AE etatonos
+ 03AF iotatonos
+ 03B0 upsilondieresistonos
+ 03B1 alpha
+ 03B2 beta
+ 03B3 gamma
+ 03B4 delta
+ 03B5 epsilon
+ 03B6 zeta
+ 03B7 eta
+ 03B8 theta
+ 03B9 iota
+ 03BA kappa
+ 03BB lambda
+ 03BC mu
+ 03BD nu
+ 03BE xi
+ 03BF omicron
+ 03C0 pi
+ 03C1 rho
+ 03C2 sigma1
+ 03C3 sigma
+ 03C4 tau
+ 03C5 upsilon
+ 03C6 phi
+ 03C7 chi
+ 03C8 psi
+ 03C9 omega
+ 03CA iotadieresis
+ 03CB upsilondieresis
+ 03CC omicrontonos
+ 03CD upsilontonos
+ 03CE omegatonos
+ 03D1 theta1
+ 03D2 Upsilon1
+ 03D5 phi1
+ 03D6 omega1
+ 0401 afii10023
+ 0402 afii10051
+ 0403 afii10052
+ 0404 afii10053
+ 0405 afii10054
+ 0406 afii10055
+ 0407 afii10056
+ 0408 afii10057
+ 0409 afii10058
+ 040A afii10059
+ 040B afii10060
+ 040C afii10061
+ 040E afii10062
+ 040F afii10145
+ 0410 afii10017
+ 0411 afii10018
+ 0412 afii10019
+ 0413 afii10020
+ 0414 afii10021
+ 0415 afii10022
+ 0416 afii10024
+ 0417 afii10025
+ 0418 afii10026
+ 0419 afii10027
+ 041A afii10028
+ 041B afii10029
+ 041C afii10030
+ 041D afii10031
+ 041E afii10032
+ 041F afii10033
+ 0420 afii10034
+ 0421 afii10035
+ 0422 afii10036
+ 0423 afii10037
+ 0424 afii10038
+ 0425 afii10039
+ 0426 afii10040
+ 0427 afii10041
+ 0428 afii10042
+ 0429 afii10043
+ 042A afii10044
+ 042B afii10045
+ 042C afii10046
+ 042D afii10047
+ 042E afii10048
+ 042F afii10049
+ 0430 afii10065
+ 0431 afii10066
+ 0432 afii10067
+ 0433 afii10068
+ 0434 afii10069
+ 0435 afii10070
+ 0436 afii10072
+ 0437 afii10073
+ 0438 afii10074
+ 0439 afii10075
+ 043A afii10076
+ 043B afii10077
+ 043C afii10078
+ 043D afii10079
+ 043E afii10080
+ 043F afii10081
+ 0440 afii10082
+ 0441 afii10083
+ 0442 afii10084
+ 0443 afii10085
+ 0444 afii10086
+ 0445 afii10087
+ 0446 afii10088
+ 0447 afii10089
+ 0448 afii10090
+ 0449 afii10091
+ 044A afii10092
+ 044B afii10093
+ 044C afii10094
+ 044D afii10095
+ 044E afii10096
+ 044F afii10097
+ 0451 afii10071
+ 0452 afii10099
+ 0453 afii10100
+ 0454 afii10101
+ 0455 afii10102
+ 0456 afii10103
+ 0457 afii10104
+ 0458 afii10105
+ 0459 afii10106
+ 045A afii10107
+ 045B afii10108
+ 045C afii10109
+ 045E afii10110
+ 045F afii10193
+ 0462 afii10146
+ 0463 afii10194
+ 0472 afii10147
+ 0473 afii10195
+ 0474 afii10148
+ 0475 afii10196
+ 0490 afii10050
+ 0491 afii10098
+ 04D9 afii10846
+ 05B0 afii57799
+ 05B1 afii57801
+ 05B2 afii57800
+ 05B3 afii57802
+ 05B4 afii57793
+ 05B5 afii57794
+ 05B6 afii57795
+ 05B7 afii57798
+ 05B8 afii57797
+ 05B9 afii57806
+ 05BB afii57796
+ 05BC afii57807
+ 05BD afii57839
+ 05BE afii57645
+ 05BF afii57841
+ 05C0 afii57842
+ 05C1 afii57804
+ 05C2 afii57803
+ 05C3 afii57658
+ 05D0 afii57664
+ 05D1 afii57665
+ 05D2 afii57666
+ 05D3 afii57667
+ 05D4 afii57668
+ 05D5 afii57669
+ 05D6 afii57670
+ 05D7 afii57671
+ 05D8 afii57672
+ 05D9 afii57673
+ 05DA afii57674
+ 05DB afii57675
+ 05DC afii57676
+ 05DD afii57677
+ 05DE afii57678
+ 05DF afii57679
+ 05E0 afii57680
+ 05E1 afii57681
+ 05E2 afii57682
+ 05E3 afii57683
+ 05E4 afii57684
+ 05E5 afii57685
+ 05E6 afii57686
+ 05E7 afii57687
+ 05E8 afii57688
+ 05E9 afii57689
+ 05EA afii57690
+ 05F0 afii57716
+ 05F1 afii57717
+ 05F2 afii57718
+ 060C afii57388
+ 061B afii57403
+ 061F afii57407
+ 0621 afii57409
+ 0622 afii57410
+ 0623 afii57411
+ 0624 afii57412
+ 0625 afii57413
+ 0626 afii57414
+ 0627 afii57415
+ 0628 afii57416
+ 0629 afii57417
+ 062A afii57418
+ 062B afii57419
+ 062C afii57420
+ 062D afii57421
+ 062E afii57422
+ 062F afii57423
+ 0630 afii57424
+ 0631 afii57425
+ 0632 afii57426
+ 0633 afii57427
+ 0634 afii57428
+ 0635 afii57429
+ 0636 afii57430
+ 0637 afii57431
+ 0638 afii57432
+ 0639 afii57433
+ 063A afii57434
+ 0640 afii57440
+ 0641 afii57441
+ 0642 afii57442
+ 0643 afii57443
+ 0644 afii57444
+ 0645 afii57445
+ 0646 afii57446
+ 0647 afii57470
+ 0648 afii57448
+ 0649 afii57449
+ 064A afii57450
+ 064B afii57451
+ 064C afii57452
+ 064D afii57453
+ 064E afii57454
+ 064F afii57455
+ 0650 afii57456
+ 0651 afii57457
+ 0652 afii57458
+ 0660 afii57392
+ 0661 afii57393
+ 0662 afii57394
+ 0663 afii57395
+ 0664 afii57396
+ 0665 afii57397
+ 0666 afii57398
+ 0667 afii57399
+ 0668 afii57400
+ 0669 afii57401
+ 066A afii57381
+ 066D afii63167
+ 0679 afii57511
+ 067E afii57506
+ 0686 afii57507
+ 0688 afii57512
+ 0691 afii57513
+ 0698 afii57508
+ 06A4 afii57505
+ 06AF afii57509
+ 06BA afii57514
+ 06D2 afii57519
+ 06D5 afii57534
+ 1E80 Wgrave
+ 1E81 wgrave
+ 1E82 Wacute
+ 1E83 wacute
+ 1E84 Wdieresis
+ 1E85 wdieresis
+ 1EF2 Ygrave
+ 1EF3 ygrave
+ 200C afii61664
+ 200D afii301
+ 200E afii299
+ 200F afii300
+ 2012 figuredash
+ 2013 endash
+ 2014 emdash
+ 2015 afii00208
+ 2017 underscoredbl
+ 2018 quoteleft
+ 2019 quoteright
+ 201A quotesinglbase
+ 201B quotereversed
+ 201C quotedblleft
+ 201D quotedblright
+ 201E quotedblbase
+ 2020 dagger
+ 2021 daggerdbl
+ 2022 bullet
+ 2024 onedotenleader
+ 2025 twodotenleader
+ 2026 ellipsis
+ 202C afii61573
+ 202D afii61574
+ 202E afii61575
+ 2030 perthousand
+ 2032 minute
+ 2033 second
+ 2039 guilsinglleft
+ 203A guilsinglright
+ 203C exclamdbl
+ 2044 fraction
+ 2070 zerosuperior
+ 2074 foursuperior
+ 2075 fivesuperior
+ 2076 sixsuperior
+ 2077 sevensuperior
+ 2078 eightsuperior
+ 2079 ninesuperior
+ 207D parenleftsuperior
+ 207E parenrightsuperior
+ 207F nsuperior
+ 2080 zeroinferior
+ 2081 oneinferior
+ 2082 twoinferior
+ 2083 threeinferior
+ 2084 fourinferior
+ 2085 fiveinferior
+ 2086 sixinferior
+ 2087 seveninferior
+ 2088 eightinferior
+ 2089 nineinferior
+ 208D parenleftinferior
+ 208E parenrightinferior
+ 20A1 colonmonetary
+ 20A3 franc
+ 20A4 lira
+ 20A7 peseta
+ 20AA afii57636
+ 20AB dong
+ 20AC Euro
+ 2105 afii61248
+ 2111 Ifraktur
+ 2113 afii61289
+ 2116 afii61352
+ 2118 weierstrass
+ 211C Rfraktur
+ 211E prescription
+ 2122 trademark
+ 2126 Omega
+ 212E estimated
+ 2135 aleph
+ 2153 onethird
+ 2154 twothirds
+ 215B oneeighth
+ 215C threeeighths
+ 215D fiveeighths
+ 215E seveneighths
+ 2190 arrowleft
+ 2191 arrowup
+ 2192 arrowright
+ 2193 arrowdown
+ 2194 arrowboth
+ 2195 arrowupdn
+ 21A8 arrowupdnbse
+ 21B5 carriagereturn
+ 21D0 arrowdblleft
+ 21D1 arrowdblup
+ 21D2 arrowdblright
+ 21D3 arrowdbldown
+ 21D4 arrowdblboth
+ 2200 universal
+ 2202 partialdiff
+ 2203 existential
+ 2205 emptyset
+ 2206 Delta
+ 2207 gradient
+ 2208 element
+ 2209 notelement
+ 220B suchthat
+ 220F product
+ 2211 summation
+ 2212 minus
+ 2215 fraction
+ 2217 asteriskmath
+ 2219 periodcentered
+ 221A radical
+ 221D proportional
+ 221E infinity
+ 221F orthogonal
+ 2220 angle
+ 2227 logicaland
+ 2228 logicalor
+ 2229 intersection
+ 222A union
+ 222B integral
+ 2234 therefore
+ 223C similar
+ 2245 congruent
+ 2248 approxequal
+ 2260 notequal
+ 2261 equivalence
+ 2264 lessequal
+ 2265 greaterequal
+ 2282 propersubset
+ 2283 propersuperset
+ 2284 notsubset
+ 2286 reflexsubset
+ 2287 reflexsuperset
+ 2295 circleplus
+ 2297 circlemultiply
+ 22A5 perpendicular
+ 22C5 dotmath
+ 2302 house
+ 2310 revlogicalnot
+ 2320 integraltp
+ 2321 integralbt
+ 2329 angleleft
+ 232A angleright
+ 2500 SF100000
+ 2502 SF110000
+ 250C SF010000
+ 2510 SF030000
+ 2514 SF020000
+ 2518 SF040000
+ 251C SF080000
+ 2524 SF090000
+ 252C SF060000
+ 2534 SF070000
+ 253C SF050000
+ 2550 SF430000
+ 2551 SF240000
+ 2552 SF510000
+ 2553 SF520000
+ 2554 SF390000
+ 2555 SF220000
+ 2556 SF210000
+ 2557 SF250000
+ 2558 SF500000
+ 2559 SF490000
+ 255A SF380000
+ 255B SF280000
+ 255C SF270000
+ 255D SF260000
+ 255E SF360000
+ 255F SF370000
+ 2560 SF420000
+ 2561 SF190000
+ 2562 SF200000
+ 2563 SF230000
+ 2564 SF470000
+ 2565 SF480000
+ 2566 SF410000
+ 2567 SF450000
+ 2568 SF460000
+ 2569 SF400000
+ 256A SF540000
+ 256B SF530000
+ 256C SF440000
+ 2580 upblock
+ 2584 dnblock
+ 2588 block
+ 258C lfblock
+ 2590 rtblock
+ 2591 ltshade
+ 2592 shade
+ 2593 dkshade
+ 25A0 filledbox
+ 25A1 H22073
+ 25AA H18543
+ 25AB H18551
+ 25AC filledrect
+ 25B2 triagup
+ 25BA triagrt
+ 25BC triagdn
+ 25C4 triaglf
+ 25CA lozenge
+ 25CB circle
+ 25CF H18533
+ 25D8 invbullet
+ 25D9 invcircle
+ 25E6 openbullet
+ 263A smileface
+ 263B invsmileface
+ 263C sun
+ 2640 female
+ 2642 male
+ 2660 spade
+ 2663 club
+ 2665 heart
+ 2666 diamond
+ 266A musicalnote
+ 266B musicalnotedbl
+ F6BE dotlessj
+ F6BF LL
+ F6C0 ll
+ F6C1 Scedilla
+ F6C2 scedilla
+ F6C3 commaaccent
+ F6C4 afii10063
+ F6C5 afii10064
+ F6C6 afii10192
+ F6C7 afii10831
+ F6C8 afii10832
+ F6C9 Acute
+ F6CA Caron
+ F6CB Dieresis
+ F6CC DieresisAcute
+ F6CD DieresisGrave
+ F6CE Grave
+ F6CF Hungarumlaut
+ F6D0 Macron
+ F6D1 cyrBreve
+ F6D2 cyrFlex
+ F6D3 dblGrave
+ F6D4 cyrbreve
+ F6D5 cyrflex
+ F6D6 dblgrave
+ F6D7 dieresisacute
+ F6D8 dieresisgrave
+ F6D9 copyrightserif
+ F6DA registerserif
+ F6DB trademarkserif
+ F6DC onefitted
+ F6DD rupiah
+ F6DE threequartersemdash
+ F6DF centinferior
+ F6E0 centsuperior
+ F6E1 commainferior
+ F6E2 commasuperior
+ F6E3 dollarinferior
+ F6E4 dollarsuperior
+ F6E5 hypheninferior
+ F6E6 hyphensuperior
+ F6E7 periodinferior
+ F6E8 periodsuperior
+ F6E9 asuperior
+ F6EA bsuperior
+ F6EB dsuperior
+ F6EC esuperior
+ F6ED isuperior
+ F6EE lsuperior
+ F6EF msuperior
+ F6F0 osuperior
+ F6F1 rsuperior
+ F6F2 ssuperior
+ F6F3 tsuperior
+ F6F4 Brevesmall
+ F6F5 Caronsmall
+ F6F6 Circumflexsmall
+ F6F7 Dotaccentsmall
+ F6F8 Hungarumlautsmall
+ F6F9 Lslashsmall
+ F6FA OEsmall
+ F6FB Ogoneksmall
+ F6FC Ringsmall
+ F6FD Scaronsmall
+ F6FE Tildesmall
+ F6FF Zcaronsmall
+ F721 exclamsmall
+ F724 dollaroldstyle
+ F726 ampersandsmall
+ F730 zerooldstyle
+ F731 oneoldstyle
+ F732 twooldstyle
+ F733 threeoldstyle
+ F734 fouroldstyle
+ F735 fiveoldstyle
+ F736 sixoldstyle
+ F737 sevenoldstyle
+ F738 eightoldstyle
+ F739 nineoldstyle
+ F73F questionsmall
+ F760 Gravesmall
+ F761 Asmall
+ F762 Bsmall
+ F763 Csmall
+ F764 Dsmall
+ F765 Esmall
+ F766 Fsmall
+ F767 Gsmall
+ F768 Hsmall
+ F769 Ismall
+ F76A Jsmall
+ F76B Ksmall
+ F76C Lsmall
+ F76D Msmall
+ F76E Nsmall
+ F76F Osmall
+ F770 Psmall
+ F771 Qsmall
+ F772 Rsmall
+ F773 Ssmall
+ F774 Tsmall
+ F775 Usmall
+ F776 Vsmall
+ F777 Wsmall
+ F778 Xsmall
+ F779 Ysmall
+ F77A Zsmall
+ F7A1 exclamdownsmall
+ F7A2 centoldstyle
+ F7A8 Dieresissmall
+ F7AF Macronsmall
+ F7B4 Acutesmall
+ F7B8 Cedillasmall
+ F7BF questiondownsmall
+ F7E0 Agravesmall
+ F7E1 Aacutesmall
+ F7E2 Acircumflexsmall
+ F7E3 Atildesmall
+ F7E4 Adieresissmall
+ F7E5 Aringsmall
+ F7E6 AEsmall
+ F7E7 Ccedillasmall
+ F7E8 Egravesmall
+ F7E9 Eacutesmall
+ F7EA Ecircumflexsmall
+ F7EB Edieresissmall
+ F7EC Igravesmall
+ F7ED Iacutesmall
+ F7EE Icircumflexsmall
+ F7EF Idieresissmall
+ F7F0 Ethsmall
+ F7F1 Ntildesmall
+ F7F2 Ogravesmall
+ F7F3 Oacutesmall
+ F7F4 Ocircumflexsmall
+ F7F5 Otildesmall
+ F7F6 Odieresissmall
+ F7F8 Oslashsmall
+ F7F9 Ugravesmall
+ F7FA Uacutesmall
+ F7FB Ucircumflexsmall
+ F7FC Udieresissmall
+ F7FD Yacutesmall
+ F7FE Thornsmall
+ F7FF Ydieresissmall
+ F8E5 radicalex
+ F8E6 arrowvertex
+ F8E7 arrowhorizex
+ F8E8 registersans
+ F8E9 copyrightsans
+ F8EA trademarksans
+ F8EB parenlefttp
+ F8EC parenleftex
+ F8ED parenleftbt
+ F8EE bracketlefttp
+ F8EF bracketleftex
+ F8F0 bracketleftbt
+ F8F1 bracelefttp
+ F8F2 braceleftmid
+ F8F3 braceleftbt
+ F8F4 braceex
+ F8F5 integralex
+ F8F6 parenrighttp
+ F8F7 parenrightex
+ F8F8 parenrightbt
+ F8F9 bracketrighttp
+ F8FA bracketrightex
+ F8FB bracketrightbt
+ F8FC bracerighttp
+ F8FD bracerightmid
+ F8FE bracerightbt
+ FB00 ff
+ FB01 fi
+ FB02 fl
+ FB03 ffi
+ FB04 ffl
+ FB1F afii57705
+ FB2A afii57694
+ FB2B afii57695
+ FB35 afii57723
+ FB4B afii57700
+)};
+
+
+sub CreatePostscriptEncoding
+{
+ my ($encoding) = @_;
+ my $result = "/CurrentEncoding \[\n";
+ for (my $i = 0; $i < 256; $i += 8)
+ {
+ for (my $j = 0; $j < 8; $j++)
+ {
+ my $ch;
+ Tk::catch { $ch = $encoding->decode(chr($i+$j),1) };
+ if ($@)
+ {
+ $result .= '/space';
+ }
+ else
+ {
+ my $hexcode = sprintf("%04X",ord($ch));
+ $result .= '/'.((exists $Tk::psglyphs->{$hexcode}) ? $Tk::psglyphs->{$hexcode} : 'space');
+ }
+ }
+ $result .= "\n";
+ }
+ $result .= "\] def\n";
+ return $result;
+}
+
+# precalculate entire prolog when this file is loaded
+# (to speed things up)
+$Tk::ps_preamable = "%%BeginProlog\n".
+ CreatePostscriptEncoding(Tk::SystemEncoding()). <<'END';
+50 dict begin
+% This is a standard prolog for Postscript generated by Tk's canvas
+% widget.
+% RCS: @(#) $Id: //depot/Tkutf8/Canvas/Canvas.pm#12 $
+
+% The definitions below just define all of the variables used in
+% any of the procedures here. This is needed for obscure reasons
+% explained on p. 716 of the Postscript manual (Section H.2.7,
+% "Initializing Variables," in the section on Encapsulated Postscript).
+
+/baseline 0 def
+/stipimage 0 def
+/height 0 def
+/justify 0 def
+/lineLength 0 def
+/spacing 0 def
+/stipple 0 def
+/strings 0 def
+/xoffset 0 def
+/yoffset 0 def
+/tmpstip null def
+
+
+/cstringshow {
+ {
+ dup type /stringtype eq
+ { show } { glyphshow }
+ ifelse
+ }
+ forall
+} bind def
+
+
+
+/cstringwidth {
+ 0 exch 0 exch
+ {
+ dup type /stringtype eq
+ { stringwidth } {
+ currentfont /Encoding get exch 1 exch put (\001) stringwidth
+ }
+ ifelse
+ exch 3 1 roll add 3 1 roll add exch
+ }
+ forall
+} bind def
+
+% font ISOEncode font
+% This procedure changes the encoding of a font from the default
+% Postscript encoding to current system encoding. It's typically invoked just
+% before invoking "setfont". The body of this procedure comes from
+% Section 5.6.1 of the Postscript book.
+
+/ISOEncode {
+ dup length dict begin
+ {1 index /FID ne {def} {pop pop} ifelse} forall
+ /Encoding CurrentEncoding def
+ currentdict
+ end
+
+ % I'm not sure why it's necessary to use "definefont" on this new
+ % font, but it seems to be important; just use the name "Temporary"
+ % for the font.
+
+ /Temporary exch definefont
+} bind def
+
+% StrokeClip
+%
+% This procedure converts the current path into a clip area under
+% the assumption of stroking. It's a bit tricky because some Postscript
+% interpreters get errors during strokepath for dashed lines. If
+% this happens then turn off dashes and try again.
+
+/StrokeClip {
+ {strokepath} stopped {
+ (This Postscript printer gets limitcheck overflows when) =
+ (stippling dashed lines; lines will be printed solid instead.) =
+ [] 0 setdash strokepath} if
+ clip
+} bind def
+
+% desiredSize EvenPixels closestSize
+%
+% The procedure below is used for stippling. Given the optimal size
+% of a dot in a stipple pattern in the current user coordinate system,
+% compute the closest size that is an exact multiple of the device's
+% pixel size. This allows stipple patterns to be displayed without
+% aliasing effects.
+
+/EvenPixels {
+ % Compute exact number of device pixels per stipple dot.
+ dup 0 matrix currentmatrix dtransform
+ dup mul exch dup mul add sqrt
+
+ % Round to an integer, make sure the number is at least 1, and compute
+ % user coord distance corresponding to this.
+ dup round dup 1 lt {pop 1} if
+ exch div mul
+} bind def
+
+% width height string StippleFill --
+%
+% Given a path already set up and a clipping region generated from
+% it, this procedure will fill the clipping region with a stipple
+% pattern. "String" contains a proper image description of the
+% stipple pattern and "width" and "height" give its dimensions. Each
+% stipple dot is assumed to be about one unit across in the current
+% user coordinate system. This procedure trashes the graphics state.
+
+/StippleFill {
+ % The following code is needed to work around a NeWSprint bug.
+
+ /tmpstip 1 index def
+
+ % Change the scaling so that one user unit in user coordinates
+ % corresponds to the size of one stipple dot.
+ 1 EvenPixels dup scale
+
+ % Compute the bounding box occupied by the path (which is now
+ % the clipping region), and round the lower coordinates down
+ % to the nearest starting point for the stipple pattern. Be
+ % careful about negative numbers, since the rounding works
+ % differently on them.
+
+ pathbbox
+ 4 2 roll
+ 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll
+ 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll
+
+ % Stack now: width height string y1 y2 x1 x2
+ % Below is a doubly-nested for loop to iterate across this area
+ % in units of the stipple pattern size, going up columns then
+ % across rows, blasting out a stipple-pattern-sized rectangle at
+ % each position
+
+ 6 index exch {
+ 2 index 5 index 3 index {
+ % Stack now: width height string y1 y2 x y
+
+ gsave
+ 1 index exch translate
+ 5 index 5 index true matrix tmpstip imagemask
+ grestore
+ } for
+ pop
+ } for
+ pop pop pop pop pop
+} bind def
+
+% -- AdjustColor --
+% Given a color value already set for output by the caller, adjusts
+% that value to a grayscale or mono value if requested by the CL
+% variable.
+
+/AdjustColor {
+ CL 2 lt {
+ currentgray
+ CL 0 eq {
+ .5 lt {0} {1} ifelse
+ } if
+ setgray
+ } if
+} bind def
+
+% x y strings spacing xoffset yoffset justify stipple DrawText --
+% This procedure does all of the real work of drawing text. The
+% color and font must already have been set by the caller, and the
+% following arguments must be on the stack:
+%
+% x, y - Coordinates at which to draw text.
+% strings - An array of strings, one for each line of the text item,
+% in order from top to bottom.
+% spacing - Spacing between lines.
+% xoffset - Horizontal offset for text bbox relative to x and y: 0 for
+% nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se.
+% yoffset - Vertical offset for text bbox relative to x and y: 0 for
+% nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se.
+% justify - 0 for left justification, 0.5 for center, 1 for right justify.
+% stipple - Boolean value indicating whether or not text is to be
+% drawn in stippled fashion. If text is stippled,
+% procedure StippleText must have been defined to call
+% StippleFill in the right way.
+%
+% Also, when this procedure is invoked, the color and font must already
+% have been set for the text.
+
+/DrawText {
+ /stipple exch def
+ /justify exch def
+ /yoffset exch def
+ /xoffset exch def
+ /spacing exch def
+ /strings exch def
+
+ % First scan through all of the text to find the widest line.
+
+ /lineLength 0 def
+ strings {
+ cstringwidth pop
+ dup lineLength gt {/lineLength exch def} {pop} ifelse
+ newpath
+ } forall
+
+ % Compute the baseline offset and the actual font height.
+
+ 0 0 moveto (TXygqPZ) false charpath
+ pathbbox dup /baseline exch def
+ exch pop exch sub /height exch def pop
+ newpath
+
+ % Translate coordinates first so that the origin is at the upper-left
+ % corner of the text's bounding box. Remember that x and y for
+ % positioning are still on the stack.
+
+ translate
+ lineLength xoffset mul
+ strings length 1 sub spacing mul height add yoffset mul translate
+
+ % Now use the baseline and justification information to translate so
+ % that the origin is at the baseline and positioning point for the
+ % first line of text.
+
+ justify lineLength mul baseline neg translate
+
+ % Iterate over each of the lines to output it. For each line,
+ % compute its width again so it can be properly justified, then
+ % display it.
+
+ strings {
+ dup cstringwidth pop
+ justify neg mul 0 moveto
+ stipple {
+
+
+ % The text is stippled, so turn it into a path and print
+ % by calling StippledText, which in turn calls StippleFill.
+ % Unfortunately, many Postscript interpreters will get
+ % overflow errors if we try to do the whole string at
+ % once, so do it a character at a time.
+
+ gsave
+ /char (X) def
+ {
+ dup type /stringtype eq {
+ % This segment is a string.
+ {
+ char 0 3 -1 roll put
+ currentpoint
+ gsave
+ char true charpath clip StippleText
+ grestore
+ char stringwidth translate
+ moveto
+ } forall
+ } {
+ % This segment is glyph name
+ % Temporary override
+ currentfont /Encoding get exch 1 exch put
+ currentpoint
+ gsave (\001) true charpath clip StippleText
+ grestore
+ (\001) stringwidth translate
+ moveto
+ } ifelse
+ } forall
+ grestore
+ } {cstringshow} ifelse
+ 0 spacing neg translate
+ } forall
+} bind def
+
+%%EndProlog
+END
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Canvas.pod b/Master/tlpkg/tlperl/lib/Tk/Canvas.pod
new file mode 100644
index 00000000000..daf4cf7f32e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Canvas.pod
@@ -0,0 +1,2394 @@
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+=head1 NAME
+
+Tk::Canvas - Create and manipulate Canvas widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$canvas> = I<$parent>-E<gt>B<Canvas>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-background> B<-highlightthickness> B<-insertwidth> B<-state>
+B<-borderwidth> B<-insertbackground> B<-relief> B<-tile>
+B<-cursor> B<-insertborderwidth> B<-selectbackground> B<-takefocus>
+B<-highlightbackground> B<-insertofftime> B<-selectborderwidth> B<-xscrollcommand>
+B<-highlightcolor> B<-insertontime> B<-selectforeground> B<-yscrollcommand>
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<closeEnough>
+
+=item Class: B<CloseEnough>
+
+=item Switch: B<-closeenough>
+
+Specifies a floating-point value indicating how close the mouse cursor
+must be to an item before it is considered to be ``inside'' the item.
+Defaults to 1.0.
+
+=item Name: B<confine>
+
+=item Class: B<Confine>
+
+=item Switch: B<-confine>
+
+Specifies a boolean value that indicates whether or not it should be
+allowable to set the canvas's view outside the region defined by the
+B<scrollRegion> argument.
+Defaults to true, which means that the view will
+be constrained within the scroll region.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies a desired window height that the canvas widget should request from
+its geometry manager. The value may be specified in any
+of the forms described in the L<"COORDINATES"> section below.
+
+=item Name: B<scrollRegion>
+
+=item Class: B<ScrollRegion>
+
+=item Switch: B<-scrollregion>
+
+Specifies a list with four coordinates describing the left, top, right, and
+bottom coordinates of a rectangular region.
+This region is used for scrolling purposes and is considered to be
+the boundary of the information in the canvas.
+Each of the coordinates may be specified
+in any of the forms given in the L<"COORDINATES"> section below.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Modifies the default state of the canvas where I<state> may be set to one of:
+normal, disabled, or hidden. Individual canvas objects all have their own
+state option, which overrides the default state. Many options can take
+separate specifications such that the appearance of the item can be different
+in different situations. The options that start with "active" control the
+appearence when the mouse pointer is over it, while the option starting
+with "disabled" controls the appearence when the state is disabled.
+
+=item Name: B<width>
+
+=item Class: B<width>
+
+=item Switch: B<-width>
+
+Specifies a desired window width that the canvas widget should request from
+its geometry manager. The value may be specified in any
+of the forms described in the L<"COORDINATES"> section below.
+
+=item Name: B<xScrollIncrement>
+
+=item Class: B<ScrollIncrement>
+
+=item Switch: B<-xscrollincrement>
+
+Specifies an increment for horizontal scrolling, in any of the usual forms
+permitted for screen distances. If the value of this option is greater
+than zero, the horizontal view in the window will be constrained so that
+the canvas x coordinate at the left edge of the window is always an even
+multiple of B<xScrollIncrement>; furthermore, the units for scrolling
+(e.g., the change in view when the left and right arrows of a scrollbar
+are selected) will also be B<xScrollIncrement>. If the value of
+this option is less than or equal to zero, then horizontal scrolling
+is unconstrained.
+
+=item Name: B<yScrollIncrement>
+
+=item Class: B<ScrollIncrement>
+
+=item Switch: B<-yscrollincrement>
+
+Specifies an increment for vertical scrolling, in any of the usual forms
+permitted for screen distances. If the value of this option is greater
+than zero, the vertical view in the window will be constrained so that
+the canvas y coordinate at the top edge of the window is always an even
+multiple of B<yScrollIncrement>; furthermore, the units for scrolling
+(e.g., the change in view when the top and bottom arrows of a scrollbar
+are selected) will also be B<yScrollIncrement>. If the value of
+this option is less than or equal to zero, then vertical scrolling
+is unconstrained.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Canvas> method creates a new window (given
+by the $canvas argument) and makes it into a canvas widget.
+Additional options, described above, may be specified on the
+command line or in the option database
+to configure aspects of the canvas such as its colors and 3-D relief.
+The B<canvas> command returns its
+$canvas argument. At the time this command is invoked,
+there must not exist a window named $canvas, but
+$canvas's parent must exist.
+
+Canvas widgets implement structured graphics.
+A canvas displays any number of I<items>, which may be things like
+rectangles, circles, lines, and text.
+Items may be manipulated (e.g. moved or re-colored) and
+L<callbacks|Tk::callbacks> may
+be associated with items in much the same way that the L<bind|Tk::bind>
+method allows callbacks to be bound to widgets. For example,
+a particular callback may be associated with the B<E<lt>Button-1E<gt>> event
+so that the callback is invoked whenever button 1 is pressed with
+the mouse cursor over an item.
+This means that items in a canvas can have behaviors defined by
+the Callbacks bound to them.
+
+=head1 DISPLAY LIST
+
+The items in a canvas are ordered for purposes of display,
+with the first item in the display list being displayed
+first, followed by the next item in the list, and so on.
+Items later in the display list obscure those that are
+earlier in the display list and are sometimes referred to
+as being I<``on top''> of earlier items.
+When a new item is created it is placed at the end of the
+display list, on top of everything else.
+Widget methods may be used to re-arrange the order of the
+display list.
+
+Window items are an exception to the above rules. The underlying
+window systems require them always to be drawn on top of other items.
+In addition, the stacking order of window items
+is not affected by any of the canvas methods; you must use
+the L<raise|Tk::Widget> and L<lower|Tk::Widget> Tk widget methods instead.
+
+=head1 ITEM IDS AND TAGS
+
+Items in a canvas widget may be named in either of two ways:
+by id or by tag.
+Each item has a unique identifying number which is assigned to
+that item when it is created. The id of an item never changes
+and id numbers are never re-used within the lifetime of a
+canvas widget.
+
+Each item may also have any number of I<tags> associated
+with it. A tag is just a string of characters, and it may
+take any form except that of an integer.
+For example, ``x123'' is OK but ``123'' isn't.
+The same tag may be associated with many different items.
+This is commonly done to group items in various interesting
+ways; for example, all selected items might be given the
+tag ``selected''.
+
+The tag B<all> is implicitly associated with every item
+in the canvas; it may be used to invoke operations on
+all the items in the canvas.
+
+The tag B<current> is managed automatically by Tk;
+it applies to the I<current item>, which is the
+topmost item whose drawn area covers the position of
+the mouse cursor.
+If the mouse is not in the canvas widget or is not over
+an item, then no item has the B<current> tag.
+
+When specifying items in canvas methods, if the
+specifier is an integer then it is assumed to refer to
+the single item with that id.
+If the specifier is not an integer, then it is assumed to
+refer to all of the items in the canvas that have a tag
+matching the specifier.
+The symbol I<tagOrId> is used below to indicate that
+an argument specifies either an id that selects a single
+item or a tag that selects zero or more items.
+
+I<tagOrId> may contain a logical expressions of
+tags by using operators: 'E<amp>E<amp>', '||', '^' '!', and parenthezised
+subexpressions. For example:
+
+$c-E<gt>find('withtag', '(aE<amp>E<amp>!b)|(!aE<amp>E<amp>b)');
+
+or equivalently:
+
+$c-E<gt>find('withtag', 'a^b');
+
+will find only those items with either "a" or "b" tags, but not both.
+
+Some methods only operate on a single item at a
+time; if I<tagOrId> is specified in a way that
+names multiple items, then the normal behavior is for
+the methods is to use the first (lowest) of these items in
+the display list that is suitable for the method.
+Exceptions are noted in the method descriptions
+below.
+
+=head1 COORDINATES
+
+All coordinates related to canvases are stored as floating-point
+numbers.
+Coordinates and distances are specified in screen units,
+which are floating-point numbers optionally followed
+by one of several letters.
+If no letter is supplied then the distance is in pixels.
+If the letter is B<m> then the distance is in millimeters on
+the screen; if it is B<c> then the distance is in centimeters;
+B<i> means inches, and B<p> means printers points (1/72 inch).
+Larger y-coordinates refer to points lower on the screen; larger
+x-coordinates refer to points farther to the right.
+
+=head1 TRANSFORMATIONS
+
+Normally the origin of the canvas coordinate system is at the
+upper-left corner of the window containing the canvas.
+It is possible to adjust the origin of the canvas
+coordinate system relative to the origin of the window using the
+B<xview> and B<yview> methods; this is typically used
+for scrolling.
+Canvases do not support scaling or rotation of the canvas coordinate
+system relative to the window coordinate system.
+
+Individual items may be moved or scaled using methods
+described below, but they may not be rotated.
+
+=head1 INDICES
+
+Text items support the notion of an I<index> for identifying
+particular positions within the item.
+
+Indices are used for methods such as inserting text, deleting
+a range of characters, and setting the insertion cursor position.
+An index may be specified in any of a number of ways, and
+different types of items may support different forms for
+specifying indices.
+
+In a similar fashion, line and polygon items support I<index> for
+identifying, inserting and deleting subsets of their coordinates.
+Indices are used for commands such as inserting or deleting
+a range of characters or coordinates, and setting the insertion
+cursor position. An index may be specified in any of a number
+of ways, and different types of items may support different forms
+for specifying indices.
+
+Text items support the following forms for an index; if you
+define new types of text-like items, it would be advisable to
+support as many of these forms as practical.
+Note that it is possible to refer to the character just after
+the last one in the text item; this is necessary for such
+tasks as inserting new text at the end of the item.
+Lines and Polygons don't support the insertion cursor
+and the selection. Their indices are supposed to be even
+always, because coordinates always appear in pairs.
+
+=over 4
+
+=item I<number>
+
+A decimal number giving the position of the desired character
+within the text item.
+0 refers to the first character, 1 to the next character, and
+so on. If indexes are odd for lines and polygons, they will be
+automatically decremented by one.
+A number less than 0 is treated as if it were zero, and a
+number greater than the length of the text item is treated
+as if it were equal to the length of the text item. For
+polygons, numbers less than 0 or greater then the length
+of the coordinate list will be adjusted by adding or substracting
+the length until the result is between zero and the length,
+inclusive.
+
+=item B<end>
+
+Refers to the character or coordinate just after the last one
+in the item (same as the number of characters or coordinates
+in the item).
+
+=item B<insert>
+
+Refers to the character just before which the insertion cursor
+is drawn in this item. Not valid for lines and polygons.
+
+=item B<sel.first>
+
+Refers to the first selected character in the item.
+If the selection isn't in this item then this form is illegal.
+
+=item B<sel.last>
+
+Refers to the last selected character in the item.
+If the selection isn't in this item then this form is illegal.
+
+=item B<[>I<x,y>B<]>
+
+Refers to the character or coordinate at the point given by I<x> and
+I<y>, where I<x> and I<y> are specified in the coordinate
+system of the canvas.
+If I<x> and I<y> lie outside the coordinates covered by the
+text item, then they refer to the first or last character in the
+line that is closest to the given point.
+The Tcl string form "@x,y" is also allowed.
+
+=back
+
+=head1 DASH PATTERNS
+
+Many items support the notion of an dash pattern for outlines.
+
+The first possible syntax is a list of integers. Each element
+represents the number of pixels of a line segment. Only the odd
+segments are drawn using the "outline" color. The other segments
+are drawn transparent.
+
+The second possible syntax is a character list containing only
+5 possible characters B<[.,-_ ]>, with the first 4 characters
+producing a segment of length 1 to 4, respectively, followed
+by a transparent segment of length 2. The space can be used
+repeatedly to enlarge the space between other line elements
+by 1, and can not occur as the first position in the string.
+The main difference of this syntax with the previous one is
+that it it shape-conserving. This means that all values in the dash
+list will be multiplied by the line width before display. This
+assures that "." will always be displayed as a dot and "-"
+always as a dash regardless of the line width.
+
+Some examples, for a line width of 2:
+
+ -dash . = -dash [2,4]
+ -dash - = -dash [6,4]
+ -dash -. = -dash [6,4,2,4]
+ -dash -.. = -dash [6,4,2,4,2,4]
+ -dash '. ' = -dash [2,8]
+ -dash ',' = -dash [4,4]
+
+On systems where only a limited set of dash patterns is available,
+the dash pattern will be displayed as the closest available dash
+pattern. For example, on Windows only the first 4 of the
+above examples are available. The last 2 examples will be
+displayed identically as the first one.
+
+=head1 WIDGET METHODS
+
+The B<Canvas> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for canvas widgets:
+
+=over 4
+
+=item I<$canvas>-E<gt>B<addtag>(I<tag, searchSpec, >?I<arg, arg, ...>?)
+
+For each item that meets the constraints specified by
+I<searchSpec> and the I<arg>s, add
+I<tag> to the list of tags associated with the item if it
+isn't already present on that list.
+It is possible that no items will satisfy the constraints
+given by I<searchSpec> and I<arg>s, in which case the
+method has no effect.
+This command returns an empty string as result.
+I<SearchSpec> and I<arg>'s may take any of the following
+forms:
+
+=over 8
+
+=item B<above >I<tagOrId>
+
+Selects the item just after (above) the one given by I<tagOrId>
+in the display list.
+If I<tagOrId> denotes more than one item, then the last (topmost)
+of these items in the display list is used.
+
+=item B<all>
+
+Selects all the items in the canvas.
+
+=item B<below >I<tagOrId>
+
+Selects the item just before (below) the one given by I<tagOrId>
+in the display list.
+If I<tagOrId> denotes more than one item, then the first (lowest)
+of these items in the display list is used.
+
+=item B<closest >I<x y >?I<halo>? ?I<start>?
+
+Selects the item closest to the point given by I<x> and I<y>.
+If more than one item is at the same closest distance (e.g. two
+items overlap the point), then the top-most of these items (the
+last one in the display list) is used.
+If I<halo> is specified, then it must be a non-negative
+value.
+Any item closer than I<halo> to the point is considered to
+overlap it.
+The I<start> argument may be used to step circularly through
+all the closest items.
+If I<start> is specified, it names an item using a tag or id
+(if by tag, it selects the first item in the display list with
+the given tag).
+Instead of selecting the topmost closest item, this form will
+select the topmost closest item that is below I<start> in
+the display list; if no such item exists, then the selection
+behaves as if the I<start> argument had not been specified.
+
+=item B<enclosed> I<x1> I<y1> I<x2> I<y2>
+
+Selects all the items completely enclosed within the rectangular
+region given by I<x1>, I<y1>, I<x2>, and I<y2>.
+I<X1> must be no greater then I<x2> and I<y1> must be
+no greater than I<y2>.
+
+=item B<overlapping> I<x1> I<y1> I<x2> I<y2>
+
+Selects all the items that overlap or are enclosed within the
+rectangular region given by I<x1>, I<y1>, I<x2>,
+and I<y2>.
+I<X1> must be no greater then I<x2> and I<y1> must be
+no greater than I<y2>.
+
+=item B<withtag >I<tagOrId>
+
+Selects all the items given by I<tagOrId>.
+
+=back
+
+=item I<$canvas>-E<gt>B<bbox>(I<tagOrId, >?I<tagOrId, tagOrId, ...>?)
+
+Returns a list with four elements giving an approximate bounding box
+for all the items named by the I<tagOrId> arguments.
+The list has the form ``I<x1 y1 x2 y2>'' such that the drawn
+areas of all the named elements are within the region bounded by
+I<x1> on the left, I<x2> on the right, I<y1> on the top,
+and I<y2> on the bottom.
+The return value may overestimate the actual bounding box by
+a few pixels.
+If no items match any of the I<tagOrId> arguments or if the
+matching items have empty bounding boxes (i.e. they have nothing
+to display)
+then an empty string is returned.
+
+=item I<$canvas>-E<gt>B<bind>(I<tagOrId>?, I<sequence>? ?,I<callback>?)
+
+This method associates I<callback> with all the items given by
+I<tagOrId> such that whenever the event sequence given by
+I<sequence> occurs for one of the items the callback will
+be invoked.
+This method is similar to the B<bind> method except that
+it operates on items in a canvas rather than entire widgets.
+See L<Tk::bind> for complete details
+on the syntax of I<sequence> and the substitutions performed
+on I<callback> before invoking it.
+If all arguments are specified then a new binding is created, replacing
+any existing binding for the same I<sequence> and I<tagOrId>
+(if the first character of I<command> is ``+'' then I<command>
+augments an existing binding rather than replacing it).
+In this case the return value is an empty string.
+If I<callback> is omitted then the method returns the I<callback>
+associated with I<tagOrId> and I<sequence> (an error occurs
+if there is no such binding).
+If both I<callback> and I<sequence> are omitted then the method
+returns a list of all the sequences for which bindings have been
+defined for I<tagOrId>.
+
+=over 8
+
+The only events for which bindings may be specified are those related to
+the mouse and keyboard (such as B<Enter>, B<Leave>,
+B<ButtonPress>, B<Motion>, and B<KeyPress>) or virtual events.
+The handling of events in canvases uses the current item defined
+in L<"ITEM IDS AND TAGS"> above. B<Enter> and B<Leave> events trigger for an
+item when it becomes the current item or ceases to be the current item;
+note that these events are different than B<Enter> and B<Leave>
+events for windows. Mouse-related events are directed to the current
+item, if any. Keyboard-related events are directed to the focus item, if
+any (see the L<focus|/focus> method below for more on this). If a
+virtual event is used in a binding, that binding can trigger only if the
+virtual event is defined by an underlying mouse-related or
+keyboard-related event.
+
+It is possible for multiple bindings to match a particular event.
+This could occur, for example, if one binding is associated with the
+item's id and another is associated with one of the item's tags.
+When this occurs, all of the matching bindings are invoked.
+A binding associated with the B<all> tag is invoked first,
+followed by one binding for each of the item's tags (in order),
+followed by a binding associated with the item's id.
+If there are multiple matching bindings for a single tag,
+then only the most specific binding is invoked.
+A B<continue> in a callback terminates that
+subroutine, and a B<break> method terminates that subroutine
+and skips any remaining callbacks for the event, just as for the
+B<bind> method.
+
+If bindings have been created for a canvas window using the B<CanvasBind>
+method, then they are invoked in addition to bindings created for
+the canvas's items using the B<bind> method.
+The bindings for items will be invoked before any of the bindings
+for the window as a whole.
+
+=back
+
+=item I<$canvas>-E<gt>B<canvasx>(I<screenx>?, I<gridspacing>?)
+
+Given a window x-coordinate in the canvas I<screenx>, this method returns
+the canvas x-coordinate that is displayed at that location.
+If I<gridspacing> is specified, then the canvas coordinate is
+rounded to the nearest multiple of I<gridspacing> units.
+
+=item I<$canvas>-E<gt>B<canvasy>(I<screeny, >?I<gridspacing>?)
+
+Given a window y-coordinate in the canvas I<screeny> this method returns
+the canvas y-coordinate that is displayed at that location.
+If I<gridspacing> is specified, then the canvas coordinate is
+rounded to the nearest multiple of I<gridspacing> units.
+
+=item I<$canvas>-E<gt>B<coords>(I<tagOrId >?I<x0,y0 ...>?)
+
+Query or modify the coordinates that define an item.
+If no coordinates are specified, this method returns a list
+whose elements are the coordinates of the item named by
+I<tagOrId>.
+If coordinates are specified, then they replace the current
+coordinates for the named item.
+If I<tagOrId> refers to multiple items, then
+the first one in the display list is used.
+
+=item I<$canvas>-E<gt>B<create>(I<type, x, y, >?I<x, y, ...>?, ?I<option, value, ...>?)
+
+Create a new item in I<$canvas> of type I<type>.
+The exact format of the arguments after B<type> depends
+on B<type>, but usually they consist of the coordinates for
+one or more points, followed by specifications for zero or
+more item options.
+See the subsections on individual item types below for more
+on the syntax of this method.
+This method returns the id for the new item.
+
+=item I<$canvas>-E<gt>B<dchars>(I<tagOrId, first, >?I<last>?)
+
+For each item given by I<tagOrId>, delete the characters, or coordinates,
+in the range given by I<first> and I<last>, inclusive.
+If some of the items given by I<tagOrId> don't support
+Text items interpret I<first> and I<last> as indices to a character,
+line and polygon items interpret them indices to a coordinate (an x,y pair).
+within the item(s) as described in L<"INDICES"> above.
+If I<last> is omitted, it defaults to I<first>.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<delete>(?I<tagOrId, tagOrId, ...>?)
+
+Delete each of the items given by each I<tagOrId>, and return
+an empty string.
+
+=item I<$canvas>-E<gt>B<dtag>(I<tagOrId, >?I<tagToDelete>?)
+
+For each of the items given by I<tagOrId>, delete the
+tag given by I<tagToDelete> from the list of those
+associated with the item.
+If an item doesn't have the tag I<tagToDelete> then
+the item is unaffected by the method.
+If I<tagToDelete> is omitted then it defaults to I<tagOrId>.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<find>(I<searchCommand, >?I<arg, arg, ...>?)
+
+This method returns a list consisting of all the items that
+meet the constraints specified by I<searchCommand> and
+I<arg>'s.
+I<SearchCommand> and I<args> have any of the forms
+accepted by the B<addtag> method.
+The items are returned in stacking order, with the lowest item first.
+
+=item focus
+
+=item I<$canvas>-E<gt>B<focus>(?I<tagOrId>?)
+
+Set the keyboard focus for the canvas widget to the item given by
+I<tagOrId>.
+If I<tagOrId> refers to several items, then the focus is set
+to the first such item in the display list that supports the
+insertion cursor.
+If I<tagOrId> doesn't refer to any items, or if none of them
+support the insertion cursor, then the focus isn't changed.
+If I<tagOrId> is an empty
+string, then the focus item is reset so that no item has the focus.
+If I<tagOrId> is not specified then the method returns the
+id for the item that currently has the focus, or an empty string
+if no item has the focus.
+
+=over 8
+
+Once the focus has been set to an item, the item will display
+the insertion cursor and all keyboard events will be directed
+to that item.
+The focus item within a canvas and the focus window on the
+screen (set with the B<focus> method) are totally independent:
+a given item doesn't actually have the input focus unless (a)
+its canvas is the focus window and (b) the item is the focus item
+within the canvas.
+In most cases it is advisable to follow the B<focus> widget
+method with the B<CanvasFocus> method to set the focus window to
+the canvas (if it wasn't there already).
+
+=back
+
+=item I<$canvas>-E<gt>B<gettags>(I<tagOrId>)
+
+Return a list whose elements are the tags associated with the
+item given by I<tagOrId>.
+If I<tagOrId> refers to more than one item, then the tags
+are returned from the first such item in the display list.
+If I<tagOrId> doesn't refer to any items, or if the item
+contains no tags, then an empty string is returned.
+
+=item I<$canvas>-E<gt>B<icursor>(I<tagOrId, index>)
+
+Set the position of the insertion cursor for the item(s) given by I<tagOrId>
+to just before the character whose position is given by I<index>.
+If some or all of the items given by I<tagOrId> don't support
+an insertion cursor then this method has no effect on them.
+See L<"INDICES"> above for a description of the
+legal forms for I<index>.
+Note: the insertion cursor is only displayed in an item if
+that item currently has the keyboard focus (see the widget
+method B<focus>, below), but the cursor position may
+be set even when the item doesn't have the focus.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<index>(I<tagOrId, index>)
+
+This method returns a decimal string giving the numerical index
+within I<tagOrId> corresponding to I<index>.
+I<Index> gives a textual description of the desired position
+as described in L<"INDICES"> above.
+Text items interpret I<index> as an index to a character,
+line and polygon items interpret it as an index to a coordinate (an x,y pair).
+The return value is guaranteed to lie between 0 and the number
+of characters, or coordinates, within the item, inclusive.
+If I<tagOrId> refers to multiple items, then the index
+is processed in the first of these items that supports indexing
+operations (in display list order).
+
+=item I<$canvas>-E<gt>B<insert>(I<tagOrId, beforeThis, string>)
+
+For each of the items given by I<tagOrId>, if the item supports
+text or coordinate, insertion then I<string> is inserted into the item's
+text just before the character, or coordinate, whose index is I<beforeThis>.
+Text items interpret I<beforethis> as an index to a character,
+line and polygon items interpret it as an index to a coordinate (an x,y pair).
+For lines and polygons the I<string> must be a valid coordinate
+sequence.
+See L<"INDICES"> above for information about the forms allowed
+for I<beforeThis>.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<itemcget>(I<tagOrId, >I<option>)
+
+Returns the current value of the configuration option for the
+item given by I<tagOrId> whose name is I<option>.
+This method is similar to the L<cget|Tk::option> method except that
+it applies to a particular item rather than the widget as a whole.
+I<Option> may have any of the values accepted by the B<create>
+method when the item was created.
+If I<tagOrId> is a tag that refers to more than one item,
+the first (lowest) such item is used.
+
+=item I<$canvas>-E<gt>B<itemconfigure>(I<tagOrId, >?I<option>?, ?I<value>?, ?I<option, value, ...>?)
+
+This method is similar to the L<configure|Tk::option> method except
+that it modifies item-specific options for the items given by
+I<tagOrId> instead of modifying options for the overall
+canvas widget.
+If no I<option> is specified, returns a list describing all of
+the available options for the first item given by I<tagOrId>
+(see L<Tk::options> for
+information on the format of this list). If I<option> is specified
+with no I<value>, then the method returns a list describing the
+one named option (this list will be identical to the corresponding
+sublist of the value returned if no I<option> is specified). If
+one or more I<option-value> pairs are specified, then the method
+modifies the given widget option(s) to have the given value(s) in
+each of the items given by I<tagOrId>; in
+this case the method returns an empty string.
+The I<option>s and I<value>s are the same as those permissible
+in the B<create> method when the item(s) were created;
+see the sections describing individual item types below for details
+on the legal options.
+
+=item I<$canvas>-E<gt>B<lower>(I<tagOrId, >?I<belowThis>?)
+
+Move all of the items given by I<tagOrId> to a new position
+in the display list just before the item given by I<belowThis>.
+If I<tagOrId> refers to more than one item then all are moved
+but the relative order of the moved items will not be changed.
+I<BelowThis> is a tag or id; if it refers to more than one
+item then the first (lowest) of these items in the display list is used
+as the destination location for the moved items.
+Note: this method has no effect on window items. Window items always
+obscure other item types, and the stacking order of window items is
+determined by the B<raise> and B<lower> methods of the widget, not the
+B<raise> and B<lower> methods for canvases.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<move>(I<tagOrId, xAmount, yAmount>)
+
+Move each of the items given by I<tagOrId> in the canvas coordinate
+space by adding I<xAmount> to the x-coordinate of each point
+associated with the item and I<yAmount> to the y-coordinate of
+each point associated with the item.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<postscript>(?I<option, value, option, value, ...>?)
+
+Generate a Postscript representation for part or all of the canvas.
+If the B<-file> option is specified then the Postscript is written
+to a file and an empty string is returned; otherwise the Postscript
+is returned as the result of the method.
+If the interpreter that owns the canvas is marked as safe, the operation
+will fail because safe interpreters are not allowed to write files.
+If the B<-channel> option is specified, the argument denotes the name
+of a channel already opened for writing. The Postscript is written to
+that channel, and the channel is left open for further writing at the end
+of the operation.
+The Postscript is created in Encapsulated Postscript form using
+version 3.0 of the Document Structuring Conventions.
+Note: by default Postscript is only generated for information that
+appears in the canvas's window on the screen. If the canvas is
+freshly created it may still have its initial size of 1x1 pixel
+so nothing will appear in the Postscript. To get around this problem
+either invoke the B<update> method to wait for the canvas window
+to reach its final size, or else use the B<-width> and B<-height>
+options to specify the area of the canvas to print.
+The I<option>-I<value> argument pairs provide additional
+information to control the generation of Postscript. The following
+options are supported:
+
+=over 8
+
+=item B<-colormap> =E<gt> I<hashRef>
+
+I<HashRef> must be a reference to a hash variable or an anonymous hash
+that specifies a color mapping to use in the Postscript.
+Each value of the hash must consist of Postscript
+code to set a particular color value (e.g. ``B<1.0 1.0 0.0 setrgbcolor>'').
+When outputting color information in the Postscript, Tk checks
+to see if there is a key in the hash with the same
+name as the color.
+If so, Tk uses the value of the element as the Postscript method
+to set the color.
+If this option hasn't been specified, or if there isn't a key
+in I<hashRef> for a given color, then Tk uses the red, green,
+and blue intensities from the X color.
+
+=item B<-colormode> =E<gt> I<mode>
+
+Specifies how to output color information. I<Mode> must be either
+B<color> (for full color output), B<gray> (convert all colors
+to their gray-scale equivalents) or B<mono> (convert all colors
+to black or white).
+
+=item B<-file> =E<gt> I<fileName>
+
+Specifies the name of the file in which to write the Postscript.
+If this option isn't specified then the Postscript is returned as the
+result of the method instead of being written to a file.
+
+=item B<-fontmap> =E<gt> I<hashRef>
+
+I<HashRef> must be a reference to a hash variable or an anonymous hash
+that specifies a font mapping to use in the Postscript.
+Each value of the hash must consist of an array reference with
+two elements, which are the name and point size of a Postscript font.
+When outputting Postscript commands for a particular font, Tk
+checks to see if I<hashRef> contains a value with the same
+name as the font.
+If there is such an element, then the font information contained in
+that element is used in the Postscript.
+Otherwise Tk attempts to guess what Postscript font to use.
+Tk's guesses generally only work for well-known fonts such as
+Times and Helvetica and Courier, and only if the X font name does not
+omit any dashes up through the point size.
+For example, B<-*-Courier-Bold-R-Normal--*-120-*> will work but
+B<*Courier-Bold-R-Normal*120*> will not; Tk needs the dashes to
+parse the font name).
+
+=item B<-height> =E<gt> I<size>
+
+Specifies the height of the area of the canvas to print.
+Defaults to the height of the canvas window.
+
+=item B<-pageanchor> =E<gt> I<anchor>
+
+Specifies which point of the printed area of the canvas should appear over
+the positioning point on the page (which is given by the B<-pagex>
+and B<-pagey> options).
+For example, B<-pageanchor>=>B<n> means that the top center of the
+area of the canvas being printed (as it appears in the canvas window)
+should be over the positioning point. Defaults to B<center>.
+
+=item B<-pageheight> =E<gt> I<size>
+
+Specifies that the Postscript should be scaled in both x and y so
+that the printed area is I<size> high on the Postscript page.
+I<Size> consists of a floating-point number followed by
+B<c> for centimeters, B<i> for inches, B<m> for millimeters,
+or B<p> or nothing for printer's points (1/72 inch).
+Defaults to the height of the printed area on the screen.
+If both B<-pageheight> and B<-pagewidth> are specified then
+the scale factor from B<-pagewidth> is used (non-uniform scaling
+is not implemented).
+
+=item B<-pagewidth> =E<gt> I<size>
+
+Specifies that the Postscript should be scaled in both x and y so
+that the printed area is I<size> wide on the Postscript page.
+I<Size> has the same form as for B<-pageheight>.
+Defaults to the width of the printed area on the screen.
+If both B<-pageheight> and B<-pagewidth> are specified then
+the scale factor from B<-pagewidth> is used (non-uniform scaling
+is not implemented).
+
+=item B<-pagex> =E<gt> I<position>
+
+I<Position> gives the x-coordinate of the positioning point on
+the Postscript page, using any of the forms allowed for B<-pageheight>.
+Used in conjunction with the B<-pagey> and B<-pageanchor> options
+to determine where the printed area appears on the Postscript page.
+Defaults to the center of the page.
+
+=item B<-pagey> =E<gt> I<position>
+
+I<Position> gives the y-coordinate of the positioning point on
+the Postscript page, using any of the forms allowed for B<-pageheight>.
+Used in conjunction with the B<-pagex> and B<-pageanchor> options
+to determine where the printed area appears on the Postscript page.
+Defaults to the center of the page.
+
+=item B<-rotate> =E<gt> I<boolean>
+
+I<Boolean> specifies whether the printed area is to be rotated 90
+degrees.
+In non-rotated output the x-axis of the printed area runs along
+the short dimension of the page (``portrait'' orientation);
+in rotated output the x-axis runs along the long dimension of the
+page (``landscape'' orientation).
+Defaults to non-rotated.
+
+=item B<-width> =E<gt> I<size>
+
+Specifies the width of the area of the canvas to print.
+Defaults to the width of the canvas window.
+
+=item B<-x> => I<position>
+
+Specifies the x-coordinate of the left edge of the area of the
+canvas that is to be printed, in canvas coordinates, not window
+coordinates.
+Defaults to the coordinate of the left edge of the window.
+
+=item B<-y> => I<position>
+
+Specifies the y-coordinate of the top edge of the area of the
+canvas that is to be printed, in canvas coordinates, not window
+coordinates.
+Defaults to the coordinate of the top edge of the window.
+
+=back
+
+=item I<$canvas>-E<gt>B<raise>(I<tagOrId, >?I<aboveThis>?)
+
+Move all of the items given by I<tagOrId> to a new position
+in the display list just after the item given by I<aboveThis>.
+If I<tagOrId> refers to more than one item then all are moved
+but the relative order of the moved items will not be changed.
+I<AboveThis> is a tag or id; if it refers to more than one
+item then the last (topmost) of these items in the display list is used
+as the destination location for the moved items.
+Note: this method has no effect on window items. Window items always
+obscure other item types, and the stacking order of window items is
+determined by the B<raise> and B<lower> widget commands, not the
+B<raise> and B<lower> methods for canvases.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<scale>(I<tagOrId, xOrigin, yOrigin, xScale, yScale>)
+
+Rescale all of the items given by I<tagOrId> in canvas coordinate
+space.
+I<XOrigin> and I<yOrigin> identify the origin for the scaling
+operation and I<xScale> and I<yScale> identify the scale
+factors for x- and y-coordinates, respectively (a scale factor of
+1.0 implies no change to that coordinate).
+For each of the points defining each item, the x-coordinate is
+adjusted to change the distance from I<xOrigin> by a factor
+of I<xScale>.
+Similarly, each y-coordinate is adjusted to change the distance
+from I<yOrigin> by a factor of I<yScale>.
+This method returns an empty string.
+
+=item I<$canvas>-E<gt>B<scan>(I<option, args>)
+
+This method is used to implement scanning on canvases. It has
+two forms, depending on I<option>:
+
+=over 8
+
+=item I<$canvas>-E<gt>B<scanMark>(I<x, y>)
+
+Records I<x> and I<y> and the canvas's current view; used
+in conjunction with later B<scanDragto> method.
+Typically this method is associated with a mouse button press in
+the widget and I<x> and I<y> are the coordinates of the
+mouse. It returns an empty string.
+
+=item I<$canvas>-E<gt>B<scanDragto>(I<x, y, ?gain?>.)
+
+This method computes the difference between its I<x> and I<y>
+arguments (which are typically mouse coordinates) and the I<x> and
+I<y> arguments to the last B<scanMark> method for the widget.
+It then adjusts the view by 10 times the
+difference in coordinates. This method is typically associated
+It then adjusts the view by I<gain> times the
+difference in coordinates, where I<gain> defaults to 10.
+This command is typically associated
+with mouse motion events in the widget, to produce the effect of
+dragging the canvas at high speed through its window. The return
+value is an empty string.
+
+=back
+
+=item I<$canvas>-E<gt>B<select>(I<option, >?I<tagOrId, arg>?)
+
+Manipulates the selection in one of several ways, depending on
+I<option>.
+The method may take any of the forms described below.
+In all of the descriptions below, I<tagOrId> must refer to
+an item that supports indexing and selection; if it refers to
+multiple items then the first of
+these that supports indexing and the selection is used.
+I<Index> gives a textual description of a position
+within I<tagOrId>, as described in L<"INDICES"> above.
+
+=over 8
+
+=item I<$canvas>-E<gt>B<selectAdjust>(I<tagOrId, index>)
+
+Locate the end of the selection in I<tagOrId> nearest
+to the character given by I<index>, and adjust that
+end of the selection to be at I<index> (i.e. including
+but not going beyond I<index>).
+The other end of the selection is made the anchor point
+for future B<selectTo> method calls.
+If the selection isn't currently in I<tagOrId> then
+this method behaves the same as the B<selectTo> widget
+method.
+Returns an empty string.
+
+=item I<$canvas>-E<gt>B<selectClear>
+
+Clear the selection if it is in this widget.
+If the selection isn't in this widget then the method
+has no effect.
+Returns an empty string.
+
+=item I<$canvas>-E<gt>B<selectFrom>(I<tagOrId, index>)
+
+Set the selection anchor point for the widget to be just
+before the character
+given by I<index> in the item given by I<tagOrId>.
+This method doesn't change the selection; it just sets
+the fixed end of the selection for future B<selectTo>
+method calls.
+Returns an empty string.
+
+=item I<$canvas>-E<gt>B<selectItem>
+
+Returns the id of the selected item, if the selection is in an
+item in this canvas.
+If the selection is not in this canvas then an empty string
+is returned.
+
+=item I<$canvas>-E<gt>B<selectTo>(I<tagOrId, index>)
+
+Set the selection to consist of those characters of I<tagOrId>
+between the selection anchor point and
+I<index>.
+The new selection will include the character given by I<index>;
+it will include the character given by the anchor point only if
+I<index> is greater than or equal to the anchor point.
+The anchor point is determined by the most recent B<selectAdjust>
+or B<selectFrom> method calls for this widget.
+If the selection anchor point for the widget isn't currently in
+I<tagOrId>, then it is set to the same character given
+by I<index>.
+Returns an empty string.
+
+=back
+
+=item I<$canvas>-E<gt>B<type>(I<tagOrId>)
+
+Returns the type of the item given by I<tagOrId>, such as
+B<rectangle> or B<text>.
+If I<tagOrId> refers to more than one item, then the type
+of the first item in the display list is returned.
+If I<tagOrId> doesn't refer to any items at all then
+an empty string is returned.
+
+=item I<$canvas>-E<gt>B<xview>(?I<args>?)
+
+This method is used to query and change the horizontal position of the
+information displayed in the canvas's window.
+It can take any of the following forms:
+
+=over 8
+
+=item I<$canvas>-E<gt>B<xview>
+
+Returns a list containing two elements.
+Each element is a real fraction between 0 and 1; together they describe
+the horizontal span that is visible in the window.
+For example, if the first element is .2 and the second element is .6,
+20% of the canvas's area (as defined by the B<-scrollregion> option)
+is off-screen to the left, the middle 40% is visible
+in the window, and 40% of the canvas is off-screen to the right.
+These are the same values passed to scrollbars via the B<-xscrollcommand>
+option.
+
+=item I<$canvas>-E<gt>B<xviewMoveto>(I<fraction>)
+
+Adjusts the view in the window so that I<fraction> of the
+total width of the canvas is off-screen to the left.
+I<Fraction> must be a fraction between 0 and 1.
+
+=item I<$canvas>-E<gt>B<xviewScroll>(I<number, what>)
+
+This method shifts the view in the window left or right according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages> or an abbreviation
+of one of these.
+If I<what> is B<units>, the view adjusts left or right in units
+of the B<xScrollIncrement> option, if it is greater than zero,
+or in units of one-tenth the window's width otherwise.
+If I<what is >B<pages> then the view
+adjusts in units of nine-tenths the window's width.
+If I<number> is negative then information farther to the left
+becomes visible; if it is positive then information farther to the right
+becomes visible.
+
+=back
+
+=item I<$canvas>-E<gt>B<yview>(I<?args>?)
+
+This method is used to query and change the vertical position of the
+information displayed in the canvas's window.
+It can take any of the following forms:
+
+=over 8
+
+=item I<$canvas>-E<gt>B<yview>
+
+Returns a list containing two elements.
+Each element is a real fraction between 0 and 1; together they describe
+the vertical span that is visible in the window.
+For example, if the first element is .6 and the second element is 1.0,
+the lowest 40% of the canvas's area (as defined by the B<-scrollregion>
+option) is visible in the window.
+These are the same values passed to scrollbars via the B<-yscrollcommand>
+option.
+
+=item I<$canvas>-E<gt>B<yviewMoveto>(I<fraction>)
+
+Adjusts the view in the window so that I<fraction> of the canvas's
+area is off-screen to the top.
+I<Fraction> is a fraction between 0 and 1.
+
+=item I<$canvas>-E<gt>B<yviewScroll>(I<number, what>)
+
+This method adjusts the view in the window up or down according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages>.
+If I<what> is B<units>, the view adjusts up or down in units
+of the B<yScrollIncrement> option, if it is greater than zero,
+or in units of one-tenth the window's height otherwise.
+If I<what> is B<pages> then
+the view adjusts in units of nine-tenths the window's height.
+If I<number> is negative then higher information becomes
+visible; if it is positive then lower information
+becomes visible.
+
+=back
+
+=back
+
+=head1 OVERVIEW OF ITEM TYPES
+
+The sections below describe the various types of items supported
+by canvas widgets. Each item type is characterized by two things:
+first, the form of the B<create> method used to create
+instances of the type; and second, a set of configuration options
+for items of that type, which may be used in the
+B<create> and B<itemconfigure> methods.
+Most items don't support indexing or selection or the methods
+related to them, such as B<index> and B<insert>.
+Where items do support these facilities, it is noted explicitly
+in the descriptions below.
+At present, text, line and polygon items provide this support.
+For lines and polygons the indexing facility is used to manipulate
+the coordinates of the item.
+
+=head1 ARC ITEMS
+
+Items of type B<arc> appear on the display as arc-shaped regions.
+An arc is a section of an oval delimited by two angles (specified
+by the B<-start> and B<-extent> options) and displayed in
+one of several ways (specified by the B<-style> option).
+Arcs are created with methods of the following form:
+
+ $canvas->createArc(x1, y1, x2, y2, ?option, value, option, value, ...?)
+
+The arguments I<x1>, I<y1>, I<x2>, and I<y2> give
+the coordinates of two diagonally opposite corners of a
+rectangular region enclosing the oval that defines the arc.
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for arcs:
+
+=over 4
+
+=item B<-dash> =E<gt> I<pattern>
+
+=item B<-activedash> =E<gt> I<pattern>
+
+=item B<-disableddash> =E<gt> I<pattern>
+
+This option specifies dash patterns for the normal state, the active
+state, and the disabled state of an arc item.
+I<pattern> may have any of the forms accepted by B<Tk_GetDash>.
+If the dash options are omitted then the default is a solid outline.
+
+=item B<-dashoffset> =E<gt> I<offset>
+
+The starting I<offset> into the pattern provided by the
+B<-dash> option.
+B<-dashoffset> is ignored if there is no B<-dash> pattern.
+
+=item B<-extent> =E<gt> I<degrees>
+
+Specifies the size of the angular range occupied by the arc.
+The arc's range extends for I<degrees> degrees counter-clockwise
+from the starting angle given by the B<-start> option.
+I<Degrees> may be negative.
+If it is greater than 360 or less than -360, then I<degrees>
+modulo 360 is used as the extent.
+
+=item B<-fill> =E<gt> I<color>
+
+=item B<-activefill> =E<gt> I<color>
+
+=item B<-disabledfill> =E<gt> I<color>
+
+Specifies the color to be used to fill the arc region in its normal, active, and
+disabled states,
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+If I<color> is an empty string (the default), then
+then the arc will not be filled.
+
+=item B<-outline> =E<gt> I<color>
+
+=item B<-activeoutline> =E<gt> I<color>
+
+=item B<-disabledoutline> =E<gt> I<color>
+
+This option specifies the color that should be used to draw the
+outline of the arc in its normal, active and disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+This option defaults to B<black>. If I<color> is specified
+as undef then no outline is drawn for the arc.
+
+=item B<-outlinestipple> =E<gt> I<bitmap>
+
+=item B<-activeoutlinestipple> =E<gt> I<bitmap>
+
+=item B<-disabledoutlinestipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to draw the
+outline of the arc in its normal, active and disabled states.
+Indicates that the outline for the arc should be drawn with a stipple pattern;
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If the B<-outline> option hasn't been specified then this option
+has no effect.
+If I<bitmap> is an empty string (the default), then the outline is drawn
+in a solid fashion.
+
+=item B<-start> =E<gt> I<degrees>
+
+Specifies the beginning of the angular range occupied by the
+arc.
+I<Degrees> is given in units of degrees measured counter-clockwise
+from the 3-o'clock position; it may be either positive or negative.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the arc item where I<state> may be set to one of:
+normal, disabled, hidden or "". If set to empty, the state of the canvas
+itself is used. An arc item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-stipple> =E<gt> I<bitmap>
+
+=item B<-activestipple> =E<gt> I<bitmap>
+
+=item B<-disabledstipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to fill the
+the arc in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If the B<-fill> option hasn't been specified then this option
+has no effect.
+If I<bitmap> is an empty string (the default), then filling is done
+in a solid fashion.
+
+=item B<-style> =E<gt> I<type>
+
+Specifies how to draw the arc. If I<type> is B<pieslice>
+(the default) then the arc's region is defined by a section
+of the oval's perimeter plus two line segments, one between the center
+of the oval and each end of the perimeter section.
+If I<type> is B<chord> then the arc's region is defined
+by a section of the oval's perimeter plus a single line segment
+connecting the two end points of the perimeter section.
+If I<type> is B<arc> then the arc's region consists of
+a section of the perimeter alone.
+In this last case the B<-fill> option is ignored.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the arc item is updated on the screen.
+
+=item B<-width> =E<gt> I<outlineWidth>
+
+=item B<-activewidth> =E<gt> I<outlineWidth>
+
+=item B<-disabledwidth> =E<gt> I<outlineWidth>
+
+Specifies the width of the outline to be drawn around
+the arc's region, in its normal, active and disabled states.
+I<outlineWidth> may be in any of the forms described in
+the L<"COORDINATES"> section above.
+If the B<-outline> option has been specified as undef
+then this option has no effect.
+Wide outlines will be drawn centered on the edges of the arc's region.
+This option defaults to 1.0.
+
+=back
+
+=head1 BITMAP ITEMS
+
+Items of type B<bitmap> appear on the display as images with
+two colors, foreground and background.
+Bitmaps are created with methods of the following form:
+
+ $canvas->createBitmap(x, y, ?option, value, option, value, ...?)
+
+The arguments I<x> and I<y> specify the coordinates of a
+point used to position the bitmap on the display (see the B<-anchor>
+option below for more information on how bitmaps are displayed).
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for bitmaps:
+
+=over 4
+
+=item B<-anchor> =E<gt> I<anchorPos>
+
+I<AnchorPos> tells how to position the bitmap relative to the
+positioning point for the item; it may have any of the forms
+accepted by B<Tk_GetAnchor>. For example, if I<anchorPos>
+is B<center> then the bitmap is centered on the point; if
+I<anchorPos> is B<n> then the bitmap will be drawn so that
+its top center point is at the positioning point.
+This option defaults to B<center>.
+
+=item B<-background> =E<gt> I<color>
+
+=item B<-activebackground> =E<gt> I<color>
+
+=item B<-disabledbackground> =E<gt> I<color>
+
+Specifies the color to use for each of the bitmap's '0' valued pixels
+in its normal, active and disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+If this option isn't specified, or if it is specified as undef,
+then nothing is displayed where the bitmap pixels are 0; this
+produces a transparent effect.
+
+=item B<-bitmap> =E<gt> I<bitmap>
+
+=item B<-activebitmap> =E<gt> I<bitmap>
+
+=item B<-disabledbitmap> =E<gt> I<bitmap>
+
+Specifies the bitmaps to display in the item in its normal, active and
+disabled states. All bitmaps must have the same width and height.
+I<Bitmap> may have any of the forms accepted by B<Tk_GetBitmap>.
+
+=item B<-foreground> =E<gt> I<color>
+
+=item B<-activeforeground> =E<gt> I<color>
+
+=item B<-disabledforeground> =E<gt> I<color>
+
+Specifies the color to use for each of the bitmap's '1' valued pixels
+in its normal, active and disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor> and
+defaults to B<black>.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the bitmap item where I<state> may be set to one of:
+normal, disabled, or hidden. An bitmap item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the bitmap item is updated on the screen.
+
+=back
+
+=head1 GRID ITEMS
+
+Items of type B<grid> are intended for producing a visual reference for
+interpreting other items. They can be drawn as either lines (with dash
+style) or as rectangular "dots" at each grid point.
+
+Items of type B<grid> are unlike other items they always cover the
+whole of the canvas, but are never enclosed by nor overlap any area
+and are not near any point. That is they are intended to be always visible
+but not "pickable", as such they do support the "active" state.
+They are like other items in that: multiple
+grids are permitted, they can be raised and lowered relative to other
+items, they can be moved and scaled. As yet grids do not appear in
+PostScript output.
+
+Grids have outline like configure options. Grids are created with methods of the
+following form:
+
+ $canvas->createGrid(x1, y1, x2, y2, ?option, value, option, value, ...?)
+
+The arguments I<x1>, I<y1> give the origin of the grid. I<x2>, and I<y2> give
+the coordinates of the next grid point in their respective directions.
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+
+The following options are supported for grids:
+
+=over 4
+
+=item B<-lines> =E<gt> I<boolean>
+
+If B<-lines> is set to a true value then lines are drawn for both X and Y
+grids in the style determined by B<-dash>. Otherwise retangular "dots"
+are drawn at each grid point.
+
+=item B<-dash> =E<gt> I<pattern>
+
+=item B<-disableddash> =E<gt> I<pattern>
+
+This option specifies dash patterns for the normal state,
+and the disabled state of a grid item.
+I<pattern> may have any of the forms accepted by B<Tk_GetDash>.
+If the dash options are omitted then the default is a solid outline.
+
+=item B<-dashoffset> =E<gt> I<offset>
+
+The starting I<offset> into the pattern provided by the
+B<-dash> option.
+B<-dashoffset> is ignored if there is no B<-dash> pattern.
+
+=item B<-color> =E<gt> I<color>
+
+=item B<-disabledcolor> =E<gt> I<color>
+
+This option specifies the color that should be used to draw the
+outline of the grid in its normal and disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+This option defaults to B<black>.
+If I<color> is undef then no grid will be drawn.
+
+=item B<-stipple> =E<gt> I<bitmap>
+
+=item B<-disabledstipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to draw the
+outline of the rectangle in its normal and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If I<bitmap> is an empty string (the default), then the outline is drawn
+in a solid fashion.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the rectangle item where I<state> may be set to one of:
+normal, disabled, or hidden. Many options can take
+separate specifications in normal and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the grid item is updated on the screen.
+
+=item B<-width> =E<gt> I<outlineWidth>
+
+=item B<-disabledwidth> =E<gt> I<outlineWidth>
+
+Specifies the width of the lines drawn by the grid or the size (in both X and Y)
+of the dots, in its normal and disabled states.
+This option defaults to 1.0.
+
+=back
+
+=head1 IMAGE ITEMS
+
+Items of type B<image> are used to display images on a
+canvas.
+Images are created with methods of the following form:
+
+ $canvas->createImage(x, y, ?option, value, option, value, ...?)
+
+The arguments I<x> and I<y> specify the coordinates of a
+point used to position the image on the display (see the B<-anchor>
+option below for more information).
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for images:
+
+=over 4
+
+=item B<-anchor> =E<gt> I<anchorPos>
+
+I<AnchorPos> tells how to position the image relative to the
+positioning point for the item; it may have any of the forms
+accepted by B<Tk_GetAnchor>. For example, if I<anchorPos>
+is B<center> then the image is centered on the point; if
+I<anchorPos> is B<n> then the image will be drawn so that
+its top center point is at the positioning point.
+This option defaults to B<center>.
+
+=item B<-image> =E<gt> I<name>
+
+=item B<-activeimage> =E<gt> I<name>
+
+=item B<-disabledimage> =E<gt> I<name>
+
+Specifies the name of the images to display in the item in is normal,
+active and disabled states. This image must have been created
+previously, see L<Tk::Image>.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the image item where I<state> may be set to one of:
+normal, disabled, or hidden. An image item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item; it may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the image item is updated on the screen.
+
+=back
+
+=head1 LINE ITEMS
+
+Items of type B<line> appear on the display as one or more connected
+line segments or curves.
+Line items support coordinate indexing operations using the canvas
+methods: B<dchars, index, insert.>
+Lines are created with methods of the following form:
+
+ $canvas->createLine(x1, y1..., xn, yn, ?option, value, option, value, ...?)
+
+The arguments I<x1> through I<yn> give
+the coordinates for a series of two or more points that describe
+a series of connected line segments.
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for lines:
+
+=over 4
+
+=item B<-arrow> =E<gt> I<where>
+
+Indicates whether or not arrowheads are to be drawn at one or both
+ends of the line.
+I<Where> must have one of the values B<none> (for no arrowheads),
+B<first> (for an arrowhead at the first point of the line),
+B<last> (for an arrowhead at the last point of the line), or
+B<both> (for arrowheads at both ends).
+This option defaults to B<none>.
+
+=item B<-arrowshape> =E<gt> I<shape>
+
+This option indicates how to draw arrowheads.
+The I<shape> argument must be a list with three elements, each
+specifying a distance in any of the forms described in
+the L<"COORDINATES"> section above.
+The first element of the list gives the distance along the line
+from the neck of the arrowhead to its tip.
+The second element gives the distance along the line from the
+trailing points of the arrowhead to the tip, and the third
+element gives the distance from the outside edge of the line to the
+trailing points.
+If this option isn't specified then Tk picks a ``reasonable'' shape.
+
+=item B<-capstyle> =E<gt> I<style>
+
+Specifies the ways in which caps are to be drawn at the endpoints
+of the line.
+I<Style> may have any of the forms accepted by B<Tk_GetCapStyle>
+(B<butt>, B<projecting>, or B<round>).
+If this option isn't specified then it defaults to B<butt>.
+Where arrowheads are drawn the cap style is ignored.
+
+=item B<-dash> =E<gt> I<pattern>
+
+=item B<-activedash> =E<gt> I<pattern>
+
+=item B<-disableddash> =E<gt> I<pattern>
+
+This option specifies dash patterns for the normal state, the active
+state, and the disabled state of a line item.
+I<pattern> may have any of the forms accepted by B<Tk_GetDash>.
+If the dash options are omitted then the default is a solid outline.
+
+=item B<-dashoffset> =E<gt> I<offset>
+
+The starting I<offset> into the pattern provided by the
+B<-dash> option.
+B<-dashoffset> is ignored if there is no B<-dash> pattern.
+
+=item B<-fill> =E<gt> I<color>
+
+=item B<-activefill> =E<gt> I<color>
+
+=item B<-disabledfill> =E<gt> I<color>
+
+Specifies the color to be used to fill the line in its normal, active, and
+disabled states.
+I<Color> may have
+any of the forms acceptable to B<Tk_GetColor>. It may also be undef,
+in which case the line will be transparent.
+This option defaults to B<black>.
+
+=item B<-joinstyle> =E<gt> I<style>
+
+Specifies the ways in which joints are to be drawn at the vertices
+of the line.
+I<Style> may have any of the forms accepted by B<Tk_GetCapStyle>
+(B<bevel>, B<miter>, or B<round>).
+If this option isn't specified then it defaults to B<miter>.
+If the line only contains two points then this option is
+irrelevant.
+
+=item B<-smooth> =E<gt> I<boolean>
+
+I<Boolean> must have one of the forms accepted by B<Tk_GetBoolean>.
+It indicates whether or not the line should be drawn as a curve.
+If so, the line is rendered as a set of parabolic splines: one spline
+is drawn for the first and second line segments, one for the second
+and third, and so on. Straight-line segments can be generated within
+a curve by duplicating the end-points of the desired line segment.
+
+=item B<-splinesteps> =E<gt> I<number>
+
+Specifies the degree of smoothness desired for curves: each spline
+will be approximated with I<number> line segments. This
+option is ignored unless the B<-smooth> option is true.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the line item where I<state> may be set to one of:
+normal, disabled, or hidden. A line item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-stipple> =E<gt> I<bitmap>
+
+=item B<-activestipple> =E<gt> I<bitmap>
+
+=item B<-disabledstipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to fill the
+the line in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If I<bitmap> is an empty string (the default), then filling is
+done in a solid fashion.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the line item is updated on the screen.
+
+=item B<-width> =E<gt> I<lineWidth>
+
+=item B<-activewidth> =E<gt> I<lineWidth>
+
+=item B<-disabledwidth> =E<gt> I<lineWidth>
+
+Specifies the width of the line
+in its normal, active and disabled states.
+I<lineWidth> may be in any of the forms
+described in the L<"COORDINATES"> section above.
+
+Wide lines will be drawn centered on the path specified by the
+points.
+If this option isn't specified then it defaults to 1.0.
+
+=back
+
+=head1 OVAL ITEMS
+
+Items of type B<oval> appear as circular or oval regions on
+the display. Each oval may have an outline, a fill, or
+both. Ovals are created with methods of the
+following form:
+
+ $canvas->createOval(x1, y1, x2, y2, ?option, value, option, value, ...?)
+
+The arguments I<x1>, I<y1>, I<x2>, and I<y2> give
+the coordinates of two diagonally opposite corners of a
+rectangular region enclosing the oval.
+The oval will include the top and left edges of the rectangle
+not the lower or right edges.
+If the region is square then the resulting oval is circular;
+otherwise it is elongated in shape.
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for ovals:
+
+=over 4
+
+=item B<-dash> =E<gt> I<pattern>
+
+=item B<-activedash> =E<gt> I<pattern>
+
+=item B<-disableddash> =E<gt> I<pattern>
+
+This option specifies dash patterns for the normal state, the active
+state, and the disabled state of an oval item.
+I<pattern> may have any of the forms accepted by B<Tk_GetDash>.
+If the dash options are omitted then the default is a solid outline.
+
+=item B<-dashoffset> =E<gt> I<offset>
+
+The starting I<offset> into the pattern provided by the
+B<-dash> option.
+B<-dashoffset> is ignored if there is no B<-dash> pattern.
+
+=item B<-fill> =E<gt> I<color>
+
+=item B<-activefill> =E<gt> I<color>
+
+=item B<-disabledfill> =E<gt> I<color>
+
+Specifies the color to be used to fill the oval in its normal, active, and
+disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+If I<color> is undef (the default), then
+then the oval will not be filled.
+
+=item B<-outline> =E<gt> I<color>
+
+=item B<-activeoutline> =E<gt> I<color>
+
+=item B<-disabledoutline> =E<gt> I<color>
+
+This option specifies the color that should be used to draw the
+outline of the oval in its normal, active and disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+This option defaults to B<black>.
+If I<color> is undef then no outline will be
+drawn for the oval.
+
+=item B<-outlinestipple> =E<gt> I<bitmap>
+
+=item B<-activeoutlinestipple> =E<gt> I<bitmap>
+
+=item B<-disabledoutlinestipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to draw the
+outline of the oval in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If the B<-outline> option hasn't been specified then this option
+has no effect.
+If I<bitmap> is an empty string (the default), then the outline is drawn
+in a solid fashion.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the oval item where I<state> may be set to one of:
+normal, disabled, or hidden. An oval item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-stipple> =E<gt> I<bitmap>
+
+=item B<-activestipple> =E<gt> I<bitmap>
+
+=item B<-disabledstipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to fill the
+the oval in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If the B<-fill> option hasn't been specified then this option
+has no effect.
+If I<bitmap> is an empty string (the default), then filling is done
+in a solid fashion.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the oval item is updated on the screen.
+
+=item B<-width> =E<gt> I<outlineWidth>
+
+=item B<-activewidth> =E<gt> I<outlineWidth>
+
+=item B<-disabledwidth> =E<gt> I<outlineWidth>
+
+Specifies the width of the outline to be drawn around
+the oval, in its normal, active and disabled states.
+I<outlineWidth> specifies the width of the outline to be drawn around
+the oval, in any of the forms described in the L<"COORDINATES"> section above.
+
+If the B<-outline> option hasn't been specified then this option
+has no effect.
+Wide outlines are drawn centered on the oval path defined by
+I<x1>, I<y1>, I<x2>, and I<y2>.
+This option defaults to 1.0.
+
+=back
+
+=head1 POLYGON ITEMS
+
+Items of type B<polygon> appear as polygonal or curved filled regions
+on the display.
+Polygon items support coordinate indexing operations using the canvas
+methods: B<dchars, index, insert.>
+Polygons are created with methods of the following form:
+
+ $canvas->createPolygon(x1, y1, ..., xn, yn, ?option, value, option, value, ...?)
+
+The arguments I<x1> through I<yn> specify the coordinates for
+three or more points that define a closed polygon.
+The first and last points may be the same; whether they are or not,
+Tk will draw the polygon as a closed polygon.
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for polygons:
+
+=over 4
+
+=item B<-dash> =E<gt> I<pattern>
+
+=item B<-activedash> =E<gt> I<pattern>
+
+=item B<-disableddash> =E<gt> I<pattern>
+
+This option specifies dash patterns for the normal state, the active
+state, and the disabled state of an polygon item.
+I<pattern> may have any of the forms accepted by B<Tk_GetDash>.
+If the dash options are omitted then the default is a solid outline.
+
+=item B<-dashoffset> =E<gt> I<offset>
+
+The starting I<offset> into the pattern provided by the
+B<-dash> option.
+B<-dashoffset> is ignored if there is no B<-dash> pattern.
+
+=item B<-fill> =E<gt> I<color>
+
+=item B<-activefill> =E<gt> I<color>
+
+=item B<-disabledfill> =E<gt> I<color>
+
+Specifies the color to be used to fill the polygon in its normal, active, and
+disabled states.
+I<Color>
+may have any of the forms acceptable to B<Tk_GetColor>.
+If I<color> is undef then the polygon will be
+transparent.
+This option defaults to B<black>.
+
+=item B<-joinstyle> =E<gt> I<style>
+
+Specifies the ways in which joints are to be drawn at the vertices
+of the outline.
+I<Style> may have any of the forms accepted by B<Tk_GetCapStyle>
+(B<bevel>, B<miter>, or B<round>).
+If this option isn't specified then it defaults to B<miter>.
+
+=item B<-outline> =E<gt> I<color>
+
+=item B<-activeoutline> =E<gt> I<color>
+
+=item B<-disabledoutline> =E<gt> I<color>
+
+This option specifies the color that should be used to draw the
+outline of the polygon in its normal, active and disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+If I<color> is undef then no outline will be
+drawn for the polygon.
+This option defaults to undef (no outline).
+
+=item B<-outlinestipple> =E<gt> I<bitmap>
+
+=item B<-activeoutlinestipple> =E<gt> I<bitmap>
+
+=item B<-disabledoutlinestipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to draw the
+outline of the polygon in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If the B<-outline> option hasn't been specified then this option
+has no effect.
+If I<bitmap> is an empty string (the default), then the outline is drawn
+in a solid fashion.
+
+=item B<-smooth> =E<gt> I<boolean>
+
+I<Boolean> must have one of the forms accepted by B<Tk_GetBoolean>
+It indicates whether or not the polygon should be drawn with a
+curved perimeter.
+If so, the outline of the polygon becomes a set of parabolic splines,
+one spline for the first and second line segments, one for the second
+and third, and so on. Straight-line segments can be generated in a
+smoothed polygon by duplicating the end-points of the desired line segment.
+
+=item B<-splinesteps> =E<gt> I<number>
+
+Specifies the degree of smoothness desired for curves: each spline
+will be approximated with I<number> line segments. This
+option is ignored unless the B<-smooth> option is true.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the polygon item where I<state> may be set to one of:
+normal, disabled, or hidden. A polygon item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-stipple> =E<gt> I<bitmap>
+
+=item B<-activestipple> =E<gt> I<bitmap>
+
+=item B<-disabledstipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to fill the
+the polygon in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If I<bitmap> is an empty string (the default), then filling is
+done in a solid fashion.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the polygon item is updated on the screen.
+
+=item B<-width> =E<gt> I<outlineWidth>
+
+=item B<-activewidth> =E<gt> I<outlineWidth>
+
+=item B<-disabledwidth> =E<gt> I<outlineWidth>
+
+=item Specifies the width of the outline to be drawn around
+
+the polygon, in its normal, active and disabled states.
+I<outlineWidth> may be in any of the forms described in the COORDINATES
+section above.
+I<OutlineWidth> specifies the width of the outline to be drawn around
+the polygon, in any of the forms described in the L<"COORDINATES"> section above.
+If the B<-outline> option hasn't been specified then this option
+has no effect. This option defaults to 1.0.
+
+Polygon items are different from other items such as rectangles, ovals
+and arcs in that interior points are considered to be ``inside'' a
+polygon (e.g. for purposes of the B<find closest> and
+B<find overlapping> methods) even if it is not filled.
+For most other item types, an
+interior point is considered to be inside the item only if the item
+is filled or if it has neither a fill nor an outline. If you would
+like an unfilled polygon whose interior points are not considered
+to be inside the polygon, use a line item instead.
+
+=back
+
+=head1 RECTANGLE ITEMS
+
+Items of type B<rectangle> appear as rectangular regions on
+the display. Each rectangle may have an outline, a fill, or
+both. Rectangles are created with methods of the
+following form:
+
+ $canvas->createRectangle(x1, y1, x2, y2, ?option, value, option, value, ...?)
+
+The arguments I<x1>, I<y1>, I<x2>, and I<y2> give
+the coordinates of two diagonally opposite corners of the rectangle
+(the rectangle will include its upper and left edges but not
+its lower or right edges).
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for rectangles:
+
+=over 4
+
+=item B<-dash> =E<gt> I<pattern>
+
+=item B<-activedash> =E<gt> I<pattern>
+
+=item B<-disableddash> =E<gt> I<pattern>
+
+This option specifies dash patterns for the normal state, the active
+state, and the disabled state of a rectangle item.
+I<pattern> may have any of the forms accepted by B<Tk_GetDash>.
+If the dash options are omitted then the default is a solid outline.
+
+=item B<-dashoffset> =E<gt> I<offset>
+
+The starting I<offset> into the pattern provided by the
+B<-dash> option.
+B<-dashoffset> is ignored if there is no B<-dash> pattern.
+
+=item B<-fill> =E<gt> I<color>
+
+=item B<-activefill> =E<gt> I<color>
+
+=item B<-disabledfill> =E<gt> I<color>
+
+Specifies the color to be used to fill the rectangle in its normal, active, and
+disabled states.
+I<Color>
+may be specified in any of the forms accepted by B<Tk_GetColor>.
+If I<color> is undef (the default),
+then the rectangle will not be filled.
+
+=item B<-outline> =E<gt> I<color>
+
+=item B<-activeoutline> =E<gt> I<color>
+
+=item B<-disabledoutline> =E<gt> I<color>
+
+This option specifies the color that should be used to draw the
+outline of the rectangle in its normal, active and disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+This option defaults to B<black>.
+If I<color> is undef then no outline will be
+drawn for the rectangle.
+
+=item B<-outlinestipple> =E<gt> I<bitmap>
+
+=item B<-activeoutlinestipple> =E<gt> I<bitmap>
+
+=item B<-disabledoutlinestipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to draw the
+outline of the rectangle in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If the B<-outline> option hasn't been specified then this option
+has no effect.
+If I<bitmap> is an empty string (the default), then the outline is drawn
+in a solid fashion.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the rectangle item where I<state> may be set to one of:
+normal, disabled, or hidden. A rectangle item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-stipple> =E<gt> I<bitmap>
+
+=item B<-activestipple> =E<gt> I<bitmap>
+
+=item B<-disabledstipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to fill the
+the rectangle in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If the B<-fill> option hasn't been specified then this option
+has no effect.
+If I<bitmap> is an empty string (the default), then filling
+is done in a solid fashion.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the rectangle item is updated on the screen.
+
+=item B<-width> =E<gt> I<outlineWidth>
+
+=item B<-activewidth> =E<gt> I<outlineWidth>
+
+=item B<-disabledwidth> =E<gt> I<outlineWidth>
+
+Specifies the width of the outline to be drawn around
+the rectangle, in its normal, active and disabled states.
+I<OutlineWidth> specifies the width of the outline to be drawn around
+the rectangle, in any of the forms described in the L<"COORDINATES"> section above.
+
+If the B<-outline> option hasn't been specified then this option
+has no effect.
+Wide outlines are drawn centered on the rectangular path
+defined by I<x1>, I<y1>, I<x2>, and I<y2>.
+This option defaults to 1.0.
+
+=back
+
+=head1 TEXT ITEMS
+
+A text item displays a string of characters on the screen in one
+or more lines.
+Text items support indexing and selection, along with the
+following text-related canvas methods: B<dchars>,
+B<focus>, B<icursor>, B<index>, B<insert>,
+B<select>.
+Text items are created with methods of the following
+form:
+
+ $canvas->createText(x, y, ?option, value, option, value, ...?)
+
+The arguments I<x> and I<y> specify the coordinates of a
+point used to position the text on the display (see the options
+below for more information on how text is displayed).
+After the coordinates there may be any number of I<option>-I<value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> methods to change the item's
+configuration.
+The following options are supported for text items:
+
+=over 4
+
+=item B<-anchor> =E<gt> I<anchorPos>
+
+I<AnchorPos> tells how to position the text relative to the
+positioning point for the text; it may have any of the forms
+accepted by B<Tk_GetAnchor>. For example, if I<anchorPos>
+is B<center> then the text is centered on the point; if
+I<anchorPos> is B<n> then the text will be drawn such that
+the top center point of the rectangular region occupied by the
+text will be at the positioning point.
+This option defaults to B<center>.
+
+=item B<-fill> =E<gt> I<color>
+
+=item B<-activefill> =E<gt> I<color>
+
+=item B<-disabledfill> =E<gt> I<color>
+
+Specifies the color to be used to fill the text in its normal, active, and
+disabled states.
+I<Color> may have any of the forms accepted by B<Tk_GetColor>.
+If I<color> is undef then the text will be transparent.
+If this option isn't specified then it defaults to B<black>.
+
+=item B<-font> =E<gt> I<fontName>
+
+Specifies the font to use for the text item.
+I<FontName> may be any string acceptable to B<Tk_GetFontStruct>.
+If this option isn't specified, it defaults to a system-dependent
+font.
+
+=item B<-justify> =E<gt> I<how>
+
+Specifies how to justify the text within its bounding region.
+I<How> must be one of the values B<left>, B<right>,
+or B<center>.
+This option will only matter if the text is displayed as multiple
+lines.
+If the option is omitted, it defaults to B<left>.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the text item where I<state> may be set to one of:
+normal, disabled, or hidden. A text item may also be in the "active"
+state if the mouse is currently over it. Many options can take
+separate specifications in normal, active and disabled states such that the
+appearance of the item can be different in each state.
+
+=item B<-stipple> =E<gt> I<bitmap>
+
+=item B<-activestipple> =E<gt> I<bitmap>
+
+=item B<-disabledstipple> =E<gt> I<bitmap>
+
+This option specifies stipple patterns that should be used to fill the
+the text in its normal, active and disabled states.
+I<bitmap> specifies the stipple pattern to use, in any of the
+forms accepted by B<Tk_GetBitmap>.
+If I<bitmap> is an empty string (the default) then the text
+is drawn in a solid fashion.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-text> =E<gt> I<string>
+
+I<String> specifies the characters to be displayed in the text item.
+Newline characters cause line breaks.
+The characters in the item may also be changed with the
+B<insert> and B<delete> methods.
+This option defaults to an empty string.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the text item is updated on the screen.
+
+=item B<-width> =E<gt> I<lineLength>
+
+Specifies a maximum line length for the text, in any of the forms
+described in the L<"COORDINATES"> section above.
+If this option is zero (the default) the text is broken into
+lines only at newline characters.
+However, if this option is non-zero then any line that would
+be longer than I<lineLength> is broken just before a space
+character to make the line shorter than I<lineLength>; the
+space character is treated as if it were a newline
+character.
+
+=back
+
+=head1 WINDOW ITEMS
+
+Items of type B<window> cause a particular window to be displayed
+at a given position on the canvas.
+Window items are created with methods of the following form:
+
+S< >I<$canvas>->B<createWindow>(I<x, y>?, I<-option>=>I<value>, I<-option>=>I<value>, ...?)
+
+The arguments I<x> and I<y> specify the coordinates of a
+point used to position the window on the display (see the B<-anchor>
+option below for more information on how bitmaps are displayed).
+After the coordinates there may be any number of I<option-value>
+pairs, each of which sets one of the configuration options
+for the item. These same I<option>-I<value> pairs may be
+used in B<itemconfigure> method to change the item's
+configuration.
+The following options are supported for window items:
+
+=over 4
+
+=item B<-anchor> =E<gt> I<anchorPos>
+
+I<AnchorPos> tells how to position the window relative to the
+positioning point for the item; it may have any of the forms
+accepted by B<Tk_GetAnchor>. For example, if I<anchorPos>
+is B<center> then the window is centered on the point; if
+I<anchorPos> is B<n> then the window will be drawn so that
+its top center point is at the positioning point.
+This option defaults to B<center>.
+
+=item B<-height> =E<gt> I<pixels>
+
+Specifies the height to assign to the item's window.
+I<Pixels> may have any of the
+forms described in the L<"COORDINATES"> section above.
+If this option isn't specified, or if it is specified as an empty
+string, then the window is given whatever height it requests internally.
+
+=item B<-state> =E<gt> I<state>
+
+Modifies the state of the window item where I<state> may be set to one of:
+normal, disabled, or hidden.
+
+=item B<-tags> =E<gt> I<tagList>
+
+Specifies a set of tags to apply to the item.
+I<TagList> consists of a list of tag names, which replace any
+existing tags for the item.
+I<TagList> may be an empty list.
+
+=item B<-updatecommand> =E<gt> I<command>
+
+Specifies a callback that is to be executed every time
+the window item is updated on the screen.
+
+=item B<-width> =E<gt> I<pixels>
+
+Specifies the width to assign to the item's window.
+I<Pixels> may have any of the
+forms described in the L<"COORDINATES"> section above.
+If this option isn't specified, or if it is specified as an empty
+string, then the window is given whatever width it requests internally.
+
+=item B<-window> =E<gt> I<$widget>
+
+Specifies the window to associate with this item.
+The window specified by $widget must either be a child of
+the canvas widget or a child of some ancestor of the canvas widget.
+I<PathName> may not refer to a top-level window.
+
+Note: due to restrictions in the ways that windows are managed, it is not
+possible to draw other graphical items (such as lines and images) on top
+of window items. A window item always obscures any graphics that
+overlap it, regardless of their order in the display list.
+
+=back
+
+=head1 APPLICATION-DEFINED ITEM TYPES
+
+It is possible for individual applications to define new item
+types for canvas widgets using C code.
+See the documentation for B<Tk_CreateItemType>.
+
+=head1 BINDINGS
+
+Canvas has default bindings to allow scrolling if necessary:
+<Up>, <Down>, <Left> and <Right> (and their <Control-*> counter
+parts). Further <Proir>, <Next>, <Home> and <End>. These
+bindings allow you to navigate the same way as in other
+widgets that can scroll.
+
+=head1 Perl/Tk Methods
+
+The following methods are added as perl code:
+
+=over 4
+
+=item $canvas->get_corners
+
+Returns the bounding box in Canvas coordinates of the visible portion
+of the Canvas. (Written by Slaven Rezic.)
+
+=back
+
+=head1 CREDITS
+
+Tk's canvas widget is a blatant ripoff of ideas from Joel Bartlett's
+I<ezd> program. I<Ezd> provides structured graphics in a Scheme
+environment and preceded canvases by a year or two. Its simple
+mechanisms for placing and animating graphical objects inspired the
+functions of canvases.
+
+=head1 KEYWORDS
+
+canvas, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Checkbutton.pm b/Master/tlpkg/tlperl/lib/Tk/Checkbutton.pm
new file mode 100644
index 00000000000..491d8cd2444
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Checkbutton.pm
@@ -0,0 +1,42 @@
+package Tk::Checkbutton;
+# Conversion from Tk4.0 button.tcl competed.
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Checkbutton.pm#6 $
+
+# modify it under the same terms as Perl itself, subject
+# to additional disclaimer in license.terms due to partial
+# derivation from Tk4.0 sources.
+
+require Tk::Widget;
+require Tk::Button;
+
+use base qw(Tk::Button);
+
+Construct Tk::Widget 'Checkbutton';
+
+sub Tk_cmd { \&Tk::checkbutton }
+
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Enter>', 'Enter');
+ $mw->bind($class,'<Leave>', 'Leave');
+ $mw->bind($class,'<1>', 'Invoke');
+ $mw->bind($class,'<space>', 'Invoke');
+ return $class;
+}
+
+sub Invoke
+{
+ my $w = shift;
+ $w->invoke() unless($w->cget('-state') eq 'disabled');
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Checkbutton.pod b/Master/tlpkg/tlperl/lib/Tk/Checkbutton.pod
new file mode 100644
index 00000000000..35c4fa8ffbc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Checkbutton.pod
@@ -0,0 +1,347 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Checkbutton - Create and manipulate Checkbutton widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$checkbutton> = I<$parent>-E<gt>B<Checkbutton>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground>
+B<-activeforeground>
+B<-anchor>
+B<-background>
+B<-bitmap>
+B<-borderwidth>
+B<-compound>
+B<-cursor>
+B<-disabledforeground>
+B<-font>
+B<-foreground>
+B<-highlightbackground>
+B<-highlightcolor>
+B<-highlightthickness>
+B<-image>
+B<-justify>
+B<-padx>
+B<-pady>
+B<-relief>
+B<-takefocus>
+B<-text>
+B<-textvariable>
+B<-underline>
+B<-wraplength>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies a L<perl/Tk callback|Tk::callbacks> to associate with the button. This command
+is typically invoked when mouse button 1 is released over the button
+window. The button's global variable (B<-variable> option) will
+be updated before the command is invoked.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies a desired height for the button.
+If an image or bitmap is being displayed in the button then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in lines of text.
+If this option isn't specified, the button's desired height is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=item Name: B<indicatorOn>
+
+=item Class: B<IndicatorOn>
+
+=item Switch: B<-indicatoron>
+
+Specifies whether or not the indicator should be drawn. Must be a
+proper boolean value. If false, the B<relief> option is
+ignored and the widget's relief is always sunken if the widget is
+selected and raised otherwise.
+
+=item Command-Line Name: B<-offrelief>
+
+=item Database Name: B<offRelief>
+
+=item Database Class: B<OffRelief>
+
+Specifies the relief for the checkbutton when the indicator is not
+drawn and the checkbutton is off. The default value is B<raised>. By
+setting this option to B<flat> and setting
+B<-indicatoron false -overrelief raised>, the effect is achieved of
+having a flat button
+that raises on mouse-over and which is depressed when activated. This
+is the behavior typically exhibited by the Bold, Italic, and
+Underline checkbuttons on the toolbar of a word-processor, for
+example.
+
+=item Name: B<offValue>
+
+=item Class: B<Value>
+
+=item Switch: B<-offvalue>
+
+Specifies value to store in the button's associated variable whenever
+this button is deselected. Defaults to ``0''.
+
+=item Name: B<onValue>
+
+=item Class: B<Value>
+
+=item Switch: B<-onvalue>
+
+Specifies value to store in the button's associated variable whenever
+this button is selected. Defaults to ``1''.
+
+=item Command-Line Name: B<-overrelief>
+
+=item Database Name: B<overRelief>
+
+=item Database Class: B<OverRelief>
+
+Specifies an alternative relief for the button, to be used when
+the mouse cursor is over the widget. This option can be used to
+make toolbar buttons, by configuring B<-relief flat -overrelief
+raised>. If the value of this option is the empty string, then
+no alternative relief is used when the mouse cursor is over the
+button. The empty string is the default value.
+
+=item Name: B<selectColor>
+
+=item Class: B<Background>
+
+=item Switch: B<-selectcolor>
+
+Specifies a background color to use when the button is selected.
+If B<indicatorOn> is true then the color applies to the indicator.
+Under Windows, this color is used as the background for the indicator
+regardless of the select state.
+If B<indicatorOn> is false, this color is used as the background
+for the entire widget, in place of B<background> or B<activeBackground>,
+whenever the widget is selected.
+If specified as an empty string then no special color is used for
+displaying when the widget is selected.
+
+=item Name: B<selectImage>
+
+=item Class: B<SelectImage>
+
+=item Switch: B<-selectimage>
+
+Specifies an image to display (in place of the B<image> option)
+when the checkbutton is selected.
+This option is ignored unless the B<image> option has been
+specified.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of three states for the checkbutton: B<normal>, B<active>,
+or B<disabled>. In normal state the checkbutton is displayed using the
+B<foreground> and B<background> options. The active state is
+typically used when the pointer is over the checkbutton. In active state
+the checkbutton is displayed using the B<activeForeground> and
+B<activeBackground> options. Disabled state means that the checkbutton
+should be insensitive: the default bindings will refuse to activate
+the widget and will ignore mouse button presses.
+In this state the B<disabledForeground> and
+B<background> options determine how the checkbutton is displayed.
+
+=item Name: B<variable>
+
+=item Class: B<Variable>
+
+=item Switch: B<-variable>
+
+Specifies reference to a variable to set to indicate whether
+or not this button is selected. Defaults to C<\$widget-E<gt>{'Value'}>
+member of the widget's hash. In general perl variables are C<undef> unless
+specifically initialized which will not match either default B<-onvalue> or
+default B<-offvalue>.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies a desired width for the button.
+If an image or bitmap is being displayed in the button then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in characters.
+If this option isn't specified, the button's desired width is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Checkbutton> method creates a new window (given by the
+$widget argument) and makes it into a checkbutton widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the checkbutton such as its colors, font,
+text, and initial relief. The B<checkbutton> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A checkbutton is a widget
+that displays a textual string, bitmap or image
+and a square called an I<indicator>.
+If text is displayed, it must all be in a single font, but it
+can occupy multiple lines on the screen (if it contains newlines
+or if wrapping occurs because of the B<wrapLength> option) and
+one of the characters may optionally be underlined using the
+B<underline> option.
+A checkbutton has
+all of the behavior of a simple button, including the
+following: it can display itself in either of three different
+ways, according to the B<state> option;
+it can be made to appear
+raised, sunken, or flat; it can be made to flash; and it invokes
+a L<perl/Tk callback|Tk::callbacks> whenever mouse button 1 is clicked over the
+checkbutton.
+
+In addition, checkbuttons can be I<selected>.
+If a checkbutton is selected then the indicator is normally
+drawn with a selected appearance, and
+a Tcl variable associated with the checkbutton is set to a particular
+value (normally 1).
+Under Unix, the indicator is drawn with a sunken relief and a special
+color. Under Windows, the indicator is drawn with a check mark inside.
+If the checkbutton is not selected, then the indicator is drawn with a
+deselected appearance, and the associated variable is
+set to a different value (typically 0).
+Under Unix, the indicator is drawn with a raised relief and no special
+color. Under Windows, the indicator is drawn without a check mark inside.
+By default, the name of the variable associated with a checkbutton is the
+same as the I<name> used to create the checkbutton.
+The variable name, and the ``on'' and ``off'' values stored in it,
+may be modified with options on the command line or in the option
+database.
+Configuration options may also be used to modify the way the
+indicator is displayed (or whether it is displayed at all).
+By default a checkbutton is configured to select and deselect
+itself on alternate button clicks.
+In addition, each checkbutton monitors its associated variable and
+automatically selects and deselects itself when the variables value
+changes to and from the button's ``on'' value.
+
+=head1 WIDGET METHODS
+
+The B<Checkbutton> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for checkbutton widgets:
+
+=over 4
+
+=item I<$checkbutton>-E<gt>B<deselect>
+
+Deselects the checkbutton and sets the associated variable to its ``off''
+value.
+
+=item I<$checkbutton>-E<gt>B<flash>
+
+Flashes the checkbutton. This is accomplished by redisplaying the checkbutton
+several times, alternating between active and normal colors. At
+the end of the flash the checkbutton is left in the same normal/active
+state as when the command was invoked.
+This command is ignored if the checkbutton's state is B<disabled>.
+
+=item I<$checkbutton>-E<gt>B<invoke>
+
+Does just what would have happened if the user invoked the checkbutton
+with the mouse: toggle the selection state of the button and invoke
+the L<perl/Tk callback|Tk::callbacks> associated with the checkbutton, if there is one.
+The return value is the return value from the L<perl/Tk callback|Tk::callbacks>, or an
+empty string if there is no command associated with the checkbutton.
+This command is ignored if the checkbutton's state is B<disabled>.
+
+=item I<$checkbutton>-E<gt>B<select>
+
+Selects the checkbutton and sets the associated variable to its ``on''
+value.
+
+=item I<$checkbutton>-E<gt>B<toggle>
+
+Toggles the selection state of the button, redisplaying it and
+modifying its associated variable to reflect the new state.
+
+=back
+
+=head1 BINDINGS
+
+Tk automatically creates class bindings for checkbuttons that give them
+the following default behavior:
+
+=over 4
+
+=item [1]
+
+On Unix systems, a checkbutton activates whenever the mouse passes
+over it and deactivates whenever the mouse leaves the checkbutton. On
+Mac and Windows systems, when mouse button 1 is pressed over a
+checkbutton, the button activates whenever the mouse pointer is inside
+the button, and deactivates whenever the mouse pointer leaves the
+button.
+
+=item [2]
+
+When mouse button 1 is pressed over a checkbutton, it is invoked (its
+selection state toggles and the command associated with the button is
+invoked, if there is one).
+
+=item [3]
+
+When a checkbutton has the input focus, the space key causes the checkbutton
+to be invoked. Under Windows, there are additional key bindings; plus
+(+) and equal (=) select the button, and minus (-) deselects the button.
+
+If the checkbutton's state is B<disabled> then none of the above
+actions occur: the checkbutton is completely non-responsive.
+
+The behavior of checkbuttons can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 KEYWORDS
+
+checkbutton, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Clipboard.pm b/Master/tlpkg/tlperl/lib/Tk/Clipboard.pm
new file mode 100644
index 00000000000..16ab74a599e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Clipboard.pm
@@ -0,0 +1,122 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Clipboard;
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.009'; # sprintf '4.%03d', q$Revision: #8 $ =~ /\D(\d+)\s*$/;
+
+use AutoLoader qw(AUTOLOAD);
+use Tk qw(catch);
+
+sub clipEvents
+{
+ return qw[Copy Cut Paste];
+}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ foreach my $op ($class->clipEvents)
+ {
+ $mw->Tk::bind($class,"<<$op>>","clipboard$op");
+ }
+ return $class;
+}
+
+sub clipboardSet
+{
+ my $w = shift;
+ $w->clipboardClear;
+ $w->clipboardAppend(@_);
+}
+
+sub clipboardCopy
+{
+ my $w = shift;
+ my $val = $w->getSelected;
+ if (defined $val)
+ {
+ $w->clipboardSet('--',$val);
+ }
+ return $val;
+}
+
+sub clipboardCut
+{
+ my $w = shift;
+ my $val = $w->clipboardCopy;
+ if (defined $val)
+ {
+ $w->deleteSelected;
+ }
+ return $val;
+}
+
+sub clipboardGet
+{
+ my $w = shift;
+ $w->SelectionGet('-selection','CLIPBOARD',@_);
+}
+
+sub clipboardPaste
+{
+ my $w = shift;
+ local $@;
+ catch
+ {
+## Different from Tcl/Tk version:
+# if ($w->windowingsystem eq 'x11')
+# {
+# catch
+# {
+# $w->deleteSelected;
+# };
+# }
+ $w->insert("insert", $w->clipboardGet);
+ $w->SeeInsert if $w->can('SeeInsert');
+ };
+}
+
+sub clipboardOperations
+{
+ my @class = ();
+ my $mw = shift;
+ if (ref $mw)
+ {
+ $mw = $mw->DelegateFor('bind');
+ }
+ else
+ {
+ push(@class,$mw);
+ $mw = shift;
+ }
+ while (@_)
+ {
+ my $op = shift;
+ $mw->Tk::bind(@class,"<<$op>>","clipboard$op");
+ }
+}
+
+# These methods work for Entry and Text
+# and can be overridden where they don't work
+
+sub deleteSelected
+{
+ my $w = shift;
+ catch { $w->delete('sel.first','sel.last') };
+}
+
+
+1;
+__END__
+
+sub getSelected
+{
+ my $w = shift;
+ my $val = Tk::catch { $w->get('sel.first','sel.last') };
+ return $val;
+}
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Clipboard.pod b/Master/tlpkg/tlperl/lib/Tk/Clipboard.pod
new file mode 100644
index 00000000000..a65eb37a870
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Clipboard.pod
@@ -0,0 +1,89 @@
+# Copyright (c) 1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::clipboard - Manipulate Tk clipboard
+
+=for category User Interaction
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<clipboard>I<Option>?(I<args>)?
+
+=head1 DESCRIPTION
+
+This command provides an interface to the Tk clipboard,
+which stores data for later retrieval using the selection mechanism.
+In order to copy data into the clipboard, B<clipboardClear> must
+be called, followed by a sequence of one or more calls to
+B<clipboardAppend>. To ensure that the clipboard is updated atomically, all
+appends should be completed before returning to the event loop.
+
+The following methods are currently supported:
+
+=over 4
+
+=item I<$widget>-E<gt>B<clipboardClear>
+
+Claims ownership of the clipboard on I<$widget>'s display and removes
+any previous contents. Returns an empty string.
+
+=item I<$widget>-E<gt>B<clipboardAppend>(?B<-format>=E<gt>I<format>?,?B<-type>=E<gt>I<type>?,?B<-->?,I<data>)
+
+Appends I<data> to the clipboard on $widget's
+display in the form given by I<type> with the representation given
+by I<format> and claims ownership of the clipboard on $widget's
+display.
+
+=over 4
+
+I<Type> specifies the form in which the selection is to be returned
+(the desired ``target'' for conversion, in ICCCM terminology), and
+should be an atom name such as STRING or FILE_NAME; see the
+Inter-Client Communication Conventions Manual for complete details.
+I<Type> defaults to STRING.
+
+The I<format> argument specifies the representation that should be
+used to transmit the selection to the requester (the second column of
+Table 2 of the ICCCM), and defaults to STRING. If I<format> is
+STRING, the selection is transmitted as 8-bit ASCII characters.
+See the L<Tk::Selection> documentation for explanation of what happens
+if I<format> is not STRING.
+Note that arguments passed to
+B<clipboardAppend> are concatenated before conversion, so the
+caller must take care to ensure appropriate spacing across string
+boundaries. All items appended to the clipboard with the same
+I<type> must have the same I<format>.
+
+A B<--> argument may be specified to mark the end of options: the
+next argument will always be used as I<data>.
+This feature may be convenient if, for example, I<data> starts
+with a B<->.
+
+=back
+
+=back
+
+=over 4
+
+=item I<$widget>-E<gt>B<clipboardGet>( ?-type? );
+
+Retrieve data from the clipboard on I<widget>'s display.
+I<-type> specifies the form in which the data is
+to be returned and should be an atom name such as STRING or
+FILE_NAME. Type defaults to STRING. This command is equivalent
+to C<SelectionGet( -selection =E<gt> 'CLIPBOARD' )>.
+
+=back
+
+=head1 KEYWORDS
+
+clear, format, clipboard, append, selection, type
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/CmdLine.pm b/Master/tlpkg/tlperl/lib/Tk/CmdLine.pm
new file mode 100644
index 00000000000..ebe43a7f1e2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/CmdLine.pm
@@ -0,0 +1,497 @@
+package Tk::CmdLine; # -*-Perl-*-
+
+#/----------------------------------------------------------------------------//
+#/ Module: Tk/CmdLine.pm
+#/
+#/ Purpose:
+#/
+#/ Process standard X11 command line options and set initial resources.
+#/
+#/ Author: ???? Date: ????
+#/
+#/ History: SEE POD
+#/----------------------------------------------------------------------------//
+
+use vars qw($VERSION);
+$VERSION = '4.007'; # $Id: //depot/Tkutf8/Tk/CmdLine.pm#6 $
+
+use 5.004;
+
+use strict;
+
+use Config;
+
+my $OBJECT = undef; # define the current object
+
+#/----------------------------------------------------------------------------//
+#/ Constructor
+#/ Returns the object reference.
+#/----------------------------------------------------------------------------//
+
+sub new # Tk::CmdLine::new()
+{
+ my $this = shift(@_);
+ my $class = ref($this) || $this;
+
+ my $name = 'pTk';
+ $name = $1 if (($0 =~ m/(?:^|[\/\\])([\w-]+)(?:\.\w+)?$/) && ($1 ne '-e'));
+
+ my $self = {
+ name => $name,
+ config => { -name => $name },
+ options => {},
+ methods => {},
+ command => [],
+ synchronous => 0,
+ iconic => 0,
+ motif => ($Tk::strictMotif || 0),
+ resources => {} };
+
+ return bless($self, $class);
+}
+
+#/----------------------------------------------------------------------------//
+#/ Process the arguments in a given array or in @ARGV.
+#/ Returns the object reference.
+#/----------------------------------------------------------------------------//
+
+sub Argument_ # Tk::CmdLine::Argument_($flag) # private method
+{
+ my $self = shift(@_);
+ my $flag = shift(@_);
+ unless ($self->{offset} < @{$self->{argv}})
+ {
+ die 'Usage: ', $self->{name}, ' ... ', $flag, " <argument> ...\n";
+ }
+ return splice(@{$self->{argv}}, $self->{offset}, 1);
+}
+
+sub Config_ # Tk::CmdLine::Config_($flag, $name) # private method
+{
+ my $self = shift(@_);
+ my ($flag, $name) = @_;
+ my $val = $self->Argument_($flag);
+ push(@{$self->{command}}, $flag, $val);
+ $self->{config}->{"-$name"} = $val;
+}
+
+sub Flag_ # Tk::CmdLine::Flag_($flag, $name) # private method
+{
+ my $self = shift(@_);
+ my ($flag, $name) = @_;
+ push(@{$self->{command}}, $flag);
+ $self->{$name} = 1;
+}
+
+sub Option_ # Tk::CmdLine::Option_($flag, $name) # private method
+{
+ my $self = shift(@_);
+ my ($flag, $name) = @_;
+ my $val = $self->Argument_($flag);
+ push(@{$self->{command}}, $flag, $val);
+ $self->{options}->{"*$name"} = $val;
+}
+
+sub Method_ # Tk::CmdLine::Method_($flag, $name) # private method
+{
+ my $self = shift(@_);
+ my ($flag, $name) = @_;
+ my $val = $self->Argument_($flag);
+ push(@{$self->{command}}, $flag, $val);
+ $self->{methods}->{$name} = $val;
+}
+
+sub Resource_ # Tk::CmdLine::Resource_($flag, $name) # private method
+{
+ my $self = shift(@_);
+ my ($flag, $name) = @_;
+ my $val = $self->Argument_($flag);
+ if ($val =~ /^([^!:\s]+)*\s*:\s*(.*)$/)
+ {
+ push(@{$self->{command}}, $flag, $val);
+ $self->{options}->{$1} = $2;
+ }
+}
+
+my %Method = (
+ background => 'Option_',
+ bg => 'background', # alias
+ class => 'Config_',
+ display => 'screen', # alias
+ fg => 'foreground', # alias
+ fn => 'font', # alias
+ font => 'Option_',
+ foreground => 'Option_',
+ geometry => 'Method_',
+ iconic => 'Flag_',
+ iconposition => 'Method_',
+ motif => 'Flag_',
+ name => 'Config_',
+ screen => 'Config_',
+ synchronous => 'Flag_',
+ title => 'Config_',
+ xrm => 'Resource_'
+);
+
+sub SetArguments # Tk::CmdLine::SetArguments([@argument])
+{
+ my $self = (@_ # define the object as necessary
+ ? ((ref($_[0]) eq __PACKAGE__)
+ ? shift(@_)
+ : (($_[0] eq __PACKAGE__) ? shift(@_) : 1) && ($OBJECT ||= __PACKAGE__->new()))
+ : ($OBJECT ||= __PACKAGE__->new()));
+ $OBJECT = $self; # update the current object
+ $self->{argv} = (@_ ? [ @_ ] : \@ARGV);
+ $self->{offset} = 0; # its existence will denote that this method has been called
+
+ my @option = ();
+
+ while ($self->{offset} < @{$self->{argv}})
+ {
+ last if ($self->{argv}->[$self->{offset}] eq '--');
+ unless (
+ (($self->{argv}->[$self->{offset}] =~ /^-{1,2}(\w+)$/) && (@option = $1)) ||
+ (($self->{argv}->[$self->{offset}] =~ /^--(\w+)=(.*)$/) && (@option = ($1, $2))))
+ {
+ ++$self->{offset};
+ next;
+ }
+
+ next if (!exists($Method{$option[0]}) && ++$self->{offset});
+
+ $option[0] = $Method{$option[0]} if exists($Method{$Method{$option[0]}});
+
+ my $method = $Method{$option[0]};
+
+ if (@option > 1) # replace --<option>=<value> with <value>
+ {
+ $self->{argv}->[$self->{offset}] = $option[1];
+ }
+ else # remove the argument
+ {
+ splice(@{$self->{argv}}, $self->{offset}, 1);
+ }
+
+ $self->$method(('-' . $option[0]), $option[0]);
+ }
+
+ $self->{config}->{-class} ||= ucfirst($self->{config}->{-name});
+
+ delete($self->{argv}); # no longer needed
+
+ return $self;
+}
+
+use vars qw(&process); *process = \&SetArguments; # alias to keep old code happy
+
+#/----------------------------------------------------------------------------//
+#/ Get a list of the arguments that have been processed by SetArguments().
+#/ Returns an array.
+#/----------------------------------------------------------------------------//
+
+sub GetArguments # Tk::CmdLine::GetArguments()
+{
+ my $self = (@_ # define the object as necessary
+ ? ((ref($_[0]) eq __PACKAGE__)
+ ? shift(@_)
+ : (($_[0] eq __PACKAGE__) ? shift(@_) : 1) && ($OBJECT ||= __PACKAGE__->new()))
+ : ($OBJECT ||= __PACKAGE__->new()));
+ $OBJECT = $self; # update the current object
+
+ $self->SetArguments() unless exists($self->{offset}); # set arguments if not yet done
+
+ return @{$self->{command}};
+}
+
+#/----------------------------------------------------------------------------//
+#/ Get the value of a configuration option (default: -class).
+#/ Returns the option value.
+#/----------------------------------------------------------------------------//
+
+sub cget # Tk::CmdLine::cget([$option])
+{
+ my $self = (@_ # define the object as necessary
+ ? ((ref($_[0]) eq __PACKAGE__)
+ ? shift(@_)
+ : (($_[0] eq __PACKAGE__) ? shift(@_) : 1) && ($OBJECT ||= __PACKAGE__->new()))
+ : ($OBJECT ||= __PACKAGE__->new()));
+ $OBJECT = $self; # update the current object
+ my $option = shift(@_) || '-class';
+
+ $self->SetArguments() unless exists($self->{offset}); # set arguments if not yet done
+
+ return (exists($self->{config}->{$option}) ? $self->{config}->{$option} : undef);
+}
+
+#/----------------------------------------------------------------------------//
+
+sub CreateArgs # Tk::CmdLine::CreateArgs()
+{
+ my $self = (@_ # define the object as necessary
+ ? ((ref($_[0]) eq __PACKAGE__)
+ ? shift(@_)
+ : (($_[0] eq __PACKAGE__) ? shift(@_) : 1) && ($OBJECT ||= __PACKAGE__->new()))
+ : ($OBJECT ||= __PACKAGE__->new()));
+ $OBJECT = $self; # update the current object
+
+ $self->SetArguments() unless exists($self->{offset}); # set arguments if not yet done
+
+ return $self->{config};
+}
+
+#/----------------------------------------------------------------------------//
+
+sub Tk::MainWindow::apply_command_line
+{
+ my $mw = shift(@_);
+
+ my $self = ($OBJECT ||= __PACKAGE__->new());
+
+ $self->SetArguments() unless exists($self->{offset}); # set arguments if not yet done
+
+ foreach my $priority (keys(%{$self->{resources}}))
+ {
+ foreach my $resource (@{$self->{resources}->{$priority}})
+ {
+ $mw->optionAdd(@{$resource}, $priority);
+ }
+ }
+
+ foreach my $key (keys(%{$self->{options}}))
+ {
+ $mw->optionAdd($key => $self->{options}->{$key}, 'interactive');
+ }
+
+ foreach my $key (keys(%{$self->{methods}}))
+ {
+ $mw->$key($self->{methods}->{$key});
+ }
+
+ if ($self->{methods}->{geometry})
+ {
+ if ($self->{methods}->{geometry} =~ /[+-]\d+[+-]\d+/)
+ {
+ $mw->positionfrom('user');
+ }
+ if ($self->{methods}->{geometry} =~ /\d+x\d+/)
+ {
+ $mw->sizefrom('user');
+ }
+ delete $self->{methods}->{geometry}; # XXX needed?
+ }
+
+ $mw->Synchronize() if $self->{synchronous};
+
+ if ($self->{iconic})
+ {
+ $mw->iconify();
+ $self->{iconic} = 0;
+ }
+
+ $Tk::strictMotif = ($self->{motif} || 0);
+
+ # Both these are needed to reliably save state
+ # but 'hostname' is tricky to do portably.
+ # $mw->client(hostname());
+ $mw->protocol('WM_SAVE_YOURSELF' => ['WMSaveYourself',$mw]);
+ $mw->command([ $self->{name}, @{$self->{command}} ]);
+}
+
+#/----------------------------------------------------------------------------//
+#/ Set the initial resources.
+#/ Returns the object reference.
+#/----------------------------------------------------------------------------//
+
+sub SetResources # Tk::CmdLine::SetResources((\@resource | $resource) [, $priority])
+{
+ my $self = (@_ # define the object as necessary
+ ? ((ref($_[0]) eq __PACKAGE__)
+ ? shift(@_)
+ : (($_[0] eq __PACKAGE__) ? shift(@_) : 1) && ($OBJECT ||= __PACKAGE__->new()))
+ : ($OBJECT ||= __PACKAGE__->new()));
+ $OBJECT = $self; # update the current object
+
+ $self->SetArguments() unless exists($self->{offset}); # set arguments if not yet done
+ return $self unless @_;
+
+ my $data = shift(@_);
+ my $priority = shift(@_) || 'userDefault';
+
+ $self->{resources}->{$priority} = [] unless exists($self->{resources}->{$priority});
+
+ foreach my $resource ((ref($data) eq 'ARRAY') ? @{$data} : $data)
+ {
+ if (ref($resource) eq 'ARRAY') # resources in [ <pattern>, <value> ] format
+ {
+ push(@{$self->{resources}->{$priority}}, [ @{$resource} ])
+ if (@{$resource} == 2);
+ }
+ else # resources in resource file format
+ {
+ push(@{$self->{resources}->{$priority}}, [ $1, $2 ])
+ if ($resource =~ /^([^!:\s]+)*\s*:\s*(.*)$/);
+ }
+ }
+
+ return $self;
+}
+
+#/----------------------------------------------------------------------------//
+#/ Load initial resources from one or more files (default: $XFILESEARCHPATH with
+#/ priority 'startupFile' and $XUSERFILESEARCHPATH with priority 'userDefault').
+#/ Returns the object reference.
+#/----------------------------------------------------------------------------//
+
+sub LoadResources # Tk::CmdLine::LoadResources([%options])
+{
+ my $self = (@_ # define the object as necessary
+ ? ((ref($_[0]) eq __PACKAGE__)
+ ? shift(@_)
+ : (($_[0] eq __PACKAGE__) ? shift(@_) : 1) && ($OBJECT ||= __PACKAGE__->new()))
+ : ($OBJECT ||= __PACKAGE__->new()));
+ $OBJECT = $self; # update the current object
+
+ $self->SetArguments() unless exists($self->{offset}); # set arguments if not yet done
+
+ my %options = @_;
+
+ my @file = ();
+ my $echo = (exists($options{-echo})
+ ? (defined($options{-echo}) ? $options{-echo} : \*STDOUT) : undef);
+
+ unless (%options && (exists($options{-file}) || exists($options{-symbol})))
+ {
+ @file = (
+ { -symbol => 'XFILESEARCHPATH', -priority => 'startupFile' },
+ { -symbol => 'XUSERFILESEARCHPATH', -priority => 'userDefault' } );
+ }
+ else
+ {
+ @file = { %options };
+ }
+
+ my $delimiter = (($^O eq 'MSWin32') ? ';' : ':');
+
+ foreach my $file (@file)
+ {
+ my $fileSpec = $file->{-spec} = undef;
+ if (exists($file->{-symbol}))
+ {
+ my $xpath = undef;
+ if ($file->{-symbol} eq 'XUSERFILESEARCHPATH')
+ {
+ $file->{-priority} ||= 'userDefault';
+ foreach my $symbol (qw(XUSERFILESEARCHPATH XAPPLRESDIR HOME))
+ {
+ last if (exists($ENV{$symbol}) && ($xpath = $ENV{$symbol}));
+ }
+ next unless defined($xpath);
+ }
+ else
+ {
+ $file->{-priority} ||= (($file->{-symbol} eq 'XFILESEARCHPATH')
+ ? 'startupFile' : 'userDefault');
+ next unless (
+ exists($ENV{$file->{-symbol}}) && ($xpath = $ENV{$file->{-symbol}}));
+ }
+
+ unless (exists($self->{translation}))
+ {
+ $self->{translation} = {
+ '%l' => '', # ignored
+ '%C' => '', # ignored
+ '%S' => '', # ignored
+ '%L' => ($ENV{LANG} || 'C'), # language
+ '%T' => 'app-defaults', # type
+ '%N' => $self->{config}->{-class} # filename
+ };
+ }
+
+ my @postfix = map({ $_ . '/' . $self->{config}->{-class} }
+ ('/' . $self->{translation}->{'%L'}), '');
+
+ ITEM: foreach $fileSpec (split($Config{path_sep}, $xpath))
+ {
+ if ($fileSpec =~ s/(%[A-Za-z])/$self->{translation}->{$1}/g) # File Pattern
+ {
+ if (defined($echo) && ($file->{-symbol} ne 'XFILESEARCHPATH'))
+ {
+ print $echo 'Checking ', $fileSpec, "\n";
+ }
+ next unless ((-f $fileSpec) && (-r _) && (-s _));
+ $file->{-spec} = $fileSpec;
+ last;
+ }
+ else # Directory - Check for <Directory>/$LANG/<Class>, <Directory>/<CLASS>
+ {
+ foreach my $postfix (@postfix)
+ {
+ my $fileSpec2 = $fileSpec . $postfix;
+ if (defined($echo) && ($file->{-symbol} ne 'XFILESEARCHPATH'))
+ {
+ print $echo 'Checking ', $fileSpec2, "\n";
+ }
+ next unless ((-f $fileSpec2) && (-r _) && (-s _));
+ $file->{-spec} = $fileSpec2;
+ last ITEM;
+ }
+ }
+ }
+ }
+ elsif (exists($file->{-file}) && ($fileSpec = $file->{-file}))
+ {
+ print $echo 'Checking ', $fileSpec, "\n" if defined($echo);
+ next unless ((-f $fileSpec) && (-r _) && (-s _));
+ $file->{-spec} = $fileSpec;
+ }
+ }
+
+ foreach my $file (@file)
+ {
+ next unless defined($file->{-spec});
+ local *SPEC;
+ next unless open(SPEC,$file->{-spec});
+ print $echo ' Loading ', $file->{-spec}, "\n" if defined($echo);
+
+ my $resource = undef;
+ my @resource = ();
+ my $continuation = 0;
+
+ while (defined(my $line = <SPEC>))
+ {
+ chomp($line);
+ next if ($line =~ /^\s*$/); # skip blank lines
+ next if ($line =~ /^\s*!/); # skip comments
+ $continuation = ($line =~ s/\s*\\$/ /); # search for trailing backslash
+ unless (defined($resource)) # it is the first line
+ {
+ $resource = $line;
+ }
+ else # it is a continuation line
+ {
+ $line =~ s/^\s*//; # remove leading whitespace
+ $resource .= $line;
+ }
+ next if $continuation;
+ push(@resource, [ $1, $2 ]) if ($resource =~ /^([^:\s]+)*\s*:\s*(.*)$/);
+ $resource = undef;
+ }
+
+ close(SPEC);
+
+ if (defined($resource)) # special case - EOF after line with trailing backslash
+ {
+ push(@resource, [ $1, $2 ]) if ($resource =~ /^([^:\s]+)*\s*:\s*(.*)$/);
+ }
+
+ $self->SetResources(\@resource, $file->{-priority}) if @resource;
+ }
+
+ return $self;
+}
+
+#/----------------------------------------------------------------------------//
+
+1;
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/CmdLine.pod b/Master/tlpkg/tlperl/lib/Tk/CmdLine.pod
new file mode 100644
index 00000000000..58b69fded17
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/CmdLine.pod
@@ -0,0 +1,454 @@
+=head1 NAME
+
+Tk::CmdLine - Process standard X11 command line options and set initial resources
+
+=for pm Tk/CmdLine.pm
+
+=for category Creating and Configuring Widgets
+
+=head1 SYNOPSIS
+
+ Tk::CmdLine::SetArguments([@argument]);
+
+ my $value = Tk::CmdLine::cget([$option]);
+
+ Tk::CmdLine::SetResources((\@resource | $resource) [, $priority]);
+
+ Tk::CmdLine::LoadResources(
+ [ -symbol => $symbol ]
+ [ -file => $fileSpec ]
+ [ -priority => $priority ]
+ [ -echo => $fileHandle ] );
+
+=head1 DESCRIPTION
+
+Process standard X11 command line options and set initial resources.
+
+The X11R5 man page for X11 says: "Most X programs attempt to use the same names
+for command line options and arguments. All applications written with the
+X Toolkit Intrinsics automatically accept the following options: ...".
+This module processes these command line options for perl/Tk applications
+using the C<SetArguments>() function.
+
+This module can optionally be used to load initial resources explicitly via
+function C<SetResources>(), or from specified files (default: the standard X11
+application-specific resource files) via function C<LoadResources>().
+
+=head2 Command Line Options
+
+=over 4
+
+=item B<-background> I<Color> | B<-bg> I<Color>
+
+Specifies the color to be used for the window background.
+
+=item B<-class> I<Class>
+
+Specifies the class under which resources for the application should be found.
+This option is useful in shell aliases to distinguish between invocations
+of an application, without resorting to creating links to alter the executable
+file name.
+
+=item B<-display> I<Display> | B<-screen> I<Display>
+
+Specifies the name of the X server to be used.
+
+=item B<-font> I<Font> | B<-fn> I<Font>
+
+Specifies the font to be used for displaying text.
+
+=item B<-foreground> I<Color> | B<-fg> I<Color>
+
+Specifies the color to be used for text or graphics.
+
+=item B<-geometry> I<Geometry>
+
+Specifies the initial size and location of the I<first>
+L<MainWindow|Tk::MainWindow>.
+
+=item B<-iconic>
+
+Indicates that the user would prefer that the application's windows initially
+not be visible as if the windows had been immediately iconified by the user.
+Window managers may choose not to honor the application's request.
+
+=item B<-motif>
+
+Specifies that the application should adhere as closely as possible to Motif
+look-and-feel standards. For example, active elements such as buttons and
+scrollbar sliders will not change color when the pointer passes over them.
+
+=item B<-name> I<Name>
+
+Specifies the name under which resources for the application should be found.
+This option is useful in shell aliases to distinguish between invocations
+of an application, without resorting to creating links to alter the executable
+file name.
+
+=item B<-synchronous>
+
+Indicates that requests to the X server should be sent synchronously, instead of
+asynchronously. Since Xlib normally buffers requests to the server, errors do
+do not necessarily get reported immediately after they occur. This option turns
+off the buffering so that the application can be debugged. It should never
+be used with a working program.
+
+=item B<-title> I<TitleString>
+
+This option specifies the title to be used for this window. This information is
+sometimes used by a window manager to provide some sort of header identifying
+the window.
+
+=item B<-xrm> I<ResourceString>
+
+Specifies a resource pattern and value to override any defaults. It is also
+very useful for setting resources that do not have explicit command line
+arguments.
+
+The I<ResourceString> is of the form E<lt>I<pattern>E<gt>:E<lt>I<value>E<gt>,
+that is (the first) ':' is used to determine which part is pattern and which
+part is value. The (E<lt>I<pattern>E<gt>, E<lt>I<value>E<gt>) pair is entered
+into the options database with B<optionAdd> (for each
+L<MainWindow|Tk::MainWindow> configured), with I<interactive> priority.
+
+=back
+
+=head2 Initial Resources
+
+There are several mechanism for initializing the resource database to be used
+by an X11 application. Resources may be defined in a $C<HOME>/.Xdefaults file,
+a system application defaults file (e.g.
+/usr/lib/X11/app-defaults/E<lt>B<CLASS>E<gt>),
+or a user application defaults file (e.g. $C<HOME>/E<lt>B<CLASS>E<gt>).
+The Tk::CmdLine functionality for setting initial resources concerns itself
+with the latter two.
+
+Resource files contain data lines of the form
+E<lt>I<pattern>E<gt>:E<lt>I<value>E<gt>.
+They may also contain blank lines and comment lines (denoted
+by a ! character as the first non-blank character). Refer to L<option|Tk::option>
+for a description of E<lt>I<pattern>E<gt>:E<lt>I<value>E<gt>.
+
+=over 4
+
+=item System Application Defaults Files
+
+System application defaults files may be specified via environment variable
+$C<XFILESEARCHPATH> which, if set, contains a list of file patterns
+(joined using the OS-dependent path delimiter, e.g. colon on B<UNIX>).
+
+=item User Application Defaults Files
+
+User application defaults files may be specified via environment variables
+$C<XUSERFILESEARCHPATH>, $C<XAPPLRESDIR> or $C<HOME>.
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item B<SetArguments> - Tk::CmdLine::SetArguments([@argument])
+
+Extract the X11 options contained in a specified array (@ARGV by default).
+
+ Tk::CmdLine::SetArguments([@argument])
+
+The X11 options may be specified using a single dash I<-> as per the X11
+convention, or using two dashes I<--> as per the POSIX standard (e.g.
+B<-geometry> I<100x100>, B<-geometry> I<100x100> or B<-geometry=>I<100x100>).
+The options may be interspersed with other options or arguments.
+A I<--> by itself terminates option processing.
+
+By default, command line options are extracted from @ARGV the first time
+a MainWindow is created. The Tk::MainWindow constructor indirectly invokes
+C<SetArguments>() to do this.
+
+=item B<GetArguments> - Tk::CmdLine::GetArguments()
+
+Get a list of the X11 options that have been processed by C<SetArguments>().
+(C<GetArguments>() first invokes C<SetArguments>() if it has not already been invoked.)
+
+=item B<cget> - Tk::CmdLine::cget([$option])
+
+Get the value of a configuration option specified via C<SetArguments>().
+(C<cget>() first invokes C<SetArguments>() if it has not already been invoked.)
+
+ Tk::CmdLine::cget([$option])
+
+The valid options are: B<-class>, B<-name>, B<-screen> and B<-title>.
+If no option is specified, B<-class> is implied.
+
+A typical use of C<cget>() might be to obtain the application class in order
+to define the name of a resource file to be loaded in via C<LoadResources>().
+
+ my $class = Tk::CmdLine::cget(); # process command line and return class
+
+=item B<SetResources> - Tk::CmdLine::SetResources((\@resource | $resource) [, $priority])
+
+Set the initial resources.
+
+ Tk::CmdLine::SetResources((\@resource | $resource) [, $priority])
+
+A single resource may be specified using a string of the form
+'E<lt>I<pattern>E<gt>:E<lt>I<value>E<gt>'. Multiple resources may be specified
+by passing an array reference whose elements are either strings of the above
+form, and/or anonymous arrays of the form [ E<lt>I<pattern>E<gt>,
+E<lt>I<value>E<gt> ]. The optional second argument specifies the priority,
+as defined in L<option|Tk::option>, to be associated with the resources
+(default: I<userDefault>).
+
+Note that C<SetResources>() first invokes C<SetArguments>() if it has not already
+been invoked.
+
+=item B<LoadResources> - Tk::CmdLine::LoadResources([%options])
+
+Load initial resources from one or more files.
+
+ Tk::CmdLine::LoadResources(
+ [ -symbol => $symbol ]
+ [ -file => $fileSpec ]
+ [ -priority => $priority ]
+ [ -echo => $fileHandle ] );
+
+[ B<-symbol> =E<gt> $symbol ] specifies the name of an environment variable
+that, if set, defines a list of one or more directories and/or file patterns
+(joined using the OS-dependent path delimiter, e.g. colon on B<UNIX>).
+$C<XUSERFILESEARCHPATH> is a special case.
+If $C<XUSERFILESEARCHPATH> is not set, $C<XAPPLRESDIR> is checked instead.
+If $C<XAPPLRESDIR> is not set, $C<HOME> is checked instead.
+
+An item is identified as a file pattern if it contains one or more /%[A-Za-z]/
+patterns. Only patterns B<%L>, B<%T> and B<%N> are currently recognized. All
+others are replaced with the null string. Pattern B<%L> is translated into
+$C<LANG>. Pattern B<%T> is translated into I<app-defaults>. Pattern B<%N> is
+translated into the application class name.
+
+Each file pattern, after substitutions are applied, is assumed to define a
+FileSpec to be examined.
+
+When a directory is specified, FileSpecs
+E<lt>B<DIRECTORY>E<gt>/E<lt>B<LANG>E<gt>/E<lt>B<CLASS>E<gt>
+and E<lt>B<DIRECTORY>E<gt>/E<lt>B<CLASS>E<gt> are defined, in that order.
+
+[ B<-file> =E<gt> $fileSpec ] specifies a resource file to be loaded in.
+The file is silently skipped if if does not exist, or if it is not readable.
+
+[ B<-priority> =E<gt> $priority ] specifies the priority, as defined in
+L<option|Tk::option>, to be associated with the resources
+(default: I<userDefault>).
+
+[ B<-echo> =E<gt> $fileHandle ] may be used to specify that a line should be
+printed to the corresponding FileHandle (default: \*STDOUT) everytime a file
+is examined / loaded.
+
+If no B<-symbol> or B<-file> options are specified, C<LoadResources>()
+processes symbol $C<XFILESEARCHPATH> with priority I<startupFile> and
+$C<XUSERFILESEARCHPATH> with priority I<userDefault>.
+(Note that $C<XFILESEARCHPATH> and $C<XUSERFILESEARCHPATH> are supposed to
+contain only patterns. $C<XAPPLRESDIR> and $C<HOME> are supposed to be a single
+directory. C<LoadResources>() does not check/care whether this is the case.)
+
+For each set of FileSpecs, C<LoadResources>() examines each FileSpec to
+determine if the file exists and is readable. The first file that meets this
+criteria is read in and C<SetResources>() is invoked.
+
+Note that C<LoadResources>() first invokes C<SetArguments>() if it has not already
+been invoked.
+
+=back
+
+=head1 NOTES
+
+This module is an object-oriented module whose methods can be invoked as object
+methods, class methods or regular functions. This is accomplished via an
+internally-maintained object reference which is created as necessary, and which
+always points to the last object used. C<SetArguments>(), C<SetResources>() and
+C<LoadResources>() return the object reference.
+
+=head1 EXAMPLES
+
+=over
+
+=item 1
+
+@ARGV is processed by Tk::CmdLine at MainWindow creation.
+
+ use Tk;
+
+ # <Process @ARGV - ignoring all X11-specific options>
+
+ my $mw = MainWindow->new();
+
+ MainLoop();
+
+=item 2
+
+@ARGV is processed by Tk::CmdLine before MainWindow creation.
+An @ARGV of (--geometry=100x100 -opt1 a b c -bg red)
+is equal to (-opt1 a b c) after C<SetArguments>() is invoked.
+
+ use Tk;
+
+ Tk::CmdLine::SetArguments(); # Tk::CmdLine->SetArguments() works too
+
+ # <Process @ARGV - not worrying about X11-specific options>
+
+ my $mw = MainWindow->new();
+
+ MainLoop();
+
+=item 3
+
+Just like 2) except that default arguments are loaded first.
+
+ use Tk;
+
+ Tk::CmdLine::SetArguments(qw(-name test -iconic));
+ Tk::CmdLine::SetArguments();
+
+ # <Process @ARGV - not worrying about X11-specific options>
+
+ my $mw = MainWindow->new();
+
+ MainLoop();
+
+=item 4
+
+@ARGV is processed by Tk::CmdLine before MainWindow creation.
+Standard resource files are loaded in before MainWindow creation.
+
+ use Tk;
+
+ Tk::CmdLine::SetArguments();
+
+ # <Process @ARGV - not worrying about X11-specific options>
+
+ Tk::CmdLine::LoadResources();
+
+ my $mw = MainWindow->new();
+
+ MainLoop();
+
+=item 5
+
+@ARGV is processed by Tk::CmdLine before MainWindow creation.
+Standard resource files are loaded in before MainWindow creation
+using non-default priorities.
+
+ use Tk;
+
+ Tk::CmdLine::SetArguments();
+
+ # <Process @ARGV - not worrying about X11-specific options>
+
+ Tk::CmdLine::LoadResources(-echo => \*STDOUT,
+ -priority => 65, -symbol => 'XFILESEARCHPATH' );
+ Tk::CmdLine::LoadResources(-echo => \*STDOUT,
+ -priority => 75, -symbol => 'XUSERFILESEARCHPATH' );
+
+ my $mw = MainWindow->new();
+
+ MainLoop();
+
+=item 6
+
+@ARGV is processed by Tk::CmdLine before MainWindow creation.
+Standard resource files are loaded in before MainWindow creation.
+Individual resources are also loaded in before MainWindow creation.
+
+ use Tk;
+
+ Tk::CmdLine::SetArguments();
+
+ # <Process @ARGV - not worrying about X11-specific options>
+
+ Tk::CmdLine::LoadResources();
+
+ Tk::CmdLine::SetResources( # set a single resource
+ '*Button*background: red',
+ 'widgetDefault' );
+
+ Tk::CmdLine::SetResources( # set multiple resources
+ [ '*Button*background: red', '*Button*foreground: blue' ],
+ 'widgetDefault' );
+
+ my $mw = MainWindow->new();
+
+ MainLoop();
+
+=back
+
+=head1 ENVIRONMENT
+
+=over 4
+
+=item B<HOME> (optional)
+
+Home directory which may contain user application defaults files as
+$C<HOME>/$C<LANG>/E<lt>B<CLASS>E<gt> or $C<HOME>/E<lt>B<CLASS>E<gt>.
+
+=item B<LANG> (optional)
+
+The current language (default: I<C>).
+
+=item B<XFILESEARCHPATH> (optional)
+
+List of FileSpec patterns
+(joined using the OS-dependent path delimiter, e.g. colon on B<UNIX>)
+used in defining system application defaults files.
+
+=item B<XUSERFILESEARCHPATH> (optional)
+
+List of FileSpec patterns
+(joined using the OS-dependent path delimiter, e.g. colon on B<UNIX>)
+used in defining user application defaults files.
+
+=item B<XAPPLRESDIR> (optional)
+
+Directory containing user application defaults files as
+$C<XAPPLRESDIR>/$C<LANG>/E<lt>B<CLASS>E<gt> or
+$C<XAPPLRESDIR>/E<lt>B<CLASS>E<gt>.
+
+=back
+
+=head1 SEE ALSO
+
+L<MainWindow|Tk::MainWindow>
+L<option|Tk::option>
+
+=head1 HISTORY
+
+=over 4
+
+=item *
+
+1999.03.04 Ben Pavon E<lt>ben.pavon@hsc.hac.comE<gt>
+
+Rewritten as an object-oriented module.
+
+Allow one to process command line options in a specified array (@ARGV by default).
+Eliminate restrictions on the format and location of the options within the array
+(previously the X11 options could not be specified in POSIX format and had to be
+at the beginning of the array).
+
+Added the C<SetResources>() and C<LoadResources>() functions to allow the definition
+of resources prior to MainWindow creation.
+
+=item *
+
+2000.08.31 Ben Pavon E<lt>ben.pavon@hsc.hac.comE<gt>
+
+Added the C<GetArguments>() method which returns the list of arguments that
+have been processed by C<SetArguments>().
+
+Modified C<LoadResources>() to split the symbols using the OS-dependent
+path delimiter defined in the B<Config> module.
+
+Modified C<LoadResources>() to eliminate a warning message when processing
+patterns B<%l>, B<%C>, B<%S>.
+
+=back
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/ColorEdit.xpm b/Master/tlpkg/tlperl/lib/Tk/ColorEdit.xpm
new file mode 100644
index 00000000000..ef3474cd869
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ColorEdit.xpm
@@ -0,0 +1,58 @@
+/* XPM */
+static char * ColorEditor_xpm[] = {
+"48 48 6 1",
+" c #0000FFFF0000",
+". c #FFFFFFFF0000",
+"X c #FFFF00000000",
+"o c #000000000000",
+"O c #0000FFFFFFFF",
+"+ c #00000000FFFF",
+" . . ......X..XXXXXXXXXXXXXXXX",
+" . .X.X. X...XX.XXXXXXXXXXX",
+" . . . ... ...XXXXXXXXXXXXXX",
+" . . .. .....XX.XXXXXXXXXXXX",
+" . .X.X...XXX..XXXXXXXXXXXX",
+" .. . ....X...X.XXXXXXXXX",
+" .. ..X.. . ..X..XXXXXXXX",
+" .... ..X.X..X.XXXXXXX",
+" ... .X. X...X...XX.XXX",
+" . .. ... XX...XXXX..XXXX",
+" ooo o ooo. . .. .X...X..X.XXXXX",
+" oo oo oo. . . . .......X.X.XX",
+" oo o oo . . .. ........XX.XXXX",
+" oo ooo oo ooo Xooo.oo..... X XX.X",
+" oo o oo oo o oo ooo o.. . X...X X",
+" oo oo oo oo oo oo .oo . X.X.....XX ",
+"O oo o oo oo oo oo oo oo. ... X..... .",
+"O O oo oo oo o oo ooo o. oo . ... .X..X",
+"O OOOooooO ooo ooo ooo oo ... ....... X ",
+" O OOO . . .. ... ..",
+"OOO OOOO OO O . .... . . .. .",
+" + O O O O .. .. . .",
+" O OOO OO . .. .... ",
+"OOOOO O OO . .. . ... ",
+"+OOOO OOOO OO O ... .. ..",
+" O+OO OO O . ",
+"OOOOOOOOoooooooOOOO ooo oo .... ",
+"OO++ OOO ooO OoOO oo oo oo .. ",
+"+OOOOOOOOooOOOo O O oo oo .",
+"++OOO +oo+oOO O oo oo ooo ooooo ooo ooo oo. ",
+"+OO O OOoooooO O o ooo oo oo o oo ooo o ",
+"++++ O OooOOoO Ooo Ooo oo oo oo oo oo ",
+"+++OOOO ooOOOoOOooOOooO oo oo oo oo oo ",
+"++++++ Ooo OOoOOooOooo ooo ooo o oo o oo ",
+"+++O+++oooooooOOOooOoooOooo ooo Oooo oo ",
+"++++++++O++OOOO O OOOOOOO ",
+"++O++++O+O+OOOOOOO O O OOOOOO O ",
+"+++O+++OOO+OO OOOO O OO O O O ",
+"++++++++O++O OO OO OO OOO OO O O ",
+"+++++++++++++ OOOOOO OOOO OO OO ",
+"+++++++++++++O+ +O OOOO OOO OOO OOO ",
+"++++++++++++++ OOOOO O OOOOOOOOOO ",
+"+++++++++++++ ++ OO +O OOOOO O O O ",
+"+++++++++++++++O+++O+O+O OOOOOOOOOO O ",
+"+++++++++++++O++++O++ O OOO O OOO OO ",
+"++++++++++++++++O+++O+O+OOOO OOOO O OO ",
+"+++++++++++++++++++O+++ +++O OOOOOO OO O ",
+"++++++++++++++++++++++ +++ O OOOOOOOOO "};
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/ColorEditor.pm b/Master/tlpkg/tlperl/lib/Tk/ColorEditor.pm
new file mode 100644
index 00000000000..82b38991f11
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ColorEditor.pm
@@ -0,0 +1,781 @@
+package Tk::ColorSelect; # XXX why is this the Tk::ColorSelect package?
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.012'; # was: sprintf '4.%03d', q$Revision: #8 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw(Ev);
+
+require Tk::Frame;
+
+use base qw(Tk::Frame);
+Construct Tk::Widget 'ColorSelect';
+
+sub Populate
+{
+ my ($middle,$args) = @_;
+ my($i, @a);
+ my %seen_names;
+ foreach $i ($middle->_rgbTxtPath) {
+ local *FOO;
+ next if ! open FOO, $i;
+ my $middle_left = $middle->Frame;
+ $middle_left->pack(
+ -side => 'left',
+ -padx => '0.25c',
+ -pady => '0.25c',
+ );
+ my $names = $middle->Listbox(
+ -width => 20,
+ -height => 12,
+ -relief => 'sunken',
+ -borderwidth => 2,
+ -exportselection => 0,
+ );
+ $middle->Advertise(Names => $names);
+
+ $names->bind('<Double-1>' => [$middle,'color',Ev(['getSelected'])]);
+
+ my $scroll = $middle->Scrollbar(
+ -orient => 'vertical',
+ -command => ['yview', $names],
+ -relief => 'sunken',
+ -borderwidth => 2,
+ );
+ $names->configure(-yscrollcommand => ['set',$scroll]);
+ $names->pack(-in => $middle_left, -side => 'left');
+ $scroll->pack(-in => $middle_left, -side => 'right', -fill => 'y');
+
+ while(<FOO>) {
+ chomp;
+ next if /^!/;
+ my @a = split;
+ my $color = join(' ', @a[3 .. $#a]);
+ my $hex;
+ eval { $hex = $middle->Hex($color); };
+ if ($@) {
+ #print STDERR "unknown color: '$color'\n";
+ if ($@ =~ /unknown color name "/) {
+ next;
+ } else {
+ chomp $@;
+ die $@;
+ }
+ }
+ if (!exists($seen_names{$hex}) ||
+ length($seen_names{$hex}) > length($color)) {
+ $seen_names{$hex} = $color;
+ $names->insert('end', $color);
+ }
+ }
+ close FOO;
+ last;
+ }
+
+ # Create the three scales for editing the color, and the entry for typing
+ # in a color value.
+
+ my $middle_middle = $middle->Frame;
+ $middle_middle->pack(-side => 'left', -expand => 1, -fill => 'y');
+ my $mcm1 = $middle_middle->Optionmenu(-variable => \$middle->{'color_space'},
+ -command => [ $middle, 'color_space'],
+ -relief => 'raised',
+ -options => [ ['HSB color space' => 'hsb'],
+ ['RGB color space' => 'rgb'],
+ ['CMY color space' => 'cmy']]);
+ $mcm1->pack(-side => 'top', -fill => 'x');
+
+ my(@middle_middle, @label, @scale);
+ $middle_middle[0] = $middle_middle->Frame;
+ $middle_middle[1] = $middle_middle->Frame;
+ $middle_middle[2] = $middle_middle->Frame;
+ $middle_middle[3] = $middle_middle->Frame;
+ $middle_middle[0]->pack(-side => 'top', -expand => 1);
+ $middle_middle[1]->pack(-side => 'top', -expand => 1);
+ $middle_middle[2]->pack(-side => 'top', -expand => 1);
+ $middle_middle[3]->pack(-side => 'top', -expand => 1, -fill => 'x');
+ $middle->{'Labels'} = ['zero','one','two'];
+ foreach $i (0..2) {
+ $label[$i] = $middle->Label(-textvariable => \$middle->{'Labels'}[$i]);
+ $scale[$i] = $middle->Scale(
+ -from => 0,
+ -to => 1000,
+ '-length' => '6c',
+ -orient => 'horizontal',
+ -command => [\&scale_changed, $middle],
+ );
+ $scale[$i]->pack(
+ -in => $middle_middle[$i],
+ -side => 'top',
+ -anchor => 'w',
+ );
+ $label[$i]->pack(
+ -in => $middle_middle[$i],
+ -side => 'top',
+ -anchor => 'w',
+ );
+ }
+ my $nameLabel = $middle->Label(-text => 'Name:');
+ $middle->{'Entry'} = '';
+ my $name = $middle->Entry(
+ -relief => 'sunken',
+ -borderwidth => 2,
+ -textvariable => \$middle->{'Entry'},
+ -width => 10,
+# For some reason giving this font causes problems at end of t/create.t
+# -font => '-*-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*'
+ );
+
+ $nameLabel->pack(-in => $middle_middle[3], -side => 'left');
+ $name->pack(
+ -in => $middle_middle[3],
+ -side => 'right',
+ -expand => 1,
+ -fill => 'x',
+ );
+ $name->bind('<Return>' => [ $middle, 'color', Ev(['get'])]);
+
+ # Create the color display swatch on the right side of the window.
+
+ my $middle_right = $middle->Frame;
+ $middle_right->pack(
+ -side => 'left',
+ -pady => '.25c',
+ -padx => '.25c',
+ -anchor => 's',
+ );
+ my $swatch = $middle->Canvas(
+ -width => '2.5c',
+ -height => '5c',
+ );
+ my $swatch_item = $swatch->create('oval', '.5c', '.3c', '2.26c', '4.76c');
+
+ my $value = $middle->Label(
+ -textvariable => \$middle->{'color'},
+ -width => 13,
+ -font => '-*-Courier-Medium-R-Normal--*-120-*-*-*-*-*-*'
+ );
+
+ $swatch->pack(
+ -in => $middle_right,
+ -side => 'top',
+ -expand => 1,
+ -fill => 'both',
+ );
+ $value->pack(-in => $middle_right, -side => 'bottom', -pady => '.25c');
+
+ $middle->ConfigSpecs(
+ '-color_space' => ['METHOD', undef, undef, 'hsb'],
+ '-initialcolor' => '-color',
+ '-color' => ['METHOD', 'background', 'Background',
+ $middle->cget('-background')]
+ );
+
+ $middle->{'swatch'} = $swatch;
+ $middle->{'swatch_item'} = $swatch_item;
+ $middle->{'scale'} = [@scale];
+ $middle->{'red'} = 0;
+ $middle->{'blue'} = 0;
+ $middle->{'green'} = 0;
+
+}
+
+sub _rgbTxtPath
+{
+ require Tk::Config;
+ my(@xlibpath) = map { s/^-L//; "$_/X11/rgb.txt" }
+ split /\s+/, $Tk::Config::xlib;
+ (
+ @xlibpath,
+ '/usr/local/lib/X11/rgb.txt',
+ '/usr/lib/X11/rgb.txt',
+ '/usr/X11R6/lib/X11/rgb.txt',
+ '/usr/local/X11R5/lib/X11/rgb.txt',
+ '/X11/R5/lib/X11/rgb.txt',
+ '/X11/R4/lib/rgb/rgb.txt',
+ '/usr/openwin/lib/X11/rgb.txt',
+ '/usr/share/X11/rgb.txt', # This is the Debian location
+ '/usr/X11/share/X11/rgb.txt', # seen on a Mac OS X 10.5.1 system
+ '/usr/X11R6/share/X11/rgb.txt', # seen on a OpenBSD 4.2 system
+ '/etc/X11R6/rgb.txt',
+ '/etc/X11/rgb.txt', # seen on HP-UX 11.31
+ );
+}
+
+sub Hex
+{
+ my $w = shift;
+ my @rgb = (@_ == 3) ? @_ : $w->rgb(@_);
+ sprintf('#%04x%04x%04x',@rgb)
+}
+
+sub color_space {
+
+ my($objref, $space) = @_;
+
+ if (@_ > 1)
+ {
+ my %Labels = ( 'rgb' => [qw(Red Green Blue)],
+ 'cmy' => [qw(Cyan Magenta Yellow)],
+ 'hsb' => [qw(Hue Saturation Brightness)] );
+
+ # The procedure below is invoked when a new color space is selected. It
+ # changes the labels on the scales and re-loads the scales with the
+ # appropriate values for the current color in the new color space
+
+ $space = 'hsb' unless (exists $Labels{$space});
+ my $i;
+ for $i (0..2)
+ {
+ $objref->{'Labels'}[$i] = $Labels{$space}->[$i];
+ }
+ $objref->{'color_space'} = $space;
+ $objref->afterIdle(['set_scales',$objref]) unless ($objref->{'pending'}++);
+ }
+ return $objref->{'color_space'};
+} # color_space
+
+sub hsvToRgb {
+
+ # The procedure below converts an HSB value to RGB. It takes hue,
+ # saturation, and value components (floating-point, 0-1.0) as arguments,
+ # and returns a list containing RGB components (integers, 0-65535) as
+ # result. The code here is a copy of the code on page 616 of
+ # "Fundamentals of Interactive Computer Graphics" by Foley and Van Dam.
+
+ my($hue, $sat, $value) = @_;
+ my($v, $i, $f, $p, $q, $t);
+
+ $v = int(65535 * $value);
+ return ($v, $v, $v) if $sat == 0;
+ $hue *= 6;
+ $hue = 0 if $hue >= 6;
+ $i = int($hue);
+ $f = $hue - $i;
+ $p = int(65535 * $value * (1 - $sat));
+ $q = int(65535 * $value * (1 - ($sat * $f)));
+ $t = int(65535 * $value * (1 - ($sat * (1 - $f))));
+ return ($v, $t, $p) if $i == 0;
+ return ($q, $v, $p) if $i == 1;
+ return ($p, $v, $t) if $i == 2;
+ return ($p, $q, $v) if $i == 3;
+ return ($t, $p, $v) if $i == 4;
+ return ($v, $p, $q) if $i == 5;
+
+} # end hsvToRgb
+
+sub color
+{
+ my ($objref,$name) = @_;
+ if (@_ > 1 && defined($name) && length($name))
+ {
+ if ($name eq 'cancel') {
+ $objref->{color} = undef;
+ return;
+ }
+ my ($format, $shift);
+ my ($red, $green, $blue);
+
+ if ($name !~ /^#/)
+ {
+ ($red, $green, $blue) = $objref->{'swatch'}->rgb($name);
+ }
+ else
+ {
+ my $len = length $name;
+ if($len == 4) { $format = '#(.)(.)(.)'; $shift = 12; }
+ elsif($len == 7) { $format = '#(..)(..)(..)'; $shift = 8; }
+ elsif($len == 10) { $format = '#(...)(...)(...)'; $shift = 4; }
+ elsif($len == 13) { $format = '#(....)(....)(....)'; $shift = 0; }
+ else {
+ $objref->BackTrace(
+ "ColorEditor error: syntax error in color name \"$name\"");
+ return;
+ }
+ ($red,$green,$blue) = $name =~ /$format/;
+ # Looks like a call for 'pack' or similar rather than eval
+ eval "\$red = 0x$red; \$green = 0x$green; \$blue = 0x$blue;";
+ $red = $red << $shift;
+ $green = $green << $shift;
+ $blue = $blue << $shift;
+ }
+ $objref->{'red'} = $red;
+ $objref->{'blue'} = $blue;
+ $objref->{'green'} = $green;
+ my $hex = sprintf('#%04x%04x%04x', $red, $green, $blue);
+ $objref->{'color'} = $hex;
+ $objref->{'Entry'} = $name;
+ $objref->afterIdle(['set_scales',$objref]) unless ($objref->{'pending'}++);
+ $objref->{'swatch'}->itemconfigure($objref->{'swatch_item'},
+ -fill => $objref->{'color'});
+ }
+ return $objref->{'color'};
+}
+
+sub rgbToHsv {
+
+ # The procedure below converts an RGB value to HSB. It takes red, green,
+ # and blue components (0-65535) as arguments, and returns a list
+ # containing HSB components (floating-point, 0-1) as result. The code
+ # here is a copy of the code on page 615 of "Fundamentals of Interactive
+ # Computer Graphics" by Foley and Van Dam.
+
+ my($red, $green, $blue) = @_;
+ my($max, $min, $sat, $range, $hue, $rc, $gc, $bc);
+
+ $max = ($red > $green) ? (($blue > $red) ? $blue : $red) :
+ (($blue > $green) ? $blue : $green);
+ $min = ($red < $green) ? (($blue < $red) ? $blue : $red) :
+ (($blue < $green) ? $blue : $green);
+ $range = $max - $min;
+ if ($max == 0) {
+ $sat = 0;
+ } else {
+ $sat = $range / $max;
+ }
+ if ($sat == 0) {
+ $hue = 0;
+ } else {
+ $rc = ($max - $red) / $range;
+ $gc = ($max - $green) / $range;
+ $bc = ($max - $blue) / $range;
+ $hue = ($max == $red)?(0.166667*($bc - $gc)):
+ (($max == $green)?(0.166667*(2 + $rc - $bc)):
+ (0.166667*(4 + $gc - $rc)));
+ }
+ $hue += 1 if $hue < 0;
+ return ($hue, $sat, $max/65535);
+
+} # end rgbToHsv
+
+sub scale_changed {
+
+ # The procedure below is invoked when one of the scales is adjusted. It
+ # propagates color information from the current scale readings to
+ # everywhere else that it is used.
+
+ my($objref) = @_;
+
+ return if $objref->{'updating'};
+ my ($red, $green, $blue);
+
+ if($objref->{'color_space'} eq 'rgb') {
+ $red = int($objref->{'scale'}->[0]->get * 65.535 + 0.5);
+ $green = int($objref->{'scale'}->[1]->get * 65.535 + 0.5);
+ $blue = int($objref->{'scale'}->[2]->get * 65.535 + 0.5);
+ } elsif($objref->{'color_space'} eq 'cmy') {
+ $red = int(65535 - $objref->{'scale'}->[0]->get * 65.535 + 0.5);
+ $green = int(65535 - $objref->{'scale'}->[1]->get * 65.535 + 0.5);
+ $blue = int(65535 - $objref->{'scale'}->[2]->get * 65.535 + 0.5);
+ } else {
+ ($red, $green, $blue) = hsvToRgb($objref->{'scale'}->[0]->get/1000.0,
+ $objref->{'scale'}->[1]->get/1000.0,
+ $objref->{'scale'}->[2]->get/1000.0);
+ }
+ $objref->{'red'} = $red;
+ $objref->{'blue'} = $blue;
+ $objref->{'green'} = $green;
+ $objref->color(sprintf('#%04x%04x%04x', $red, $green, $blue));
+ $objref->idletasks;
+
+} # end scale_changed
+
+sub set_scales {
+
+ my($objref) = @_;
+ $objref->{'pending'} = 0;
+ $objref->{'updating'} = 1;
+
+ # The procedure below is invoked to update the scales from the current red,
+ # green, and blue intensities. It's invoked after a change in the color
+ # space and after a named color value has been loaded.
+
+ my($red, $blue, $green) = ($objref->{'red'}, $objref->{'blue'},
+ $objref->{'green'});
+
+ if($objref->{'color_space'} eq 'rgb') {
+ $objref->{'scale'}->[0]->set(int($red / 65.535 + 0.5));
+ $objref->{'scale'}->[1]->set(int($green / 65.535 + 0.5));
+ $objref->{'scale'}->[2]->set(int($blue / 65.535 + 0.5));
+ } elsif($objref->{'color_space'} eq 'cmy') {
+ $objref->{'scale'}->[0]->set(int((65535 - $red) / 65.535 + 0.5));
+ $objref->{'scale'}->[1]->set(int((65535 - $green) / 65.535 + 0.5));
+ $objref->{'scale'}->[2]->set(int((65535 - $blue) / 65.535 + 0.5));
+ } else {
+ my ($s1, $s2, $s3) = rgbToHsv($red, $green, $blue);
+ $objref->{'scale'}->[0]->set(int($s1 * 1000.0 + 0.5));
+ $objref->{'scale'}->[1]->set(int($s2 * 1000.0 + 0.5));
+ $objref->{'scale'}->[2]->set(int($s3 * 1000.0 + 0.5));
+ }
+ $objref->{'updating'} = 0;
+
+} # end set_scales
+
+package Tk::ColorDialog;
+require Tk::Toplevel;
+use base qw(Tk::Toplevel);
+
+Construct Tk::Widget 'ColorDialog';
+
+sub Accept
+{
+ my $cw = shift;
+ $cw->withdraw;
+ $cw->{'done'} = 1;
+}
+
+sub Cancel
+{
+ my $cw = shift;
+# $cw->configure(-color => undef);
+ $cw->configure(-color => 'cancel');
+ $cw->Accept;
+}
+
+sub Populate
+{
+ my ($cw,$args) = @_;
+ $cw->SUPER::Populate($args);
+ $cw->protocol('WM_DELETE_WINDOW' => [ 'Cancel' => $cw ]);
+ $cw->transient($cw->Parent->toplevel);
+ $cw->withdraw;
+ my $sel = $cw->ColorSelect;
+ my $accept = $cw->Button(-text => 'Accept', -command => ['Accept', $cw]);
+ my $cancel = $cw->Button(-text => 'Cancel', -command => ['Cancel', $cw]);
+ Tk::grid($sel);
+ Tk::grid($accept,$cancel);
+ $cw->ConfigSpecs(DEFAULT => [$sel]);
+}
+
+sub Show
+{
+ my $cw = shift;
+ $cw->configure(@_) if @_;
+ $cw->Popup();
+ $cw->OnDestroy(sub { $cw->{'done'} = 0 }); # auto-cancel
+ $cw->waitVariable(\$cw->{'done'});
+ if (Tk::Exists($cw))
+ {
+ $cw->withdraw;
+ $cw->cget('-color');
+ }
+ else
+ {
+ undef;
+ }
+}
+
+package Tk::ColorEditor;
+
+use vars qw($VERSION $SET_PALETTE);
+$VERSION = '4.009'; # was: sprintf '4.%03d', q$Revision: #8 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw(lsearch Ev);
+use Tk::Toplevel;
+use base qw(Tk::Toplevel);
+use Tk::widgets qw(Pixmap);
+Construct Tk::Widget 'ColorEditor';
+
+use Tk::Dialog;
+use Tk::Pretty;
+
+BEGIN { $SET_PALETTE = 'Set Palette' };
+
+use subs qw(color_space hsvToRgb rgbToHsv);
+
+# ColorEditor public methods.
+
+sub add_menu_item
+{
+ my $objref = shift;
+ my $value;
+ foreach $value (@_)
+ {
+ if ($value eq 'SEP')
+ {
+ $objref->{'mcm2'}->separator;
+ }
+ else
+ {
+ $objref->{'mcm2'}->command( -label => $value,
+ -command => [ 'configure', $objref, '-highlight' => $value ] );
+ push @{$objref->{'highlight_list'}}, $value;
+ }
+ }
+}
+
+sub set_title
+{
+ my ($w) = @_;
+ my $t = $w->{Configure}{'-title'} || '' ;
+ my $h = $w->{Configure}{'-highlight'} || '';
+ $w->SUPER::title("$t $h Color Editor");
+}
+
+sub highlight
+{
+ my ($w,$h) = @_;
+ if (@_ > 1)
+ {
+ $w->{'update'}->configure( -text => "Apply $h Color" );
+ my $state = ($h eq 'background') ? 'normal' : 'disabled';
+ $w->{'palette'}->entryconfigure( $SET_PALETTE, -state => $state);
+ $w->{'highlight'} = $h;
+ $w->configure(-color => $w->Palette->{$h});
+ $w->set_title;
+ }
+ return $w->{'highlight'};
+}
+
+sub title
+{
+ my ($w,$val) = @_;
+ $w->set_title if (@_ > 1);
+ return $w->{Configure}{'-title'};
+}
+
+sub delete_menu_item
+{
+ my $objref = shift;
+ my $value;
+ foreach $value (@_)
+ {
+ $objref->{'mcm2'}->delete($value);
+ my $list_ord = $value =~ /\d+/ ? $value : lsearch($objref->{'highlight_list'}, $value);
+ splice(@{$objref->{'highlight_list'}}, $list_ord, 1) if $list_ord != -1;
+ }
+}
+
+sub delete_widgets {
+
+ # Remove widgets from consideration by the color configurator.
+ # $widgets_ref points to widgets previously added via `configure'.
+
+ my($objref, $widgets_ref) = @_;
+
+ my($i, $found, $r1, $r2, @wl) = (0, 0, 0, 0, @{$objref->cget(-widgets)});
+ foreach $r1 (@{$widgets_ref}) {
+ $i = -1;
+ $found = 0;
+ foreach $r2 (@wl) {
+ $i++;
+ next if $r1 != $r2;
+ $found = 1;
+ last;
+ }
+ splice(@wl, $i, 1) if $found;
+ }
+ $objref->configure(-widgets => [@wl]);
+
+} # end delete_widgets
+
+sub ApplyDefault
+{
+ my($objref) = @_;
+ my $cb = $objref->cget('-command');
+ my $h;
+ foreach $h (@{$objref->{'highlight_list'}})
+ {
+ next if $h =~ /TEAR_SEP|SEP/;
+ $cb->Call($h);
+ die unless (defined $cb);
+ }
+}
+
+sub Populate
+{
+
+ # ColorEditor constructor.
+
+ my($cw, $args) = @_;
+
+ $cw->SUPER::Populate($args);
+ $cw->withdraw;
+
+ my $color_space = 'hsb'; # rgb, cmy, hsb
+ my(@highlight_list) = qw(
+ TEAR_SEP
+ foreground background SEP
+ activeForeground activeBackground SEP
+ highlightColor highlightBackground SEP
+ selectForeground selectBackground SEP
+ disabledForeground insertBackground selectColor troughColor
+ );
+
+ # Create the Usage Dialog;
+
+ my $usage = $cw->Dialog( '-title' => 'ColorEditor Usage',
+ -justify => 'left',
+ -wraplength => '6i',
+ -text => "The Colors menu allows you to:\n\nSelect a color attribute such as \"background\" that you wish to colorize. Click on \"Apply\" to update that single color attribute.\n\nSelect one of three color spaces. All color spaces display a color value as a hexadecimal number under the oval color swatch that can be directly supplied on widget commands.\n\nApply Tk's default color scheme to the application. Useful if you've made a mess of things and want to start over!\n\nChange the application's color palette. Make sure \"background\" is selected as the color attribute, find a pleasing background color to apply to all current and future application widgets, then select \"Set Palette\".",
+ );
+
+ # Create the menu bar at the top of the window for the File, Colors
+ # and Help menubuttons.
+
+ my $m0 = $cw->Frame(-relief => 'raised', -borderwidth => 2);
+ $m0->pack(-side => 'top', -fill => 'x');
+ my $mf = $m0->Menubutton(
+ -text => 'File',
+ -underline => 0,
+ -bd => 1,
+ -relief => 'raised',
+ );
+ $mf->pack(-side => 'left');
+ my $close_command = [sub {shift->withdraw}, $cw];
+ $mf->command(
+ -label => 'Close',
+ -underline => 0,
+ -command => $close_command,
+ -accelerator => 'Ctrl-w',
+ );
+ $cw->bind('<Control-Key-w>' => $close_command);
+ $cw->protocol(WM_DELETE_WINDOW => $close_command);
+
+ my $mc = $m0->Menubutton(
+ -text => 'Colors',
+ -underline => 0,
+ -bd => 1,
+ -relief => 'raised',
+ );
+ $mc->pack(-side => 'left');
+ my $color_attributes = 'Color Attributes';
+ $mc->cascade(-label => $color_attributes, -underline => 6);
+ $mc->separator;
+
+ $mc->command(
+ -label => 'Apply Default Colors',
+ -underline => 6,
+ -command => ['ApplyDefault',$cw]
+ );
+ $mc->separator;
+ $mc->command(
+ -label => $SET_PALETTE,
+ -underline => 0,
+ -command => sub { $cw->setPalette($cw->cget('-color'))}
+ );
+
+ my $m1 = $mc->cget(-menu);
+
+ my $mcm2 = $m1->Menu;
+ $m1->entryconfigure($color_attributes, -menu => $mcm2);
+ my $mh = $m0->Menubutton(
+ -text => 'Help',
+ -underline => 0,
+ -bd => 1,
+ -relief => 'raised',
+ );
+ $mh->pack(-side => 'right');
+ $mh->command(
+ -label => 'Usage',
+ -underline => 0,
+ -command => [sub {shift->Show}, $usage],
+ );
+
+ # Create the Apply button.
+
+ my $bot = $cw->Frame(-relief => 'raised', -bd => 2);
+ $bot->pack(-side => 'bottom', -fill =>'x');
+ my $update = $bot->Button(
+ -command => [
+ sub {
+ my ($objref) = @_;
+ $objref->Callback(-command => ($objref->{'highlight'}, $objref->cget('-color')));
+ $cw->{'done'} = 1;
+ }, $cw,
+ ],
+ );
+ $update->pack(-pady => 1, -padx => '0.25c');
+
+ # Create the listbox that holds all of the color names in rgb.txt, if an
+ # rgb.txt file can be found.
+
+ my $middle = $cw->ColorSelect(-relief => 'raised', -borderwidth => 2);
+ $middle->pack(-side => 'top', -fill => 'both');
+ # Create the status window.
+
+ my $status = $cw->Toplevel;
+ $status->withdraw;
+ $status->geometry('+0+0');
+ my $status_l = $status->Label(-width => 50, -anchor => 'w');
+ $status_l->pack(-side => 'top');
+
+ $cw->{'highlight_list'} = [@highlight_list];
+ $cw->{'mcm2'} = $mcm2;
+
+ foreach (@highlight_list)
+ {
+ next if /^TEAR_SEP$/;
+ $cw->add_menu_item($_);
+ }
+
+ $cw->{'updating'} = 0;
+ $cw->{'pending'} = 0;
+ $cw->{'Status'} = $status;
+ $cw->{'Status_l'} = $status_l;
+ $cw->{'update'} = $update;
+ $cw->{'gwt_depth'} = 0;
+ $cw->{'palette'} = $mc;
+
+ my $pixmap = $cw->Pixmap('-file' => Tk->findINC('ColorEdit.xpm'));
+ $cw->Icon(-image => $pixmap);
+
+ $cw->ConfigSpecs(
+ DEFAULT => [$middle],
+ -widgets => ['PASSIVE', undef, undef,
+ [$cw->parent->Descendants]],
+ -display_status => ['PASSIVE', undef, undef, 0],
+ '-title' => ['METHOD', undef, undef, ''],
+ -command => ['CALLBACK', undef, undef, ['set_colors',$cw]],
+ '-highlight' => ['METHOD', undef, undef, 'background'],
+ -cursor => ['DESCENDANTS', 'cursor', 'Cursor', 'left_ptr'],
+ );
+
+} # end Populate, ColorEditor constructor
+
+sub Show {
+
+ my($objref, @args) = @_;
+
+ Tk::ColorDialog::Show(@_);
+
+} # end show
+
+# ColorEditor default configurator procedure - can be redefined by the
+# application.
+
+sub set_colors {
+
+ # Configure all the widgets in $widgets for attribute $type and color
+ # $color. If $color is undef then reset all colors
+ # to the Tk defaults.
+
+ my($objref, $type, $color) = @_;
+ my $display = $objref->cget('-display_status');
+
+ $objref->{'Status'}->title("Configure $type");
+ $objref->{'Status'}->deiconify if $display;
+ my $widget;
+ my $reset = !defined($color);
+
+ foreach $widget (@{$objref->cget('-widgets')}) {
+ if ($display) {
+ $objref->{'Status_l'}->configure(
+ -text => 'WIDGET: ' . $widget->PathName
+ );
+ $objref->update;
+ }
+ eval {local $SIG{'__DIE__'}; $color = ($widget->configure("-\L${type}"))[3]} if $reset;
+ eval {local $SIG{'__DIE__'}; $widget->configure("-\L${type}" => $color)};
+ }
+
+ $objref->{'Status'}->withdraw if $display;
+
+} # end set_colors
+
+# ColorEditor private methods.
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/ColorEditor.pod b/Master/tlpkg/tlperl/lib/Tk/ColorEditor.pod
new file mode 100644
index 00000000000..48e6477f3ef
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ColorEditor.pod
@@ -0,0 +1,120 @@
+
+=head1 NAME
+
+Tk::ColorEditor - a general purpose Tk widget Color Editor
+
+=for pm Tk/ColorEditor.pm
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+ use Tk::ColorEditor;
+
+ $cref = $mw->ColorEditor(-title => $title, -cursor => @cursor);
+
+ $cref->Show;
+
+=head1 DESCRIPTION
+
+ColorEditor is implemented as an object with various methods, described
+below. First, create your ColorEditor object during program initialization
+(one should be sufficient), and then configure it by specifying a list of Tk
+widgets to colorize. When it's time to use the editor, invoke the Show()
+method.
+
+ColorEditor allows some customization: you may alter the color attribute
+menu by adding and/or deleting menu items and/or separators, turn the status
+window on or off, alter the configurator's list of color widgets, or even
+supply your own custom color configurator callback.
+
+=over 4
+
+=item 1.
+
+Call the constructor to create the editor object, which in turn returns a
+blessed reference to the new object:
+
+ use Tk::ColorEditor;
+
+ $cref = $mw->ColorEditor(
+ -title => $title,
+ -cursor => @cursor,
+ );
+
+ mw - a window reference, usually the result of a MainWindow->new
+ call. As the default root of a widget tree, $mw and all
+ descendant widgets at object-creation-time are configured
+ by the default color configurator procedure. (You probably
+ want to change this though or you might end up colorizing
+ ColorEditor!)
+ title - Toplevel title, default = ' '.
+ cursor - a valid Tk '-cursor' specification (default is
+ 'top_left_arrow'). This cursor is used over all ColorEditor
+ "hot spots".
+
+=item 2.
+
+Invoke the configure() method to change editor characteristics:
+
+ $cref->configure(-option => value, ..., -option-n => value-n);
+
+ options:
+ -command : a callback to a `set_colors' replacement.
+ -widgets : a reference to a list of widget references
+ for the color configurator.
+ -display_status : TRUE IFF display the ColorEditor status
+ window when applying colors.
+ -add_menu_item : 'SEP', or a color attribute menu item.
+ -delete_menu_item : 'SEP', a color attribute menu item, or color
+ attribute menu ordinal.
+
+ For example:
+
+ $cref->configure(-delete_menu_item => 3,
+ -delete_menu_item => 'disabledforeground',
+ -add_menu_item => 'SEP',
+ -add_menu_item => 'New color attribute',
+ -widgets => [$ce, $qu, $f2b2],
+ -widgets => [$f2->Descendants],
+ -command => [\&my_special_configurator, some, args ]
+ );
+
+=item 3.
+
+Invoke the Show() method on the editor object, say, by a button or menu press:
+
+ $cref->Show;
+
+=item 4.
+
+The cget(-widgets) method returns a reference to a list of widgets that
+are colorized by the configurator. Typically, you add new widgets to
+this list and then use it in a subsequent configure() call to expand your
+color list.
+
+ $cref->configure(
+ -widgets => [
+ @{$Filesystem_ref->cget(-widgets)}, @{$cref->cget(-widgets)},
+ ]
+ );
+
+=item 5.
+
+The delete_widgets() method expects a reference to a list of widgets which are
+then removed from the current color list.
+
+ $cref->delete_widgets($OBJTABLE{$objname}->{'-widgets'})
+
+=back
+
+=head1 AUTHORS
+
+Stephen O. Lidie, Lehigh University Computing Center. 95/03/05
+lusol@Lehigh.EDU
+
+Many thanks to Guy Decoux (decoux@moulon.inra.fr) for doing the initial
+translation of tcolor.tcl to TkPerl, from which this code has been derived.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Common.pod b/Master/tlpkg/tlperl/lib/Tk/Common.pod
new file mode 100644
index 00000000000..cd53ab79a99
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Common.pod
@@ -0,0 +1,16 @@
+
+=head1 NAME
+
+Tk::DragDrop::Common - private class used by Drag&Drop
+
+=for pm DragDrop/DragDrop/Common.pm
+
+=for category Experimental Modules
+
+=head1 DESCRIPTION
+
+This class provides methods to automate the the loading and declaring
+of Drop and Site 'types'.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Compound.pm b/Master/tlpkg/tlperl/lib/Tk/Compound.pm
new file mode 100644
index 00000000000..9f1ccd64487
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Compound.pm
@@ -0,0 +1,40 @@
+package Tk::Compound;
+require Tk;
+import Tk qw($XS_VERSION);
+require Tk::Image;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Compound/Compound.pm#4 $
+
+use base qw(Tk::Image);
+
+Construct Tk::Image 'Compound';
+
+bootstrap Tk::Compound;
+
+sub Tk_image { 'compound' }
+
+Tk::Methods('add');
+
+sub new
+{
+ my $package = shift;
+ my $widget = shift;
+ my $leaf = $package->Tk_image;
+ $package->InitClass($widget);
+ my $obj = $widget->image(create => $leaf,@_,-window => $widget);
+ return bless($obj,$package);
+}
+
+BEGIN
+ {
+ foreach my $type (qw(line text image bitmap space))
+ {
+ my $meth = ucfirst($type);
+ no strict qw 'refs';
+ *{$meth} = sub { shift->add($type,@_) };
+ }
+ }
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Compound.pod b/Master/tlpkg/tlperl/lib/Tk/Compound.pod
new file mode 100644
index 00000000000..01f6e5f2639
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Compound.pod
@@ -0,0 +1,298 @@
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distrobution are in the file
+# license.tcl.
+
+=head1 NAME
+
+Tk::Compound - Create multi-line compound images.
+
+=for category Tk Image Classes
+
+=head1 SYNOPSIS
+
+ use Tk::Compound;
+ $image = $widget->Compound(name,options);
+ $image->Line(options);
+ $image->Text(options);
+ $image->Bitmap(options);
+ $image->Image(options);
+ $image->Space(options);
+
+=for comment
+This paragraph used to be written different, but perldoc 3.14 cannot
+display this paragraph.
+S< >use Tk::Compound;
+S< >I<$image> = I<$widget>-E<gt>B<Compound>?(I<name>??,I<options>?)
+S< >I<$image>-E<gt>B<Line>?(I<options>?)
+S< >I<$image>-E<gt>B<Text>?(I<options>?)
+S< >I<$image>-E<gt>B<Bitmap>?(I<options>?)
+S< >I<$image>-E<gt>B<Image>?(I<options>?)
+S< >I<$image>-E<gt>B<Space>?(I<options>?)
+
+=head1 DESCRIPTION
+
+Compound image types can be used to create images that consists of
+multiple horizontal lines; each line is composed of a series of items
+(texts, bitmaps, images or spaces) arranged from left to
+right. Compound images are mainly used to embed complex drawings into
+widgets that support the B<-image> option. As shown in the EXAMPLE
+section below, a compound image can be used to display a bitmap and a
+text string simutaneously in a Tk B<Button> widget.
+
+Compound images can only be used on windows on the same display as, and
+with the same pixel depth and visual as the I<$widget> used to create them.
+
+=head1 CREATING COMPOUND IMAGES
+
+Compounds are created using I<$widget>-E<gt>B<Compound>.
+Compounds support the following I<options>:
+
+=over 4
+
+=item B<-background> =E<gt> I<color>
+
+Specifies the background color of the compound image. This color is
+also used as the default background color for the bitmap items in the
+compound image.
+
+=item B<-borderwidth> =E<gt> I<pixels>
+
+Specifies a non-negative value indicating the width of the 3-D border
+drawn around the compound image.
+
+=item B<-font> =E<gt> I<font>
+
+Specifies the default font for the text items in the compound image.
+
+=item B<-foreground> =E<gt> I<color>
+
+Specifies the default foreground color for the bitmap and text items
+in the compound image.
+
+=item B<-padx> =E<gt> I<value>
+
+Specifies a non-negative value indicating how much extra space to
+request for the compound image in the X-direction. The I<value> may
+have any of the forms acceptable to B<Tk_GetPixels(3)>.
+
+=item B<-pady> =E<gt> I<value>
+
+Specifies a non-negative value indicating how much extra space to
+request for the compound image in the Y-direction.
+
+=item B<-relief> =E<gt> I<value>
+
+Specifies the 3-D effect desired for the background of the compound
+image. Acceptable values are B<raised>, B<sunken>, B<flat>,
+B<ridge>, and B<groove>.
+
+=item B<-showbackground> =E<gt> I<value>
+
+Specifies whether the background and the 3D borders should be drawn.
+Must be a valid boolean value. By default the background is not drawn
+and the compound image appears to have a transparent background.
+
+
+=back
+
+=head1 IMAGE COMMAND
+
+When a compound image is created, Tk also creates a new object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+
+The object also supports the following methods:
+
+=over 4
+
+=item I<$compound>-E<gt>B<Line>?(I<option => value ...>)?
+
+Creates a new line at the bottom of the compound image. Lines support
+the following I<options>:
+
+=over 4
+
+=item B<-anchor> value
+
+Specifies how the line should be aligned along the horizontal axis.
+When the values are B<w>, B<sw> or B<nw>, the line is aligned
+to the left. When the values are B<c>, B<s> or B<n>, the line
+is aligned to the middle. When the values are B<e>, B<se> or
+B<ne>, the line is aligned to the right.
+
+=item B<-padx> =E<gt> I<value>
+
+Specifies a non-negative value indicating how much extra space to
+request for this line in the X-direction.
+
+=back
+
+=item I<$compound>-E<gt>I<Itemtype>?(I<option => value ...>)?
+
+Creates a new item of the type I<Itemtype> at the end of the last
+line of the compound image. All types of items support
+these following common I<options>:
+
+=over 4
+
+=item B<-anchor> value
+
+Specifies how the item should be aligned along the vertical axis. When
+the values are B<n>, B<nw> or B<ne>, the item is aligned to
+the top of the line. When the values are B<c>, B<w> or B<e>,
+the item is aligned to the middle of the line. When the values are
+B<s>, B<se> or B<sw>, the item is aligned to the bottom of
+the line.
+
+=item B<-padx> =E<gt> I<value>
+
+Specifies a non-negative value indicating how much extra space to
+request for this item in the X-direction.
+
+=item B<-pady> =E<gt> I<value>
+
+Specifies a non-negative value indicating how much extra space to
+request for this item in the Y-direction.
+
+=item I<item-type> can be any of the following:
+
+=back
+
+=item I<$compound>-E<gt>B<Bitmap>?(I<option => value ...>)?
+
+Creates a new bitmap item of at the end of the last
+line of the compound image. Additional I<options> accepted by the
+bitmap type are:
+
+=over 4
+
+=item B<-background> =E<gt> I<color>
+
+Specifies the background color of the bitmap item.
+
+=item B<-bitmap> =E<gt> I<name>
+
+Specifies a bitmap to display in this item, in any of the forms
+acceptable to B<Tk_GetBitmap(3)>.
+
+=item B<-foreground> =E<gt> I<color>
+
+Specifies the foreground color of the bitmap item.
+
+=back
+
+=item I<$compound>-E<gt>B<Image>?(I<option => value ...>)?
+
+Creates a new image item of at the end of the last
+line of the compound image. Additional I<options> accepted by the
+image type are:
+
+=over 4
+
+=item B<-image> =E<gt> I<name>
+
+Specifies an image to display in this item. I<name>
+must have been created with the B<image create> command.
+
+=back
+
+=item I<$compound>-E<gt>B<Space>?(I<option => value ...>)?
+
+Creates a new space item of at the end of the last line of the
+compound image. Space items do not display anything. They just acts as
+space holders that add additional spaces between items inside a
+compound image. Additional I<options> accepted by the image type
+are:
+
+=over 4
+
+=item B<-width> =E<gt> I<value>
+
+Specifies the width of this space. The I<value> may have any of the
+forms acceptable to B<Tk_GetPixels(3)>.
+
+=item B<-height> =E<gt> I<value>
+
+Specifies the height of this space. The I<value> may have any of
+the forms acceptable to B<Tk_GetPixels(3)>.
+
+=back
+
+=item I<$compound>-E<gt>B<Text>?(I<option => value ...>)?
+
+Creates a new text item of at the end of the last line of the compound
+image. Additional I<options> accepted by the text type are:
+
+=over 4
+
+=item B<-background> =E<gt> I<color>
+
+Specifies the background color of the text item.
+
+=item B<-font> =E<gt> I<name>
+
+Specifies the font to be used for this text item.
+
+=item B<-foreground> =E<gt> I<color>
+
+Specifies the foreground color of the text item.
+
+=item B<-justify> I<value>
+
+When there are multiple lines of text displayed in a text item, this
+option determines how the lines line up with each other. I<value>
+must be one of B<left>, B<center>, or B<right>. B<Left>
+means that the lines' left edges all line up, B<center> means that
+the lines' centers are aligned, and B<right> means that the lines'
+right edges line up.
+
+=item B<-text> =E<gt> I<string>
+
+Specifies a text string to display in this text item.
+
+=item B<-underline> I<value>
+
+Specifies the integer index of a character to underline in the text
+item. 0 corresponds to the first character of the text displayed in
+the text item, 1 to the next character, and so on.
+
+=item B<-wraplength> I<value>
+
+This option specifies the maximum line length of the label string on
+this text item. If the line length of the label string exceeds this
+length, it is wrapped onto the next line, so that no line is longer
+than the specified length. The value may be specified in any of the
+standard forms for screen distances. If this value is less than or
+equal to 0 then no wrapping is done: lines will break only at newline
+characters in the text.
+
+=back
+
+=back
+
+=head1 EXAMPLE
+
+The following example creates a compound image with a bitmap and a
+text string and places this image into a B<Button(n)>
+widget. Notice that the image must be created using the widget
+that it resides in.
+
+ my $b = $parent->Button;
+ my $c = $b->Compound;
+ $b->configure(-image => $c);
+ $c->Line;
+ $c->Bitmap(-bitmap => 'warning');
+ $c->Space(-width => 8);
+ $c->Text(-text => "Warning", -underline => 0);
+ $b->pack;
+
+=head1 KEYWORDS
+
+image(n), Tix(n)
diff --git a/Master/tlpkg/tlperl/lib/Tk/Config.pm b/Master/tlpkg/tlperl/lib/Tk/Config.pm
new file mode 100644
index 00000000000..7dc7f199f3b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Config.pm
@@ -0,0 +1,13 @@
+# DO NOT EDIT. CREATED AUTOMATICALLY BY myConfig
+package Tk::Config;
+require Exporter;
+use base qw(Exporter);
+$VERSION = '804.029';
+$inc = '-I$(TKDIR) -I$(TKDIR)/pTk/mTk/xlib';
+$define = '';
+$xlib = '';
+$xinc = '';
+$gccopt = ' -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__';
+$win_arch = 'MSWin32';
+@EXPORT = qw($VERSION $inc $define $xlib $xinc $gccopt $win_arch);
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/ConfigSpecs.pod b/Master/tlpkg/tlperl/lib/Tk/ConfigSpecs.pod
new file mode 100644
index 00000000000..5f90c2716bb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ConfigSpecs.pod
@@ -0,0 +1,262 @@
+# $Id: configspec.pod 1.2 Wed, 12 Nov 1997 00:30:45 +0100 ach $
+
+=head1 NAME
+
+Tk::ConfigSpecs - Defining behaviour of 'configure' for composite widgets.
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ sub Populate
+ {
+ my ($composite,$args) = @_;
+ ...
+ $composite->ConfigSpecs('-attribute' => [ where,dbName,dbClass,default ]);
+ $composite->ConfigSpecs('-alias' => '-otherattribute');
+ $composite->ConfigSpecs('DEFAULT' => [ where ]);
+ $composite->ConfigSpecs($subwidget->ConfigSpecs);
+ ...
+ }
+
+ $composite->configure(-attribute => value);
+
+=head1 DESCRIPTION
+
+The aim is to make the composite widget configure method look as much like
+a regular Tk widget's configure as possible.
+(See L<Tk::options> for a description of this behaviour.)
+To enable this the attributes that the composite as a whole accepts
+needs to be defined.
+
+=head2 Defining the ConfigSpecs for a class.
+
+Typically a widget will have one or more calls like the following
+
+ $composite->ConfigSpecs(-attribute => [where,dbName,dbClass,default]);
+
+in its B<Populate> method. When B<ConfigSpecs> is called this way
+(with arguments) the arguments are used to construct or augment/replace
+a hash table for the widget. (More than one I<-option>=E<gt>I<value>
+pair can be specified to a single call.)
+
+B<dbName>, B<dbClass> and default are only used by B<ConfigDefault> described
+below, or to respond to 'inquiry' configure commands.
+
+It may be either one of the values below, or a list of such values
+enclosed in B<[]>.
+
+The currently permitted values of B<where> are:
+
+=over 4
+
+=item B<'ADVERTISED'>
+
+Apply B<configure> to I<advertised> subwidgets.
+
+=item B<'DESCENDANTS'>
+
+Apply B<configure> recursively to all descendants.
+
+=item B<'CALLBACK'>
+
+Setting the attribute does C<Tk::Callback-E<gt>new($value)> before storing
+in C<$composite-E<gt>{Configure}{-attribute}>. This is appropriate for
+C<-command =E<gt> ...> attributes that are handled by the composite and not
+forwarded to a subwidget. (E.g. B<Tk::Tiler> has C<-yscrollcommand> to
+allow it to have scrollbar attached.)
+
+This may be the first of several 'validating' keywords (e.g. font, cursor,
+anchor etc.) that core Tk makes special for C code.
+
+=item B<'CHILDREN'>
+
+Apply B<configure> to all children. (Children are the immediate
+descendants of a widget.)
+
+=item B<'METHOD'>
+
+Call C<$cw-E<gt>attribute(value)>
+
+This is the most general case. Simply have a method of the composite
+class with the same name as the attribute. The method may do any
+validation and have whatever side-effects you like. (It is probably
+worth 'queueing' using B<afterIdle> for more complex side-effects.)
+
+=item B<'PASSIVE'>
+
+Simply store value in C<$composite-E<gt>{Configure}{-attribute}>.
+
+This form is also a useful placeholder for attributes which you
+currently only handle at create time.
+
+=item B<'SELF'>
+
+Apply B<configure> to the core widget (e.g. B<Frame>) that is the basis of
+the composite. (This is the default behaviour for most attributes which
+makes a simple Frame behave the way you would expect.) Note that once
+you have specified B<ConfigSpecs> for an attribute you must explicitly
+include C<'SELF'> in the list if you want the attribute to apply to the
+composite itself (this avoids nasty infinite recursion problems).
+
+=item B<$reference> (blessed)
+
+Call B<$reference>->configure(-attribute => value)
+
+A common case is where B<$reference> is a subwidget.
+
+$reference may also be result of
+
+ Tk::Config->new(setmethod,getmethod,args,...);
+
+B<Tk::Config> class is used to implement all the above keyword types. The
+class has C<configure> and C<cget> methods so allows higher level code to
+I<always> just call one of those methods on an I<object> of some kind.
+
+=item B<hash reference>
+
+Defining:
+
+ $cw->ConfigSpecs(
+ ...
+ -option => [ { -optionX=>$w1, -optionY=>[$w2, $w3] },
+ dbname dbclass default ],
+ ...
+ );
+
+So C<$cw-E<gt>configure(-option =E<gt> value)> actually does
+
+ $w1->configure(-optionX => value);
+ $w2->configure(-optionY => value);
+ $w3->configure(-optionY => value);
+
+=item B<'otherstring'>
+
+Call
+
+ $composite->Subwidget('otherstring')->configure( -attribute => value );
+
+While this is here for backward compatibility with Tk-b5, it is probably
+better just to use the subwidget reference directly. The only
+case for retaining this form is to allow an additional layer of
+abstraction - perhaps having a 'current' subwidget - this is unproven.
+
+=item B<Aliases>
+
+C<ConfigSpecs( -alias =E<gt> '-otherattribute' )> is used to make C<-alias>
+equivalent to C<-otherattribute>. For example the aliases
+
+ -fg => '-foreground',
+ -bg => '-background'
+
+are provided automatically (if not already specified).
+
+=back
+
+=head2 Delegating all options of a widget class to a subwidget
+
+ $composite->ConfigSpecs($subwidget->ConfigSpecs);
+
+The above generates a list of I<composite> ConfigSpecs arguments, one
+for each valid option in $subwidget's class, and delegates said option
+to $subwidget. See L<Tk::Widget> and the I<widget> method
+ConfigSpecs. Duplicating I<composite> ConfigSpecs and I<widget>
+ConfigSpecs keys will yield undefined results.
+
+
+=head2 Default values
+
+When the B<Populate> method returns B<ConfigDefault> is called. This calls
+
+ $composite->ConfigSpecs;
+
+(with no arguments) to return a reference to a hash. Entries in the hash
+take the form:
+
+ '-attribute' => [ where, dbName, dbClass, default ]
+
+B<ConfigDefault> ignores 'where' completely (and also the DEFAULT entry) and
+checks the 'options' database on the widget's behalf, and if an entry is
+present matching dbName/dbClass
+
+ -attribute => value
+
+is added to the list of options that B<new> will eventually apply to the
+widget. Likewise if there is not a match and default is defined this
+default value will be added.
+
+Alias entries in the hash are used to convert user-specified values for the
+alias into values for the real attribute.
+
+=head2 B<New()-time configure>
+
+Once control returns to B<new>, the list of user-supplied options
+augmented by those from B<ConfigDefault> are applied to the widget using the
+B<configure> method below.
+
+Widgets are most flexible and most Tk-like if they handle the majority of
+their attributes this way.
+
+=head2 Configuring composites
+
+Once the above have occurred calls of the form:
+
+ $composite->configure( -attribute => value );
+
+should behave like any other widget as far as end-user code is concerned.
+B<configure> will be handled by B<Tk::Derived::configure> as follows:
+
+ $composite->ConfigSpecs;
+
+is called (with no arguments) to return a reference to a hash B<-attribute> is
+looked up in this hash, if B<-attribute> is not present in the hash then
+B<'DEFAULT'> is looked for instead. (Aliases are tried as well and cause
+redirection to the aliased attribute). The result should be a reference to a
+list like:
+
+ [ where, dbName, dbClass, default ]
+
+at this stage only I<where> is of interest, it maps to a list of object
+references (maybe only one) foreach one
+
+ $object->configure( -attribute => value );
+
+is B<eval>ed.
+
+=head2 Inquiring attributes of composites
+
+ $composite->cget( '-attribute' );
+
+This is handled by B<Tk::Derived::cget> in a similar manner to configure. At
+present if I<where> is a list of more than one object it is ignored completely
+and the "cached" value in
+
+ $composite->{Configure}{-attribute}.
+
+is returned.
+
+=head1 CAVEATS
+
+The C<-background> and C<-foreground> option values are automatically
+propagated down to all composite widget's children. This may be
+sometimes not desirable, especially if some subwidgets should use own
+color schemes, either by using explicit options or by option database
+definitions. If this is the case, then just add
+
+ -foreground => 'SELF',
+ -background => 'SELF',
+
+to C<ConfigSpecs>.
+
+It is the author's intention to port as many of the "Tix" composite widgets
+as make sense. The mechanism described above may have to evolve in order to
+make this possible, although now aliases are handled I think the above is
+sufficient.
+
+=head1 SEE ALSO
+
+L<Tk::composite|Tk::composite>,
+L<Tk::options|Tk::options>,
+L<Tk::Widget>
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/Configure.pm b/Master/tlpkg/tlperl/lib/Tk/Configure.pm
new file mode 100644
index 00000000000..8c19fe8efb8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Configure.pm
@@ -0,0 +1,68 @@
+package Tk::Configure;
+use vars qw($VERSION);
+$VERSION = '4.009'; # $Id: //depot/Tkutf8/Tk/Configure.pm#8 $
+
+use Carp;
+
+
+# Class that handles cget/configure for options that
+# need translating from public form
+# e.g. $cw->configure(-label => 'fred')
+# into $cw->subwiget('label')->configure(-text => 'fred')
+# Should probably do something clever with regexp's here
+
+
+sub new
+{
+ my ($class,@args) = @_;
+ unshift(@args,'configure','cget') if (@args < 3);
+ return bless \@args,$class;
+}
+
+sub cget
+{
+ croak('Wrong number of args to cget') unless (@_ == 2);
+ my ($alias,$key) = @_;
+ my ($set,$get,$widget,@args) = @$alias;
+ $widget->$get(@args);
+}
+
+sub configure
+{
+ my $alias = shift;
+ shift if (@_);
+ my ($set,$get,$widget,@args) = @$alias;
+ if (wantarray)
+ {
+ my @results;
+ eval { @results = $widget->$set(@args,@_) };
+ croak($@) if $@;
+ return @results;
+ }
+ else
+ {
+ my $results;
+ eval { $results = $widget->$set(@args,@_) };
+ croak($@) if $@;
+ return $results;
+ }
+}
+
+*TIESCALAR = \&new;
+*TIEHASH = \&new;
+
+sub FETCH
+{
+ my $alias = shift;
+ my ($set,$get,$widget,@args) = @$alias;
+ return $widget->$get(@args,@_);
+}
+
+sub STORE
+{
+ my $alias = shift;
+ my ($set,$get,$widget,@args) = @$alias;
+ $widget->$set(@args,@_);
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Credits b/Master/tlpkg/tlperl/lib/Tk/Credits
new file mode 100644
index 00000000000..3ea9be43b7d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Credits
@@ -0,0 +1,7 @@
+The two Camel/X 'logo' GIFs were produced by :
+
+Grafix, Sussex, UK, +44-1293-886725
+
+For a very reasonable fee. We have rights to distribute them.
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/DItem.pod b/Master/tlpkg/tlperl/lib/Tk/DItem.pod
new file mode 100644
index 00000000000..27db79744df
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DItem.pod
@@ -0,0 +1,439 @@
+=head1 NAME
+
+Tk::DItem - Tix Display Items
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+The Tix B<Display Items> and B<Display Types> are devised to
+solve a general problem: many Tix widgets (both existing and planned
+ones) display many items of many types simultaneously.
+
+For example, a hierarchical listbox widget (see L<Tk::HList>) can display
+items
+of images, plain text and subwindows in the form of a
+hierarchy. Another widget, the tabular listbox widget (see L<Tk::TList>)
+also displays items of the
+same types, although it arranges the items in a tabular form. Yet
+another widget, the spreadsheet widget (see L<Tk::TixGrid>),
+also displays similar types
+items, but in yet another format.
+
+In these examples, the display items in different widgets are only
+different in how they are arranged by the B<host widget>. In Tix,
+display items are clearly separated from the host widgets. The
+advantage is two-fold: first, the creation and configuration of
+display items become uniform across different host widgets. Second,
+new display item types can be added without the need to modify the
+existing host widgets.
+
+In a way, Tix display items are similar to the items inside Tk
+the canvas widget. However, unlike the Tix display items, the canvas
+items are not independent of the canvas widget; this makes it
+impossible to use the canvas items inside other types of TK widgets.
+
+The appearance of a display item is controlled by a set of
+I<attributes>. It is observed that each the attributes usually fall
+into one of two categroies: ``I<individual>'' or
+``I<collective>''. For example, the text items inside a HList widget
+may all display a different text string; however, in most cases, the
+text items share the same color, font and spacing. Instead of keeping
+a duplicated version of the same attributes inside each display item,
+it will be advantageous to put the collective attributes in a
+special object called a B<display style>. First, there is the space
+concern: a host widget may have many thousands of items; keeping
+dupilcated attributes will be very wasteful. Second, when it becomes
+necessary to change a collective attribute, such as changing all the
+text items' foreground color to red, it will be more efficient to
+change only the display style object than to modify all the text
+items one by one.
+
+The attributes of the a display item are thus stored in two places: it
+has a set of B<item options> to store its individual attributes. Each
+display item is also associated with a I<display style>, which specifies
+the collective attributes of all items associated with itself.
+
+The division between the individual and collective attributes are
+fixed and cannot be changed. Thus, when it becomes necessary for some
+items to differ in their collective attributes, two or more B<display styles>
+can be used. For example, suppose you want to display two
+columns of text items inside an HList widget, one column in red and
+the other in blue. You can create a TextStyle object called ``$red''
+which defines a red foreground, and another called ``$blue'', which
+defines a blue foreground. You can then associate all text items of
+the first column to ``$red'' and the second column to ``$blue''
+
+=head1 DISPLAY ITEM TYPES AND OPTIONS
+
+Currently there are three types of display items: B<text>,
+B<imagetext> and I<window>.
+
+=head1 IMAGETEXT ITEMS
+
+Display items of the type B<imagetext> are used to display an image
+together with a text string. Imagetext items support the following options:
+
+=head2 Imagetext Item Options
+
+=over 4
+
+=item Name: B<bitmap>
+
+=item Class: B<Bitmap>
+
+=item Switch: B<-bitmap>
+
+Specifies the bitmap to display in the item.
+
+=item Name: B<image>
+
+=item Class: B<Image>
+
+=item Switch: B<-image>
+
+Specifies the image to display in the item. When both the
+B<-bitmap> and B<-image> options are specified, only the image
+will be displayed.
+
+=item Name: B<imageTextStyle>
+
+=item Class: B<ImageTextStyle>
+
+=item Switch: B<-style>
+
+Specifies the display style to use for this item. Must be the
+name of a B<imagetext> display style that has already be created with
+B<ItemStyle>.
+
+=item Name: B<showImage>
+
+=item Class: B<ShowImage>
+
+=item Switch: B<-showimage>
+
+A Boolean value that specifies whether the image/bitmap should be
+displayed.
+
+=item Name: B<showText>
+
+=item Class: B<ShowText>
+
+=item Switch: B<-showtext>
+
+A Boolean value that specifies whether the text string should be
+displayed.
+
+=item Name: B<text>
+
+=item Class: B<Text>
+
+=item Switch: B<-text>
+
+Specifies the text string to display in the item.
+
+=item Name: B<underline>
+
+=item Class: B<Underline>
+
+=item Switch: B<-underline>
+
+Specifies the integer index of a character to underline in the text
+string in the item. 0 corresponds to the first character of the text
+displayed in the widget, 1 to the next character, and so on.
+
+=back
+
+=head2 Imagetext Style Options
+
+The style information of B<imagetext> items are stored in the
+B<imagetext> display style. The following options are supported:
+
+B<STANDARD OPTIONS>
+
+B<-activebackground> B<-activeforeground>
+B<-anchor> B<-background>
+B<-disabledbackground> B<-disabledforeground>
+B<-foreground> B<-font>
+B<-justify> B<-padx>
+B<-pady> B<-selectbackground>
+B<-selectforeground> B<-wraplength>
+
+See L<Tk::options> for details of the standard options.
+
+B<STYLE-SPECIFIC OPTIONS>
+
+=over 4
+
+=item Name: B<gap>
+
+=item Class: B<Gap>
+
+=item Switch: B<-gap>
+
+Specifies the distance between the bitmap/image and the text string,
+in number of pixels.
+
+=item Name: B<textAnchor>
+
+=item Class: B<TextAnchor>
+
+=item Switch: B<-textanchor>
+
+The anchor position on the image to which text part is attached.
+This is a perl/Tk addition. Defaults to B<e> for compatibility with standard
+Tix. The interesting cases are
+
+=over 8
+
+=item B<n>
+
+Text is centred above the image.
+
+=item B<s>
+
+Text is centred below the image
+
+=item B<e>
+
+Text is centred to right of the image.
+
+=item B<w>
+
+Text is centred to left of the image.
+
+=item B<c>
+
+Text is centred over the image.
+
+=back
+
+The B<sw>, B<se>, B<ne>, and b<nw> cases look rather odd.
+
+To get items to line up correctly it will usually be necessary
+to specify B<-anchor> as well. e.g. with default B<e> then anchoring
+item as a whole B<w> lines images up down left with text stuck to right side.
+
+=back
+
+=head1 TEXT ITEMS
+
+Display items of the type B<text> are used to display a text string
+in a widget. Text items support the following options:
+
+=head2 Text Item Options
+
+=over 4
+
+=item Name: B<textStyle>
+
+=item Class: B<TextStyle>
+
+=item Switch: B<-style>
+
+Specifies the display style to use for this text item. Must be the
+name of a B<text> display style that has already be created with
+B<ItemStyle>.
+
+=item Name: B<text>
+
+=item Class: B<Text>
+
+=item Switch: B<-text>
+
+Specifies the text string to display in the item.
+
+=item Name: B<underline>
+
+=item Class: B<Underline>
+
+=item Switch: B<-underline>
+
+Specifies the integer index of a character to underline in the item.
+0 corresponds to the first character of the text displayed in the
+widget, 1 to the next character, and so on.
+
+=back
+
+=head2 Text Style Options
+
+B<STANDARD OPTIONS>
+
+B<-activebackground> B<-activeforeground>
+B<-anchor> B<-background>
+B<-disabledbackground> B<-disabledforeground>
+B<-foreground> B<-font>
+B<-justify> B<-padx>
+B<-pady> B<-selectbackground>
+B<-selectforeground> B<-wraplength>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WINDOW ITEMS
+
+Display items of the type I<window> are used to display a
+sub-window in a widget. B<Window> items support the following
+options:
+
+=head2 Window Item Options
+
+=over 4
+
+=item Name: B<windowStyle>
+
+=item Class: B<WindowStyle>
+
+=item Switch: B<-style>
+
+Specifies the display style to use for this window item. Must be the
+name of a I<window> display style that has already be created with
+the B<ItemStyle> method.
+
+=item Name: B<window>
+
+=item Class: B<Window>
+
+=item Switch: B<-window>
+
+=item Alias: B<-widget>
+
+Specifies the sub-window to display in the item.
+
+=back
+
+=head2 Window Style Options
+
+B<STYLE STANDARD OPTIONS>
+
+B<-anchor> B<-padx> B<-pady>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 CREATING DISPLAY ITEMS
+
+Display items do not exist on their and thus they cannot be created
+independently of the widgets they reside in. As a rule, display items
+are created by special methods of their ``host'' widgets. For
+example, the HList widgets has a method B<item> which can be used
+to create new display items. The following code creates a new text
+item at the third column of the entry foo inside an HList widget:
+
+ my $hlist = $parent->HList(-columns=>3);
+ $hlist->add('foo');
+ $hlist->itemCreate('foo', 2, -itemtype=>'text', -text=>'Hello');
+
+The B<itemCreate> method of the HList widget accepts a variable
+number of arguments. The special argument B<-itemtype> specifies
+which type of display item to create. Options that are valid for this
+type of display items can then be specified by one or more
+I<option-value> pairs.
+
+After the display item is created, they can then be configured or
+destroyed using the methods provided by the host widget. For example,
+the HList widget has the methods B<itemConfigure>, B<itemCget>
+and B<itemDelete> for accessing the display items.
+
+=head1 CREATING AND MANIPULATING ITEM STYLES
+
+Item styles are created with B<ItemStyle>:
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<ItemStyle>(I<itemType> ?,B<-stylename>=E<gt>I<name>? ?,B<-refwindow>=E<gt>I<pathName>? ?,I<option>=E<gt>I<value>, ...>?);
+
+I<itemType> must be one of the existing display items types such as
+B<text>, B<imagetext>, B<window> or any new types added by
+the user. Additional arguments can be given in one or more
+I<option-value> pairs. I<option> can be any of the valid option
+for this display style or any of the following:
+
+=over 4
+
+=item B<-stylename> =E<gt> I<name>
+
+Specifies a name for this style. If unspecified, then a default name
+will be chosen for this style.
+
+=item B<-refwindow> =E<gt> I<$otherwidget>
+
+Specifies a window to use for determine the default values of the
+display type. If unspecified, the I<$widget> will be used. Default
+values for the display types can be set via the options database. The
+following example sets the B<-disablebackground> and
+B<-disabledforeground> options of a B<text> display style via
+the option database:
+
+ $widget->optionAdd('*table.list*disabledForeground' => 'blue');
+ $widget->optionAdd('*table.list*disabledBackground' => 'darkgray');
+ $widget->ItemStyle('text', -refwindow => $table_list, -fg => 'red');
+
+By using the option database to set the options of the display styles,
+we can advoid hard-coding the option values and give the user more
+flexibility in customization. See L<Tk::option> for a detailed description
+of the option database.
+
+=back
+
+=head1 STYLE METHODS
+
+The B<ItemStyle> method creates an object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+
+The following additional methods are available for item styles:
+
+=over 4
+
+=item I<$style>-E<gt>B<delete>
+
+Destroy this display style object.
+
+=back
+
+=head1 EXAMPLE
+
+The following example creates two columns of data in a HList
+widget. The first column is in red and the second column in blue. The
+colors of the columns are controlled by two different B<text>
+styles. Also, the anchor and font of the second column is chosen so
+that the income data is aligned properly.
+
+ use strict;
+ use Tk;
+ use Tk::HList;
+ use Tk::ItemStyle;
+
+ my $mw = MainWindow->new();
+
+ my $hlist = $mw->HList(-columns=>2)->pack;
+
+ my $red = $hlist->ItemStyle('text', -foreground=>'#800000');
+ my $blue = $hlist->ItemStyle('text', -foreground=>'#000080', -anchor=>'e');
+
+ my $e;
+ foreach ([Joe => '$10,000'], [Peter => '$20,000'],
+ [Raj => '$90,000'], [Zinh => '$0']) {
+ $e = $hlist->addchild("");
+ $hlist->itemCreate($e, 0, -itemtype=>'text',
+ -text=>$_->[0], -style=>$red );
+ $hlist->itemCreate($e, 1, -itemtype=>'text',
+ -text=>$_->[1], -style=>$blue);
+ }
+
+ Tk::MainLoop;
+
+=head1 SEE ALSO
+
+L<Tk::HList|Tk::HList>
+L<Tk::TixGrid|Tk::TixGrid>
+L<Tk::TList|Tk::TList>
+
+=head1 KEYWORDS
+
+display item, display style, item style
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Derived.pm b/Master/tlpkg/tlperl/lib/Tk/Derived.pm
new file mode 100644
index 00000000000..1685c78156d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Derived.pm
@@ -0,0 +1,512 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Derived;
+require Tk::Widget;
+require Tk::Configure;
+use strict;
+use Carp;
+
+use vars qw($VERSION);
+$VERSION = '4.011'; # sprintf '4.%03d', q$Revision: #10 $ =~ /\D(\d+)\s*$/;
+
+$Tk::Derived::Debug = 0;
+
+my $ENHANCED_CONFIGSPECS = 0; # disable for now
+
+use Tk qw(NORMAL_BG BLACK);
+
+sub Subwidget
+{
+ my $cw = shift;
+ my @result = ();
+ if (exists $cw->{SubWidget})
+ {
+ if (@_)
+ {
+ foreach my $name (@_)
+ {
+ push(@result,$cw->{SubWidget}{$name}) if (exists $cw->{SubWidget}{$name});
+ }
+ }
+ else
+ {
+ @result = values %{$cw->{SubWidget}};
+ }
+ }
+ return (wantarray) ? @result : $result[0];
+}
+
+sub _makelist
+{
+ my $widget = shift;
+ my (@specs) = (ref $widget && ref $widget eq 'ARRAY') ? (@$widget) : ($widget);
+ return @specs;
+}
+
+sub Subconfigure
+{
+ # This finds the widget or widgets to to which to apply a particular
+ # configure option
+ my ($cw,$opt) = @_;
+ my $config = $cw->ConfigSpecs;
+ my $widget;
+ my @subwidget = ();
+ my @arg = ();
+ if (defined $opt)
+ {
+ $widget = $config->{$opt};
+ unless (defined $widget)
+ {
+ $widget = ($opt =~ /^-(.*)$/) ? $config->{$1} : $config->{-$opt};
+ }
+ # Handle alias entries
+ if (defined($widget) && !ref($widget))
+ {
+ $opt = $widget;
+ $widget = $config->{$widget};
+ }
+ push(@arg,$opt) unless ($opt eq 'DEFAULT');
+ }
+ $widget = $config->{DEFAULT} unless (defined $widget);
+ if (defined $widget)
+ {
+ $cw->BackTrace("Invalid ConfigSpecs $widget") unless (ref($widget) && (ref $widget eq 'ARRAY'));
+ $widget = $widget->[0];
+ }
+ else
+ {
+ $widget = 'SELF';
+ }
+ foreach $widget (_makelist($widget))
+ {
+ $widget = 'SELF' if (ref($widget) && $widget == $cw);
+ if (ref $widget)
+ {
+ my $ref = ref $widget;
+ if ($ref eq 'ARRAY')
+ {
+ $widget = Tk::Configure->new(@$widget);
+ push(@subwidget,$widget)
+ }
+ elsif ($ref eq 'HASH')
+ {
+ foreach my $key (%$widget)
+ {
+ foreach my $sw (_makelist($widget->{$key}))
+ {
+ push(@subwidget,Tk::Configure->new($sw,$key));
+ }
+ }
+ }
+ else
+ {
+ push(@subwidget,$widget)
+ }
+ }
+ elsif ($widget eq 'ADVERTISED')
+ {
+ push(@subwidget,$cw->Subwidget)
+ }
+ elsif ($widget eq 'DESCENDANTS')
+ {
+ push(@subwidget,$cw->Descendants)
+ }
+ elsif ($widget eq 'CHILDREN')
+ {
+ push(@subwidget,$cw->children)
+ }
+ elsif ($widget eq 'METHOD')
+ {
+ my ($method) = ($opt =~ /^-?(.*)$/);
+ push(@subwidget,Tk::Configure->new($method,$method,$cw))
+ }
+ elsif ($widget eq 'SETMETHOD')
+ {
+ my ($method) = ($opt =~ /^-?(.*)$/);
+ push(@subwidget,Tk::Configure->new($method,'_cget',$cw,@arg))
+ }
+ elsif ($widget eq 'SELF')
+ {
+ push(@subwidget,Tk::Configure->new('Tk::configure', 'Tk::cget', $cw,@arg))
+ }
+ elsif ($widget eq 'PASSIVE')
+ {
+ push(@subwidget,Tk::Configure->new('_configure','_cget',$cw,@arg))
+ }
+ elsif ($widget eq 'CALLBACK')
+ {
+ push(@subwidget,Tk::Configure->new('_callback','_cget',$cw,@arg))
+ }
+ else
+ {
+ push(@subwidget,$cw->Subwidget($widget));
+ }
+ }
+ $cw->BackTrace("No delegate subwidget '$widget' for $opt") unless (@subwidget);
+ return (wantarray) ? @subwidget : $subwidget[0];
+}
+
+sub _cget
+{
+ my ($cw,$opt) = @_;
+ $cw->BackTrace('Wrong number of args to cget') unless (@_ == 2);
+ return $cw->{Configure}{$opt}
+}
+
+sub _configure
+{
+ my ($cw,$opt,$val) = @_;
+ $cw->BackTrace('Wrong number of args to configure') unless (@_ == 3);
+ $cw->{Configure}{$opt} = $val;
+}
+
+sub _callback
+{
+ my ($cw,$opt,$val) = @_;
+ $cw->BackTrace('Wrong number of args to configure') unless (@_ == 3);
+ $val = Tk::Callback->new($val) if defined($val) && ref($val);
+ $cw->{Configure}{$opt} = $val;
+}
+
+sub cget
+{my ($cw,$opt) = @_;
+ my @result;
+ local $SIG{'__DIE__'};
+ foreach my $sw ($cw->Subconfigure($opt))
+ {
+ if (wantarray)
+ {
+ eval { @result = $sw->cget($opt) };
+ }
+ else
+ {
+ eval { $result[0] = $sw->cget($opt) };
+ }
+ last unless $@;
+ }
+ return wantarray ? @result : $result[0];
+}
+
+sub Configured
+{
+ # Called whenever a derived widget is re-configured
+ my ($cw,$args,$changed) = @_;
+ if (@_ > 1)
+ {
+ $cw->afterIdle(['ConfigChanged',$cw,$changed]) if (%$changed);
+ }
+ return exists $cw->{'Configure'};
+}
+
+sub configure
+{
+ # The default composite widget configuration method uses hash stored
+ # in the widget's hash to map configuration options
+ # onto subwidgets.
+ #
+ my @results = ();
+ my $cw = shift;
+ if (@_ <= 1)
+ {
+ # Enquiry cases
+ my $spec = $cw->ConfigSpecs;
+ if (@_)
+ {
+ # Return info on the nominated option
+ my $opt = $_[0];
+ my $info = $spec->{$opt};
+ unless (defined $info)
+ {
+ $info = ($opt =~ /^-(.*)$/) ? $spec->{$1} : $spec->{-$opt};
+ }
+ if (defined $info)
+ {
+ if (ref $info)
+ {
+ # If the default slot is undef then ask subwidgets in turn
+ # for their default value until one accepts it.
+ if ($ENHANCED_CONFIGSPECS && !defined($info->[3]))
+ {local $SIG{'__DIE__'};
+ my @def;
+ foreach my $sw ($cw->Subconfigure($opt))
+ {
+ eval { @def = $sw->configure($opt) };
+ last unless $@;
+ }
+ $info->[3] = $def[3];
+ $info->[1] = $def[1] unless defined $info->[1];
+ $info->[2] = $def[2] unless defined $info->[2];
+ }
+ push(@results,$opt,$info->[1],$info->[2],$info->[3],$cw->cget($opt));
+ }
+ else
+ {
+ # Real (core) Tk widgets return db name rather than option name
+ # for aliases so recurse to get that ...
+ my @real = $cw->configure($info);
+ push(@results,$opt,$real[1]);
+ }
+ }
+ else
+ {
+ push(@results,$cw->Subconfigure($opt)->configure($opt));
+ }
+ }
+ else
+ {
+ my $opt;
+ my %results;
+ if (exists $spec->{'DEFAULT'})
+ {
+ foreach $opt ($cw->Subconfigure('DEFAULT')->configure)
+ {
+ $results{$opt->[0]} = $opt;
+ }
+ }
+ foreach $opt (keys %$spec)
+ {
+ $results{$opt} = [$cw->configure($opt)] if ($opt ne 'DEFAULT');
+ }
+ foreach $opt (sort keys %results)
+ {
+ push(@results,$results{$opt});
+ }
+ }
+ }
+ else
+ {
+ my (%args) = @_;
+ my %changed = ();
+ my ($opt,$val);
+ my $config = $cw->TkHash('Configure');
+
+ while (($opt,$val) = each %args)
+ {
+ my $var = \$config->{$opt};
+ my $old = $$var;
+ $$var = $val;
+ my $accepted = 0;
+ my $error = "No widget handles $opt";
+ foreach my $subwidget ($cw->Subconfigure($opt))
+ {
+ next unless (defined $subwidget);
+ eval {local $SIG{'__DIE__'}; $subwidget->configure($opt => $val) };
+ if ($@)
+ {
+ my $val2 = (defined $val) ? $val : 'undef';
+ $error = "Can't set $opt to `$val2' for $cw: " . $@;
+ undef $@;
+ }
+ else
+ {
+ $accepted = 1;
+ }
+ }
+ $cw->BackTrace($error) unless ($accepted);
+ $val = $$var;
+ $changed{$opt} = $val if (!defined $old || !defined $val || "$old" ne "$val");
+ }
+ $cw->Configured(\%args,\%changed);
+ }
+ return (wantarray) ? @results : \@results;
+}
+
+sub ConfigDefault
+{
+ my ($cw,$args) = @_;
+
+ $cw->BackTrace('Bad args') unless (defined $args && ref $args eq 'HASH');
+
+ my $specs = $cw->ConfigSpecs;
+ # Should we enforce a Delagates(DEFAULT => ) as well ?
+ $specs->{'DEFAULT'} = ['SELF'] unless (exists $specs->{'DEFAULT'});
+
+ #
+ # This is a pain with Text or Entry as core widget, they don't
+ # inherit SELF's cursor. So comment it out for Tk402.001
+ #
+ # $specs->{'-cursor'} = ['SELF',undef,undef,undef] unless (exists $specs->{'-cursor'});
+
+ # Now some hacks that cause colours to propogate down a composite widget
+ # tree - really needs more thought, other options adding such as active
+ # colours too and maybe fonts
+
+ my $child = ($cw->children)[0]; # 1st child window (if any)
+
+ unless (exists($specs->{'-background'}))
+ {
+ Tk::catch { $cw->Tk::cget('-background') };
+ my (@bg) = $@ ? ('PASSIVE') : ('SELF');
+ push(@bg,'CHILDREN') if $child;
+ $specs->{'-background'} = [\@bg,'background','Background',NORMAL_BG];
+ }
+ unless (exists($specs->{'-foreground'}))
+ {
+ Tk::catch { $cw->Tk::cget('-foreground') };
+ my (@fg) = $@ ? ('PASSIVE') : ('SELF');
+ push(@fg,'CHILDREN') if $child;
+ $specs->{'-foreground'} = [\@fg,'foreground','Foreground',BLACK];
+ }
+ $cw->ConfigAlias(-fg => '-foreground', -bg => '-background');
+
+ # Pre-scan args for aliases - this avoids defaulting
+ # options specified via alias
+ foreach my $opt (keys %$args)
+ {
+ my $info = $specs->{$opt};
+ if (defined($info) && !ref($info))
+ {
+ $args->{$info} = delete $args->{$opt};
+ }
+ }
+
+ # Now walk %$specs supplying defaults for all the options
+ # which have a defined default value, potentially looking up .Xdefaults database
+ # options for the name/class of the 'frame'
+
+ foreach my $opt (keys %$specs)
+ {
+ if ($opt ne 'DEFAULT')
+ {
+ unless (exists $args->{$opt})
+ {
+ my $info = $specs->{$opt};
+ if (ref $info)
+ {
+ # Not an alias
+ if ($ENHANCED_CONFIGSPECS && !defined $info->[3])
+ {
+ # configure inquire to fill in default slot from subwidget
+ $cw->configure($opt);
+ }
+ if (defined $info->[3])
+ {
+ if (defined $info->[1] && defined $info->[2])
+ {
+ # Should we do this on the Subconfigure widget instead?
+ # to match *Entry.Background
+ my $db = $cw->optionGet($info->[1],$info->[2]);
+ $info->[3] = $db if (defined $db);
+ }
+ $args->{$opt} = $info->[3];
+ }
+ }
+ }
+ }
+ }
+}
+
+sub ConfigSpecs
+{
+ my $cw = shift;
+ my $specs = $cw->TkHash('ConfigSpecs');
+ while (@_)
+ {
+ my $key = shift;
+ my $val = shift;
+ $specs->{$key} = $val;
+ }
+ return $specs;
+}
+
+sub _alias
+{
+ my ($specs,$opt,$main) = @_;
+ if (exists($specs->{$opt}))
+ {
+ unless (exists $specs->{$main})
+ {
+ my $targ = $specs->{$opt};
+ if (ref($targ))
+ {
+ # opt is a real option
+ $specs->{$main} = $opt
+ }
+ else
+ {
+ # opt is itself an alias
+ # make main point to same place
+ $specs->{$main} = $targ unless $targ eq $main;
+ }
+ }
+ return 1;
+ }
+ return 0;
+}
+
+sub ConfigAlias
+{
+ my $cw = shift;
+ my $specs = $cw->ConfigSpecs;
+ while (@_ >= 2)
+ {
+ my $opt = shift;
+ my $main = shift;
+ unless (_alias($specs,$opt,$main) || _alias($specs,$main,$opt))
+ {
+ $cw->BackTrace("Neither $opt nor $main exist");
+ }
+ }
+ $cw->BackTrace('Odd number of args to ConfigAlias') if (@_);
+}
+
+sub Delegate
+{
+ my ($cw,$method,@args) = @_;
+ my $widget = $cw->DelegateFor($method);
+ if ($widget == $cw)
+ {
+ $method = "Tk::Widget::$method"
+ }
+ my @result;
+ if (wantarray)
+ {
+ @result = $widget->$method(@args);
+ }
+ else
+ {
+ $result[0] = $widget->$method(@args);
+ }
+ return (wantarray) ? @result : $result[0];
+}
+
+sub InitObject
+{
+ my ($cw,$args) = @_;
+ $cw->Populate($args);
+ $cw->ConfigDefault($args);
+}
+
+sub ConfigChanged
+{
+ my ($cw,$args) = @_;
+}
+
+sub Advertise
+{
+ my ($cw,$name,$widget) = @_;
+ confess 'No name' unless (defined $name);
+ croak 'No widget' unless (defined $widget);
+ my $hash = $cw->TkHash('SubWidget');
+ $hash->{$name} = $widget; # advertise it
+ return $widget;
+}
+
+sub Component
+{
+ my ($cw,$kind,$name,%args) = @_;
+ $args{'Name'} = "\l$name" if (defined $name && !exists $args{'Name'});
+ # my $pack = delete $args{'-pack'};
+ my $delegate = delete $args{'-delegate'};
+ my $w = $cw->$kind(%args); # Create it
+ # $w->pack(@$pack) if (defined $pack);
+ $cw->Advertise($name,$w) if (defined $name);
+ $cw->Delegates(map(($_ => $w),@$delegate)) if (defined $delegate);
+ return $w; # and return it
+}
+
+1;
+__END__
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Derived.pod b/Master/tlpkg/tlperl/lib/Tk/Derived.pod
new file mode 100644
index 00000000000..4b99934d5bd
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Derived.pod
@@ -0,0 +1,89 @@
+
+=head1 NAME
+
+Tk::Derived - Base class for widgets derived from others
+
+=for pm Tk/Derived.pm
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ package Tk::MyNewWidget;
+
+ use Tk::widgets qw/ BaseWidget, list of Tk widgets /;
+ use base qw/ Tk::Derived Tk::BaseWidget /;
+
+ Construct Tk::Widget 'MyNewWidget';
+
+ sub ClassInit {
+ my( $class, $mw ) = @_;
+ #... e.g., class bindings here ...
+ $class->SUPER::ClassInit( $mw );
+ }
+
+ sub Populate {
+ my( $self, $args ) = @_;
+
+ my $flag = delete $args->{-flag};
+ if( defined $flag ) {
+ # handle -flag => xxx which can only be done at create
+ # time the delete above ensures that new() does not try
+ # and do $self->configure( -flag => xxx );
+ }
+
+ $self->SUPER::Populate( $args );
+
+ $self = $self->Component( ... );
+
+ $self->Delegates( ... );
+
+ $self->ConfigSpecs(
+ '-cursor' => [ SELF, 'cursor', 'Cursor', undef ],
+ '-something' => [ METHOD, dbName, dbClass, default ],
+ '-text' => [ $label, dbName, dbClass, default ],
+ '-heading' => [ {-text => $head},
+ heading, Heading, 'My Heading' ],
+ );
+ }
+
+ sub something {
+ my( $self, $value) = @_;
+ if ( @_ > 1 ) {
+ # set it
+ }
+ return # current value
+ }
+
+=head1 DESCRIPTION
+
+Tk::Derived is used with Perl's multiple inheritance to override some
+methods normally inherited from Tk::Widget.
+
+Tk::Derived should precede any Tk widgets in the class's base class
+definition.
+
+Tk::Derived's main purpose is to apply wrappers to C<configure> and C<cget>
+methods of widgets to allow the derived widget to add to or modify behaviour
+of the configure options supported by the base widget.
+
+The derived class should normally override the C<Populate> method provided
+by Tk::Derived and call C<ConfigSpecs> to declare configure options.
+
+The public methods provided by Tk::Derived are as follows:
+
+=over 4
+
+=item -E<gt>ConfigSpecs(-I<key> =E<gt> [I<kind>, I<name>, I<Class>, I<default>], ...)
+
+=back
+
+=head1 SEE ALSO
+
+L<Tk::ConfigSpecs|Tk::ConfigSpecs>
+L<Tk::mega|Tk::mega>
+L<Tk::composite|Tk::composite>
+
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Dialog.pm b/Master/tlpkg/tlperl/lib/Tk/Dialog.pm
new file mode 100644
index 00000000000..d713814813b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Dialog.pm
@@ -0,0 +1,68 @@
+package Tk::Dialog;
+
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/Tk/Dialog.pm#4 $
+
+# Dialog - a translation of `tk_dialog' from Tcl/Tk to TkPerl (based on
+# John Stoffel's idea).
+#
+# Stephen O. Lidie, Lehigh University Computing Center. 94/12/27
+# lusol@Lehigh.EDU
+
+# Documentation after __END__
+
+use Carp;
+use strict;
+use base qw(Tk::DialogBox);
+
+Construct Tk::Widget 'Dialog';
+
+sub Populate
+{
+
+ # Dialog object constructor. Uses `new' method from base class
+ # to create object container then creates the dialog toplevel.
+
+ my($cw, $args) = @_;
+
+ $cw->SUPER::Populate($args);
+
+ my ($w_bitmap,$w_but,$pad1,$pad2);
+
+ # Create the Toplevel window and divide it into top and bottom parts.
+
+ my (@pl) = (-side => 'top', -fill => 'both');
+
+ ($pad1, $pad2) =
+ ([-padx => '3m', -pady => '3m'], [-padx => '3m', -pady => '2m']);
+
+
+ $cw->iconname('Dialog');
+
+ my $w_top = $cw->Subwidget('top');
+
+ # Fill the top part with the bitmap and message.
+
+ @pl = (-side => 'left');
+
+ $w_bitmap = $w_top->Label(Name => 'bitmap');
+ $w_bitmap->pack(@pl, @$pad1);
+
+ my $w_msg = $w_top->Label( -wraplength => '3i', -justify => 'left' );
+
+ $w_msg->pack(-side => 'right', -expand => 1, -fill => 'both', @$pad1);
+
+ $cw->Advertise(message => $w_msg);
+ $cw->Advertise(bitmap => $w_bitmap );
+
+ $cw->ConfigSpecs( -image => ['bitmap',undef,undef,undef],
+ -bitmap => ['bitmap',undef,undef,undef],
+ -font => ['message','font','Font', '-*-Times-Medium-R-Normal--*-180-*-*-*-*-*-*'],
+ DEFAULT => ['message',undef,undef,undef]
+ );
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Dialog.pod b/Master/tlpkg/tlperl/lib/Tk/Dialog.pod
new file mode 100644
index 00000000000..871206d504c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Dialog.pod
@@ -0,0 +1,107 @@
+# Copyright (c) 1992 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Dialog - Create modal dialog and wait for a response.
+
+=for pm Tk/Dialog.pm
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+S< >I<$dialog> = I<$parent>-E<gt>B<Dialog>(I<-option> =E<gt> I<value>, ... );
+
+=head1 DESCRIPTION
+
+This procedure is part of the Tk script library - its arguments
+describe a dialog box. After creating a dialog box, B<Dialog> waits
+for the user to select one of the Buttons either by clicking on the
+Button with the mouse or by typing return to invoke the default Button
+(if any). Then it returns the text string of the selected Button.
+
+While waiting for the user to respond, B<Dialog> sets a local
+grab. This prevents the user from interacting with the application
+in any way except to invoke the dialog box. See the B<Show()> method.
+
+=head1 OPTIONS
+
+The following option/value pairs are supported:
+
+=over 4
+
+=item B<-title>
+
+Text to appear in the window manager's title bar for the dialog.
+
+=item B<-text>
+
+Message to appear in the top portion of the Dialog.
+
+=item B<-bitmap>
+
+If non-empty, specifies a bitmap to display in the top portion of the
+Dialog, to the left of the text. If this is an empty string then no
+bitmap is displayed in the Dialog.
+
+=item B<-default_button>
+
+Text label string of the Button that displays the default ring.
+
+=item B<-buttons>
+
+A reference to a list of Button label strings. Each I<string>
+specifies text to display in a Button, in order from left to right.
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item I<$answer> = $dialog-E<gt>B<Show(>?-global?B<)>;
+
+This method displays the Dialog, waits for the user's response, and stores
+the text string of the selected Button in I<$answer>. If I<-global> is
+specified a global (rather than local) grab is performed.
+
+The actual Dialog is shown using the B<Popup> method. Any other
+options supplied to B<Show> are passed to B<Popup>, and can be used to
+position the Dialog on the screen. Please read Tk::Popup for details.
+
+=back
+
+=head1 ADVERTISED WIDGETS
+
+Because Tk::Dialog is a subclass of Tk::DialogBox it inherits all the
+advertised subwidgets of its superclass: e.g. "B_button-text", where
+'button-text' is a Button's -text value. Additionally, Tk::Dialog
+advertises:
+
+=over 4
+
+=item B<message>
+
+The dialog's Label widget containing the message text.
+
+=item B<bitmap>
+
+The dialog's Label widget containing the bitmap image.
+
+=back
+
+=head1 EXAMPLE
+
+I<$dialog> = I<$mw>-E<gt>B<Dialog>(-text =E<gt> 'Save File?', -bitmap =E<gt> 'question', -title =E<gt> 'Save File Dialog', -default_button =E<gt> 'Yes', -buttons =E<gt> [qw/Yes No Cancel/);
+
+=head1 KEYWORDS
+
+bitmap, dialog, modal, messageBox
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/DialogBox.pm b/Master/tlpkg/tlperl/lib/Tk/DialogBox.pm
new file mode 100644
index 00000000000..6111a0ec51c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DialogBox.pm
@@ -0,0 +1,152 @@
+#
+# DialogBox is similar to Dialog except that it allows any widget
+# in the top frame. Widgets can be added with the add method. Currently
+# there exists no way of deleting a widget once it has been added.
+
+package Tk::DialogBox;
+
+use strict;
+use Carp;
+
+use vars qw($VERSION);
+$VERSION = '4.016'; # was: sprintf '4.%03d', q$Revision: #13 $ =~ /\D(\d+)\s*$/;
+
+use base qw(Tk::Toplevel);
+
+Tk::Widget->Construct('DialogBox');
+
+sub Populate {
+ my ($cw, $args) = @_;
+
+ $cw->SUPER::Populate($args);
+ my $buttons = delete $args->{'-buttons'};
+ $buttons = ['OK'] unless defined $buttons;
+ my $default_button = delete $args->{'-default_button'};
+ $default_button = $buttons->[0] unless defined $default_button;
+ my $cancel_button = delete $args->{'-cancel_button'};
+ if (!$cancel_button && @$buttons == 1) {
+ $cancel_button = $buttons->[0];
+ }
+
+ $cw->{'selected_button'} = '';
+ $cw->transient($cw->Parent->toplevel);
+ $cw->withdraw;
+ if ($cancel_button) {
+ $cw->protocol('WM_DELETE_WINDOW' => sub { $cw->{'cancel_button'}->invoke });
+ } else {
+ $cw->protocol('WM_DELETE_WINDOW' => sub { $cw->{'selected_button'} = undef });
+ }
+ # Make sure waitVariable exits if a waiting dialog is destroyed
+ $cw->OnDestroy(sub { $cw->{'selected_button'} = $cw->{'selected_button'} });
+
+ # create the two frames
+ my $top = $cw->Component('Frame', 'top');
+ $top->configure(-relief => 'raised', -bd => 1) unless $Tk::platform eq 'MSWin32';
+ my $bot = $cw->Component('Frame', 'bottom');
+ $bot->configure(-relief => 'raised', -bd => 1) unless $Tk::platform eq 'MSWin32';
+ $bot->pack(qw/-side bottom -fill both -ipady 3 -ipadx 3/);
+ $top->pack(qw/-side top -fill both -ipady 3 -ipadx 3 -expand 1/);
+
+ # create a row of buttons in the bottom.
+ my $bl; # foreach my $var: perl > 5.003_08
+ foreach $bl (@$buttons)
+ {
+ my $b = $bot->Button(-text => $bl, -command => sub { $cw->{'selected_button'} = "$bl" } );
+ $b->bind('<Return>' => [ $b, 'Invoke']);
+ $cw->Advertise("B_$bl" => $b);
+ if ($Tk::platform eq 'MSWin32')
+ {
+ $b->configure(-width => 10, -pady => 0);
+ }
+ if ($bl eq $default_button) {
+ my $db = $bot->Frame(-relief => 'sunken', -bd => 1);
+ $b->raise($db);
+ $b->pack(-in => $db, -padx => '2', -pady => '2');
+ $db->pack(-side => 'left', -expand => 1, -padx => 1, -pady => 1);
+ $cw->{'default_button'} = $b;
+ $cw->bind('<Return>' => [ $b, 'Invoke']);
+ } else {
+ $b->pack(-side => 'left', -expand => 1, -padx => 1, -pady => 1);
+ }
+ if (defined $cancel_button && $bl eq $cancel_button) {
+ $cw->{'cancel_button'} = $b;
+ }
+ }
+ if (defined $default_button && !$cw->{'default_button'}) {
+ warn "Default button `$default_button' does not exist.\n";
+ }
+ if (defined $cancel_button && !$cw->{'cancel_button'}) {
+ warn "Cancel button `$cancel_button' does not exist.\n";
+ }
+ $cw->ConfigSpecs(-command => ['CALLBACK', undef, undef, undef ],
+ -foreground => ['DESCENDANTS', 'foreground','Foreground', 'black'],
+ -background => ['DESCENDANTS', 'background','Background', undef],
+ -focus => ['PASSIVE', undef, undef, undef],
+ -showcommand => ['CALLBACK', undef, undef, undef],
+ );
+ $cw->Delegates('Construct',$top);
+}
+
+sub add {
+ my ($cw, $wnam, @args) = @_;
+ my $w = $cw->Subwidget('top')->$wnam(@args);
+ $cw->Advertise("\L$wnam" => $w);
+ return $w;
+}
+
+sub Wait
+{
+ my $cw = shift;
+ $cw->Callback(-showcommand => $cw);
+ $cw->waitVariable(\$cw->{'selected_button'});
+ $cw->grabRelease if Tk::Exists($cw);
+ $cw->withdraw if Tk::Exists($cw);
+ $cw->Callback(-command => $cw->{'selected_button'});
+}
+
+sub Show {
+
+ croak 'DialogBox: "Show" method requires at least 1 argument'
+ if scalar @_ < 1;
+ my $cw = shift;
+ my ($grab) = @_;
+ my $old_focus = $cw->focusSave;
+ my $old_grab = $cw->grabSave;
+
+ shift if defined $grab && length $grab && ($grab =~ /global/);
+ $cw->Popup(@_);
+
+ Tk::catch {
+ if (defined $grab && length $grab && ($grab =~ /global/)) {
+ $cw->grabGlobal;
+ } else {
+ $cw->grab;
+ }
+ };
+ if (my $focusw = $cw->cget(-focus)) {
+ $focusw->focus;
+ } elsif (defined $cw->{'default_button'}) {
+ $cw->{'default_button'}->focus;
+ } else {
+ $cw->focus;
+ }
+ $cw->Wait;
+ &$old_focus;
+ &$old_grab;
+ return $cw->{'selected_button'};
+}
+
+sub SelectButton
+{
+ my ($w, $button_text) = @_;
+ $w->{'selected_button'} = $button_text;
+}
+
+sub Exit
+{
+ my $cw = shift;
+ #kill the dialogbox, by faking a 'DONE'
+ $cw->{'selected_button'} = $cw->{'default_button'}->cget(-text);
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/DialogBox.pod b/Master/tlpkg/tlperl/lib/Tk/DialogBox.pod
new file mode 100644
index 00000000000..a091cd98427
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DialogBox.pod
@@ -0,0 +1,156 @@
+
+=head1 NAME
+
+Tk::DialogBox - create and manipulate a dialog screen.
+
+=for pm Tixish/DialogBox.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+ use Tk::DialogBox
+ ...
+ $d = $top->DialogBox(-title => "Title", -buttons => ["OK", "Cancel"]);
+ $w = $d->add(Widget, args)->pack;
+ ...
+ $button = $d->Show;
+
+=head1 DESCRIPTION
+
+B<DialogBox> is very similar to B<Dialog> except that it allows
+any widget in the top Frame. B<DialogBox> creates two
+Frames, I<top> and I<bottom>. The bottom Frame shows all the
+specified Buttons, lined up from left to right. The top Frame acts
+as a container for all other widgets that can be added with the
+B<add()> method.
+
+=head1 OPTIONS
+
+The options recognized by B<DialogBox> are as follows:
+
+=over 4
+
+=item B<-title>
+
+Specify the title of the DialogBox. If this is not set, then the
+name of the program is used.
+
+=item B<-buttons>
+
+The button names to display in the bottom Frame. This is a reference
+to an array of strings containing the text to put on each
+Button. There is no default value for this. If you do not specify any
+button names, no Buttons are displayed.
+
+=item B<-default_button>
+
+Specifies the default Button that is considered invoked when user
+presses <Return> on the DialogBox. This Button is highlighted. If
+no default Button is specified, then the first element of the
+array whose reference is passed to the B<-buttons> option is used
+as the default.
+
+=item B<-cancel_button>
+
+Specifies the Button that is considered invoked when the user closes
+the DialogBox using the window manager's close button. If the
+B<-cancel_button> option is not given, and if there's only one button
+configured, then this button is also used as the cancel button.
+Otherwise no button is considered as the cancel button; in such a case
+B<Show> just returns C<undef> when the user closes the DialogBox.
+
+=item B<-command>
+
+A callback which is executed after invoking an action to close the
+DialogBox, but before restoring focus and grab information. The
+selected button is passed as the first argument.
+
+=item B<-focus>
+
+Specify the widget to receive the initial focus after popping up the
+DialogBox. By default the B<-default_button> widget receives the
+initial focus.
+
+=item B<-showcommand>
+
+A callback which is executed before displaying the DialogBox and
+waiting for user input. The DialogBox itself is passed as the first
+argument.
+
+=back
+
+=head1 METHODS
+
+B<DialogBox> supports only two methods as of now:
+
+=over 4
+
+=item B<add(>I<widget>, I<options>B<)>
+
+Add the widget indicated by I<widget>. I<Widget> can be the name
+of any Tk widget (standard or contributed). I<options> are the
+options that the widget accepts. The widget is advertized as a
+subwidget of B<DialogBox>. The name of I<widget> is
+lower-cased and used as the advertised name. If multiple instances of
+I<widget> are created in the B<DialogBox>, then only the last one gets
+the advertised name. B<add()> does not automatically B<pack()> or
+B<grid()> I<widget> into the B<DialogBox>.
+
+=item B<Show(>I<?-global?>B<)>
+
+Displays the Dialog until the user invokes one of the Buttons in the
+bottom Frame. If the grab type I<-global> is specified, then B<Show>
+uses that grab; otherwise it defaults to a local grab. Returns the
+name of the Button invoked.
+
+The actual Dialog is shown using the B<Popup> method. Any other
+options supplied to B<Show> are passed to B<Popup>, and can be used to
+position the Dialog on the screen. Please read Tk::Popup for details.
+
+=item B<Exit()>
+
+Close the dialogbox, by emulating a click on the default button.
+
+=back
+
+=head1 ADVERTISED WIDGETS
+
+=over 4
+
+=item B<top>
+
+The subwidget reference to the top half of the DialogBox widget, the Frame
+containing widgets added by the B<add> method.
+
+=item B<bottom>
+
+The subwidget reference to the bottom half of the DialogBox widget, the Frame
+containing the Button widgets.
+
+=item B<B_"button-text">
+
+Individual subwidget references to the Buttons in the DialogBox widget. The
+subwidget name is the string I<B_> concatenated with the Button's -text
+value.
+
+=back
+
+=head1 BUGS
+
+There is no way of removing a widget once it has been added to the
+top Frame, unless you access the I<top> subwidget and go through the
+child widgets.
+
+There is no control over the appearance of the Buttons in the
+bottom Frame nor is there any way to control the placement of the
+two Frames with respect to each other.
+
+=head1 AUTHOR
+
+B<Rajappa Iyer> rsi@earthling.net
+
+This code is distributed under the same terms as Perl.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/DirTree.pm b/Master/tlpkg/tlperl/lib/Tk/DirTree.pm
new file mode 100644
index 00000000000..46d05fa3ab5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DirTree.pm
@@ -0,0 +1,261 @@
+package Tk::DirTree;
+# DirTree -- TixDirTree widget
+#
+# Derived from DirTree.tcl in Tix 4.1
+#
+# Chris Dean <ctdean@cogit.com>
+
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.021';
+
+use Tk;
+use Tk::Derived;
+use Tk::Tree;
+use Cwd;
+use DirHandle;
+use File::Spec qw();
+
+use base qw(Tk::Derived Tk::Tree);
+use strict;
+
+Construct Tk::Widget 'DirTree';
+
+my $sep = $^O eq 'MSWin32' ? '\\' : '/';
+
+*_fs_encode = eval { require Encode; 1 } ? sub { Encode::encode("iso-8859-1", $_[0]) } : sub { $_[0] };
+
+sub Populate {
+ my( $cw, $args ) = @_;
+
+ $cw->SUPER::Populate( $args );
+
+ $cw->ConfigSpecs(
+ -dircmd => [qw/CALLBACK dirCmd DirCmd DirCmd/],
+ -showhidden => [qw/PASSIVE showHidden ShowHidden 0/],
+ -image => [qw/PASSIVE image Image folder/],
+ -directory => [qw/SETMETHOD directory Directory ./],
+ -value => '-directory' );
+
+ $cw->configure( -separator => $sep,
+ -itemtype => 'imagetext',
+ );
+}
+
+sub DirCmd {
+ my( $w, $dir, $showhidden ) = @_;
+ $dir .= $sep if $dir =~ /^[a-z]:$/i and $^O eq 'MSWin32';
+ my $h = DirHandle->new( $dir ) or return();
+ my @names = grep( $_ ne '.' && $_ ne '..', $h->read );
+ @names = grep( ! /^[.]/, @names ) unless $showhidden;
+ return( @names );
+}
+
+*dircmd = \&DirCmd;
+
+sub fullpath
+{
+ my ($path) = @_;
+ my $cwd = getcwd();
+ if (CORE::chdir($path))
+ {
+ $path = getcwd();
+ CORE::chdir($cwd) || die "Cannot cd back to $cwd:$!";
+ }
+ else
+ {
+ warn "Cannot cd to $path:$!"
+ }
+ $path = File::Spec->canonpath($path);
+ return $path;
+}
+
+sub directory
+{
+ my ($w,$key,$val) = @_;
+ # We need a value for -image, so its being undefined
+ # is probably caused by order of handling config defaults
+ # so defer it.
+ $w->afterIdle([$w, 'set_dir' => $val]);
+}
+
+sub set_dir {
+ my( $w, $val ) = @_;
+ my $fulldir = fullpath( $val );
+
+ my $parent = $sep;
+ if ($^O eq 'MSWin32')
+ {
+ if ($fulldir =~ s/^([a-z]:)//i)
+ {
+ $parent = $1;
+ }
+ }
+ $w->add_to_tree( $parent, $parent) unless $w->infoExists($parent);
+
+ my @dirs = ($parent);
+ foreach my $name (split( /\Q$sep\E/, $fulldir )) {
+ next unless length $name;
+ push @dirs, $name;
+ my $dir = File::Spec->catfile( @dirs );
+ $w->add_to_tree( $dir, $name, $parent )
+ unless $w->infoExists( $dir );
+ $parent = $dir;
+ }
+
+ $w->OpenCmd( $parent );
+ $w->setmode( $parent, 'close' );
+}
+*chdir = \&set_dir;
+
+
+sub OpenCmd {
+ my( $w, $dir ) = @_;
+
+ my $parent = $dir;
+ foreach my $name ($w->dirnames( $parent )) {
+ next if ($name eq '.' || $name eq '..');
+ my $subdir = File::Spec->catfile( $dir, $name );
+ $subdir = _fs_encode($subdir);
+ next unless -d $subdir;
+ if( $w->infoExists( $subdir ) ) {
+ $w->show( -entry => $subdir );
+ } else {
+ $w->add_to_tree( $subdir, $name, $parent );
+ }
+ }
+}
+
+*opencmd = \&OpenCmd;
+
+sub add_to_tree {
+ my( $w, $dir, $name, $parent ) = @_;
+
+ my $dir8 = _fs_encode($dir);
+ my $image = $w->cget('-image');
+ if ( !UNIVERSAL::isa($image, 'Tk::Image') ) {
+ $image = $w->Getimage( $image );
+ }
+ my $mode = 'none';
+ $mode = 'open' if $w->has_subdir( $dir );
+
+ my @args = (-image => $image, -text => $name);
+ if( $parent ) { # Add in alphabetical order.
+ foreach my $sib ($w->infoChildren( $parent )) {
+ use if $^O ne 'MSWin32', "locale"; # dumps core under Windows under some (japanese?) locales, see http://www.nntp.perl.org/group/perl.cpan.testers/2008/11/msg2550386.html
+ my $sib8 = _fs_encode($sib);
+ if ($sib8 gt $dir8) {
+ push @args, (-before => $sib);
+ last;
+ }
+ }
+ }
+
+ $w->add( $dir, @args );
+ $w->setmode( $dir, $mode );
+}
+
+sub has_subdir {
+ my( $w, $dir ) = @_;
+ foreach my $name ($w->dirnames( $dir )) {
+ next if ($name eq '.' || $name eq '..');
+ next if ($name =~ /^\.+$/);
+ return( 1 ) if -d File::Spec->catfile( $dir, $name );
+ }
+ return( 0 );
+}
+
+sub dirnames {
+ my( $w, $dir ) = @_;
+ my @names = $w->Callback( '-dircmd', $dir, $w->cget( '-showhidden' ) );
+ return( @names );
+}
+
+{
+ package Tk::DirTreeDialog;
+ use base qw(Tk::Toplevel);
+ Construct Tk::Widget 'DirTreeDialog';
+
+ sub Populate {
+ my($w, $args) = @_;
+ $w->{curr_dir} = delete $args->{-initialdir};
+ if (!defined $w->{curr_dir}) {
+ require Cwd;
+ $w->{curr_dir} = Cwd::cwd();
+ }
+ if (defined $args->{-mustexist}) {
+ die "-mustexist is not yet implemented";
+ }
+ my $title = $args->{-title} || "Choose directory:";
+ delete $args->{-popover};
+
+ $w->title($title);
+ $w->{ok} = 0; # flag: "1" means OK, "-1" means cancelled
+
+ $w->transient($w->Parent->toplevel);
+
+ # Create Frame widget before the DirTree widget, so it's always visible
+ # if the window gets resized.
+ my $f = $w->Frame->pack(-fill => "x", -side => "bottom");
+
+ my $d;
+ $d = $w->Scrolled('DirTree',
+ -scrollbars => 'osoe',
+ -width => 35,
+ -height => 20,
+ -selectmode => 'browse',
+ -exportselection => 1,
+ -browsecmd => sub {
+ $w->{curr_dir} = shift;
+ },
+
+ # With this version of -command a double-click will
+ # select the directory
+ -command => sub { $w->{ok} = 1 },
+
+ # With this version of -command a double-click will
+ # open a directory. Selection is only possible with
+ # the Ok button.
+ #-command => sub { $d->opencmd($_[0]) },
+ )->pack(-fill => "both", -expand => 1);
+ # Set the initial directory
+ $d->set_dir($w->{curr_dir});
+
+ $f->Button(-text => 'Ok',
+ -command => sub { $w->{ok} = 1 })->pack(-side => 'left');
+ $f->Button(-text => 'Cancel',
+ -command => sub { $w->{ok} = -1 })->pack(-side => 'left');
+ $w->OnDestroy(sub { $w->{ok} = -1 });
+ }
+
+ sub Show {
+ my $w = shift;
+ my $old_focus = $w->focusSave;
+ my $old_grab = $w->grabSave;
+ Tk::catch {
+ $w->grab;
+ };
+ $w->waitVariable(\$w->{ok});
+ my $ret = $w->{ok} == 1 ? $w->{curr_dir} : undef;
+ $w->grabRelease if Tk::Exists($w);
+ &$old_focus;
+ &$old_grab;
+ $w->destroy if Tk::Exists($w);
+ $ret;
+ }
+}
+
+1;
+
+__END__
+
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distrobution are in the file
+# license.tcl.
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/DirTree.pod b/Master/tlpkg/tlperl/lib/Tk/DirTree.pod
new file mode 100644
index 00000000000..d8ded2f41b7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DirTree.pod
@@ -0,0 +1,172 @@
+
+=head1 NAME
+
+Tk::DirTree - Create and manipulate DirTree widgets
+
+=for pm Tixish/DirTree.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+S< >B<use Tk::DirTree;>
+
+S< >I<$dirtree> = I<$parent>-E<gt>B<DirTree>(?I<options>?);
+
+=head1 SUPER-CLASS
+
+The B<DirTree> class is derived from the L<Tree|Tk::Tree> class and inherits
+all the methods, options and subwidgets of its super-class.
+
+=head1 STANDARD OPTIONS
+
+B<Tree> supports all the standard options of a Tree widget. See
+L<Tk::options> for details on the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<browseCmd>
+
+=item Class: B<BrowseCmd>
+
+=item Switch: B<-browsecmd>
+
+Specifies a L<callback|Tk::callbacks> to call whenever the user browses on a directory
+(usually by single-clicking on the name of the directory). The callback
+is called with one argument, the complete pathname of the directory.
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies the L<callback|Tk::callbacks> to be called when the user activates on a directory
+(usually by double-clicking on the name of the directory). The callback
+is called with one argument, the complete pathname of the directory.
+
+=item Name: B<dircmd>
+
+=item Class: B<DirCmd>
+
+=item Switch: B<-dircmd>
+
+Specifies the L<callback|Tk::callbacks> to be called when a directory listing is needed
+for a particular directory. If this option is not specified, by
+default the DirTree widget will attempt to read the directory as a
+Unix directory. On special occasions, the application programmer may
+want to supply a special method for reading directories: for example,
+when he needs to list remote directories. In this case, the B<-dircmd>
+option can be used. The specified callback accepts two arguments: the
+first is the name of the directory to be listed; the second is a
+Boolean value indicating whether hidden sub-directories should be
+listed. This callback returns a list of names of the sub-directories of
+this directory. For example:
+
+ sub read_dir {
+ my( $dir, $showhidden ) = @_;
+ return( qw/DOS NORTON WINDOWS/ ) if $dir eq "C:\\";
+ return();
+ }
+
+=item Name: B<showHidden>
+
+=item Class: B<ShowHidden>
+
+=item Switch: B<-showhidden>
+
+Specifies whether hidden directories should be shown. By default, a
+directory name starting with a period "." is considered as a hidden
+directory. This rule can be overridden by supplying an alternative
+B<-dircmd> option.
+
+=item Name: B<directory>
+
+=item Class: B<Directory>
+
+=item Switch: B<-directory>
+
+=item Alias: B<-value>
+
+Specifies the name of the current directory to be displayed in the
+DirTree widget.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<DirTree> constructor method creates a new window (given by the $dirtree
+argument) and makes it into a DirTree widget. Additional options,
+described above, may be specified on the command line or in the
+option database to configure aspects of the DirTree such as its
+cursor and relief. The DirTree widget displays a list view of a
+directory, its previous directories and its sub-directories. The
+user can choose one of the directories displayed in the list or
+change to another directory.
+
+=head1 WIDGET METHODS
+
+The B<DirTree> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for DirTree widgets:
+
+=over 4
+
+=item I<$dirtree>-E<gt>B<chdir>(I<dir>)
+
+Change the current directory to I<dir>.
+
+=back
+
+=head1 OTHER METHODS
+
+These methods have to be documented or made private:
+
+=over 4
+
+=item OpenCmd
+
+=item Populate
+
+=item add_to_tree
+
+=item dirnames
+
+=item fullpath
+
+=item has_subdir
+
+=item opencmd
+
+=item set_dir
+
+=back
+
+=head1 BINDINGS
+
+The mouse and keyboard bindings of the DirTree widget are the same as
+the bindings of the L<Tree|Tk::Tree> widget.
+
+=head1 KEYWORDS
+
+directory, tree, tix
+
+=head1 SEE ALSO
+
+L<Tk::Tree|Tk::Tree>
+L<Tk::HList|Tk::HList>
+
+=head1 AUTHOR
+
+Perl/TK version by Chris Dean <ctdean@cogit.com>. Original Tcl/Tix
+version by Ioi Kim Lam.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Dirlist.pm b/Master/tlpkg/tlperl/lib/Tk/Dirlist.pm
new file mode 100644
index 00000000000..f16ce021f41
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Dirlist.pm
@@ -0,0 +1,113 @@
+package Tk::Dirlist;
+require Tk::Derived;
+require Tk::HList;
+require DirHandle;
+use Cwd;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/Dirlist.pm#5 $
+
+use base qw(Tk::Derived Tk::HList);
+use strict;
+Construct Tk::Widget 'Dirlist';
+
+sub getimage
+{
+ my ($w,$key) = @_;
+ unless (exists $w->{$key})
+ {
+ $w->{$key} = $w->Pixmap(-id => $key);
+ unless ($w->{$key})
+ {
+ $w->{$key} = $w->Bitmap($key);
+ }
+ }
+ return $w->{$key};
+}
+
+
+sub Populate
+{
+ my ($cw,$args) = @_;
+ $cw->configure(-separator => '/', -itemtype => 'imagetext');
+ $cw->ConfigSpecs(-directory => ['SETMETHOD','directory','Directory','.']);
+}
+
+sub fullpath
+{
+ my ($path) = @_;
+ my $cwd = getcwd;
+ if (chdir($path))
+ {
+ $path = getcwd;
+ chdir($cwd);
+ }
+ else
+ {
+ warn "Cannot cd to $path:$!"
+ }
+# print "$path\n";
+ return $path;
+}
+
+sub AddDir
+{
+ my ($w,$dir) = @_;
+ my $path = '';
+ my $prefix = '';
+ my $first = 0;
+ my $name;
+ foreach $name (split m#/#,$dir)
+ {
+ $first++;
+ if ($name eq '')
+ {
+ next unless ($first == 1);
+ $path = '/';
+ $name = '/';
+ }
+ else
+ {
+ $path .= $prefix;
+ $path .= $name;
+ $prefix = '/';
+ }
+ unless ($w->info('exists' => $path))
+ {
+# print "Add $path\n";
+ $w->add($path,-image => $w->getimage('folder'), -text => $name);
+ }
+ }
+}
+
+sub choose_image
+{
+ my ($w,$path) = @_;
+ return 'folder' if (-d $path);
+ return 'srcfile' if ($path =~ /\.[ch]$/);
+ return 'textfile' if (-T $path);
+ return 'file';
+}
+
+
+sub directory
+{
+ my ($w,$key,$val) = @_;
+ my $h = DirHandle->new($val);
+ $w->AddDir($val = fullpath($val));
+ my $f;
+ $w->entryconfigure($val,-image => $w->getimage('act_fold'));
+ foreach $f (sort $h->read)
+ {
+ next if ($f =~ /^\.+$/);
+ my $path = "$val/$f";
+ unless ($w->info('exists' => $path))
+ {
+ my $image = $w->getimage($w->choose_image($path));
+ $w->add($path,-image => $image, -text => $f);
+ }
+ }
+ $h->close;
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop.pm
new file mode 100644
index 00000000000..46bbacddc26
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop.pm
@@ -0,0 +1,332 @@
+package Tk::DragDrop;
+require Tk::DragDrop::Common;
+require Tk::Toplevel;
+require Tk::Label;
+
+use vars qw($VERSION);
+$VERSION = '4.015'; # sprintf '4.%03d', q$Revision: #14 $ =~ /\D(\d+)\s*$/;
+
+use base qw(Tk::DragDrop::Common Tk::Toplevel);
+
+# This is a little tricky, ISA says 'Toplevel' but we
+# define a Tk_cmd to actually build a 'Label', then
+# use wmRelease in Populate to make it a toplevel.
+
+my $useWmRelease = Tk::Wm->can('release'); # ($^O ne 'MSWin32');
+
+sub Tk_cmd { ($useWmRelease) ? \&Tk::label : \&Tk::toplevel }
+
+Construct Tk::Widget 'DragDrop';
+
+use strict;
+use vars qw(%type @types);
+use Carp;
+
+
+# There is a snag with having a token window and moving to
+# exactly where cursor is - the cursor is "inside" the token
+# window - hence it is not "inside" the dropsite window
+# so we offset X,Y by OFFSET pixels.
+sub OFFSET () {3}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Map>','Mapped');
+ $mw->bind($class,'<Any-KeyPress>','Done');
+ $mw->bind($class,'<Any-ButtonRelease>','Drop');
+ $mw->bind($class,'<Any-Motion>','Drag');
+ return $class;
+}
+
+sub Populate
+{
+ my ($token,$args) = @_;
+ my $parent = $token->parent;
+ if ($useWmRelease)
+ {
+ $token->wmRelease;
+ $token->ConfigSpecs(-text => ['SELF','text','Text',$parent->class]);
+ }
+ else
+ {
+ my $lab = $token->Label->pack(-expand => 1, -fill => 'both');
+ bless $lab,ref($token);
+ $lab->bindtags([ref($token), $lab, $token, 'all']);
+ $token->ConfigSpecs(-text => [$lab,'text','Text',$parent->class],
+ DEFAULT => [$lab]);
+ }
+ $token->withdraw;
+ $token->overrideredirect(1);
+ $token->ConfigSpecs(-sitetypes => ['METHOD','siteTypes','SiteTypes',undef],
+ -startcommand => ['CALLBACK',undef,undef,undef],
+ -endcommand => ['CALLBACK',undef,undef,undef],
+ -predropcommand => ['CALLBACK',undef,undef,undef],
+ -postdropcommand => ['CALLBACK',undef,undef,undef],
+ -delta => ['PASSIVE','delta','Delta',10],
+ -cursor => ['SELF','cursor','Cursor','hand2'],
+ -handlers => ['SETMETHOD','handlers','Handlers',[[[$token,'SendText']]]],
+ -selection => ['SETMETHOD','selection','Selection','XdndSelection'],
+ -event => ['SETMETHOD','event','Event','<B1-Motion>']
+ );
+ $token->{InstallHandlers} = 0;
+ $args->{-borderwidth} = 3;
+ $args->{-relief} = 'flat';
+ $args->{-takefocus} = 1;
+}
+
+sub sitetypes
+{
+ my ($w,$val) = @_;
+ confess "Not a widget $w" unless (ref $w);
+ my $var = \$w->{Configure}{'-sitetypes'};
+ if (@_ > 1)
+ {
+ if (defined $val)
+ {
+ $val = [$val] unless (ref $val);
+ my $type;
+ foreach $type (@$val)
+ {
+ Tk::DragDrop->import($type);
+ }
+ }
+ $$var = $val;
+ }
+ return (defined $$var) ? $$var : \@types;
+}
+
+sub SendText
+{
+ my ($w,$offset,$max) = @_;
+ my $s = substr($w->cget('-text'),$offset);
+ $s = substr($s,0,$max) if (length($s) > $max);
+ return $s;
+}
+
+sub handlers
+{
+ my ($token,$opt,$value) = @_;
+ $token->{InstallHandlers} = (defined($value) && @$value);
+ $token->{'handlers'} = $value;
+}
+
+sub selection
+{
+ my ($token,$opt,$value) = @_;
+ my $handlers = $token->{'handlers'};
+ $token->{InstallHandlers} = (defined($handlers) && @$handlers);
+}
+
+sub event
+{
+ my ($w,$opt,$value) = @_;
+ # delete old bindings
+ $w->parent->Tk::bind($value,[$w,'StartDrag']);
+}
+
+#
+
+sub FindSite
+{
+ my ($token,$X,$Y,$e) = @_;
+ my $site;
+ my $types = $token->sitetypes;
+ if (defined $types && @$types)
+ {
+ foreach my $type (@$types)
+ {
+ my $class = $type{$type};
+ last if (defined($class) && ($site = $class->FindSite($token,$X,$Y)));
+ }
+ }
+ else
+ {
+ warn 'No sitetypes';
+ }
+ my $new = $site || 'undef';
+ my $over = $token->{'Over'};
+ if ($over)
+ {
+ if (!$over->Match($site))
+ {
+ $over->Leave($token,$e);
+ delete $token->{'Over'};
+ }
+ }
+ if ($site)
+ {
+ unless ($token->{'Over'})
+ {
+ $site->Enter($token,$e);
+ $token->{'Over'} = $site;
+ }
+ $site->Motion($token,$e) if (defined $site)
+ }
+ return $site;
+}
+
+sub Mapped
+{
+ my ($token) = @_;
+ my $e = $token->parent->XEvent;
+ $token = $token->toplevel;
+ $token->grabGlobal;
+ $token->focus;
+ if (defined $e)
+ {
+ my $X = $e->X;
+ my $Y = $e->Y;
+ $token->MoveToplevelWindow($X+OFFSET,$Y+OFFSET);
+ $token->NewDrag;
+ $token->FindSite($X,$Y,$e);
+ }
+}
+
+sub NewDrag
+{
+ my ($token) = @_;
+ my $types = $token->sitetypes;
+ if (defined $types && @$types)
+ {
+ my $type;
+ foreach $type (@$types)
+ {
+ my $class = $type{$type};
+ if (defined $class)
+ {
+ $class->NewDrag($token);
+ }
+ }
+ }
+}
+
+sub Drag
+{
+ my $token = shift;
+ my $e = $token->XEvent;
+ my $X = $e->X;
+ my $Y = $e->Y;
+ $token = $token->toplevel;
+ $token->MoveToplevelWindow($X+OFFSET,$Y+OFFSET);
+ $token->FindSite($X,$Y,$e);
+}
+
+sub Done
+{
+ my $token = shift;
+ my $e = $token->XEvent;
+ $token = $token->toplevel;
+ my $over = delete $token->{'Over'};
+ $over->Leave($token,$e) if (defined $over);
+ my $w = $token->parent;
+ eval {local $SIG{__DIE__}; $token->grabRelease };
+ $token->withdraw;
+ delete $w->{'Dragging'};
+ $w->update;
+}
+
+sub AcceptDrop
+{
+ my ($token) = @_;
+ $token->configure(-relief => 'sunken');
+ $token->{'Accepted'} = 1;
+}
+
+sub RejectDrop
+{
+ my ($token) = @_;
+ $token->configure(-relief => 'flat');
+ $token->{'Accepted'} = 0;
+}
+
+sub HandleLoose
+{
+ my ($w,$seln) = @_;
+ return '';
+}
+
+sub InstallHandlers
+{
+ my ($token,$seln) = @_;
+ my $w = $token->parent;
+ $token->configure('-selection' => $seln) if $seln;
+ $seln = $token->cget('-selection');
+ if ($token->{InstallHandlers})
+ {
+ foreach my $h (@{$token->cget('-handlers')})
+ {
+ $w->SelectionHandle('-selection' => $seln,@$h);
+ }
+ $token->{InstallHandlers} = 0;
+ }
+ if (!$w->IS($w->SelectionOwner('-selection'=>$seln)))
+ {
+ $w->SelectionOwn('-selection' => $seln, -command => [\&HandleLoose,$w,$seln]);
+ }
+}
+
+sub Drop
+{
+ my $ewin = shift;
+ my $e = $ewin->XEvent;
+ my $token = $ewin->toplevel;
+ my $site = $token->FindSite($e->X,$e->Y,$e);
+ Tk::catch { $token->grabRelease };
+ if (defined $site)
+ {
+ my $seln = $token->cget('-selection');
+ unless ($token->Callback(-predropcommand => $seln, $site))
+ {
+# XXX This is ugly if the user restarts a drag within the 2000 ms:
+# my $id = $token->after(2000,[$token,'Done']);
+ my $w = $token->parent;
+ $token->InstallHandlers;
+ $site->Drop($token,$seln,$e);
+ $token->Callback(-postdropcommand => $seln);
+ $token->Done;
+ }
+ }
+ else
+ {
+ $token->Done;
+ }
+ $token->Callback('-endcommand');
+}
+
+sub StartDrag
+{
+ my $token = shift;
+ my $w = $token->parent;
+ unless ($w->{'Dragging'})
+ {
+ my $e = $w->XEvent;
+ my $X = $e->X;
+ my $Y = $e->Y;
+ my $was = $token->{'XY'};
+ if ($was)
+ {
+ my $dx = $was->[0] - $X;
+ my $dy = $was->[1] - $Y;
+ if (sqrt($dx*$dx+$dy*$dy) > $token->cget('-delta'))
+ {
+ unless ($token->Callback('-startcommand',$token,$e))
+ {
+ delete $token->{'XY'};
+ $w->{'Dragging'} = $token;
+ $token->MoveToplevelWindow($X+OFFSET,$Y+OFFSET);
+ $token->raise;
+ $token->deiconify;
+ $token->FindSite($X,$Y,$e);
+ }
+ }
+ }
+ else
+ {
+ $token->{'XY'} = [$X,$Y];
+ }
+ }
+}
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/Common.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Common.pm
new file mode 100644
index 00000000000..de28ce60e8b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Common.pm
@@ -0,0 +1,61 @@
+package Tk::DragDrop::Common;
+
+use strict;
+use Carp;
+
+no warnings 'once'; # cease warning about Tk::DragDrop::type
+
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/DragDrop/DragDrop/Common.pm#4 $
+
+sub Type
+{
+ my ($base,$name,$class) = @_;
+ no strict 'refs';
+ my $hash = \%{"${base}::type"};
+ my $array = \@{"${base}::types"};
+ unless (exists $hash->{$name})
+ {
+ push(@$array,$name);
+ $class = (caller(0))[0] unless (@_ > 2);
+ $hash->{$name} = $class;
+ # confess "Strange class $class for $base/$name" unless ($class =~ /^Tk/);
+ # print "$base $name is ",$class,"\n";
+ }
+}
+
+sub import
+{
+ my $class = shift;
+ no strict 'refs';
+ my $types = \%{"${class}::type"};
+ while (@_)
+ {
+ my $type = shift;
+ unless (exists $types->{$type})
+ {
+ if ($type eq 'Local')
+ {
+ $class->Type($type,$class);
+ }
+ else
+ {
+ my ($kind) = $class =~ /([A-Z][a-z]+)$/;
+ my $file = Tk->findINC("DragDrop/${type}${kind}.pm");
+ if (defined $file)
+ {
+ # print "Loading $file\n";
+ require $file;
+ }
+ else
+ {
+ croak "Cannot find ${type}${kind}";
+ }
+ }
+ }
+ }
+}
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/LocalDrop.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/LocalDrop.pm
new file mode 100644
index 00000000000..0f5028ae64c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/LocalDrop.pm
@@ -0,0 +1,61 @@
+package Tk::DragDrop::Local;
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/DragDrop/DragDrop/LocalDrop.pm#4 $
+
+use base qw(Tk::DragDrop::Rect);
+require Tk::DragDrop;
+
+my @toplevels;
+
+Tk::DragDrop->Type('Local');
+
+sub XY
+{
+ my ($site,$event) = @_;
+ return ($event->X - $site->X,$event->Y - $site->Y);
+}
+
+sub Apply
+{
+ my $site = shift;
+ my $name = shift;
+ my $cb = $site->{$name};
+ if ($cb)
+ {
+ my $event = shift;
+ $cb->Call(@_,$site->XY($event));
+ }
+}
+
+sub Drop
+{
+ my ($site,$token,$seln,$event) = @_;
+ $site->Apply(-dropcommand => $event, $seln);
+ $site->Apply(-entercommand => $event, 0);
+ $token->Done;
+}
+
+sub Enter
+{
+ my ($site,$token,$event) = @_;
+ $token->AcceptDrop;
+ $site->Apply(-entercommand => $event, 1);
+}
+
+sub Leave
+{
+ my ($site,$token,$event) = @_;
+ $token->RejectDrop;
+ $site->Apply(-entercommand => $event, 0);
+}
+
+sub Motion
+{
+ my ($site,$token,$event) = @_;
+ $site->Apply(-motioncommand => $event);
+}
+
+1;
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/Rect.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Rect.pm
new file mode 100644
index 00000000000..0e62e35a5bf
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Rect.pm
@@ -0,0 +1,110 @@
+package Tk::DragDrop::Rect;
+use strict;
+use Carp;
+
+# Proxy class which represents sites to the dropping side
+
+use vars qw($VERSION);
+$VERSION = '4.012'; # sprintf '4.%03d', q$Revision: #11 $ =~ /\D(\d+)\s*$/;
+
+# Some default methods when called site side
+# XIDs and viewable-ness from widget
+
+# XID of ancestor
+sub ancestor { ${shift->widget->toplevel->WindowId} }
+
+# XID of site window
+sub win { ${shift->widget->WindowId} }
+
+# Is site window mapped
+sub viewable { shift->widget->viewable }
+
+sub Over
+{
+ my ($site,$X,$Y) = @_;
+
+ my $x = $site->X;
+ my $y = $site->Y;
+ my $w = $site->width;
+ my $h = $site->height;
+ my $val = ($X >= $x && $X < ($x + $w) && $Y >= $y && $Y < ($y + $h));
+
+ return 0 unless $val;
+
+ my $widget = $site->widget;
+
+ # Now XTranslateCoords from root window to site window's
+ # ancestor. Ancestors final descendant should be the site window.
+ # Like $win->containing but avoids a problem that dropper's "token"
+ # window may be the toplevel (child of root) that contains X,Y
+ # so if that is in another application ->containing does not
+ # give us a window.
+ my $id = $site->ancestor;
+ while (1)
+ {
+ my $cid = $widget->PointToWindow($X,$Y,$id);
+ last unless $cid;
+ $id = $cid;
+ }
+ return ($id == $site->win);
+}
+
+sub FindSite
+{
+ my ($class,$widget,$X,$Y) = @_;
+ foreach my $site ($class->SiteList($widget))
+ {
+ return $site if ($site->viewable && $site->Over($X,$Y));
+ }
+ return undef;
+}
+
+sub NewDrag
+{
+ my ($class,$widget) = @_;
+}
+
+sub Match
+{
+ my ($site,$other) = @_;
+ return 0 unless (defined $other);
+ return 1 if ($site == $other);
+ return 0 unless (ref($site) eq ref($other));
+ for ("$site")
+ {
+ if (/ARRAY/)
+ {
+ my $i;
+ return 0 unless (@$site == @$other);
+ for ($i = 0; $i < @$site; $i++)
+ {
+ return 0 unless ($site->[$i] == $other->[$i]);
+ }
+ return 1;
+ }
+ elsif (/SCALAR/)
+ {
+ return $site == $other;
+ }
+ elsif (/HASH/)
+ {
+ my $key;
+ foreach $key (keys %$site)
+ {
+ return 0 unless exists $other->{$key};
+ return 0 unless ($other->{$key} eq $site->{$key});
+ }
+ foreach $key (keys %$other)
+ {
+ return 0 unless exists $site->{$key};
+ return 0 unless ($other->{$key} eq $site->{$key});
+ }
+ return 1;
+ }
+ return 0;
+ }
+ return 0;
+}
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunConst.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunConst.pm
new file mode 100644
index 00000000000..66325466e68
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunConst.pm
@@ -0,0 +1,34 @@
+package Tk::DragDrop::SunConst;
+require Exporter;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/DragDrop/DragDrop/SunConst.pm#4 $
+
+use base qw(Exporter);
+
+@EXPORT = qw(_enter _leave _motion
+ ENTERLEAVE MOTION DEFAULT_SITE
+ MOVE_FLAG ACK_FLAG TRANSIENT_FLAG FORWARDED_FLAG
+ );
+
+# Event types
+sub _enter () {7};
+sub _leave () {8};
+sub _motion () {6};
+
+# Site flags
+
+sub ENTERLEAVE () {1<<0}
+sub MOTION () {1<<1}
+sub DEFAULT_SITE () {1<<2}
+
+# Trigger flags
+sub MOVE_FLAG () {1<<0}
+sub ACK_FLAG () {1<<1}
+sub TRANSIENT_FLAG () {1<<2}
+sub FORWARDED_FLAG () {1<<3}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunDrop.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunDrop.pm
new file mode 100644
index 00000000000..87489fed9a8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunDrop.pm
@@ -0,0 +1,200 @@
+package Tk::DragDrop::SunDrop;
+require Tk::DragDrop::Rect;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # sprintf '4.%03d', q$Revision: #5 $ =~ /\D(\d+)\s*$/;
+
+use base qw(Tk::DragDrop::Rect);
+use strict;
+use Tk::DragDrop::SunConst;
+
+Tk::DragDrop->Type('Sun');
+
+BEGIN
+ {
+ # Define the Rect API as members of the array
+ my @fields = qw(name win X Y width height flags ancestor widget);
+ my $i = 0;
+ no strict 'refs';
+ for ($i=0; $i < @fields; $i++)
+ {
+ my $j = $i;
+ *{"$fields[$i]"} = sub { shift->[$j] };
+ }
+ }
+
+
+sub Preview
+{
+ my ($site,$token,$e,$kind,$flags) = (@_);
+ $token->BackTrace('No flags') unless defined $flags;
+ my $sflags = $site->flags;
+ return if ($kind == _motion && !($sflags & MOTION));
+ return if ($kind != _motion && !($sflags & ENTERLEAVE));
+ my $data = pack('LLSSLL',$kind,$e->t,$e->X,$e->Y,$site->name,$flags);
+ $token->SendClientMessage('_SUN_DRAGDROP_PREVIEW',$site->win,32,$data);
+}
+
+sub Enter
+{
+ my ($site,$token,$e) = @_;
+ $token->AcceptDrop;
+ $site->Preview($token,$e,_enter,0);
+}
+
+sub Leave
+{
+ my ($site,$token,$e) = @_;
+ $token->RejectDrop;
+ $site->Preview($token,$e,_leave,0);
+}
+
+sub Motion
+{
+ my ($site,$token,$e) = @_;
+ $site->Preview($token,$e,_motion,0);
+}
+
+sub HandleDone
+{
+ my ($token,$seln,$offset,$max) = @_;
+ $token->Done;
+ return '';
+}
+
+sub HandleAck
+{
+ my ($w,$seln,$offset,$max) = @_;
+ return '';
+}
+
+sub HandleItem
+{
+ my ($w,$seln,$offset,$max) = @_;
+ return undef;
+}
+
+sub HandleCount
+{
+ my ($w,$seln,$offset,$max) = @_;
+ return 1;
+}
+
+sub Drop
+{
+ my ($site,$token,$seln,$e) = @_;
+ my $w = $token->parent;
+ $w->SelectionHandle('-selection'=>$seln,'-type'=>'_SUN_DRAGDROP_ACK',[\&HandleAck,$token,$seln]);
+ $w->SelectionHandle('-selection'=>$seln,'-type'=>'_SUN_DRAGDROP_DONE',[\&HandleDone,$token,$seln]);
+ my $atom = $w->InternAtom($seln);
+ my $flags = ACK_FLAG | TRANSIENT_FLAG;
+ my $data = pack('LLSSLL',$atom,$e->t,$e->X,$e->Y,$site->name,$flags);
+ $w->SendClientMessage('_SUN_DRAGDROP_TRIGGER',$site->win,32,$data);
+}
+
+sub FindSite
+{
+ my ($class,$token,$X,$Y) = @_;
+ $token->{'SunDD'} = [] unless exists $token->{'SunDD'};
+ my $site = $class->SUPER::FindSite($token,$X,$Y);
+ if (!defined $site)
+ {
+ my $id = $token->PointToWindow($X,$Y);
+ while ($id)
+ {
+ my @prop;
+ Tk::catch { @prop = $token->property('get','_SUN_DRAGDROP_INTEREST', $id) };
+ if (!$@ && shift(@prop) eq '_SUN_DRAGDROP_INTEREST' && shift(@prop) == 0)
+ {
+ # This is a "toplevel" which has some sites associated with it.
+ my ($bx,$by) = $token->WindowXY($id);
+ $token->{'SunDDSeen'} = {} unless exists $token->{'SunDDSeen'};
+ return $site if $token->{'SunDDSeen'}{$id};
+ $token->{'SunDDSeen'}{$id} = 1;
+ my $sites = $token->{'SunDD'};
+ my $count = shift(@prop);
+ while (@prop && $count-- > 0)
+ {
+ my ($xid,$sn,$flags,$kind,$n) = splice(@prop,0,5);
+ if ($kind != 0)
+ {
+ warn "Don't understand site type $kind";
+ last;
+ }
+ while (@prop >= 4 && $n-- > 0)
+ {
+ my ($x,$y,$w,$h) = splice(@prop,0,4);
+ push(@$sites,bless [$sn,$xid,$x+$bx,$y+$by,$w,$h,$flags,$id,$token],$class);
+ }
+ }
+ return $class->SUPER::FindSite($token,$X,$Y);
+ }
+ $id = $token->PointToWindow($X,$Y,$id)
+ }
+ }
+ return $site;
+}
+
+my $busy = 0;
+
+sub NewDrag
+{
+ my ($class,$token) = @_;
+ delete $token->{'SunDD'} unless $busy;
+ delete $token->{'SunDDSeen'};
+}
+
+sub SiteList
+{
+ my ($class,$token) = @_;
+ return @{$token->{'SunDD'}};
+}
+
+1;
+__END__
+
+# this code is obsolete now that we look at properties ourselves
+# which means we don't need dropsite manager running
+# On Sun's running OpenLook the window manager or dropsite mananger
+# watches for and caches site info in a special selection
+# This code got sites from that
+#
+
+sub SiteList
+{
+ my ($class,$token) = @_;
+ unless (1 || $busy || exists $token->{'SunDD'})
+ {
+ Carp::confess('Already doing it!') if ($busy++);
+ my @data = ();
+ my @sites = ();
+ my $mw = $token->MainWindow;
+ $token->{'SunDD'} = \@sites;
+ Tk::catch {
+ @data = $mw->SelectionGet( '-selection'=>'_SUN_DRAGDROP_DSDM', '_SUN_DRAGDROP_SITE_RECTS');
+ };
+ if ($@)
+ {
+ $token->configure('-cursor'=>'hand2');
+ $token->grab(-global);
+ }
+ else
+ {
+ while (@data)
+ {
+ my $version = shift(@data);
+ if ($version != 0)
+ {
+ warn "Unexpected site version $version";
+ last;
+ }
+ push(@sites,bless [splice(@data,0,7)],$class);
+ }
+ }
+ $busy--;
+ }
+ return @{$token->{'SunDD'}};
+}
+
+1;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunSite.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunSite.pm
new file mode 100644
index 00000000000..ac6f7488a7a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/SunSite.pm
@@ -0,0 +1,107 @@
+package Tk::DragDrop::SunSite;
+require Tk::DropSite;
+
+use vars qw($VERSION);
+$VERSION = '4.007'; # sprintf '4.%03d', q$Revision: #6 $ =~ /\D(\d+)\s*$/;
+
+use Tk::DragDrop::SunConst;
+use base qw(Tk::DropSite);
+use strict;
+
+Tk::DropSite->Type('Sun');
+
+sub SunDrop
+{
+ my ($w,$site) = @_;
+ my $e = $w->XEvent;
+ my ($seln,$t,$x,$y,$id,$flags) = unpack('LLSSLL',$e->A);
+ $w->MakeAtom($seln);
+ if ($flags & &ACK_FLAG)
+ {
+ Tk::catch { $w->SelectionGet('-selection'=>$seln,'_SUN_DRAGDROP_ACK') };
+ }
+ my @targ = $w->SelectionGet(-selection => $seln,'TARGETS');
+ $site->Apply(-dropcommand => $x, $y, $seln, SunDrop => \@targ);
+ if ($flags & &TRANSIENT_FLAG)
+ {
+ Tk::catch { $w->SelectionGet('-selection'=>$seln,'_SUN_DRAGDROP_DONE') };
+ }
+ $w->configure('-relief' => $w->{'_DND_RELIEF_'}) if (defined $w->{'_DND_RELIEF_'});
+ $site->Apply(-entercommand => $x, $y, 0);
+}
+
+sub SunPreview
+{
+ my ($w,$site) = @_;
+ my $event = $w->XEvent;
+ my ($kind,$t,$x,$y,$id,$flags) = unpack('LLSSLL',$event->A);
+ $x -= $site->X;
+ $y -= $site->Y;
+ if ($kind == _enter)
+ {
+ $site->Callback(-entercommand => 1, $x, $y);
+ }
+ elsif ($kind == _leave)
+ {
+ $site->Callback(-entercommand => 0, $x, $y);
+ }
+ elsif ($kind == _motion)
+ {
+ $site->Callback(-motioncommand => $x, $y);
+ }
+}
+
+sub InitSite
+{
+ my ($class,$site) = @_;
+ my $w = $site->widget;
+ $w->BindClientMessage('_SUN_DRAGDROP_TRIGGER',[\&SunDrop,$site]);
+ $w->BindClientMessage('_SUN_DRAGDROP_PREVIEW',[\&SunPreview,$site]);
+}
+
+sub NoteSites
+{
+ my ($class,$t,$sites) = @_;
+ my $count = @$sites;
+ my @data = (0,0);
+ my ($wrapper,$offset) = $t->wrapper;
+ if ($t->viewable)
+ {
+ my $s;
+ my $i = 0;
+ my @win;
+ my $bx = $t->rootx;
+ my $by = $t->rooty - $offset;
+ $t->MakeWindowExist;
+ foreach $s (@$sites)
+ {
+ my $w = $s->widget;
+ if ($w->viewable)
+ {
+ $w->MakeWindowExist;
+ $data[1]++;
+ push(@data,${$w->WindowId}); # XID
+ push(@data,$i++); # Our 'tag'
+ push(@data,ENTERLEAVE|MOTION); # Flags
+ push(@data,0); # Kind is 'rect'
+ push(@data,1); # Number of rects
+ push(@data,$s->X-$bx,$s->Y-$by,$s->width,$s->height); # The rect
+ }
+ }
+ }
+ if ($data[1])
+ {
+ $t->property('set',
+ '_SUN_DRAGDROP_INTEREST', # name
+ '_SUN_DRAGDROP_INTEREST', # type
+ 32, # format
+ \@data,$wrapper); # the data
+ }
+ else
+ {
+ $t->property('delete','_SUN_DRAGDROP_INTEREST',$wrapper);
+ }
+}
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Drop.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Drop.pm
new file mode 100644
index 00000000000..08a4656ecce
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Drop.pm
@@ -0,0 +1,8 @@
+package Tk::DragDrop::Win32Drop;
+# Dummy placeholder for symetry
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/DragDrop/Win32Site/Win32Drop.pm#4 $
+
+use Tk ();
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Site.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Site.pm
new file mode 100644
index 00000000000..ca9029dc8b6
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/Win32Site.pm
@@ -0,0 +1,50 @@
+package Tk::DragDrop::Win32Site;
+
+use vars qw($VERSION);
+$VERSION = '4.009'; # sprintf '4.%03d', q$Revision: #8 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw($XS_VERSION);
+require DynaLoader;
+require Tk::DropSite;
+
+use base qw(Tk::DropSite DynaLoader);
+
+bootstrap Tk::DragDrop::Win32Site;
+
+use strict;
+
+Tk::DropSite->Type('Win32');
+
+sub WM_DROPFILES () {563}
+
+sub InitSite
+{
+ my ($class,$site) = @_;
+ my $w = $site->widget;
+ $w->BindClientMessage(WM_DROPFILES,[\&Win32Drop,$site]);
+ DragAcceptFiles($w,1);
+}
+
+sub Win32Drop
+{
+ # print join(',',@_),"\n";
+ my ($w,$site,$msg,$wParam,$lParam) = @_;
+ my ($x,$y,@files) = DropInfo($wParam);
+ my $cb = $site->{'-dropcommand'};
+ $site->Apply(-entercommand => $x, $y, 1);
+ if ($cb)
+ {
+ foreach my $file (@files)
+ {
+ # print "$file @ $x,$y\n";
+ $w->clipboardClear;
+ $w->clipboardAppend('--',$file);
+ $cb->Call('CLIPBOARD',Win32Drop => ['STRING'],$x,$y);
+ }
+ }
+ $site->Apply(-entercommand => $x, $y, 0);
+ return 0;
+}
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDDrop.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDDrop.pm
new file mode 100644
index 00000000000..879874cea9d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDDrop.pm
@@ -0,0 +1,145 @@
+package Tk::DragDrop::XDNDDrop;
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.007'; # sprintf '4.%03d', q$Revision: #6 $ =~ /\D(\d+)\s*$/;
+use base qw(Tk::DragDrop::Rect);
+
+sub XDND_PROTOCOL_VERSION () { 4 }
+
+Tk::DragDrop->Type('XDND');
+
+sub NewDrag
+{
+ my ($class,$token) = @_;
+ $token->{$class} = {};
+}
+
+sub new
+{
+ my ($class,$token,$id,@prop) = @_;
+ my $ver = $token->InternAtom(shift(@prop));
+ # warn "XDND version $ver ".join(' ',@prop)."\n";
+ $ver = XDND_PROTOCOL_VERSION if $ver > XDND_PROTOCOL_VERSION;
+ my $site = bless { id => $id, token => $token, ver => $ver, state => 0, accept => \@prop}, $class;
+ my $w = $token->parent;
+ $w->BindClientMessage('XdndStatus',[$site => 'XdndStatus']);
+ $w->BindClientMessage('XdndFinished',[$site => 'XdndFinished']);
+ return $site;
+}
+
+sub Drop
+{
+ my ($site,$token,$seln,$e) = @_;
+ my $w = $token->parent;
+ my $data = pack('LLLLL',oct($w->id),0,$e->t,0,0);
+ $w->SendClientMessage('XdndDrop',$site->{id},32,$data);
+}
+
+sub FindSite
+{
+ my ($class,$token,$X,$Y) = @_;
+ my $id = $token->PointToWindow($X,$Y);
+ while ($id)
+ {
+ my @prop;
+ Tk::catch { @prop = $token->property('get','XdndAware', $id) };
+ if (!$@ && shift(@prop) eq 'ATOM')
+ {
+ my $hash = $token->{$class};
+ my $site = $hash->{$id};
+ if (!defined $site)
+ {
+ $site = $class->new($token,$id,@prop);
+ $hash->{$id} = $site;
+ }
+ return $site;
+ }
+ $id = $token->PointToWindow($X,$Y,$id)
+ }
+ return undef;
+}
+
+sub Enter
+{
+ my ($site,$token,$e) = @_;
+ my $w = $token->parent;
+ $token->InstallHandlers('XdndSelection');
+ my $seln = $token->cget('-selection');
+ my @targets = grep(!/^(TARGETS|MULTIPLE|TIMESTAMP)$/,reverse($token->SelectionGet('-selection'=> 'XdndSelection','TARGETS')));
+ # print join(' ',@targets),"\n";
+ my $flags = ($site->{ver} << 24);
+ my @atarg = map($token->InternAtom($_),@targets);
+ my $ntarg = @atarg;
+ if ($ntarg > 3)
+ {
+ $flags |= 1;
+ $w->property('set','XdndTypeList','ATOM',32,\@atarg);
+ splice(@atarg,3);
+ }
+ else
+ {
+ splice(@atarg,$ntarg,(0 x 3 - $ntarg));
+ }
+ unshift(@atarg,oct($w->id),$flags);
+ # print join(' ',map(sprintf("%08X",$_),@atarg)),"\n";
+ my $data = pack('LLLLL',@atarg);
+ $w->SendClientMessage('XdndEnter',$site->{id},32,$data);
+}
+
+sub Leave
+{
+ my ($site,$token,$e) = @_;
+ my $w = $token->parent;
+ my $data = pack('LLLLL',oct($w->id), 0, 0, 0, 0);
+ $w->SendClientMessage('XdndLeave',$site->{id},32,$data);
+}
+
+sub Motion
+{
+ my ($site,$token,$e) = @_;
+ my $X = $e->X;
+ my $Y = $e->Y;
+ my $w = $token->parent;
+ my $action = $token->InternAtom($site->{'action'} || 'XdndActionCopy');
+ my @atarg = (oct($w->id),0,($X << 16) | $Y, $e->t, $action);
+ # print join(' ',map(sprintf("%08X",$_),@atarg)),"\n";
+ my $data = pack('LLLLL',@atarg);
+ $w->SendClientMessage('XdndPosition',$site->{id},32,$data);
+}
+
+sub XdndFinished
+{
+ my ($site) = @_;
+ my $token = $site->{token};
+ # printf "XdndFinished $site\n",
+ $token->Done;
+}
+
+sub XdndStatus
+{
+ my ($site) = @_;
+ my $token = $site->{token};
+ my $w = $token->parent;
+ my $event = $w->XEvent;
+ my ($tid,$flags,$xy,$wh,$action) = unpack('LLLLL',$event->A);
+ $action = $w->GetAtomName($action) if $action;
+ $site->{flags} = $flags;
+ $site->{'X'} = $xy >> 16;
+ $site->{'Y'} = $xy & 0xFFFF;
+ $site->{'width'} = $wh >> 16;
+ $site->{'height'} = $wh & 0xFFFF;
+ #printf "XdndStatus $site targ=%x flags=%08X x=%d y=%d w=%d h=%d a=%s\n",
+ # $tid,$flags,$xy >> 16, $xy & 0xFFFF, $wh >> 16, $wh & 0xFFFF,$action;
+ if ($flags & 1)
+ {
+ $token->AcceptDrop;
+ }
+ else
+ {
+ $token->RejectDrop;
+ }
+}
+
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDSite.pm b/Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDSite.pm
new file mode 100644
index 00000000000..9661b009f9d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DragDrop/XDNDSite.pm
@@ -0,0 +1,159 @@
+package Tk::DragDrop::XDNDSite;
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.007'; # sprintf '4.%03d', q$Revision: #6 $ =~ /\D(\d+)\s*$/;
+use base qw(Tk::DropSite);
+
+sub XDND_PROTOCOL_VERSION () { 4 }
+
+Tk::DropSite->Type('XDND');
+
+sub InitSite
+{my ($class,$site) = @_;
+ my $w = $site->widget;
+}
+
+sub XdndEnter
+{
+ my ($t,$sites) = @_;
+ my $event = $t->XEvent;
+ my ($src,$flags,@types) = unpack('LLLLL',$event->A);
+ my $ver = ($flags >> 24) & 0xFF;
+ if ($flags & 1)
+ {
+ my @prop;
+ Tk::catch { @prop = $t->property('get','XdndTypeList',$src) };
+ @types = @prop if (!$@ && shift(@prop) eq 'ATOM');
+ }
+ else
+ {
+ $t->MakeAtom(@types);
+ }
+ # print "XdndEnter $src $ver @types\n";
+ $t->{"XDND$src"} = { ver => $ver, types => \@types };
+}
+
+sub XdndLeave
+{
+ my ($t,$sites) = @_;
+ my $event = $t->XEvent;
+ my ($src,$flags,@types) = unpack('LLLLL',$event->A);
+ # print "XdndLeave $src\n";
+ my $info = $t->{"XDND$src"};
+ if ($info)
+ {
+ my $over = $info->{site};
+ if ($over)
+ {
+ my $X = $info->{X};
+ my $Y = $info->{Y};
+ $over->Apply(-entercommand => $X, $Y, 0)
+ }
+ }
+ delete $t->{"XDND$src"};
+}
+
+sub XdndPosition
+{
+ my ($t,$sites) = @_;
+ my $event = $t->XEvent;
+ my ($src,$flags,$xy,$time,$action) = unpack('LLLLL',$event->A);
+ $t->MakeAtom($action);
+ my $X = $xy >> 16;
+ my $Y = $xy & 0xFFFF;
+ my $info = $t->{"XDND$src"};
+ $info->{X} = $X;
+ $info->{Y} = $Y;
+ $info->{action} = $action;
+ $info->{t} = $time;
+ my ($id) = $t->wrapper;
+ my $sxy = 0;
+ my $swh = 0;
+ my $sflags = 0;
+ my $saction = 0;
+ my $over = $info->{site};
+ foreach my $site (@$sites)
+ {
+ if ($site->Over($X,$Y))
+ {
+ $sxy = ($site->X << 16) | $site->Y;
+ $swh = ($site->width << 16) | $site->height;
+ $saction = $action;
+ $sflags |= 1;
+ if ($over)
+ {
+ if ($over == $site)
+ {
+ $site->Apply(-motioncommand => $X, $Y);
+ }
+ else
+ {
+ $over->Apply(-entercommand => $X, $Y, 0);
+ $site->Apply(-entercommand => $X, $Y, 1);
+ }
+ }
+ else
+ {
+ $site->Apply(-entercommand => $X, $Y, 1);
+ }
+ $info->{site} = $site;
+ last;
+ }
+ }
+ unless ($sflags & 1)
+ {
+ if ($over)
+ {
+ $over->Apply(-entercommand => $X, $Y, 0)
+ }
+ delete $info->{site};
+ }
+ my $data = pack('LLLLL',$id,$sflags,$sxy,$swh,$action);
+ $t->SendClientMessage('XdndStatus',$src,32,$data);
+}
+
+sub XdndDrop
+{
+ my ($t,$sites) = @_;
+ my $event = $t->XEvent;
+ my ($src,$flags,$time,$res1,$res2) = unpack('LLLLL',$event->A);
+ my $info = $t->{"XDND$src"};
+ my $sflags = 0;
+ my $action = 0;
+ if ($info)
+ {
+ $info->{t} = $time;
+ my $site = $info->{'site'};
+ if ($site)
+ {
+ my $X = $info->{'X'};
+ my $Y = $info->{'Y'};
+ $action = $info->{action};
+ $site->Apply(-dropcommand => $X, $Y, 'XdndSelection',$action,$info->{types});
+ $site->Apply(-entercommand => $X, $Y, 0);
+ }
+ }
+ my ($id) = $t->wrapper;
+ my $data = pack('LLLLL',$id,$sflags,$action,0,0);
+ $t->SendClientMessage('XdndFinished',$src,32,$data);
+}
+
+sub NoteSites
+{my ($class,$t,$sites) = @_;
+ my ($wrapper) = $t->wrapper;
+ if (@$sites)
+ {
+ $t->BindClientMessage('XdndLeave',[\&XdndLeave,$sites]);
+ $t->BindClientMessage('XdndEnter',[\&XdndEnter,$sites]);
+ $t->BindClientMessage('XdndPosition',[\&XdndPosition,$sites]);
+ $t->BindClientMessage('XdndDrop',[\&XdndDrop,$sites]);
+ $t->property('set','XdndAware','ATOM',32,[XDND_PROTOCOL_VERSION],$wrapper);
+ }
+ else
+ {
+ $t->property('delete','XdndAware',$wrapper);
+ }
+}
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/DropSite.pm b/Master/tlpkg/tlperl/lib/Tk/DropSite.pm
new file mode 100644
index 00000000000..71b70d12a68
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DropSite.pm
@@ -0,0 +1,257 @@
+package Tk::DropSite;
+require Tk::DragDrop::Common;
+require Tk::DragDrop::Rect;
+
+use vars qw($VERSION);
+$VERSION = '4.008'; # sprintf '4.%03d', q$Revision: #7 $ =~ /\D(\d+)\s*$/;
+
+use base qw(Tk::DragDrop::Common Tk::DragDrop::Rect);
+
+Construct Tk::Widget 'DropSite';
+
+use strict;
+use vars qw(%type @types);
+
+Tk::DragDrop->Tk::DragDrop::Common::Type('Local');
+
+my @toplevels;
+
+BEGIN
+{
+ # Are these really methods of Tk::DragDrop::Rect ?
+ no strict 'refs';
+ foreach my $name (qw(x y X Y width height widget))
+ {
+ my $key = $name;
+ *{"$key"} = sub { shift->{$key} };
+ }
+}
+
+# Dropping side API - really only here for Local drops
+# inheritance is a mess right now.
+
+sub NewDrag
+{
+ my ($class,$token) = @_;
+ # No need to clear cached sites we see live data
+}
+
+sub SiteList
+{
+ # this should be inheritable - so that receive side of XDND can re-use it.
+ my ($class,$widget) = @_;
+ my $t;
+ my @list;
+ foreach $t (@toplevels)
+ {
+ my $sites = $t->{'DropSites'};
+ if ($sites)
+ {
+ $sites = $sites->{'Local'};
+ push(@list,@{$sites}) if ($sites);
+ }
+ }
+ return @list;
+}
+
+sub Apply
+{
+ my $site = shift;
+ my $name = shift;
+ my $cb = $site->{$name};
+ if ($cb)
+ {
+ my $X = shift;
+ my $Y = shift;
+ $cb->Call(@_,$X - $site->X, $Y - $site->Y);
+ }
+}
+
+sub Drop
+{
+ my ($site,$token,$seln,$event) = @_;
+ my $X = $event->X;
+ my $Y = $event->Y;
+ my @targ = $token->SelectionGet(-selection => $seln,'TARGETS');
+ $site->Apply(-dropcommand => $X, $Y, $seln,'LocalDrop',\@targ);
+ $site->Apply(-entercommand => $X, $Y, 0);
+ $token->Done;
+}
+
+sub Enter
+{
+ my ($site,$token,$event) = @_;
+ $token->AcceptDrop;
+ $site->Apply(-entercommand => $event->X, $event->Y, 1);
+}
+
+sub Leave
+{
+ my ($site,$token,$event) = @_;
+ $token->RejectDrop;
+ $site->Apply(-entercommand => $event->X, $event->Y, 0);
+}
+
+sub Motion
+{
+ my ($site,$token,$event) = @_;
+ $site->Apply(-motioncommand => $event->X, $event->Y);
+}
+
+# This is receive side API.
+
+sub NoteSites
+{
+ my ($class,$t,$sites) = @_;
+ unless (grep($_ == $t,@toplevels))
+ {
+ $Tk::DragDrop::types{'Local'} = $class if (@$sites);
+ push(@toplevels,$t);
+ $t->OnDestroy(sub { @toplevels = grep($_ != $t,@toplevels) });
+ }
+}
+
+sub UpdateDropSites
+{
+ my ($t) = @_;
+ $t->{'DropUpdate'} = 0;
+ foreach my $type (@types)
+ {
+ my $sites = $t->{'DropSites'}->{$type};
+ if ($sites && @$sites)
+ {
+ my $class = $type{$type};
+ $class->NoteSites($t,$sites);
+ }
+ }
+}
+
+sub QueueDropSiteUpdate
+{
+ my $obj = shift;
+ my $class = ref($obj);
+ my $t = $obj->widget->toplevel;
+ unless ($t->{'DropUpdate'})
+ {
+ $t->{'DropUpdate'} = 1;
+ $t->afterIdle(sub { UpdateDropSites($t) });
+ }
+}
+
+sub delete
+{
+ my ($obj) = @_;
+ my $w = $obj->widget;
+ $w->bindtags([grep($_ ne $obj,$w->bindtags)]);
+ my $t = $w->toplevel;
+ foreach my $type (@{$obj->{'-droptypes'}})
+ {
+ my $a = $t->{'DropSites'}->{$type};
+ @$a = grep($_ ne $obj,@$a);
+ }
+ $obj->QueueDropSiteUpdate;
+}
+
+sub DropSiteUpdate
+{
+ # Note size of widget and arrange to update properties etc.
+ my $obj = shift;
+ my $w = $obj->widget;
+ $obj->{'x'} = $w->X;
+ $obj->{'y'} = $w->Y;
+ $obj->{'X'} = $w->rootx;
+ $obj->{'Y'} = $w->rooty;
+ $obj->{'width'} = $w->Width;
+ $obj->{'height'} = $w->Height;
+ $obj->QueueDropSiteUpdate;
+}
+
+sub TopSiteUpdate
+{
+ my ($t) = @_;
+ foreach my $type (@types)
+ {
+ my $sites = $t->{'DropSites'}->{$type};
+ if ($sites && @$sites)
+ {
+ my $site;
+ foreach $site (@$sites)
+ {
+ $site->DropSiteUpdate;
+ }
+ }
+ }
+}
+
+sub Callback
+{
+ my $obj = shift;
+ my $key = shift;
+ my $cb = $obj->{$key};
+ $cb->Call(@_) if (defined $cb);
+}
+
+sub InitSite
+{
+ my ($class,$site) = @_;
+ # Tk::DragDrop->Type('Local');
+}
+
+sub new
+{
+ my ($class,$w,%args) = @_;
+ my $t = $w->toplevel;
+ $args{'widget'} = $w;
+ if (exists $args{'-droptypes'})
+ {
+ # Convert single type to array-of-one
+ $args{'-droptypes'} = [$args{'-droptypes'}] unless (ref $args{'-droptypes'});
+ }
+ else
+ {
+ # Default to all known types.
+ $args{'-droptypes'} = \@types;
+ }
+ my ($key,$val);
+ while (($key,$val) = each %args)
+ {
+ if ($key =~ /command$/)
+ {
+ $val = Tk::Callback->new($val);
+ $args{$key} = $val;
+ }
+ }
+ my $obj = bless \%args,$class;
+ unless (exists $t->{'DropSites'})
+ {
+ $t->{'DropSites'} = {};
+ $t->{'DropUpdate'} = 0;
+ }
+ my $type;
+ foreach $type (@{$args{'-droptypes'}})
+ {
+ Tk::DropSite->import($type) unless (exists $type{$type});
+ my $class = $type{$type};
+ $class->InitSite($obj);
+ # Should this be indexed by type or class ?
+ unless (exists $t->{'DropSites'}->{$type})
+ {
+ $t->{'DropSites'}->{$type} = [];
+ }
+ push(@{$t->{'DropSites'}->{$type}},$obj);
+ }
+ $w->OnDestroy([$obj,'delete']);
+ $obj->DropSiteUpdate;
+ $w->bindtags([$w->bindtags,$obj]);
+ $w->Tk::bind($obj,'<Map>',[$obj,'DropSiteUpdate']);
+ $w->Tk::bind($obj,'<Unmap>',[$obj,'DropSiteUpdate']);
+ $w->Tk::bind($obj,'<Configure>',[$obj,'DropSiteUpdate']);
+ $t->Tk::bind($class,'<Configure>',[\&TopSiteUpdate,$t]);
+ unless (grep($_ eq $class,$t->bindtags))
+ {
+ $t->bindtags([$t->bindtags,$class]);
+ }
+ return $obj;
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/DropSite.pod b/Master/tlpkg/tlperl/lib/Tk/DropSite.pod
new file mode 100644
index 00000000000..8ae5a199fe3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DropSite.pod
@@ -0,0 +1,33 @@
+=head1 NAME
+
+Tk::DropSite - Receive side of Drag & Drop abstraction
+
+=for category User Interaction
+
+=head1 SYNOPSIS
+
+ use Tk::DropSite qw(...);
+ $widget->DropSite(-entercommand => ...,
+ -dropcommand => ...,
+ -motioncommand => ...,
+ -dropcommand => ...,
+ );
+
+=head1 DESCRIPTION
+
+C<DropSite> creates an object which represents a site on which things
+may be "Dropped".
+
+A DropSite provides the following methods:
+
+=over 4
+
+=item $site->Enter($token,$event)
+
+=item $site->Leave($token,$event)
+
+=item $site->Motion($token,$event)
+
+=item $site->Drop($token,$event)
+
+=back
diff --git a/Master/tlpkg/tlperl/lib/Tk/DummyEncode.pm b/Master/tlpkg/tlperl/lib/Tk/DummyEncode.pm
new file mode 100644
index 00000000000..5ead808405d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/DummyEncode.pm
@@ -0,0 +1,46 @@
+package Tk::DummyEncode;
+
+use vars qw($VERSION);
+$VERSION = '4.007'; # $Id: //depot/Tkutf8/Tk/DummyEncode.pm#7 $
+
+sub getEncoding
+{
+ my ($class,$name) = @_;
+ return undef unless ($name =~ /(iso8859-1|X11ControlChars)/);
+ my $pkg = $name;
+ $pkg =~ s/\W+/_/g;
+ return bless {Name => $name},$class.'::'.$pkg;
+}
+
+package Tk::DummyEncode::iso8859_1;
+sub encode
+{
+ my ($obj,$uni,$chk) = @_;
+ $_[1] = '' if $chk;
+ return $uni;
+}
+
+sub decode
+{
+ my ($obj,$byt,$chk) = @_;
+ $_[1]
+= '' if $chk;
+ return $byt;
+}
+
+package Tk::DummyEncode::X11ControlChars;
+sub encode
+{
+ my ($obj,$uni,$chk) = @_;
+ my $str = '';
+ foreach my $ch (split(//,$uni))
+ {
+ $str .= sprintf("\\x{%x}",ord($ch));
+ }
+ $_[1] = '' if $chk;
+ return $str;
+}
+
+1;
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/English.pm b/Master/tlpkg/tlperl/lib/Tk/English.pm
new file mode 100644
index 00000000000..de640376580
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/English.pm
@@ -0,0 +1,307 @@
+package Tk::English;
+
+require Exporter;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/English.pm#6 $
+
+use base qw(Exporter);
+
+# This file is generated automatically by pTk/makeenglish from Tk distribution.
+
+
+@EXPORT = qw(
+ &ABOVE &ACTIVATE &ACTIVE &ADD &ADDTAG &ADJUST &AFTER &ALL &ANCHOR &APPEND
+ &APPLY &ARROW1 &ARROW2 &ASCII &ASPECT &AUTO &BASELINE &BBOX &BEFORE &BELOW
+ &BEVEL &BIND &BITMAP &BLANK &BOTH &BOTTOM &BUTT &CANVASX &CANVASY &CAPTURE
+ &CASCADE &CENTER &CGET &CHAR &CHARS &CHECKBUTTON &CHILDREN &CLEAR &CLIENT
+ &CLONE &CLOSEST &COLOR &COLORMAPWINDOWS &COLUMN &COLUMNCONFIGURE &COMMAND
+ &COMPARE &CONFIGURE &COORDS &COPY &CREATE &CURRENT &CURSELECTION &DATA
+ &DCHARS &DEACTIVATE &DEBUG &DECORATIONS &DECREASING &DEFAULT &DEICONIFY
+ &DELETE &DELTA &DESELECT &DLINEINFO &DOWN &DRAGSITE &DRAGTO &DROPSITE &DTAG
+ &DUMP &ENCLOSED &END &ENTRY &ENTRYCGET &ENTRYCONFIGURE &EVAL &EXISTS &EXPAND
+ &FILL &FILLX &FILLY &FIND &FIRST &FLASH &FLAT &FOCUS &FOCUSMODEL &FOCUSNEXT
+ &FOCUSPREV &FORGET &FRACTION &FRAME &FROM &GENERATE &GEOMETRY &GEOMETRYINFO
+ &GET &GETTAGS &GRAVITY &GRAY &GRID &GROOVE &GROUP &HANDLE &HEAD &HEIGHT
+ &HIDDEN &HIDE &HORIZONTAL &ICONBITMAP &ICONIFY &ICONMASK &ICONNAME
+ &ICONPOSITION &ICONWINDOW &ICURSOR &IDENTIFY &IDLETASKS &IGNORE &IMAGE
+ &INCLUDES &INCREASING &INDEX &INFO &INSERT &INSIDE &INTEGER &INTERACTIVE
+ &INVOKE &ISMWMRUNNING &ITEM &ITEMCGET &ITEMCONFIGURE &LAST &LEFT &LINE
+ &LINECONFIGURE &LINEEND &LINES &LINESTART &LIST &LOCATION &LOWER &MARK &MAX
+ &MAXSIZE &MENUBAR &MINSIZE &MITER &MONOCHROME &MOVE &MOVETO &NAMES &NEAREST
+ &NEW &NEXT &NEXTRANGE &NONE &NORMAL &NOW &OFFSPRINGS &OUTSIDE &OVERLAPPING
+ &OVERRIDEREDIRECT &OWN &PADX &PADY &PAGECGET &PAGECONFIGURE &PAGES &PARENT
+ &PASSIVE &POSITION &POSITIONFROM &POST &POSTCASCADE &POSTSCRIPT &PRESENT
+ &PREV &PREVIOUS &PREVRANGE &PROGRAM &PROJECTING &PROPAGATE &PROTOCOL &PUT
+ &RADIOBUTTON &RAISE &RAISED &RANGE &RANGES &READ &READFILE &REAL &RECORD
+ &REDITHER &REFCOUNT &RELEASE &REMOVE &RESIZABLE &RIDGE &RIGHT &ROOT &ROUND
+ &ROW &ROWCONFIGURE &ROWS &SAVEUNDER &SCALE &SCAN &SCROLL &SEARCH &SEE
+ &SELECT &SELECTION &SEPARATOR &SET &SHOW &SIBLINGS &SIZE &SIZEFROM &SLAVES
+ &SLIDER &SOLID &SPACE &STATE &STATUS &SUNKEN &TAG &TAIL &TEAROFF &TEXT
+ &TITLE &TO &TOGGLE &TOP &TRACING &TRANSIENT &TRANSIENTFOR &TYPE &TYPES
+ &UNITS &UNPACK &UNPOST &UNSET &UP &USER &VARIABLE &VERTICAL &VISIBILITY
+ &WIDTH &WINDOW &WITHDRAW &WITHTAG &WORDEND &WORDSTART &WRITE &XVIEW
+ &YPOSITION &YVIEW
+);
+sub ABOVE () { 'above' }
+sub ACTIVATE () { 'activate' }
+sub ACTIVE () { 'active' }
+sub ADD () { 'add' }
+sub ADDTAG () { 'addtag' }
+sub ADJUST () { 'adjust' }
+sub AFTER () { 'after' }
+sub ALL () { 'all' }
+sub ANCHOR () { 'anchor' }
+sub APPEND () { 'append' }
+sub APPLY () { 'apply' }
+sub ARROW1 () { 'arrow1' }
+sub ARROW2 () { 'arrow2' }
+sub ASCII () { 'ascii' }
+sub ASPECT () { 'aspect' }
+sub AUTO () { 'auto' }
+sub BASELINE () { 'baseline' }
+sub BBOX () { 'bbox' }
+sub BEFORE () { 'before' }
+sub BELOW () { 'below' }
+sub BEVEL () { 'bevel' }
+sub BIND () { 'bind' }
+sub BITMAP () { 'bitmap' }
+sub BLANK () { 'blank' }
+sub BOTH () { 'both' }
+sub BOTTOM () { 'bottom' }
+sub BUTT () { 'butt' }
+sub CANVASX () { 'canvasx' }
+sub CANVASY () { 'canvasy' }
+sub CAPTURE () { 'capture' }
+sub CASCADE () { 'cascade' }
+sub CENTER () { 'center' }
+sub CGET () { 'cget' }
+sub CHAR () { 'char' }
+sub CHARS () { 'chars' }
+sub CHECKBUTTON () { 'checkbutton' }
+sub CHILDREN () { 'children' }
+sub CLEAR () { 'clear' }
+sub CLIENT () { 'client' }
+sub CLONE () { 'clone' }
+sub CLOSEST () { 'closest' }
+sub COLOR () { 'color' }
+sub COLORMAPWINDOWS () { 'colormapwindows' }
+sub COLUMN () { 'column' }
+sub COLUMNCONFIGURE () { 'columnconfigure' }
+sub COMMAND () { 'command' }
+sub COMPARE () { 'compare' }
+sub CONFIGURE () { 'configure' }
+sub COORDS () { 'coords' }
+sub COPY () { 'copy' }
+sub CREATE () { 'create' }
+sub CURRENT () { 'current' }
+sub CURSELECTION () { 'curselection' }
+sub DATA () { 'data' }
+sub DCHARS () { 'dchars' }
+sub DEACTIVATE () { 'deactivate' }
+sub DEBUG () { 'debug' }
+sub DECORATIONS () { 'decorations' }
+sub DECREASING () { 'decreasing' }
+sub DEFAULT () { 'default' }
+sub DEICONIFY () { 'deiconify' }
+sub DELETE () { 'delete' }
+sub DELTA () { 'delta' }
+sub DESELECT () { 'deselect' }
+sub DLINEINFO () { 'dlineinfo' }
+sub DOWN () { 'down' }
+sub DRAGSITE () { 'dragsite' }
+sub DRAGTO () { 'dragto' }
+sub DROPSITE () { 'dropsite' }
+sub DTAG () { 'dtag' }
+sub DUMP () { 'dump' }
+sub ENCLOSED () { 'enclosed' }
+sub END () { 'end' }
+sub ENTRY () { 'entry' }
+sub ENTRYCGET () { 'entrycget' }
+sub ENTRYCONFIGURE () { 'entryconfigure' }
+sub EVAL () { 'eval' }
+sub EXISTS () { 'exists' }
+sub EXPAND () { 'expand' }
+sub FILL () { 'fill' }
+sub FILLX () { 'fillx' }
+sub FILLY () { 'filly' }
+sub FIND () { 'find' }
+sub FIRST () { 'first' }
+sub FLASH () { 'flash' }
+sub FLAT () { 'flat' }
+sub FOCUS () { 'focus' }
+sub FOCUSMODEL () { 'focusmodel' }
+sub FOCUSNEXT () { 'focusnext' }
+sub FOCUSPREV () { 'focusprev' }
+sub FORGET () { 'forget' }
+sub FRACTION () { 'fraction' }
+sub FRAME () { 'frame' }
+sub FROM () { 'from' }
+sub GENERATE () { 'generate' }
+sub GEOMETRY () { 'geometry' }
+sub GEOMETRYINFO () { 'geometryinfo' }
+sub GET () { 'get' }
+sub GETTAGS () { 'gettags' }
+sub GRAVITY () { 'gravity' }
+sub GRAY () { 'gray' }
+sub GRID () { 'grid' }
+sub GROOVE () { 'groove' }
+sub GROUP () { 'group' }
+sub HANDLE () { 'handle' }
+sub HEAD () { 'head' }
+sub HEIGHT () { 'height' }
+sub HIDDEN () { 'hidden' }
+sub HIDE () { 'hide' }
+sub HORIZONTAL () { 'horizontal' }
+sub ICONBITMAP () { 'iconbitmap' }
+sub ICONIFY () { 'iconify' }
+sub ICONMASK () { 'iconmask' }
+sub ICONNAME () { 'iconname' }
+sub ICONPOSITION () { 'iconposition' }
+sub ICONWINDOW () { 'iconwindow' }
+sub ICURSOR () { 'icursor' }
+sub IDENTIFY () { 'identify' }
+sub IDLETASKS () { 'idletasks' }
+sub IGNORE () { 'ignore' }
+sub IMAGE () { 'image' }
+sub INCLUDES () { 'includes' }
+sub INCREASING () { 'increasing' }
+sub INDEX () { 'index' }
+sub INFO () { 'info' }
+sub INSERT () { 'insert' }
+sub INSIDE () { 'inside' }
+sub INTEGER () { 'integer' }
+sub INTERACTIVE () { 'interactive' }
+sub INVOKE () { 'invoke' }
+sub ISMWMRUNNING () { 'ismwmrunning' }
+sub ITEM () { 'item' }
+sub ITEMCGET () { 'itemcget' }
+sub ITEMCONFIGURE () { 'itemconfigure' }
+sub LAST () { 'last' }
+sub LEFT () { 'left' }
+sub LINE () { 'line' }
+sub LINECONFIGURE () { 'lineconfigure' }
+sub LINEEND () { 'lineend' }
+sub LINES () { 'lines' }
+sub LINESTART () { 'linestart' }
+sub LIST () { 'list' }
+sub LOCATION () { 'location' }
+sub LOWER () { 'lower' }
+sub MARK () { 'mark' }
+sub MAX () { 'max' }
+sub MAXSIZE () { 'maxsize' }
+sub MENUBAR () { 'menubar' }
+sub MINSIZE () { 'minsize' }
+sub MITER () { 'miter' }
+sub MONOCHROME () { 'monochrome' }
+sub MOVE () { 'move' }
+sub MOVETO () { 'moveto' }
+sub NAMES () { 'names' }
+sub NEAREST () { 'nearest' }
+sub NEW () { 'new' }
+sub NEXT () { 'next' }
+sub NEXTRANGE () { 'nextrange' }
+sub NONE () { 'none' }
+sub NORMAL () { 'normal' }
+sub NOW () { 'now' }
+sub OFFSPRINGS () { 'offsprings' }
+sub OUTSIDE () { 'outside' }
+sub OVERLAPPING () { 'overlapping' }
+sub OVERRIDEREDIRECT () { 'overrideredirect' }
+sub OWN () { 'own' }
+sub PADX () { 'padx' }
+sub PADY () { 'pady' }
+sub PAGECGET () { 'pagecget' }
+sub PAGECONFIGURE () { 'pageconfigure' }
+sub PAGES () { 'pages' }
+sub PARENT () { 'parent' }
+sub PASSIVE () { 'passive' }
+sub POSITION () { 'position' }
+sub POSITIONFROM () { 'positionfrom' }
+sub POST () { 'post' }
+sub POSTCASCADE () { 'postcascade' }
+sub POSTSCRIPT () { 'postscript' }
+sub PRESENT () { 'present' }
+sub PREV () { 'prev' }
+sub PREVIOUS () { 'previous' }
+sub PREVRANGE () { 'prevrange' }
+sub PROGRAM () { 'program' }
+sub PROJECTING () { 'projecting' }
+sub PROPAGATE () { 'propagate' }
+sub PROTOCOL () { 'protocol' }
+sub PUT () { 'put' }
+sub RADIOBUTTON () { 'radiobutton' }
+sub RAISE () { 'raise' }
+sub RAISED () { 'raised' }
+sub RANGE () { 'range' }
+sub RANGES () { 'ranges' }
+sub READ () { 'read' }
+sub READFILE () { 'readfile' }
+sub REAL () { 'real' }
+sub RECORD () { 'record' }
+sub REDITHER () { 'redither' }
+sub REFCOUNT () { 'refcount' }
+sub RELEASE () { 'release' }
+sub REMOVE () { 'remove' }
+sub RESIZABLE () { 'resizable' }
+sub RIDGE () { 'ridge' }
+sub RIGHT () { 'right' }
+sub ROOT () { 'root' }
+sub ROUND () { 'round' }
+sub ROW () { 'row' }
+sub ROWCONFIGURE () { 'rowconfigure' }
+sub ROWS () { 'rows' }
+sub SCALE () { 'scale' }
+sub SCAN () { 'scan' }
+sub SCROLL () { 'scroll' }
+sub SEARCH () { 'search' }
+sub SEE () { 'see' }
+sub SELECT () { 'select' }
+sub SELECTION () { 'selection' }
+sub SEPARATOR () { 'separator' }
+sub SET () { 'set' }
+sub SHOW () { 'show' }
+sub SIBLINGS () { 'siblings' }
+sub SIZE () { 'size' }
+sub SIZEFROM () { 'sizefrom' }
+sub SLAVES () { 'slaves' }
+sub SLIDER () { 'slider' }
+sub SOLID () { 'solid' }
+sub SPACE () { 'space' }
+sub STATE () { 'state' }
+sub STATUS () { 'status' }
+sub SUNKEN () { 'sunken' }
+sub TAG () { 'tag' }
+sub TAIL () { 'tail' }
+sub TEAROFF () { 'tearoff' }
+sub TEXT () { 'text' }
+sub TITLE () { 'title' }
+sub TO () { 'to' }
+sub TOGGLE () { 'toggle' }
+sub TOP () { 'top' }
+sub TRACING () { 'tracing' }
+sub TRANSIENT () { 'transient' }
+sub TRANSIENTFOR () { 'transientfor' }
+sub TYPE () { 'type' }
+sub TYPES () { 'types' }
+sub UNITS () { 'units' }
+sub UNPACK () { 'unpack' }
+sub UNPOST () { 'unpost' }
+sub UNSET () { 'unset' }
+sub UP () { 'up' }
+sub USER () { 'user' }
+sub VARIABLE () { 'variable' }
+sub VERTICAL () { 'vertical' }
+sub VISIBILITY () { 'visibility' }
+sub WIDTH () { 'width' }
+sub WINDOW () { 'window' }
+sub WITHDRAW () { 'withdraw' }
+sub WITHTAG () { 'withtag' }
+sub WORDEND () { 'wordend' }
+sub WORDSTART () { 'wordstart' }
+sub WRITE () { 'write' }
+sub XVIEW () { 'xview' }
+sub YPOSITION () { 'yposition' }
+sub YVIEW () { 'yview' }
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Entry.pm b/Master/tlpkg/tlperl/lib/Tk/Entry.pm
new file mode 100644
index 00000000000..68e4710978b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Entry.pm
@@ -0,0 +1,615 @@
+package Tk::Entry;
+
+# Converted from entry.tcl --
+#
+# This file defines the default bindings for Tk entry widgets.
+#
+# @(#) entry.tcl 1.22 94/12/17 16:05:14
+#
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+
+use vars qw($VERSION);
+use strict;
+$VERSION = '4.018'; # sprintf '4.%03d',q$Revision: #17 $ =~ /#(\d+)/;
+
+# modify it under the same terms as Perl itself, subject
+# to additional disclaimer in license.terms due to partial
+# derivation from Tk4.0 sources.
+
+use Tk::Widget ();
+use Tk::Clipboard ();
+use base qw(Tk::Clipboard Tk::Widget);
+
+import Tk qw(Ev $XS_VERSION);
+
+Construct Tk::Widget 'Entry';
+
+bootstrap Tk::Entry;
+
+sub Tk_cmd { \&Tk::entry }
+
+Tk::Methods('bbox','delete','get','icursor','index','insert','scan',
+ 'selection','validate','xview');
+
+use Tk::Submethods ( 'selection' => [qw(clear range adjust present to from)],
+ 'xview' => [qw(moveto scroll)],
+ );
+
+sub wordstart
+{my ($w,$pos) = @_;
+ my $string = $w->get;
+ $pos = $w->index('insert')-1 unless(defined $pos);
+ $string = substr($string,0,$pos);
+ $string =~ s/\S*$//;
+ length $string;
+}
+
+sub wordend
+{my ($w,$pos) = @_;
+ my $string = $w->get;
+ my $anc = length $string;
+ $pos = $w->index('insert') unless(defined $pos);
+ $string = substr($string,$pos);
+ $string =~ s/^(?:((?=\s)\s*|(?=\S)\S*))//x;
+ $anc - length($string);
+}
+
+sub deltainsert
+{
+ my ($w,$d) = @_;
+ return $w->index('insert')+$d;
+}
+
+#
+# Bind --
+# This procedure is invoked the first time the mouse enters an
+# entry widget or an entry widget receives the input focus. It creates
+# all of the class bindings for entries.
+#
+# Arguments:
+# event - Indicates which event caused the procedure to be invoked
+# (Enter or FocusIn). It is used so that we can carry out
+# the functions of that event in addition to setting up
+# bindings.
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+
+ $class->SUPER::ClassInit($mw);
+
+ # <<Cut>>, <<Copy>> and <<Paste>> defined in Tk::Clipboard
+ $mw->bind($class,'<<Clear>>' => sub {
+ my $w = shift;
+ $w->delete("sel.first", "sel.last");
+ });
+ $mw->bind($class,'<<PasteSelection>>' => [sub {
+ my($w, $x) = @_;
+ # XXX logic in Tcl/Tk version screwed up?
+ if (!$Tk::strictMotif && !$Tk::mouseMoved) {
+ $w->Paste($x);
+ }
+ }, Ev('x')]);
+
+ # Standard Motif bindings:
+ # The <Escape> binding is different from the Tcl/Tk version:
+ $mw->bind($class,'<Escape>','selectionClear');
+
+ $mw->bind($class,'<1>',['Button1',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<ButtonRelease-1>',['Button1Release',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B1-Motion>',['Motion',Ev('x'),Ev('y')]);
+
+ $mw->bind($class,'<Double-1>',['MouseSelect',Ev('x'),'word','sel.first']);
+ $mw->bind($class,'<Double-Shift-1>',['MouseSelect',Ev('x'),'word']);
+ $mw->bind($class,'<Triple-1>',['MouseSelect',Ev('x'),'line',0]);
+ $mw->bind($class,'<Triple-Shift-1>',['MouseSelect',Ev('x'),'line']);
+
+ $mw->bind($class,'<Shift-1>','Shift_1');
+
+
+ $mw->bind($class,'<B1-Leave>',['AutoScan',Ev('x')]);
+ $mw->bind($class,'<B1-Enter>','CancelRepeat');
+ $mw->bind($class,'<Control-1>','Control_1');
+ $mw->bind($class,'<Left>', ['SetCursor',Ev('deltainsert',-1)]);
+ $mw->bind($class,'<Right>',['SetCursor',Ev('deltainsert',1)]);
+ $mw->bind($class,'<Shift-Left>',['KeySelect',Ev('deltainsert',-1)]);
+ $mw->bind($class,'<Shift-Right>',['KeySelect',Ev('deltainsert',1)]);
+ $mw->bind($class,'<Control-Left>',['SetCursor',Ev(['wordstart'])]);
+ $mw->bind($class,'<Control-Right>',['SetCursor',Ev(['wordend'])]);
+ $mw->bind($class,'<Shift-Control-Left>',['KeySelect',Ev(['wordstart'])]);
+ $mw->bind($class,'<Shift-Control-Right>',['KeySelect',Ev(['wordend'])]);
+ $mw->bind($class,'<Home>',['SetCursor',0]);
+ $mw->bind($class,'<Shift-Home>',['KeySelect',0]);
+ $mw->bind($class,'<End>',['SetCursor','end']);
+ $mw->bind($class,'<Shift-End>',['KeySelect','end']);
+ $mw->bind($class,'<Delete>','Delete');
+
+ $mw->bind($class,'<BackSpace>','Backspace');
+
+ $mw->bind($class,'<Control-space>',['selectionFrom','insert']);
+ $mw->bind($class,'<Select>',['selectionFrom','insert']);
+ $mw->bind($class,'<Control-Shift-space>',['selectionAdjust','insert']);
+ $mw->bind($class,'<Shift-Select>',['selectionAdjust','insert']);
+
+ $mw->bind($class,'<Control-slash>',['selectionRange',0,'end']);
+ $mw->bind($class,'<Control-backslash>','selectionClear');
+
+ # $class->clipboardOperations($mw,qw[Copy Cut Paste]);
+
+ $mw->bind($class,'<KeyPress>', ['Insert',Ev('A')]);
+
+ # Ignore all Alt, Meta, and Control keypresses unless explicitly bound.
+ # Otherwise, if a widget binding for one of these is defined, the
+ # <KeyPress> class binding will also fire and insert the character,
+ # which is wrong. Ditto for Return, and Tab.
+
+ $mw->bind($class,'<Alt-KeyPress>' ,'NoOp');
+ $mw->bind($class,'<Meta-KeyPress>' ,'NoOp');
+ $mw->bind($class,'<Control-KeyPress>' ,'NoOp');
+ $mw->bind($class,'<Return>' ,'NoOp');
+ $mw->bind($class,'<KP_Enter>' ,'NoOp');
+ $mw->bind($class,'<Tab>' ,'NoOp');
+ if ($mw->windowingsystem =~ /^(?:classic|aqua)$/)
+ {
+ $mw->bind($class,'<Command-KeyPress>', 'NoOp');
+ }
+
+ # On Windows, paste is done using Shift-Insert. Shift-Insert already
+ # generates the <<Paste>> event, so we don't need to do anything here.
+ if ($Tk::platform ne 'MSWin32')
+ {
+ $mw->bind($class,'<Insert>','InsertSelection');
+ }
+
+ if (!$Tk::strictMotif)
+ {
+ # Additional emacs-like bindings:
+ $mw->bind($class,'<Control-a>',['SetCursor',0]);
+ $mw->bind($class,'<Control-b>',['SetCursor',Ev('deltainsert',-1)]);
+ $mw->bind($class,'<Control-d>',['delete','insert']);
+ $mw->bind($class,'<Control-e>',['SetCursor','end']);
+ $mw->bind($class,'<Control-f>',['SetCursor',Ev('deltainsert',1)]);
+ $mw->bind($class,'<Control-h>','Backspace');
+ $mw->bind($class,'<Control-k>',['delete','insert','end']);
+
+ $mw->bind($class,'<Control-t>','Transpose');
+
+ # XXX The original Tcl/Tk bindings use NextWord/PreviousWord instead
+ $mw->bind($class,'<Meta-b>',['SetCursor',Ev(['wordstart'])]);
+ $mw->bind($class,'<Meta-d>',['delete','insert',Ev(['wordend'])]);
+ $mw->bind($class,'<Meta-f>',['SetCursor',Ev(['wordend'])]);
+ $mw->bind($class,'<Meta-BackSpace>',['delete',Ev(['wordstart']),'insert']);
+ $mw->bind($class,'<Meta-Delete>',['delete',Ev(['wordstart']),'insert']);
+
+ # A few additional bindings from John Ousterhout.
+# XXX conflicts with <<Copy>>: $mw->bind($class,'<Control-w>',['delete',Ev(['wordstart']),'insert']);
+ $mw->bind($class,'<2>','Button_2');
+ $mw->bind($class,'<B2-Motion>','B2_Motion');
+# XXX superseded by <<PasteSelection>>: $mw->bind($class,'<ButtonRelease-2>','ButtonRelease_2');
+ }
+ return $class;
+}
+
+
+sub Shift_1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $Tk::selectMode = 'char';
+ $w->selectionAdjust('@' . $Ev->x)
+}
+
+
+sub Control_1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->icursor('@' . $Ev->x)
+}
+
+
+sub Delete
+{
+ my $w = shift;
+ if ($w->selectionPresent)
+ {
+ $w->deleteSelected
+ }
+ else
+ {
+ $w->delete('insert')
+ }
+}
+
+
+sub InsertSelection
+{
+ my $w = shift;
+ eval {local $SIG{__DIE__}; $w->Insert($w->GetSelection)}
+}
+
+
+# Original is ::tk::EntryScanMark
+sub Button_2
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->scan('mark',$Ev->x);
+ $Tk::x = $Ev->x;
+ $Tk::y = $Ev->y;
+ $Tk::mouseMoved = 0
+}
+
+
+# Original is ::tk::EntryScanDrag
+sub B2_Motion
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ # Make sure these exist, as some weird situations can trigger the
+ # motion binding without the initial press. [Tcl/Tk Bug #220269]
+ if (!defined $Tk::x) { $Tk::x = $Ev->x }
+ if (abs(($Ev->x-$Tk::x)) > 2)
+ {
+ $Tk::mouseMoved = 1
+ }
+ $w->scan('dragto',$Ev->x)
+}
+
+
+# XXX Not needed anymore
+sub ButtonRelease_2
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ if (!$Tk::mouseMoved)
+ {
+ eval
+ {local $SIG{__DIE__};
+ $w->insert('insert',$w->SelectionGet);
+ $w->SeeInsert;
+ }
+ }
+}
+
+sub Button1Release
+{
+ shift->CancelRepeat;
+}
+
+# ::tk::EntryClosestGap --
+# Given x and y coordinates, this procedure finds the closest boundary
+# between characters to the given coordinates and returns the index
+# of the character just after the boundary.
+#
+# Arguments:
+# w - The entry window.
+# x - X-coordinate within the window.
+sub ClosestGap
+{
+ my($w, $x) = @_;
+ my $pos = $w->index('@'.$x);
+ my @bbox = $w->bbox($pos);
+ if ($x - $bbox[0] < $bbox[2] / 2)
+ {
+ return $pos;
+ }
+ $pos + 1;
+}
+
+# Button1 --
+# This procedure is invoked to handle button-1 presses in entry
+# widgets. It moves the insertion cursor, sets the selection anchor,
+# and claims the input focus.
+#
+# Arguments:
+# w - The entry window in which the button was pressed.
+# x - The x-coordinate of the button press.
+sub Button1
+{
+ my $w = shift;
+ my $x = shift;
+ $Tk::selectMode = 'char';
+ $Tk::mouseMoved = 0;
+ $Tk::pressX = $x;
+ $w->icursor($w->ClosestGap($x));
+ $w->selectionFrom('insert');
+ $w->selectionClear;
+ if ($w->cget('-state') ne 'disabled')
+ {
+ $w->focus()
+ }
+}
+
+sub Motion
+{
+ my ($w,$x,$y) = @_;
+ $Tk::x = $x; # XXX ?
+ $w->MouseSelect($x);
+}
+
+# MouseSelect --
+# This procedure is invoked when dragging out a selection with
+# the mouse. Depending on the selection mode (character, word,
+# line) it selects in different-sized units. This procedure
+# ignores mouse motions initially until the mouse has moved from
+# one character to another or until there have been multiple clicks.
+#
+# Arguments:
+# w - The entry window in which the button was pressed.
+# x - The x-coordinate of the mouse.
+sub MouseSelect
+{
+
+ my $w = shift;
+ my $x = shift;
+ return if UNIVERSAL::isa($w, 'Tk::Spinbox') and $w->{_element} ne 'entry';
+ $Tk::selectMode = shift if (@_);
+ my $cur = $w->index($w->ClosestGap($x));
+ return unless defined $cur;
+ my $anchor = $w->index('anchor');
+ return unless defined $anchor;
+ $Tk::pressX ||= $x; # XXX Better use "if !defined $Tk::pressX"?
+ if (($cur != $anchor) || (abs($Tk::pressX - $x) >= 3))
+ {
+ $Tk::mouseMoved = 1
+ }
+ my $mode = $Tk::selectMode;
+ return unless $mode;
+ if ($mode eq 'char')
+ {
+ # The Tcl version uses selectionRange here XXX
+ if ($Tk::mouseMoved)
+ {
+ if ($cur < $anchor)
+ {
+ $w->selectionTo($cur)
+ }
+ else
+ {
+ $w->selectionTo($cur+1)
+ }
+ }
+ }
+ elsif ($mode eq 'word')
+ {
+ # The Tcl version uses tcl_wordBreakBefore/After here XXX
+ if ($cur < $w->index('anchor'))
+ {
+ $w->selectionRange($w->wordstart($cur),$w->wordend($anchor-1))
+ }
+ else
+ {
+ $w->selectionRange($w->wordstart($anchor),$w->wordend($cur))
+ }
+ }
+ elsif ($mode eq 'line')
+ {
+ $w->selectionRange(0,'end')
+ }
+ if (@_)
+ {
+ my $ipos = shift;
+ eval {local $SIG{__DIE__}; $w->icursor($ipos) };
+ }
+ $w->idletasks;
+}
+# ::tk::EntryPaste --
+# This procedure sets the insertion cursor to the current mouse position,
+# pastes the selection there, and sets the focus to the window.
+#
+# Arguments:
+# w - The entry window.
+# x - X position of the mouse.
+sub Paste
+{
+ my($w, $x) = @_;
+ $w->icursor($w->ClosestGap($x));
+ eval { local $SIG{__DIE__};
+ $w->insert("insert", $w->GetSelection);
+ $w->SeeInsert; # Perl/Tk extension
+ };
+ if ($w->cget(-state) ne 'disabled')
+ {
+ $w->focus;
+ }
+}
+# AutoScan --
+# This procedure is invoked when the mouse leaves an entry window
+# with button 1 down. It scrolls the window left or right,
+# depending on where the mouse is, and reschedules itself as an
+# 'after' command so that the window continues to scroll until the
+# mouse moves back into the window or the mouse button is released.
+#
+# Arguments:
+# w - The entry window.
+# x - The x-coordinate of the mouse when it left the window.
+sub AutoScan
+{
+ my $w = shift;
+ my $x = shift;
+ return if !Tk::Exists($w);
+ if ($x >= $w->width)
+ {
+ $w->xview('scroll',2,'units')
+ }
+ elsif ($x < 0)
+ {
+ $w->xview('scroll',-2,'units')
+ }
+ else
+ {
+ return;
+ }
+ $w->MouseSelect($x);
+ $w->RepeatId($w->after(50,['AutoScan',$w,$x]))
+}
+# KeySelect
+# This procedure is invoked when stroking out selections using the
+# keyboard. It moves the cursor to a new position, then extends
+# the selection to that position.
+#
+# Arguments:
+# w - The entry window.
+# new - A new position for the insertion cursor (the cursor hasn't
+# actually been moved to this position yet).
+sub KeySelect
+{
+ my $w = shift;
+ my $new = shift;
+ if (!$w->selectionPresent)
+ {
+ $w->selectionFrom('insert');
+ $w->selectionTo($new)
+ }
+ else
+ {
+ $w->selectionAdjust($new)
+ }
+ $w->icursor($new);
+ $w->SeeInsert;
+}
+# Insert --
+# Insert a string into an entry at the point of the insertion cursor.
+# If there is a selection in the entry, and it covers the point of the
+# insertion cursor, then delete the selection before inserting.
+#
+# Arguments:
+# w - The entry window in which to insert the string
+# s - The string to insert (usually just a single character)
+sub Insert
+{
+ my $w = shift;
+ my $s = shift;
+ return unless (defined $s && $s ne '');
+ eval
+ {local $SIG{__DIE__};
+ my $insert = $w->index('insert');
+ if ($w->index('sel.first') <= $insert && $w->index('sel.last') >= $insert)
+ {
+ $w->deleteSelected
+ }
+ };
+ $w->insert('insert',$s);
+ $w->SeeInsert
+}
+# Backspace --
+# Backspace over the character just before the insertion cursor.
+#
+# Arguments:
+# w - The entry window in which to backspace.
+sub Backspace
+{
+ my $w = shift;
+ if ($w->selectionPresent)
+ {
+ $w->deleteSelected
+ }
+ else
+ {
+ my $x = $w->index('insert')-1;
+ $w->delete($x) if ($x >= 0);
+ # XXX Missing repositioning part from Tcl/Tk source
+ }
+}
+# SeeInsert
+# Make sure that the insertion cursor is visible in the entry window.
+# If not, adjust the view so that it is.
+#
+# Arguments:
+# w - The entry window.
+sub SeeInsert
+{
+ my $w = shift;
+ my $c = $w->index('insert');
+#
+# Probably a bug in your version of tcl/tk (I've not this problem
+# when I test Entry in the widget demo for tcl/tk)
+# index('\@0') give always 0. Consequence :
+# if you make <Control-E> or <Control-F> view is adapted
+# but with <Control-A> or <Control-B> view is not adapted
+#
+ my $left = $w->index('@0');
+ if ($left > $c)
+ {
+ $w->xview($c);
+ return;
+ }
+ my $x = $w->width;
+ while ($w->index('@' . $x) <= $c && $left < $c)
+ {
+ $left += 1;
+ $w->xview($left)
+ }
+}
+# SetCursor
+# Move the insertion cursor to a given position in an entry. Also
+# clears the selection, if there is one in the entry, and makes sure
+# that the insertion cursor is visible.
+#
+# Arguments:
+# w - The entry window.
+# pos - The desired new position for the cursor in the window.
+sub SetCursor
+{
+ my $w = shift;
+ my $pos = shift;
+ $w->icursor($pos);
+ $w->selectionClear;
+ $w->SeeInsert;
+}
+# Transpose
+# This procedure implements the 'transpose' function for entry widgets.
+# It tranposes the characters on either side of the insertion cursor,
+# unless the cursor is at the end of the line. In this case it
+# transposes the two characters to the left of the cursor. In either
+# case, the cursor ends up to the right of the transposed characters.
+#
+# Arguments:
+# w - The entry window.
+sub Transpose
+{
+ my $w = shift;
+ my $i = $w->index('insert');
+ $i++ if ($i < $w->index('end'));
+ my $first = $i-2;
+ return if ($first < 0);
+ my $str = $w->get;
+ my $new = substr($str,$i-1,1) . substr($str,$first,1);
+ $w->delete($first,$i);
+ $w->insert('insert',$new);
+ $w->SeeInsert;
+}
+
+sub tabFocus
+{
+ my $w = shift;
+ $w->selectionRange(0,'end');
+ $w->icursor('end');
+ $w->SUPER::tabFocus;
+}
+
+# ::tk::EntryGetSelection --
+#
+# Returns the selected text of the entry with respect to the -show option.
+#
+# Arguments:
+# w - The entry window from which the text to get
+sub getSelected
+{
+ my $w = shift;
+ return undef unless $w->selectionPresent;
+ my $str = $w->get;
+ my $show = $w->cget('-show');
+ $str = $show x length($str) if (defined $show);
+ my $s = $w->index('sel.first');
+ my $e = $w->index('sel.last');
+ return substr($str,$s,$e-$s);
+}
+
+
+1;
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Entry.pod b/Master/tlpkg/tlperl/lib/Tk/Entry.pod
new file mode 100644
index 00000000000..1b6dbf15482
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Entry.pod
@@ -0,0 +1,693 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Entry - Create and manipulate Entry widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+S< >I<$entry> = I<$parent>-E<gt>B<Entry>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-background> B<-highlightbackground> B<-insertontime> B<-selectforeground>
+B<-borderwidth> B<-highlightcolor> B<-insertwidth> B<-takefocus>
+B<-cursor> B<-highlightthickness> B<-justify> B<-textvariable>
+B<-exportselection> B<-insertbackground> B<-relief> B<-xscrollcommand>
+B<-font> B<-insertborderwidth> B<-selectbackground>
+B<-foreground> B<-insertofftime> B<-selectborderwidth>
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Command-Line Name: B<-disabledbackground>
+
+=item Database Name: B<disabledBackground>
+
+=item Database Class: B<DisabledBackground>
+
+Specifies the background color to use when the entry is disabled. If
+this option is the empty string, the normal background color is used.
+
+=item Command-Line Name: B<-disabledforeground>
+
+=item Database Name: B<disabledForeground>
+
+=item Database Class: B<DisabledForeground>
+
+Specifies the foreground color to use when the entry is disabled. If
+this option is the empty string, the normal foreground color is used.
+
+=item Name: B<invalidCommand>
+
+=item Class: B<InvalidCommand>
+
+=item Switch: B<-invalidcommand>
+
+=item Alias: B<-invcmd>
+
+Specifies a script to eval when B<validateCommand> returns 0.
+Setting it to <undef> disables this feature (the default). The best use
+of this option is to set it to I<bell>. See B<Validation>
+below for more information.
+
+=item Command-Line Name: B<-readonlybackground>
+
+=item Database Name: B<readonlyBackground>
+
+=item Database Class: B<ReadonlyBackground>
+
+Specifies the background color to use when the entry is read-only. If
+this option is the empty string, the normal background color is used.
+
+=item Name: B<show>
+
+=item Class: B<Show>
+
+=item Switch: B<-show>
+
+If this option is specified, then the true contents of the entry
+are not displayed in the window.
+Instead, each character in the entry's value will be displayed as
+the first character in the value of this option, such as ``*''.
+This is useful, for example, if the entry is to be used to enter
+a password.
+If characters in the entry are selected and copied elsewhere, the
+information copied will be what is displayed, not the true contents
+of the entry.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of three states for the entry: B<normal>, B<disabled>, or
+B<readonly>. If the entry is B<readonly>, then the value may not be changed
+using widget commands and no insertion cursor will be displayed, even
+if the input focus is in the widget; the contents of the widget may
+still be selected. If the entry is B<disabled>, the value may not be
+changed, no insertion cursor will be displayed, the contents will not
+be selectable, and the entry may be displayed in a different color,
+depending on the values of the B<-disabledforeground> and
+B<-disabledbackground> options.
+
+=item Name: B<validate>
+
+=item Class: B<Validate>
+
+=item Switch: B<-validate>
+
+Specifies the mode in which validation should operate: B<none>,
+B<focus>, B<focusin>, B<focusout>, B<key>, or B<all>.
+It defaults to B<none>. When you want validation, you must explicitly
+state which mode you wish to use. See B<Validation> below for more.
+
+=item Name: B<validateCommand>
+
+=item Class: B<ValidateCommand>
+
+=item Switch: B<-validatecommand>
+
+=item Alias: B<-vcmd>
+
+Specifies a script to eval when you want to validate the input into
+the entry widget. Setting it to C<undef> disables this feature (the default).
+This command must return a valid boolean value. If it returns 0 (or
+the valid boolean equivalent) then it means you reject the new edition
+and it will not occur and the B<invalidCommand> will be evaluated if it
+is set. If it returns 1, then the new edition occurs.
+See B<Validation> below for more information.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies an integer value indicating the desired width of the entry window,
+in average-size characters of the widget's font.
+If the value is less than or equal to zero, the widget picks a
+size just large enough to hold its current text.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Entry> method creates a new window (given by the
+$entry argument) and makes it into an entry widget.
+Additional options, described above, may be specified on the
+command line or in the option database
+to configure aspects of the entry such as its colors, font,
+and relief. The B<entry> command returns its
+$entry argument. At the time this command is invoked,
+there must not exist a window named $entry, but
+$entry's parent must exist.
+
+An entry is a widget that displays a one-line text string and
+allows that string to be edited using methods described below, which
+are typically bound to keystrokes and mouse actions.
+When first created, an entry's string is empty.
+A portion of the entry may be selected as described below.
+If an entry is exporting its selection (see the B<exportSelection>
+option), then it will observe the standard X11 protocols for handling the
+selection; entry selections are available as type B<STRING>.
+Entries also observe the standard Tk rules for dealing with the
+input focus. When an entry has the input focus it displays an
+I<insertion cursor> to indicate where new characters will be
+inserted.
+
+Entries are capable of displaying strings that are too long to
+fit entirely within the widget's window. In this case, only a
+portion of the string will be displayed; methods described below
+may be used to change the view in the window. Entries use
+the standard B<xScrollCommand> mechanism for interacting with
+scrollbars (see the description of the B<-xscrollcommand> option
+for details). They also support scanning, as described below.
+
+=head1 VALIDATION
+
+Validation of entry widgets is derived from part of the patch written by
+jhobbs@cs.uoregon.edu. This works by setting the B<validateCommand>
+option to a callback which will be evaluated according to the B<validate>
+option as follows:
+
+=over 4
+
+=item B<none>
+
+Default. This means no validation will occur.
+
+=item B<focus>
+
+B<validateCommand> will be called when the entry receives or
+loses focus.
+
+=item B<focusin>
+
+B<validateCommand> will be called when the entry receives focus.
+
+=item B<focusout>
+
+B<validateCommand> will be called when the entry loses focus.
+
+=item B<key>
+
+B<validateCommand> will be called when the entry is edited.
+
+=item B<all>
+
+B<validateCommand> will be called for all above conditions.
+
+=back
+
+The B<validateCommand> and B<invalidCommand> are called with the following
+arguments:
+
+=over 4
+
+=item * The proposed value of the entry. If you are configuring the
+entry widget to have a new textvariable, this will be the value of that
+textvariable.
+
+=item * The characters to be added (or deleted). This will be C<undef>
+if validation is due to focus, explcit call to validate or if change
+is due to C<-textvariable> changing.
+
+=item * The current value of entry i.e. before the proposed change.
+
+=item * index of char string to be added/deleted, if any. -1 otherwise
+
+=item * type of action. 1 == INSERT, 0 == DELETE,
+-1 if it's a forced validation or textvariable validation
+
+=back
+
+In general, the B<textVariable> and B<validateCommand> can be
+dangerous to mix. If you try set the B<textVariable>
+to something that the B<validateCommand> will not accept it will
+be set back to the value of the entry widget.
+Using the B<textVariable> for read-only purposes will never cause problems.
+
+The B<validateCommand> will turn itself off by setting
+B<validate> to B<none> when an error occurs, for example
+when the B<validateCommand> or B<invalidCommand> encounters
+an error in its script while evaluating, or
+B<validateCommand> does not return a valid boolean value.
+
+With the perl/Tk version B<validate> option is supposed to be
+"suspended" while executing the B<validateCommand> or the B<invalidCommand>.
+This is experimental but in theory either callback can "correct" the
+value of the widget, and override the proposed change. (B<validateCommand>
+should still return false to inhibit the change from happening when
+it returns.)
+
+=head1 WIDGET METHODS
+
+The B<Entry> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+Many of the additional methods for entries take one or more indices as
+arguments. An index specifies a particular character in the entry's
+string, in any of the following ways:
+
+=over 4
+
+=item I<number>
+
+Specifies the character as a numerical index, where 0 corresponds
+to the first character in the string.
+
+=item B<anchor>
+
+Indicates the anchor point for the selection, which is set with the
+B<selectionFrom> and B<selectionAdjust> methods.
+
+=item B<end>
+
+Indicates the character just after the last one in the entry's string.
+This is equivalent to specifying a numerical index equal to the length
+of the entry's string.
+
+=item B<insert>
+
+Indicates the character adjacent to and immediately following the
+insertion cursor.
+
+=item B<sel.first>
+
+Indicates the first character in the selection. It is an error to
+use this form if the selection isn't in the entry window.
+
+=item B<sel.last>
+
+Indicates the character just after the last one in the selection.
+It is an error to use this form if the selection isn't in the
+entry window.
+
+=item B<@>I<number>
+
+In this form, I<number> is treated as an x-coordinate in the
+entry's window; the character spanning that x-coordinate is used.
+For example, ``B<@0>'' indicates the left-most character in the
+window.
+
+=back
+
+Abbreviations may be used for any of the forms above, e.g. ``B<e>''
+or ``B<sel.f>''. In general, out-of-range indices are automatically
+rounded to the nearest legal value.
+
+The following additional methods are available for entry widgets:
+
+=over 4
+
+=item I<$entry>-E<gt>B<bbox>(I<index>)
+
+Returns a list of four numbers describing the bounding box of the
+character given by I<index>.
+The first two elements of the list give the x and y coordinates of
+the upper-left corner of the screen area covered by the character
+(in pixels relative to the widget) and the last two elements give
+the width and height of the character, in pixels.
+The bounding box may refer to a region outside the visible area
+of the window.
+
+=item I<$entry>-E<gt>B<cget>(?I<option>?)
+
+Returns the current value of the configuration option given
+by I<option>.
+I<Option> may have any of the values accepted by the B<entry>
+command.
+
+=item I<$entry>-E<gt>B<configure>(?I<option>?, ?I<value, option, value, ...>?)
+
+Query or modify the configuration options of the widget.
+If no I<option> is specified, returns a list describing all of
+the available options for $entry (see L<Tk::configure> for
+information on the format of this list). If I<option> is specified
+with no I<value>, then the command returns a list describing the
+one named option (this list will be identical to the corresponding
+sublist of the value returned if no I<option> is specified). If
+one or more I<option-value> pairs are specified, then the command
+modifies the given widget option(s) to have the given value(s); in
+this case the command returns an empty string.
+I<Option> may have any of the values accepted by the B<entry>
+command.
+
+=item I<$entry>-E<gt>B<delete>(I<first, >?I<last>?)
+
+Delete one or more elements of the entry.
+I<First> is the index of the first character to delete, and
+I<last> is the index of the character just after the last
+one to delete.
+If I<last> isn't specified it defaults to I<first>+1,
+i.e. a single character is deleted.
+This method returns an empty string.
+
+=item I<$entry>-E<gt>B<get>
+
+Returns the entry's string.
+
+=item I<$entry>-E<gt>B<icursor>(I<index>)
+
+Arrange for the insertion cursor to be displayed just before the character
+given by I<index>. Returns an empty string.
+
+=item I<$entry>-E<gt>B<index>(I<index>)
+
+Returns the numerical index corresponding to I<index>.
+
+=item I<$entry>-E<gt>B<insert>(I<index, string>)
+
+Insert the characters of I<string> just before the character
+indicated by I<index>. Returns an empty string.
+
+=item I<$entry>->B<scan>(I<option, args>)
+
+=item I<$entry>->B<scan>I<Option>(I<args>)
+
+This method is used to implement scanning on entries. It has
+two forms, depending on I<Option>:
+
+=over 8
+
+=item I<$entry>->B<scanMark>(I<x>)
+
+Records I<x> and the current view in the entry widget; used in
+conjunction with later B<scanDragto> methods. Typically this
+method is associated with a mouse button press in the widget. It
+returns an empty string.
+
+=item I<$entry>->B<scanDragto>(I<x>)
+
+This method computes the difference between its I<x> argument
+and the I<x> argument to the last B<scanMark> method for
+the widget. It then adjusts the view left or right by 10 times the
+difference in x-coordinates. This method is typically associated
+with mouse motion events in the widget, to produce the effect of
+dragging the entry at high speed through the widget. The return
+value is an empty string.
+
+=back
+
+=item I<$entry>->B<selection>(I<option, arg>)
+
+=item I<$entry>->B<selection>I<Option>(I<arg>)
+
+This method is used to adjust the selection within an entry. It
+has several forms, depending on I<Option>:
+
+=over 8
+
+=item I<$entry>-E<gt>B<selectionAdjust>(I<index>)
+
+Locate the end of the selection nearest to the character given by
+I<index>, and adjust that end of the selection to be at I<index>
+(i.e including but not going beyond I<index>). The other
+end of the selection is made the anchor point for future
+B<selectionTo> methods. If the selection
+isn't currently in the entry, then a new selection is created to
+include the characters between I<index> and the most recent
+selection anchor point, inclusive.
+Returns an empty string.
+
+=item I<$entry>-E<gt>B<selectionClear>
+
+Clear the selection if it is currently in this widget. If the
+selection isn't in this widget then the method has no effect.
+Returns an empty string.
+
+=item I<$entry>-E<gt>B<selectionFrom>(I<index>)
+
+Set the selection anchor point to just before the character
+given by I<index>. Doesn't change the selection.
+Returns an empty string.
+
+=item I<$entry>-E<gt>B<selectionPresent>
+
+Returns 1 if there is are characters selected in the entry,
+0 if nothing is selected.
+
+=item I<$entry>-E<gt>B<selectionRange>(I<start, >I<end>)
+
+Sets the selection to include the characters starting with
+the one indexed by I<start> and ending with the one just
+before I<end>.
+If I<end> refers to the same character as I<start> or an
+earlier one, then the entry's selection is cleared.
+
+=item I<$entry>-E<gt>B<selectionTo>(I<index>)
+
+If I<index> is before the anchor point, set the selection
+to the characters from I<index> up to but not including
+the anchor point.
+If I<index> is the same as the anchor point, do nothing.
+If I<index> is after the anchor point, set the selection
+to the characters from the anchor point up to but not including
+I<index>.
+The anchor point is determined by the most recent B<selectionFrom>
+or B<selectionAdjust> method in this widget.
+If the selection isn't in this widget then a new selection is
+created using the most recent anchor point specified for the widget.
+Returns an empty string.
+
+=back
+
+=item I<$entry>-E<gt>B<validate>
+
+This command is used to force an evaluation of the B<validateCommand>
+independent of the conditions specified by the B<validate> option. It
+returns 0 or 1.
+
+=item I<$entry>-E<gt>B<xview>(I<args>)
+
+This command is used to query and change the horizontal position of the
+text in the widget's window. It can take any of the following
+forms:
+
+=over 8
+
+=item I<$entry>-E<gt>B<xview>
+
+Returns a list containing two elements.
+Each element is a real fraction between 0 and 1; together they describe
+the horizontal span that is visible in the window.
+For example, if the first element is .2 and the second element is .7,
+20% of the entry's text is off-screen to the left, the middle 50% is visible
+in the window, and 30% of the text is off-screen to the right.
+These are the same values passed to scrollbars via the B<-xscrollcommand>
+option.
+
+=item I<$entry>-E<gt>B<xview>(I<index>)
+
+Adjusts the view in the window so that the character given by I<index>
+is displayed at the left edge of the window.
+
+=item I<$entry>-E<gt>B<xviewMoveto>(I<fraction>)
+
+Adjusts the view in the window so that the character I<fraction> of the
+way through the text appears at the left edge of the window.
+I<Fraction> must be a fraction between 0 and 1.
+
+=item I<$entry>-E<gt>B<xviewScroll>(I<number, what>)
+
+This method shifts the view in the window left or right according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages> or an abbreviation
+of one of these.
+If I<what> is B<units>, the view adjusts left or right by
+I<number> average-width characters on the display; if it is
+B<pages> then the view adjusts by I<number> screenfuls.
+If I<number> is negative then characters farther to the left
+become visible; if it is positive then characters farther to the right
+become visible.
+
+=back
+
+=back
+
+=head1 DEFAULT BINDINGS
+
+Tk automatically creates class bindings for entries that give them
+the following default behavior.
+In the descriptions below, ``word'' refers to a contiguous group
+of letters, digits, or ``_'' characters, or any single character
+other than these.
+
+=over 4
+
+=item [1]
+
+Clicking mouse button 1 positions the insertion cursor
+just before the character underneath the mouse cursor, sets the
+input focus to this widget, and clears any selection in the widget.
+Dragging with mouse button 1 strokes out a selection between
+the insertion cursor and the character under the mouse.
+
+=item [2]
+
+Double-clicking with mouse button 1 selects the word under the mouse
+and positions the insertion cursor at the beginning of the word.
+Dragging after a double click will stroke out a selection consisting
+of whole words.
+
+=item [3]
+
+Triple-clicking with mouse button 1 selects all of the text in the
+entry and positions the insertion cursor before the first character.
+
+=item [4]
+
+The ends of the selection can be adjusted by dragging with mouse
+button 1 while the Shift key is down; this will adjust the end
+of the selection that was nearest to the mouse cursor when button
+1 was pressed.
+If the button is double-clicked before dragging then the selection
+will be adjusted in units of whole words.
+
+=item [5]
+
+Clicking mouse button 1 with the Control key down will position the
+insertion cursor in the entry without affecting the selection.
+
+=item [6]
+
+If any normal printing characters are typed in an entry, they are
+inserted at the point of the insertion cursor.
+
+=item [7]
+
+The view in the entry can be adjusted by dragging with mouse button 2.
+If mouse button 2 is clicked without moving the mouse, the selection
+is copied into the entry at the position of the mouse cursor.
+
+=item [8]
+
+If the mouse is dragged out of the entry on the left or right sides
+while button 1 is pressed, the entry will automatically scroll to
+make more text visible (if there is more text off-screen on the side
+where the mouse left the window).
+
+=item [9]
+
+The Left and Right keys move the insertion cursor one character to the
+left or right; they also clear any selection in the entry and set
+the selection anchor.
+If Left or Right is typed with the Shift key down, then the insertion
+cursor moves and the selection is extended to include the new character.
+Control-Left and Control-Right move the insertion cursor by words, and
+Control-Shift-Left and Control-Shift-Right move the insertion cursor
+by words and also extend the selection.
+Control-b and Control-f behave the same as Left and Right, respectively.
+Meta-b and Meta-f behave the same as Control-Left and Control-Right,
+respectively.
+
+=item [10]
+
+The Home key, or Control-a, will move the insertion cursor to the
+beginning of the entry and clear any selection in the entry.
+Shift-Home moves the insertion cursor to the beginning of the entry
+and also extends the selection to that point.
+
+=item [11]
+
+The End key, or Control-e, will move the insertion cursor to the
+end of the entry and clear any selection in the entry.
+Shift-End moves the cursor to the end and extends the selection
+to that point.
+
+=item [12]
+
+The Select key and Control-Space set the selection anchor to the position
+of the insertion cursor. They don't affect the current selection.
+Shift-Select and Control-Shift-Space adjust the selection to the
+current position of the insertion cursor, selecting from the anchor
+to the insertion cursor if there was not any selection previously.
+
+=item [13]
+
+Control-/ selects all the text in the entry.
+
+=item [14]
+
+Control-\ clears any selection in the entry.
+
+=item [15]
+
+The F16 key (labelled Copy on many Sun workstations) or Meta-w
+copies the selection in the widget to the clipboard, if there is a selection.
+
+=item [16]
+
+The F20 key (labelled Cut on many Sun workstations) or Control-w
+copies the selection in the widget to the clipboard and deletes
+the selection.
+If there is no selection in the widget then these keys have no effect.
+
+=item [17]
+
+The F18 key (labelled Paste on many Sun workstations) or Control-y
+inserts the contents of the clipboard at the position of the
+insertion cursor.
+
+=item [18]
+
+The Delete key deletes the selection, if there is one in the entry.
+If there is no selection, it deletes the character to the right of
+the insertion cursor.
+
+=item [19]
+
+The BackSpace key and Control-h delete the selection, if there is one
+in the entry.
+If there is no selection, it deletes the character to the left of
+the insertion cursor.
+
+=item [20]
+
+Control-d deletes the character to the right of the insertion cursor.
+
+=item [21]
+
+Meta-d deletes the word to the right of the insertion cursor.
+
+=item [22]
+
+Control-k deletes all the characters to the right of the insertion
+cursor.
+
+=item [23]
+
+Control-t reverses the order of the two characters to the right of
+the insertion cursor.
+
+If the entry is disabled using the B<-state> option, then the entry's
+view can still be adjusted and text in the entry can still be selected,
+but no insertion cursor will be displayed and no text modifications will
+take place.
+
+The behavior of entries can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 KEYWORDS
+
+entry, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Error.pod b/Master/tlpkg/tlperl/lib/Tk/Error.pod
new file mode 100644
index 00000000000..9c38f0b7d74
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Error.pod
@@ -0,0 +1,145 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Error - Method invoked to process background errors
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+Customization:
+
+ require Tk::ErrorDialog;
+
+or
+
+ sub Tk::Error
+ {
+ my ($widget,$error,@locations) = @_;
+ ...
+
+ }
+
+=head1 DESCRIPTION
+
+The B<Tk::Error> method is invoked by perl/Tk when a background
+error occurs. Two possible implementations are provided in the
+distribution and individual applications or users can (re)define a B<Tk::Error>
+method (e.g. as a perl sub) if they wish to handle background
+errors in some other manner.
+
+A background error is one that occurs in a command that didn't
+originate with the application. For example, if an error occurs
+while executing a L<callback|Tk::callbacks> specified with a
+L<bind|Tk::bind> or a L<after|Tk::after>
+command, then it is a background error. For a non-background error,
+the error can simply be returned up through nested subroutines
+until it reaches the top-level code in the application;
+then the application can report the error in whatever way it
+wishes. When a background error occurs, the unwinding ends in
+the Tk library and there is no obvious way for Tk to report
+the error.
+
+When Tk detects a background error, it saves information about the
+error and invokes the B<Tk::Error> method later when Tk is idle.
+
+B<Tk::Error> is invoked by perl/Tk as if by the perl code:
+
+S< >I<$mainwindow>-E<gt>B<Tk::Error>(I<"error message">, I<location ...>);
+
+I<$mainwindow> is the B<MainWindow> associated with widget which
+detected the error, I<"error message"> is a string describing the error
+that has been detected, I<location> is a list of one or more "locations"
+which describe the call sequence at the point the error was detected.
+
+The locations are a typically a mixture of perl location reports giving
+script name and line number, and simple strings describing locations in
+core Tk or perl/Tk C code.
+
+Tk will ignore any result returned by the B<Tk::Error> method.
+If another error occurs within the B<Tk::Error> method
+(for example if it calls B<die>) then Tk reports this error
+itself by writing a message to stderr (this is to avoid infinite loops
+due to any bugs in B<Tk::Error>).
+
+If several background errors accumulate before B<Tk::Error>
+is invoked to process them, B<Tk::Error> will be invoked once
+for each error, in the order they occurred.
+However, if B<Tk::Error> calls B<Tk-E<gt>break>, then
+any remaining errors are skipped without calling B<Tk::Error>.
+
+The B<Tk> module includes a default B<Tk::Error> subroutine
+that simply reports the error on stderr.
+
+=head1 Tk::ErrorDialog
+
+An alternate definition is provided via:
+
+S< >C<require Tk::ErrorDialog;>
+
+that posts a dialog box containing the error message and offers
+the user a chance to see a stack trace showing where the
+error occurred.
+
+This is an OO implementation of the Tcl/Tk command B<bgerror>, with a
+twist: since there is only one B<ErrorDialog> widget, you aren't required
+to invoke the constructor to create it; it will be created
+automatically when the first background error occurs. However, in
+order to configure the I<-cleanupcode> and I<-appendtraceback>
+B<ErrorDialog> options you must call the constructor and create it
+manually.
+
+The B<ErrorDialog> object essentially consists of two subwidgets: a
+B<Dialog> widget to display the background error and a B<Text> widget
+for the traceback information. If required, you can invoke various
+widget methods to customize these subwidgets - their advertised names
+are described below.
+
+S< >I<$mw>-E<gt>B<ErrorDialog>(-cleanupcode => I<code>, -appendtraceback => I<bool>);
+
+$mw is a window reference.
+
+I<code> is a CODE reference if special post-background error
+processing is required (default is undefined). The callback subroutine
+is called with @_ having the same arguments that B<Tk::Error> was
+invoked with.
+
+I<bool> is a boolean indicating whether or not to append successive
+tracebacks (default is 1, do append).
+
+=head2 Advertised ErrorDialog widgets
+
+I<error_dialog> is the Dialog widget reference.
+
+I<text> is the Text widget reference containing the traceback information.
+
+=head1 BUGS
+
+If B<after> or B<fileevent> are not invoked as methods of a widget
+then perl/Tk is unable to provide a I<$mainwindow> argument.
+To support such code from earlier versions of perl/Tk
+perl/Tk therefore calls B<Tk::Error> with string 'Tk' instead:
+B<Tk-E<gt>Tk::Error\(...\)>.
+In this case the B<Tk::Error> in B<Tk::ErrorDialog> and similar
+implementations cannot "popup" a window as they don't know which display
+to use. A mechanism to supply I<the> B<MainWindow> in applications
+which only have one (a very common case) should be provided.
+
+=head1 SEE ALSO
+
+L<Tk::bind|Tk::bind>
+L<Tk::after|Tk::after>
+L<Tk::fileevent|Tk::fileevent>
+
+=head1 KEYWORDS
+
+background error, reporting
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/ErrorDialog.pm b/Master/tlpkg/tlperl/lib/Tk/ErrorDialog.pm
new file mode 100644
index 00000000000..2e327825b0b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ErrorDialog.pm
@@ -0,0 +1,129 @@
+package Tk::ErrorDialog;
+
+use vars qw($VERSION);
+#$VERSION = sprintf '4.%03d', q$Revision: #7 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.008';
+
+use Tk ();
+require Tk::Dialog;
+use base qw(Tk::Toplevel);
+
+
+# ErrorDialog - a translation of bgerror() from Tcl/Tk to Perl/Tk.
+#
+# Currently TkPerl background errors are sent to stdout/stderr; use this
+# module if you want them in a window. You can also "roll your own" by
+# supplying the routine Tk::Error.
+
+use strict;
+
+Construct Tk::Widget 'ErrorDialog';
+
+my %options = ( -buttons => ['OK', 'Skip Messages', 'Stack trace'],
+ -bitmap => 'error'
+ );
+my %ED_OBJECT; # ErrorDialog per MainWindow (singleton)
+
+sub import
+{
+ my $class = shift;
+ while (@_)
+ {
+ my $key = shift;
+ my $val = shift;
+ $options{$key} = $val;
+ }
+}
+
+sub Populate {
+
+ # ErrorDialog constructor. Uses `new' method from base class
+ # to create object container then creates the dialog toplevel and the
+ # traceback toplevel.
+
+ my($cw, $args) = @_;
+
+ my $mw = $cw->MainWindow;
+ my $dr = $mw->Dialog(
+ -title => 'Error in '.$mw->name,
+ -text => 'on-the-fly-text',
+ -bitmap => $options{'-bitmap'},
+ -buttons => $options{'-buttons'},
+ );
+ $cw->minsize(1, 1);
+ $cw->title('Stack Trace for Error');
+ $cw->iconname('Stack Trace');
+ my $t_ok = $cw->Button(
+ -text => 'OK',
+ -command => [
+ sub {
+ shift->withdraw;
+ }, $cw,
+ ]
+ );
+ my $t_text = $cw->Text(
+ -relief => 'sunken',
+ -bd => 2,
+ -setgrid => 'true',
+ -width => 60,
+ -height => 20,
+ );
+ my $t_scroll = $cw->Scrollbar(
+ -relief => 'sunken',
+ -command => ['yview', $t_text],
+ );
+ $t_text->configure(-yscrollcommand => ['set', $t_scroll]);
+ $t_ok->pack(-side => 'bottom', -padx => '3m', -pady => '2m');
+ $t_scroll->pack(-side => 'right', -fill => 'y');
+ $t_text->pack(-side => 'left', -expand => 'yes', -fill => 'both');
+ $cw->withdraw;
+
+ $cw->Advertise(error_dialog => $dr); # advertise dialog widget
+ $cw->Advertise(text => $t_text); # advertise text widget
+ $cw->ConfigSpecs(-cleanupcode => [PASSIVE => undef, undef, undef],
+ -appendtraceback => [ PASSIVE => undef, undef, 1 ]);
+ $ED_OBJECT{$mw} = $cw;
+ $cw->protocol('WM_DELETE_WINDOW' => sub {$cw->withdraw});
+ return $cw;
+
+} # end Populate
+
+sub Tk::Error {
+
+ # Post a dialog box with the error message and give the user a chance
+ # to see a more detailed stack trace.
+
+ my($w, $error, @msgs) = @_;
+
+ my $grab = $w->grab('current');
+ $grab->Unbusy if (defined $grab);
+
+ my $mw = $w->MainWindow;
+ my $ed = $ED_OBJECT{$mw} || $w->ErrorDialog;
+
+ my($d, $t) = ($ed->Subwidget('error_dialog'), $ed->Subwidget('text'));
+
+ $d->configure(-text => "Error: $error");
+ $d->bell;
+ $mw->deiconify if $mw->state ne 'normal';
+ my $ans = $d->Show;
+
+ $t->delete('0.0', 'end') if not $ed->{'-appendtraceback'};
+ $t->insert('end', "\n");
+ $t->mark('set', 'ltb', 'end');
+ $t->insert('end', "--- Begin Traceback ---\n$error\n");
+ my $msg;
+ for $msg (@msgs) {
+ $t->insert('end', "$msg\n");
+ }
+ $t->yview('ltb');
+
+ $ed->deiconify if ($ans =~ /trace/i);
+
+ my $c = $ed->{Configure}{'-cleanupcode'};
+ &$c if defined $c; # execute any cleanup code if it was defined
+ $w->break if ($ans =~ /skip/i);
+
+} # end Tk::Error
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Event.pm b/Master/tlpkg/tlperl/lib/Tk/Event.pm
new file mode 100644
index 00000000000..d8c3bc7ba92
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Event.pm
@@ -0,0 +1,14 @@
+package Tk::Event;
+use vars qw($VERSION $XS_VERSION @EXPORT_OK);
+END { CleanupGlue() }
+$VERSION = '4.024'; # was: sprintf '4.%03d', q$Revision: #15 $ =~ /\D(\d+)\s*$/;
+$XS_VERSION = '804.029';
+$XS_VERSION = eval $XS_VERSION;
+use base qw(Exporter);
+use XSLoader;
+@EXPORT_OK = qw($XS_VERSION DONT_WAIT WINDOW_EVENTS FILE_EVENTS
+ TIMER_EVENTS IDLE_EVENTS ALL_EVENTS);
+XSLoader::load 'Tk::Event',$XS_VERSION;
+require Tk::Event::IO;
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Event/IO.pm b/Master/tlpkg/tlperl/lib/Tk/Event/IO.pm
new file mode 100644
index 00000000000..3cd2fda3856
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Event/IO.pm
@@ -0,0 +1,132 @@
+package Tk::Event::IO;
+use strict;
+use Carp;
+
+use vars qw($VERSION @EXPORT_OK);
+$VERSION = '4.009'; # sprintf '4.%03d', q$Revision: #8 $ =~ /\D(\d+)\s*$/;
+
+use base qw(Exporter);
+use Symbol ();
+
+@EXPORT_OK = qw(READABLE WRITABLE);
+
+sub PrintArgs
+{
+ my $func = (caller(1))[3];
+ print "$func(",join(',',@_),")\n";
+}
+
+sub PRINT
+{
+ my $obj = shift;
+ $obj->wait(WRITABLE);
+ my $h = $obj->handle;
+ return print $h @_;
+}
+
+sub PRINTF
+{
+ my $obj = shift;
+ $obj->wait(WRITABLE);
+ my $h = $obj->handle;
+ return printf $h @_;
+}
+
+sub WRITE
+{
+ my $obj = $_[0];
+ $obj->wait(WRITABLE);
+ return syswrite($obj->handle,$_[1],$_[2]);
+}
+
+my $depth = 0;
+sub READLINE
+{
+ my $obj = shift;
+ $obj->wait(READABLE);
+ my $h = $obj->handle;
+ my $w = <$h>;
+ return $w;
+}
+
+sub READ
+{
+ my $obj = $_[0];
+ $obj->wait(READABLE);
+ my $h = $obj->handle;
+ return sysread($h,$_[1],$_[2],defined $_[3] ? $_[3] : 0);
+}
+
+sub GETC
+{
+ my $obj = $_[0];
+ $obj->wait(READABLE);
+ my $h = $obj->handle;
+ return getc($h);
+}
+
+sub CLOSE
+{
+ my $obj = shift;
+ $obj->unwatch;
+ my $h = $obj->handle;
+ return close($h);
+}
+
+sub EOF
+{
+ my $obj = shift;
+ my $h = $obj->handle;
+ return eof($h);
+}
+
+sub FILENO
+{
+ my $obj = shift;
+ my $h = $obj->handle;
+ return fileno($h);
+}
+
+sub imode
+{
+ my $mode = shift;
+ my $imode = ${{'readable' => READABLE(),
+ 'writable' => WRITABLE()}}{$mode};
+ croak("Invalid handler type '$mode'") unless (defined $imode);
+ return $imode;
+}
+
+sub fileevent
+{
+ my ($widget,$file,$mode,$cb) = @_;
+ my $imode = imode($mode);
+ unless (ref $file)
+ {
+ no strict 'refs';
+ $file = Symbol::qualify($file,(caller)[0]);
+ $file = \*{$file};
+ }
+ my $obj = tied(*$file);
+ unless ($obj && $obj->isa('Tk::Event::IO'))
+ {
+ $obj = tie *$file,'Tk::Event::IO', $file;
+ }
+ if (@_ == 3)
+ {
+ # query return the handler
+ return $obj->handler($imode);
+ }
+ else
+ {
+ # set the handler
+ my $h = $obj->handler($imode,$cb);
+ undef $obj; # Prevent warnings about untie with ref to object
+ unless ($h)
+ {
+ untie *$file;
+ }
+ }
+}
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Eventloop.pod b/Master/tlpkg/tlperl/lib/Tk/Eventloop.pod
new file mode 100644
index 00000000000..a4c99e7988e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Eventloop.pod
@@ -0,0 +1,62 @@
+
+=head1 NAME
+
+Tk::Event - ToolKit for Events
+
+=for category Implementation
+
+=head1 SYNOPSIS
+
+ use Tk::Event;
+
+ Tk::Event->fileevent(\*FH, 'readable' => callback);
+
+ Tk::Event->lineavail(\*FH, callback);
+
+ use Tk::Event::Signal qw(INT);
+
+ $SIG{'INT'} = callback;
+
+ use Tk::Event::process;
+
+ Tk::Event->proc($pid, callback);
+
+ QueueEvent(callback [, position])
+
+
+=head1 DESCRIPTION
+
+
+That is better than nothing but still hard to use. Most scripts want higher
+level result (a line, a "block" of data etc.)
+
+So it has occured to me that we could use new-ish TIEHANDLE thus:
+
+ my $obj = tie SOMEHANDLE,Tk::Event::IO;
+
+ while (<SOMEHANDLE>)
+ {
+ }
+
+Then the READLINE routine registers a callback and looks something like:
+
+ sub READLINE
+ {
+ my $obj = shift;
+ Event->io(*$obj,'readable',sub { sysread(*$obj,${*$obj},1,length(${*$obj}) });
+ my $pos;
+ while (($pos = index(${*$obj},$/) < 0)
+ {
+ DoOneEvent();
+ }
+ Event->io(*$obj,'readable',''); # unregister
+ $pos += length($/);
+ my $result = substr(${*$obj},0,$pos);
+ substr(${*$obj},0,$pos) = '';
+ return $result;
+ }
+
+This is using the scalar part of the glob representing the _inner_ IO
+as a buffer in which to accumulate chars.
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/FBox.pm b/Master/tlpkg/tlperl/lib/Tk/FBox.pm
new file mode 100644
index 00000000000..3aa025fbe2c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/FBox.pm
@@ -0,0 +1,1061 @@
+# -*- perl -*-
+#
+# tkfbox.tcl --
+#
+# Implements the "TK" standard file selection dialog box. This
+# dialog box is used on the Unix platforms whenever the tk_strictMotif
+# flag is not set.
+#
+# The "TK" standard file selection dialog box is similar to the
+# file selection dialog box on Win95(TM). The user can navigate
+# the directories by clicking on the folder icons or by
+# selecting the "Directory" option menu. The user can select
+# files by clicking on the file icons or by entering a filename
+# in the "Filename:" entry.
+#
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Translated to perl/Tk by Slaven Rezic <slaven@rezic.de>.
+#
+
+#----------------------------------------------------------------------
+#
+# F I L E D I A L O G
+#
+#----------------------------------------------------------------------
+# tkFDialog --
+#
+# Implements the TK file selection dialog. This dialog is used when
+# the tk_strictMotif flag is set to false. This procedure shouldn't
+# be called directly. Call tk_getOpenFile or tk_getSaveFile instead.
+#
+
+use 5.005; # qr//
+
+package Tk::FBox;
+require Tk::Toplevel;
+
+use strict;
+use vars qw($VERSION $updirImage $folderImage $fileImage);
+
+#$VERSION = sprintf '4.%03d', q$Revision: #18 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.021';
+
+use base qw(Tk::Toplevel);
+
+Construct Tk::Widget 'FBox';
+
+sub import {
+ if (defined $_[1] and $_[1] eq 'as_default') {
+ local $^W = 0;
+ package Tk;
+ if ($Tk::VERSION < 804) {
+ *FDialog = \&Tk::FBox::FDialog;
+ *MotifFDialog = \&Tk::FBox::FDialog;
+ } else {
+ *tk_getOpenFile = sub {
+ Tk::FBox::FDialog("tk_getOpenFile", @_);
+ };
+ *tk_getSaveFile = sub {
+ Tk::FBox::FDialog("tk_getSaveFile", @_);
+ };
+ }
+ }
+}
+
+# Note that -sortcmd is experimental and the interface is likely to change.
+# Using -sortcmd is really strange :-(
+# $top->getOpenFile(-sortcmd => sub { package Tk::FBox; uc $b cmp uc $a});
+# or, un-perlish, but useable (now activated in code):
+# $top->getOpenFile(-sortcmd => sub { uc $_[1] cmp uc $_[0]});
+
+sub Populate {
+ my($w, $args) = @_;
+
+ require Tk::IconList;
+ require File::Basename;
+ require Cwd;
+
+ $w->SUPER::Populate($args);
+
+ $w->{'encoding'} = $w->getEncoding('iso_8859_1');
+
+ # f1: the frame with the directory option menu
+ my $f1 = $w->Frame;
+ my $lab = $f1->Label(-text => 'Directory:', -underline => 0);
+ $w->{'dirMenu'} = my $dirMenu =
+ $f1->Optionmenu(-variable => \$w->{'selectPath'},
+ -textvariable => \$w->{'selectPath'},
+ -command => ['SetPath', $w]);
+ my $upBtn = $f1->Button;
+ if (!defined $updirImage->{$w->MainWindow}) {
+ $updirImage->{$w->MainWindow} = $w->Bitmap(-data => <<EOF);
+#define updir_width 28
+#define updir_height 16
+static char updir_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00,
+ 0x20, 0x40, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01, 0x10, 0x00, 0x00, 0x01,
+ 0x10, 0x02, 0x00, 0x01, 0x10, 0x07, 0x00, 0x01, 0x90, 0x0f, 0x00, 0x01,
+ 0x10, 0x02, 0x00, 0x01, 0x10, 0x02, 0x00, 0x01, 0x10, 0x02, 0x00, 0x01,
+ 0x10, 0xfe, 0x07, 0x01, 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x01,
+ 0xf0, 0xff, 0xff, 0x01};
+EOF
+ }
+ $upBtn->configure(-image => $updirImage->{$w->MainWindow});
+ $dirMenu->configure(-takefocus => 1, -highlightthickness => 2);
+ $upBtn->pack(-side => 'right', -padx => 4, -fill => 'both');
+ $lab->pack(-side => 'left', -padx => 4, -fill => 'both');
+ $dirMenu->pack(-expand => 'yes', -fill => 'both', -padx => 4);
+
+ $w->{'icons'} = my $icons =
+ $w->IconList(-command => ['OkCmd', $w, 'iconlist'],
+ );
+ $icons->bind('<<ListboxSelect>>' => [$w, 'ListBrowse']);
+
+ # f2: the frame with the OK button and the "file name" field
+ my $f2 = $w->Frame(-bd => 0);
+#XXX File name => File names if multiple
+ my $f2_lab = $f2->Label(-text => 'File name:', -anchor => 'e',
+ -width => 14, -underline => 5, -pady => 0);
+ $w->{'ent'} = my $ent = $f2->Entry;
+
+ # The font to use for the icons. The default Canvas font on Unix
+ # is just deviant.
+# $w->{'icons'}{'font'} = $ent->cget(-font);
+ $w->{'icons'}->configure(-font => $ent->cget(-font));
+
+ # f3: the frame with the cancel button and the file types field
+ my $f3 = $w->Frame(-bd => 0);
+
+ # The "File of types:" label needs to be grayed-out when
+ # -filetypes are not specified. The label widget does not support
+ # grayed-out text on monochrome displays. Therefore, we have to
+ # use a button widget to emulate a label widget (by setting its
+ # bindtags)
+ $w->{'typeMenuLab'} = my $typeMenuLab = $f3->Button
+ (-text => 'Files of type:',
+ -anchor => 'e',
+ -width => 14,
+ -underline => 9,
+ -bd => $f2_lab->cget(-bd),
+ -highlightthickness => $f2_lab->cget(-highlightthickness),
+ -relief => $f2_lab->cget(-relief),
+ -padx => $f2_lab->cget(-padx),
+ -pady => $f2_lab->cget(-pady),
+ -takefocus => 0,
+ );
+ $typeMenuLab->bindtags([$typeMenuLab, 'Label',
+ $typeMenuLab->toplevel, 'all']);
+ $w->{'typeMenuBtn'} = my $typeMenuBtn =
+ $f3->Menubutton(-indicatoron => 1, -tearoff => 0);
+ $typeMenuBtn->configure(-takefocus => 1,
+ -highlightthickness => 2,
+ -relief => 'raised',
+ -bd => 2,
+ -anchor => 'w',
+ );
+
+ # the okBtn is created after the typeMenu so that the keyboard traversal
+ # is in the right order
+ $w->{'okBtn'} = my $okBtn = $f2->Button
+ (-text => 'OK',
+ -underline => 0,
+ -width => 6,
+ -default => 'active',
+ -pady => 3,
+ );
+ my $cancelBtn = $f3->Button
+ (-text => 'Cancel',
+ -underline => 0,
+ -width => 6,
+ -default => 'normal',
+ -pady => 3,
+ );
+
+ # pack the widgets in f2 and f3
+ $okBtn->pack(-side => 'right', -padx => 4, -anchor => 'e');
+ $f2_lab->pack(-side => 'left', -padx => 4);
+ $ent->pack(-expand => 'yes', -fill => 'x', -padx => 2, -pady => 0);
+ $cancelBtn->pack(-side => 'right', -padx => 4, -anchor => 'w');
+ $typeMenuLab->pack(-side => 'left', -padx => 4);
+ $typeMenuBtn->pack(-expand => 'yes', -fill => 'x', -side => 'right');
+
+ # Pack all the frames together. We are done with widget construction.
+ $f1->pack(-side => 'top', -fill => 'x', -pady => 4);
+ $f3->pack(-side => 'bottom', -fill => 'x');
+ $f2->pack(-side => 'bottom', -fill => 'x');
+ $icons->pack(-expand => 'yes', -fill => 'both', -padx => 4, -pady => 1);
+
+ # Set up the event handlers
+ $ent->bind('<Return>',[$w,'ActivateEnt']);
+ $upBtn->configure(-command => ['UpDirCmd', $w]);
+ $okBtn->configure(-command => ['OkCmd', $w]);
+ $cancelBtn->configure(-command, ['CancelCmd', $w]);
+
+ $w->bind('<Alt-d>',[$dirMenu,'focus']);
+ $w->bind('<Alt-t>',sub {
+ if ($typeMenuBtn->cget(-state) eq 'normal') {
+ $typeMenuBtn->focus;
+ } });
+ $w->bind('<Alt-n>',[$ent,'focus']);
+ $w->bind('<KeyPress-Escape>',[$cancelBtn,'invoke']);
+ $w->bind('<Alt-c>',[$cancelBtn,'invoke']);
+ $w->bind('<Alt-o>',['InvokeBtn','Open']);
+ $w->bind('<Alt-s>',['InvokeBtn','Save']);
+ $w->protocol('WM_DELETE_WINDOW', ['CancelCmd', $w]);
+ $w->OnDestroy(['CancelCmd', $w]);
+
+ # Build the focus group for all the entries
+ $w->FG_Create;
+ $w->FG_BindIn($ent, ['EntFocusIn', $w]);
+ $w->FG_BindOut($ent, ['EntFocusOut', $w]);
+
+ $w->SetPath(_cwd());
+
+ $w->ConfigSpecs(-defaultextension => ['PASSIVE', undef, undef, undef],
+ -filetypes => ['PASSIVE', undef, undef, undef],
+ -initialdir => ['PASSIVE', undef, undef, undef],
+ -initialfile => ['PASSIVE', undef, undef, undef],
+# -sortcmd => ['PASSIVE', undef, undef, sub { lc($a) cmp lc($b) }],
+ -sortcmd => ['PASSIVE', undef, undef, sub { lc($_[0]) cmp lc($_[1]) }],
+ -title => ['PASSIVE', undef, undef, undef],
+ -type => ['PASSIVE', undef, undef, 'open'],
+ -filter => ['PASSIVE', undef, undef, '*'],
+ -force => ['PASSIVE', undef, undef, 0],
+ -multiple => ['PASSIVE', undef, undef, 0],
+ 'DEFAULT' => [$icons],
+ );
+ # So-far-failed attempt to break reference loops ...
+ $w->_OnDestroy(qw(dirMenu icons typeMenuLab typeMenuBtn okBtn ent updateId));
+ $w;
+}
+
+# -initialdir fix with ResolveFile
+sub Show {
+ my $w = shift;
+
+ $w->configure(@_);
+
+ # Dialog boxes should be transient with respect to their parent,
+ # so that they will always stay on top of their parent window. However,
+ # some window managers will create the window as withdrawn if the parent
+ # window is withdrawn or iconified. Combined with the grab we put on the
+ # window, this can hang the entire application. Therefore we only make
+ # the dialog transient if the parent is viewable.
+
+ if (Tk::Exists($w->Parent) && $w->Parent->viewable) {
+ $w->transient($w->Parent);
+ }
+
+ # set the default directory and selection according to the -initial
+ # settings
+ {
+ my $initialdir = $w->cget(-initialdir);
+ if (defined $initialdir) {
+ my ($flag, $path, $file) = ResolveFile($initialdir, 'junk');
+ if ($flag eq 'OK' or $flag eq 'FILE') {
+ $w->{'selectPath'} = $path;
+ } else {
+ $w->Error("\"$initialdir\" is not a valid directory");
+ }
+ }
+ $w->{'selectFile'} = $w->cget(-initialfile);
+ }
+
+ # Set -multiple to a one or zero value (not other boolean types
+ # like "yes") so we can use it in tests more easily.
+ if ($w->cget('-type') ne 'open') {
+ $w->configure(-multiple => 0);
+ } else {
+ $w->configure(-multiple => !!$w->cget('-multiple'));
+ }
+ $w->{'icons'}->configure(-multiple => $w->cget('-multiple'));
+
+ # Initialize the file types menu
+ my $typeMenuBtn = $w->{'typeMenuBtn'};
+ my $typeMenuLab = $w->{'typeMenuLab'};
+ if (defined $w->cget('-filetypes')) {
+ my(@filetypes) = GetFileTypes($w->cget('-filetypes'));
+ my $typeMenu = $typeMenuBtn->cget(-menu);
+ $typeMenu->delete(0, 'end');
+ foreach my $ft (@filetypes) {
+ my $title = $ft->[0];
+ my $filter = join(' ', @{ $ft->[1] });
+ $typeMenuBtn->command
+ (-label => $title,
+ -command => ['SetFilter', $w, $title, $filter],
+ );
+ }
+ $w->SetFilter($filetypes[0]->[0], join(' ', @{ $filetypes[0]->[1] }));
+ $typeMenuBtn->configure(-state => 'normal');
+ $typeMenuLab->configure(-state => 'normal');
+ } else {
+#XXX $w->configure(-filter => '*');
+ $typeMenuBtn->configure(-state => 'disabled',
+ -takefocus => 0);
+ $typeMenuLab->configure(-state => 'disabled');
+ }
+ $w->UpdateWhenIdle;
+
+ {
+ my $title = $w->cget(-title);
+ if (!defined $title) {
+ my $type = $w->cget(-type);
+ $title = ($type eq 'dir') ? 'Choose Directory'
+ : ($type eq 'save') ? 'Save As' : 'Open';
+ }
+ $w->title($title);
+ }
+
+ # Withdraw the window, then update all the geometry information
+ # so we know how big it wants to be, then center the window in the
+ # display and de-iconify it.
+ $w->withdraw;
+ $w->idletasks;
+ if (0)
+ {
+ #XXX use Tk::Wm::Popup? or Tk::PlaceWindow?
+ my $x = int($w->screenwidth / 2 - $w->reqwidth / 2 - $w->parent->vrootx);
+ my $y = int($w->screenheight / 2 - $w->reqheight / 2 - $w->parent->vrooty);
+ $w->geometry("+$x+$y");
+ $w->deiconify;
+ }
+ else
+ {
+ $w->Popup;
+ }
+
+ # Set a grab and claim the focus too.
+#XXX use Tk::setFocusGrab when it's available
+ my $oldFocus = $w->focusCurrent;
+ my $oldGrab = $w->grabCurrent;
+ my $grabStatus; $grabStatus = $oldGrab->grabStatus if ($oldGrab);
+ $w->grab;
+ my $ent = $w->{'ent'};
+ $ent->focus;
+ $ent->delete(0, 'end');
+ if (defined $w->{'selectFile'} && $w->{'selectFile'} ne '') {
+ $ent->insert(0, $w->{'selectFile'});
+ $ent->selectionRange(0,'end');
+ $ent->icursor('end');
+ }
+
+ # 8. Wait for the user to respond, then restore the focus and
+ # return the index of the selected button. Restore the focus
+ # before deleting the window, since otherwise the window manager
+ # may take the focus away so we can't redirect it. Finally,
+ # restore any grab that was in effect.
+ $w->waitVariable(\$w->{'selectFilePath'});
+ eval {
+ $oldFocus->focus if $oldFocus;
+ };
+ if (Tk::Exists($w)) { # widget still exists
+ $w->grabRelease;
+ $w->withdraw;
+ }
+ if (Tk::Exists($oldGrab) && $oldGrab->viewable) {
+ if ($grabStatus eq 'global') {
+ $oldGrab->grabGlobal;
+ } else {
+ $oldGrab->grab;
+ }
+ }
+ return $w->{'selectFilePath'};
+}
+
+# tkFDialog_UpdateWhenIdle --
+#
+# Creates an idle event handler which updates the dialog in idle
+# time. This is important because loading the directory may take a long
+# time and we don't want to load the same directory for multiple times
+# due to multiple concurrent events.
+#
+sub UpdateWhenIdle {
+ my $w = shift;
+ if (exists $w->{'updateId'}) {
+ return;
+ } else {
+ $w->{'updateId'} = $w->after('idle', [$w, 'Update']);
+ }
+}
+
+# tkFDialog_Update --
+#
+# Loads the files and directories into the IconList widget. Also
+# sets up the directory option menu for quick access to parent
+# directories.
+#
+sub Update {
+ my $w = shift;
+ my $dataName = $w->name;
+
+ # This proc may be called within an idle handler. Make sure that the
+ # window has not been destroyed before this proc is called
+ if (!Tk::Exists($w) || $w->class ne 'FBox') {
+ return;
+ } else {
+ delete $w->{'updateId'};
+ }
+ unless (defined $folderImage->{$w->MainWindow}) {
+ require Tk::Pixmap;
+ $folderImage->{$w->MainWindow} = $w->Pixmap(-file => Tk->findINC('folder.xpm'));
+ $fileImage->{$w->MainWindow} = $w->Pixmap(-file => Tk->findINC('file.xpm'));
+ }
+ my $folder = $folderImage->{$w->MainWindow};
+ my $file = $fileImage->{$w->MainWindow};
+ my $appPWD = _cwd();
+ if (!ext_chdir($w->_get_select_path)) {
+ # We cannot change directory to $data(selectPath). $data(selectPath)
+ # should have been checked before tkFDialog_Update is called, so
+ # we normally won't come to here. Anyways, give an error and abort
+ # action.
+ $w->messageBox(-type => 'OK',
+ -message => 'Cannot change to the directory "' .
+ $w->_get_select_path . "\".\nPermission denied.",
+ -icon => 'warning',
+ );
+ ext_chdir($appPWD);
+ return;
+ }
+
+ # Turn on the busy cursor. BUG?? We haven't disabled X events, though,
+ # so the user may still click and cause havoc ...
+ my $ent = $w->{'ent'};
+ my $entCursor = $ent->cget(-cursor);
+ my $dlgCursor = $w->cget(-cursor);
+ $ent->configure(-cursor => 'watch');
+ $w->configure(-cursor => 'watch');
+ $w->idletasks;
+ my $icons = $w->{'icons'};
+ $icons->DeleteAll;
+
+ # Make the dir & file list
+ my $cwd = _cwd();
+ local *FDIR;
+ if (opendir(FDIR, $cwd)) {
+ my @files;
+# my $sortcmd = $w->cget(-sortcmd);
+ my $sortcmd = sub { $w->cget(-sortcmd)->($a,$b) };
+ my $flt = $w->cget(-filter);
+ my $fltcb;
+ if (ref $flt eq 'CODE') {
+ $fltcb = $flt;
+ } else {
+ $flt = _rx_to_glob($flt);
+ }
+ my $type_dir = $w->cget(-type) eq 'dir';
+ foreach my $f (sort $sortcmd readdir(FDIR)) {
+ next if $f eq '.' or $f eq '..';
+ next if $type_dir && ! -d "$cwd/$f"; # XXX use File::Spec?
+ if ($fltcb) {
+ next if !$fltcb->($w, $f, $cwd);
+ } else {
+ next if !-d $f && $f !~ m!$flt!s;
+ }
+ if (-d $f) {
+ $icons->Add($folder, $f);
+ } else {
+ push @files, $f;
+ }
+ }
+ closedir(FDIR);
+ $icons->Add($file, @files);
+ }
+
+ $icons->Arrange;
+
+ # Update the Directory: option menu
+ my @list;
+ my $dir = '';
+ foreach my $subdir (TclFileSplit($w->_get_select_path)) {
+ $dir = TclFileJoin($dir, $subdir);
+ push @list, $dir;
+ }
+ my $dirMenu = $w->{'dirMenu'};
+ $dirMenu->configure(-options => \@list);
+
+ # Restore the PWD to the application's PWD
+ ext_chdir($appPWD);
+
+ # Restore the Save label
+ if ($w->cget(-type) eq 'save') {
+ $w->{'okBtn'}->configure(-text => 'Save');
+ }
+
+ # turn off the busy cursor.
+ $ent->configure(-cursor => $entCursor);
+ $w->configure(-cursor => $dlgCursor);
+}
+
+# tkFDialog_SetPathSilently --
+#
+# Sets data(selectPath) without invoking the trace procedure
+#
+sub SetPathSilently {
+ my($w, $path) = @_;
+
+ $w->{'selectPath'} = $path;
+}
+
+# This proc gets called whenever data(selectPath) is set
+#
+sub SetPath {
+ my $w = shift;
+ $w->{'selectPath'} = $_[0] if @_;
+ $w->UpdateWhenIdle;
+}
+
+# This proc gets called whenever data(filter) is set
+#
+#XXX here's much more code in the tcl version ... check it out
+sub SetFilter {
+ my($w, $title, $filter) = @_;
+ $w->configure(-filter => $filter);
+ $w->{'typeMenuBtn'}->configure(-text => $title,
+ -indicatoron => 1);
+ $w->{'icons'}->Subwidget('sbar')->set(0.0, 0.0);
+ $w->UpdateWhenIdle;
+}
+
+# tkFDialogResolveFile --
+#
+# Interpret the user's text input in a file selection dialog.
+# Performs:
+#
+# (1) ~ substitution
+# (2) resolve all instances of . and ..
+# (3) check for non-existent files/directories
+# (4) check for chdir permissions
+#
+# Arguments:
+# context: the current directory you are in
+# text: the text entered by the user
+# defaultext: the default extension to add to files with no extension
+#
+# Return value:
+# [list $flag $directory $file]
+#
+# flag = OK : valid input
+# = PATTERN : valid directory/pattern
+# = PATH : the directory does not exist
+# = FILE : the directory exists but the file doesn't
+# exist
+# = CHDIR : Cannot change to the directory
+# = ERROR : Invalid entry
+#
+# directory : valid only if flag = OK or PATTERN or FILE
+# file : valid only if flag = OK or PATTERN
+#
+# directory may not be the same as context, because text may contain
+# a subdirectory name
+#
+sub ResolveFile {
+ my($context, $text, $defaultext) = @_;
+ my $appPWD = _cwd();
+ my $path = JoinFile($context, $text);
+ # If the file has no extension, append the default. Be careful not
+ # to do this for directories, otherwise typing a dirname in the box
+ # will give back "dirname.extension" instead of trying to change dir.
+ if (!-d $path && $path !~ /\..+$/s && defined $defaultext) {
+ $path = "$path$defaultext";
+ }
+ # Cannot just test for existance here as non-existing files are
+ # not an error for getSaveFile type dialogs.
+ # return ('ERROR', $path, "") if (!-e $path);
+ my($directory, $file, $flag);
+ if (-e $path) {
+ if (-d $path) {
+ if (!ext_chdir($path)) {
+ return ('CHDIR', $path, '');
+ }
+ $directory = _cwd();
+ $file = '';
+ $flag = 'OK';
+ ext_chdir($appPWD);
+ } else {
+ my $dirname = File::Basename::dirname($path);
+ if (!ext_chdir($dirname)) {
+ return ('CHDIR', $dirname, '');
+ }
+ $directory = _cwd();
+ $file = File::Basename::basename($path);
+ $flag = 'OK';
+ ext_chdir($appPWD);
+ }
+ } else {
+ my $dirname = File::Basename::dirname($path);
+ if (-e $dirname) {
+ if (!ext_chdir($dirname)) {
+ return ('CHDIR', $dirname, '');
+ }
+ $directory = _cwd();
+ $file = File::Basename::basename($path);
+ if ($file =~ /[*?]/) {
+ $flag = 'PATTERN';
+ } else {
+ $flag = 'FILE';
+ }
+ ext_chdir($appPWD);
+ } else {
+ $directory = $dirname;
+ $file = File::Basename::basename($path);
+ $flag = 'PATH';
+ }
+ }
+ return ($flag,$directory,$file);
+}
+
+# Gets called when the entry box gets keyboard focus. We clear the selection
+# from the icon list . This way the user can be certain that the input in the
+# entry box is the selection.
+#
+sub EntFocusIn {
+ my $w = shift;
+ my $ent = $w->{'ent'};
+ if ($ent->get ne '') {
+ $ent->selectionRange(0, 'end');
+ $ent->icursor('end');
+ } else {
+ $ent->selectionClear;
+ }
+#XXX is this missing in the tcl version, too??? $w->{'icons'}->Selection('clear');
+ my $okBtn = $w->{'okBtn'};
+ if ($w->cget(-type) ne 'save') {
+ $okBtn->configure(-text => 'Open');
+ } else {
+ $okBtn->configure(-text => 'Save');
+ }
+}
+
+sub EntFocusOut {
+ my $w = shift;
+ $w->{'ent'}->selectionClear;
+}
+
+# Gets called when user presses Return in the "File name" entry.
+#
+sub ActivateEnt {
+ my $w = shift;
+ if ($w->cget(-multiple)) {
+ # For the multiple case we have to be careful to get the file
+ # names as a true list, watching out for a single file with a
+ # space in the name. Thus we query the IconList directly.
+
+ $w->{'selectFile'} = [];
+ for my $item ($w->{'icons'}->Curselection) {
+ $w->VerifyFileName($w->_get_from_icons($item));
+ }
+ } else {
+ my $ent = $w->{'ent'};
+ my $text = $w->_encode_filename($ent->get);
+ $w->VerifyFileName($text);
+ }
+}
+
+# Verification procedure
+#
+sub VerifyFileName {
+ my($w, $text) = @_;
+#XXX leave this here?
+# $text =~ s/^\s+//;
+# $text =~ s/\s+$//;
+ my($flag, $path, $file) = ResolveFile($w->_get_select_path, $text,
+ $w->cget(-defaultextension));
+ my $ent = $w->{'ent'};
+ if ($flag eq 'OK') {
+ if ($file eq '') {
+ # user has entered an existing (sub)directory
+ $w->SetPath($path);
+ $ent->delete(0, 'end');
+ } else {
+ $w->SetPathSilently($path);
+ if ($w->cget(-multiple)) {
+ push @{ $w->{'selectFile'} }, $file;
+ } else {
+ $w->{'selectFile'} = $file;
+ }
+ $w->Done;
+ }
+ } elsif ($flag eq 'PATTERN') {
+ $w->SetPath($path);
+ $w->configure(-filter => $file);
+ } elsif ($flag eq 'FILE') {
+ if ($w->cget(-type) eq 'open') {
+ $w->messageBox(-icon => 'warning',
+ -type => 'OK',
+ -message => 'File "' . TclFileJoin($path, $file)
+ . '" does not exist.');
+ $ent->selectionRange(0, 'end');
+ $ent->icursor('end');
+ } elsif ($w->cget(-type) eq 'save') {
+ $w->SetPathSilently($path);
+ if ($w->cget(-multiple)) {
+ push @{ $w->{'selectFile'} }, $file;
+ } else {
+ $w->{'selectFile'} = $file;
+ }
+ $w->Done;
+ }
+ } elsif ($flag eq 'PATH') {
+ $w->messageBox(-icon => 'warning',
+ -type => 'OK',
+ -message => "Directory \'$path\' does not exist.");
+ $ent->selectionRange(0, 'end');
+ $ent->icursor('end');
+ } elsif ($flag eq 'CHDIR') {
+ $w->messageBox(-type => 'OK',
+ -message => "Cannot change to the directory \"$path\".\nPermission denied.",
+ -icon => 'warning');
+ $ent->selectionRange(0, 'end');
+ $ent->icursor('end');
+ } elsif ($flag eq 'ERROR') {
+ $w->messageBox(-type => 'OK',
+ -message => "Invalid file name \"$path\".",
+ -icon => 'warning');
+ $ent->selectionRange(0, 'end');
+ $ent->icursor('end');
+ }
+}
+
+# Gets called when user presses the Alt-s or Alt-o keys.
+#
+sub InvokeBtn {
+ my($w, $key) = @_;
+ my $okBtn = $w->{'okBtn'};
+ $okBtn->invoke if ($okBtn->cget(-text) eq $key);
+}
+
+# Gets called when user presses the "parent directory" button
+#
+sub UpDirCmd {
+ my $w = shift;
+ $w->SetPath(File::Basename::dirname($w->_get_select_path))
+ unless ($w->_get_select_path eq '/');
+}
+
+# Join a file name to a path name. The "file join" command will break
+# if the filename begins with ~
+sub JoinFile {
+ my($path, $file) = @_;
+ if ($file =~ /^~/ && -e "$path/$file") {
+ TclFileJoin($path, "./$file");
+ } else {
+ TclFileJoin($path, $file);
+ }
+}
+
+# XXX replace with File::Spec if possible
+sub TclFileJoin {
+ my $path = '';
+ foreach (@_) {
+ if (m|^/|) {
+ $path = $_;
+ } elsif (m|^[a-z]:/|i) { # DOS-ish
+ $path = $_;
+ } elsif ($_ eq '~') {
+ $path = _get_homedir();
+ } elsif (m|^~/(.*)|) {
+ $path = _get_homedir() . "/" . $1;
+ } elsif (m|^~([^/]+)(.*)|) {
+ my($user, $p) = ($1, $2);
+ my $dir = _get_homedir($user);
+ if (!defined $dir) {
+ $path = "~$user$p";
+ } else {
+ $path = $dir . $p;
+ }
+ } elsif ($path eq '/' or $path eq '') {
+ $path .= $_;
+ } else {
+ $path .= "/$_";
+ }
+ }
+ $path;
+}
+
+sub TclFileSplit {
+ my $path = shift;
+ my @comp;
+ $path =~ s|/+|/|g; # strip multiple slashes
+ if ($path =~ m|^/|) {
+ push @comp, '/';
+ $path = substr($path, 1);
+ }
+ push @comp, split /\//, $path;
+ @comp;
+}
+
+# Gets called when user presses the "OK" button
+#
+sub OkCmd {
+ my $w = shift;
+ my $from = shift || "button";
+
+ my $filenames = [];
+ for my $item ($w->{'icons'}->Curselection) {
+ push @$filenames, $w->_get_from_icons($item);
+ }
+
+ my $filename = $filenames->[0];
+ $filename = "" if !defined $filename;
+ if ($w->cget('-type') eq 'dir' && $from ne "iconlist") {
+ my $file = $filename eq '' ? $w->_get_select_path : JoinFile($w->_get_select_path, $filename);
+ $w->Done($file);
+ } elsif ((@$filenames && !$w->cget('-multiple')) ||
+ ($w->cget('-multiple') && @$filenames == 1)) {
+ my $file = JoinFile($w->_get_select_path, $filename);
+ if (-d $file) {
+ $w->ListInvoke($filename);
+ return;
+ }
+ }
+
+ $w->ActivateEnt;
+}
+
+# Gets called when user presses the "Cancel" button
+#
+sub CancelCmd {
+ my $w = shift;
+ undef $w->{'selectFilePath'};
+}
+
+# Gets called when user browses the IconList widget (dragging mouse, arrow
+# keys, etc)
+#
+sub ListBrowse {
+ my($w) = @_;
+
+ my $text = [];
+ for my $item ($w->{'icons'}->Curselection) {
+ push @$text, $w->_get_from_icons($item);
+ }
+ return if @$text == 0;
+ my $isDir;
+ if (@$text > 1) {
+ my $newtext = [];
+ for my $file (@$text) {
+ my $fullfile = JoinFile($w->_get_select_path, $file);
+ if (!-d $fullfile) {
+ push @$newtext, $file;
+ }
+ }
+ $text = $newtext;
+ $isDir = 0;
+ } else {
+ my $file = JoinFile($w->_get_select_path, $text->[0]);
+ $isDir = -d $file;
+ }
+ my $ent = $w->{'ent'};
+ my $okBtn = $w->{'okBtn'};
+ if (!$isDir) {
+ $ent->delete(qw(0 end));
+ $ent->insert(0, "@$text"); # XXX quote!
+
+ if ($w->cget('-type') ne 'save') {
+ $okBtn->configure(-text => 'Open');
+ } else {
+ $okBtn->configure(-text => 'Save');
+ }
+ } else {
+ $okBtn->configure(-text => 'Open');
+ }
+}
+
+# Gets called when user invokes the IconList widget (double-click,
+# Return key, etc)
+#
+sub ListInvoke {
+ my($w, @filenames) = @_;
+ return if !@filenames;
+ my $file = JoinFile($w->_get_select_path, $filenames[0]);
+ if (-d $file) {
+ my $appPWD = _cwd();
+ if (!ext_chdir($file)) {
+ $w->messageBox(-type => 'OK',
+ -message => "Cannot change to the directory \"$file\".\nPermission denied.",
+ -icon => 'warning');
+ } else {
+ ext_chdir($appPWD);
+ $w->SetPath($file);
+ }
+ } else {
+ if ($w->cget('-multiple')) {
+ $w->{'selectFile'} = [@filenames];
+ } else {
+ $w->{'selectFile'} = $file;
+ }
+ $w->Done;
+ }
+}
+
+# tkFDialog_Done --
+#
+# Gets called when user has input a valid filename. Pops up a
+# dialog box to confirm selection when necessary. Sets the
+# tkPriv(selectFilePath) variable, which will break the "tkwait"
+# loop in tkFDialog and return the selected filename to the
+# script that calls tk_getOpenFile or tk_getSaveFile
+#
+sub Done {
+ my $w = shift;
+ my $selectFilePath = (@_) ? shift : '';
+ if ($selectFilePath eq '') {
+ if ($w->cget('-multiple')) {
+ $selectFilePath = [];
+ for my $f (@{ $w->{'selectFile'} }) {
+ push @$selectFilePath, JoinFile($w->_get_select_path, $f);
+ }
+ } else {
+ $selectFilePath = JoinFile($w->_get_select_path,
+ $w->{'selectFile'});
+ }
+ if ($w->cget(-type) eq 'save' and
+ -e $selectFilePath and
+ !$w->cget(-force)) {
+ my $reply = $w->messageBox
+ (-icon => 'warning',
+ -type => 'YesNo',
+ -message => "File \"$selectFilePath\" already exists.\nDo you want to overwrite it?");
+ return unless (lc($reply) eq 'yes');
+ }
+ }
+ $w->{'selectFilePath'} = ($selectFilePath ne '' ? $selectFilePath : undef);
+}
+
+sub FDialog {
+ my $cmd = shift;
+ if ($cmd =~ /Save/) {
+ push @_, -type => 'save';
+ } elsif ($cmd =~ /Directory/) {
+ push @_, -type => 'dir';
+ }
+ Tk::DialogWrapper('FBox', $cmd, @_);
+}
+
+# tkFDGetFileTypes --
+#
+# Process the string given by the -filetypes option of the file
+# dialogs. Similar to the C function TkGetFileFilters() on the Mac
+# and Windows platform.
+#
+sub GetFileTypes {
+ my $in = shift;
+ my %fileTypes;
+ foreach my $t (@$in) {
+ if (@$t < 2 || @$t > 3) {
+ require Carp;
+ Carp::croak("bad file type \"$t\", should be \"typeName [extension ?extensions ...?] ?[macType ?macTypes ...?]?\"");
+ }
+ push @{ $fileTypes{$t->[0]} }, (ref $t->[1] eq 'ARRAY'
+ ? @{ $t->[1] }
+ : $t->[1]);
+ }
+
+ my @types;
+ my %hasDoneType;
+ my %hasGotExt;
+ foreach my $t (@$in) {
+ my $label = $t->[0];
+ my @exts;
+
+ next if (exists $hasDoneType{$label});
+
+ my $name = "$label (";
+ my $sep = '';
+ foreach my $ext (@{ $fileTypes{$label} }) {
+ next if ($ext eq '');
+ $ext =~ s/^\./*./;
+ if (!exists $hasGotExt{$label}->{$ext}) {
+ $name .= "$sep$ext";
+ push @exts, $ext;
+ $hasGotExt{$label}->{$ext}++;
+ }
+ $sep = ',';
+ }
+ $name .= ')';
+ push @types, [$name, \@exts];
+
+ $hasDoneType{$label}++;
+ }
+
+ return @types;
+}
+
+# ext_chdir --
+#
+# Change directory with tilde substitution
+#
+sub ext_chdir {
+ my $dir = shift;
+ if ($dir eq '~') {
+ chdir _get_homedir();
+ } elsif ($dir =~ m|^~/(.*)|s) {
+ chdir _get_homedir() . "/" . $1;
+ } elsif ($dir =~ m|^~([^/]+(.*))|s) {
+ chdir _get_homedir($1) . $2;
+ } else {
+ chdir $dir;
+ }
+}
+
+# _get_homedir --
+#
+# Get home directory of the current user
+#
+sub _get_homedir {
+ my($user) = @_;
+ if (!defined $user) {
+ eval {
+ local $SIG{__DIE__};
+ (getpwuid($<))[7];
+ } || $ENV{HOME} || undef; # chdir undef changes to home directory, too
+ } else {
+ eval {
+ local $SIG{__DIE__};
+ (getpwnam($user))[7];
+ };
+ }
+}
+
+sub _cwd {
+ #Cwd::cwd();
+ Cwd::fastcwd(); # this is taint-safe
+}
+
+sub _untaint {
+ my $s = shift;
+ $s =~ /^(.*)$/;
+ $1;
+}
+
+sub _rx_to_glob {
+ my $arg = shift;
+ $arg =~ s!([.+^()|\${}\[\]\\])!\\$1!g;
+ $arg = join('|', map {"^$_\\z"} split(' ', $arg));
+ $arg =~ s!\*!.*!g;$arg =~ s!\?!.!g;
+ $arg = qr/$arg/s;
+ $arg;
+}
+
+sub _get_from_icons {
+ my($w, $item) = @_;
+ $w->_encode_filename($w->{'icons'}->Get($item));
+}
+
+sub _get_select_path {
+ my($w) = @_;
+ $w->_encode_filename($w->{'selectPath'});
+}
+
+sub _encode_filename {
+ my($w, $filename) = @_;
+ $filename = $w->{encoding}->encode($filename);
+ $filename;
+}
+
+1;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/FBox.pod b/Master/tlpkg/tlperl/lib/Tk/FBox.pod
new file mode 100644
index 00000000000..dada482a761
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/FBox.pod
@@ -0,0 +1,67 @@
+=head1 NAME
+
+Tk::FBox - a file dialog
+
+=for pm Tk/FBox.pm
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+ use Tk::FBox;
+ $file = $mw->FBox(...)->Show;
+
+=head1 DESCRIPTION
+
+C<Tk::FBox> is the dialog implementation behind the C<getOpenFile>,
+C<getSaveFile>, and C<chooseDirectory> method calls in the Unix/X11
+world. As such, it supports all options for these methods and
+additionally:
+
+=over
+
+=item -sortcmd => sub { $_[0] cmp $_[1] }
+
+Specified a callback for changing the sorting of the icons in the
+C<IconList> widget. By default, perl's C<cmp> operator will be used.
+
+From the source code:
+
+ # Using -sortcmd is really strange :-(
+ # $top->getOpenFile(-sortcmd => sub { package Tk::FBox; uc $b cmp uc $a});
+ # or, un-perlish, but useable (now activated in code):
+ # $top->getOpenFile(-sortcmd => sub { uc $_[1] cmp uc $_[0]});
+
+This is an experimental option!
+
+=item -type => $type
+
+Type should be "open" for choosing existing files to open (default),
+"save" for choosing existing or non-existing files to save, or "dir"
+for choosing directories.
+
+=item -filter => $glob
+
+A file glob to restrict displayed files. This is only active if no
+B<-filetypes> are defined.
+
+=item -force => $bool
+
+If true, then there will be no dialog if a file already exists.
+
+=back
+
+=head1 COPYRIGHT
+
+The original tkfbox.tcl from Tcl/Tk is:
+
+Copyright (c) 1994-1996 Sun Microsystems, Inc.
+
+See the file "license.terms" for information on usage and redistribution
+of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+Translated to Perl/Tk by Slaven Rezic <srezic@cpan.org>.
+
+=head1 SEE ALSO
+
+L<Tk::getOpenFile>, L<Tk::IconList>.
diff --git a/Master/tlpkg/tlperl/lib/Tk/FileSelect.pm b/Master/tlpkg/tlperl/lib/Tk/FileSelect.pm
new file mode 100644
index 00000000000..e1cc2209242
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/FileSelect.pm
@@ -0,0 +1,578 @@
+package Tk::FileSelect;
+
+use vars qw($VERSION @EXPORT_OK);
+$VERSION = '4.018'; # was: sprintf '4.%03d', q$Revision: #15 $ =~ /\D(\d+)\s*$/;
+@EXPORT_OK = qw(glob_to_re);
+
+use Tk qw(Ev);
+use strict;
+use Carp;
+use base qw(Tk::Toplevel);
+use Tk::widgets qw(LabEntry Button Frame Listbox Scrollbar);
+use File::Basename;
+
+Construct Tk::Widget 'FileSelect';
+
+use vars qw(%error_text);
+%error_text = (
+ '-r' => 'is not readable by effective uid/gid',
+ '-w' => 'is not writeable by effective uid/gid',
+ '-x' => 'is not executable by effective uid/gid',
+ '-R' => 'is not readable by real uid/gid',
+ '-W' => 'is not writeable by real uid/gid',
+ '-X' => 'is not executable by real uid/gid',
+ '-o' => 'is not owned by effective uid/gid',
+ '-O' => 'is not owned by real uid/gid',
+ '-e' => 'does not exist',
+ '-z' => 'is not of size zero',
+ '-s' => 'does not exists or is of size zero',
+ '-f' => 'is not a file',
+ '-d' => 'is not a directory',
+ '-l' => 'is not a link',
+ '-S' => 'is not a socket',
+ '-p' => 'is not a named pipe',
+ '-b' => 'is not a block special file',
+ '-c' => 'is not a character special file',
+ '-u' => 'is not setuid',
+ '-g' => 'is not setgid',
+ '-k' => 'is not sticky',
+ '-t' => 'is not a terminal file',
+ '-T' => 'is not a text file',
+ '-B' => 'is not a binary file',
+ '-M' => 'has no modification date/time',
+ '-A' => 'has no access date/time',
+ '-C' => 'has no inode change date/time',
+ );
+
+# Documentation after __END__
+
+sub import {
+ if (defined $_[1] and $_[1] eq 'as_default') {
+ local $^W = 0;
+ package Tk;
+ if ($Tk::VERSION < 804) {
+ *FDialog = \&Tk::FileSelect::FDialog;
+ *MotifFDialog = \&Tk::FileSelect::FDialog;
+ } else {
+ *tk_getOpenFile = sub {
+ Tk::FileSelect::FDialog("tk_getOpenFile", @_);
+ };
+ *tk_getSaveFile = sub {
+ Tk::FileSelect::FDialog("tk_getSaveFile", @_);
+ };
+ }
+ }
+}
+
+sub Cancel
+{
+ my ($cw) = @_;
+ $cw->{Selected} = undef;
+ $cw->withdraw unless $cw->cget('-transient');
+}
+
+sub Accept {
+
+ # Accept the file or directory name if possible.
+
+ my ($cw) = @_;
+
+ my($path, $so) = ($cw->cget('-directory'), $cw->SelectionOwner);
+ my $leaf = undef;
+ my $leaves;
+
+ if (defined $so and
+ $so == $cw->Subwidget('dir_list')->Subwidget('listbox')) {
+ $leaves = [$cw->Subwidget('dir_list')->getSelected];
+ $leaves = [$cw->Subwidget('dir_entry')->get] if !scalar(@$leaves);
+ } else {
+ $leaves = [$cw->Subwidget('file_list')->getSelected];
+ $leaves = [$cw->Subwidget('file_entry')->get] if !scalar(@$leaves);
+ }
+
+ foreach $leaf (@$leaves)
+ {
+ if (defined $leaf and $leaf ne '') {
+ if (!$cw->cget('-create') || -e "$path/$leaf")
+ {
+ foreach (@{$cw->cget('-verify')}) {
+ my $r = ref $_;
+ if (defined $r and $r eq 'ARRAY') {
+ #local $_ = $leaf; # use strict var problem here
+ return if not &{$_->[0]}($cw, $path, $leaf, @{$_}[1..$#{$_}]);
+ } else {
+ my $path_leaf = "$path/$leaf";
+ my $s = eval "$_ \$path_leaf";
+ warn "Error while eval'ing $_ \$path_leaf: $@" if $@;
+ if (not $s) {
+ my $err;
+ if (substr($_,0,1) eq '!')
+ {
+ my $t = substr($_,1);
+ if (exists $error_text{$t})
+ {
+ $err = $error_text{$t};
+ $err =~ s/\b(?:no|not) //;
+ }
+ }
+ $err = $error_text{$_} unless defined $err;
+ $err = "failed '$_' test" unless defined $err;
+ $cw->Error("'$leaf' $err.");
+ return;
+ }
+ }
+ } # forend
+ }
+ else
+ {
+ unless (-w $path)
+ {
+ $cw->Error("Cannot write to $path");
+ return;
+ }
+ }
+ $leaf = $path . '/' . $leaf;
+ } else {
+ $leaf = undef;
+ }
+ }
+ if (scalar(@$leaves))
+ {
+ my $sm = $cw->Subwidget('file_list')->cget(-selectmode);
+ $cw->{Selected} = $leaves;
+ my $command = $cw->cget('-command');
+ $command->Call(@{$cw->{Selected}}) if defined $command;
+ }
+
+} # end Accept
+
+sub Accept_dir
+{
+ my ($cw,$new) = @_;
+ return if !defined $new;
+ my $dir = $cw->cget('-directory');
+ $cw->configure(-directory => "$dir/$new");
+}
+
+sub Populate {
+
+ my ($w, $args) = @_;
+
+ require Tk::Listbox;
+ require Tk::Button;
+ require Tk::Dialog;
+ require Tk::Toplevel;
+ require Tk::LabEntry;
+ require Cwd;
+
+ $w->SUPER::Populate($args);
+ $w->protocol('WM_DELETE_WINDOW' => ['Cancel', $w ]);
+
+ $w->{'reread'} = 0;
+ $w->withdraw;
+
+ # Create directory/filter entry, place at the top.
+ my $e = $w->Component(
+ LabEntry => 'dir_entry',
+ -textvariable => \$w->{DirectoryString},
+ -labelVariable => \$w->{Configure}{-dirlabel},
+ );
+ $e->pack(-side => 'top', -expand => 0, -fill => 'x');
+ $e->bind('<Return>' => [$w => 'validateDir', Ev(['get'])]);
+
+ # Create file entry, place at the bottom.
+ $e = $w->Component(
+ LabEntry => 'file_entry',
+ -textvariable => \$w->{Configure}{-initialfile},
+ -labelVariable => \$w->{Configure}{-filelabel},
+ );
+ $e->pack(-side => 'bottom', -expand => 0, -fill => 'x');
+ $e->bind('<Return>' => [$w => 'validateFile', Ev(['get'])]);
+ $e->bind('<FocusIn>' => [$w => 'SelectionClear']);
+
+ # Create directory scrollbox, place at the left-middle.
+ my $b = $w->Component(
+ ScrlListbox => 'dir_list',
+ -labelVariable => \$w->{Configure}{-dirlistlabel},
+ -scrollbars => 'se',
+ );
+ $b->pack(-side => 'left', -expand => 1, -fill => 'both');
+ $b->bind('<Double-Button-1>' => [$w => 'Accept_dir', Ev(['getSelected'])]);
+
+ # Add a label.
+
+ my $f = $w->Frame();
+ $f->pack(-side => 'right', -fill => 'y', -expand => 0);
+ $b = $f->Button('-textvariable' => \$w->{'Configure'}{'-acceptlabel'},
+ -command => [ 'Accept', $w ],
+ );
+ $b->pack(-side => 'top', -fill => 'x', -expand => 1);
+ $b = $f->Button('-textvariable' => \$w->{'Configure'}{'-cancellabel'},
+ -command => [ 'Cancel', $w ],
+ );
+ $b->pack(-side => 'top', -fill => 'x', -expand => 1);
+ $b = $f->Button('-textvariable' => \$w->{'Configure'}{'-resetlabel'},
+ -command => [$w => 'configure','-directory','.'],
+ );
+ $b->pack(-side => 'top', -fill => 'x', -expand => 1);
+ $b = $f->Button('-textvariable' => \$w->{'Configure'}{'-homelabel'},
+ -command => [$w => 'configure','-directory',$ENV{'HOME'}],
+ );
+ $b->pack(-side => 'top', -fill => 'x', -expand => 1);
+
+ # Create file scrollbox, place at the right-middle.
+
+ $b = $w->Component(
+ ScrlListbox => 'file_list',
+ -labelVariable => \$w->{Configure}{-filelistlabel},
+ -scrollbars => 'se',
+ );
+ $b->pack(-side => 'right', -expand => 1, -fill => 'both');
+ $b->bind('<Double-1>' => [$w => 'Accept']);
+
+ # Create -very dialog.
+
+ my $v = $w->Component(
+ Dialog => 'dialog',
+ -title => 'Verify Error',
+ -bitmap => 'error',
+ -buttons => ['Dismiss'],
+ );
+
+ $w->ConfigSpecs(
+ -width => [ ['file_list','dir_list'], undef, undef, 14 ],
+ -height => [ ['file_list','dir_list'], undef, undef, 14 ],
+ -directory => [ 'METHOD', undef, undef, '.' ],
+ -initialdir => '-directory',
+ -filelabel => [ 'PASSIVE', 'fileLabel', 'FileLabel', 'File' ],
+ -initialfile => [ 'PASSIVE', undef, undef, '' ],
+ -filelistlabel => [ 'PASSIVE', undef, undef, 'Files' ],
+ -filter => [ 'METHOD', undef, undef, undef ],
+ -defaultextension => [ 'METHOD', undef, undef, undef ],
+ -regexp => [ 'METHOD', undef, undef, undef ],
+ -dirlistlabel => [ 'PASSIVE', undef, undef, 'Directories'],
+ -dirlabel => [ 'PASSIVE', undef, undef, 'Directory'],
+ '-accept' => [ 'CALLBACK',undef,undef, undef ],
+ -command => [ 'CALLBACK',undef,undef, undef ],
+ -transient => [ 'PASSIVE', undef, undef, 1 ],
+ -verify => [ 'PASSIVE', undef, undef, ['!-d'] ],
+ -create => [ 'PASSIVE', undef, undef, 0 ],
+ -acceptlabel => [ 'PASSIVE', undef, undef, 'Accept'],
+ -cancellabel => [ 'PASSIVE', undef, undef, 'Cancel'],
+ -resetlabel => [ 'PASSIVE', undef, undef, 'Reset'],
+ -homelabel => [ 'PASSIVE', undef, undef, 'Home'],
+ DEFAULT => [ 'file_list' ],
+ );
+ $w->Delegates(DEFAULT => 'file_list');
+
+ return $w;
+
+} # end Populate
+
+sub translate
+ {
+ my ($bs,$ch) = @_;
+ return "\\$ch" if (length $bs);
+ return '.*' if ($ch eq '*');
+ return '.' if ($ch eq '?');
+ return "\\." if ($ch eq '.');
+ return "\\/" if ($ch eq '/');
+ return "\\\\" if ($ch eq '\\');
+ return $ch;
+}
+
+sub glob_to_re
+{
+ my $regex = shift;
+ $regex =~ s/(\\?)(.)/&translate($1,$2)/ge;
+ return sub { shift =~ /^${regex}$/ };
+}
+
+sub filter
+{
+ my ($cw,$val) = @_;
+ my $var = \$cw->{Configure}{'-filter'};
+ if (@_ > 1 || !defined($$var))
+ {
+ $val = '*' unless defined $val;
+ $$var = $val;
+ $cw->{'match'} = glob_to_re($val) unless defined $cw->{'match'};
+ unless ($cw->{'reread'}++)
+ {
+ $cw->Busy;
+ $cw->afterIdle(['reread',$cw,$cw->cget('-directory')])
+ }
+ }
+ return $$var;
+}
+
+sub regexp
+{
+ my ($cw,$val) = @_;
+ my $var = \$cw->{Configure}{'-regexp'};
+ if (@_ > 1)
+ {
+ $$var = $val;
+ $cw->{'match'} = (defined $val) ? sub { shift =~ m|^${val}$| } : sub { 1 };
+ unless ($cw->{'reread'}++)
+ {
+ $cw->Busy;
+ $cw->afterIdle(['reread',$cw])
+ }
+ }
+ return $$var;
+}
+
+sub defaultextension
+{
+ my ($cw,$val) = @_;
+ if (@_ > 1)
+ {
+ $val = '' unless defined $val;
+ $val = ".$val" if ($val !~ /^\./);
+ $cw->filter("*$val");
+ }
+ else
+ {
+ $val = $cw->filter;
+ my ($ext) = $val =~ /(\.[^\.]*)$/;
+ return $ext;
+ }
+}
+
+sub directory
+{
+ my ($cw,$dir) = @_;
+ my $var = \$cw->{Configure}{'-directory'};
+ if (@_ > 1 && defined $dir)
+ {
+ if (substr($dir,0,1) eq '~')
+ {
+ if (substr($dir,1,1) eq '/')
+ {
+ $dir = (defined $ENV{'HOME'} ? $ENV{'HOME'} : '') . substr($dir,1);
+ }
+ else
+ {my ($uid,$rest) = ($dir =~ m#^~([^/]+)(/.*$)#);
+ $dir = (getpwnam($uid))[7] . $rest;
+ }
+ }
+ my $revert_dir = sub
+ {
+ my $message = shift;
+ $$var = $cw->{OldDirectory};
+ $cw->messageBox(-message => $message, -icon => 'error');
+ if (!defined $$var)
+ {
+ # OldDirectory was never set, so force reread...
+ $$var = $cw->{OldDirectory} = Cwd::getcwd(); # XXX maybe use check like code below...
+ unless ($cw->{'reread'}++)
+ {
+ $cw->Busy;
+ $cw->afterIdle(['reread',$cw])
+ }
+ }
+ $$var;
+ };
+ $dir =~ s#([^/\\])[\\/]+$#$1#;
+ if (-d $dir)
+ {
+ unless (Tk::tainting())
+ {
+ my $pwd = Cwd::getcwd();
+ if (chdir( (defined($dir) ? $dir : '') ) )
+ {
+ my $new = Cwd::getcwd();
+ if ($new)
+ {
+ $dir = $new;
+ }
+ else
+ {
+ return $revert_dir->("Cannot getcwd in '$dir'");
+ }
+ if (!chdir($pwd))
+ {
+ return $revert_dir->("Cannot change directory to $pwd:\n$!");
+ }
+ $$var = $dir;
+ }
+ else
+ {
+ return $revert_dir->("Cannot change directory to $dir:\n$!");
+ }
+ $$var = $cw->{OldDirectory} = $dir;
+ }
+ unless ($cw->{'reread'}++)
+ {
+ $cw->Busy;
+ $cw->afterIdle(['reread',$cw])
+ }
+ }
+ }
+ return $$var;
+}
+
+sub reread
+{
+ my ($w) = @_;
+ my $dir = $w->cget('-directory');
+ if (defined $dir)
+ {
+ if (!defined $w->cget('-filter') or $w->cget('-filter') eq '')
+ {
+ $w->configure('-filter', '*');
+ }
+ my $dl = $w->Subwidget('dir_list');
+ $dl->delete(0, 'end');
+ $dl->selectionClear(0,'end');
+ my $fl = $w->Subwidget('file_list');
+ $fl->delete(0, 'end');
+ local *DIR;
+ if (opendir(DIR, $dir))
+ {
+ my $file = $w->cget('-initialfile');
+ my $seen = 0;
+ my $accept = $w->cget('-accept');
+ foreach my $f (sort(readdir(DIR)))
+ {
+ next if ($f eq '.');
+ my $path = "$dir/$f";
+ if (-d $path)
+ {
+ $dl->insert('end', $f);
+ }
+ else
+ {
+ if (&{$w->{match}}($f))
+ {
+ if (!defined($accept) || $accept->Call($path))
+ {
+ $seen = $fl->index('end') if ($file && $f eq $file);
+ $fl->insert('end', $f)
+ }
+ }
+ }
+ }
+ closedir(DIR);
+ if ($seen)
+ {
+ $fl->selectionSet($seen);
+ $fl->see($seen);
+ }
+ else
+ {
+ $w->configure(-initialfile => undef) unless $w->cget('-create');
+ }
+ }
+ $w->{DirectoryString} = $dir . ($dir ne '/' ? '/' : '') . $w->cget('-filter');
+ }
+ $w->{'reread'} = 0;
+ $w->Unbusy if $w->{'Busy'};
+}
+
+sub validateDir
+{
+ my ($cw,$name) = @_;
+ my ($leaf,$base) = fileparse($name);
+ if ($leaf =~ /[*?]/)
+ {
+ $cw->configure('-directory' => $base,'-filter' => $leaf);
+ }
+ else
+ {
+ $cw->configure('-directory' => $name);
+ }
+}
+
+sub validateFile
+{
+ my ($cw,$name) = @_;
+ my $i = 0;
+ my $n = $cw->index('end');
+ # See if it is an existing file
+ for ($i= 0; $i < $n; $i++)
+ {
+ my $f = $cw->get($i);
+ if ($f eq $name)
+ {
+ $cw->selection('set',$i);
+ $cw->Accept;
+ }
+ }
+ # otherwise allow if -create is set, directory is writable
+ # and it passes filter and accept criteria
+ if ($cw->cget('-create'))
+ {
+ my $path = $cw->cget('-directory');
+ if (-w $path)
+ {
+ if (&{$cw->{match}}($name))
+ {
+ my $accept = $cw->cget('-accept');
+ my $full = "$path/$name";
+ if (!defined($accept) || $accept->Call($full))
+ {
+ $cw->{Selected} = [$full];
+ $cw->Callback(-command => @{$cw->{Selected}});
+ }
+ else
+ {
+ $cw->Error("$name is not 'acceptable'");
+ }
+ }
+ else
+ {
+ $cw->Error("$name does not match '".$cw->cget('-filter').'\'');
+ }
+ }
+ else
+ {
+ $cw->Error("Directory '$path' is not writable");
+ return;
+ }
+ }
+}
+
+sub Error
+{
+ my $cw = shift;
+ my $msg = shift;
+ my $dlg = $cw->Subwidget('dialog');
+ $dlg->configure(-text => $msg);
+ $dlg->Show;
+}
+
+sub Show
+{
+ my ($cw,@args) = @_;
+ if ($cw->cget('-transient')) {
+ $cw->Popup(@args);
+ $cw->focus;
+ $cw->waitVariable(\$cw->{Selected});
+ $cw->withdraw;
+ return defined($cw->{Selected})
+ ? (wantarray) ? @{$cw->{Selected}} : $cw->{Selected}[0]
+ : undef;
+ } else {
+ $cw->Popup(@args);
+ }
+}
+
+sub FDialog
+{
+ my($cmd, %args) = @_;
+ if ($cmd =~ /Save/)
+ {
+ $args{-create} = 1;
+ $args{-verify} = [qw(!-d -w)];
+ }
+ delete $args{-filetypes};
+ delete $args{-force};
+ Tk::DialogWrapper('FileSelect',$cmd, %args);
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/FileSelect.pod b/Master/tlpkg/tlperl/lib/Tk/FileSelect.pod
new file mode 100644
index 00000000000..2ea633de674
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/FileSelect.pod
@@ -0,0 +1,150 @@
+
+=head1 NAME
+
+Tk::FileSelect - a widget for choosing files
+
+=for pm Tk/FileSelect.pm
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+ use Tk::FileSelect;
+
+ $FSref = $top->FileSelect(-directory => $start_dir);
+ $top - a window reference, e.g. MainWindow->new
+ $start_dir - the starting point for the FileSelect
+ $file = $FSref->Show;
+ Executes the fileselector until either a filename is
+ accepted or the user hits Cancel. Returns the filename
+ or the empty string, respectively, and unmaps the
+ FileSelect.
+ $FSref->configure(option => value[, ...])
+ Please see the Populate subroutine as the configuration
+ list changes rapidly.
+
+=head1 DESCRIPTION
+
+This Module pops up a Fileselector box, with a directory entry on
+top, a list of directories in the current directory, a list of
+files in the current directory, an entry for entering/modifying a
+file name, an accept button and a cancel button.
+
+You can enter a starting directory in the directory entry. After
+hitting Return, the listboxes get updated. Double clicking on any
+directory shows you the respective contents. Single clicking on a
+file brings it into the file entry for further consideration,
+double clocking on a file pops down the file selector and calls
+the optional command with the complete path for the selected file.
+Hitting return in the file selector box or pressing the accept
+button will also work. *NOTE* the file selector box will only then
+get destroyed if the file name is not zero length. If you want
+yourself take care of it, change the if(length(.. in sub
+accept_file.
+
+=head1 AUTHORS
+
+Based on original FileSelect by
+Klaus Lichtenwalder, Lichtenwalder@ACM.org, Datapat GmbH, Munich,
+April 22, 1995 adapted by
+Frederick L. Wagner, derf@ti.com, Texas Instruments Incorporated, Dallas,
+21Jun95
+
+=head1 HISTORY
+
+=head2 950621 -- The following changes were made:
+
+=over 4
+
+=item *
+
+Rewrote Tk stuff to take advantage of new Compound widget module, so
+FileSelect is now composed of 2 LabEntry and 2 ScrlListbox2
+subwidgets.
+
+=item *
+
+Moved entry labels (from to the left of) to above the entry fields.
+
+=item *
+
+Caller is now able to control these aspects of widget, in both
+FileSelect (new) and configure :
+
+(Please see subroutine Populate for details, as these options
+change rapidly!)
+
+=item *
+
+I changed from Double-Button-1 to Button-1 in the Files listbox,
+to work with multiple mode in addition to browse mode. I also
+made some name changes (LastPath --> saved_path, ...).
+
+=item *
+
+The show method is not yet updated.
+
+=item *
+
+The topLevel stuff is not done yet. I took it out while I toy with
+the idea of FileSelect as a subwidget. Then the 'normal' topLevel
+thing with Buttons along the bottom could be build on top of it.
+
+=item *
+
+By request of Henry Katz <katz@fs09.webo.dg.com>, I added the functionality
+of using the Directory entry as a filter. So, if you want to only see the
+*.c files, you add a .c (the *'s already there :) and hit return.
+
+=back
+
+=head2 95/10/17, SOL, LUCC. lusol@Lehigh.EDU
+
+=over 4
+
+=item *
+
+ Allow either file or directory names to be accepted.
+
+=item *
+
+Require double click to move into a new directory rather than a single
+click. This allows a single click to select a directory name so it can
+be accepted.
+
+=item *
+
+Add -verify list option so that standard Perl file test operators (like
+-d and -x) can be specified for further name validation. The default
+value is the special value '!-d' (not a directory), so any name can be
+selected as long as it's not a directory - after all, this IS FileSelect!
+
+For example:
+
+ $fs->configure(-verify => ['-d', [\&verify_code, $P1, $P2, ... $Pn]]);
+
+ensures that the selected name is a directory. Further, if an element of
+the list is an array reference, the first element is a code reference to a
+subroutine and the remaining optional elements are it's parameters. The
+subroutine is called like this:
+
+ &verify_code($cd, $leaf, $P1, $P2, ... $Pn);
+
+where $cd is the current directory, $leaf is a directory or file name, and
+$P1 .. $Pn are your optional parameters. The subroutine should return TRUE
+if success or FALSE if failure.
+
+=back
+
+=head2 961008 -- derf@ti.com :
+
+By request of Jim Stern <js@world.northgrum.com> and Brad Vance
+<bvance@ti.com>, I updated the Accept and Show functions to support
+selection of multiple files. I also corrected a typo in the -verify code.
+
+=head1 SEE ALSO
+
+L<Tk::getOpenFile>, L<Tk::FBox>.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/FloatEntry.pm b/Master/tlpkg/tlperl/lib/Tk/FloatEntry.pm
new file mode 100644
index 00000000000..eb6465dbe61
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/FloatEntry.pm
@@ -0,0 +1,109 @@
+# Tranlation of FloatEnt.tcl in Tix4.1
+
+# TODO/IDEA:
+# o extract a widget (SimpleEntry?) without post/unpost methods
+# and derive FloatEntry fron this widget.
+
+package Tk::FloatEntry;
+use strict;
+
+BEGIN
+ {
+ use vars '$DEBUG';
+ $DEBUG = (defined($ENV{USER}) and $ENV{USER} eq 'achx') ? 1 : 0;
+ print STDERR "tixGrid: debug = $DEBUG\n" if $DEBUG;
+ }
+
+require Tk;
+require Tk::Widget;
+require Tk::Derived;
+require Tk::Entry;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/TixGrid/FloatEntry.pm#4 $
+
+use base qw(Tk::Derived Tk::Entry);
+
+Construct Tk::Widget 'FloatEntry';
+
+sub ClassInit
+ {
+ my ($class, $mw) = @_;
+ $class->SUPER::ClassInit($mw);
+ $mw->bind($class, '<Return>', 'invoke');
+ $mw->bind($class, '<FocusIn>', 'FocusIn');
+ $class;
+ }
+
+sub Populate
+ {
+ my ($e, $args) = @_;
+ $e->ConfigSpecs(
+ -value => ['METHOD', 'value', 'Value', undef],
+ -highlightthickness => [$e, 'highlightThickness', 'HighlightThickness', 0 ],
+ -command => ['CALLBACK', 'command', 'Command', undef],
+ );
+ print "FloatEntry Init: $e\n" if $DEBUG;
+ $e;
+ }
+
+## option method
+
+sub value
+ {
+ my $e = shift;
+ unless (@_)
+ {
+ return $e->get
+ }
+ $e->delete(0,'end');
+ $e->insert(0,$_[0]);
+ $e->selection('from', 0);
+ $e->selection('to', 'end');
+
+ }
+
+## public methods
+
+sub invoke
+ {
+ my ($e) = @_;
+ $e->Callback('-command', $e->get);
+ }
+
+sub post
+ {
+ my ($e, $x, $y, $dx, $dy) = @_;
+
+ $dx = $e->reqwidth unless defined $dx;
+ $dy = $e->reqheight unless defined $dy;
+
+ $e->place('-x'=>$x, '-y'=>$y, -width=>$dx, -height=>$dy, -bordermode=>'ignore');
+ $e->raise;
+ $e->focus;
+ }
+
+sub unpost
+ {
+ my ($e) = @_;
+ $e->place('forget');
+ }
+
+## bindings
+
+sub FocusIn
+ {
+ my ($e) = @_;
+
+ # FIX: xxx only if entry has not already focus
+ {
+ $e->focus;
+ $e->selection('from', 0);
+ $e->selection('to', 'end');
+ $e->icursor('end');
+ }
+ }
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Font.pm b/Master/tlpkg/tlperl/lib/Tk/Font.pm
new file mode 100644
index 00000000000..bb1b52cc7c5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Font.pm
@@ -0,0 +1,163 @@
+package Tk::Font;
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/Font.pm#4 $
+require Tk::Widget;
+use strict;
+use Carp;
+use overload '""' => 'as_string';
+sub as_string { return ${$_[0]} }
+
+*MainWindow = \&Tk::Widget::MainWindow;
+
+foreach my $key (qw(actual metrics measure configure))
+ {
+ no strict 'refs';
+ *{$key} = sub { shift->Tk::font($key,@_) };
+ }
+
+Construct Tk::Widget 'Font';
+
+my @xfield = qw(foundry family weight slant swidth adstyle pixel
+ point xres yres space avgwidth registry encoding);
+my @tkfield = qw(family size weight slant underline overstrike);
+my %tkfield = map { $_ => "-$_" } @tkfield;
+
+sub _xonly { my $old = '*'; return $old }
+
+sub Pixel
+{
+ my $me = shift;
+ my $old = $me->configure('-size');
+ $old = '*' if ($old > 0);
+ if (@_)
+ {
+ $me->configure(-size => -$_[0]);
+ }
+ return $old;
+}
+
+sub Point
+{
+ my $me = shift;
+ my $old = 10*$me->configure('-size');
+ $old = '*' if ($old < 0);
+ if (@_)
+ {
+ $me->configure(-size => int($_[0]/10));
+ }
+ return $old;
+}
+
+foreach my $f (@tkfield,@xfield)
+ {
+ no strict 'refs';
+ my $sub = "\u$f";
+ unless (defined &{$sub})
+ {
+ my $key = $tkfield{$f};
+ if (defined $key)
+ {
+ *{$sub} = sub { shift->configure($key,@_) };
+ }
+ else
+ {
+ *{$sub} = \&_xonly;
+ }
+ }
+ }
+
+sub new
+{
+ my $pkg = shift;
+ my $w = shift;
+ my $me;
+ if (scalar(@_) == 1)
+ {
+ $me = $w->Tk::font('create',@_);
+ }
+ else
+ {
+ croak 'Odd number of args' if @_ & 1;
+ my %attr;
+ while (@_)
+ {
+ my $k = shift;
+ my $v = shift;
+ my $t = (substr($k,0,1) eq '-') ? $k : $tkfield{$k};
+ if (defined $t)
+ {
+ $attr{$t} = $v;
+ }
+ elsif ($k eq 'point')
+ {
+ $attr{'-size'} = -int($v/10+0.5);
+ }
+ elsif ($k eq 'pixel')
+ {
+ $attr{'-size'} = -$v;
+ }
+ else
+ {
+ carp "$k ignored" if $^W;
+ }
+ }
+ $me = $w->Tk::font('create',%attr);
+ }
+ return bless $me,$pkg;
+}
+
+sub Pattern
+{
+ my $me = shift;
+ my @str;
+ foreach my $f (@xfield)
+ {
+ my $meth = "\u$f";
+ my $str = $me->$meth();
+ if ($f eq 'family')
+ {
+ $str =~ s/(?:Times\s+New\s+Roman|New York)/Times/i;
+ $str =~ s/(?:Courier\s+New|Monaco)/Courier/i;
+ $str =~ s/(?:Arial|Geneva)/Helvetica/i;
+ }
+ elsif ($f eq 'slant')
+ {
+ $str = substr($str,0,1);
+ }
+ elsif ($f eq 'weight')
+ {
+ $str = 'medium' if ($str eq 'normal');
+ }
+ push(@str,$str);
+ }
+ return join('-', '', @str);
+}
+
+sub Name
+{
+ my $me = shift;
+ return $$me if (!wantarray || ($^O eq 'MSWin32'));
+ my $max = shift || 128;
+ my $w = $me->MainWindow;
+ my $d = $w->Display;
+ return $d->XListFonts($me->Pattern,$max);
+}
+
+sub Clone
+{
+ my $me = shift;
+ return ref($me)->new($me,$me->actual,@_);
+}
+
+sub ascent
+{
+ return shift->metrics('-ascent');
+}
+
+sub descent
+{
+ return shift->metrics('-descent');
+}
+
+1;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Font.pod b/Master/tlpkg/tlperl/lib/Tk/Font.pod
new file mode 100644
index 00000000000..594efa58bca
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Font.pod
@@ -0,0 +1,407 @@
+# Copyright (c) 1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+font - Create and inspect fonts.
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+S< >I<$widget>->B<Font>(I<option>?, I<arg, arg, ...>?)
+
+S< >I<$font>->I<Option>?(I<arg, arg, ...>)?
+
+=head1 DESCRIPTION
+
+The B<Font> method provides several facilities for dealing with
+fonts, such as defining named fonts and inspecting the actual attributes of
+a font. The command has several different forms, determined by the
+first argument. The following forms are currently supported:
+
+=over 4
+
+=item I<$font>-E<gt>B<actual>(I<-option>?)
+
+=item I<$widget>-E<gt>B<fontActual>(I<font>?, I<-option>?)
+
+Returns information about the actual attributes that are obtained when
+I<font> is used on I<$font>'s display; the actual attributes obtained
+may differ from the attributes requested due to platform-dependant
+limitations, such as the availability of font families and pointsizes.
+I<font> is a font description; see L<"FONT DESCRIPTION"> below. If
+I<option> is specified, returns the value of that attribute; if it is
+omitted, the return value is a list of all the attributes and their values.
+See L<"FONT OPTIONS"> below for a list of the possible attributes.
+
+=item I<$font>-E<gt>B<configure>(I<-option>??=>I<value>, I<-option>=>I<value>, ...?)
+
+Query or modify the desired attributes for I<$font>.
+If no I<-option> is specified, returns a list describing
+all the options and their values for I<fontname>. If a single I<-option>
+is specified with no I<value>, then returns the current value of that
+attribute. If one or more I<option-value> pairs are specified,
+then the method modifies the given named font to have the given values; in
+this case, all widgets using that font will redisplay themselves using the
+new attributes for the font. See L<"FONT OPTIONS"> below for a list of the
+possible attributes.
+
+Note: the above behaviour differs in detail to B<configure> on widgets,
+images etc.
+
+=item I<$font> = I<$widget>-E<gt>B<Font>(I<-option>=>I<value>, ...>?)
+
+=item I<$font> = I<$widget>-E<gt>B<fontCreate>(?I<fontname>??, I<-option>=>I<value>, ...>?)
+
+Creates a new font object and returns a reference to it.
+I<fontname> specifies the name for the font; if it is omitted, then Tk generates
+a new name of the form B<font>I<x>, where I<x> is an integer. There may be any
+number of I<option-value> pairs, which provide the desired attributes for
+the new named font. See L<"FONT OPTIONS"> below for a list of the possible
+attributes.
+
+Note: the created font is I<not> shared between widgets of different
+L<MainWindow|Tk::MainWindow>s.
+
+=item I<$font>-E<gt>B<delete>
+
+=item I<$widget>-E<gt>B<fontDelete>(I<fontname>?, I<fontname>, ...?)
+
+Delete the specified named fonts. If there are widgets using the named font,
+the named font won't actually be deleted until all the instances are
+released. Those widgets will continue to display using the last known values
+for the named font. If a deleted named font is subsequently recreated with
+another call to B<fontCreate>, the widgets will use the new named font
+and redisplay themselves using the new attributes of that font.
+
+=item I<$widget>-E<gt>B<fontFamilies>
+
+The return value is a list of the case-insensitive names of all font families
+that exist on I<$widget>'s display.
+
+=item I<$font>-E<gt>B<measure>(I<text>)
+
+=item I<$widget>-E<gt>B<fontMeasure>(I<font>, I<text>)
+
+Measures the amount of space the string I<text> would use in the given
+I<font> when displayed in I<$widget>. I<font> is a font description;
+see L<"FONT DESCRIPTION"> below.
+The return value is the total width in pixels
+of I<text>, not including the extra pixels used by highly exagerrated
+characters such as cursive ``I<f>''. If the string contains newlines or tabs,
+those characters are not expanded or treated specially when measuring the
+string.
+
+=item I<$font>-E<gt>B<metrics>(I<-option>?)
+
+=item I<$widget>-E<gt>B<fontMetrics>(I<font>?, I<-option>?)
+
+Returns information about the metrics (the font-specific data), for
+I<font> when it is used on I<$widget>'s display. I<font> is a font
+description; see L<"FONT DESCRIPTION"> below.
+If I<option> is specified,
+returns the value of that metric; if it is omitted, the return value is a
+list of all the metrics and their values. See L<"FONT METRICS"> below for a list
+of the possible metrics.
+
+=item I<$widget>-E<gt>B<fontNames>
+
+The return value is a list of all font objects that are currently defined for
+I<$widget>'s MainWindow.
+
+=back
+
+=head1 FONT DESCRIPTION
+
+The following formats are accepted as a font description anywhere
+I<font> is specified as an argument above; these same forms are also
+permitted when specifying the B<-font> option for widgets.
+
+=over 4
+
+=item [1] I<fontname>
+
+The name of a named font, created using the B<fontCreate> method. When
+a widget uses a named font, it is guaranteed that this will never cause an
+error, as long as the named font exists, no matter what potentially invalid
+or meaningless set of attributes the named font has. If the named font
+cannot be displayed with exactly the specified attributes, some other close
+font will be substituted automatically.
+
+=item [1a] I<$font>
+
+A font object created using the B<Font> method. This is essentially the same
+as using a named font. The object is a reference to the name, and carries
+additional information e.g. which MainWindow it relates to in an manner peculiar
+to perl/Tk.
+
+=item [3] I<systemfont>
+
+The platform-specific name of a font, interpreted by the graphics server.
+This also includes, under X, an XLFD (see L<[4]|/[4]>) for which a single ``B<*>''
+character was used to elide more than one field in the middle of the
+name. See L<"PLATFORM-SPECIFIC ISSUES"> for a list of the system fonts.
+
+=item [3] [I<family>,?I<size>,??I<style>,??I<style ...>?]
+
+A properly formed list whose first element is the desired font
+I<family> and whose optional second element is the desired I<size>.
+The interpretation of the I<size> attribute follows the same rules
+described for L<-size|/-size> in L<"FONT OPTIONS"> below. Any additional optional
+arguments following the I<size> are font I<style>s. Possible values
+for the I<style> arguments are as follows:
+
+ normal bold roman italic
+ underline overstrike
+
+=item [4] X-font names (XLFD)
+
+A Unix-centric font name of the form
+I<-foundry-family-weight-slant-setwidth-addstyle-pixel-point-resx-resy-spacing-width-charset-encoding>.
+The ``B<*>'' character may be used to skip individual fields that the
+user does not care about. There must be exactly one ``B<*>'' for each
+field skipped, except that a ``B<*>'' at the end of the XLFD skips any
+remaining fields; the shortest valid XLFD is simply ``B<*>'', signifying
+all fields as defaults. Any fields that were skipped are given default
+values. For compatibility, an XLFD always chooses a font of the specified
+pixel size (not point size); although this interpretation is not strictly
+correct, all existing applications using XLFDs assumed that one ``point''
+was in fact one pixel and would display incorrectly (generally larger) if
+the correct size font were actually used.
+
+=item [5] I<option value >?I<option value ...>?
+
+A properly formed list of I<option-value> pairs that specify
+the desired attributes of the font, in the same format used when defining
+a named font; see L<"FONT OPTIONS"> below.
+
+=back
+
+When font description I<font> is used, the system attempts to parse the
+description according to each of the above five rules, in the order specified.
+Cases [1] and [2] must match the name of an existing named font or of a
+system font. Cases [3], [4], and [5] are accepted on all
+platforms and the closest available font will be used. In some situations
+it may not be possible to find any close font (e.g., the font family was
+a garbage value); in that case, some system-dependant default font is
+chosen. If the font description does not match any of the above patterns,
+an error is generated.
+
+=head1 FONT METRICS
+
+The following options are used by the B<metrics>/B<fontMetrics> method to query
+font-specific data determined when the font was created. These properties are
+for the whole font itself and not for individual characters drawn in that
+font. In the following definitions, the ``baseline'' of a font is the
+horizontal line where the bottom of most letters line up; certain letters,
+such as lower-case ``g'' stick below the baseline.
+
+=over 4
+
+=item B<-ascent>
+
+The amount in pixels that the tallest letter sticks up above the baseline of
+the font, plus any extra blank space added by the designer of the font.
+(I<$font>-E<gt>B<ascent> is provided for compatibility.)
+
+=item B<-descent>
+
+The largest amount in pixels that any letter sticks down below the baseline
+of the font, plus any extra blank space added by the designer of the font.
+(I<$font>-E<gt>B<descent> is provided for compatibility.)
+
+=item B<-linespace>
+
+Returns how far apart vertically in pixels two lines of text using the same
+font should be placed so that none of the characters in one line overlap any
+of the characters in the other line. This is generally the sum of the ascent
+above the baseline line plus the descent below the baseline.
+
+=item B<-fixed>
+
+Returns a boolean flag that is ``B<1>'' if this is a fixed-width font,
+where each normal character is the the same width as all the other
+characters, or is ``B<0>'' if this is a proportionally-spaced font, where
+individual characters have different widths. The widths of control
+characters, tab characters, and other non-printing characters are not
+included when calculating this value.
+
+=back
+
+=head1 FONT OPTIONS
+
+The following options are supported on all platforms, and are used when
+constructing a named font or when specifying a font using style [5] as
+above:
+
+=over 4
+
+=item B<-family> => I<name>
+
+The case-insensitive font family name. Tk guarantees to support the font
+families named B<Courier> (a monospaced ``typewriter'' font), B<Times>
+(a serifed ``newspaper'' font), and B<Helvetica> (a sans-serif
+``European'' font). The most closely matching native font family will
+automatically be substituted when one of the above font families is used.
+The I<name> may also be the name of a native, platform-specific font
+family; in that case it will work as desired on one platform but may not
+display correctly on other platforms. If the family is unspecified or
+unrecognized, a platform-specific default font will be chosen.
+
+=item B<-size> => I<size>
+
+The desired size of the font. If the I<size> argument is a positive
+number, it is interpreted as a size in points. If I<size> is a negative
+number, its absolute value is interpreted as a size in pixels. If a
+font cannot be displayed at the specified size, a nearby size will be
+chosen. If I<size> is unspecified or zero, a platform-dependent default
+size will be chosen.
+
+The original Tcl/Tk authors believe sizes should normally be specified in points
+so the application will remain the same ruler size on the screen, even when
+changing screen resolutions or moving scripts across platforms. While this is an
+admirable goal it does not work as well in practice as they hoped.
+The mapping between points and pixels is set when the application starts, based
+on alleged properties of the installed monitor, but it can be overridden by
+calling the L<scaling|Tk::Widget/scaling> command. However this can be
+problematic when system has no way of telling if (say) an 11" or 22" monitor is
+attached, also if it I<can> tell then some monitor sizes may result in poorer
+quality scaled fonts being used rather than a "tuned" bitmap font.
+In addition specifying pixels is useful in certain circumstances such as when a piece of text
+must line up with respect to a fixed-size bitmap.
+
+At present the Tcl/Tk scheme is used unchanged, with "point" size being returned
+by I<actual> (as an integer), and used internally. Suggestions for work-rounds
+to undesirable behaviour welcome.
+
+=item B<-weight> => I<weight>
+
+The nominal thickness of the characters in the font. The value
+B<normal> specifies a normal weight font, while B<bold> specifies a
+bold font. The closest available weight to the one specified will
+be chosen. The default weight is B<normal>.
+
+=item B<-slant> => I<slant>
+
+The amount the characters in the font are slanted away from the
+vertical. Valid values for slant are B<roman> and B<italic>.
+A roman font is the normal, upright appearance of a font, while
+an italic font is one that is tilted some number of degrees from upright.
+The closest available slant to the one specified will be chosen.
+The default slant is B<roman>.
+
+=item B<-underline> => I<boolean>
+
+The value is a boolean flag that specifies whether characters in this
+font should be underlined. The default value for underline is B<false>.
+
+=item B<-overstrike> => I<boolean>
+
+The value is a boolean flag that specifies whether a horizontal line should
+be drawn through the middle of characters in this font. The default value
+for overstrike is B<false>.
+
+=back
+
+=head1 PLATFORM-SPECIFIC ISSUES
+
+The following named system fonts are supported:
+
+=over 4
+
+=item X Windows:
+
+All valid X font names, including those listed by xlsfonts(1), are available.
+
+=item MS Windows:
+
+ system ansi device
+ systemfixed ansifixed oemfixed
+
+=item Macintosh:
+
+ system application
+
+=back
+
+=head1 COMPATIBILITY WITH PREVIOUS VERSIONS
+
+In prior versions of perl/Tk the I<$widget>-E<gt>B<Font> method was a perl
+wrapper on the original "[4] X-font names (XLFD)" style as described above
+(which was the only form supported by versions of core tk prior to version
+tk8.0).
+This module is provided in its original form (it has just been renamed)
+via:
+
+ use Tk::X11Font;
+ I<$widget>-E<gt>B<X11Font>(...)
+
+However the methods of the old scheme have been mimiced as closely as possible
+with the new scheme. It is intended that code should work without modification,
+except for the case of using :
+
+ @names = $font->Name;
+
+i.e. the I<Name> method in an array/list context. This now returns one element
+on all platforms (as it did on Win32), while previously on X systems it returned
+a list of fonts that matched an under-specified pattern.
+
+Briefly the methods supported for compatibilty are as follows:
+
+=over 4
+
+=item $newfont = I<$font>-E<gt>B<Clone>(I<-option>=>I<value>, ...>?)
+
+Returns a new font object I<$newfont> related to the original I<$font> by
+changing the values of the specified I<-option>s.
+
+=item I<$font>-E<gt>Family - maps to -family
+
+=item I<$font>-E<gt>Weight - maps to -weight
+
+=item I<$font>-E<gt>Slant - maps to -slant
+
+=item I<$font>-E<gt>Pixel and Point - map to -size
+
+=back
+
+New code should use I<$font>-E<gt>B<configure> to achieve same effect as last
+four items above.
+
+=over 4
+
+=item Foundry, Swidth, Adstyle, Xres, Yres, Space, Avgwidth, Registry, Encoding
+
+Are all ignored if set, and return '*' if queried.
+
+=item I<$font>-E<gt>B<Name>
+
+Returns the name of a named font, or a string representation of an unnamed
+font. Using I<$font> in a scalar context does the same. Note this is distinctly
+different from behaviour of L<X11Font's Name|Tk::X11Font/Name( [ $max ] )> in
+a list context.
+
+=item I<$font>-E<gt>B<Pattern>
+
+Returns a XLFD string for the font based on I<actual> values, and some heuristics
+to map Tk's forms to the "standard" X conventions.
+
+=back
+
+
+=head1 SEE ALSO
+
+L<Tk::options|Tk::options>
+
+L<Tk::X11Font|Tk::X11Font>
+
+=head1 KEYWORDS
+
+font
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Frame.pm b/Master/tlpkg/tlperl/lib/Tk/Frame.pm
new file mode 100644
index 00000000000..a5716cdf9bd
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Frame.pm
@@ -0,0 +1,378 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Frame;
+require Tk::Widget;
+require Tk::Derived;
+use AutoLoader;
+use strict qw(vars);
+use Carp;
+
+use base qw(Tk::Derived Tk::Widget);
+
+Construct Tk::Widget 'Frame';
+
+use vars qw($VERSION);
+$VERSION = '4.010'; # $Id: //depot/Tkutf8/Tk/Frame.pm#10 $
+
+sub Tk_cmd { \&Tk::frame }
+
+sub CreateOptions
+{
+ return (shift->SUPER::CreateOptions,'-colormap','-visual','-container')
+}
+
+sub Default
+{
+ my ($cw,$name,$widget) = @_;
+ confess 'No name' unless (defined $name);
+ croak 'No widget' unless (defined $widget);
+ $cw->Delegates(DEFAULT => $widget);
+ $cw->ConfigSpecs(DEFAULT => [$widget]);
+ $widget->pack('-expand' => 1, -fill => 'both') unless ($widget->manager); # Suspect
+ $cw->Advertise($name,$widget);
+}
+
+sub ConfigDelegate
+{
+ my ($cw,$name,@skip) = @_;
+ my $sw = $cw->Subwidget($name);
+ my $sc;
+ my %skip = ();
+ foreach $sc (@skip)
+ {
+ $skip{$sc} = 1;
+ }
+ foreach $sc ($sw->configure)
+ {
+ my (@info) = @$sc;
+ next if (@info == 2);
+ my $option = $info[0];
+ unless ($skip{$option})
+ {
+ $option =~ s/^-(.*)/-$name\u$1/;
+ $info[0] = Tk::Configure->new($sw,$info[0]);
+ pop(@info);
+ $cw->ConfigSpecs($option => \@info);
+ }
+ }
+}
+
+sub bind
+{my ($cw,@args) = @_;
+ $cw->Delegate('bind',@args);
+}
+
+sub menu
+{my ($cw,@args) = @_;
+ $cw->Delegate('menu',@args);
+}
+
+sub focus
+{my ($cw,@args) = @_;
+ $cw->Delegate('focus',@args);
+}
+
+#sub bindtags
+#{my ($cw,@args) = @_;
+# $cw->Delegate('bindtags',@args);
+#}
+
+sub selection
+{my ($cw,@args) = @_;
+ $cw->Delegate('selection',@args);
+}
+
+sub autoLabel { 1 }
+
+sub Populate
+{
+ my ($cw,$args) = @_;
+ if ($cw->autoLabel)
+ {
+ $cw->ConfigSpecs('-labelPack' => [ 'METHOD', undef, undef, undef]);
+ $cw->ConfigSpecs('-labelVariable' => [ 'METHOD', undef, undef, undef]);
+ $cw->ConfigSpecs('-label' => [ 'METHOD', undef, undef, undef]);
+ $cw->labelPack([]) if grep /^-label\w+/, keys %$args;
+ }
+}
+
+sub Menubar
+{
+ my $frame = shift;
+ my $menu = $frame->cget('-menu');
+ if (defined $menu)
+ {
+ $menu->configure(@_) if @_;
+ }
+ else
+ {
+ $menu = $frame->Menu(-type => 'menubar',@_);
+ $frame->configure('-menu' => $menu);
+ }
+ $frame->Advertise('menubar' => $menu);
+ return $menu;
+}
+
+1;
+
+__END__
+
+sub labelPack
+{
+ my ($cw,$val) = @_;
+ my $w = $cw->Subwidget('label');
+ my @result = ();
+ if (@_ > 1)
+ {
+ if (defined($w) && !defined($val))
+ {
+ $w->packForget;
+ }
+ elsif (defined($val) && !defined ($w))
+ {
+ require Tk::Label;
+ $w = Tk::Label->new($cw,-textvariable => $cw->labelVariable);
+ $cw->Advertise('label' => $w);
+ $cw->ConfigDelegate('label',qw(-text -textvariable));
+ }
+ if (defined($val) && defined($w))
+ {
+ my %pack = @$val;
+ unless (exists $pack{-side})
+ {
+ $pack{-side} = 'top' unless (exists $pack{-side});
+ }
+ unless (exists $pack{-fill})
+ {
+ $pack{-fill} = 'x' if ($pack{-side} =~ /(top|bottom)/);
+ $pack{-fill} = 'y' if ($pack{-side} =~ /(left|right)/);
+ }
+ unless (exists($pack{'-before'}) || exists($pack{'-after'}))
+ {
+ my $before = ($cw->packSlaves)[0];
+ $pack{'-before'} = $before if (defined $before);
+ }
+ $w->pack(%pack);
+ }
+ }
+ @result = $w->packInfo if (defined $w);
+ return (wantarray) ? @result : \@result;
+}
+
+sub labelVariable
+{
+ my ($cw,$val) = @_;
+ my $var = \$cw->{Configure}{'-labelVariable'};
+ if (@_ > 1 && defined $val)
+ {
+ $$var = $val;
+ $$val = '' unless (defined $$val);
+ my $w = $cw->Subwidget('label');
+ unless (defined $w)
+ {
+ $cw->labelPack([]);
+ $w = $cw->Subwidget('label');
+ }
+ $w->configure(-textvariable => $val);
+ }
+ return $$var;
+}
+
+sub label
+{
+ my ($cw,$val) = @_;
+ my $var = $cw->cget('-labelVariable');
+ if (@_ > 1 && defined $val)
+ {
+ if (!defined $var)
+ {
+ $var = \$cw->{Configure}{'-label'};
+ $cw->labelVariable($var);
+ }
+ $$var = $val;
+ }
+ return (defined $var) ? $$var : undef;;
+}
+
+sub queuePack
+{
+ my ($cw) = @_;
+ unless ($cw->{'pack_pending'})
+ {
+ $cw->{'pack_pending'} = 1;
+ $cw->afterIdle([$cw,'packscrollbars']);
+ }
+}
+
+sub sbset
+{
+ my ($cw,$sb,$ref,@args) = @_;
+ $sb->set(@args);
+ $cw->queuePack if (@args == 2 && $sb->Needed != $$ref);
+}
+
+sub freeze_on_map
+{
+ my ($w) = @_;
+ unless ($w->Tk::bind('Freeze','<Map>'))
+ {
+ $w->Tk::bind('Freeze','<Map>',['packPropagate' => 0])
+ }
+ $w->AddBindTag('Freeze');
+}
+
+sub AddScrollbars
+{
+ require Tk::Scrollbar;
+ my ($cw,$w) = @_;
+ my $def = '';
+ my ($x,$y) = ('','');
+ my $s = 0;
+ my $c;
+ $cw->freeze_on_map;
+ foreach $c ($w->configure)
+ {
+ my $opt = $c->[0];
+ if ($opt eq '-yscrollcommand')
+ {
+ my $slice = Tk::Frame->new($cw,Name => 'ysbslice');
+ my $ysb = Tk::Scrollbar->new($slice,-orient => 'vertical', -command => [ 'yview', $w ]);
+ my $size = $ysb->cget('-width');
+ my $corner = Tk::Frame->new($slice,Name=>'corner','-relief' => 'raised',
+ '-width' => $size, '-height' => $size);
+ $ysb->pack(-side => 'left', -fill => 'y');
+ $cw->Advertise('yscrollbar' => $ysb);
+ $cw->Advertise('corner' => $corner);
+ $cw->Advertise('ysbslice' => $slice);
+ $corner->{'before'} = $ysb->PathName;
+ $slice->{'before'} = $w->PathName;
+ $y = 'w';
+ $s = 1;
+ }
+ elsif ($opt eq '-xscrollcommand')
+ {
+ my $xsb = Tk::Scrollbar->new($cw,-orient => 'horizontal', -command => [ 'xview', $w ]);
+ $cw->Advertise('xscrollbar' => $xsb);
+ $xsb->{'before'} = $w->PathName;
+ $x = 's';
+ $s = 1;
+ }
+ }
+ if ($s)
+ {
+ $cw->Advertise('scrolled' => $w);
+ $cw->ConfigSpecs('-scrollbars' => ['METHOD','scrollbars','Scrollbars',$x.$y]);
+ }
+}
+
+sub packscrollbars
+{
+ my ($cw) = @_;
+ my $opt = $cw->cget('-scrollbars');
+ my $slice = $cw->Subwidget('ysbslice');
+ my $xsb = $cw->Subwidget('xscrollbar');
+ my $corner = $cw->Subwidget('corner');
+ my $w = $cw->Subwidget('scrolled');
+ my $xside = (($opt =~ /n/) ? 'top' : 'bottom');
+ my $havex = 0;
+ my $havey = 0;
+ $opt =~ s/r//;
+ $cw->{'pack_pending'} = 0;
+ if (defined $slice)
+ {
+ my $reqy;
+ my $ysb = $cw->Subwidget('yscrollbar');
+ if ($opt =~ /(o)?[we]/ && (($reqy = !defined($1)) || $ysb->Needed))
+ {
+ my $yside = (($opt =~ /w/) ? 'left' : 'right');
+ $slice->pack(-side => $yside, -fill => 'y',-before => $slice->{'before'});
+ $havey = 1;
+ if ($reqy)
+ {
+ $w->configure(-yscrollcommand => ['set', $ysb]);
+ }
+ else
+ {
+ $w->configure(-yscrollcommand => ['sbset', $cw, $ysb, \$cw->{'packysb'}]);
+ }
+ }
+ else
+ {
+ $w->configure(-yscrollcommand => undef) unless $opt =~ s/[we]//;
+ $slice->packForget;
+ }
+ $cw->{'packysb'} = $havey;
+ }
+ if (defined $xsb)
+ {
+ my $reqx;
+ if ($opt =~ /(o)?[ns]/ && (($reqx = !defined($1)) || $xsb->Needed))
+ {
+ $xsb->pack(-side => $xside, -fill => 'x',-before => $xsb->{'before'});
+ $havex = 1;
+ if ($reqx)
+ {
+ $w->configure(-xscrollcommand => ['set', $xsb]);
+ }
+ else
+ {
+ $w->configure(-xscrollcommand => ['sbset', $cw, $xsb, \$cw->{'packxsb'}]);
+ }
+ }
+ else
+ {
+ $w->configure(-xscrollcommand => undef) unless $opt =~ s/[ns]//;
+ $xsb->packForget;
+ }
+ $cw->{'packxsb'} = $havex;
+ }
+ if (defined $corner)
+ {
+ if ($havex && $havey && defined $corner->{'before'})
+ {
+ my $anchor = $opt;
+ $anchor =~ s/o//g;
+ $corner->configure(-height => $xsb->ReqHeight);
+ $corner->pack(-before => $corner->{'before'}, -side => $xside,
+ -anchor => $anchor, -fill => 'x');
+ }
+ else
+ {
+ $corner->packForget;
+ }
+ }
+}
+
+sub scrollbars
+{
+ my ($cw,$opt) = @_;
+ my $var = \$cw->{'-scrollbars'};
+ if (@_ > 1)
+ {
+ my $old = $$var;
+ if (!defined $old || $old ne $opt)
+ {
+ $$var = $opt;
+ $cw->queuePack;
+ }
+ }
+ return $$var;
+}
+
+sub FindMenu
+{
+ my ($w,$char) = @_;
+ my $child;
+ my $match;
+ foreach $child ($w->children)
+ {
+ next unless (ref $child);
+ $match = $child->FindMenu($char);
+ return $match if (defined $match);
+ }
+ return undef;
+}
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Frame.pod b/Master/tlpkg/tlperl/lib/Tk/Frame.pod
new file mode 100644
index 00000000000..6570b6a18c7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Frame.pod
@@ -0,0 +1,146 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Frame - Create and manipulate Frame widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+S< >I<$frame> = I<$parent>-E<gt>B<Frame>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-borderwidth> B<-highlightbackground> B<-highlightthickness> B<-takefocus>
+B<-class> B<-highlightcolor> B<-relief>
+B<-cursor>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<background>
+
+=item Class: B<Background>
+
+=item Switch: B<-background>
+
+This option is the same as the standard B<background> option
+except that its value may also be specified as an undefined value.
+In this case, the widget will display no background or border, and
+no colors will be consumed from its colormap for its background
+and border.
+
+=item Name: B<colormap>
+
+=item Class: B<Colormap>
+
+=item Switch: B<-colormap>
+
+Specifies a colormap to use for the window.
+The value may be either B<new>, in which case a new colormap is
+created for the window and its children, or the name of another
+window (which must be on the same screen and have the same visual
+as $widget), in which case the new window will use the colormap
+from the specified window.
+If the B<colormap> option is not specified, the new window
+uses the same colormap as its parent.
+This option may not be changed with the B<configure>
+method.
+
+=item Name: B<container>
+
+=item Class: B<Container>
+
+=item Switch: B<-container>
+
+The value must be a boolean. If true, it means that this window will
+be used as a container in which some other application will be embedded
+(for example, a Tk toplevel can be embedded using the B<-use> option).
+The window will support the appropriate window manager protocols for
+things like geometry requests. The window should not have any
+children of its own in this application.
+This option may not be changed with the B<configure>
+method.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies the desired height for the window in any of the forms
+acceptable to B<Tk_GetPixels>.
+If this option is less than or equal to zero then the window will
+not request any size at all.
+
+=item Name: B<visual>
+
+=item Class: B<Visual>
+
+=item Switch: B<-visual>
+
+Specifies visual information for the new window in any of the
+forms accepted by B<Tk_GetVisual>.
+If this option is not specified, the new window will use the same
+visual as its parent.
+The B<visual> option may not be modified with the B<configure>
+method.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired width for the window in any of the forms
+acceptable to B<Tk_GetPixels>.
+If this option is less than or equal to zero then the window will
+not request any size at all.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Frame> method creates a new window (given by the
+$widget argument) and makes it into a frame widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the frame such as its background color
+and relief. The B<frame> command returns the
+path name of the new window.
+
+A frame is a simple widget. Its primary purpose is to act as a
+spacer or container for complex window layouts. The only features
+of a frame are its background color and an optional 3-D border to make the
+frame appear raised or sunken.
+
+=head1 WIDGET METHODS
+
+The B<Frame> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+=head1 BINDINGS
+
+When a new frame is created, it has no default event bindings:
+frames are not intended to be interactive.
+
+=head1 KEYWORDS
+
+frame, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/HList.pm b/Master/tlpkg/tlperl/lib/Tk/HList.pm
new file mode 100644
index 00000000000..d259ca9ce24
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/HList.pm
@@ -0,0 +1,685 @@
+package Tk::HList;
+
+use vars qw($VERSION);
+$VERSION = '4.015'; # was: sprintf '4.%03d', q$Revision: #14 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw(Ev $XS_VERSION);
+
+use base qw(Tk::Widget);
+
+Construct Tk::Widget 'HList';
+sub Tk::Widget::ScrlHList { shift->Scrolled('HList'=>@_) }
+
+bootstrap Tk::HList;
+
+sub Tk_cmd { \&Tk::hlist }
+
+sub CreateArgs
+{
+ my ($package,$parent,$args) = @_;
+ my @result = $package->SUPER::CreateArgs($parent,$args);
+ my $columns = delete $args->{-columns};
+ push(@result, '-columns' => $columns) if (defined $columns);
+ return @result;
+}
+
+Tk::Methods qw(add addchild anchor column
+ delete dragsite dropsite entrycget
+ entryconfigure geometryinfo indicator header hide item info
+ nearest see select selection show xview yview);
+
+use Tk::Submethods ( 'delete' => [qw(all entry offsprings siblings)],
+ 'header' => [qw(configure cget create delete exists size)],
+ 'indicator' => [qw(configure cget create delete exists size)],
+ 'info' => [qw(anchor bbox children data dragsite
+ dropsite exists hidden item next parent prev
+ selection)],
+ 'item' => [qw(configure cget create delete exists)],
+ 'selection' => [qw(clear get includes set)],
+ 'anchor' => [qw(clear set)],
+ 'column' => [qw(width)],
+ );
+
+# This is undocumented, but worked until 804.027:
+sub hideEntry { shift->hide('entry', @_) }
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+
+ $mw->bind($class,'<ButtonPress-1>',[ 'Button1' ] );
+ $mw->bind($class,'<Shift-ButtonPress-1>',[ 'ShiftButton1' ] );
+ $mw->bind($class,'<Control-ButtonRelease-1>','Control_ButtonRelease_1');
+ $mw->bind($class,'<ButtonRelease-1>','ButtonRelease_1');
+ $mw->bind($class,'<Double-ButtonRelease-1>','NoOp');
+ $mw->bind($class,'<B1-Motion>',[ 'Button1Motion' ] );
+ $mw->bind($class,'<B1-Leave>',[ 'AutoScan' ] );
+
+ $mw->bind($class,'<Double-ButtonPress-1>',['Double1']);
+
+ $mw->bind($class,'<Control-B1-Motion>','Control_B1_Motion');
+ $mw->bind($class,'<Control-ButtonPress-1>',['CtrlButton1']);
+ $mw->bind($class,'<Control-Double-ButtonPress-1>',['CtrlButton1']);
+
+ $mw->bind($class,'<B1-Enter>','B1_Enter');
+
+ $mw->bind($class,'<Up>',['UpDown', 'prev']);
+ $mw->bind($class,'<Down>',['UpDown', 'next']);
+
+ $mw->bind($class,'<Shift-Up>',['ShiftUpDown', 'prev']);
+ $mw->bind($class,'<Shift-Down>',['ShiftUpDown', 'next']);
+
+ $mw->bind($class,'<Left>', ['LeftRight', 'left']);
+ $mw->bind($class,'<Right>',['LeftRight', 'right']);
+
+ $mw->PriorNextBind($class);
+ $mw->MouseWheelBind($class);
+
+ $mw->bind($class,'<Return>', ['KeyboardActivate']);
+ $mw->bind($class,'<space>', ['KeyboardBrowse']);
+ $mw->bind($class,'<Home>', ['KeyboardHome']);
+ $mw->bind($class,'<End>', ['KeyboardEnd']);
+
+ $mw->YMouseWheelBind($class);
+ $mw->XMouseWheelBind($class);
+
+ return $class;
+}
+
+sub Control_ButtonRelease_1
+{
+}
+
+sub ButtonRelease_1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->CancelRepeat
+ if($w->cget('-selectmode') ne 'dragdrop');
+ $w->ButtonRelease1($Ev);
+}
+
+sub Control_B1_Motion
+{
+}
+
+sub B1_Enter
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->CancelRepeat
+ if($w->cget('-selectmode') ne 'dragdrop');
+}
+
+sub Button1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ delete $w->{'shiftanchor'};
+ delete $w->{tixindicator};
+
+ $w->focus() if($w->cget('-takefocus'));
+
+ my $mode = $w->cget('-selectmode');
+
+ if ($mode eq 'dragdrop')
+ {
+ # $w->Send_WaitDrag($Ev->y);
+ return;
+ }
+
+ my $ent = $w->GetNearest($Ev->y, 1);
+
+ if (!defined($ent) || !length($ent))
+ {
+ $w->selectionClear;
+ $w->anchorClear;
+ return;
+ }
+
+ my @info = $w->info('item',$Ev->x, $Ev->y);
+ if (@info)
+ {
+ die 'Assert' unless $info[0] eq $ent;
+ }
+ else
+ {
+ @info = $ent;
+ }
+
+ if (defined($info[1]) && $info[1] eq 'indicator')
+ {
+ $w->{tixindicator} = $ent;
+ $w->Callback(-indicatorcmd => $ent, '<Arm>');
+ }
+ else
+ {
+ my $browse = 0;
+
+ if ($mode eq 'single')
+ {
+ $w->anchorSet($ent);
+ }
+ elsif ($mode eq 'browse')
+ {
+ $w->anchorSet($ent);
+ $w->selectionClear;
+ $w->selectionSet($ent);
+ $browse = 1;
+ }
+ elsif ($mode eq 'multiple')
+ {
+ $w->selectionClear;
+ $w->anchorSet($ent);
+ $w->selectionSet($ent);
+ $browse = 1;
+ }
+ elsif ($mode eq 'extended')
+ {
+ $w->anchorSet($ent);
+ $w->selectionClear;
+ $w->selectionSet($ent);
+ $browse = 1;
+ }
+
+ if ($browse)
+ {
+ $w->Callback(-browsecmd => @info);
+ }
+ }
+}
+
+sub ShiftButton1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ my $to = $w->GetNearest($Ev->y, 1);
+
+ delete $w->{'shiftanchor'};
+ delete $w->{tixindicator};
+
+ return unless (defined($to) and length($to));
+
+ my $mode = $w->cget('-selectmode');
+
+ if($mode eq 'extended' or $mode eq 'multiple')
+ {
+ my $from = $w->info('anchor');
+ if(defined $from)
+ {
+ $w->selectionClear;
+ $w->selectionSet($from, $to);
+ }
+ else
+ {
+ $w->anchorSet($to);
+ $w->selectionClear;
+ $w->selectionSet($to);
+ }
+ }
+}
+
+sub GetNearest
+{
+ my ($w,$y,$undefafterend) = @_;
+ my $ent = $w->nearest($y);
+ if (defined $ent)
+ {
+ if ($undefafterend)
+ {
+ my $borderwidth = $w->cget('-borderwidth');
+ my $highlightthickness = $w->cget('-highlightthickness');
+ my $bottomy = ($w->infoBbox($ent))[3];
+ $bottomy += $borderwidth + $highlightthickness;
+ if ($w->header('exist', 0))
+ {
+ $bottomy += $w->header('height');
+ }
+ if ($y > $bottomy)
+ {
+ #print "$y > $bottomy\n";
+ return undef;
+ }
+ }
+ my $state = $w->entrycget($ent, '-state');
+ return $ent if (!defined($state) || $state ne 'disabled');
+ }
+ return undef;
+}
+
+sub ButtonRelease1
+{
+ my ($w, $Ev) = @_;
+
+ delete $w->{'shiftanchor'};
+
+ my $mode = $w->cget('-selectmode');
+
+ if($mode eq 'dragdrop')
+ {
+# $w->Send_DoneDrag();
+ return;
+ }
+
+ my ($x, $y) = ($Ev->x, $Ev->y);
+ my $ent = $w->GetNearest($y, 1);
+
+ if (!defined($ent) and $mode eq 'single')
+ {
+ my $ent = $w->info('selection');
+ if (defined $ent)
+ {
+ $w->anchorSet($ent);
+ }
+ }
+ return unless (defined($ent) and length($ent));
+
+ if (exists $w->{tixindicator})
+ {
+ return unless delete($w->{tixindicator}) eq $ent;
+ my @info = $w->info('item',$Ev->x, $Ev->y);
+ if(defined($info[1]) && $info[1] eq 'indicator')
+ {
+ $w->Callback(-indicatorcmd => $ent, '<Activate>');
+ }
+ else
+ {
+ $w->Callback(-indicatorcmd => $ent, '<Disarm>');
+ }
+ return;
+ }
+
+ if($mode eq 'single' || $mode eq 'browse')
+ {
+ $w->anchorSet($ent);
+ $w->selectionClear;
+ $w->selectionSet($ent);
+
+ }
+ elsif($mode eq 'multiple')
+ {
+ $w->selectionSet($ent);
+ }
+ elsif($mode eq 'extended')
+ {
+ $w->selectionSet($ent);
+ }
+
+ $w->Callback(-browsecmd =>$ent);
+}
+
+sub Button1Motion
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ return unless defined $Ev;
+
+ delete $w->{'shiftanchor'};
+
+ my $mode = $w->cget('-selectmode');
+
+ if ($mode eq 'dragdrop')
+ {
+# $w->Send_StartDrag();
+ return;
+ }
+
+ my $ent;
+ if (defined $w->info('anchor'))
+ {
+ $ent = $w->GetNearest($Ev->y);
+ }
+ else
+ {
+ $ent = $w->GetNearest($Ev->y, 1);
+ }
+ return unless (defined($ent) and length($ent));
+
+ if(exists $w->{tixindicator})
+ {
+ my $event_type = $w->{tixindicator} eq $ent ? '<Arm>' : '<Disarm>';
+ $w->Callback(-indicatorcmd => $w->{tixindicator}, $event_type );
+ return;
+ }
+
+ if ($mode eq 'single')
+ {
+ $w->anchorSet($ent);
+ }
+ elsif ($mode eq 'multiple' || $mode eq 'extended')
+ {
+ my $from = $w->info('anchor');
+ if(defined $from)
+ {
+ $w->selectionClear;
+ $w->selectionSet($from, $ent);
+ }
+ else
+ {
+ $w->anchorSet($ent);
+ $w->selectionClear;
+ $w->selectionSet($ent);
+ }
+ }
+
+ if ($mode ne 'single')
+ {
+ $w->Callback(-browsecmd =>$ent);
+ }
+}
+
+sub Double1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ delete $w->{'shiftanchor'};
+
+ my $ent = $w->GetNearest($Ev->y, 1);
+
+ return unless (defined($ent) and length($ent));
+
+ $w->anchorSet($ent)
+ unless(defined $w->info('anchor'));
+
+ $w->selectionSet($ent);
+
+ $w->Callback(-command => $ent);
+}
+
+sub CtrlButton1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ delete $w->{'shiftanchor'};
+
+ my $ent = $w->GetNearest($Ev->y, 1);
+
+ return unless (defined($ent) and length($ent));
+
+ my $mode = $w->cget('-selectmode');
+
+ if($mode eq 'extended')
+ {
+ $w->anchorSet($ent) unless( defined $w->info('anchor') );
+
+ if($w->select('includes', $ent))
+ {
+ $w->select('clear', $ent);
+ }
+ else
+ {
+ $w->selectionSet($ent);
+ }
+ $w->Callback(-browsecmd =>$ent);
+ }
+}
+
+sub UpDown
+{
+ my $w = shift;
+ my $spec = shift;
+
+ my $done = 0;
+ my $anchor = $w->info('anchor');
+
+ delete $w->{'shiftanchor'};
+
+ unless( defined $anchor )
+ {
+ $anchor = ($w->info('children'))[0];
+
+ return unless (defined($anchor) and length($anchor));
+
+ if($w->entrycget($anchor, '-state') ne 'disabled')
+ {
+ # That's a good anchor
+ $done = 1;
+ }
+ else
+ {
+ # We search for the first non-disabled entry (downward)
+ $spec = 'next';
+ }
+ }
+
+ my $ent = $anchor;
+
+ # Find the prev/next non-disabled entry
+ #
+ while(!$done)
+ {
+ $ent = $w->info($spec, $ent);
+ last unless( defined $ent );
+ next if( $w->entrycget($ent, '-state') eq 'disabled' );
+ next if( $w->info('hidden', $ent) );
+ last;
+ }
+
+ unless( defined $ent )
+ {
+ $w->yview('scroll', $spec eq 'prev' ? -1 : 1, 'unit');
+ return;
+ }
+
+ $w->anchorSet($ent);
+ $w->see($ent);
+
+ if($w->cget('-selectmode') ne 'single')
+ {
+ $w->selectionClear;
+ $w->selection('set', $ent);
+ $w->Callback(-browsecmd =>$ent);
+ }
+}
+
+sub ShiftUpDown
+{
+ my $w = shift;
+ my $spec = shift;
+
+ my $mode = $w->cget('-selectmode');
+
+ return $w->UpDown($spec)
+ if($mode eq 'single' || $mode eq 'browse');
+
+ my $anchor = $w->info('anchor');
+
+ return $w->UpDown($spec) unless (defined($anchor) and length($anchor));
+
+ my $done = 0;
+
+ $w->{'shiftanchor'} = $anchor unless( $w->{'shiftanchor'} );
+
+ my $ent = $w->{'shiftanchor'};
+
+ while( !$done )
+ {
+ $ent = $w->info($spec, $ent);
+ last unless( defined $ent );
+ next if( $w->entrycget($ent, '-state') eq 'disabled' );
+ next if( $w->info('hidden', $ent) );
+ last;
+ }
+
+ unless( $ent )
+ {
+ $w->yview('scroll', $spec eq 'prev' ? -1 : 1, 'unit');
+ return;
+ }
+
+ $w->selectionClear;
+ $w->selection('set', $anchor, $ent);
+ $w->see($ent);
+
+ $w->{'shiftanchor'} = $ent;
+
+ $w->Callback(-browsecmd =>$ent);
+}
+
+sub LeftRight
+{
+ my $w = shift;
+ my $spec = shift;
+
+ delete $w->{'shiftanchor'};
+
+ my $anchor = $w->info('anchor');
+
+ unless(defined $anchor)
+ {
+ $anchor = ($w->info('children'))[0]
+ }
+ unless(defined $anchor)
+ {
+ $anchor = '';
+ }
+
+ my $done = 0;
+ my $ent = $anchor;
+
+ while(!$done)
+ {
+ my $e = $ent;
+
+ if($spec eq 'left')
+ {
+ $ent = $w->info('parent', $e);
+
+ $ent = $w->info('prev', $e)
+ unless(defined $ent && $w->entrycget($ent, '-state') ne 'disabled')
+ }
+ else
+ {
+ $ent = ($w->info('children', $e))[0];
+
+ $ent = $w->info('next', $e)
+ unless(defined $ent && $w->entrycget($ent, '-state') ne 'disabled')
+ }
+
+ last unless( defined $ent );
+ last if($w->entrycget($ent, '-state') ne 'disabled');
+ }
+
+ unless( defined $ent )
+ {
+ $w->xview('scroll', $spec eq 'left' ? -1 : 1, 'unit');
+ return;
+ }
+
+ $w->anchorSet($ent);
+ $w->see($ent);
+
+ if($w->cget('-selectmode') ne 'single')
+ {
+ $w->selectionClear;
+ $w->selectionSet($ent);
+
+ $w->Callback(-browsecmd =>$ent);
+ }
+}
+
+sub KeyboardHome
+{
+ my $w = shift;
+ $w->yview('moveto' => 0);
+ $w->xview('moveto' => 0);
+}
+
+sub KeyboardEnd
+{
+ my $w = shift;
+ $w->yview('moveto' => 1);
+ $w->xview('moveto' => 0);
+}
+
+sub KeyboardActivate
+{
+ my $w = shift;
+
+ my $anchor = $w->info('anchor');
+
+ return unless (defined($anchor) and length($anchor));
+
+ if($w->cget('-selectmode'))
+ {
+ $w->selectionClear;
+ $w->selectionSet($anchor);
+ }
+
+ $w->Callback(-command => $anchor);
+}
+
+sub KeyboardBrowse
+{
+ my $w = shift;
+
+ my $anchor = $w->info('anchor');
+
+ return unless (defined($anchor) and length($anchor));
+
+ if ($w->indicatorExists($anchor))
+ {
+ $w->Callback(-indicatorcmd => $anchor);
+ }
+
+ if($w->cget('-selectmode'))
+ {
+ $w->selectionClear;
+ $w->selectionSet($anchor);
+ }
+ $w->Callback(-browsecmd =>$anchor);
+}
+
+sub AutoScan
+{
+ my ($w,$x,$y) = @_;
+
+ return if ($w->cget('-selectmode') eq 'dragdrop');
+ if (@_ < 3)
+ {
+ my $Ev = $w->XEvent;
+ return unless defined $Ev;
+ $y = $Ev->y;
+ $x = $Ev->x;
+ }
+
+ if($y >= $w->height)
+ {
+ $w->yview('scroll', 1, 'units');
+ }
+ elsif($y < 0)
+ {
+ $w->yview('scroll', -1, 'units');
+ }
+ elsif($x >= $w->width)
+ {
+ $w->xview('scroll', 2, 'units');
+ }
+ elsif($x < 0)
+ {
+ $w->xview('scroll', -2, 'units');
+ }
+ else
+ {
+ return;
+ }
+ $w->RepeatId($w->SUPER::after(50,[ AutoScan => $w, $x, $y ]));
+ $w->Button1Motion;
+}
+
+sub children
+{
+ # Tix has core-tk window(s) which are not a widget(s)
+ # the generic code returns these as an "undef"
+ my $w = shift;
+ my @info = grep(defined($_),$w->winfo('children'));
+ @info;
+}
+
+1;
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/HList.pod b/Master/tlpkg/tlperl/lib/Tk/HList.pod
new file mode 100644
index 00000000000..0843e689843
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/HList.pod
@@ -0,0 +1,1050 @@
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distribution are in the file
+# license.tcl.
+
+=head1 NAME
+
+Tk::HList - Create and manipulate Tix Hierarchial List widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$hlist> = I<$parent>-E<gt>B<HList>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-background> B<-borderwidth> B<-cursor> B<-exportselection>
+B<-foreground> B<-font> B<-height> B<-highlightcolor>
+B<-highlightthickness> B<-relief> B<-selectbackground>
+B<-selectforeground> B<-xscrollcommand> B<-yscrollcommand>
+B<-width>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<browsecmd>
+
+=item Class: B<BrowseCmd>
+
+=item Switch: B<-browsecmd>
+
+Specifies a perl/Tk L<callback|Tk::callbacks> to be executed when the user browses through the
+entries in the HList widget.
+
+=item Name: B<columns>
+
+=item Class: B<Columns>
+
+=item Switch: B<-columns>
+
+Specifies the number of columns in this HList widget. This option can
+only be set during the creation of the HList widget and cannot be
+changed subsequently.
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies the perl/Tk L<callback|Tk::callbacks> to be executed when the user invokes a list
+entry in the HList widget. Normally the user invokes a list
+entry by double-clicking it or pressing the Return key.
+
+=item Name: B<drawBranch>
+
+=item Class: B<DrawBranch>
+
+=item Switch: B<-drawbranch>
+
+A Boolean value to specify whether branch line should be drawn to
+connect list entries to their parents.
+
+=item Name: B<foreground>
+
+=item Class: B<Foreground>
+
+=item Switch: B<-foreground>
+
+=item Alias: B<-fg>
+
+B<[OBSOLETE]> Specifies the default foreground color for the list entries.
+
+=item Name: B<gap>
+
+=item Class: B<Gap>
+
+=item Switch: B<-gap>
+
+B<[OBSOLETE]> The default distance between the bitmap/image and the
+text in list entries.
+
+=item Name: B<header>
+
+=item Class: B<Header>
+
+=item Switch: B<-header>
+
+A Boolean value specifying whether headers should be displayed for
+this HList widget (see the B<header> method below).
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies the desired height for the window in number of characters.
+
+=item Name: B<indent>
+
+=item Class: B<Indent>
+
+=item Switch: B<-indent>
+
+Specifies the amount of horizontal indentation between a list entry
+and its children. Must be a valid screen distance value.
+
+=item Name: B<indicator>
+
+=item Class: B<Indicator>
+
+=item Switch: B<-indicator>
+
+Specifies whether the indicators should be displayed inside the HList
+widget. See the B<indicator> method below.
+
+=item Name: B<indicatorCmd>
+
+=item Class: B<IndicatorCmd>
+
+=item Switch: B<-indicatorcmd>
+
+Specifies a perl/Tk L<callback|Tk::callbacks> to be executed when the user manipulates the
+indicator of an HList entry. The B<-indicatorcmd> is triggered
+when the user press or releases the mouse button over the indicator in
+an HList entry. By default the perl/Tk B<callback> specified by
+B<-indicatorcmd> is executed with two additional arguments, the
+entryPath of the entry whose indicator has been triggered and additional
+information about the event. The additional information is one of the
+following strings: B<E<lt>ArmE<gt>>, B<E<lt>DisarmE<gt>>,
+and B<E<lt>ActivateE<gt>>.
+
+=item Name: B<itemType>
+
+=item Class: B<ItemType>
+
+=item Switch: B<-itemtype>
+
+Specifies the default type of display item for this HList widget. When
+you call the B<itemCreate>, B<add> and B<addchild> methods, display
+items of this
+type will be created if the B<-itemtype> option is not specified .
+
+=item Name: B<padX>
+
+=item Class: B<Pad>
+
+=item Switch: B<-padx>
+
+B<[OBSOLETE]> The default horizontal padding for list entries.
+
+=item Name: B<padY>
+
+=item Class: B<Pad>
+
+=item Switch: B<-padx>
+
+B<[OBSOLETE]> The default vertical padding for list entries.
+
+=item Name: B<selectBackground>
+
+=item Class: B<SelectBackground>
+
+=item Switch: B<-selectbackground>
+
+Specifies the background color for the selected list entries.
+
+=item Name: B<selectBorderWidth>
+
+=item Class: B<BorderWidth>
+
+=item Switch: B<-selectborderwidth>
+
+Specifies a non-negative value indicating the width of the 3-D border
+to draw around selected items. The value may have any of the forms
+acceptable to B<Tk_GetPixels>.
+
+=item Name: B<selectForeground>
+
+=item Class: B<SelectForeground>
+
+=item Switch: B<-selectforeground>
+
+Specifies the foreground color for the selected list entries.
+
+=item Name: B<selectMode>
+
+=item Class: B<SelectMode>
+
+=item Switch: B<-selectmode>
+
+Specifies one of several styles for manipulating the selection. The
+value of the option may be arbitrary, but the default bindings expect
+it to be either B<single>, B<browse>, B<multiple>, or
+B<extended>; the default value is B<single>.
+
+=item Name: B<sizeCmd>
+
+=item Class: B<SizeCmd>
+
+=item Switch: B<-sizecmd>
+
+Specifies a perl/Tk L<callback|Tk::callbacks> to be called whenever the HList widget
+changes its size. This method can be useful to implement ``I<user scroll
+bars when needed>'' features.
+
+=item Name: B<separator>
+
+=item Class: B<Separator>
+
+=item Switch: B<-separator>
+
+Specifies the character to used as the separator character when
+intepreting the path-names of list entries. By default the character
+"." is used.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired width for the window in characters.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<HList> method creates a new window (given by the
+$widget argument) and makes it into a HList widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+HList widget such as its cursor and relief.
+
+The HList widget can be used to display any data that have a
+hierarchical structure, for example, file system directory trees. The
+list entries are indented and connected by branch lines according to
+their places in the hierachy.
+
+Each list entry is identified by an B<entryPath>. The entryPath is a
+sequence of B<entry names> separated by the separator charactor
+(specified by the B<-separator> option). An B<entry name> can be
+any string that does not contain the separator charactor, or it can be
+the a string that contains only one separator charactor.
+
+For example, when "." is used as the separator charactor,
+"one.two.three" is the entryPath for a list entry whose parent is
+"one.two", whose parent is "one", which is a toplevel entry (has no
+parents).
+
+Another examples: ".two.three" is the entryPath for a list entry whose
+parent is ".two", whose parent is ".", which is a toplevel entry.
+
+=head1 DISPLAY ITEMS
+
+Each list entry in an HList widget is associated with a B<display>
+item. The display item determines what visual information should
+be displayed for this list entry. Please see L<Tk::DItem>
+for a list of all display items.
+When a list entry is created by the B<itemCreate>, B<add> or
+B<addchild> widget
+methods, the type of its display item is determined by the
+B<-itemtype> option passed to these methods. If the
+B<-itemtype> is omitted, then by default the type specified by
+this HList widget's B<-itemtype> option is used.
+
+=head1 WIDGET METHODS
+
+The B<HList> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available HList widgets:
+
+=over 4
+
+=item I<$hlist>-E<gt>B<add>(I<$entryPath> ?,I<option>=E<gt>I<value>, ...?)
+
+Creates a new list entry with the pathname I<$entryPath>. A list
+entry must be created after its parent is created (unless this entry
+is a top-level entry, which has no parent). See also L<"BUGS"> below.
+This method returns the
+entryPath of the newly created list entry. The following
+configuration options can be given to configure the list entry:
+
+=over 8
+
+=item B<-at> =E<gt> I<position>
+
+Insert the new list at the position given by I<position>.
+I<position> must be a valid integer. The position B<0> indicates
+the first position, B<1> indicates the second position, and so on.
+
+=item B<-after> =E<gt> I<afterWhich>
+
+Insert the new list entry after the entry identified by
+I<afterWhich>. I<afterWhich> must be a valid list entry and it
+mush have the same parent as the new list entry
+
+=item B<-before> =E<gt> I<beforeWhich>
+
+Insert the new list entry before the entry identified by
+I<beforeWhich>. I<beforeWhich> must be a valid list entry and it
+mush have the same parent as the new list entry
+
+=item B<-data> =E<gt> I<string>
+
+Specifies a string to associate with this list entry. This string can
+be queried by the B<info> method. The application
+programmer can use the B<-data> option to associate the list entry
+with the data it represents.
+
+=item B<-itemtype> =E<gt> I<type>
+
+Specifies the type of display item to be display for the new list
+entry. B<type> must be a valid display item type. Currently the
+available display item types are B<imagetext>, B<text>, and
+$widget. If this option is not specified, then by default the
+type specified by this HList widget's B<-itemtype> option is used.
+
+=item B<-state> =E<gt> I<state>
+
+Specifies whether this entry can be selected or invoked by the user.
+Must be either B<normal> or B<disabled>.
+
+=back
+
+The B<add> method accepts additional configuration options
+to configure the display item associated with this list entry. The set
+of additional configuration options depends on the type of the display
+item given by the B<-itemtype> option. Please see
+L<Tk::DItem> for a list of the configuration options for
+each of the display item types.
+
+=item I<$hlist>-E<gt>B<addchild>(I<$parentPath, >?I<option, value, ..., >?)
+
+Adds a new child entry to the children list of the list entry
+identified by I<$parentPath>. Or, if I<$parentPath> is set to be
+the empty string, then creates a new toplevel entry. The name of the
+new list entry will be a unique name automatically generated by the
+HList widget. Usually if I<$parentPath> is B<foo>, then the
+entryPath of the new entry will be B<foo.0>, B<foo.1>, ... etc.
+This method returns the entryPath of the newly created list entry.
+I<option> can be any option for the B<add> method.
+See also L<"BUGS"> below.
+
+=item I<$hlist>-E<gt>B<anchorSet>(I<$entryPath>)
+
+Sets the anchor to the list entry identified by I<$entryPath>. The
+anchor is the end of the selection that is fixed while the user is
+dragging out a selection with the mouse.
+
+=item I<$hlist>-E<gt>B<anchorClear>
+
+Removes the anchor, if any, from this HList widget. This only
+removes the surrounding highlights of the anchor entry and does not
+affect its selection status.
+
+=item I<$hlist>-E<gt>B<columnWidth>(I<$col>?, I<-char>?, ?I<width>?)
+
+Querys or sets the width of a the column I<$col> in the HList
+widget. The value of I<$col> is zero-based: 0 stands for the first
+column, 1 stands for the second, and so on. If no further parameters
+are given, returns the current width of this column (in number of
+pixels). Additional parameters can be given to set the width of this
+column:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<columnWidth>(I<$col>, B<''>)
+
+An empty string indicates that the width of the column should be just
+wide enough to display the widest element in this column. In this
+case, the width of this column may change as a result of the elements
+in this column changing their sizes.
+
+=item I<$hlist>-E<gt>B<columnWidth>(I<$col, >I<width>)
+
+I<width> must be in a form accepted by B<Tk_GetPixels>.
+
+=item I<$hlist>-E<gt>B<columnWidth>(I<$col, >B<-char, >I<nChars>)
+
+The width is set to be the average width occupied by I<nChars>
+number of characters of the font specified by the B<-font> option
+of this HList widget.
+
+=back
+
+=item I<$hlist>-E<gt>B<delete>(I<option>, I<$entryPath>)
+
+Delete one or more list entries. I<option> may be one of the
+following:
+
+=over 8
+
+=item B<all>
+
+Delete all entries in the HList. In this case the I<$entryPath>
+does not need to be specified.
+
+=item B<entry>
+
+Delete the entry specified by I<$entryPath> and all its offsprings,
+if any.
+
+=item B<offsprings>
+
+Delete all the offsprings, if any, of the entry specified by
+I<$entryPath>. However, I<$entryPath> itself is not deleted.
+
+=item B<siblings>
+
+Delete all the list entries that share the same parent with the entry
+specified by I<$entryPath>. However, I<$entryPath> itself is not
+deleted.
+
+=back
+
+=item I<$hlist>-E<gt>B<dragsiteSet>(I<$entryPath>)
+
+Sets the dragsite to the list entry identified by
+I<$entryPath>. The dragsite is used to indicate the source of a
+drag-and-drop action. Currently drag-and-drop functionality has not
+been implemented in Tix yet.
+
+=item I<$hlist>-E<gt>B<dragsiteClear>
+
+Remove the dragsite, if any, from the this HList widget. This only
+removes the surrounding highlights of the dragsite entry and does not
+affect its selection status.
+
+=item I<$hlist>-E<gt>B<dropsiteSet>(I<$entryPath>)
+
+Sets the dropsite to the list entry identified by I<$entryPath>. The
+dropsite is used to indicate the target of a drag-and-drop
+action. Currently drag-and-drop functionality has not been implemented
+in Tix yet.
+
+=item I<$hlist>-E<gt>B<dropsiteClear>
+
+Remove the dropsite, if any, from the this HList widget. This only
+removes the surrounding highlights of the dropsite entry and does not
+affect its selection status.
+
+=item I<$hlist>-E<gt>B<entrycget>(I<$entryPath>, I<option>)
+
+Returns the current value of the configuration option given by
+I<option> for the entry indentfied by I<$entryPath>. I<Option>
+may have any of the values accepted by the B<add> method.
+
+=item I<$hlist>-E<gt>B<entryconfigure>(I<$entryPath> ?,I<option>?, ?I<value>=E<gt>I<option>, ...?)
+
+Query or modify the configuration options of the list entry indentfied
+by I<$entryPath>. If no I<option> is specified, returns a list
+describing all of the available options for I<$entryPath> (see
+L<Tk::options> for information on the format of this list.) If
+I<option> is specified with no I<value>, then the method
+returns a list describing the one named option (this list will be
+identical to the corresponding sublist of the value returned if no
+I<option> is specified). If one or more I<option-value> pairs
+are specified, then the method modifies the given option(s) to have
+the given value(s); in this case the method returns an empty string.
+I<Option> may have any of the values accepted by the B<add> or
+B<addchild> method. The exact set of options depends on the
+value of the B<-itemtype> option passed to the the B<add> or
+B<addchild> method when this list entry is created.
+
+=item I<$hlist>-E<gt>B<header>(I<option>, I<$col> ?,I<args>, ...?)
+
+Manipulates the header items of this HList widget. If the
+B<-header> option of this HList widget is set to true, then a
+header item is displayed at the top of each column. The I<$col>
+argument for this method must be a valid integer. 0 indicates the
+first column, 1 the second column, ... and so on. This method
+supports the following options:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<header>(B<cget>, I<$col>, I<option>)
+
+If the I<$col>-th column has a header display item, returns the
+value of the specified I<option> of the header item. If the header
+doesn't exist, returns an error.
+
+=item I<$hlist>-E<gt>B<header>(B<configure, >I<$col, >?I<option>?, I<?value, option, value, ...>?)
+
+Query or modify the configuration options of the header display item
+of the I<$col>-th column. The header item must exist, or an error
+will result. If no I<option> is specified, returns a list
+describing all of the available options for the header display item
+(see L<Tk::options> for information on the format of this
+list.) If I<option> is specified with no I<value>, then the
+method returns a list describing the one named option (this list will
+be identical to the corresponding sublist of the value returned if no
+I<option> is specified). If one or more I<option-value> pairs
+are specified, then the method modifies the given option(s) to have
+the given value(s); in this case the method returns an empty
+string. I<Option> may have any of the values accepted by the
+B<header create> method. The exact set of options depends
+on the value of the B<-itemtype> option passed to the the B<header>
+create method when this display item was created.
+
+=item I<$hlist>-E<gt>B<header>(B<create, >I<$col, >?I<-itemtype type>? ?I<option value ...>?
+
+Creates a new display item as the header for the I<$col>-th
+column. See also L<"BUGS"> below.
+If an header display item already exists for this column, it
+will be replaced by the new item. An optional parameter
+I<-itemtype> can be used to specify what type of display item
+should be created. If the I<-itemtype> is not given, then by
+default the type specified by this HList widget's B<-itemtype>
+option is used. Additional parameters, in I<option-value> pairs,
+can be passed to configure the appearance of the display item. Each
+I<option-value> pair must be a valid option for this type of
+display item or one of the following:
+
+=over 12
+
+=item B<-borderwidth> =E<gt> I<color>
+
+Specifies the border width of this header item.
+
+=item B<-headerbackground> =E<gt> I<color>
+
+Specifies the background color of this header item.
+
+=item B<-relief> =E<gt> I<type>
+
+Specifies the relief type of the border of this header item.
+
+=back
+
+=item I<$hlist>-E<gt>B<header>(B<delete, >I<$col>)
+
+Deletes the header display item for the I<$col>-th column.
+
+=item I<$hlist>-E<gt>B<header>(B<exists, >I<$col>)
+
+Return true if an header display item exists for the I<$col>-th
+column; return false otherwise.
+
+=item I<$hlist>-E<gt>B<header>(B<size>, I<$col>)
+
+If an header display item exists for the I<$col>-th column , returns
+its size in pixels in a two element list I<(width, height)>;
+returns an error if the header display item does not exist.
+
+=back
+
+=item I<$hlist>-E<gt>B<hide>(I<option> ?,I<$entryPath>?)
+
+Makes some of entries invisible without deleting them.
+I<Option> can be one of the following:
+
+=over 8
+
+=item B<entry>
+
+Hides the list entry identified by I<$entryPath>.
+
+=back
+
+Currently only the B<entry> option is supported. Other options will
+be added in the next release.
+
+=item I<$hlist>-E<gt>B<indicator>(I<option>, I<$entryPath>, ?I<args, ...>?)
+
+Manipulates the indicator on the list entries. An indicator is usually
+a small display item (such as an image) that is displayed to the left
+to an entry to indicate the status of the entry. For example, it may
+be used to indicate whether a directory is opened or
+closed. I<Option> can be one of the following:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<indicator>(B<cget>, I<$entryPath>, I<option>)
+
+If the list entry given by I<$entryPath> has an indicator, returns
+the value of the specified I<option> of the indicator. If the
+indicator doesn't exist, returns an error.
+
+=item I<$hlist>-E<gt>B<indicator>(B<configure>, I<$entryPath>, ?I<option>?, I<?value, option, value, ...>?)
+
+Query or modify the configuration options of the indicator display
+item of the entry specified by I<$entryPath>. The indicator item
+must exist, or an error will result. If no I<option> is specified,
+returns a list describing all of the available options for the
+indicator display item (see L<Tk::options> for information
+on the format of this list). If I<option> is specified with no
+I<value>, then the method returns a list describing the one named
+option (this list will be identical to the corresponding sublist of
+the value returned if no I<option> is specified). If one or more
+I<option-value> pairs are specified, then the method modifies the
+given option(s) to have the given value(s); in this case the method
+returns an empty string. I<Option> may have any of the values
+accepted by the B<indicator create> method. The exact set
+of options depends on the value of the B<-itemtype> option passed
+to the the B<indicator create> method when this display item
+was created.
+
+=item I<$hlist>-E<gt>B<indicator>(B<create, >I<$entryPath, >?, I<-itemtype type>? ?I<option value ...>?)
+
+Creates a new display item as the indicator for the entry specified by
+I<$entryPath>. If an indicator display item already exists for this
+entry, it will be replaced by the new item. An optional parameter
+I<-itemtype> can be used to specify what type of display item
+should be created. If the I<-itemtype> is not given, then by
+default the type specified by this HList widget's B<-itemtype>
+option is used. Additional parameters, in I<option-value> pairs,
+can be passed to configure the appearance of the display item. Each
+I<option-value> pair must be a valid option for this type of
+display item.
+
+=item I<$hlist>-E<gt>B<indicator>(B<delete>, I<$entryPath>)
+
+Deletes the indicator display item for the entry given by I<$entryPath>.
+
+=item I<$hlist>-E<gt>B<indicator>(B<exists>, I<$entryPath>)
+
+Return true if an indicator display item exists for the entry given by
+I<$entryPath>; return false otherwise.
+
+=item I<$hlist>-E<gt>B<indicator>(B<size>, I<$entryPath>)
+
+If an indicator display item exists for the entry given by
+I<$entryPath>, returns its size in a two element list of the form
+{I<width height>}; returns an error if the indicator display item
+does not exist.
+
+=back
+
+=item I<$hlist>-E<gt>B<info>(I<option>, I<arg, ...>)
+
+Query information about the HList widget. I<option> can be one
+of the following:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<info>(B<anchor>)
+
+Returns the entryPath of the current anchor, if any, of the HList
+widget. If the anchor is not set, returns the empty string.
+
+=item I<$hlist>-E<gt>B<infoBbox>(I<$entryPath>)
+
+Returns a list of four numbers describing the visible bounding box of
+the entry given I<$entryPath>. The first two elements of the list
+give the x and y coordinates of the upper-left corner of the screen
+area covered by the entry (specified in pixels relative to the widget)
+and the last two elements give the lower-right corner of the area, in
+pixels. If no part of the entry given by index is visible on the
+screen then the result is an empty string; if the entry is partially
+visible, the result gives the only the visible area of the entry.
+
+=item I<$hlist>-E<gt>B<info>(B<children> ?,I<$entryPath>?)
+
+If I<$entryPath> is given, returns a list of the entryPath's of its
+children entries. Otherwise returns a list of the toplevel
+entryPath's.
+
+=item I<$hlist>-E<gt>B<info>(B<data> ?,I<$entryPath>?)
+
+Returns the data associated with I<$entryPath>.
+
+=item I<$hlist>-E<gt>B<info>(B<dragsite>)
+
+Returns the entryPath of the current dragsite, if any, of the HList
+widget. If the dragsite is not set, returns the empty string.
+
+=item I<$hlist>-E<gt>B<info>(B<dropsite>)
+
+Returns the entryPath of the current dropsite, if any, of the HList
+widget. If the dropsite is not set, returns the empty string.
+
+=item I<$hlist>-E<gt>B<info>(B<exists>, I<$entryPath>)
+
+Returns a boolean value indicating whether the list entry
+I<$entryPath> exists.
+
+=item I<$hlist>-E<gt>B<info>(B<hidden>, I<$entryPath>)
+
+Returns a boolean value indicating whether the list entry
+B<$entryPath> is hidden or not.
+
+=item I<$hlist>-E<gt>B<info>(B<next>, I<$entryPath>)
+
+Returns the entryPath of the list entry, if any, immediately below
+this list entry. If this entry is already at the bottom of the HList
+widget, returns an empty string.
+
+=item I<$hlist>-E<gt>B<info>(B<parent>, I<$entryPath>)
+
+Returns the name of the parent of the list entry identified by
+I<$entryPath>. If I<entryPath> is a toplevel list entry,
+returns the empty string.
+
+=item I<$hlist>-E<gt>B<info>(B<prev>, I<$entryPath>)
+
+Returns the entryPath of the list entry, if any, immediately above
+this list entry. If this entry is already at the top of the HList
+widget, returns an empty string.
+
+=item I<$hlist>-E<gt>B<info>(B<selection>)
+
+Returns a list of selected entries in the HList widget. In scalar
+context, returns an anonymous list of the selected entries.
+If no entries are selected, undef is returned in scalar context, and
+an empty list otherwise.
+
+=back
+
+=item I<$hlist>-E<gt>B<item>(I<option, >?I<args, ...>?)
+
+Creates and configures the display items at individual columns the
+entries. The form of additional of arguments depends on the choice of
+I<option>:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<itemCget>(I<$entryPath>, I<$col>, I<option>)
+
+Returns the current value of the configure I<option> of the display
+item at the column designated by I<$col> of the entry specified by
+I<$entryPath>.
+
+=item I<$hlist>-E<gt>B<itemConfigure>(I<$entryPath>, I<$col> ?,I<option>?, I<?value, option, value, ...>?)
+
+Query or modify the configuration options of the display item at the
+column designated by I<$col> of the entry specified by
+I<$entryPath>. If no I<option> is specified, returns a list
+describing all of the available options for I<$entryPath> (see
+L<Tk::options> for information on the format of this
+list). If I<option> is specified with no I<value>, then the
+method returns a list describing the one named option (this list will
+be identical to the corresponding sublist of the value returned if no
+I<option> is specified). If one or more I<option-value> pairs
+are specified, then the method modifies the given option(s) to have
+the given value(s); in this case the method returns an empty string.
+I<Option> may have any of the values accepted by the B<item>
+create method. The exact set of options depends on the
+value of the B<-itemtype> option passed to the the B<item>
+create method when this display item was created.
+
+=item I<$hlist>-E<gt>B<itemCreate>(I<$entryPath>, I<$col> ?,I<-itemtype>=E<gt>I<type>? ?,I<option value ...>?)
+
+Creates a new display item at the column designated by I<$col> of
+the entry specified by I<$entryPath>. An optional parameter
+I<-itemtype> can be used to specify what type of display items
+should be created. If the I<-itemtype> is not specified, then by
+default the type specified by this HList widget's B<-itemtype>
+option is used. Additional parameters, in I<option-value> pairs,
+can be passed to configure the appearance of the display item. Each
+I<option- value> pair must be a valid option for this type of
+display item.
+
+=item I<$hlist>-E<gt>B<itemDelete>(I<$entryPath>, I<$col>)
+
+Deletes the display item at the column designated by I<$col> of
+the entry specified by I<$entryPath>.
+
+=item I<$hlist>-E<gt>B<itemExists>(I<$entryPath>, I<$col>)
+
+Returns true if there is a display item at the column designated by
+I<$col> of the entry specified by I<$entryPath>; returns false
+otherwise.
+
+=back
+
+=item I<$hlist>-E<gt>B<nearest>(I<y>)
+
+I<$hlist>-E<gt>B<nearest>(I<y>)
+Given a y-coordinate within the HList window, this method returns
+the entryPath of the (visible) HList element nearest to that
+y-coordinate.
+
+=item I<$hlist>-E<gt>B<see>(I<$entryPath>)
+
+Adjust the view in the HList so that the entry given by I<$entryPath> is
+visible. If the entry is already visible then the method has no
+effect; if the entry is near one edge of the window then the HList
+scrolls to bring the element into view at the edge; otherwise the
+HList widget scrolls to center the entry.
+
+=item I<$hlist>-E<gt>B<selection>(I<option>, I<arg>, ...)
+
+=item I<$hlist>-E<gt>B<selection>I<Option>(I<arg>, ...)
+
+This method is used to adjust the selection within a HList widget. It
+has several forms, depending on I<option>:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<selectionClear>(?I<from>?, ?I<to>?)
+
+When no extra arguments are given, deselects all of the list entrie(s)
+in this HList widget. When only I<from> is given, only the list
+entry identified by I<from> is deselected. When both I<from> and
+I<to> are given, deselects all of the list entrie(s) between
+between I<from> and I<to>, inclusive, without affecting the
+selection state of elements outside that range.
+
+=item I<$hlist>-E<gt>B<selectionGet>
+
+This is an alias for the B<infoSelection> method.
+
+=item I<$hlist>-E<gt>B<selectionIncludes>(I<$entryPath>)
+
+Returns 1 if the list entry indicated by I<$entryPath> is currently
+selected; returns 0 otherwise.
+
+=item I<$hlist>-E<gt>B<selectionSet>(I<from>?, I<to>?)
+
+Selects all of the list entrie(s) between between I<from> and
+I<to>, inclusive, without affecting the selection state of entries
+outside that range. When only I<from> is given, only the list entry
+identified by I<from> is selected.
+
+=back
+
+=item I<$hlist>-E<gt>B<show>(I<option> ?,I<$entryPath>?)
+
+Show the entries that are hidden by the B<hide> method,
+I<option> can be one of the following:
+
+=over 8
+
+=item B<entry>
+
+Shows the list entry identified by I<$entryPath>.
+
+=back
+
+Currently only the B<entry> option is supported. Other options will
+be added in future releases.
+
+=item I<$hlist>-E<gt>B<xview>(I<args>)
+
+This method is used to query and change the horizontal position of the
+information in the widget's window. It can take any of the following
+forms:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<xview>
+
+Returns a list containing two elements. Each element is a real
+fraction between 0 and 1; together they describe the horizontal span
+that is visible in the window. For example, if the first element is
+.2 and the second element is .6, 20% of the HList entry is
+off-screen to the left, the middle 40% is visible in the window, and
+40% of the entry is off-screen to the right. These are the same values
+passed to scrollbars via the B<-xscrollcommand> option.
+
+=item I<$hlist>-E<gt>B<xview>(I<$entryPath>)
+
+Adjusts the view in the window so that the list entry identified by
+I<$entryPath> is aligned to the left edge of the window.
+
+=item I<$hlist>-E<gt>B<xview>(B<moveto> =E<gt> I<fraction>)
+
+Adjusts the view in the window so that I<fraction> of the total
+width of the HList is off-screen to the left. I<fraction> must be
+a fraction between 0 and 1.
+
+=item I<$hlist>-E<gt>B<xview>(B<scroll> =E<gt> I<number, what>)
+
+This method shifts the view in the window left or right according to
+I<number> and I<what>. I<Number> must be an integer.
+I<What> must be either B<units> or B<pages> or an
+abbreviation of one of these. If I<what> is B<units>, the view
+adjusts left or right by I<number> character units (the width of
+the B<0> character) on the display; if it is B<pages> then the
+view adjusts by I<number> screenfuls. If I<number> is negative
+then characters farther to the left become visible; if it is positive
+then characters farther to the right become visible.
+
+=back
+
+=item I<$hlist>-E<gt>B<yview>(I<?args>?)
+
+This method is used to query and change the vertical position of the
+entries in the widget's window. It can take any of the following forms:
+
+=over 8
+
+=item I<$hlist>-E<gt>B<yview>
+
+Returns a list containing two elements, both of which are real
+fractions between 0 and 1. The first element gives the position of
+the list element at the top of the window, relative to the HList as a
+whole (0.5 means it is halfway through the HList, for example). The
+second element gives the position of the list entry just after the
+last one in the window, relative to the HList as a whole. These are
+the same values passed to scrollbars via the B<-yscrollcommand>
+option.
+
+=item I<$hlist>-E<gt>B<yview>(I<$entryPath>)
+
+Adjusts the view in the window so that the list entry given by
+I<$entryPath> is displayed at the top of the window.
+
+=item I<$hlist>-E<gt>B<yview>(B<moveto> =E<gt> I<fraction>)
+
+Adjusts the view in the window so that the list entry given by
+I<fraction> appears at the top of the window. I<Fraction> is a
+fraction between 0 and 1; 0 indicates the first entry in the
+HList, 0.33 indicates the entry one-third the way through the
+HList, and so on.
+
+=item I<$hlist>-E<gt>B<yview>(B<scroll> =E<gt> I<number, what>)
+
+This method adjust the view in the window up or down according to
+I<number> and I<what>. I<Number> must be an integer.
+I<What> must be either B<units> or B<pages>. If I<what>
+is B<units>, the view adjusts up or down by I<number> lines; if
+it is B<pages> then the view adjusts by I<number> screenfuls.
+If I<number> is negative then earlier entries become visible; if
+it is positive then later entries become visible.
+
+=back
+
+=back
+
+=head1 BINDINGS
+
+=over 4
+
+=item [1]
+
+If the B<-selectmode> is "browse", when the user drags the mouse
+pointer over the list entries, the entry under the pointer will be
+highlighted and the B<-browsecmd> callback will be called with
+one parameter, the entryPath of the highlighted entry. Only one entry
+can be highlighted at a time. The B<-command> callback will be
+called when the user double-clicks on a list entry.
+
+=item [2]
+
+If the B<-selectmode> is "single", the entries will only be
+highlighted by mouse E<lt>ButtonRelease-1E<gt> events. When a new list entry
+is highlighted, the B<-browsecmd> callback will be called with
+one parameter indicating the highlighted list entry. The
+B<-command> callback will be called when the user double-clicks
+on a list entry.
+
+=item [3]
+
+If the B<-selectmode> is "multiple", when the user drags the mouse
+pointer over the list entries, all the entries under the pointer will
+be highlighted. However, only a contiguous region of list entries can
+be selected. When the highlighted area is changed, the
+B<-browsecmd> callback will be called with an undefined
+parameter. It is the responsibility of the B<-browsecmd> callback
+to find out the exact highlighted selection in the HList. The
+B<-command> callback will be called when the user double-clicks
+on a list entry.
+
+=item [4]
+
+If the B<-selectmode> is "extended", when the user drags the mouse
+pointer over the list entries, all the entries under the pointer will
+be highlighted. The user can also make disjointed selections using
+E<lt>Control-ButtonPress-1E<gt>. When the highlighted area is changed, the
+B<-browsecmd> callback will be called with an undefined
+parameter. It is the responsibility of the B<-browsecmd> callback
+to find out the exact highlighted selection in the HList. The
+B<-command> callback will be called when the user double-clicks
+on a list entry.
+
+=item [5]
+
+B<Arrow key bindings:> E<lt>UpE<gt> arrow key moves the anchor point to the
+item right on top of the current anchor item. E<lt>DownE<gt> arrow key moves
+the anchor point to the item right below the current anchor item.
+E<lt>LeftE<gt> arrow key moves the anchor to the parent item of the current
+anchor item. E<lt>RightE<gt> moves the anchor to the first child of the
+current anchor item. If the current anchor item does not have any
+children, moves the anchor to the item right below the current anchor
+item.
+
+=back
+
+=head1 EXAMPLE
+
+This example demonstrates how to use an HList to store a file
+directory structure and respond to the user's browse events:
+
+ use strict;
+ use Tk;
+ use Tk::Label;
+ use Tk::HList;
+
+ my $mw = MainWindow->new();
+ my $label = $mw->Label(-width=>15);
+ my $hlist = $mw->HList(
+ -itemtype => 'text',
+ -separator => '/',
+ -selectmode => 'single',
+ -browsecmd => sub {
+ my $file = shift;
+ $label->configure(-text=>$file);
+ }
+ );
+
+ foreach ( qw(/ /home /home/ioi /home/foo /usr /usr/lib) ) {
+ $hlist->add($_, -text=>$_);
+ }
+
+ $hlist->pack;
+ $label->pack;
+
+ MainLoop;
+
+=head1 BUGS
+
+The fact that the display item at column 0 is implicitly associated
+with the whole entry is probably a design bug. This was done for
+backward compatibility purposes. The result is that there is a large
+overlap between the B<item> method and the B<add>,
+B<addchild>, B<entrycget> and B<entryconfigure>
+methods. Whenever multiple columns exist, the programmer should use
+ONLY the B<item> method to create and configure the display items
+in each column; the B<add>, B<addchild>, B<entrycget> and
+B<entryconfigure> should be used ONLY to create and configure
+entries.
+
+=head1 KEYWORDS
+
+Hierarchical Listbox
+
+=head1 SEE ALSO
+
+L<Tk::DItem|Tk::DItem>
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/IO.pm b/Master/tlpkg/tlperl/lib/Tk/IO.pm
new file mode 100644
index 00000000000..2ce1e172ebc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/IO.pm
@@ -0,0 +1,183 @@
+package Tk::IO;
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/IO/IO.pm#4 $
+
+require 5.002;
+use Tk::Event qw($XS_VERSION);
+
+use Carp;
+use base qw(DynaLoader IO::Handle);
+
+bootstrap Tk::IO;
+
+my %fh2obj;
+my %obj2fh;
+
+sub new
+{
+ my ($package,%args) = @_;
+ # Do whatever IO::Handle does
+ my $fh = $package->SUPER::new;
+ %{*$fh} = (); # The hash is used for configure options
+ ${*$fh} = ''; # The scalar is used as the 'readable' buffer
+ @{*$fh} = (); # The array
+ $fh->configure(%args);
+ return $fh;
+}
+
+sub pending
+{
+ my $fh = shift;
+ return ${*$fh};
+}
+
+sub cget
+{
+ my ($fh,$key) = @_;
+ return ${*$fh}{$key};
+}
+
+sub configure
+{
+ my ($fh,%args) = @_;
+ my $key;
+ foreach $key (keys %args)
+ {
+ my $val = $args{$key};
+ $val = Tk::Callback->new($val) if ($key =~ /command$/);
+ ${*$fh}{$key} = $val;
+ }
+}
+
+sub killpg
+{
+ my ($fh,$sig) = @_;
+ my $pid = $fh->pid;
+ croak 'No child' unless (defined $pid);
+ kill($sig,-$pid);
+}
+
+sub kill
+{
+ my ($fh,$sig) = @_;
+ my $pid = $fh->pid;
+ croak 'No child' unless (defined $pid);
+ kill($sig,$pid) || croak "Cannot kill($sig,$pid):$!";
+}
+
+sub readable
+{
+ my $fh = shift;
+ my $count = sysread($fh,${*$fh},1,length(${*$fh}));
+ if ($count < 0)
+ {
+ if (exists ${*$fh}{-errorcommand})
+ {
+ ${*$fh}{-errorcommand}->Call($!);
+ }
+ else
+ {
+ warn "Cannot read $fh:$!";
+ $fh->close;
+ }
+ }
+ elsif ($count)
+ {
+ if (exists ${*$fh}{-linecommand})
+ {
+ my $eol = index(${*$fh},"\n");
+ if ($eol >= 0)
+ {
+ my $line = substr(${*$fh},0,++$eol);
+ substr(${*$fh},0,$eol) = '';
+ ${*$fh}{-linecommand}->Call($line);
+ }
+ }
+ }
+ else
+ {
+ $fh->close;
+ }
+}
+
+sub pid
+{
+ my $fh = shift;
+ return ${*$fh}{-pid};
+}
+
+sub command
+{
+ my $fh = shift;
+ my $cmd = ${*$fh}{'-exec'};
+ return (wantarray) ? @$cmd : $cmd;
+}
+
+sub exec
+{
+ my $fh = shift;
+ my $pid = open($fh,'-|');
+ if ($pid)
+ {
+ ${*$fh} = '' unless (defined ${*$fh});
+ ${*$fh}{'-exec'} = [@_];
+ ${*$fh}{'-pid'} = $pid;
+ if (exists ${*$fh}{-linecommand})
+ {
+ my $w = ${*$fh}{-widget};
+ $w = 'Tk' unless (defined $w);
+ $w->fileevent($fh,'readable',[$fh,'readable']);
+ ${*$fh}{_readable} = $w;
+ }
+ else
+ {
+ require Tk::Pretty;
+ croak Tk::Pretty::Pretty(\%{*$fh});
+ }
+ return $pid;
+ }
+ else
+ {
+ # make STDERR same as STDOUT here
+ setpgrp;
+ exec(@_) || die 'Cannot exec ',join(' ',@_),":$!";
+ }
+}
+
+sub wait
+{
+ my $fh = shift;
+ my $code;
+ my $ch = delete ${*$fh}{-childcommand};
+ ${*$fh}{-childcommand} = Tk::Callback->new(sub { $code = shift });
+ Tk::Event::DoOneEvent(0) until (defined $code);
+ if (defined $ch)
+ {
+ ${*$fh}{-childcommand} = $ch;
+ $ch->Call($code,$fh)
+ }
+ return $code;
+}
+
+sub close
+{
+ my $fh = shift;
+ my $code;
+ if (defined fileno($fh))
+ {
+ my $w = delete ${*$fh}{_readable};
+ $w->fileevent($fh,'readable','') if (defined $w);
+ $code = close($fh);
+ if (exists ${*$fh}{-childcommand})
+ {
+ ${*$fh}{-childcommand}->Call($?,$fh);
+ }
+ }
+ return $code;
+}
+
+1;
+__END__
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/IO.pod b/Master/tlpkg/tlperl/lib/Tk/IO.pod
new file mode 100644
index 00000000000..2781d2e17e6
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/IO.pod
@@ -0,0 +1,51 @@
+
+=head1 NAME
+
+Tk::IO - high level interface to Tk's 'fileevent' mechanism
+
+=for pm IO/IO.pm
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+ my $fh = Tk::IO->new(-linecommand => callback, -childcommand => callback);
+ $fh->exec("command")
+ $fh->wait
+ $fh->kill
+
+=head1 WARNING
+
+INTERFACES TO THIS MODULE MAY CHANGE AS PERL'S IO EVOLVES
+AND WITH PORT OF TK4.1
+
+=head1 DESCRIPTION
+
+Tk::IO is now layered on perl's IO::Handle class. Interfaces
+have changed, and are still evolving.
+
+In theory C methods which enable non-blocking IO as in earlier Tk-b*
+release(s) are still there. I have not changed them to use perl's
+additional Configure information, or tested them much.
+
+Assumption is that B<exec> is
+used to fork a child process and a callback is called each time a
+complete line arrives up the implied pipe.
+
+"line" should probably be defined in terms of perl's input record
+separator but is not yet.
+
+The -childcommand callback is called when end-of-file occurs.
+
+$fh->B<wait> can be used to wait for child process while processing
+other Tk events.
+
+$fh->B<kill> can be used to send signal to child process.
+
+=head1 BUGS
+
+Still not finished.
+Idea is to use "exec" to emulate "system" in a non-blocking manner.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/IconList.pm b/Master/tlpkg/tlperl/lib/Tk/IconList.pm
new file mode 100644
index 00000000000..1972809ea2a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/IconList.pm
@@ -0,0 +1,712 @@
+# -*- perl -*-
+#
+# tkfbox.tcl --
+#
+# Implements the "TK" standard file selection dialog box. This
+# dialog box is used on the Unix platforms whenever the tk_strictMotif
+# flag is not set.
+#
+# The "TK" standard file selection dialog box is similar to the
+# file selection dialog box on Win95(TM). The user can navigate
+# the directories by clicking on the folder icons or by
+# selectinf the "Directory" option menu. The user can select
+# files by clicking on the file icons or by entering a filename
+# in the "Filename:" entry.
+#
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Translated to perk/Tk and modified by Slaven Rezic <slaven@rezic.de>.
+#
+
+#----------------------------------------------------------------------
+#
+# I C O N L I S T
+#
+# This is a pseudo-widget that implements the icon list inside the
+# tkFDialog dialog box.
+#
+#----------------------------------------------------------------------
+# tkIconList --
+#
+# Creates an IconList widget.
+#
+
+package Tk::IconList;
+require Tk::Frame;
+
+use vars qw($VERSION);
+$VERSION = '4.007'; # $Id: //depot/Tkutf8/Tk/IconList.pm#7 $
+
+use Tk qw(Ev);
+use strict;
+use Carp;
+
+use base 'Tk::Frame';
+
+Construct Tk::Widget 'IconList';
+
+# tkIconList_Create --
+#
+# Creates an IconList widget by assembling a canvas widget and a
+# scrollbar widget. Sets all the bindings necessary for the IconList's
+# operations.
+#
+sub Populate {
+ my($w, $args) = @_;
+ $w->SUPER::Populate($args);
+
+ my $sbar = $w->Component('Scrollbar' => 'sbar',
+ -orient => 'horizontal',
+ -highlightthickness => 0,
+ -takefocus => 0,
+ );
+ # make sure that the size does not exceed handhelds' dimensions
+ my($sw,$sh) = ($w->screenwidth, $w->screenheight);
+ my $canvas = $w->Component('Canvas' => 'canvas',
+ -bd => 2,
+ -relief => 'sunken',
+ -width => ($sw > 420 ? 400 : $sw-20),
+ -height => ($sh > 160 ? 120 : $sh-40),
+ -takefocus => 1,
+ );
+ $sbar->pack(-side => 'bottom', -fill => 'x', -padx => 2);
+ $canvas->pack(-expand => 'yes', -fill => 'both');
+ $sbar->configure(-command => ['xview', $canvas]);
+ $canvas->configure(-xscrollcommand => ['set', $sbar]);
+
+ # Initializes the max icon/text width and height and other variables
+ $w->{'maxIW'} = 1;
+ $w->{'maxIH'} = 1;
+ $w->{'maxTW'} = 1;
+ $w->{'maxTH'} = 1;
+ $w->{'numItems'} = 0;
+#XXX curItem never used delete $w->{'curItem'};
+ $w->{'noScroll'} = 1;
+ $w->{'selection'} = [];
+ $w->{'index,anchor'} = '';
+
+ # Creates the event bindings.
+ $canvas->Tk::bind('<Configure>', sub { $w->Arrange } );
+ $canvas->Tk::bind('<1>', [$w,'Btn1',Ev('x'),Ev('y')]);
+ $canvas->Tk::bind('<B1-Motion>', [$w,'Motion1',Ev('x'),Ev('y')]);
+ $canvas->Tk::bind('<Control-B1-Motion>', 'NoOp');
+ $canvas->Tk::bind('<Shift-B1-Motion>', 'NoOp');
+ $canvas->Tk::bind('<Control-1>', [$w,'CtrlBtn1',Ev('x'),Ev('y')]);
+ $canvas->Tk::bind('<Shift-1>', [$w,'ShiftBtn1',Ev('x'),Ev('y')]);
+ $canvas->Tk::bind('<Double-ButtonRelease-1>', [$w,'Double1',Ev('x'),Ev('y')]);
+ $canvas->Tk::bind('<Control-Double-ButtonRelease-1>', 'NoOp');
+ $canvas->Tk::bind('<Shift-Double-ButtonRelease-1>', 'NoOp');
+ $canvas->Tk::bind('<ButtonRelease-1>', [$w,'CancelRepeat']);
+ $canvas->Tk::bind('<B1-Leave>', [$w,'Leave1',Ev('x'),Ev('y')]);
+ $canvas->Tk::bind('<B1-Enter>', [$w,'CancelRepeat']);
+ $canvas->Tk::bind('<Up>', [$w,'UpDown', -1]);
+ $canvas->Tk::bind('<Down>', [$w,'UpDown', 1]);
+ $canvas->Tk::bind('<Left>', [$w,'LeftRight',-1]);
+ $canvas->Tk::bind('<Right>', [$w,'LeftRight', 1]);
+ $canvas->Tk::bind('<Return>', [$w,'ReturnKey']);
+ $canvas->Tk::bind('<KeyPress>', [$w,'KeyPress',Ev('A')]);
+ $canvas->Tk::bind('<Control-KeyPress>', 'NoOp');
+ $canvas->Tk::bind('<Alt-KeyPress>', 'NoOp');
+ $canvas->Tk::bind('<Meta-KeyPress>', 'NoOp');
+#XXX bad....
+# $canvas->Tk::bind('<FocusIn>', sub { $w->FocusIn });
+# $canvas->Tk::bind('<FocusOut>', sub { $w->FocusOut });
+
+ # additional bindings not in tkfbox.tcl
+ $canvas->Tk::bind('<2>',['scan','mark',Ev('x'),Ev('y')]);
+ $canvas->Tk::bind('<B2-Motion>',['scan','dragto',Ev('x'),Ev('y')]);
+ # Remove the standard Canvas bindings
+ $canvas->bindtags([$canvas, $canvas->toplevel, 'all']);
+ # ... and define some again
+ $canvas->Tk::bind('<Home>', ['xview','moveto',0]);
+ $canvas->Tk::bind('<End>', ['xview','moveto',1]);
+
+ $w->ConfigSpecs(-browsecmd =>
+ ['METHOD', 'browseCommand', 'BrowseCommand', undef],
+ -command =>
+ ['CALLBACK', 'command', 'Command', undef],
+ -font =>
+ ['PASSIVE', 'font', 'Font', undef],
+ -foreground =>
+ ['PASSIVE', 'foreground', 'Foreground', undef],
+ -fg => '-foreground',
+ -multiple =>
+ ['PASSIVE', 'multiple', 'Multiple', 0],
+ -selectmode =>
+ ['PASSIVE', 'selectMode', 'SelectMode', 'browse'],
+ -selectbackground =>
+ ['PASSIVE', 'selectBackground', 'Foreground', '#a0a0ff'],
+ );
+
+ $w;
+}
+
+# compatibility for old -browsecmd options
+sub browsecmd {
+ my $w = shift;
+ if (@_) {
+ $w->{Configure}{'-browsecmd'} = $_[0];
+ $w->bind('<<ListboxSelect>>' => $_[0]);
+ }
+ $w->{Configure}{'-browsecmd'};
+}
+
+sub Index {
+ my($w, $i) = @_;
+ if (!$w->{'list'}) { $w->{'list'} = [] }
+ if ($i =~ /^-?[0-9]+$/) {
+ if ($i < 0) {
+ $i = 0;
+ }
+ if ($i > @{ $w->{'list'} }) {
+ $i = @{ $w->{'list'} } - 1;
+ }
+ return $i;
+ } elsif ($i eq 'active') {
+ return $w->{'index,active'};
+ } elsif ($i eq 'anchor') {
+ return $w->{'index,anchor'};
+ } elsif ($i eq 'end') {
+ return @{ $w->{'list'} };
+ } elsif ($i =~ /@(-?[0-9]+),(-?[0-9]+)/) {
+ my($x, $y) = ($1, $2);
+ my $canvas = $w->Subwidget('canvas');
+ my $item = $canvas->find('closest', $x, $y);
+ if (defined $item) {
+ return $canvas->itemcget($item, '-tags')->[1];
+ } else {
+ return "";
+ }
+ } else {
+ croak "Unrecognized Index parameter `$i', use active, anchor, end, \@x,y, or x";
+ }
+}
+
+sub Selection {
+ my($w, $op, @args) = @_;
+ if ($op eq 'anchor') {
+ if (@args == 1) {
+ $w->{'index,anchor'} = $w->Index($args[0]);
+ } else {
+ return $w->{'index,anchor'};
+ }
+ } elsif ($op eq 'clear') {
+ my($first, $last);
+ if (@args == 2) {
+ ($first, $last) = @args;
+ } elsif (@args == 1) {
+ $first = $last = $args[0];
+ } else {
+ croak "wrong # args: should be Selection('clear', first, ?last?)"
+ }
+ $first = $w->Index($first);
+ $last = $w->Index($last);
+ if ($first > $last) {
+ ($first, $last) = ($last, $first);
+ }
+ my $ind = 0;
+ for my $item (@{ $w->{'selection'} }) {
+ if ($item >= $first) {
+ $first = $ind;
+ last;
+ }
+ $ind++; # XXX seems to be missing in the Tcl version
+ }
+ $ind = @{ $w->{'selection'} } - 1;
+ for(; $ind >= 0; $ind--) {
+ my $item = $w->{'selection'}->[$ind];
+ if ($item <= $last) {
+ $last = $ind;
+ last;
+ }
+ }
+ if ($first > $last) {
+ return;
+ }
+ splice @{ $w->{'selection'} }, $first, $last-$first+1;
+ $w->event('generate', '<<ListboxSelect>>');
+ $w->DrawSelection;
+ } elsif ($op eq 'includes') {
+ my $index;
+ for (@{ $w->{'selection'} }) {
+ if ($args[0] eq $_) {
+ return 1;
+ }
+ }
+ return 0;
+ } elsif ($op eq 'set') {
+ my($first, $last);
+ if (@args == 2) {
+ ($first, $last) = @args;
+ } elsif (@args == 1) {
+ $first = $last = $args[0];
+ } else {
+ croak "wrong # args: should be Selection('set', first, ?last?)";
+ }
+
+ $first = $w->Index($first);
+ $last = $w->Index($last);
+ if ($first > $last) {
+ ($first, $last) = ($last, $first);
+ }
+ for(my $i = $first; $i <= $last; $i++) {
+ push @{ $w->{'selection'} }, $i;
+ }
+ # lsort -integer -unique
+ my %sel = map { ($_ => 1) } @{ $w->{'selection'} };
+ @{ $w->{'selection'} } = sort { $a <=> $b } keys %sel;
+ $w->event('generate', '<<ListboxSelect>>');
+ $w->DrawSelection;
+ } else {
+ croak "Unrecognized Selection parameter `$op', use anchor, clear, includes, or set";
+ }
+}
+
+# XXX why lower case 's' here and upper in DrawSelection?
+sub Curselection {
+ my $w = shift;
+ @{ $w->{'selection'} };
+}
+
+sub DrawSelection {
+ my $w = shift;
+ my $canvas = $w->Subwidget('canvas');
+ $canvas->delete('selection');
+ my $selBg = $w->cget('-selectbackground');
+ for my $item (@{ $w->{'selection'} }) {
+ my $rTag = $w->{'list'}->[$item][2];
+ my($iTag, $tTag, $text, $serial) = @{ $w->{'itemList'}{$rTag} };
+ my @bbox = $canvas->bbox($tTag);
+ # XXX don't hardcode colors
+ $canvas->createRectangle
+ (@bbox, -fill => $selBg, -outline => $selBg, -tags => 'selection');
+ }
+ $canvas->lower('selection');
+}
+
+# Returns the selected item
+#
+sub Get {
+ my($w, $item) = @_;
+ my $rTag = $w->{'list'}->[$item][2];
+ my($iTag, $tTag, $text, $serial) = @{ $w->{'itemList'}{$rTag} };
+ $text;
+}
+
+
+# tkIconList_AutoScan --
+#
+# This procedure is invoked when the mouse leaves an entry window
+# with button 1 down. It scrolls the window up, down, left, or
+# right, depending on where the mouse left the window, and reschedules
+# itself as an "after" command so that the window continues to scroll until
+# the mouse moves back into the window or the mouse button is released.
+#
+# Arguments:
+# w - The IconList window.
+#
+sub AutoScan {
+ my $w = shift;
+ return unless ($w->exists);
+ return if ($w->{'noScroll'});
+ my($x, $y);
+ $x = $Tk::x;
+ $y = $Tk::y;
+ my $canvas = $w->Subwidget('canvas');
+ if ($x >= $canvas->width) {
+ $canvas->xview('scroll', 1, 'units');
+ } elsif ($x < 0) {
+ $canvas->xview('scroll', -1, 'units');
+ } elsif ($y >= $canvas->height) {
+ # do nothing
+ } elsif ($y < 0) {
+ # do nothing
+ } else {
+ return;
+ }
+ $w->Motion1($x, $y);
+ $w->RepeatId($w->after(50, ['AutoScan', $w]));
+}
+
+# Deletes all the items inside the canvas subwidget and reset the IconList's
+# state.
+#
+sub DeleteAll {
+ my $w = shift;
+ my $canvas = $w->Subwidget('canvas');
+ $canvas->delete('all');
+ delete $w->{'selected'};
+ delete $w->{'rect'};
+ delete $w->{'list'};
+ delete $w->{'itemList'};
+ $w->{'maxIW'} = 1;
+ $w->{'maxIH'} = 1;
+ $w->{'maxTW'} = 1;
+ $w->{'maxTH'} = 1;
+ $w->{'numItems'} = 0;
+#XXX curItem never used delete $w->{'curItem'};
+ $w->{'noScroll'} = 1;
+ $w->{'selection'} = [];
+ $w->{'index,anchor'} = '';
+ $w->Subwidget('sbar')->set(0.0, 1.0);
+ $canvas->xview('moveto', 0);
+}
+
+# Adds an icon into the IconList with the designated image and items
+#
+sub Add {
+ my($w, $image, @items) = @_;
+ my $canvas = $w->Subwidget('canvas');
+ my $font = $w->cget(-font);
+ my $fg = $w->cget(-foreground);
+ foreach my $text (@items) {
+ my $iTag = $canvas->createImage
+ (0, 0, -image => $image, -anchor => 'nw',
+ -tags => ['icon', $w->{numItems}, 'item'.$w->{numItems}],
+ );
+ my $tTag = $canvas->createText
+ (0, 0, -text => $text, -anchor => 'nw',
+ (defined $fg ? (-fill => $fg) : ()),
+ (defined $font ? (-font => $font) : ()),
+ -tags => ['text', $w->{numItems}, 'item'.$w->{numItems}],
+ );
+ my $rTag = $canvas->createRectangle
+ (0, 0, 0, 0,
+ -fill => undef,
+ -outline => undef,
+ -tags => ['rect', $w->{numItems}, 'item'.$w->{numItems}],
+ );
+ my(@b) = $canvas->bbox($iTag);
+ my $iW = $b[2] - $b[0];
+ my $iH = $b[3] - $b[1];
+ $w->{'maxIW'} = $iW if ($w->{'maxIW'} < $iW);
+ $w->{'maxIH'} = $iH if ($w->{'maxIH'} < $iH);
+ @b = $canvas->bbox($tTag);
+ my $tW = $b[2] - $b[0];
+ my $tH = $b[3] - $b[1];
+ $w->{'maxTW'} = $tW if ($w->{'maxTW'} < $tW);
+ $w->{'maxTH'} = $tH if ($w->{'maxTH'} < $tH);
+ push @{ $w->{'list'} }, [$iTag, $tTag, $rTag, $iW, $iH, $tW, $tH,
+ $w->{'numItems'}];
+ $w->{'itemList'}{$rTag} = [$iTag, $tTag, $text, $w->{'numItems'}];
+ $w->{'textList'}{$w->{'numItems'}} = lc($text);
+ ++$w->{'numItems'};
+ }
+}
+
+# Places the icons in a column-major arrangement.
+#
+sub Arrange {
+ my $w = shift;
+ my $canvas = $w->Subwidget('canvas');
+ my $sbar = $w->Subwidget('sbar');
+ unless (exists $w->{'list'}) {
+ if (defined $canvas && Tk::Exists($canvas)) {
+ $w->{'noScroll'} = 1;
+ $sbar->configure(-command => sub { });
+ }
+ return;
+ }
+
+ my $W = $canvas->width;
+ my $H = $canvas->height;
+ my $pad = $canvas->cget(-highlightthickness) + $canvas->cget(-bd);
+ $pad = 2 if ($pad < 2);
+ $W -= $pad*2;
+ $H -= $pad*2;
+ my $dx = $w->{'maxIW'} + $w->{'maxTW'} + 8;
+ my $dy;
+ if ($w->{'maxTH'} > $w->{'maxIH'}) {
+ $dy = $w->{'maxTH'};
+ } else {
+ $dy = $w->{'maxIH'};
+ }
+ $dy += 2;
+ my $shift = $w->{'maxIW'} + 4;
+ my $x = $pad * 2;
+ my $y = $pad;
+ my $usedColumn = 0;
+ foreach my $sublist (@{ $w->{'list'} }) {
+ $usedColumn = 1;
+ my($iTag, $tTag, $rTag, $iW, $iH, $tW, $tH) = @$sublist;
+ my $i_dy = ($dy - $iH) / 2;
+ my $t_dy = ($dy - $tH) / 2;
+ $canvas->coords($iTag, $x, $y + $i_dy);
+ $canvas->coords($tTag, $x + $shift, $y + $t_dy);
+ $canvas->coords($rTag, $x, $y, $x + $dx, $y + $dy);
+ $y += $dy;
+ if ($y + $dy > $H) {
+ $y = $pad;
+ $x += $dx;
+ $usedColumn = 0;
+ }
+ }
+ my $sW;
+ if ($usedColumn) {
+ $sW = $x + $dx;
+ } else {
+ $sW = $x;
+ }
+ if ($sW < $W) {
+ $canvas->configure(-scrollregion => [$pad, $pad, $sW, $H]);
+ $sbar->configure(-command => sub { });
+ $canvas->xview(moveto => 0);
+ $w->{'noScroll'} = 1;
+ } else {
+ $canvas->configure(-scrollregion => [$pad, $pad, $sW, $H]);
+ $sbar->configure(-command => ['xview', $canvas]);
+ $w->{'noScroll'} = 0;
+ }
+ $w->{'itemsPerColumn'} = int(($H - $pad) / $dy);
+ $w->{'itemsPerColumn'} = 1 if ($w->{'itemsPerColumn'} < 1);
+#XXX $w->Select($w->{'list'}[$w->{'curItem'}][2], 0)
+# if (exists $w->{'curItem'});
+ $w->DrawSelection; # missing in Tcl XXX
+}
+
+# Gets called when the user invokes the IconList (usually by double-clicking
+# or pressing the Return key).
+#
+sub Invoke {
+ my $w = shift;
+ $w->Callback(-command => $w->{'selected'}) if (@{ $w->{'selection'} });
+}
+
+# tkIconList_See --
+#
+# If the item is not (completely) visible, scroll the canvas so that
+# it becomes visible.
+sub See {
+ my($w, $rTag) = @_;
+ return if ($w->{'noScroll'});
+ return if ($rTag < 0 || $rTag >= @{ $w->{'list'} });
+ my $canvas = $w->Subwidget('canvas');
+ my(@sRegion) = @{ $canvas->cget('-scrollregion') };
+ return unless (@sRegion);
+ my(@bbox) = $canvas->bbox('item'.$rTag);
+ my $pad = $canvas->cget(-highlightthickness) + $canvas->cget(-bd);
+ my $x1 = $bbox[0];
+ my $x2 = $bbox[2];
+ $x1 -= $pad * 2;
+ $x2 -= $pad;
+ my $cW = $canvas->width - $pad * 2;
+ my $scrollW = $sRegion[2] - $sRegion[0] + 1;
+ my $dispX = int(($canvas->xview)[0] * $scrollW);
+ my $oldDispX = $dispX;
+ # check if out of the right edge
+ $dispX = $x2 - $cW if ($x2 - $dispX >= $cW);
+ # check if out of the left edge
+ $dispX = $x1 if ($x1 - $dispX < 0);
+ if ($oldDispX != $dispX) {
+ my $fraction = $dispX / $scrollW;
+ $canvas->xview('moveto', $fraction);
+ }
+}
+
+sub Btn1 {
+ my($w, $x, $y) = @_;
+
+ my $canvas = $w->Subwidget('canvas');
+ $canvas->CanvasFocus;
+ $x = int($canvas->canvasx($x));
+ $y = int($canvas->canvasy($y));
+ my $i = $w->Index('@'.$x.','.$y);
+ return if ($i eq '');
+ $w->Selection('clear', 0, 'end');
+ $w->Selection('set', $i);
+ $w->Selection('anchor', $i);
+}
+
+sub CtrlBtn1 {
+ my($w, $x, $y) = @_;
+
+ if ($w->cget(-multiple)) {
+ my $canvas = $w->Subwidget('canvas');
+ $canvas->CanvasFocus;
+ my $x = int($canvas->canvasx($x));
+ my $y = int($canvas->canvasy($y));
+ my $i = $w->Index('@'.$x.','.$y);
+ return if ($i eq '');
+ if ($w->Selection('includes', $i)) {
+ $w->Selection('clear', $i);
+ } else {
+ $w->Selection('set', $i);
+ $w->Selection('anchor', $i);
+ }
+ }
+}
+
+sub ShiftBtn1 {
+ my($w, $x, $y) = @_;
+
+ if ($w->cget(-multiple)) {
+ my $canvas = $w->Subwidget('canvas');
+ $canvas->CanvasFocus;
+ my $x = int($canvas->canvasx($x));
+ my $y = int($canvas->canvasy($y));
+ my $i = $w->Index('@'.$x.','.$y);
+ return if ($i eq '');
+ my $a = $w->Index('anchor');
+ if ($a eq '') {
+ $a = $i;
+ }
+ $w->Selection('clear', 0, 'end');
+ $w->Selection('set', $a, $i);
+ }
+}
+
+# Gets called on button-1 motions
+#
+sub Motion1 {
+ my($w, $x, $y) = @_;
+ $Tk::x = $x;
+ $Tk::y = $y;
+ my $canvas = $w->Subwidget('canvas');
+ $canvas->CanvasFocus;
+ $x = int($canvas->canvasx($x));
+ $y = int($canvas->canvasy($y));
+ my $i = $w->Index('@'.$x.','.$y);
+ return if ($i eq '');
+ $w->Selection('clear', 0, 'end');
+ $w->Selection('set', $i);
+}
+
+sub Double1 {
+ my($w, $x, $y) = @_;
+ $w->Invoke if (@{ $w->{'selection'} });
+}
+
+sub ReturnKey {
+ my $w = shift;
+ $w->Invoke;
+}
+
+sub Leave1 {
+ my($w, $x, $y) = @_;
+ $Tk::x = $x;
+ $Tk::y = $y;
+ $w->AutoScan;
+}
+
+sub FocusIn {
+ my $w = shift;
+ return unless (exists $w->{'list'});
+ if (@{ $w->{'selection'} }) {
+ $w->DrawSelection;
+ }
+}
+
+sub FocusOut {
+ my $w = shift;
+ $w->Selection('clear', 0, 'end');
+}
+
+# tkIconList_UpDown --
+#
+# Moves the active element up or down by one element
+#
+# Arguments:
+# w - The IconList widget.
+# amount - +1 to move down one item, -1 to move back one item.
+#
+sub UpDown {
+ my($w, $amount) = @_;
+ return unless (exists $w->{'list'});
+ my $i;
+ my(@curr) = $w->Curselection;
+ if (!@curr) {
+ $i = 0;
+ } else {
+ $i = $w->Index('anchor');
+ return if ($i eq '');
+ $i += $amount;
+ }
+ $w->Selection('clear', 0, 'end');
+ $w->Selection('set', $i);
+ $w->Selection('anchor', $i);
+ $w->See($i);
+}
+
+# tkIconList_LeftRight --
+#
+# Moves the active element left or right by one column
+#
+# Arguments:
+# w - The IconList widget.
+# amount - +1 to move right one column, -1 to move left one column.
+#
+sub LeftRight {
+ my($w, $amount) = @_;
+ return unless (exists $w->{'list'});
+ my $i;
+ my(@curr) = $w->Curselection;
+ if (!@curr) {
+ $i = 0;
+ } else {
+ $i = $w->Index('anchor');
+ return if ($i eq '');
+ $i += $amount*$w->{'itemsPerColumn'};
+ }
+ $w->Selection('clear', 0, 'end');
+ $w->Selection('set', $i);
+ $w->Selection('anchor', $i);
+ $w->See($i);
+}
+
+#----------------------------------------------------------------------
+# Accelerator key bindings
+#----------------------------------------------------------------------
+# tkIconList_KeyPress --
+#
+# Gets called when user enters an arbitrary key in the listbox.
+#
+sub KeyPress {
+ my($w, $key) = @_;
+ $w->{'_ILAccel'} .= $key;
+ $w->Goto($w->{'_ILAccel'});
+ eval {
+ $w->afterCancel($w->{'_ILAccel_afterid'});
+ };
+ $w->{'_ILAccel_afterid'} = $w->after(500, ['Reset', $w]);
+}
+
+sub Goto {
+ my($w, $text) = @_;
+ return unless (exists $w->{'list'});
+ return if (not defined $text or $text eq '');
+#XXX curItem never used my $start = (!exists $w->{'curItem'} ? 0 : $w->{'curItem'});
+ my $start = 0;
+ $text = lc($text);
+ my $theIndex = -1;
+ my $less = 0;
+ my $len = length($text);
+ my $i = $start;
+ # Search forward until we find a filename whose prefix is an exact match
+ # with $text
+ while (1) {
+ my $sub = substr($w->{'textList'}{$i}, 0, $len);
+ if ($text eq $sub) {
+ $theIndex = $i;
+ last;
+ }
+ ++$i;
+ $i = 0 if ($i == $w->{'numItems'});
+ last if ($i == $start);
+ }
+ if ($theIndex > -1) {
+ $w->Selection(qw(clear 0 end));
+ $w->Selection('set', $theIndex);
+ $w->Selection('anchor', $theIndex);
+ $w->See($theIndex);
+ }
+}
+
+sub Reset {
+ my $w = shift;
+ undef $w->{'_ILAccel'};
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/IconList.pod b/Master/tlpkg/tlperl/lib/Tk/IconList.pod
new file mode 100644
index 00000000000..e68324ce4b6
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/IconList.pod
@@ -0,0 +1,82 @@
+=head1 NAME
+
+Tk::IconList - an icon list widget
+
+=for pm Tk/IconList.pm
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ use Tk::IconList;
+ $il = $mw->IconList(-browsecmd => sub { ... },
+ -command => sub { ... })->pack;
+ $il->Add($icon1, $text1);
+ $il->Add($icon2, $text2);
+ $il->Arrange;
+ ...
+ $il->DeleteAll;
+
+=head1 DESCRIPTION
+
+=head2 OPTIONS
+
+=over
+
+=item -browsecmd
+
+=item -command
+
+=item -font
+
+-item -foreground|-fg
+
+=back
+
+=head2 METHODS
+
+=over 4
+
+=item DeleteAll
+
+Deletes all the items inside the canvas subwidget and reset the IconList's
+state.
+
+=item Add($image, $text)
+
+Adds an icon into the IconList with the designated image and text.
+
+=item Arrange
+
+Places the icons in a column-major arrangement.
+
+=item Get
+
+Return the selected item.
+
+=item Invoke
+
+Gets called when the user invokes the IconList (usually by double-clicking
+or pressing the Return key) (internal method).
+
+=item See($tag)
+
+If the item is not (completely) visible, scroll the canvas so that it
+becomes visible (internal method).
+
+=back
+
+=head1 COPYRIGHT
+
+The original tkfbox.tcl from Tcl/Tk is:
+
+Copyright (c) 1994-1996 Sun Microsystems, Inc.
+
+See the file "license.terms" for information on usage and redistribution
+of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+Translated to Perl/Tk by Slaven Rezic <srezic@cpan.org>.
+
+=head1 SEE ALSO
+
+L<Tk::FBox>.
diff --git a/Master/tlpkg/tlperl/lib/Tk/Image.pm b/Master/tlpkg/tlperl/lib/Tk/Image.pm
new file mode 100644
index 00000000000..0f41c387fc2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Image.pm
@@ -0,0 +1,74 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Image;
+
+# This module does for images what Tk::Widget does for widgets:
+# provides a base class for them to inherit from.
+require DynaLoader;
+
+use base qw(DynaLoader Tk); # but are they ?
+
+use vars qw($VERSION);
+$VERSION = '4.011'; # $Id: //depot/Tkutf8/Tk/Image.pm#11 $
+
+sub new
+{
+ my $package = shift;
+ my $widget = shift;
+ $package->InitClass($widget);
+ my $leaf = $package->Tk_image;
+ my $obj = $widget->Tk::image('create',$leaf,@_);
+ $obj = $widget->_object($obj) unless (ref $obj);
+ return bless $obj,$package;
+}
+
+sub Install
+{
+ # Dynamically loaded image types can install standard images here
+ my ($class,$mw) = @_;
+}
+
+sub ClassInit
+{
+ # Carry out class bindings (or whatever)
+ my ($package,$mw) = @_;
+ return $package;
+}
+
+require Tk::Submethods;
+
+Direct Tk::Submethods ('image' => [qw(delete width height type)]);
+
+sub Tk::Widget::imageNames
+{
+ my $w = shift;
+ $w->image('names',@_);
+}
+
+sub Tk::Widget::imageTypes
+{
+ my $w = shift;
+ map("\u$_",$w->image('types',@_));
+}
+
+sub Construct
+{
+ my ($base,$name) = @_;
+ my $class = (caller(0))[0];
+
+ # Hack for broken ->isa in perl5.6.0
+ delete ${"$class\::"}{'::ISA::CACHE::'} if $] == 5.006;
+
+ *{"Tk::Widget::$name"} = sub { $class->new(@_) };
+}
+
+# This is here to prevent AUTOLOAD trying to find it.
+sub DESTROY
+{
+ my $i = shift;
+ # maybe do image delete ???
+}
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Image.pod b/Master/tlpkg/tlperl/lib/Tk/Image.pod
new file mode 100644
index 00000000000..9a9b6b6b646
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Image.pod
@@ -0,0 +1,145 @@
+# Copyright (c) 1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Image - Create and manipulate images
+
+=for category Tk Image Classes
+
+=head1 SYNOPSIS
+
+I<$image> = I<$widget>-E<gt>I<type>(?I<arg arg ...>?)
+
+I<$image>-E<gt>I<method>(?I<arg arg ...>?)
+
+=head1 DESCRIPTION
+
+The B<image> constructors and methods are used to create, delete, and query images.
+It can take several different forms, depending on the
+I<type>.
+
+The constructors require a I<$widget> to invoke them, this is used
+to locate a B<MainWindow>. (This is because the underlying Tk code
+registers the images in the data structure for the B<MainWindow>.)
+
+The legal forms are:
+
+=over 4
+
+=item I<$widget>-E<gt>I<type>?(?I<name>?,?I<option>=E<gt>I<value ...>)?
+
+Creates a new image and returns an object.
+I<type> specifies the type of the image, which must be one of
+the types currently defined (e.g., B<Bitmap>).
+I<name> specifies the name for the image; if it is omitted then
+Tk picks a name of the form B<image>I<x>, where I<x> is
+an integer.
+There may be any number of I<option>=E<gt>I<value> pairs,
+which provide configuration options for the new image.
+The legal set of options is defined separately for each image
+type; see below for details on the options for built-in image types.
+If an image already exists by the given name then it is replaced
+with the new image and any instances of that image will redisplay
+with the new contents.
+
+=item I<$image>-E<gt>B<delete>
+
+Deletes the image I<$image> and returns an empty string.
+If there are instances of the image displayed in widgets,
+the image won't actually be deleted until all of the instances
+are released.
+However, the association between the instances and the image
+manager will be dropped.
+Existing instances will retain their sizes but redisplay as
+empty areas.
+If a deleted image is recreated (with the same I<name>)
+the existing instances will use the new image.
+
+=item I<$image>-E<gt>B<height>
+
+Returns a decimal string giving the height of image I<name>
+in pixels.
+
+=item I<$widget>-E<gt>B<imageInuse>( 'name' );
+
+Returns a boolean value indicating whether or not the image
+given by I<name> is in use by any widgets.
+
+=item I<$widget>-E<gt>B<imageNames>
+
+Returns a list containing all existing images for I<$widget>'s
+B<MainWindow>.
+
+=item I<$image>-E<gt>B<type>
+
+Returns the type of I<$image> (the value of the I<type>
+method when the image was created).
+
+=item I<$widget>-E<gt>B<imageTypes>
+
+Returns a list whose elements are all of the valid image types
+(i.e., all of the values that may be supplied for the I<type>
+to create an image).
+
+=item I<$image>-E<gt>B<width>
+
+Returns a decimal string giving the width of image I<name>
+in pixels.
+
+=back
+
+=head1 BUILT-IN IMAGE TYPES
+
+The following image types are defined by Tk so they will be available
+in any Tk application.
+Individual applications or extensions may define additional types.
+
+=over 4
+
+=item B<Bitmap>
+
+Each pixel in the image displays a foreground color, a background
+color, or nothing.
+See L<Tk::Bitmap> for more information.
+
+=item B<Pixmap>
+
+B<Pixmap> is slightly more general than B<Bitmap>, each pixel can
+be any available color or "transparent" (rendered as background color of the
+widget image is displayed in). B<Pixmap> is best used for icons and other
+simple graphics with only a few colors.
+
+B<Pixmap> is derived from Tix. See L<Tk::Pixmap> for more information.
+
+=item B<Photo>
+
+Displays a variety of full-color images, using dithering to
+approximate colors on displays with limited color capabilities.
+See L<Tk::Photo> documentation for more information.
+
+=back
+
+=head1 CAVEATS
+
+It's necessary to use the L</delete> method to delete an image object
+and free memory associated with it. Just using a lexical variable for
+storing the image object and letting the variable to go out of scope
+or setting to C<undef> is not sufficient.
+
+=head1 SEE ALSO
+
+L<Tk::Bitmap|Tk::Bitmap>
+L<Tk::Pixmap|Tk::Pixmap>
+L<Tk::Photo|Tk::Photo>
+
+=head1 KEYWORDS
+
+height, image, types of images, width
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/InputO.pod b/Master/tlpkg/tlperl/lib/Tk/InputO.pod
new file mode 100644
index 00000000000..03a43b29ed7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/InputO.pod
@@ -0,0 +1,50 @@
+=head1 NAME
+
+Tk::InputO - Create and manipulate TIX InputO widgets
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+I<$inputonly> = I<$parent>-E<gt>B<InputO>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+Only the following three standard options are supported by
+B<InputO>:
+
+B<cursor> B<width> B<height>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+B<InputO> does not have any widget specific options.
+
+=head1 DESCRIPTION
+
+The B<InputO> method creates a new window (given by the
+$widget argument) and makes it into a B<InputO>
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+B<InputO> such as its cursor or width.
+
+B<InputO> widgets are not visible to the user. The only
+purpose of B<InputO> widgets are to accept inputs from the
+user, which can be done with the B<bind> method.
+
+=head1 WIDGET METHODS
+
+The B<InputO> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+=head1 BINDINGS
+
+B<InputO> widgets have no default bindings.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Internals.pod b/Master/tlpkg/tlperl/lib/Tk/Internals.pod
new file mode 100644
index 00000000000..4ee1e0126ca
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Internals.pod
@@ -0,0 +1,142 @@
+=head1 NAME
+
+CallingTk - what is Perl Tk interface doing when you call Tk functions.
+
+=for category C Programming
+
+This information is worse than useless for C<perlTk> users, but can of
+some help for people interested in using modified Tk source with
+C<perlTk>.
+
+I<This document is under construction. The information is believed to
+be pertinent to the version of> C<portableTk> I<available when it was
+created. All the details are subject to change.>
+
+=head1 DESCRIPTION
+
+=over 4
+
+=item PreCompiling
+
+Before the actual compilation stage a script scans the source
+and extracts the subcommands of different commands. This information
+resides in the file C<pTk/Methods.def>.
+
+=item Compilation
+
+During compilation the above file is included in the source of booting
+routine of dynamic (or static) library. More precisely, the booting
+code of module C<Tk> calls the subroutine Boot_Glue() from the module
+C<tkGlue.c>, and this subroutine includes the file (with appropriate
+macro definitions).
+
+=item Inside C<use Tk;>
+
+The module bootstraps the C code, then loads the Perl libraries. The
+heart of the Perl code is contained in the C<Tk::Widget> library, all the
+widgets inherit from this module. Code for toplevels is loaded from
+C<Tk::MainWindow>.
+
+During bootstrap of the C glue code the C<Xevent::?> codes and a
+handful of C<Tk::Widget> and C<Tk::Image> routines are defined. (Much
+more XSUBs are created from C<Tk.xs> code.) The widget subcommands are
+glued to Perl basing on the list included from C<pTk/Methods.def>. In
+fact all the subcommands are glued to XSUBs that are related to the
+same C subroutine XStoWidget(), but have different data parts.
+
+During the Perl code bootstrap the method C<Tk::Widget::import> is
+called. This call requires all the code from particular widget
+packages.
+
+Code from the widget packages calls an obscure command like
+
+ (bless \"Text")->WidgetClass;
+
+This command (actually Tk::Widget::WidgetClass()) creates three
+routines: Tk::Widget::Text(), Tk::Widget::isText(), and
+Tk::Text::isText(). The first one is basically C<new> of C<Tk::Text>,
+the other two return constants. It also puts the class into
+depository.
+
+=item Inside C<$top = MainWindow-E<gt>new;>
+
+This is quite intuitive. This call goes direct to
+C<Tk::MainWindow::new>, that calls XSUB
+C<Tk::MainWindow::CreateMainWindow>, that calls C subroutine
+Tk_CreateMainWindow(). It is a C<Tk> subroutine, so here black magic
+ends (almost).
+
+The only remaining black magic is that the C<Tk> initialization
+routine creates a lot of commands, but the subroutine for creation is
+usurped by B<portableTk> and the commands are created in the package
+C<Tk>. They are associated to XSUBs that are related to one of three C
+subroutines XStoSubCmd(), XStoBind(), or XStoTk(), but have different
+data parts.
+
+The result of the call is blessed into C<Tk::MainWindow>, as it should.
+
+=item Inside C<$top-E<gt>title('Text demo');>
+
+The package C<Tk::Toplevel> defines a lot of subroutines on the fly on
+some list. All the commands from the list are converted to the
+corresponding subcommands of C<wm> method of the widget. Here
+subcommand is a command with some particular second argument (in this
+case C<"title">). Recall that the first argument is $self.
+
+Now C<Tk::Toplevel> @ISA C<Tk::Widget>, that in turn @ISA C<Tk>. So a
+call to C<$top-E<gt>wm('title','Text demo')> calls C<Tk::wm>, that is
+defined during call to Tk_CreateMainWindow(). As it is described
+above, the XSUB associated to XStoSubCmd() is called.
+
+This C routine is defined in C<tkGlue.c>. It gets the data part of
+XSUB, creates a C<SV> with the name of the command, and calls
+Call_Tk() with the XSUB data as the first argument, and with the name
+of XSUB stuffed into the Perl stack in the place there C<tk> expects
+it. (In fact it can also reorder the arguments if it thinks it is
+what you want).
+
+The latter procedure extracts name of C<tk> procedure and
+C<clientData> from the first argument and makes a call, using Perl
+stack as C<argv> for the procedure. A lot of black magic is performed
+afterwards to convert result of the procedure to a Perl array return.
+
+=item Inside C<$text = $top-E<gt>Text(background =E<gt> $txtBg);>
+
+Above we discussed how the command C<Tk::Widget::Text> is created. The
+above command calls it via inheritance. It is translated to
+
+ Tk::Text::new($top, background => $txtBg);
+
+The package C<Tk::Text> has no method C<new>, so the
+C<Tk::Widget::new> is called. In turn it calls
+C<Tk::Text-E<gt>DoInit($top)>, that is
+C<Tk::Widget::DoInit(Tk::Text,$top)>, that initializes the bindings if
+necessary. Then it creates the name for the widget of the form
+C<.text0>, and calls C<Tk::text('.text0', background =E<gt> $txtBg)>
+(note lowercase). The result of the call is blessed into C<Tk::Text>,
+and the method C<bindtags> for this object is called.
+
+Now the only thing to discuss is who defines the methods C<text> and
+C<bindtags>. The answer is that they are defined in C<tkWindow.c>,
+and these commands are created in the package C<Tk> in the same sweep
+that created the command C<Tk::wm> discussed above.
+
+So the the same C code that corresponds to the processing of
+corresponding TCL commands is called here as well (this time via
+C<XStoTk> interface).
+
+=item Inside C<$text-E<gt>insert('insert','Hello, world!');>
+
+As we discussed above, the subcommands of widget procedures correspond
+to XSUB C<XStoWidget>. This XSUB substitutes the first argument $text
+(that is a hash reference) to an appropriate value from this hash,
+adds the additional argument after the first one that contains the
+name of the subcommand extracted from the data part of XSUB, and calls
+the corresponding Tk C subroutine via C<Call_Tk>.
+
+=back
+
+Ilya Zakharevich <ilya@math.ohio-state.edu>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/ItemStyle.pm b/Master/tlpkg/tlperl/lib/Tk/ItemStyle.pm
new file mode 100644
index 00000000000..85c6c11a76c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ItemStyle.pm
@@ -0,0 +1,38 @@
+package Tk::ItemStyle;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/ItemStyle.pm#4 $
+
+require Tk;
+use base qw(Tk);
+require Tk::Widget;
+Construct Tk::Widget 'ItemStyle';
+
+Tk::Methods ('delete');
+
+sub new
+{
+ my $package = shift;
+ my $widget = shift;
+ my $type = shift;
+ my %args = @_;
+ $args{'-refwindow'} = $widget unless exists $args{'-refwindow'};
+ $package->InitClass($widget);
+ my $obj = $widget->itemstyle($type, %args);
+ return bless $obj,$package;
+}
+
+sub Install
+{
+ # Dynamically loaded image types can install standard images here
+ my ($class,$mw) = @_;
+}
+
+sub ClassInit
+{
+ # Carry out class bindings (or whatever)
+ my ($package,$mw) = @_;
+ return $package;
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/JPEG.pm b/Master/tlpkg/tlperl/lib/Tk/JPEG.pm
new file mode 100644
index 00000000000..6565c4157b3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/JPEG.pm
@@ -0,0 +1,57 @@
+package Tk::JPEG;
+require DynaLoader;
+
+use vars qw($VERSION);
+$VERSION = '4.003'; # was: sprintf '4.%03d', q$Revision: #2$ =~ /\D(\d+)\s*$/;
+use Tk 800.015;
+require Tk::Image;
+require Tk::Photo;
+require DynaLoader;
+
+use vars qw($VERSION $XS_VERSION);
+
+@ISA = qw(DynaLoader);
+
+$XS_VERSION = $Tk::VERSION;
+bootstrap Tk::JPEG;
+
+1;
+
+__END__
+
+=head1 NAME
+
+Tk::JPEG - JPEG loader for Tk::Photo
+
+=head1 SYNOPSIS
+
+ use Tk;
+ use Tk::JPEG;
+
+ my $image = $widget->Photo('-format' => 'jpeg', -file => 'something.jpg');
+
+
+=head1 DESCRIPTION
+
+This is an extension for Tk which supplies
+JPEG format loader for Photo image type.
+
+JPEG access is via release 5 of the The Independent JPEG Group's (IJG)
+free JPEG software.
+
+=head1 HISTORY
+
+This extension works for Tk800.015 and later and is by default bundled
+with Perl/Tk since Tk804.
+
+=head1 AUTHOR
+
+Nick Ing-Simmons E<lt>nick@ing-simmons.netE<gt>
+
+=head1 SEE ALSO
+
+L<Tk::Photo>.
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/LabEntry.pm b/Master/tlpkg/tlperl/lib/Tk/LabEntry.pm
new file mode 100644
index 00000000000..64cb392fa8c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/LabEntry.pm
@@ -0,0 +1,31 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+package Tk::LabEntry;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/LabEntry.pm#6 $
+
+use base qw(Tk::Frame);
+use Tk::widgets qw(Frame Label Entry);
+
+Construct Tk::Widget 'LabEntry';
+
+sub Populate
+{
+ require Tk::Entry;
+ # LabeledEntry constructor.
+ #
+ my($cw, $args) = @_;
+ $cw->SUPER::Populate($args);
+ # Advertised subwidgets: entry.
+ my $e = $cw->Entry();
+ $e->pack('-expand' => 1, '-fill' => 'both');
+ $cw->Advertise('entry' => $e );
+ $cw->ConfigSpecs(DEFAULT => [$e]);
+ $cw->Delegates(DEFAULT => $e);
+ $cw->AddScrollbars($e) if (exists $args->{-scrollbars});
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/LabFrame.pm b/Master/tlpkg/tlperl/lib/Tk/LabFrame.pm
new file mode 100644
index 00000000000..6fcab1acc56
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/LabFrame.pm
@@ -0,0 +1,138 @@
+#
+# Labeled frame. Derives from Tk::Frame, but intercepts the labeling
+# part.
+
+package Tk::LabFrame;
+
+use vars qw($VERSION);
+$VERSION = '4.010'; # $Id: //depot/Tkutf8/Tixish/LabFrame.pm#11 $
+
+use Tk;
+use base qw(Tk::Frame);
+Tk::Widget->Construct('LabFrame');
+
+sub autoLabel { 0 }
+
+sub Populate {
+ my ($cw, $args) = @_;
+
+ $cw->{m_geoMgr} = "";
+
+ my $border = $cw->Component(
+ Frame => 'border',
+ -relief => 'groove',
+ -bd => 2,
+ );
+
+ my $pad = $border->Frame;
+ $cw->Advertise(pad => $pad);
+
+ my $frame = $border->Frame;
+ $cw->Advertise(frame => $frame);
+
+ my $label = $cw->Component(Label => 'label');
+
+ $cw->SUPER::Populate($args);
+
+ $cw->Delegates(DEFAULT => $frame);
+ $cw->ConfigSpecs(
+ -background => [[qw/SELF ADVERTISED/],
+ qw/background Background/],
+ -borderwidth => [$border, qw/borderWidth Border 2/],
+ -font => [$label, qw/font Font/],
+ -foreground => [$label, qw/foreground Foreground black/],
+ -label => [{-text => $label}, qw/label Label/],
+ -labelside => [qw/METHOD labelSide LabelSide acrosstop/],
+ -labelvariable => [{-textvariable => $label}],
+ -relief => [$border, qw/relief Relief groove/],
+ DEFAULT => [$frame]
+ );
+ return $cw;
+}
+
+use Tk::Submethods(
+ form => [qw/check forget grid info slaves/],
+ grid => [qw/bbox columnconfigure configure forget info location
+ propagate rowconfigure remove size slaves/],
+ pack => [qw/forget info propagate slaves/],
+ place => [qw/forget info slaves/]
+);
+
+sub labelside {
+ my ($cw, $side) = @_;
+ return $cw->{Configure}{-labelside} unless $side;
+
+ my $border = $cw->Subwidget('border');
+ my $pad = $cw->Subwidget('pad');
+ my $frame = $cw->Subwidget('frame');
+ my $label = $cw->Subwidget('label');
+
+ ## packForget/formForget as appropriate
+ foreach ($border, $label, $pad, $frame) {
+ $_->formForget if $cw->{m_geoMgr} eq "form";
+ $_->packForget if ($cw->{m_geoMgr} eq "pack" && $_->ismapped);
+ }
+
+ if ($side eq "acrosstop") {
+
+ my $y = $label->reqheight / 2;
+ my $ph = $y - ($border->cget(-bd));
+ $ph = 0 if $ph < 0;
+
+ $label->form(qw/-top 0 -left 4 -padx 6 -pady 2/);
+ $border->form(-top => $y,
+ qw/-bottom -1 -left 0 -right -1 -padx 2 -pady 2/);
+ $pad->form(-bottom => $ph,
+ qw/-top 0 -left 0 -right -1/);
+ $frame->form(-top => $pad,
+ qw/-bottom -1 -left 0 -right -1 -fill both/);
+ $cw->{m_geoMgr} = "form";
+
+ } else {
+
+ $label->pack(-side => $side);
+ $frame->pack(-expand => 1, -fill => 'both');
+ $border->pack(-side => $side, -expand => 1, -fill => 'both');
+ $cw->{m_geoMgr} = "pack";
+ }
+}
+
+sub form {
+ my $cw = shift;
+ $cw = $cw->Subwidget('frame')
+ if (@_ && $_[0] =~ /^(?:slaves)$/);
+ $cw->SUPER::form(@_);
+}
+
+sub grid {
+ my $cw = shift;
+ $cw = $cw->Subwidget('frame') if (@_ && $_[0] =~
+ /^(?:bbox
+ |columnconfigure
+ |location
+ |propagate
+ |rowconfigure
+ |size
+ |slaves)
+ $/x);
+ $cw->SUPER::grid(@_);
+}
+
+
+sub pack {
+ my $cw = shift;
+ $cw = $cw->Subwidget('frame')
+ if (@_ && $_[0] =~ /^(?:propagate|slaves)$/);
+ $cw->SUPER::pack(@_);
+}
+
+sub place {
+ my $cw = shift;
+ $cw = $cw->Subwidget('frame')
+ if (@_ && $_[0] =~ /^(?:slaves)$/);
+ $cw->SUPER::place(@_);
+}
+
+1;
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/LabFrame.pod b/Master/tlpkg/tlperl/lib/Tk/LabFrame.pod
new file mode 100644
index 00000000000..cf5cebf754a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/LabFrame.pod
@@ -0,0 +1,110 @@
+=head1 NAME
+
+Tk::LabFrame - labeled frame.
+
+=for pm Tixish/LabFrame.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+S< >B<use Tk::LabFrame;>
+
+S< >I<$f> = I<$parent>-E<gt>B<LabFrame>(?B<-label>=E<gt>I<text>,
+B<-labelside>=E<gt>I<where>, ...?);
+
+=head1 DESCRIPTION
+
+B<LabFrame> is exactly like B<Frame> and additionaly allows to
+add a label to the frame.
+
+=head1 WIDGET-OPTIONS
+
+B<LabFrame> supports the same options as the
+L<Frame|Tk::Frame/"STANDARD OPTIONS"> widget.
+
+Additional options of B<LabFrame> are:
+
+=over 4
+
+=item B<-font> =E<gt> I<font>
+
+Specifies the label's font
+
+=item B<-foreground> =E<gt> I<color>
+
+Specifies the label's foreground color
+
+=item B<-label> =E<gt> I<text>
+
+The text of the label to be placed with the Frame.
+
+=item B<-labelside> =E<gt> I<where>
+
+I<Where> can be one of B<left>, B<right>, B<top>, B<bottom> or B<acrosstop>.
+The first four work as might be expected and place the label to the
+left, right, above or below the frame respectively. The B<acrosstop>
+creates a grooved frame around the central frame and puts the label
+near the northwest corner such that it appears to "overwrite" the
+groove.
+
+=item B<-labelvariable> =E<gt> I<scalar_ref>
+
+Specifies a reference to a variable and used as an
+alternative to -label. If the value of the variable changes,
+then the widget will be updated automatically to reflect the
+change. Used like -textvariable.
+
+=back
+
+=head1 ADVERTISED SUBWIDGETS
+
+See L<Tk::mega/"Subwidget"> how to use advertised widgets.
+
+=over 4
+
+=item I<border>
+
+ Frame used to display the border
+
+=item I<frame>
+
+ Frame used to create new LabFrame children.
+
+=item I<label>
+
+ Label used for displaying text
+
+=back
+
+=head1 EXAMPLE
+
+Run the following test program to see this in action:
+
+ use strict;
+ use Tk;
+ require Tk::LabFrame;
+ require Tk::LabEntry;
+
+ my $test = 'Test this';
+ my $mw = Tk::MainWindow->new;
+ my $f = $mw->LabFrame(-label => "This is a label",
+ -labelside => "acrosstop");
+ $f->LabEntry(-label => "Testing", -textvariable => \$test)->pack;
+ $f->pack;
+ Tk::MainLoop;
+
+=head1 BUGS
+
+Perhaps B<LabFrame> should be subsumed within the generic pTk
+labeled widget mechanism.
+
+=head1 AUTHOR
+
+B<Rajappa Iyer> rsi@earthling.net
+
+This code is derived from LabFrame.tcl and LabWidg.tcl in the Tix4.0
+distribution by Ioi Lam. The code may be redistributed under the same
+terms as Perl.
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/LabRadio.pm b/Master/tlpkg/tlperl/lib/Tk/LabRadio.pm
new file mode 100644
index 00000000000..69e07b12f01
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/LabRadio.pm
@@ -0,0 +1,63 @@
+# Class LabeledRadiobutton
+
+package Tk::LabRadiobutton;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/LabRadio.pm#4 $
+
+require Tk::Frame;
+use base qw(Tk::Frame);
+
+Construct Tk::Widget 'LabRadiobutton';
+
+
+# Although there is no fundamental reason why -radiobuttons
+# should be fixed at create time converting to METHOD form
+# is extra work an this can serve as an example of CreateArgs
+# checking.
+
+sub CreateArgs
+{
+ my ($package,$parent,$args) = @_;
+ $parent->BackTrace("Must specify -radiobuttons for $package")
+ unless (defined $args->{'-radiobuttons'});
+ return $package->SUPER::CreateArgs($parent,$args);
+}
+
+sub Populate
+{
+ require Tk::Radiobutton;
+
+ my ($cw,$args) = @_;
+ $cw->SUPER::Populate($args);
+
+ # LabeledRadiobutton(s) constructor.
+ #
+ # Advertised subwidgets: the name(s) of your radiobutton(s).
+
+
+
+ my (@widgets) = ();
+
+ my $rl;
+ foreach $rl (@{$args->{'-radiobuttons'}})
+ {
+ my $r = $cw->Component( Radiobutton => $rl,
+ -text => $rl,
+ -value => $rl );
+ $r->pack(-side => 'left', -expand => 1, -fill => 'both');
+ push(@widgets,$r);
+ $cw->{Configure}{-value} = $rl;
+ }
+
+ $cw->BackTrace('No buttons') unless (@widgets);
+
+ $cw->ConfigSpecs('-variable' => [ \@widgets, undef, undef, \$cw->{Configure}{-value} ],
+ '-radiobuttons' => [ 'PASSIVE', undef, undef, undef ],
+ '-value' => [ 'PASSIVE', undef, undef, $cw->{Configure}{-value} ],
+ 'DEFAULT' => [ \@widgets ]
+ );
+}
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Label.pm b/Master/tlpkg/tlperl/lib/Tk/Label.pm
new file mode 100644
index 00000000000..ebea1741c2f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Label.pm
@@ -0,0 +1,21 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+package Tk::Label;
+require Tk;
+
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Label.pm#6 $
+
+use base qw(Tk::Widget);
+
+Construct Tk::Widget 'Label';
+
+sub Tk_cmd { \&Tk::label }
+
+1;
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Label.pod b/Master/tlpkg/tlperl/lib/Tk/Label.pod
new file mode 100644
index 00000000000..96386b09b5c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Label.pod
@@ -0,0 +1,133 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Label - Create and manipulate Label widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$label> = I<$parent>-E<gt>B<Label>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground>
+B<-activeforeground>
+B<-anchor>
+B<-background>
+B<-bitmap>
+B<-borderwidth>
+B<-compound>
+B<-cursor>
+B<-disabledforeground>
+B<-font>
+B<-foreground>
+B<-highlightbackground>
+B<-highlightcolor>
+B<-highlightthickness>
+B<-image>
+B<-justify>
+B<-padx>
+B<-pady>
+B<-relief>
+B<-takefocus>
+B<-text>
+B<-textvariable>
+B<-underline>
+B<-wraplength>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies a desired height for the label.
+If an image or bitmap is being displayed in the label then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in lines of text.
+If this option isn't specified, the label's desired height is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of three states for the label: B<normal>, B<active>, or
+B<disabled>. In normal state the label is displayed using the
+B<foreground> and B<background> options. In active state the label is
+displayed using the B<activeForeground> and B<activeBackground>
+options. In the disabled state the B<disabledForeground> and
+B<background> options determine how the button is displayed.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies a desired width for the label.
+If an image or bitmap is being displayed in the label then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in characters.
+If this option isn't specified, the label's desired width is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Label> method creates a new window (given by the
+$widget argument) and makes it into a label widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the label such as its colors, font,
+text, and initial relief. The B<label> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A label is a widget that displays a textual string, bitmap or image.
+If text is displayed, it must all be in a single font, but it
+can occupy multiple lines on the screen (if it contains newlines
+or if wrapping occurs because of the B<wrapLength> option) and
+one of the characters may optionally be underlined using the
+B<underline> option.
+The label can be manipulated in a few simple ways, such as
+changing its relief or text, using the commands described below.
+
+=head1 WIDGET METHODS
+
+The B<Label> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+=head1 BINDINGS
+
+When a new label is created, it has no default event bindings:
+labels are not intended to be interactive.
+
+=head1 KEYWORDS
+
+label, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Labelframe.pm b/Master/tlpkg/tlperl/lib/Tk/Labelframe.pm
new file mode 100644
index 00000000000..dc167fe161d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Labelframe.pm
@@ -0,0 +1,16 @@
+package Tk::Labelframe;
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.003'; # sprintf '4.%03d', q$Revision: #2 $ =~ /#(\d+)/;
+
+# New widget which is a kind of Frame with a label ...
+
+use base qw(Tk::Frame);
+
+Construct Tk::Widget 'Labelframe';
+
+sub Tk_cmd { \&Tk::labelframe }
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Labelframe.pod b/Master/tlpkg/tlperl/lib/Tk/Labelframe.pod
new file mode 100644
index 00000000000..b904ad7775b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Labelframe.pod
@@ -0,0 +1,206 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# RCS: @(#) $Id: labelframe.n,v 1.1 2001/09/26 21:36:19 pspjuth Exp $
+
+=head1 NAME
+
+Tk::Labelframe - Create and manipulate Labelframe widgets
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+I<$labelframe> = I<$parent>-E<gt>B<Labelframe>(?I<options>?);
+
+ -borderwidth -highlightbackground -pady
+ -cursor -highlightcolor -relief
+ -font -highlightthickness -takefocus
+ -foreground -padx -text
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Option: B<-background>
+
+=item Name: B<background>
+
+=item Class: B<Background>
+
+This option is the same as the standard B<background> option
+except that its value may also be specified as an empty string.
+In this case, the widget will display no background or border, and
+no colors will be consumed from its colormap for its background
+and border.
+
+=item Option: B<-class>
+
+=item Name: B<class>
+
+=item Class: B<Class>
+
+Specifies a class for the window.
+This class will be used when querying the option database for
+the window's other options, and it will also be used later for
+other purposes such as bindings.
+The B<class> option may not be changed with the B<configure>
+method.
+
+=item Option: B<-colormap>
+
+=item Name: B<colormap>
+
+=item Class: B<Colormap>
+
+Specifies a colormap to use for the window.
+The value may be either B<new>, in which case a new colormap is
+created for the window and its children, or the name of another
+window (which must be on the same screen and have the same visual
+as $widget), in which case the new window will use the colormap
+from the specified window.
+If the B<colormap> option is not specified, the new window
+uses the same colormap as its parent.
+This option may not be changed with the B<configure>
+method.
+
+=item Option: B<-container>
+
+=item Name: B<container>
+
+=item Class: B<Container>
+
+The value must be a boolean. If true, it means that this window will
+be used as a container in which some other application will be embedded
+(for example, a Tk toplevel can be embedded using the B<-use> option).
+The window will support the appropriate window manager protocols for
+things like geometry requests. The window should not have any
+children of its own in this application.
+This option may not be changed with the B<configure>
+method.
+
+=item Option: B<-height>
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+Specifies the desired height for the window in any of the forms
+acceptable to B<Tk_GetPixels>.
+If this option is less than or equal to zero then the window will
+not request any size at all.
+
+=item Option: B<-labelanchor>
+
+=item Name: B<labelAnchor>
+
+=item Class: B<LabelAnchor>
+
+Specifies where to place the label. A label is only displayed if the
+B<-text> option is not the empty string.
+Valid values for this option are (listing them clockwise)
+B<nw>, B<n>, B<ne>, B<en>, B<e>, B<es>,
+B<se>, B<s>,B<sw>, B<ws>, B<w> and B<wn>.
+The default value is B<nw>.
+
+=item Option: B<-labelwidget>
+
+=item Name: B<labelWidget>
+
+=item Class: B<LabelWidget>
+
+Specifies a widget to use as label. This overrides any B<-text>
+option. The widget must exist before being used as B<-labelwidget>
+and if it is not a descendant of this window, it will be raised
+above it in the stacking order.
+
+=item Option: B<-visual>
+
+=item Name: B<visual>
+
+=item Class: B<Visual>
+
+Specifies visual information for the new window in any of the
+forms accepted by B<Tk_GetVisual>.
+If this option is not specified, the new window will use the same
+visual as its parent.
+The B<visual> option may not be modified with the B<configure>
+method.
+
+=item Option: B<-width>
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+Specifies the desired width for the window in any of the forms
+acceptable to B<Tk_GetPixels>.
+If this option is less than or equal to zero then the window will
+not request any size at all.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Labelframe> method creates a new window (given by the
+$labelframe argument) and makes it into a Labelframe widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the Labelframe such as its background color
+and relief.
+
+A Labelframe is a simple widget. Its primary purpose is to act as a
+spacer or container for complex window layouts. It has the features
+of a B<Frame> plus the ability to display a label.
+
+=head1 WIDGET METHODS
+
+The B<Labelframe> method
+may be used to invoke various operations on the widget. It has the
+following general form:
+
+ $widget->method(?arg arg ...?);
+
+The following
+methods are possible for Labelframe widgets:
+
+=over 4
+
+=item I<$widget>-E<gt>B<cget>(I<option>);
+
+Returns the current value of the configuration option given
+by I<option>.
+I<Option> may have any of the values accepted by the B<Labelframe>
+command.
+
+=item I<$widget>-E<gt>B<configure>(?I<option>?, I<?value, option, value, ...>?);
+
+Query or modify the configuration options of the widget.
+If no I<option> is specified, returns a list describing all of
+the available options for $widget (see L<Tk::configure> for
+information on the format of this list). If I<option> is specified
+with no I<value>, then the command returns a list describing the
+one named option (this list will be identical to the corresponding
+sublist of the value returned if no I<option> is specified). If
+one or more I<option-value> pairs are specified, then the command
+modifies the given widget option(s) to have the given value(s); in
+this case the command returns an empty string.
+I<Option> may have any of the values accepted by the B<Labelframe>
+command.
+
+=back
+
+=head1 BINDINGS
+
+When a new Labelframe is created, it has no default event bindings:
+Labelframes are not intended to be interactive.
+
+=head1 SEE ALSO
+
+L<Tk::Frame>, L<Tk::Label>
+
+=head1 KEYWORDS
+
+Labelframe, widget
diff --git a/Master/tlpkg/tlperl/lib/Tk/Listbox.pm b/Master/tlpkg/tlperl/lib/Tk/Listbox.pm
new file mode 100644
index 00000000000..c73c0c193a4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Listbox.pm
@@ -0,0 +1,910 @@
+# Converted from listbox.tcl --
+#
+# This file defines the default bindings for Tk listbox widgets.
+#
+# @(#) listbox.tcl 1.7 94/12/17 16:05:18
+#
+# Copyright (c) 1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+# Modifications from standard Listbox.pm
+# --------------------------------------
+# 27-JAN-2001 Alasdair Allan
+# Modified for local use by adding tied scalar and arrays
+# Implemented TIESCALAR, TIEARRAY, FETCH, FETCHSIZE, STORE, CLEAR & EXTEND
+# 31-JAN-2001 Alasdair Allan
+# Made changes suggested by Tim Jenness
+# 03-FEB-2001 Alasdair Allan
+# Modified STORE for tied scalars to clear and select elements
+# 06-FEB-2001 Alasdair Allan
+# Added POD documentation for tied listbox
+# 13-FEB-2001 Alasdair Allan
+# Implemented EXISTS, DELETE, PUSH, POP, SHIFT & UNSHIFT for tied arrays
+# 14-FEB-2001 Alasdair Allan
+# Implemented SPLICE for tied arrays, all tied functionality in place
+# 16-FEB-2001 Alasdair Allan
+# Tweak to STORE interface for tied scalars
+# 23-FEB-2001 Alasdair Allan
+# Added flag to FETCH for tied scalars, modified to return hashes
+# 24-FEB-2001 Alasdair Allan
+# Updated Pod documentation
+#
+
+package Tk::Listbox;
+
+use vars qw($VERSION @Selection $Prev);
+use strict;
+$VERSION = '4.015'; # sprintf '4.%03d', q$Revision: #14 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw(Ev $XS_VERSION);
+use Tk::Clipboard ();
+use AutoLoader;
+
+use base qw(Tk::Clipboard Tk::Widget);
+
+Construct Tk::Widget 'Listbox';
+
+bootstrap Tk::Listbox;
+
+sub Tk_cmd { \&Tk::listbox }
+
+Tk::Methods('activate','bbox','curselection','delete','get','index',
+ 'insert','itemcget','itemconfigure','nearest','scan','see',
+ 'selection','size','xview','yview');
+
+use Tk::Submethods ( 'selection' => [qw(anchor clear includes set)],
+ 'scan' => [qw(mark dragto)],
+ 'xview' => [qw(moveto scroll)],
+ 'yview' => [qw(moveto scroll)],
+ );
+
+*Getselected = \&getSelected;
+
+sub clipEvents
+{
+ return qw[Copy];
+}
+
+sub BalloonInfo
+{
+ my ($listbox,$balloon,$X,$Y,@opt) = @_;
+ my $e = $listbox->XEvent;
+ return if !$e;
+ my $index = $listbox->index('@' . $e->x . ',' . $e->y);
+ foreach my $opt (@opt)
+ {
+ my $info = $balloon->GetOption($opt,$listbox);
+ if ($opt =~ /^-(statusmsg|balloonmsg)$/ && UNIVERSAL::isa($info,'ARRAY'))
+ {
+ $balloon->Subclient($index);
+ if (defined $info->[$index])
+ {
+ return $info->[$index];
+ }
+ return '';
+ }
+ return $info;
+ }
+}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $class->SUPER::ClassInit($mw);
+ # Standard Motif bindings:
+ $mw->bind($class,'<1>',[sub {
+ my $w = shift;
+ if (Tk::Exists($w)) {
+ $w->BeginSelect(@_);
+ }
+ }, Ev('index',Ev('@'))]);
+ $mw->bind($class, '<Double-1>' => \&Tk::NoOp);
+ $mw->bind($class,'<B1-Motion>',['Motion',Ev('index',Ev('@'))]);
+ $mw->bind($class,'<ButtonRelease-1>','ButtonRelease_1');
+ ;
+ $mw->bind($class,'<Shift-1>',['BeginExtend',Ev('index',Ev('@'))]);
+ $mw->bind($class,'<Control-1>',['BeginToggle',Ev('index',Ev('@'))]);
+
+ $mw->bind($class,'<B1-Leave>',['AutoScan',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B1-Enter>','CancelRepeat');
+ $mw->bind($class,'<Up>',['UpDown',-1]);
+ $mw->bind($class,'<Shift-Up>',['ExtendUpDown',-1]);
+ $mw->bind($class,'<Down>',['UpDown',1]);
+ $mw->bind($class,'<Shift-Down>',['ExtendUpDown',1]);
+
+ $mw->XscrollBind($class);
+ $mw->bind($class,'<Prior>', sub {
+ my $w = shift;
+ $w->yview('scroll',-1,'pages');
+ $w->activate('@0,0');
+ });
+ $mw->bind($class,'<Next>', sub {
+ my $w = shift;
+ $w->yview('scroll',1,'pages');
+ $w->activate('@0,0');
+ });
+ $mw->bind($class,'<Control-Prior>', ['xview', 'scroll', -1, 'pages']);
+ $mw->bind($class,'<Control-Next>', ['xview', 'scroll', 1, 'pages']);
+ # <Home> and <End> defined in XscrollBind
+ $mw->bind($class,'<Control-Home>','Cntrl_Home');
+ ;
+ $mw->bind($class,'<Shift-Control-Home>',['DataExtend',0]);
+ $mw->bind($class,'<Control-End>','Cntrl_End');
+ ;
+ $mw->bind($class,'<Shift-Control-End>',['DataExtend','end']);
+ # XXX What about <<Copy>>? Already handled in Tk::Clipboard?
+ # $class->clipboardOperations($mw,'Copy');
+ $mw->bind($class,'<space>',['BeginSelect',Ev('index','active')]);
+ $mw->bind($class,'<Select>',['BeginSelect',Ev('index','active')]);
+ $mw->bind($class,'<Control-Shift-space>',['BeginExtend',Ev('index','active')]);
+ $mw->bind($class,'<Shift-Select>',['BeginExtend',Ev('index','active')]);
+ $mw->bind($class,'<Escape>','Cancel');
+ $mw->bind($class,'<Control-slash>','SelectAll');
+ $mw->bind($class,'<Control-backslash>','Cntrl_backslash');
+ ;
+ # Additional Tk bindings that aren't part of the Motif look and feel:
+ $mw->bind($class,'<2>',['scan','mark',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B2-Motion>',['scan','dragto',Ev('x'),Ev('y')]);
+
+ $mw->MouseWheelBind($class); # XXX Both needed?
+ $mw->YMouseWheelBind($class);
+ return $class;
+}
+
+1;
+__END__
+
+sub TIEARRAY {
+ my ( $class, $obj, %options ) = @_;
+ return bless {
+ OBJECT => \$obj,
+ OPTION => \%options }, $class;
+}
+
+
+
+sub TIESCALAR {
+ my ( $class, $obj, %options ) = @_;
+ return bless {
+ OBJECT => \$obj,
+ OPTION => \%options }, $class;
+}
+
+# FETCH
+# -----
+# Return either the full contents or only the selected items in the
+# box depending on whether we tied it to an array or scalar respectively
+sub FETCH {
+ my $class = shift;
+
+ my $self = ${$class->{OBJECT}};
+ my %options = %{$class->{OPTION}} if defined $class->{OPTION};;
+
+ # Define the return variable
+ my $result;
+
+ # Check whether we are have a tied array or scalar quantity
+ if ( @_ ) {
+ my $i = shift;
+ # The Tk:: Listbox has been tied to an array, we are returning
+ # an array list of the current items in the Listbox
+ $result = $self->get($i);
+ } else {
+ # The Tk::Listbox has been tied to a scalar, we are returning a
+ # reference to an array or hash containing the currently selected items
+ my ( @array, %hash );
+
+ if ( defined $options{ReturnType} ) {
+
+ # THREE-WAY SWITCH
+ if ( $options{ReturnType} eq "index" ) {
+ $result = [$self->curselection];
+ } elsif ( $options{ReturnType} eq "element" ) {
+ foreach my $selection ( $self->curselection ) {
+ push(@array,$self->get($selection)); }
+ $result = \@array;
+ } elsif ( $options{ReturnType} eq "both" ) {
+ foreach my $selection ( $self->curselection ) {
+ %hash = ( %hash, $selection => $self->get($selection)); }
+ $result = \%hash;
+ }
+ } else {
+ # return elements (default)
+ foreach my $selection ( $self->curselection ) {
+ push(@array,$self->get($selection)); }
+ $result = \@array;
+ }
+ }
+ return $result;
+}
+
+# FETCHSIZE
+# ---------
+# Return the number of elements in the Listbox when tied to an array
+sub FETCHSIZE {
+ my $class = shift;
+ return ${$class->{OBJECT}}->size();
+}
+
+# STORE
+# -----
+# If tied to an array we will modify the Listbox contents, while if tied
+# to a scalar we will select and clear elements.
+sub STORE {
+
+ if ( scalar(@_) == 2 ) {
+ # we have a tied scalar
+ my ( $class, $selected ) = @_;
+ my $self = ${$class->{OBJECT}};
+ my %options = %{$class->{OPTION}} if defined $class->{OPTION};;
+
+ # clear currently selected elements
+ $self->selectionClear(0,'end');
+
+ # set selected elements
+ if ( defined $options{ReturnType} ) {
+
+ # THREE-WAY SWITCH
+ if ( $options{ReturnType} eq "index" ) {
+ for ( my $i=0; $i < scalar(@$selected) ; $i++ ) {
+ for ( my $j=0; $j < $self->size() ; $j++ ) {
+ if( $j == $$selected[$i] ) {
+ $self->selectionSet($j); last; }
+ }
+ }
+ } elsif ( $options{ReturnType} eq "element" ) {
+ for ( my $k=0; $k < scalar(@$selected) ; $k++ ) {
+ for ( my $l=0; $l < $self->size() ; $l++ ) {
+ if( $self->get($l) eq $$selected[$k] ) {
+ $self->selectionSet($l); last; }
+ }
+ }
+ } elsif ( $options{ReturnType} eq "both" ) {
+ foreach my $key ( keys %$selected ) {
+ $self->selectionSet($key)
+ if $$selected{$key} eq $self->get($key);
+ }
+ }
+ } else {
+ # return elements (default)
+ for ( my $k=0; $k < scalar(@$selected) ; $k++ ) {
+ for ( my $l=0; $l < $self->size() ; $l++ ) {
+ if( $self->get($l) eq $$selected[$k] ) {
+ $self->selectionSet($l); last; }
+ }
+ }
+ }
+
+ } else {
+ # we have a tied array
+ my ( $class, $index, $value ) = @_;
+ my $self = ${$class->{OBJECT}};
+
+ # check size of current contents list
+ my $sizeof = $self->size();
+
+ if ( $index <= $sizeof ) {
+ # Change a current listbox entry
+ $self->delete($index);
+ $self->insert($index, $value);
+ } else {
+ # Add a new value
+ if ( defined $index ) {
+ $self->insert($index, $value);
+ } else {
+ $self->insert("end", $value);
+ }
+ }
+ }
+}
+
+# CLEAR
+# -----
+# Empty the Listbox of contents if tied to an array
+sub CLEAR {
+ my $class = shift;
+ ${$class->{OBJECT}}->delete(0, 'end');
+}
+
+# EXTEND
+# ------
+# Do nothing and be happy about it
+sub EXTEND { }
+
+# PUSH
+# ----
+# Append elements onto the Listbox contents
+sub PUSH {
+ my ( $class, @list ) = @_;
+ ${$class->{OBJECT}}->insert('end', @list);
+}
+
+# POP
+# ---
+# Remove last element of the array and return it
+sub POP {
+ my $class = shift;
+
+ my $value = ${$class->{OBJECT}}->get('end');
+ ${$class->{OBJECT}}->delete('end');
+ return $value;
+}
+
+# SHIFT
+# -----
+# Removes the first element and returns it
+sub SHIFT {
+ my $class = shift;
+
+ my $value = ${$class->{OBJECT}}->get(0);
+ ${$class->{OBJECT}}->delete(0);
+ return $value
+}
+
+# UNSHIFT
+# -------
+# Insert elements at the beginning of the Listbox
+sub UNSHIFT {
+ my ( $class, @list ) = @_;
+ ${$class->{OBJECT}}->insert(0, @list);
+}
+
+# DELETE
+# ------
+# Delete element at specified index
+sub DELETE {
+ my ( $class, @list ) = @_;
+
+ my $value = ${$class->{OBJECT}}->get(@list);
+ ${$class->{OBJECT}}->delete(@list);
+ return $value;
+}
+
+# EXISTS
+# ------
+# Returns true if the index exist, and undef if not
+sub EXISTS {
+ my ( $class, $index ) = @_;
+ return undef unless ${$class->{OBJECT}}->get($index);
+}
+
+# SPLICE
+# ------
+# Performs equivalent of splice on the listbox contents
+sub SPLICE {
+ my $class = shift;
+
+ my $self = ${$class->{OBJECT}};
+
+ # check for arguments
+ my @elements;
+ if ( scalar(@_) == 0 ) {
+ # none
+ @elements = $self->get(0,'end');
+ $self->delete(0,'end');
+ return wantarray ? @elements : $elements[scalar(@elements)-1];;
+
+ } elsif ( scalar(@_) == 1 ) {
+ # $offset
+ my ( $offset ) = @_;
+ if ( $offset < 0 ) {
+ my $start = $self->size() + $offset;
+ if ( $start > 0 ) {
+ @elements = $self->get($start,'end');
+ $self->delete($start,'end');
+ return wantarray ? @elements : $elements[scalar(@elements)-1];
+ } else {
+ return undef;
+ }
+ } else {
+ @elements = $self->get($offset,'end');
+ $self->delete($offset,'end');
+ return wantarray ? @elements : $elements[scalar(@elements)-1];
+ }
+
+ } elsif ( scalar(@_) == 2 ) {
+ # $offset and $length
+ my ( $offset, $length ) = @_;
+ if ( $offset < 0 ) {
+ my $start = $self->size() + $offset;
+ my $end = $self->size() + $offset + $length - 1;
+ if ( $start > 0 ) {
+ @elements = $self->get($start,$end);
+ $self->delete($start,$end);
+ return wantarray ? @elements : $elements[scalar(@elements)-1];
+ } else {
+ return undef;
+ }
+ } else {
+ @elements = $self->get($offset,$offset+$length-1);
+ $self->delete($offset,$offset+$length-1);
+ return wantarray ? @elements : $elements[scalar(@elements)-1];
+ }
+
+ } else {
+ # $offset, $length and @list
+ my ( $offset, $length, @list ) = @_;
+ if ( $offset < 0 ) {
+ my $start = $self->size() + $offset;
+ my $end = $self->size() + $offset + $length - 1;
+ if ( $start > 0 ) {
+ @elements = $self->get($start,$end);
+ $self->delete($start,$end);
+ $self->insert($start,@list);
+ return wantarray ? @elements : $elements[scalar(@elements)-1];
+ } else {
+ return undef;
+ }
+ } else {
+ @elements = $self->get($offset,$offset+$length-1);
+ $self->delete($offset,$offset+$length-1);
+ $self->insert($offset,@list);
+ return wantarray ? @elements : $elements[scalar(@elements)-1];
+ }
+ }
+}
+
+# ----
+
+#
+# Bind --
+# This procedure is invoked the first time the mouse enters a listbox
+# widget or a listbox widget receives the input focus. It creates
+# all of the class bindings for listboxes.
+#
+# Arguments:
+# event - Indicates which event caused the procedure to be invoked
+# (Enter or FocusIn). It is used so that we can carry out
+# the functions of that event in addition to setting up
+# bindings.
+
+sub xyIndex
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ return $w->index($Ev->xy);
+}
+
+sub ButtonRelease_1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->CancelRepeat;
+ $w->activate($Ev->xy);
+}
+
+
+sub Cntrl_Home
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->activate(0);
+ $w->see(0);
+ $w->selectionClear(0,'end');
+ $w->selectionSet(0);
+ $w->eventGenerate("<<ListboxSelect>>");
+}
+
+
+sub Cntrl_End
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->activate('end');
+ $w->see('end');
+ $w->selectionClear(0,'end');
+ $w->selectionSet('end');
+ $w->eventGenerate("<<ListboxSelect>>");
+}
+
+
+sub Cntrl_backslash
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ if ($w->cget('-selectmode') ne 'browse')
+ {
+ $w->selectionClear(0,'end');
+ $w->eventGenerate("<<ListboxSelect>>");
+ }
+}
+
+# BeginSelect --
+#
+# This procedure is typically invoked on button-1 presses. It begins
+# the process of making a selection in the listbox. Its exact behavior
+# depends on the selection mode currently in effect for the listbox;
+# see the Motif documentation for details.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element for the selection operation (typically the
+# one under the pointer). Must be in numerical form.
+sub BeginSelect
+{
+ my $w = shift;
+ my $el = shift;
+ if ($w->cget('-selectmode') eq 'multiple')
+ {
+ if ($w->selectionIncludes($el))
+ {
+ $w->selectionClear($el)
+ }
+ else
+ {
+ $w->selectionSet($el)
+ }
+ }
+ else
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet($el);
+ $w->selectionAnchor($el);
+ @Selection = ();
+ $Prev = $el
+ }
+ $w->focus if ($w->cget('-takefocus'));
+ $w->eventGenerate("<<ListboxSelect>>");
+}
+# Motion --
+#
+# This procedure is called to process mouse motion events while
+# button 1 is down. It may move or extend the selection, depending
+# on the listbox's selection mode.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element under the pointer (must be a number).
+sub Motion
+{
+ my $w = shift;
+ my $el = shift;
+ if (defined($Prev) && $el == $Prev)
+ {
+ return;
+ }
+ my $anchor = $w->index('anchor');
+ my $mode = $w->cget('-selectmode');
+ if ($mode eq 'browse')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet($el);
+ $Prev = $el;
+ $w->eventGenerate("<<ListboxSelect>>");
+ }
+ elsif ($mode eq 'extended')
+ {
+ my $i = $Prev;
+ if (!defined $i || $i eq '')
+ {
+ $i = $el;
+ $w->selectionSet($el);
+ }
+ if ($w->selectionIncludes('anchor'))
+ {
+ $w->selectionClear($i,$el);
+ $w->selectionSet('anchor',$el)
+ }
+ else
+ {
+ $w->selectionClear($i,$el);
+ $w->selectionClear('anchor',$el)
+ }
+ if (!@Selection)
+ {
+ @Selection = $w->curselection;
+ }
+ while ($i < $el && $i < $anchor)
+ {
+ if (Tk::lsearch(\@Selection,$i) >= 0)
+ {
+ $w->selectionSet($i)
+ }
+ $i++
+ }
+ while ($i > $el && $i > $anchor)
+ {
+ if (Tk::lsearch(\@Selection,$i) >= 0)
+ {
+ $w->selectionSet($i)
+ }
+ $i--
+ }
+ $Prev = $el;
+ $w->eventGenerate("<<ListboxSelect>>");
+ }
+}
+# BeginExtend --
+#
+# This procedure is typically invoked on shift-button-1 presses. It
+# begins the process of extending a selection in the listbox. Its
+# exact behavior depends on the selection mode currently in effect
+# for the listbox; see the Motif documentation for details.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element for the selection operation (typically the
+# one under the pointer). Must be in numerical form.
+sub BeginExtend
+{
+ my $w = shift;
+ my $el = shift;
+ if ($w->cget('-selectmode') eq 'extended' && $w->selectionIncludes('anchor'))
+ {
+ $w->Motion($el)
+ }
+ else
+ {
+ # No selection yet; simulate the begin-select operation.
+ $w->BeginSelect($el);
+ }
+}
+# BeginToggle --
+#
+# This procedure is typically invoked on control-button-1 presses. It
+# begins the process of toggling a selection in the listbox. Its
+# exact behavior depends on the selection mode currently in effect
+# for the listbox; see the Motif documentation for details.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element for the selection operation (typically the
+# one under the pointer). Must be in numerical form.
+sub BeginToggle
+{
+ my $w = shift;
+ my $el = shift;
+ if ($w->cget('-selectmode') eq 'extended')
+ {
+ @Selection = $w->curselection();
+ $Prev = $el;
+ $w->selectionAnchor($el);
+ if ($w->selectionIncludes($el))
+ {
+ $w->selectionClear($el)
+ }
+ else
+ {
+ $w->selectionSet($el)
+ }
+ $w->eventGenerate("<<ListboxSelect>>");
+ }
+}
+# AutoScan --
+# This procedure is invoked when the mouse leaves an entry window
+# with button 1 down. It scrolls the window up, down, left, or
+# right, depending on where the mouse left the window, and reschedules
+# itself as an "after" command so that the window continues to scroll until
+# the mouse moves back into the window or the mouse button is released.
+#
+# Arguments:
+# w - The entry window.
+# x - The x-coordinate of the mouse when it left the window.
+# y - The y-coordinate of the mouse when it left the window.
+sub AutoScan
+{
+ my $w = shift;
+ return if !Tk::Exists($w);
+ my $x = shift;
+ my $y = shift;
+ if ($y >= $w->height)
+ {
+ $w->yview('scroll',1,'units')
+ }
+ elsif ($y < 0)
+ {
+ $w->yview('scroll',-1,'units')
+ }
+ elsif ($x >= $w->width)
+ {
+ $w->xview('scroll',2,'units')
+ }
+ elsif ($x < 0)
+ {
+ $w->xview('scroll',-2,'units')
+ }
+ else
+ {
+ return;
+ }
+ $w->Motion($w->index("@" . $x . ',' . $y));
+ $w->RepeatId($w->after(50,'AutoScan',$w,$x,$y));
+}
+# UpDown --
+#
+# Moves the location cursor (active element) up or down by one element,
+# and changes the selection if we're in browse or extended selection
+# mode.
+#
+# Arguments:
+# w - The listbox widget.
+# amount - +1 to move down one item, -1 to move back one item.
+sub UpDown
+{
+ my $w = shift;
+ my $amount = shift;
+ $w->activate($w->index('active')+$amount);
+ $w->see('active');
+ my $mode = $w->cget('-selectmode');
+ if ($mode eq 'browse')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet('active');
+ $w->eventGenerate("<<ListboxSelect>>");
+ }
+ elsif ($mode eq 'extended')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet('active');
+ $w->selectionAnchor('active');
+ $Prev = $w->index('active');
+ @Selection = ();
+ $w->eventGenerate("<<ListboxSelect>>");
+ }
+}
+# ExtendUpDown --
+#
+# Does nothing unless we're in extended selection mode; in this
+# case it moves the location cursor (active element) up or down by
+# one element, and extends the selection to that point.
+#
+# Arguments:
+# w - The listbox widget.
+# amount - +1 to move down one item, -1 to move back one item.
+sub ExtendUpDown
+{
+ my $w = shift;
+ my $amount = shift;
+ if ($w->cget('-selectmode') ne 'extended')
+ {
+ return;
+ }
+ my $active = $w->index('active');
+ if (!@Selection)
+ {
+ $w->selectionSet($active);
+ @Selection = $w->curselection;
+ }
+ $w->activate($active + $amount);
+ $w->see('active');
+ $w->Motion($w->index('active'))
+}
+# DataExtend
+#
+# This procedure is called for key-presses such as Shift-KEndData.
+# If the selection mode isn't multiple or extend then it does nothing.
+# Otherwise it moves the active element to el and, if we're in
+# extended mode, extends the selection to that point.
+#
+# Arguments:
+# w - The listbox widget.
+# el - An integer element number.
+sub DataExtend
+{
+ my $w = shift;
+ my $el = shift;
+ my $mode = $w->cget('-selectmode');
+ if ($mode eq 'extended')
+ {
+ $w->activate($el);
+ $w->see($el);
+ if ($w->selectionIncludes('anchor'))
+ {
+ $w->Motion($el)
+ }
+ }
+ elsif ($mode eq 'multiple')
+ {
+ $w->activate($el);
+ $w->see($el)
+ }
+}
+# Cancel
+#
+# This procedure is invoked to cancel an extended selection in
+# progress. If there is an extended selection in progress, it
+# restores all of the items between the active one and the anchor
+# to their previous selection state.
+#
+# Arguments:
+# w - The listbox widget.
+sub Cancel
+{
+ my $w = shift;
+ if ($w->cget('-selectmode') ne 'extended' || !defined $Prev)
+ {
+ return;
+ }
+ my $first = $w->index('anchor');
+ my $last = $Prev;
+ if ($first > $last)
+ {
+ ($first, $last) = ($last, $first);
+ }
+ $w->selectionClear($first,$last);
+ while ($first <= $last)
+ {
+ if (Tk::lsearch(\@Selection,$first) >= 0)
+ {
+ $w->selectionSet($first)
+ }
+ $first++
+ }
+ $w->eventGenerate("<<ListboxSelect>>");
+}
+# SelectAll
+#
+# This procedure is invoked to handle the "select all" operation.
+# For single and browse mode, it just selects the active element.
+# Otherwise it selects everything in the widget.
+#
+# Arguments:
+# w - The listbox widget.
+sub SelectAll
+{
+ my $w = shift;
+ my $mode = $w->cget('-selectmode');
+ if ($mode eq 'single' || $mode eq 'browse')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet('active')
+ }
+ else
+ {
+ $w->selectionSet(0,'end')
+ }
+ $w->eventGenerate("<<ListboxSelect>>");
+}
+
+# Perl/Tk extensions:
+sub SetList
+{
+ my $w = shift;
+ $w->delete(0,'end');
+ $w->insert('end',@_);
+}
+
+sub deleteSelected
+{
+ my $w = shift;
+ my $i;
+ foreach $i (reverse $w->curselection)
+ {
+ $w->delete($i);
+ }
+}
+
+sub clipboardPaste
+{
+ my $w = shift;
+ my $index = $w->index('active') || $w->index($w->XEvent->xy);
+ my $str;
+ eval {local $SIG{__DIE__}; $str = $w->clipboardGet };
+ return if $@;
+ foreach (split("\n",$str))
+ {
+ $w->insert($index++,$_);
+ }
+}
+
+sub getSelected
+{
+ my ($w) = @_;
+ my $i;
+ my (@result) = ();
+ foreach $i ($w->curselection)
+ {
+ push(@result,$w->get($i));
+ }
+ return (wantarray) ? @result : $result[0];
+}
+
+
+
+1;
+__END__
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Listbox.pod b/Master/tlpkg/tlperl/lib/Tk/Listbox.pod
new file mode 100644
index 00000000000..ba00afe3ed9
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Listbox.pod
@@ -0,0 +1,794 @@
+# Copyright (c) 1990 The Regents of the University of California.
+# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Listbox - Create and manipulate Listbox widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$listbox> = I<$parent>-E<gt>B<Listbox>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-background> B<-borderwidth> B<-cursor> B<-disabledforeground>
+B<-exportselection> B<-font> B<-foreground> B<-height>
+B<-highlightbackground> B<-highlightcolor> B<-highlightthickness>
+B<-offset> B<-relief> B<-selectbackground> B<-selectborderwidth>
+B<-selectforeground> B<-setgrid> B<-state> B<-takefocus> B<-tile>
+B<-width> B<-xscrollcommand> B<-yscrollcommand>
+
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<activeStyle>
+
+=item Class: B<ActiveStyle>
+
+=item Switch: B<-activestyle>
+
+Specifies the style in which to draw the active element. This must be
+one of B<dotbox> (show a focus ring around the active element), B<none>
+(no special indication of active element) or B<underline> (underline the
+active element). The default is B<underline>.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies the desired height for the window, in lines.
+If zero or less, then the desired height for the window is made just
+large enough to hold all the elements in the listbox.
+
+=item Name: B<listVariable>
+
+=item Class: B<Variable>
+
+=item Switch: B<-listvariable>
+
+I<The following is only partially implemented in Perl/Tk:>
+
+Specifies the reference of a variable. The value of the variable is an array
+to be displayed inside the widget; if the variable value changes
+then the widget will automatically update itself to reflect the new
+value. Attempts to assign a variable with an invalid list value to
+B<-listvariable> will cause an error. Attempts to unset a variable in use
+as a B<-listvariable> will fail but will not generate an error.
+
+=item Name: B<selectMode>
+
+=item Class: B<SelectMode>
+
+=item Switch: B<-selectmode>
+
+Specifies one of several styles for manipulating the selection.
+The value of the option may be arbitrary, but the default bindings
+expect it to be either B<single>, B<browse>, B<multiple>,
+or B<extended>; the default value is B<browse>.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of two states for the listbox: B<normal> or B<disabled>.
+If the listbox is disabled then items may not be inserted or deleted,
+items are drawn in the B<-disabledforeground> color, and selection
+cannot be modified and is not shown (though selection information is
+retained).
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired width for the window in characters.
+If the font doesn't have a uniform width then the width of the
+character ``0'' is used in translating from character units to
+screen units.
+If zero or less, then the desired width for the window is made just
+large enough to hold all the elements in the listbox.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Listbox> method creates a new window (given by the
+$widget argument) and makes it into a listbox widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the listbox such as its colors, font,
+text, and relief. The B<listbox> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A listbox is a widget that displays a list of strings, one per line.
+When first created, a new listbox has no elements.
+Elements may be added or deleted using methods described
+below. In addition, one or more elements may be selected as described
+below.
+If a listbox is exporting its selection (see B<exportSelection>
+option), then it will observe the standard X11 protocols
+for handling the selection.
+Listbox selections are available as type B<STRING>;
+the value of the selection will be the text of the selected elements, with
+newlines separating the elements.
+
+It is not necessary for all the elements to be
+displayed in the listbox window at once; commands described below
+may be used to change the view in the window. Listboxes allow
+scrolling in both directions using the standard B<xScrollCommand>
+and B<yScrollCommand> options.
+They also support scanning, as described below.
+
+=head1 INDICES
+
+Many of the methods for listboxes take one or more indices
+as arguments.
+An index specifies a particular element of the listbox, in any of
+the following ways:
+
+=over 4
+
+=item I<number>
+
+Specifies the element as a numerical index, where 0 corresponds
+to the first element in the listbox.
+
+=item B<active>
+
+Indicates the element that has the location cursor. This element
+will be displayed with an underline when the listbox has the
+keyboard focus, and it is specified with the B<activate>
+method.
+
+=item B<anchor>
+
+Indicates the anchor point for the selection, which is set with the
+B<selection anchor> method.
+
+=item B<end>
+
+Indicates the end of the listbox.
+For most commands this refers to the last element in the listbox,
+but for a few commands such as B<index> and B<insert>
+it refers to the element just after the last one.
+
+=item B<@>I<x>B<,>I<y>
+
+Indicates the element that covers the point in the listbox window
+specified by I<x> and I<y> (in pixel coordinates). If no
+element covers that point, then the closest element to that
+point is used.
+
+=back
+
+In the method descriptions below, arguments named I<index>,
+I<first>, and I<last> always contain text indices in one of
+the above forms.
+
+=head1 WIDGET METHODS
+
+The B<Listbox> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for listbox widgets:
+
+=over 4
+
+=item I<$listbox>-E<gt>B<activate>(I<index>)
+
+Sets the active element to the one indicated by I<index>.
+If I<index> is outside the range of elements in the listbox
+then the closest element is activated.
+The active element is drawn with an underline when the widget
+has the input focus, and its index may be retrieved with the
+index B<active>.
+
+=item I<$listbox>-E<gt>B<bbox>(I<index>)
+
+Returns a list of four numbers describing the bounding box of
+the text in the element given by I<index>.
+The first two elements of the list give the x and y coordinates
+of the upper-left corner of the screen area covered by the text
+(specified in pixels relative to the widget) and the last two
+elements give the width and height of the area, in pixels.
+If no part of the element given by I<index> is visible on the
+screen,
+or if I<index> refers to a non-existent element,
+then the result is an empty string; if the element is
+partially visible, the result gives the full area of the element,
+including any parts that are not visible.
+
+=item I<$listbox>-E<gt>B<curselection>
+
+Returns a list containing the numerical indices of
+all of the elements in the listbox that are currently selected.
+If there are no elements selected in the listbox then an empty
+string is returned.
+
+=item I<$listbox>-E<gt>B<delete>(I<first, >?I<last>?)
+
+Deletes one or more elements of the listbox. I<First> and I<last>
+are indices specifying the first and last elements in the range
+to delete. If I<last> isn't specified it defaults to
+I<first>, i.e. a single element is deleted.
+
+=item I<$listbox>-E<gt>B<get>(I<first, >?I<last>?)
+
+If I<last> is omitted, returns the contents of the listbox
+element indicated by I<first>,
+or an empty string if I<first> refers to a non-existent element.
+If I<last> is specified, the command returns a list whose elements
+are all of the listbox elements between I<first> and I<last>,
+inclusive.
+Both I<first> and I<last> may have any of the standard
+forms for indices.
+
+=item I<$listbox>-E<gt>B<index>(I<index>)
+
+Returns the integer index value that corresponds to I<index>.
+If I<index> is B<end> the return value is a count of the number
+of elements in the listbox (not the index of the last element).
+
+=item I<$listbox>-E<gt>B<insert>(I<index, >?I<element, element, ...>?)
+
+Inserts zero or more new elements in the list just before the
+element given by I<index>. If I<index> is specified as
+B<end> then the new elements are added to the end of the
+list. Returns an empty string.
+
+=item I<$listbox>-E<gt>B<itemcget>(I<index>, I<option>)
+
+Returns the current value of the item configuration option given by
+I<option>. Option may have any of the values accepted by the listbox
+B<itemconfigure> command.
+
+=item I<$listbox>-E<gt>B<itemconfigure>(I<index, >?I<option, value,
+option, value, ...>?)
+
+Query or modify the configuration options of an item in the listbox.
+If no option is specified, returns a list describing all of the
+available options for the item (see Tk_ConfigureInfo for information
+on the format of this list). If option is specified with no value,
+then the command returns a list describing the one named option (this
+list will be identical to the corresponding sublist of the value
+returned if no option is specified). If one or more option-value pairs
+are specified, then the command modifies the given widget option(s) to
+have the given value(s); in this case the command returns an empty
+string. The following options are currently supported for items:
+
+=over
+
+=item B<-background> =E<gt> I<color>
+
+I<Color> specifies the background color to use when displaying the
+item. It may have any of the forms accepted by Tk_GetColor.
+
+=item B<-foreground> =E<gt> I<color>
+
+I<Color> specifies the foreground color to use when displaying the
+item. It may have any of the forms accepted by Tk_GetColor.
+
+=item B<-selectbackground> =E<gt> I<color>
+
+I<Color> specifies the background color to use when displaying the
+item while it is selected. It may have any of the forms accepted by
+Tk_GetColor.
+
+=item B<-selectforeground> =E<gt> I<color>
+
+I<Color> specifies the foreground color to use when displaying the
+item while it is selected. It may have any of the forms accepted by
+Tk_GetColor.
+
+=back
+
+=item I<$listbox>-E<gt>B<nearest>(I<y>)
+
+Given a y-coordinate within the listbox window, this command returns
+the index of the (visible) listbox element nearest to that y-coordinate.
+
+=item I<$listbox>-E<gt>B<scan>(I<option, args>)
+
+This command is used to implement scanning on listboxes. It has
+two forms, depending on I<option>:
+
+=over 8
+
+=item I<$listbox>-E<gt>B<scanMark>(I<x, y>)
+
+Records I<x> and I<y> and the current view in the listbox
+window; used in conjunction with later B<scan dragto> commands.
+Typically this command is associated with a mouse button press in
+the widget. It returns an empty string.
+
+=item I<$listbox>-E<gt>B<scanDragto>(I<x, y>.)
+
+This command computes the difference between its I<x> and I<y>
+arguments and the I<x> and I<y> arguments to the last
+B<scan mark> command for the widget.
+It then adjusts the view by 10 times the
+difference in coordinates. This command is typically associated
+with mouse motion events in the widget, to produce the effect of
+dragging the list at high speed through the window. The return
+value is an empty string.
+
+=back
+
+=item I<$listbox>-E<gt>B<see>(I<index>)
+
+Adjust the view in the listbox so that the element given by I<index>
+is visible.
+If the element is already visible then the command has no effect;
+if the element is near one edge of the window then the listbox
+scrolls to bring the element into view at the edge; otherwise
+the listbox scrolls to center the element.
+
+=item I<$listbox>-E<gt>B<selection>(I<option, arg>)
+
+This command is used to adjust the selection within a listbox. It
+has several forms, depending on I<option>:
+
+=over 8
+
+=item I<$listbox>-E<gt>B<selectionAnchor>(I<index>)
+
+Sets the selection anchor to the element given by I<index>.
+If I<index> refers to a non-existent element, then the closest
+element is used.
+The selection anchor is the end of the selection that is fixed
+while dragging out a selection with the mouse.
+The index B<anchor> may be used to refer to the anchor
+element.
+
+=item I<$listbox>-E<gt>B<selectionClear>(I<first, >?I<last>?)
+
+If any of the elements between I<first> and I<last>
+(inclusive) are selected, they are deselected.
+The selection state is not changed for elements outside
+this range.
+
+=item I<$listbox>-E<gt>B<selectionIncludes>(I<index>)
+
+Returns 1 if the element indicated by I<index> is currently
+selected, 0 if it isn't.
+
+=item I<$listbox>-E<gt>B<selectionSet>(I<first, >?I<last>?)
+
+Selects all of the elements in the range between
+I<first> and I<last>, inclusive, without affecting
+the selection state of elements outside that range.
+
+=back
+
+=item I<$listbox>-E<gt>B<size>
+
+Returns a decimal string indicating the total number of elements
+in the listbox.
+
+=item I<$listbox>-E<gt>B<xview>(I<args>)
+
+This command is used to query and change the horizontal position of the
+information in the widget's window. It can take any of the following
+forms:
+
+=over 8
+
+=item I<$listbox>-E<gt>B<xview>
+
+Returns a list containing two elements.
+Each element is a real fraction between 0 and 1; together they describe
+the horizontal span that is visible in the window.
+For example, if the first element is .2 and the second element is .6,
+20% of the listbox's text is off-screen to the left, the middle 40% is visible
+in the window, and 40% of the text is off-screen to the right.
+These are the same values passed to scrollbars via the B<-xscrollcommand>
+option.
+
+=item I<$listbox>-E<gt>B<xview>(I<index>)
+
+Adjusts the view in the window so that the character position given by
+I<index> is displayed at the left edge of the window.
+Character positions are defined by the width of the character B<0>.
+
+=item I<$listbox>-E<gt>B<xviewMoveto>( I<fraction> );
+
+Adjusts the view in the window so that I<fraction> of the
+total width of the listbox text is off-screen to the left.
+I<fraction> must be a fraction between 0 and 1.
+
+=item I<$listbox>-E<gt>B<xviewScroll>( I<number, what> );
+
+This command shifts the view in the window left or right according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages> or an abbreviation
+of one of these.
+If I<what> is B<units>, the view adjusts left or right by
+I<number> character units (the width of the B<0> character)
+on the display; if it is B<pages> then the view adjusts by
+I<number> screenfuls.
+If I<number> is negative then characters farther to the left
+become visible; if it is positive then characters farther to the right
+become visible.
+
+=back
+
+=item I<$listbox>-E<gt>B<yview>(I<?args>?)
+
+This command is used to query and change the vertical position of the
+text in the widget's window.
+It can take any of the following forms:
+
+=over 8
+
+=item I<$listbox>-E<gt>B<yview>
+
+Returns a list containing two elements, both of which are real fractions
+between 0 and 1.
+The first element gives the position of the listbox element at the
+top of the window, relative to the listbox as a whole (0.5 means
+it is halfway through the listbox, for example).
+The second element gives the position of the listbox element just after
+the last one in the window, relative to the listbox as a whole.
+These are the same values passed to scrollbars via the B<-yscrollcommand>
+option.
+
+=item I<$listbox>-E<gt>B<yview>(I<index>)
+
+Adjusts the view in the window so that the element given by
+I<index> is displayed at the top of the window.
+
+=item I<$listbox>-E<gt>B<yviewMoveto>( I<fraction> );
+
+Adjusts the view in the window so that the element given by I<fraction>
+appears at the top of the window.
+I<Fraction> is a fraction between 0 and 1; 0 indicates the first
+element in the listbox, 0.33 indicates the element one-third the
+way through the listbox, and so on.
+
+=item I<$listbox>-E<gt>B<yviewScroll>( I<number, what> );
+
+This command adjusts the view in the window up or down according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages>.
+If I<what> is B<units>, the view adjusts up or down by
+I<number> lines; if it is B<pages> then
+the view adjusts by I<number> screenfuls.
+If I<number> is negative then earlier elements
+become visible; if it is positive then later elements
+become visible.
+
+=back
+
+=back
+
+=head1 DEFAULT BINDINGS
+
+Tk automatically creates class bindings for listboxes that give them
+Motif-like behavior. Much of the behavior of a listbox is determined
+by its B<selectMode> option, which selects one of four ways
+of dealing with the selection.
+
+If the selection mode is B<single> or B<browse>, at most one
+element can be selected in the listbox at once.
+In both modes, clicking button 1 on an element selects
+it and deselects any other selected item.
+In B<browse> mode it is also possible to drag the selection
+with button 1.
+
+If the selection mode is B<multiple> or B<extended>,
+any number of elements may be selected at once, including discontiguous
+ranges. In B<multiple> mode, clicking button 1 on an element
+toggles its selection state without affecting any other elements.
+In B<extended> mode, pressing button 1 on an element selects
+it, deselects everything else, and sets the anchor to the element
+under the mouse; dragging the mouse with button 1
+down extends the selection to include all the elements between
+the anchor and the element under the mouse, inclusive.
+
+Most people will probably want to use B<browse> mode for
+single selections and B<extended> mode for multiple selections;
+the other modes appear to be useful only in special situations.
+
+Any time the selection changes in the listbox, the virtual event
+B<<< <<ListboxSelect>> >>> will be generated. It is easiest to bind to this
+event to be made aware of any changes to listbox selection.
+
+
+In addition to the above behavior, the following additional behavior
+is defined by the default bindings:
+
+=over 4
+
+=item [1]
+
+In B<extended> mode, the selected range can be adjusted by pressing
+button 1 with the Shift key down: this modifies the selection to
+consist of the elements between the anchor and the element under
+the mouse, inclusive.
+The un-anchored end of this new selection can also be dragged with
+the button down.
+
+=item [2]
+
+In B<extended> mode, pressing button 1 with the Control key down
+starts a toggle operation: the anchor is set to the element under
+the mouse, and its selection state is reversed. The selection state
+of other elements isn't changed.
+If the mouse is dragged with button 1 down, then the selection state
+of all elements between the anchor and the element under the mouse
+is set to match that of the anchor element; the selection state of
+all other elements remains what it was before the toggle operation
+began.
+
+=item [3]
+
+If the mouse leaves the listbox window with button 1 down, the window
+scrolls away from the mouse, making information visible that used
+to be off-screen on the side of the mouse.
+The scrolling continues until the mouse re-enters the window, the
+button is released, or the end of the listbox is reached.
+
+=item [4]
+
+Mouse button 2 may be used for scanning.
+If it is pressed and dragged over the listbox, the contents of
+the listbox drag at high speed in the direction the mouse moves.
+
+=item [5]
+
+If the Up or Down key is pressed, the location cursor (active
+element) moves up or down one element.
+If the selection mode is B<browse> or B<extended> then the
+new active element is also selected and all other elements are
+deselected.
+In B<extended> mode the new active element becomes the
+selection anchor.
+
+=item [6]
+
+In B<extended> mode, Shift-Up and Shift-Down move the location
+cursor (active element) up or down one element and also extend
+the selection to that element in a fashion similar to dragging
+with mouse button 1.
+
+=item [7]
+
+The Left and Right keys scroll the listbox view left and right
+by the width of the character B<0>.
+Control-Left and Control-Right scroll the listbox view left and
+right by the width of the window.
+Control-Prior and Control-Next also scroll left and right by
+the width of the window.
+
+=item [8]
+
+The Prior and Next keys scroll the listbox view up and down
+by one page (the height of the window).
+
+=item [9]
+
+The Home and End keys scroll the listbox horizontally to
+the left and right edges, respectively.
+
+=item [10]
+
+Control-Home sets the location cursor to the the first element in
+the listbox, selects that element, and deselects everything else
+in the listbox.
+
+=item [11]
+
+Control-End sets the location cursor to the the last element in
+the listbox, selects that element, and deselects everything else
+in the listbox.
+
+=item [12]
+
+In B<extended> mode, Control-Shift-Home extends the selection
+to the first element in the listbox and Control-Shift-End extends
+the selection to the last element.
+
+=item [13]
+
+In B<multiple> mode, Control-Shift-Home moves the location cursor
+to the first element in the listbox and Control-Shift-End moves
+the location cursor to the last element.
+
+=item [14]
+
+The space and Select keys make a selection at the location cursor
+(active element) just as if mouse button 1 had been pressed over
+this element.
+
+=item [15]
+
+In B<extended> mode, Control-Shift-space and Shift-Select
+extend the selection to the active element just as if button 1
+had been pressed with the Shift key down.
+
+=item [16]
+
+In B<extended> mode, the Escape key cancels the most recent
+selection and restores all the elements in the selected range
+to their previous selection state.
+
+=item [17]
+
+Control-slash selects everything in the widget, except in
+B<single> and B<browse> modes, in which case it selects
+the active element and deselects everything else.
+
+=item [18]
+
+Control-backslash deselects everything in the widget, except in
+B<browse> mode where it has no effect.
+
+=item [19]
+
+The F16 key (labelled Copy on many Sun workstations) or Meta-w
+copies the selection in the widget to the clipboard, if there is
+a selection.
+
+The behavior of listboxes can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 TIED INTERFACE
+
+The Tk::Listbox widget can also be tied to a scalar or array variable, with
+different behaviour depending on the variable type, with the following
+tie commands:
+
+ use Tk;
+
+ my ( @array, $scalar, $other );
+ my %options = ( ReturnType => "index" );
+
+ my $MW = MainWindow->new();
+ my $lbox = $MW->Listbox()->pack();
+
+ my @list = ( "a", "b", "c", "d", "e", "f" );
+ $lbox->insert('end', @list );
+
+ tie @array, "Tk::Listbox", $lbox
+ tie $scalar, "Tk::Listbox", $lbox;
+ tie $other, "Tk::Listbox", $lbox, %options;
+
+currently only one modifier is implemented, a 3 way flag for tied scalars
+"ReturnType" which can have values "element", "index" or "both". The default
+is "element".
+
+=over 4
+
+=item Tied Arrays
+
+If you tie an array to the Listbox you can manipulate the items currently
+contained by the box in the same manner as a normal array, e.g.
+
+ print @array;
+ push(@array, @list);
+ my $popped = pop(@array);
+ my $shifted = shift(@array);
+ unshift(@array, @list);
+ delete $array[$index];
+ print $string if exists $array[$i];
+ @array = ();
+ splice @array, $offset, $length, @list
+
+The delete function is implemented slightly differently from the standard
+array implementation. Instead of setting the element at that index to undef
+it instead physically removes it from the Listbox. This has the effect of
+changing the array indices, so for instance if you had a list on non-continuous
+indices you wish to remove from the Listbox you should reverse sort the list
+and then apply the delete function, e.g.
+
+ my @list = ( 1, 2, 4, 12, 20 );
+ my @remove = reverse sort { $a <=> $b } @list;
+ delete @array[@remove];
+
+would safely remove indices 20, 12, 4, 2 and 1 from the Listbox without
+problems. It should also be noted that a similar warning applies to the
+splice function (which would normally be used in this context to perform
+the same job).
+
+
+=item Tied Scalars
+
+Unlike tied arrays, if you tie a scalar to the Listbox you can retrieve the
+currently selected elements in the box as an array referenced by the scalar,
+for instance
+
+ my @list = ( "a", "b", "c", "d", "e", "f" );
+ $lbox->insert('end', sort @list );
+ $lbox->selectionSet(1);
+
+inserts @list as elements in an already existing listbox and selects the
+element at index 1, which is "b". If we then
+
+ print @$selected;
+
+this will return the currently selected elements, in this case "b".
+
+However, if the "ReturnType" arguement is passed when tying the Listbox to the
+scalar with value "index" then the indices of the selected elements will be
+returned instead of the elements themselves, ie in this case "1". This can be
+useful when manipulating both contents and selected elements in the Listbox at
+the same time.
+
+Importantly, if a value "both" is given the scalar will not be tied to an
+array, but instead to a hash, with keys being the indices and values being
+the elements at those indices
+
+You can also manipulate the selected items using the scalar. Equating the
+scalar to an array reference will select any elements that match elements
+in the Listbox, non-matching array items are ignored, e.g.
+
+ my @list = ( "a", "b", "c", "d", "e", "f" );
+ $lbox->insert('end', sort @list );
+ $lbox->selectionSet(1);
+
+would insert the array @list into an already existing Listbox and select
+element at index 1, i.e. "b"
+
+ @array = ( "a", "b", "f" );
+ $selected = \@array;
+
+would select elements "a", "b" and "f" in the Listbox.
+
+Again, if the "index" we indicate we want to use indices in the options hash
+then the indices are use instead of elements, e.g.
+
+ @array = ( 0, 1, 5 );
+ $selected = \@array;
+
+would have the same effect, selecting elements "a", "b" and "f" if the
+$selected variable was tied with %options = ( ReturnType => "index" ).
+
+If we are returning "both", i.e. the tied scalar points to a hash, both key and
+value must match, e.g.
+
+ %hash = ( 0 => "a", 1 => "b", 5 => "f" );
+ $selected = \%hash;
+
+would have the same effect as the previous examples.
+
+It should be noted that, despite being a reference to an array (or possibly a has), you still can not copy the tied variable without it being untied, instead
+you must pass a reference to the tied scalar between subroutines.
+
+=back
+
+=head1 KEYWORDS
+
+listbox, widget, tied
+
+=head1 SEE ALSO
+
+L<Tk::HList>, L<Tk::TextList>.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/MMtry.pm b/Master/tlpkg/tlperl/lib/Tk/MMtry.pm
new file mode 100644
index 00000000000..e112ebdc7de
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/MMtry.pm
@@ -0,0 +1,60 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::MMtry;
+use Config;
+require Exporter;
+
+use vars qw($VERSION @EXPORT $VERBOSE);
+#$VERSION = sprintf '4.%03d', q$Revision: #9 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.011';
+
+use base qw(Exporter);
+@EXPORT = qw(try_compile try_run);
+use strict;
+use File::Basename;
+use File::Spec;
+
+my $stderr_too = ($^O eq 'MSWin32') ? '' : '2>&1';
+
+sub try_compile
+{
+ my ($file,$inc,$lib,$def) = @_;
+ $inc = [] unless $inc;
+ $lib = [] unless $lib;
+ $def = [] unless $def;
+ my $stderr_too = $VERBOSE ? '' : $stderr_too;
+ my $out = basename($file,'.c').$Config{'exe_ext'};
+ warn "Test Compiling $file\n";
+ my $msgs = `$Config{'cc'} -o $out $Config{'ccflags'} @$inc $file $Config{ldflags} @$lib @$def $stderr_too`;
+ my $ok = ($? == 0);
+ warn "$msgs\n" if $VERBOSE && $msgs;
+ unlink($out) if (-f $out);
+ return $ok;
+}
+
+sub try_run
+{
+ my ($file,$inc,$lib,$def) = @_;
+ $inc = [] unless $inc;
+ $lib = [] unless $lib;
+ $def = [] unless $def;
+ my $stderr_too = $VERBOSE ? '' : $stderr_too;
+ my $out = basename($file,'.c').$Config{'exe_ext'};
+ warn "Test Compile/Run $file\n";
+ my $cmdline = "$Config{'cc'} -o $out $Config{'ccflags'} @$inc $file $Config{ldflags} @$lib @$def";
+ my $msgs = `$cmdline $stderr_too`;
+ my $ok = ($? == 0);
+ warn "$cmdline:\n$msgs\n" if $VERBOSE && $msgs;
+ if ($ok)
+ {
+ my $path = File::Spec->rel2abs($out);
+ $msgs = `$path $stderr_too`;
+ $ok = ($? == 0);
+ warn "$path:$msgs\n" if $VERBOSE && $msgs;
+ }
+ unlink($out) if (-f $out);
+ return $ok;
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/MMutil.pm b/Master/tlpkg/tlperl/lib/Tk/MMutil.pm
new file mode 100644
index 00000000000..1a69e56c12c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/MMutil.pm
@@ -0,0 +1,607 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::MMutil;
+use ExtUtils::MakeMaker;
+use Cwd;
+use Config;
+use Carp;
+use File::Basename;
+
+use vars qw($VERSION);
+$VERSION = '4.024';
+
+# warn __FILE__." $VERSION\n";
+
+use Tk::MakeDepend;
+
+use Tk::Config qw(!$VERSION);
+use vars qw($IsWin32);
+
+*IsWin32 = \$main::IsWin32;
+$IsWin32 = ($^O eq 'MSWin32' || $Config{'ccflags'} =~ /-D_?WIN32_?/)
+ unless defined $IsWin32;
+
+@MYEXPORT = qw(pasthru perldepend cflags const_config constants installbin c_o xs_o makefile manifypods);
+
+sub arch_prune
+{
+ my $hash = shift;
+ foreach (keys %$hash)
+ {
+ if ($win_arch eq 'x')
+ {
+ delete $hash->{$_} if /Win[A-Z0-9]/ or /OS2/ or /ImgUtil/ or /^x/;
+ }
+ elsif ($win_arch eq 'open32')
+ {
+ delete $hash->{$_} if /Unix|Mwm/ and not /tclUnix/;
+ delete $hash->{$_} if /winMain|dllMain/;
+ }
+ elsif ($win_arch eq 'pm')
+ {
+ delete $hash->{$_}
+ if /Unix|Mwm/ and not
+ /tclUnix|Unix(3d|Button|Dialog|Color|Embed|Focus|Font|Menu|Scrlbr|Send|Int\.|Scale)/;
+ delete $hash->{$_} if /os2Main|dllMain|tkOS2Dll|^x(colors\.c|gc\.)/;
+ delete $hash->{$_} if /ImgUtil|tkWin[A-Z0-9]/ and not /OS2/;
+ }
+ elsif ($win_arch eq 'MSWin32')
+ {
+ delete $hash->{$_} if /Mwm/ and not /tclUnix/;
+ delete $hash->{$_} if /winMain|dllMain/;
+ # delete $hash->{$_} if /^Xrm/;
+ }
+ }
+}
+
+sub mTk_postamble
+{
+ my ($self) = @_;
+ my $dep = "config :: \$(C_FILES) \$(H_FILES)\n\t$self->{NOECHO}\$(NOOP)\n";
+ my $mTk = $self->{'MTK'};
+ $dep .= "# Begin Munging dependencies\n";
+ foreach my $file (sort keys %$mTk)
+ {
+ $dep .= "$file : ".$mTk->{$file}." \$(TKDIR)/pTk/Tcl-pTk\n";
+ $dep .= "\t\$(PERL) \$(TKDIR)/pTk/Tcl-pTk ".$mTk->{$file}." $file\n";
+ }
+ $dep .= "# End Munging dependencies\n\n";
+ return $dep;
+}
+
+sub mTk_CHO
+{
+ my $self = shift;
+ my $mTk = shift;
+ my $exc = shift;
+ my %c;
+ my %h;
+ foreach (@{$self->{H}}) { $h{$_} = 1 }
+ foreach (@{$self->{C}}) { $c{$_} = 1 }
+ foreach (keys %$mTk)
+ {
+ if (/\.c$/)
+ {
+ $c{$_} = 1;
+ }
+ elsif (/\.h$/)
+ {
+ $h{$_} = 1;
+ }
+ }
+ foreach (keys %$exc)
+ {
+ if (/\.c$/)
+ {
+ delete $c{$_};
+ }
+ elsif (/\.h$/)
+ {
+ delete $h{$_};
+ }
+ }
+ while (@_)
+ {
+ my $name = shift;
+ cluck("No $name") unless (exists $c{$name});
+ delete $c{$name}
+ }
+ arch_prune(\%h);
+ arch_prune(\%c);
+ $self->{'H'} = [sort keys %h];
+ $self->{'C'} = [sort keys %c];
+ my(@o_files) = @{$self->{C}};
+ $self->{O_FILES} = [grep s/\.c(pp|xx|c)?$/$self->{OBJ_EXT}/i, @o_files] ;
+ $self->{'MTK'} = $mTk;
+ my $tk = installed_tk();
+ my $perl = $self->{'PERL'};
+ if ($IsWin32 && !-f $perl && -f "$perl.exe")
+ {
+ print "perl=$perl X=$^X\n";
+ $perl = "$perl.exe";
+ $self->{'PERL'} = $perl;
+ }
+ foreach my $file (sort keys %$mTk)
+ {
+ unless (-f $file && -M $file < -M $mTk->{$file})
+ {
+ warn "Extracting $file\n";
+ system($perl,"$tk/pTk/Tcl-pTk",$mTk->{$file},$file);
+ }
+ }
+}
+
+my %visited;
+
+sub abspath
+{
+ my $dir = shift;
+ my $here = getcwd() || die "Cannot get current directory:$!";
+ if (chdir($dir))
+ {
+ $dir = getcwd();
+ chdir($here) || die "Cannot cd back to $here:$!";
+ }
+ return $dir;
+}
+
+sub relpath
+{
+ my ($path,$dir) = @_;
+ unless (defined $dir)
+ {
+ $dir = (-d $path) ? $path : dirname($path);
+ }
+ if (defined $dir and -d $dir)
+ {
+ if ($path =~ m#^\Q$dir\E([/\\]?.*)$#)
+ {
+ my $base = $1;
+ my $here = getcwd;
+ if ($here =~ m#^\Q$dir\E([/\\]?.*)#)
+ {
+ my $depth = reverse($1);
+ if ($depth)
+ {
+ $depth =~ s,[^/\\]+,..,g;
+ }
+ else
+ {
+ $depth = '.' ;
+ }
+ $depth =~ s,[/\\]+$,,;
+ $base =~ s,^[/\\]+,,;
+ $depth .= "/$base" if ($base);
+ if (-e $depth)
+ {
+ # print "$path is $depth from $here\n";
+ return $depth;
+ }
+ else
+ {
+ warn "Cannot find $depth\n";
+ }
+ }
+ else
+ {
+ unless(exists $visited{$here})
+ {
+ $visited{$here} = 1;
+ warn "$here does not start with $dir\n";
+ warn "i.e. building outside Tk itself\n";
+ }
+ }
+ }
+ else
+ {
+ die "'$path' not under '$dir'\n";
+ }
+ }
+ else
+ {
+ die "Cannot get directory for $path\n";
+ }
+ return $path;
+}
+
+use strict;
+
+sub upgrade_pic
+{
+ my $flags = '';
+ die 'upgrade_pic is obsolete';
+ return $flags;
+}
+
+sub pasthru
+{
+ my $self = shift;
+ my $str = $self->MM::pasthru;
+ if ($str =~ s/^\s+INC=.*\n//m)
+ {
+ $str = "# - Do NOT pasthru INC for Tk - it is computed by subdir\n$str"
+ }
+ if ($str =~ s/\bLIB="\$\(LIB\)"//)
+ {
+ $str = qq[# - Drop LIB="\$(LIB)" - not used\n$str];
+ }
+ $str = "#Tk::MMutil pasthru\n$str";
+ return $str;
+}
+
+sub perldepend
+{
+ my $self = shift;
+ my $str = $self->MM::perldepend;
+ my $name;
+ my %c;
+ foreach my $file (@{$self->{'C'}})
+ {
+ $c{$file} = 1;
+ }
+ foreach my $file (keys %{$self->{'XS'}})
+ {
+ $c{$file} = 1;
+ delete $c{$self->{'XS'}{$file}};
+ }
+ my @files = grep(-f $_,sort(keys %c));
+ if (@files)
+ {
+ my $tk = installed_tk();
+ my @inc = split(/\s+/,$self->{'INC'});
+ my @def = split(/\s+/,$self->{'DEFINE'});
+ push(@def,qw(-DWIN32 -D__WIN32__)) if ($IsWin32);
+ if ($^O eq 'cygwin')
+ {
+ push(@def,qw(-D__CYGWIN__));
+ if ($win_arch eq 'MSWin32')
+ {
+ push(@def,qw(-D__WIN32__)) unless $self->{'DEFINE'} =~ /-D__WIN32__/;
+ push(@def,qw(-DWIN32)) if $self->{'NAME'} eq 'Tk::pTk';
+ push(@def,qw(-dWINARCH_MSWIN32));
+ }
+ elsif ($win_arch eq 'x')
+ {
+ push(@def,qw(-U_WIN32));
+ push(@def,qw(-DWINARCH_X));
+ }
+ }
+ foreach (@inc)
+ {
+ s/\$\(TKDIR\)/$tk/g;
+ warn "Odd:$_" if /\$\(/;
+ }
+ $str .= Tk::MakeDepend::command_line(@inc,@def,@files) unless ($ENV{'TKNOMAKEDEPEND'});
+ }
+ return $str;
+}
+
+sub const_config
+{
+ my $self = shift;
+ my $name;
+ foreach $name (grep /(%|\.(old|bak|q4|orig|rej))$/,keys %{$self->{PM}})
+ {
+ delete $self->{PM}->{$name};
+ }
+ my $flags = $self->{'CCCDLFLAGS'};
+ $flags =~ s/(-[fK]?\s*)pic\b/${1}PIC/;
+ $self->{'CCCDLFLAGS'} = $flags;
+ if ($^O eq 'MSWin32' && $Config{'ccflags'} =~ /-DPERL_OBJECT/)
+ {
+ $self->{'LDFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g;
+ $self->{'LDDLFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g;
+ }
+ elsif ($^O eq 'darwin' )
+ {
+ $self->{'LDDLFLAGS'} =~ s/-flat_namespace//;
+ $self->{'LDDLFLAGS'} =~ s/-undefined\s+suppress//;
+## These lines seem to be not necessary for Panther, both
+## builds with and without shared libperl, and seem to
+## be dangerous for other MacOSX versions using perl builds
+## without shared libperl, so disabled completely.
+## See http://rt.cpan.org/Public/Bug/Display.html?id=39593
+# if ( -e "$Config{'archlib'}/CORE/$Config{'libperl'}" ) {
+# $self->{'LDDLFLAGS'} .= " -L\${PERL_ARCHLIB}/CORE -lperl ";
+# }
+# elsif ( -e "/System/Library/Perl/darwin/CORE/libperl.dylib" ) {
+# $self->{'LDDLFLAGS'} .= " -L/System/Library/Perl/darwin/CORE -lperl ";
+# }
+# else {
+# warn "Can't find libperl.dylib";
+# }
+ $self->{'LDFLAGS'} =~ s/-flat_namespace//;
+ $self->{'LDFLAGS'} =~ s/-undefined\s+suppress//;
+ } elsif ($^O =~ /(openbsd)/i)
+ {
+ # -Bforcearchive is bad news for Tk - we don't want all of libpTk.a in all .so-s.
+ $self->{'LDDLFLAGS'} =~ s/-Bforcearchive\s*//g;
+ }
+ return $self->MM::const_config;
+}
+
+sub constants
+{
+ my $self = shift;
+ local $_ = $self->MM::constants;
+ s/(\.SUFFIXES)/$1:\n$1/;
+ $_ .= "\nGCCOPT = $Tk::Config::gccopt\n";
+ if ($IsWin32)
+ {
+ }
+ $_;
+}
+
+sub cflags
+{
+ my $self = shift;
+ local $_ = $self->MM::cflags;
+ if (0 && $IsWin32)
+ {
+ if ($Config::Config{cc} =~ /^bcc/i) {
+ # s/(CCFLAGS\s*=)/$1/;
+ }
+ else {
+ s/(CCFLAGS\s*=)/$1 \$(cflags) \$(cvarsdll)/;
+ s/(OPTIMIZE\s*=).*/$1 \$(cdebug)/;
+ }
+ }
+ $_;
+}
+
+sub c_o
+{
+ my $self = shift;
+ local $_ = $self->MM::c_o;
+ s/\$\(DEFINE\)/\$(DEFINE) \$(GCCOPT)/g;
+ $_;
+}
+
+sub xs_o
+{
+ my $self = shift;
+ local $_ = $self->MM::xs_o;
+ s/\$\(DEFINE\)/\$(DEFINE) \$(GCCOPT)/g;
+ $_;
+}
+
+sub manifypods
+{
+ my $self = shift;
+ # Maybe always call UNIX version - we HTMLize them later
+ local $_ = $self->MM::manifypods;
+ if ($] >= 5.00565)
+ {
+ s/(POD2MAN_EXE.*pod2man.*)/$1 --center "perl\/Tk Documentation" --release "Tk\$(VERSION)"/;
+ }
+ elsif ($] >= 5.003)
+ {
+ s/(POD2MAN_EXE.*pod2man.*)/$1 -center "perl\/Tk Documentation" -release "Tk\$(VERSION)"/;
+ }
+ else
+ {
+ s/(POD2MAN_EXE.*pod2man.*)/$1 -center \\"perl\/Tk Documentation\\" -release \\"Tk\$(VERSION)\\"/;
+ }
+ s/\bpod::/Tk::/mg;
+ s/\bpTk:://mg;
+ $_;
+}
+
+sub findINC
+{
+ my $file = shift;
+ my $dir;
+ foreach $dir (@INC)
+ {
+ my $try = "$dir/$file";
+ return $try if (-f $try);
+ }
+ die "Cannot find $file in \@INC\n";
+}
+
+
+sub makefile
+{
+ my $self = shift;
+ my $str = $self->MM::makefile;
+ my $mm = findINC('Tk/MMutil.pm');
+ my $cf = findINC('Tk/Config.pm');
+ $str =~ s/(\$\(CONFIGDEP\))/$1 $cf $mm/;
+ $str =~ s/\$\(OBJECT\)\s*:.*\n//;
+ return $str;
+}
+
+sub installed_tk
+{
+ my $tk;
+ my $dir;
+ foreach $dir (@INC)
+ {
+ if (-f "$dir/tkGlue.h")
+ {
+ $tk = relpath($dir);
+ last;
+ }
+ my $try = "$dir/Tk";
+ if (-f "$try/tkGlue.h")
+ {
+ $tk = relpath($try,$dir);
+ last;
+ }
+ }
+ die "Cannot find perl/Tk include files\n" unless (defined $tk);
+ $tk =~ s,^(\./)+,,;
+ return $tk;
+}
+
+sub installbin
+{
+ my ($self) = @_;
+ my $str = $self->MM::installbin;
+ my $prog = 'perl'; # $self->{'MAP_TARGET'} || 'perl';
+ my $inc = findINC('Tk/MMutil.pm');
+ $inc =~ s,/Tk/MMutil.pm$,,;
+ $inc = relpath($inc);
+ $str =~ s/^\tcp\s/\t\$(PERL) -I$inc -MTk::install -e installbin $prog /mg;
+ return $str;
+}
+
+sub findpTk
+{
+ my $ptk;
+ my $dir;
+ foreach $dir (map(abspath($_),@_),@INC)
+ {
+ my $try = "$dir/pTk";
+ if (-d $try && (-f "$try/Lang.h" || -f "$try/libpTk\$(LIB_EXT)"))
+ {
+ $ptk = relpath($try,$dir);
+ last;
+ }
+ }
+ confess "Cannot locate pTk\n" unless (defined $ptk);
+ return $ptk;
+}
+
+sub find_subdir
+{
+ my %dir;
+ opendir(DIR,'.') || die "Cannot opendir:$!";
+ foreach my $dir (readdir(DIR))
+ {
+ next if $dir =~ /^\.\.?$/;
+ next if -l $dir;
+ next unless -d $dir;
+ if (-f "$dir/Makefile.PL")
+ {
+ my $exc = ($win_arch eq 'x') ? 'Unix' : 'Win';
+ if (-f "$dir/Not${exc}.exc")
+ {
+ warn "Skip $dir on $win_arch\n"
+ }
+ else
+ {
+ $dir{$dir} = 1
+ }
+ }
+ }
+ closedir(DIR);
+ return \%dir;
+}
+
+sub TkExtMakefile
+{
+ my (%att) = @_;
+ if ($Config{'ccflags'} =~ /-DPERL_OBJECT/)
+ {
+ $att{'CAPI'} = 'TRUE' unless exists $att{'CAPI'};
+ }
+ unless (exists $att{'DIR'})
+ {
+ my $dir = find_subdir();
+ $att{'DIR'} = [sort(keys %$dir)];
+ }
+ unless (exists $att{'NAME'})
+ {
+ my $dir = getcwd;
+ my ($pack) = $dir =~ m#/([^/]+)$#;
+ if (defined $pack)
+ {
+ $att{NAME} = 'Tk::'.$pack;
+ }
+ else
+ {
+ warn "No Name and cannot deduce from '$dir'";
+ }
+ }
+ my $tk = installed_tk();
+ $att{'macro'} = {} unless (exists $att{'macro'});
+ $att{'macro'}{'TKDIR'} = $tk;
+ my @opt = ('VERSION' => $Tk::Config::VERSION,
+ 'XS_VERSION' => $Tk::Config::VERSION);
+ push(@opt,'clean' => {} ) unless (exists $att{'clean'});
+ $att{'clean'}->{FILES} = '' unless (exists $att{'clean'}->{FILES});
+ $att{'clean'}->{FILES} .= ' *.bak';
+ unless (exists($att{'linkext'}) && $att{linkext}{LINKTYPE} eq '')
+ {
+ my $ptk = findpTk($tk);
+ my @tm = (findINC('Tk/typemap'));
+ unshift(@tm,@{$att{'TYPEMAPS'}}) if (exists $att{'TYPEMAPS'});
+ $att{'TYPEMAPS'} = \@tm;
+ my $i = delete ($att{'INC'});
+ $i = (defined $i) ? "$i $inc" : $inc;
+ if (delete $att{'dynamic_ptk'})
+ {
+ push(@opt,
+ 'MYEXTLIB' => "$ptk/libpTk\$(LIB_EXT)",
+# 'dynamic_lib' => { INST_DYNAMIC_DEP => "$ptk/libpTk\$(LIB_EXT)" }
+ );
+ }
+ # Several loadable widgets use things from -lm
+ # if platform does not have a shared -lm need to link against it
+ if ($Config{libs} =~/-lm\b/)
+ {
+ my $libs = $att{'LIBS'}->[0];
+ $att{'LIBS'}->[0] = "$libs -lm" unless $libs =~ /-lm\b/;
+ }
+ if ($IsWin32 && $Config{'cc'} =~ /^bcc/)
+ {
+ # Borland compiler is very dumb at finding files
+ $i = "-I$tk $i";
+ $i = "-I$ptk $i";
+ }
+ if ($IsWin32 && $Config{'cc'} =~ /^gcc/i)
+ {
+ my $base = $Config{'libpth'};
+ #$base =~ s#lib$#i386-mingw32/lib#;
+ my $extra = "-L$base -limm32 -lcomctl32 -lcomdlg32 -lgdi32";
+ my $libs = $att{'LIBS'}->[0];
+ $att{'LIBS'}->[0] = "$extra $libs";
+ }
+ if ($^O eq 'cygwin')
+ {
+ # NOTE: use gcc -shared instead of dllwrap (ld2),
+ # dllwrap tries to resolve all symbols, even those
+ # that are brought in from libraries like libpTk.a
+ push(@opt,'LD' => 'gcc -shared');
+ if ($win_arch eq 'MSWin32')
+ {
+ my $extra = "-L/lib/w32api -limm32 -lcomctl32 -lcomdlg32 -lgdi32";
+ my $libs = $att{'LIBS'}->[0];
+ $att{'LIBS'}->[0] = "$extra $libs";
+ $att{'DEFINE'} .= ' -D__WIN32__ -D_WIN32 -DWINARCH_MSWIN32';
+ $att{'DEFINE'} .= ' -DWIN32' if($att{'NAME'} eq 'Tk::pTk');
+ }
+ elsif ($win_arch eq 'x')
+ {
+ $att{'DEFINE'} .= ' -U_WIN32 -DWINARCH_X';
+ }
+ }
+ if (delete $att{'ptk_include'})
+ {
+ $i = "-I$ptk $i" unless ($ptk eq '.');
+ }
+ else
+ {
+ $i = "-I$tk $i" unless ($tk eq '.');
+ }
+ push(@opt,'DEFINE' => $define, 'INC' => $i);
+ }
+ WriteMakefile(@opt, %att);
+}
+
+sub import
+{
+ no strict 'refs';
+ my $class = shift;
+ my @list = (@_) ? @_ : @{"${class}::MYEXPORT"};
+ my $name;
+ foreach $name (@list)
+ {
+ *{"MY::$name"} = \&{"$name"};
+ }
+}
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/MainWindow.pm b/Master/tlpkg/tlperl/lib/Tk/MainWindow.pm
new file mode 100644
index 00000000000..5dc08d027d7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/MainWindow.pm
@@ -0,0 +1,212 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::MainWindow;
+use base qw(Tk::Toplevel);
+BEGIN { @MainWindow::ISA = 'Tk::MainWindow' }
+
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.014'; # was: sprintf '4.%03d', q$Revision: #12 $ =~ /\D(\d+)\s*$/;
+
+use Tk::CmdLine;
+use Tk qw(catch);
+require Tk::Toplevel;
+
+use Carp;
+
+$| = 1;
+
+my $pid = $$;
+
+my %Windows = ();
+
+sub CreateArgs
+{
+ my ($class,$args) = @_;
+ my $cmd = Tk::CmdLine->CreateArgs();
+ my $key;
+ foreach $key (keys %$cmd)
+ {
+ $args->{$key} = $cmd->{$key} unless exists $args->{$key};
+ }
+ my %result = $class->SUPER::CreateArgs(undef,$args);
+ my $name = delete($args->{'-name'});
+ unless (Tk::tainting)
+ {
+ $ENV{'DISPLAY'} = ':0' unless (exists $ENV{'DISPLAY'});
+ $result{'-screen'} = $ENV{'DISPLAY'} unless exists $result{'-screen'};
+ }
+ return (-name => "\l$name",%result);
+}
+
+sub new
+{
+ my $package = shift;
+ if (@_ > 0 && $_[0] =~ /:\d+(\.\d+)?$/)
+ {
+ carp "Usage $package->new(-screen => '$_[0]' ...)" if $^W;
+ unshift(@_,'-screen');
+ }
+ croak('Odd number of args'."$package->new(" . join(',',@_) .')') if @_ % 2;
+ my %args = @_;
+
+ my $top = eval { bless Create($package->CreateArgs(\%args)), $package };
+ croak($@ . "$package->new(" . join(',',@_) .')') if ($@);
+ $top->apply_command_line;
+ $top->InitBindings;
+ $top->SetBindtags;
+ $top->InitObject(\%args);
+ eval { $top->configure(%args) };
+ croak "$@" if ($@);
+ if (($top->positionfrom||'') ne 'user' and ($top->sizefrom||'') ne 'user') {
+ my $geometry = $top->optionGet(qw(geometry Geometry));
+ if ($geometry) {
+ $top->geometry($geometry);
+ }
+ }
+ $Windows{$top} = $top;
+ return $top;
+}
+
+sub _Destroyed
+{
+ my $top = shift;
+ $top->SUPER::_Destroyed;
+ delete $Windows{$top};
+}
+
+sub InitBindings
+{
+ my $mw = shift;
+ $mw->bind('all','<Tab>','focusNext');
+ # <<LeftTab>> is named <<PrevWindow>> in Tcl/Tk
+ $mw->eventAdd(qw[<<LeftTab>> <Shift-Tab>]);
+ # This is needed for XFree86 systems
+ catch { $mw->eventAdd(qw[<<LeftTab>> <ISO_Left_Tab>]) };
+ # This seems to be correct on *some* HP systems.
+ catch { $mw->eventAdd(qw[<<LeftTab>> <hpBackTab>]) };
+ $mw->bind('all','<<LeftTab>>','focusPrev');
+ if ($mw->windowingsystem eq 'x11')
+ {
+ $mw->eventAdd(qw[<<Cut>> <Control-Key-x> <Lock-Control-Key-X> <Key-F20> <Meta-Key-w>]);
+ $mw->eventAdd(qw[<<Copy>> <Control-Key-c> <Lock-Control-Key-C> <Key-F16> <Control-Key-w>]);
+ $mw->eventAdd(qw[<<Paste>> <Control-Key-v> <Lock-Control-Key-V> <Key-F18> <Control-Key-y>]);
+ $mw->eventAdd(qw[<<PasteSelection>> <ButtonRelease-2>]);
+ $mw->eventAdd(qw[<<Undo>> <Control-Key-z> <Key-Undo> <Key-F14>
+ <Control-Key-underscore>]);
+ $mw->eventAdd(qw[<<Redo>> <Control-Key-y> <Shift-Key-Undo> <Key-F12> <Shift-Key-F14>]);
+ }
+ elsif ($mw->windowingsystem eq 'win32')
+ {
+ $mw->eventAdd(qw[<<Cut>> <Control-Key-x> <Shift-Key-Delete>]);
+ $mw->eventAdd(qw[<<Copy>> <Control-Key-c> <Control-Key-Insert>]);
+ $mw->eventAdd(qw[<<Paste>> <Control-Key-v> <Shift-Key-Insert>]);
+ $mw->eventAdd(qw[<<Undo>> <Control-Key-z>]);
+ $mw->eventAdd(qw[<<Redo>> <Control-Key-y>]);
+ }
+ elsif ($mw->windowingsystem eq 'aqua')
+ {
+ $mw->eventAdd(qw[<<Cut>> <Command-Key-x> <Key-F2>]);
+ $mw->eventAdd(qw[<<Copy>> <Command-Key-c> <Key-F3>]);
+ $mw->eventAdd(qw[<<Paste>> <Command-Key-v> <Key-F4>]);
+ $mw->eventAdd(qw[<<PasteSelection>> <ButtonRelease-2>]);
+ $mw->eventAdd(qw[<<Clear>> <Clear>]);
+ $mw->eventAdd(qw[<<Undo>> <Command-Key-z>]);
+ $mw->eventAdd(qw[<<Redo>> <Command-Key-y>]);
+ }
+ elsif ($mw->windowingsystem eq 'classic')
+ {
+ $mw->eventAdd(qw[<<Cut>> <Control-Key-x> <Key-F2>]);
+ $mw->eventAdd(qw[<<Copy>> <Control-Key-c> <Key-F3>]);
+ $mw->eventAdd(qw[<<Paste>> <Control-Key-v> <Key-F4>]);
+ $mw->eventAdd(qw[<<PasteSelection>> <ButtonRelease-2>]);
+ $mw->eventAdd(qw[<<Clear>> <Clear>]);
+ $mw->eventAdd(qw[<<Undo>> <Control-Key-z> <Key-F1>]);
+ $mw->eventAdd(qw[<<Redo>> <Control-Key-Z>]);
+ }
+
+ # FIXME - Should these move to Menubutton ?
+ my $c = ($Tk::platform eq 'unix') ? 'all' : 'Tk::Menubutton';
+ $mw->bind($c,'<Alt-KeyPress>',['TraverseToMenu',Tk::Ev('K')]);
+ $mw->bind($c,'<F10>','FirstMenu');
+}
+
+sub Existing
+{
+ my @Windows;
+ foreach my $name (keys %Windows)
+ {
+ my $obj = $Windows{$name};
+ if (Tk::Exists($obj))
+ {
+ push(@Windows,$obj);
+ }
+ else
+ {
+ delete $Windows{$name};
+ }
+ }
+ return @Windows;
+}
+
+END
+{
+ if (Tk::IsParentProcess())
+ {
+ foreach my $top (values %Windows)
+ {
+ if ($top->IsWidget)
+ {
+ # Tk data structuctures are still in place
+ # this can occur if non-callback perl code did a 'die'.
+ # It will also handle some cases of non-Tk 'exit' being called
+ # Destroy this mainwindow and hence is descendants ...
+ $top->destroy;
+ }
+ }
+ }
+}
+
+sub CmdLine { return shift->command }
+
+sub WMSaveYourself
+{
+ my $mw = shift;
+ my @args = @{$mw->command};
+# warn 'preWMSaveYourself:'.join(' ',@args)."\n";
+ @args = ($0) unless (@args);
+ my $i = 1;
+ while ($i < @args)
+ {
+ if ($args[$i] eq '-iconic')
+ {
+ splice(@args,$i,1);
+ }
+ elsif ($args[$i] =~ /^-(geometry|iconposition)$/)
+ {
+ splice(@args,$i,2);
+ }
+ }
+
+ my @ip = $mw->wm('iconposition');
+# print 'ip ',join(',',@ip),"\n";
+ my $icon = $mw->iconwindow;
+ if (defined($icon))
+ {
+ @ip = $icon->geometry =~ /\d+x\d+([+-]\d+)([+-]\d+)/;
+ }
+ splice(@args,1,0,'-iconposition' => join(',',@ip)) if (@ip == 2);
+
+ splice(@args,1,0,'-iconic') if ($mw->state() eq 'iconic');
+
+ splice(@args,1,0,'-geometry' => $mw->geometry);
+# warn 'postWMSaveYourself:'.join(' ',@args)."\n";
+ $mw->command([@args]);
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/MainWindow.pod b/Master/tlpkg/tlperl/lib/Tk/MainWindow.pod
new file mode 100644
index 00000000000..565658adc1d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/MainWindow.pod
@@ -0,0 +1,85 @@
+
+=head1 NAME
+
+Tk::MainWindow - Root widget of a widget tree
+
+=for pm Tk/MainWindow.pm
+
+=for category Creating and Configuring Widgets
+
+=head1 SYNOPSIS
+
+ use Tk;
+
+ my $mw = MainWindow->new( ... options ... );
+
+ my $this = $mw->ThisWidget -> pack ;
+ my $that = $mw->ThatWidget;
+ ...
+
+ MainLoop;
+
+=head1 DESCRIPTION
+
+Perl/Tk applications (which have windows associated with them) create
+one or more B<MainWindow>s which act as the containers and parents
+of the other widgets.
+
+B<Tk::MainWindow> is a special kind of L<Toplevel|Tk::Toplevel> widget. It is
+the root of a widget tree. Therefore C<$mw-E<gt>Parent> returns
+C<undef>.
+
+The default title of a MainWindow is the basename of the script
+(actually the Class name used for options lookup, i.e. with basename
+with inital caps) or 'Ptk' as the fallback value. If more than one MainWindow is created
+or several instances of the script are running at the same time the
+string C<" #n"> is appended where the number C<n> is set to get
+a unique value.
+
+Unlike the standard Tcl/Tk's wish, perl/Tk allows you to create
+several MainWindows. When the I<last> B<MainWindow> is destroyed
+the Tk eventloop exits (the eventloop is entered with the call of
+C<MainLoop>). Various resources (bindings, fonts, images, colors) are
+maintained or cached for each MainWindow, so each MainWindow consumes more
+resources than a Toplevel. However multiple MainWindows can make sense when
+the user can destroy them independently.
+
+=head1 METHODS
+
+You can apply all methods that a L<Toplevel|Tk::Toplevel> widget accepts.
+
+The method I<$w>-E<gt>B<MainWindow> applied to any widget will return the
+B<MainWindow> to which the widget belongs (the MainWindow belongs to itself).
+
+=head1 MISSING
+
+Documentation is incomplete.
+Here are I<some> missing items that should be explained in
+more detail:
+
+=over 4
+
+=item *
+
+The new mechanism for MainWindows is slightly different to
+other widgets.
+
+=item *
+
+There no explanation about what resources are bound
+to a MainWindow (e.g., ClassInit done per MainWindow)
+
+=item *
+
+Passing of command line options to override or augment
+arguments of the C<new> method (see L<Tk::CmdLine>).
+
+=back
+
+=head1 SEE ALSO
+
+L<Tk::Toplevel|Tk::Toplevel>
+L<Tk::CmdLine|Tk::CmdLine>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/MakeDepend.pm b/Master/tlpkg/tlperl/lib/Tk/MakeDepend.pm
new file mode 100644
index 00000000000..3c3cba71c09
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/MakeDepend.pm
@@ -0,0 +1,293 @@
+package Tk::MakeDepend;
+use strict;
+use vars qw(%define);
+use Config;
+
+my @include;
+
+use Carp;
+
+$SIG{__DIE__} = \&Carp::confess;
+
+
+use vars qw($VERSION);
+#$VERSION = sprintf '4.%03d', q$Revision: #13 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.014';
+
+sub scan_file;
+
+sub do_include
+{
+ my ($inc,$dep,@include) = @_;
+ foreach my $dir (@include)
+ {
+ my $path = "$dir/$inc";
+ if (-f $path)
+ {
+ scan_file($path,$dep) unless exists $dep->{$path};
+ return;
+ }
+ }
+ warn "Cannot find '$inc' assume made\n";
+ $dep->{$inc} = 1;
+}
+
+sub remove_comment
+{
+ s#^\s*/\*.*?\*/\s*##g;
+}
+
+
+sub term
+{
+ remove_comment();
+ return !term() if s/^\s*!//;
+ return exists($define{$1}) if s/^\s*defined\s*\(([_A-Za-z][_\w]*)\s*\)//;
+ return exists($define{$1}) if s/^\s*defined\s*([_A-Za-z][_\w]*)//;
+ return eval "$1" if s/^\s*(0x[0-9a-f]+)L?//i;
+ return $1 if s/^\s*(\d+)L?//;
+ return $define{$1} || 0 if s/^\s*([_A-Za-z][_\w]*)//;
+ if (s/^\s*\(//)
+ {
+ my $val = expression(0);
+ warn "Missing ')'\n" unless s/^\s*\)//;
+ return $val;
+ }
+ warn "Invalid term:$_";
+ return undef;
+}
+
+my %pri = ( '&&' => 4,
+ '||' => 3,
+ '>=' => 2, '<=' => 2, '<' => 2, '>' => 2,
+ '==' => 1, '!=' => 1 );
+
+sub expression
+{
+ my $pri = shift;
+ # printf STDERR "%d# expr . $_\n";
+ my $invert = 0;
+ my $lhs = term() || 0;
+ remove_comment();
+ while (/^\s*(&&|\|\||>=?|<=?|==|!=)/)
+ {
+ my $op = $1;
+ last unless ($pri{$op} >= $pri);
+ s/^\s*\Q$op\E//;
+ # printf STDERR "%d# $lhs $op . $_\n";
+ my $rhs = expression($pri{$op}) || 0;
+ my $e = "$lhs $op $rhs";
+ $lhs = eval "$e" || 0;
+ die "'$e' $@" if $@;
+ remove_comment();
+ }
+ return $lhs;
+}
+
+sub do_if
+{
+ my ($key,$expr) = @_;
+ chomp($expr);
+ if ($key eq 'ifdef' || $key eq 'ifndef')
+ {
+ if ($expr =~ /^\s*(\w+)/)
+ {
+ my $val = exists $define{$1};
+ $val = !$val if ($key eq 'ifndef');
+# printf STDERR "%d from $key $expr\n",$val;
+ return $val;
+ }
+ }
+ else
+ {
+ local $_ = $expr;
+ my $val = expression(0) != 0;
+ warn "trailing: $_" if /\S/;
+ #printf STDERR "%d from $key $expr\n",$val;
+ return $val;
+ }
+}
+
+sub scan_file
+{
+ no strict 'refs';
+ my ($file,$dep) = @_;
+ open($file,"<$file") || die "Cannot open $file:$!";
+ local $_;
+ my ($srcdir) = $file =~ m#^(.*)[\\/][^\\/]*$#;
+ $srcdir = '.' unless defined $srcdir;
+ my $live = 1;
+ $dep->{$file} = 1;
+ my @stack;
+ while (<$file>)
+ {
+ $_ .= <$file> while (s/\\\n/ /);
+ if (/^\s*#\s*(\w+)\s*(.*?)\s*$/)
+ {
+ my $ol = $live;
+ my $key = $1;
+ my $rest = $2;
+ if ($key =~ /^if(.*)$/)
+ {
+ push(@stack,$live);
+ $live &&= do_if($key,$rest);
+ }
+ elsif ($key eq 'elif')
+ {
+ $live = ($live) ? 0 : $stack[-1];
+ $live &&= do_if('if',$rest);
+ }
+ elsif ($key eq 'else')
+ {
+ $live = ($live) ? 0 : $stack[-1];
+ }
+ elsif ($key eq 'endif')
+ {
+ if (@stack)
+ {
+ $live = pop(@stack);
+ }
+ else
+ {
+ die "$file:$.: Mismatched #endif\n";
+ }
+ }
+ elsif ($live)
+ {
+ if ($key eq 'include')
+ {
+ do_include($1,$dep,$srcdir,@include) if $rest =~ /^"(.*)"/;
+ }
+ elsif ($key eq 'define')
+ {
+ if ($rest =~ /^\s*([_A-Za-z][\w_]*)\s*(.*)$/)
+ {
+ my $sym = $1;
+ my $val = $2 || 1;
+ $val =~ s#\s*/\*.*?\*/\s*# #g;
+ $define{$sym} = $val;
+ }
+ else
+ {
+ warn "ignore '$key $rest'\n";
+ }
+ }
+ elsif ($key eq 'undef')
+ {
+ if ($rest =~ /^\s*([_A-Za-z][\w_]*)/)
+ {
+ delete $define{$1};
+ }
+ }
+ elsif ($key =~ /^(line|pragma)$/)
+ {
+
+ }
+ else
+ {
+ warn "ignore '$key $rest'\n";
+ }
+ }
+ # printf STDERR "$file:$.: %d $key $rest\n",$live if ($ol != $live);
+ }
+ else
+ {
+ # print if $live;
+ }
+ }
+ close($file);
+ if (@stack)
+ {
+ warn "$file:$.: unclosed #if\n";
+ }
+}
+
+sub command_line
+{
+ @include = ();
+ local %define = ('__STDC__' => 1 );
+ my $data = '';
+ my @files;
+ while (@_ && $_[-1] !~ /^-/)
+ {
+ unshift(@files,pop(@_));
+ }
+ my $flags = $Config{ccflags};
+ $flags =~ s/^\s+|\s+$//g;
+ my @opt = (@_, split(/\s+/,$flags));
+ while (@opt)
+ {
+ local $_ = shift(@opt);
+ if (/^-I(.*)$/)
+ {
+ push @include,$1;
+ }
+ elsif (/^-D([^=]+)(?:=(.*))?$/)
+ {
+ $define{$1} = $2 || 1;
+ }
+ elsif (/^-U(.*)$/)
+ {
+ delete $define{$1};
+ }
+ elsif (/^(-.*)$/)
+ {
+ # Some option
+ if ($opt[0] !~ /^-/)
+ {
+ # next arg does not start with '-' assume it
+ # belongs to this option and discard it silently
+ shift(@opt);
+ }
+ }
+ else
+ {
+ # We got confused
+ warn "Ignoring $1\n";
+ }
+ }
+ # force /usr/include to be last element of @include
+ push @include, $Config{'usrinc'}
+ if (defined $Config{'usrinc'} and $Config{'usrinc'} ne '');
+ # warn "Include:@include\n";
+ while (@files)
+ {
+ local $_ = shift(@files);
+ unless (/^(.*)\.[^\.]+$/)
+ {
+ warn "Skip $_";
+ next;
+ }
+ local %define = %define;
+ my $base = $1;
+ my $file = $_;
+ my %dep;
+ warn "Finding dependencies for $file\n";
+ scan_file($_,\%dep);
+ my $str = "\n$base\$(OBJ_EXT) : $base.c";
+ delete $dep{$file};
+ my @dep = (sort(keys %dep));
+ while (@dep)
+ {
+ my $dep = shift(@dep);
+ $dep =~ s#^\./##;
+ if (length($str)+length($dep) > 70)
+ {
+ $data .= "$str \\\n";
+ $str = ' ';
+ }
+ else
+ {
+ $str .= ' ';
+ }
+ $str .= $dep;
+ }
+ $data .= "$str\n";
+ }
+ return $data;
+}
+
+1;
+__END__
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Menu.pm b/Master/tlpkg/tlperl/lib/Tk/Menu.pm
new file mode 100644
index 00000000000..98ef0f71800
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Menu.pm
@@ -0,0 +1,1201 @@
+# Converted from menu.tcl --
+#
+# This file defines the default bindings for Tk menus and menubuttons.
+# It also implements keyboard traversal of menus and implements a few
+# other utility procedures related to menus.
+#
+# @(#) menu.tcl 1.34 94/12/19 17:09:09
+#
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+package Tk::Menu;
+require Tk;
+require Tk::Widget;
+require Tk::Wm;
+require Tk::Derived;
+require Tk::Menu::Item;
+
+
+use vars qw($VERSION);
+$VERSION = '4.023'; # was: sprintf '4.%03d', q$Revision: #21 $ =~ /\D(\d+)\s*$/;
+
+use strict;
+
+use base qw(Tk::Wm Tk::Derived Tk::Widget);
+
+Construct Tk::Widget 'Menu';
+
+sub Tk_cmd { \&Tk::_menu }
+
+Tk::Methods('activate','add','clone','delete','entrycget','entryconfigure',
+ 'index','insert','invoke','post','postcascade','type',
+ 'unpost','yposition');
+
+import Tk qw(Ev);
+
+sub CreateArgs
+{
+ my ($package,$parent,$args) = @_;
+ # Remove from hash %$args any configure-like
+ # options which only apply at create time (e.g. -class for Frame)
+ # return these as a list of -key => value pairs
+ my @result = ();
+ my $opt;
+ foreach $opt (qw(-type -screen -visual -colormap))
+ {
+ my $val = delete $args->{$opt};
+ push(@result, $opt => $val) if (defined $val);
+ }
+ return @result;
+}
+
+sub InitObject
+{
+ my ($menu,$args) = @_;
+ my $menuitems = delete $args->{-menuitems};
+ $menu->SUPER::InitObject($args);
+ $menu->ConfigSpecs(-foreground => ['SELF']);
+ if (defined $menuitems)
+ {
+ # If any other args do configure now
+ if (%$args)
+ {
+ $menu->configure(%$args);
+ %$args = ();
+ }
+ $menu->AddItems(@$menuitems)
+ }
+}
+
+sub AddItems
+{
+ my $menu = shift;
+ ITEM:
+ while (@_)
+ {
+ my $item = shift;
+ if (!ref($item))
+ {
+ $menu->separator; # A separator
+ }
+ else
+ {
+ my ($kind,$name,%minfo) = ( @$item );
+ my $invoke = delete $minfo{'-invoke'};
+ if (defined $name)
+ {
+ $minfo{-label} = $name unless defined($minfo{-label});
+ $menu->$kind(%minfo);
+ }
+ else
+ {
+ $menu->BackTrace("Don't recognize " . join(' ',@$item));
+ }
+ } # A non-separator
+ }
+}
+
+#
+#-------------------------------------------------------------------------
+# Elements of tkPriv that are used in this file:
+#
+# cursor - Saves the -cursor option for the posted menubutton.
+# focus - Saves the focus during a menu selection operation.
+# Focus gets restored here when the menu is unposted.
+# inMenubutton - The name of the menubutton widget containing
+# the mouse, or an empty string if the mouse is
+# not over any menubutton.
+# popup - If a menu has been popped up via tk_popup, this
+# gives the name of the menu. Otherwise this
+# value is empty.
+# postedMb - Name of the menubutton whose menu is currently
+# posted, or an empty string if nothing is posted
+# A grab is set on this widget.
+# relief - Used to save the original relief of the current
+# menubutton.
+# window - When the mouse is over a menu, this holds the
+# name of the menu; it's cleared when the mouse
+# leaves the menu.
+#-------------------------------------------------------------------------
+#-------------------------------------------------------------------------
+# Overall note:
+# This file is tricky because there are four different ways that menus
+# can be used:
+#
+# 1. As a pulldown from a menubutton. This is the most common usage.
+# In this style, the variable tkPriv(postedMb) identifies the posted
+# menubutton.
+# 2. As a torn-off menu copied from some other menu. In this style
+# tkPriv(postedMb) is empty, and the top-level menu is no
+# override-redirect.
+# 3. As an option menu, triggered from an option menubutton. In thi
+# style tkPriv(postedMb) identifies the posted menubutton.
+# 4. As a popup menu. In this style tkPriv(postedMb) is empty and
+# the top-level menu is override-redirect.
+#
+# The various binding procedures use the state described above to
+# distinguish the various cases and take different actions in each
+# case.
+#-------------------------------------------------------------------------
+# Bind --
+# This procedure is invoked the first time the mouse enters a menubutton
+# widget or a menubutton widget receives the input focus. It creates
+# all of the class bindings for both menubuttons and menus.
+#
+# Arguments:
+# w - The widget that was just entered or just received
+# the input focus.
+# event - Indicates which event caused the procedure to be invoked
+# (Enter or FocusIn). It is used so that we can carry out
+# the functions of that event in addition to setting up
+# bindings.
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ # Must set focus when mouse enters a menu, in order to allow
+ # mixed-mode processing using both the mouse and the keyboard.
+ $mw->bind($class,'<FocusIn>', 'NoOp');
+ $mw->bind($class,'<Enter>', 'Enter');
+ $mw->bind($class,'<Leave>', ['Leave',Ev('X'),Ev('Y'),Ev('s')]);
+ $mw->bind($class,'<Motion>', ['Motion',Ev('x'),Ev('y'),Ev('s')]);
+ $mw->bind($class,'<ButtonPress>','ButtonDown');
+ $mw->bind($class,'<ButtonRelease>',['Invoke',1]);
+ $mw->bind($class,'<space>',['Invoke',0]);
+ $mw->bind($class,'<Return>',['Invoke',0]);
+ $mw->bind($class,'<Escape>','Escape');
+ $mw->bind($class,'<Left>','LeftArrow');
+ $mw->bind($class,'<Right>','RightArrow');
+ $mw->bind($class,'<Up>','UpArrow');
+ $mw->bind($class,'<Down>','DownArrow');
+ $mw->bind($class,'<KeyPress>', ['TraverseWithinMenu',Ev('K')]);
+ $mw->bind($class,'<Alt-KeyPress>', ['TraverseWithinMenu',Ev('K')]);
+ return $class;
+}
+
+sub UpArrow
+{
+ my $menu = shift;
+ if ($menu->cget('-type') eq 'menubar')
+ {
+ $menu->NextMenu('left');
+ }
+ else
+ {
+ $menu->NextEntry(-1);
+ }
+}
+
+sub DownArrow
+{
+ my $menu = shift;
+ if ($menu->cget('-type') eq 'menubar')
+ {
+ $menu->NextMenu('right');
+ }
+ else
+ {
+ $menu->NextEntry(1);
+ }
+}
+
+sub LeftArrow
+{
+ my $menu = shift;
+ if ($menu->cget('-type') eq 'menubar')
+ {
+ $menu->NextEntry(-1);
+ }
+ else
+ {
+ $menu->NextMenu('left');
+ }
+}
+
+sub RightArrow
+{
+ my $menu = shift;
+ if ($menu->cget('-type') eq 'menubar')
+ {
+ $menu->NextEntry(1);
+ }
+ else
+ {
+ $menu->NextMenu('right');
+ }
+}
+
+
+
+# Unpost --
+# This procedure unposts a given menu, plus all of its ancestors up
+# to (and including) a menubutton, if any. It also restores various
+# values to what they were before the menu was posted, and releases
+# a grab if there's a menubutton involved. Special notes:
+# 1. It's important to unpost all menus before releasing the grab, so
+# that any Enter-Leave events (e.g. from menu back to main
+# application) have mode NotifyGrab.
+# 2. Be sure to enclose various groups of commands in "catch" so that
+# the procedure will complete even if the menubutton or the menu
+# or the grab window has been deleted.
+#
+# Arguments:
+# menu - Name of a menu to unpost. Ignored if there
+# is a posted menubutton.
+sub Unpost
+{
+ my $menu = shift;
+ my $mb = $Tk::postedMb;
+
+ # Restore focus right away (otherwise X will take focus away when
+ # the menu is unmapped and under some window managers (e.g. olvwm)
+ # we'll lose the focus completely).
+
+ eval {local $SIG{__DIE__}; $Tk::focus->focus() } if (defined $Tk::focus);
+ undef $Tk::focus;
+
+ # Unpost menu(s) and restore some stuff that's dependent on
+ # what was posted.
+ eval {local $SIG{__DIE__};
+ if (defined $mb)
+ {
+ $menu = $mb->cget('-menu');
+ $menu->unpost();
+ $Tk::postedMb = undef;
+ $mb->configure('-cursor',$Tk::cursor);
+ $mb->configure('-relief',$Tk::relief)
+ }
+ elsif (defined $Tk::popup)
+ {
+ $Tk::popup->unpost();
+ my $grab = $Tk::popup->grabCurrent;
+ $grab->grabRelease if (defined $grab);
+
+ undef $Tk::popup;
+ }
+ elsif (defined $menu && ref $menu &&
+ $menu->cget('-type') ne 'menubar' &&
+ $menu->cget('-type') ne 'tearoff'
+ )
+ {
+ # We're in a cascaded sub-menu from a torn-off menu or popup.
+ # Unpost all the menus up to the toplevel one (but not
+ # including the top-level torn-off one) and deactivate the
+ # top-level torn off menu if there is one.
+ while (1)
+ {
+ my $parent = $menu->parent;
+ last if (!$parent->IsMenu || !$parent->ismapped);
+ $parent->postcascade('none');
+ $parent->GenerateMenuSelect;
+ $parent->activate('none');
+ my $type = $parent->cget('-type');
+ last if ($type eq 'menubar' || $type eq 'tearoff');
+ $menu = $parent
+ }
+ $menu->unpost() if ($menu->cget('-type') ne 'menubar');
+ }
+ };
+ warn "$@" if ($@);
+ if ($Tk::tearoff || $Tk::menubar)
+ {
+ # Release grab, if any.
+ if (defined $menu && ref $menu)
+ {
+ my $grab = $menu->grabCurrent;
+ $grab->grabRelease if (defined $grab);
+ }
+ RestoreOldGrab();
+ if ($Tk::menubar)
+ {
+ $Tk::menubar->configure(-cursor => $Tk::cursor);
+ undef $Tk::menubar;
+ }
+ if ($Tk::platform ne 'unix')
+ {
+ undef $Tk::tearoff;
+ }
+ }
+}
+
+sub RestoreOldGrab
+{
+ if (defined $Tk::oldGrab)
+ {
+ eval
+ {
+ local $SIG{__DIE__};
+ if ($Tk::grabStatus eq 'global')
+ {
+ $Tk::oldGrab->grabGlobal;
+ }
+ else
+ {
+ $Tk::oldGrab->grab;
+ }
+ };
+ undef $Tk::oldGrab;
+ }
+}
+
+sub typeIS
+{my $w = shift;
+ my $type = $w->type(shift);
+ return defined $type && $type eq shift;
+}
+
+# Motion --
+# This procedure is called to handle mouse motion events for menus.
+# It does two things. First, it resets the active element in the
+# menu, if the mouse is over the menu. Second, if a mouse button
+# is down, it posts and unposts cascade entries to match the mouse
+# position.
+#
+# Arguments:
+# menu - The menu window.
+# y - The y position of the mouse.
+# state - Modifier state (tells whether buttons are down).
+sub Motion
+{
+ my $menu = shift;
+ my $x = shift;
+ my $y = shift;
+ my $state = shift;
+ my $t = $menu->cget('-type');
+
+ if ($menu->IS($Tk::window))
+ {
+ if ($menu->cget('-type') eq 'menubar')
+ {
+# if (defined($Tk::focus) && $Tk::focus != $menu)
+ {
+ $menu->activate("\@$x,$y");
+ $menu->GenerateMenuSelect;
+ }
+ }
+ else
+ {
+ $menu->activate("\@$x,$y");
+ $menu->GenerateMenuSelect;
+ }
+ }
+ if (($state & 0x1f00) != 0)
+ {
+ $menu->postcascade('active')
+ }
+}
+# ButtonDown --
+# Handles button presses in menus. There are a couple of tricky things
+# here:
+# 1. Change the posted cascade entry (if any) to match the mouse position.
+# 2. If there is a posted menubutton, must grab to the menubutton so
+# that it can track mouse motions over other menubuttons and change
+# the posted menu.
+# 3. If there's no posted menubutton (e.g. because we're a torn-off menu
+# or one of its descendants) must grab to the top-level menu so that
+# we can track mouse motions across the entire menu hierarchy.
+
+#
+# Arguments:
+# menu - The menu window.
+sub ButtonDown
+{
+ my $menu = shift;
+ return if (!$menu->viewable);
+ $menu->postcascade('active');
+ if (defined $Tk::postedMb && $Tk::postedMb->viewable)
+ {
+ $Tk::postedMb->grabGlobal
+ }
+ else
+ {
+ while ($menu->cget('-type') eq 'normal'
+ && $menu->parent->IsMenu
+ && $menu->parent->ismapped
+ )
+ {
+ $menu = $menu->parent;
+ }
+
+ if (!defined $Tk::menuBar)
+ {
+ $Tk::menuBar = $menu;
+ $Tk::cursor = $menu->cget('-cursor');
+ $menu->configure(-cursor => 'arrow');
+ }
+
+ # Don't update grab information if the grab window isn't changing.
+ # Otherwise, we'll get an error when we unpost the menus and
+ # restore the grab, since the old grab window will not be viewable
+ # anymore.
+
+ $menu->SaveGrabInfo unless ($menu->IS($menu->grabCurrent));
+
+ # Must re-grab even if the grab window hasn't changed, in order
+ # to release the implicit grab from the button press.
+
+ $menu->grabGlobal if ($Tk::platform eq 'unix');
+ }
+}
+
+sub Enter
+{
+ my $w = shift;
+ my $ev = $w->XEvent;
+ $Tk::window = $w;
+ if ($w->cget('-type') eq 'tearoff')
+ {
+ if ($ev->m ne 'NotifyUngrab')
+ {
+ $w->SetFocus if ($Tk::platform eq 'unix');
+ }
+ }
+ $w->Motion($ev->x, $ev->y, $ev->s);
+}
+
+# Leave --
+# This procedure is invoked to handle Leave events for a menu. It
+# deactivates everything unless the active element is a cascade element
+# and the mouse is now over the submenu.
+#
+# Arguments:
+# menu - The menu window.
+# rootx, rooty - Root coordinates of mouse.
+# state - Modifier state.
+sub Leave
+{
+ my $menu = shift;
+ my $rootx = shift;
+ my $rooty = shift;
+ my $state = shift;
+ undef $Tk::window;
+ return if ($menu->index('active') eq 'none');
+ if ($menu->typeIS('active','cascade'))
+ {
+ my $c = $menu->Containing($rootx,$rooty);
+ return if (defined $c && $menu->entrycget('active','-menu')->IS($c));
+ }
+ $menu->activate('none');
+ $menu->GenerateMenuSelect;
+}
+
+# Invoke --
+# This procedure is invoked when button 1 is released over a menu.
+# It invokes the appropriate menu action and unposts the menu if
+# it came from a menubutton.
+#
+# Arguments:
+# w - Name of the menu widget.
+sub Invoke
+{
+ my $w = shift;
+ my $release = shift;
+
+ if ($release && !defined($Tk::window))
+ {
+ # Mouse was pressed over a menu without a menu button, then
+ # dragged off the menu (possibly with a cascade posted) and
+ # released. Unpost everything and quit.
+
+ $w->postcascade('none');
+ $w->activate('none');
+ $w->eventGenerate('<<MenuSelect>>');
+ $w->Unpost;
+ return;
+ }
+
+ my $type = $w->type('active');
+ if ($w->typeIS('active','cascade'))
+ {
+ $w->postcascade('active');
+ my $menu = $w->entrycget('active','-menu');
+ $menu->FirstEntry() if (defined $menu);
+ }
+ elsif ($w->typeIS('active','tearoff'))
+ {
+ $w->tearOffMenu();
+ $w->Unpost();
+ }
+ elsif ($w->typeIS('active','menubar'))
+ {
+ $w->postcascade('none');
+ $w->activate('none');
+ $w->eventGenerate('<<MenuSelect>>');
+ $w->Unpost;
+ }
+ else
+ {
+ $w->Unpost();
+ $w->invoke('active')
+ }
+}
+# Escape --
+# This procedure is invoked for the Cancel (or Escape) key. It unposts
+# the given menu and, if it is the top-level menu for a menu button,
+# unposts the menu button as well.
+#
+# Arguments:
+# menu - Name of the menu window.
+sub Escape
+{
+ my $menu = shift;
+ my $parent = $menu->parent;
+ if (!$parent->IsMenu)
+ {
+ $menu->Unpost()
+ }
+ elsif ($parent->cget('-type') eq 'menubar')
+ {
+ $menu->Unpost;
+ RestoreOldGrab();
+ }
+ else
+ {
+ $menu->NextMenu(-1)
+ }
+}
+# LeftRight --
+# This procedure is invoked to handle "left" and "right" traversal
+# motions in menus. It traverses to the next menu in a menu bar,
+# or into or out of a cascaded menu.
+#
+# Arguments:
+# menu - The menu that received the keyboard
+# event.
+# direction - Direction in which to move: "left" or "right"
+sub NextMenu
+{
+ my $menu = shift;
+ my $direction = shift;
+ # First handle traversals into and out of cascaded menus.
+ my $count;
+ if ($direction eq 'right')
+ {
+ $count = 1;
+ if ($menu->typeIS('active','cascade'))
+ {
+ $menu->postcascade('active');
+ my $m2 = $menu->entrycget('active','-menu');
+ $m2->FirstEntry if (defined $m2);
+ return;
+ }
+ else
+ {
+ my $parent = $menu->parent;
+ while ($parent->PathName ne '.')
+ {
+ if ($parent->IsMenu && $parent->cget('-type') eq 'menubar')
+ {
+ $parent->SetFocus;
+ $parent->NextEntry(1);
+ return;
+ }
+ $parent = $parent->parent;
+ }
+ }
+ }
+ else
+ {
+ $count = -1;
+ my $m2 = $menu->parent;
+ if ($m2->IsMenu)
+ {
+ $menu->activate('none');
+ $menu->GenerateMenuSelect;
+ $m2->SetFocus;
+
+ $m2->postcascade('none');
+
+ if ($m2->cget('-type') ne 'menubar')
+ {
+ return;
+ }
+ }
+ }
+ # Can't traverse into or out of a cascaded menu. Go to the next
+ # or previous menubutton, if that makes sense.
+
+ my $m2 = $menu->parent;
+ if ($m2->IsMenu)
+ {
+ if ($m2->cget('-type') eq 'menubar')
+ {
+ $m2->SetFocus;
+ $m2->NextEntry(-1);
+ return;
+ }
+ }
+
+ my $w = $Tk::postedMb;
+ return unless defined $w;
+ my @buttons = $w->parent->children;
+ my $length = @buttons;
+ my $i = Tk::lsearch(\@buttons,$w)+$count;
+ my $mb;
+ while (1)
+ {
+ while ($i < 0)
+ {
+ $i += $length
+ }
+ while ($i >= $length)
+ {
+ $i += -$length
+ }
+ $mb = $buttons[$i];
+ last if ($mb->IsMenubutton && $mb->cget('-state') ne 'disabled'
+ && defined($mb->cget('-menu'))
+ && $mb->cget('-menu')->index('last') ne 'none'
+ );
+ return if ($mb == $w);
+ $i += $count
+ }
+ $mb->PostFirst();
+}
+# NextEntry --
+# Activate the next higher or lower entry in the posted menu,
+# wrapping around at the ends. Disabled entries are skipped.
+#
+# Arguments:
+# menu - Menu window that received the keystroke.
+# count - 1 means go to the next lower entry,
+# -1 means go to the next higher entry.
+sub NextEntry
+{
+ my $menu = shift;
+ my $count = shift;
+ if ($menu->index('last') eq 'none')
+ {
+ return;
+ }
+ my $length = $menu->index('last')+1;
+ my $quitAfter = $length;
+ my $active = $menu->index('active');
+ my $i = ($active eq 'none') ? 0 : $active+$count;
+ while (1)
+ {
+ return if ($quitAfter <= 0);
+ while ($i < 0)
+ {
+ $i += $length
+ }
+ while ($i >= $length)
+ {
+ $i += -$length
+ }
+ my $state = eval {local $SIG{__DIE__}; $menu->entrycget($i,'-state') };
+ last if (defined($state) && $state ne 'disabled');
+ return if ($i == $active);
+ $i += $count;
+ $quitAfter -= 1;
+ }
+ $menu->activate($i);
+ $menu->GenerateMenuSelect;
+ if ($menu->cget('-type') eq 'menubar' && $menu->type($i) eq 'cascade')
+ {
+ my $cascade = $menu->entrycget($i, '-menu');
+ $menu->postcascade($i);
+ $cascade->FirstEntry if (defined $cascade);
+ }
+}
+
+
+# tkTraverseWithinMenu
+# This procedure implements keyboard traversal within a menu. It
+# searches for an entry in the menu that has "char" underlined. If
+# such an entry is found, it is invoked and the menu is unposted.
+#
+# Arguments:
+# w - The name of the menu widget.
+# char - The character to look for; case is
+# ignored. If the string is empty then
+# nothing happens.
+sub TraverseWithinMenu
+{
+ my $w = shift;
+ my $char = shift;
+ return unless (defined $char);
+ $char = "\L$char";
+ my $last = $w->index('last');
+ return if ($last eq 'none');
+ for (my $i = 0;$i <= $last;$i += 1)
+ {
+ my $label = eval {local $SIG{__DIE__}; $w->entrycget($i,'-label') };
+ next unless defined($label);
+ my $ul = $w->entrycget($i,'-underline');
+ if (defined $ul && $ul >= 0)
+ {
+ $label = substr("\L$label",$ul,1);
+ if (defined($label) && $label eq $char)
+ {
+ if ($w->type($i) eq 'cascade')
+ {
+ $w->postcascade($i);
+ $w->activate($i);
+ my $m2 = $w->entrycget($i,'-menu');
+ $m2->FirstEntry if (defined $m2);
+ }
+ else
+ {
+ $w->Unpost();
+ $w->invoke($i);
+ }
+ return;
+ }
+ }
+ }
+}
+
+sub FindMenu
+{
+ my ($menu,$char) = @_;
+ if ($menu->cget('-type') eq 'menubar')
+ {
+ if (!defined($char) || $char eq '')
+ {
+ $menu->FirstEntry;
+ }
+ else
+ {
+ $menu->TraverseWithinMenu($char);
+ }
+ return $menu;
+ }
+ return undef;
+}
+
+
+# FirstEntry --
+# Given a menu, this procedure finds the first entry that isn't
+# disabled or a tear-off or separator, and activates that entry.
+# However, if there is already an active entry in the menu (e.g.,
+# because of a previous call to tkPostOverPoint) then the active
+# entry isn't changed. This procedure also sets the input focus
+# to the menu.
+#
+# Arguments:
+# menu - Name of the menu window (possibly empty).
+sub FirstEntry
+{
+ my $menu = shift;
+ return if (!defined($menu) || $menu eq '' || !ref($menu));
+ $menu->SetFocus;
+ return if ($menu->index('active') ne 'none');
+ my $last = $menu->index('last');
+ return if ($last eq 'none');
+ for (my $i = 0;$i <= $last;$i += 1)
+ {
+ my $state = eval {local $SIG{__DIE__}; $menu->entrycget($i,'-state') };
+ if (defined $state && $state ne 'disabled' && !$menu->typeIS($i,'tearoff'))
+ {
+ $menu->activate($i);
+ $menu->GenerateMenuSelect;
+ if ($menu->type($i) eq 'cascade')
+ {
+ my $cascade = $menu->entrycget($i,'-menu');
+ if (0 && defined $cascade)
+ {
+ $menu->postcascade($i);
+ $cascade->FirstEntry;
+ }
+ }
+ return;
+ }
+ }
+}
+
+# FindName --
+# Given a menu and a text string, return the index of the menu entry
+# that displays the string as its label. If there is no such entry,
+# return an empty string. This procedure is tricky because some names
+# like "active" have a special meaning in menu commands, so we can't
+# always use the "index" widget command.
+#
+# Arguments:
+# menu - Name of the menu widget.
+# s - String to look for.
+sub FindName
+{
+ my $menu = shift;
+ my $s = shift;
+ my $i = undef;
+ if ($s !~ /^active$|^last$|^none$|^[0-9]|^@/)
+ {
+ $i = eval {local $SIG{__DIE__}; $menu->index($s) };
+ return $i;
+ }
+ my $last = $menu->index('last');
+ return if ($last eq 'none');
+ for ($i = 0;$i <= $last;$i += 1)
+ {
+ my $label = eval {local $SIG{__DIE__}; $menu->entrycget($i,'-label') };
+ return $i if (defined $label && $label eq $s);
+ }
+ return undef;
+}
+# PostOverPoint --
+# This procedure posts a given menu such that a given entry in the
+# menu is centered over a given point in the root window. It also
+# activates the given entry.
+#
+# Arguments:
+# menu - Menu to post.
+# x, y - Root coordinates of point.
+# entry - Index of entry within menu to center over (x,y).
+# If omitted or specified as {}, then the menu's
+# upper-left corner goes at (x,y).
+sub PostOverPoint
+{
+ my $menu = shift;
+ my $x = shift;
+ my $y = shift;
+ my $entry = shift;
+ if (defined $entry)
+ {
+ if ($entry == $menu->index('last'))
+ {
+ $y -= ($menu->yposition($entry)+$menu->height)/2;
+ }
+ else
+ {
+ $y -= ($menu->yposition($entry)+$menu->yposition($entry+1))/2;
+ }
+ $x -= $menu->reqwidth/2;
+ }
+ $menu->post($x,$y);
+ if (defined($entry) && $menu->entrycget($entry,'-state') ne 'disabled')
+ {
+ $menu->activate($entry);
+ $menu->GenerateMenuSelect;
+ }
+}
+# tk_popup --
+# This procedure pops up a menu and sets things up for traversing
+# the menu and its submenus.
+#
+# Arguments:
+# menu - Name of the menu to be popped up.
+# x, y - Root coordinates at which to pop up the
+# menu.
+# entry - Index of a menu entry to center over (x,y).
+# If omitted or specified as {}, then menu's
+# upper-left corner goes at (x,y).
+sub Post
+{
+ my $menu = shift;
+ return unless (defined $menu);
+ my $x = shift;
+ my $y = shift;
+ my $entry = shift;
+ Unpost(undef) if (defined($Tk::popup) || defined($Tk::postedMb));
+ $menu->PostOverPoint($x,$y,$entry);
+ if ($Tk::platform eq 'unix' && $menu->viewable)
+ {
+ $menu->grabGlobal;
+ $Tk::popup = $menu;
+ $Tk::focus = $menu->focusCurrent;
+ $menu->focus();
+ }
+}
+
+sub SetFocus
+{
+ my $menu = shift;
+ $Tk::focus = $menu->focusCurrent if (!defined($Tk::focus));
+ $menu->focus;
+}
+
+sub GenerateMenuSelect
+{
+ my $menu = shift;
+ $Tk::activeMenu = $menu;
+ $Tk::activeItem = $menu->index('active');
+ $menu->eventGenerate('<<MenuSelect>>'); # FIXME
+}
+
+# Converted from tearoff.tcl --
+#
+# This file contains procedures that implement tear-off menus.
+#
+# @(#) tearoff.tcl 1.3 94/12/17 16:05:25
+#
+# Copyright (c) 1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# tkTearoffMenu --
+# Given the name of a menu, this procedure creates a torn-off menu
+# that is identical to the given menu (including nested submenus).
+# The new torn-off menu exists as a toplevel window managed by the
+# window manager. The return value is the name of the new menu.
+#
+# Arguments:
+# w - The menu to be torn-off (duplicated).
+sub tearOffMenu
+{
+ my $w = shift;
+ my $x = (@_) ? shift : 0;
+ my $y = (@_) ? shift : 0;
+
+ $x = $w->rootx if $x == 0;
+ $y = $w->rooty if $y == 0;
+
+ # Find a unique name to use for the torn-off menu. Find the first
+ # ancestor of w that is a toplevel but not a menu, and use this as
+ # the parent of the new menu. This guarantees that the torn off
+ # menu will be on the same screen as the original menu. By making
+ # it a child of the ancestor, rather than a child of the menu, it
+ # can continue to live even if the menu is deleted; it will go
+ # away when the toplevel goes away.
+
+ my $parent = $w->parent;
+ while ($parent->toplevel != $parent || $parent->IsMenu)
+ {
+ $parent = $parent->parent;
+ }
+ my $menu = $w->clone($parent->PathName,'tearoff');
+
+ # Pick a title for the new menu by looking at the parent of the
+ # original: if the parent is a menu, then use the text of the active
+ # entry. If it's a menubutton then use its text.
+ my $title = $w->cget('-title');
+ # print ref($w),' ',$w->PathName," ",$menu->PathName," $w\n";
+ unless (defined $title && length($title))
+ {
+ $parent = $w->parent;
+ if ($parent)
+ {
+ if ($parent->IsMenubutton)
+ {
+ $title = $parent->cget('-text');
+ }
+ elsif ($parent->IsMenu)
+ {
+ $title = $parent->entrycget('active','-label');
+ }
+ }
+ }
+ $menu->title($title) if (defined $title && length($title));
+ $menu->post($x,$y);
+
+ if (!Tk::Exists($menu))
+ {
+ return;
+ }
+
+ # Set tkPriv(focus) on entry: otherwise the focus will get lost
+ # after keyboard invocation of a sub-menu (it will stay on the
+ # submenu).
+
+
+ # This seems to conflict with <Enter> class binding above
+ # if this fires before the class binding the wrong thing
+ # will get saved in $Tk::focus
+ # $menu->bind('<Enter>','EnterFocus');
+ $menu->Callback('-tearoffcommand');
+
+ # Strangely tear-off menus do not work in tkpod and Tk804.027.
+ # Explicitely setting normal state helps here - why?
+ $menu->state("normal");
+
+ return $menu;
+}
+
+# tkMenuDup --
+# Given a menu (hierarchy), create a duplicate menu (hierarchy)
+# in a given window.
+#
+# Arguments:
+# src - Source window. Must be a menu. It and its
+# menu descendants will be duplicated at path.
+# path - Name to use for topmost menu in duplicate
+# hierarchy.
+
+sub tkMenuDup
+{
+ my ($src,$path,$type) = @_;
+ my ($pname,$name) = $path =~ /^(.*)\.([^\.]*)$/;
+ ($name) = $src->PathName =~ /^.*\.([^\.]*)$/ unless $name;
+ my $parent = ($pname) ? $src->Widget($pname) : $src->MainWindow;
+ my %args = (Name => $name, -type => $type);
+ foreach my $option ($src->configure())
+ {
+ next if (@$option == 2);
+ $args{$$option[0]} = $$option[4] unless exists $args{$$option[0]};
+ }
+ my $dst = ref($src)->new($parent,%args);
+ # print "MenuDup $src $path $name $type ->",$dst->PathName,"\n";
+ $_[1] = $dst;
+ if ($type eq 'tearoff')
+ {
+ $dst->transient($parent->toplevel);
+ }
+ my $last = $src->index('last');
+ if ($last ne 'none')
+ {
+ for (my $i = $src->cget('-tearoff'); $i <= $last; $i++)
+ {
+ my $type = $src->type($i);
+ if (defined $type)
+ {
+ my @args = ();
+ foreach my $option ($src->entryconfigure($i))
+ {
+ next if (@$option == 2);
+ push(@args,$$option[0],$$option[4]) if (defined $$option[4]);
+ }
+ $dst->add($type,@args);
+ }
+ }
+ }
+ # Duplicate the binding tags and bindings from the source menu.
+ my @bindtags = $src->bindtags;
+ $path = $src->PathName;
+ foreach (@bindtags)
+ {
+ $_ = $dst if ($_ eq $path);
+ }
+ $dst->bindtags([@bindtags]);
+ foreach my $event ($src->bind)
+ {
+ my $cb = $src->bind($event);
+# print "$event => $cb\n";
+ $dst->bind($event,$cb->Substitute($src,$dst));
+ }
+ return $dst;
+}
+
+
+
+# Some convenience methods
+
+sub separator { require Tk::Menu::Item; shift->Separator(@_); }
+sub cascade { require Tk::Menu::Item; shift->Cascade(@_); }
+sub checkbutton { require Tk::Menu::Item; shift->Checkbutton(@_); }
+sub radiobutton { require Tk::Menu::Item; shift->Radiobutton(@_); }
+
+sub command
+{
+ my ($menu,%args) = @_;
+ require Tk::Menu::Item;
+ if (exists $args{-button})
+ {
+ # Backward compatible stuff from 'Menubar'
+ my $button = delete $args{-button};
+ $button = ['Misc', -underline => 0 ] unless (defined $button);
+ my @bargs = ();
+ ($button,@bargs) = @$button if (ref($button) && ref $button eq 'ARRAY');
+ $menu = $menu->Menubutton(-label => $button, @bargs);
+ }
+ $menu->Command(%args);
+}
+
+sub Menubutton
+{
+ my ($menu,%args) = @_;
+ my $name = delete($args{'-text'}) || $args{'-label'};;
+ $args{'-label'} = $name if (defined $name);
+ my $items = delete $args{'-menuitems'};
+ foreach my $opt (qw(-pack -after -before -side -padx -ipadx -pady -ipady -fill))
+ {
+ delete $args{$opt};
+ }
+ if (defined($name) && !defined($args{-underline}))
+ {
+ my $underline = ($name =~ s/^(.*)~/$1/) ? length($1): undef;
+ if (defined($underline) && ($underline >= 0))
+ {
+ $args{-underline} = $underline;
+ $args{-label} = $name;
+ }
+ }
+ my $hash = $menu->TkHash('MenuButtons');
+ my $mb = $hash->{$name};
+ if (defined $mb)
+ {
+ delete $args{'-tearoff'}; # too late!
+ $mb->configure(%args) if %args;
+ }
+ else
+ {
+ $mb = $menu->cascade(%args);
+ $hash->{$name} = $mb;
+ }
+ $mb->menu->AddItems(@$items) if defined($items) && @$items;
+ return $mb;
+}
+
+sub BalloonInfo
+{
+ my ($menu,$balloon,$X,$Y,@opt) = @_;
+ my $i = $menu->index('active');
+ if ($i eq 'none')
+ {
+ my $y = $Y - $menu->rooty;
+ $i = $menu->index("\@$y");
+ }
+ foreach my $opt (@opt)
+ {
+ my $info = $balloon->GetOption($opt,$menu);
+ if ($opt =~ /^-(statusmsg|balloonmsg)$/ && UNIVERSAL::isa($info,'ARRAY'))
+ {
+ $balloon->Subclient($i);
+ return '' if $i eq 'none';
+ return ${$info}[$i] || '';
+ }
+ return $info;
+ }
+}
+
+sub MasterMenu
+{
+ my ($menu) = @_;
+ my $pathname = $menu->PathName;
+ my $master_menu;
+ if ($pathname =~ m{#})
+ {
+ my $master_pathname = (split m{\.}, $pathname)[-1];
+ $master_pathname =~ s{#}{.}g;
+ $master_menu = $menu->Widget($master_pathname);
+ if (0 && !Tk::Exists($master_menu))
+ {
+ warn "Cannot find master menu <$master_pathname>";
+ }
+ }
+ $master_menu;
+}
+
+
+# ::tk::AmpMenuArgs --
+# Processes arguments for a menu entry, turning -label option into
+# -label and -underline options, returned by ::tk::UnderlineAmpersand.
+#
+sub AmpArgs
+{
+ my ($w, $add, $type, %args) = @_;
+ my @options;
+ while(my($opt,$val) = each %args)
+ {
+ if ($opt eq "-label")
+ {
+ my ($newtext,$under) = $w->UnderlineAmpersand($val);
+ push @options, -label => $newtext, -underline => $under;
+ }
+ else
+ {
+ push @options, $opt, $val;
+ }
+ }
+ $w->$type(@options);
+}
+
+1;
+
+__END__
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Menu.pod b/Master/tlpkg/tlperl/lib/Tk/Menu.pod
new file mode 100644
index 00000000000..b7414e57510
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Menu.pod
@@ -0,0 +1,876 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Menu - Create and manipulate Menu widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+S< >I<$menu> = I<$parent>-E<gt>B<Menu>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground> B<-background> B<-disabledforeground> B<-relief>
+B<-activeborderwidth> B<-borderwidth> B<-font> B<-takefocus>
+B<-activeforeground> B<-cursor> B<-foreground>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<postCommand>
+
+=item Class: B<Command>
+
+=item Switch: B<-postcommand>
+
+If this option is specified then it provides a L<callback|Tk::callbacks> to execute
+each time the menu is posted. The callback is invoked by the B<post>
+method before posting the menu. Note that in 8.0 on Macintosh
+and Windows, all commands in a menu systems are executed before any
+are posted. This is due to the limitations in the individual platforms'
+menu managers.
+
+=item Name: B<selectColor>
+
+=item Class: B<Background>
+
+=item Switch: B<-selectcolor>
+
+For menu entries that are check buttons or radio buttons, this option
+specifies the color to display in the indicator when the check button
+or radio button is selected.
+
+=item Name: B<tearOff>
+
+=item Class: B<TearOff>
+
+=item Switch: B<-tearoff>
+
+This option must have a proper boolean value, which specifies
+whether or not the menu should include a tear-off entry at the
+top. If so, it will exist as entry 0 of the menu and the other
+entries will number starting at 1. The default
+menu bindings arrange for the menu to be torn off when the tear-off
+entry is invoked.
+
+=item Name: B<tearOffCommand>
+
+=item Class: B<TearOffCommand>
+
+=item Switch: B<-tearoffcommand>
+
+If this option has a non-empty value, then it specifies a L<perl/Tk callback|Tk::callbacks>
+to invoke whenever the menu is torn off. The actual command will
+consist of the value of this option, followed by a space, followed
+by the name of the menu window, followed by a space, followed by
+the name of the name of the torn off menu window. For example, if
+the option's is ``B<a b>'' and menu B<.x.y> is torn off to
+create a new menu B<.x.tearoff1>, then the command
+``B<a b .x.y .x.tearoff1>'' will be invoked.
+
+=item Name: B<title>
+
+=item Class: B<Title>
+
+=item Switch: B<-title>
+
+The string will be used to title the window created when this menu is
+torn off. If the title is NULL, then the window will have the title
+of the menubutton or the text of the cascade item from which this menu
+was invoked.
+
+=item Name: B<type>
+
+=item Class: B<Type>
+
+=item Switch: B<-type>
+
+This option can be one of B<menubar>, B<tearoff>, or
+B<normal>, and is set when the menu is created. While the string
+returned by the configuration database will change if this option is
+changed, this does not affect the menu widget's behavior. This is used
+by the cloning mechanism and is not normally set outside of the Tk
+library.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Menu> method creates a new top-level window (given
+by the $widget argument) and makes it into a menu widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the menu such as its colors and font.
+The B<menu> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A menu is a widget that displays a collection of one-line entries arranged
+in one or more columns. There exist several different types of entries,
+each with different properties. Entries of different types may be
+combined in a single menu. Menu entries are not the same as
+entry widgets. In fact, menu entries are not even distinct widgets;
+the entire menu is one widget.
+
+Menu entries are displayed with up to three separate fields.
+The main field is a label in the form of a text string,
+a bitmap, or an image, controlled by the B<-label>,
+B<-bitmap>, and B<-image> options for the entry.
+If the B<-accelerator> option is specified for an entry then a second
+textual field is displayed to the right of the label. The accelerator
+typically describes a keystroke sequence that may be typed in the
+application to cause the same result as invoking the menu entry.
+The third field is an I<indicator>. The indicator is present only for
+checkbutton or radiobutton entries. It indicates whether the entry
+is selected or not, and is displayed to the left of the entry's
+string.
+
+In normal use, an entry becomes active (displays itself differently)
+whenever the mouse pointer is over the entry. If a mouse
+button is released over the entry then the entry is I<invoked>.
+The effect of invocation is different for each type of entry;
+these effects are described below in the sections on individual
+entries.
+
+Entries may be I<disabled>, which causes their labels
+and accelerators to be displayed
+with dimmer colors.
+The default menu bindings will not allow
+a disabled entry to be activated or invoked.
+Disabled entries may be re-enabled, at which point it becomes
+possible to activate and invoke them again.
+
+Whenever a menu's active entry is changed, a E<lt>E<lt>MenuSelectE<gt>E<gt> virtual
+event is sent to the menu. The active item can then be queried from
+the menu, and an action can be taken, such as setting
+context-sensitive help text for the entry.
+
+=head2 COMMAND ENTRIES
+
+The most common kind of menu entry is a command entry, which
+behaves much like a button widget. When a command entry is
+invoked, a callback is executed. The callback
+is specified with the B<-command> option.
+
+=head2 SEPARATOR ENTRIES
+
+A separator is an entry that is displayed as a horizontal dividing
+line. A separator may not be activated or invoked, and it has
+no behavior other than its display appearance.
+
+=head2 CHECKBUTTON ENTRIES
+
+A checkbutton menu entry behaves much like a checkbutton widget.
+When it is invoked it toggles back and forth between the selected
+and deselected states. When the entry is selected, a particular
+value is stored in a particular global variable (as determined by
+the B<-onvalue> and B<-variable> options for the entry); when
+the entry is deselected another value (determined by the
+B<-offvalue> option) is stored in the global variable.
+An indicator box is displayed to the left of the label in a checkbutton
+entry. If the entry is selected then the indicator's center is displayed
+in the color given by the B<-selectcolor> option for the entry;
+otherwise the indicator's center is displayed in the background color for
+the menu. If a B<-command> option is specified for a checkbutton
+entry, then its value is evaluated each time the entry
+is invoked; this happens after toggling the entry's
+selected state.
+
+=head2 RADIOBUTTON ENTRIES
+
+A radiobutton menu entry behaves much like a radiobutton widget.
+Radiobutton entries are organized in groups of which only one
+entry may be selected at a time. Whenever a particular entry
+becomes selected it stores a particular value into a particular
+global variable (as determined by the B<-value> and
+B<-variable> options for the entry). This action
+causes any previously-selected entry in the same group
+to deselect itself.
+Once an entry has become selected, any change to the entry's
+associated variable will cause the entry to deselect itself.
+Grouping of radiobutton entries is determined by their
+associated variables: if two entries have the same associated
+variable then they are in the same group.
+An indicator diamond is displayed to the left of the label in each
+radiobutton entry. If the entry is selected then the indicator's
+center is displayed in the color given by the B<-selectcolor> option
+for the entry;
+otherwise the indicator's center is displayed in the background color for
+the menu. If a B<-command> option is specified for a radiobutton
+entry, then its value is evaluated each time the entry
+is invoked; this happens after selecting the entry.
+
+=head2 CASCADE ENTRIES
+
+A cascade entry is one with an associated menu (determined
+by the B<-menu> option). Cascade entries allow the construction
+of cascading menus.
+The B<postcascade> method can be used to post and unpost
+the associated menu just next to of the cascade entry.
+The associated menu must be a child of the menu containing
+the cascade entry (this is needed in order for menu traversal to
+work correctly).
+
+A cascade entry posts its associated menu by invoking
+
+=over 4
+
+I<$menu>-E<gt>B<post>(I<x,y>)
+
+=back
+
+where I<menu> is the path name of the associated menu, and I<x>
+and I<y> are the root-window coordinates of the upper-right
+corner of the cascade entry.
+On Unix, the lower-level menu is unposted by executing
+
+=over 4
+
+I<$menu>-E<gt>B<unpost>
+
+=back
+
+where I<menu> is the name of the associated menu.
+On other platforms, the platform's native code takes care of unposting the
+menu.
+
+If a B<-command> option is specified for a cascade entry then it is
+evaluated whenever the entry is invoked. This is not supported on Windows.
+
+=head2 TEAR-OFF ENTRIES
+
+A tear-off entry appears at the top of the menu if enabled with the
+B<tearOff> option. It is not like other menu entries in that
+it cannot be created with the B<add> method and
+cannot be deleted with the B<delete> method.
+When a tear-off entry is created it appears as a dashed line at
+the top of the menu. Under the default bindings, invoking the
+tear-off entry causes a torn-off copy to be made of the menu and
+all of its submenus.
+
+=head2 MENUBARS
+
+Any menu can be set as a menubar for a toplevel window (see the
+L<Toplevel|Tk::Toplevel> constructor for syntax). On the Macintosh, whenever the
+toplevel is in front, this menu's cascade items will appear in the
+menubar across the top of the main monitor. On Windows and Unix, this
+menu's items will be displayed in a menubar accross the top of the
+window. These menus will behave according to the interface guidelines
+of their platforms. For every menu set as a menubar, a clone menu is
+made. See L<"CLONES"> for more information.
+
+As noted, menubars may behave differently on different platforms. One
+example of this concerns the handling of checkbuttons and radiobuttons
+within the menu. While it is permitted to put these menu elements on
+menubars, they may not be drawn with indicators on some platforms, due
+to system restrictions.
+
+=head2 SPECIAL MENUS IN MENUBARS
+
+Certain menus in a menubar will be treated specially. On the Macintosh,
+access to the special Apple and Help menus is provided. On Windows,
+access to the Windows System menu in each window is provided. On X Windows,
+a special right-justified help menu is provided. In all cases, these
+menus must be created with the command name of the menubar menu concatenated
+with the special name. So for a menubar named .menubar, on the Macintosh,
+the special menus would be .menubar.apple and .menubar.help; on Windows,
+the special menu would be .menubar.system; on X Windows, the help
+menu would be .menubar.help.
+
+When Tk sees an Apple menu on the Macintosh, that menu's contents make
+up the first items of the Apple menu on the screen whenever the window
+containing the menubar is in front. The menu is the
+first one that the user sees and has a title which is an Apple logo.
+After all of the Tk-defined items, the menu will have a separator,
+followed by all of the items in the user's Apple Menu Items folder.
+Since the System uses a different menu definition procedure for
+the Apple menu than Tk uses for its menus, and the system APIs do
+not fully support everything Tk tries to do, the menu item will only
+have its text displayed. No font attributes, images, bitmaps, or colors
+will be displayed. In addition, a menu with a tearoff item will have
+the tearoff item displayed as "(TearOff)".
+
+When Tk see a Help menu on the Macintosh, the menu's contents are
+appended to the standard help menu on the right of the user's menubar
+whenever the user's menubar is in front. The first items in the menu
+are provided by Apple. Similar to the Apple Menu, cusomization in this
+menu is limited to what the system provides.
+
+When Tk sees a System menu on Windows, its items are appended to the
+system menu that the menubar is attached to. This menu has an icon
+representing a spacebar, and can be invoked with the mouse or by typing
+Alt+Spacebar. Due to limitations in the Windows API, any font changes,
+colors, images, bitmaps, or tearoff images will not appear in the
+system menu.
+
+When Tk see a Help menu on X Windows, the menu is moved to be last in
+the menubar and is right justified.
+
+=head2 CLONES
+
+When a menu is set as a menubar for a toplevel window, or when a menu
+is torn off, a clone of the menu is made. This clone is a menu widget
+in its own right, but it is a child of the original. Changes in the
+configuration of the original are reflected in the
+clone. Additionally, any cascades that are pointed to are also cloned
+so that menu traversal will work right. Clones are destroyed when
+either the tearoff or menubar goes away, or when the original menu is
+destroyed.
+
+=head2 WIDGET METHODS
+
+The B<Menu> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class, and the L<Tk::Wm|Tk::Wm> class.
+
+Many of the methods for a menu take as one argument an
+indicator of which entry of the menu to operate on. These
+indicators are called I<index>es and may be specified in
+any of the following forms:
+
+=over 4
+
+=item I<number>
+
+Specifies the entry numerically, where 0 corresponds
+to the top-most entry of the menu, 1 to the entry below it, and
+so on.
+
+=item B<active>
+
+Indicates the entry that is currently active. If no entry is
+active then this form is equivalent to B<none>. This form may
+not be abbreviated.
+
+=item B<end>
+
+Indicates the bottommost entry in the menu. If there are no
+entries in the menu then this form is equivalent to B<none>.
+This form may not be abbreviated.
+
+=item B<last>
+
+Same as B<end>.
+
+=item B<none>
+
+Indicates ``no entry at all''; this is used most commonly with
+the B<activate> option to deactivate all the entries in the
+menu. In most cases the specification of B<none> causes
+nothing to happen in the method.
+This form may not be abbreviated.
+
+=item B<@>I<number>
+
+In this form, I<number> is treated as a y-coordinate in the
+menu's window; the entry closest to that y-coordinate is used.
+For example, ``B<@0>'' indicates the top-most entry in the
+window.
+
+=item I<pattern>
+
+If the index doesn't satisfy one of the above forms then this
+form is used. I<Pattern> is pattern-matched against the label of
+each entry in the menu, in order from the top down, until a
+matching entry is found.
+(In perl/Tk the matching is under review, but exact match
+should work.)
+
+=back
+
+The following methods are possible for menu widgets:
+
+=over 4
+
+=item I<$menu>-E<gt>B<activate>(I<index>)
+
+Change the state of the entry indicated by I<index> to B<active>
+and redisplay it using its active colors.
+Any previously-active entry is deactivated. If I<index>
+is specified as B<none>, or if the specified entry is
+disabled, then the menu ends up with no active entry.
+Returns an empty string.
+
+=item I<$menu>-E<gt>B<add>(I<type, >?I<option, value, option, value, ...>?)
+
+Add a new entry to the bottom of the menu. The new entry's type
+is given by I<type> and must be one of B<cascade>,
+B<checkbutton>, B<command>, B<radiobutton>, or B<separator>,
+or a unique abbreviation of one of the above. If additional arguments
+are present, they specify any of the following options:
+
+=over 8
+
+=item B<-activebackground> =E<gt> I<value>
+
+Specifies a background color to use for displaying this entry when it
+is active.
+If this option is specified as an empty string (the default), then the
+B<activeBackground> option for the overall menu is used.
+If the B<$Tk::strictMotif> variable has been set to request strict
+Motif compliance, then this option is ignored and the B<-background>
+option is used in its place.
+This option is not available for separator or tear-off entries.
+
+=item B<-activeforeground> =E<gt> I<value>
+
+Specifies a foreground color to use for displaying this entry when it
+is active.
+If this option is specified as an empty string (the default), then the
+B<activeForeground> option for the overall menu is used.
+This option is not available for separator or tear-off entries.
+
+=item B<-accelerator> =E<gt> I<value>
+
+Specifies a string to display at the right side of the menu entry.
+Normally describes an accelerator keystroke sequence that may be
+typed to invoke the same function as the menu entry. This option
+is not available for separator or tear-off entries.
+
+=item B<-background> =E<gt> I<value>
+
+Specifies a background color to use for displaying this entry when it
+is in the normal state (neither active nor disabled).
+If this option is specified as an empty string (the default), then the
+B<background> option for the overall menu is used.
+This option is not available for separator or tear-off entries.
+
+=item B<-bitmap> =E<gt> I<value>
+
+Specifies a bitmap to display in the menu instead of a textual
+label, in any of the forms accepted by B<Tk_GetBitmap>.
+This option overrides the B<-label> option but may be reset
+to an empty string to enable a textual label to be displayed.
+If a B<-image> option has been specified, it overrides
+B<-bitmap>.
+This option is not available for separator or tear-off entries.
+
+=item B<-columnbreak> =E<gt> I<value>
+
+When this option is zero, the appears below the previous entry. When
+this option is one, the menu appears at the top of a new column in the
+menu.
+
+=item B<-compound> =E<gt> I<value>
+
+Specifies whether the button should display both an image and text,
+and if so, where the image should be placed relative to the text.
+Valid values for this option are B<bottom>, B<center>, B<left>,
+B<none>, B<right> and B<top>. The default value is B<none>, meaning
+that the button will display either an image or text, depending on the
+values of the -image and -bitmap options.
+
+=item B<-command> =E<gt> I<value>
+
+For command, checkbutton, and radiobutton entries, specifies a
+callback to execute when the menu entry is invoked.
+For cascade entries, specifies a callback to execute
+when the entry is activated (i.e. just before its submenu is
+posted).
+Not available for separator or tear-off entries.
+
+=item B<-font> =E<gt> I<value>
+
+Specifies the font to use when drawing the label or accelerator
+string in this entry.
+If this option is specified as an empty string (the default) then
+the B<font> option for the overall menu is used.
+This option is not available for separator or tear-off entries.
+
+=item B<-foreground> =E<gt> I<value>
+
+Specifies a foreground color to use for displaying this entry when it
+is in the normal state (neither active nor disabled).
+If this option is specified as an empty string (the default), then the
+B<foreground> option for the overall menu is used.
+This option is not available for separator or tear-off entries.
+
+=item B<-hidemargin> =E<gt> I<value>
+
+Specifies whether the standard margins should be drawn for this menu
+entry. This is useful when creating palette with images in them, i.e.,
+color palettes, pattern palettes, etc. 1 indicates that the margin for
+the entry is hidden; 0 means that the margin is used.
+
+=item B<-image> =E<gt> I<value>
+
+Specifies an image to display in the menu instead of a text string
+or bitmap
+The image must have been created by some previous invocation of
+B<image create>.
+This option overrides the B<-label> and B<-bitmap> options
+but may be reset to an empty string to enable a textual or
+bitmap label to be displayed.
+This option is not available for separator or tear-off entries.
+
+=item B<-indicatoron> =E<gt> I<value>
+
+Available only for checkbutton and radiobutton entries.
+I<Value> is a boolean that determines whether or not the
+indicator should be displayed.
+
+=item B<-label> =E<gt> I<value>
+
+Specifies a string to display as an identifying label in the menu
+entry. Not available for separator or tear-off entries.
+
+=item B<-menu> =E<gt> I<value>
+
+Available only for cascade entries. Specifies the path name of
+the submenu associated with this entry.
+The submenu must be a child of the menu.
+
+=item B<-offvalue> =E<gt> I<value>
+
+Available only for checkbutton entries. Specifies the value to
+store in the entry's associated variable when the entry is
+deselected.
+
+=item B<-onvalue> =E<gt> I<value>
+
+Available only for checkbutton entries. Specifies the value to
+store in the entry's associated variable when the entry is selected.
+
+=item B<-selectcolor> =E<gt> I<value>
+
+Available only for checkbutton and radiobutton entries.
+Specifies the color to display in the indicator when the entry is
+selected.
+If the value is an empty string (the default) then the B<selectColor>
+option for the menu determines the indicator color.
+
+=item B<-selectimage> =E<gt> I<value>
+
+Available only for checkbutton and radiobutton entries.
+Specifies an image to display in the entry (in place of
+the B<-image> option) when it is selected.
+I<Value> is the name of an image, which must have been created
+by some previous invocation of B<image create>.
+This option is ignored unless the B<-image> option has
+been specified.
+
+=item B<-state> =E<gt> I<value>
+
+Specifies one of three states for the entry: B<normal>, B<active>,
+or B<disabled>. In normal state the entry is displayed using the
+B<foreground> option for the menu and the B<background>
+option from the entry or the menu.
+The active state is typically used when the pointer is over the entry.
+In active state the entry is displayed using the B<activeForeground>
+option for the menu along with the B<activebackground> option from
+the entry. Disabled state means that the entry
+should be insensitive: the default bindings will refuse to activate
+or invoke the entry.
+In this state the entry is displayed according to the
+B<disabledForeground> option for the menu and the
+B<background> option from the entry.
+This option is not available for separator entries.
+
+=item B<-underline> =E<gt> I<value>
+
+Specifies the integer index of a character to underline in the entry.
+This option is also queried by the default bindings and used to
+implement keyboard traversal.
+0 corresponds to the first character of the text displayed in the entry,
+1 to the next character, and so on.
+If a bitmap or image is displayed in the entry then this option is ignored.
+This option is not available for separator or tear-off entries.
+
+=item B<-value> =E<gt> I<value>
+
+Available only for radiobutton entries. Specifies the value to
+store in the entry's associated variable when the entry is selected.
+If an empty string is specified, then the B<-label> option
+for the entry as the value to store in the variable.
+
+=item B<-variable> =E<gt> I<value>
+
+Available only for checkbutton and radiobutton entries. Specifies
+the name of a global value to set when the entry is selected.
+For checkbutton entries the variable is also set when the entry
+is deselected. For radiobutton entries, changing the variable
+causes the currently-selected entry to deselect itself.
+
+=back
+
+The B<add> method returns an empty string.
+
+=item I<$menu>-E<gt>B<clone>(I<$parent> ?, I<cloneType?>)
+
+Makes a clone of the current menu as a child of I<$parent>. This clone
+is a menu in its own right, but any changes to the clone are
+propogated to the original menu and vice versa. I<cloneType> can be
+B<normal>, B<menubar>, or B<tearoff>. Should not normally be
+called outside of the Tk library. See L<"CLONES"> for
+more information.
+
+=item I<$menu>-E<gt>B<delete>(I<index1>?, I<index2>?)
+
+Delete all of the menu entries between I<index1> and
+I<index2> inclusive.
+If I<index2> is omitted then it defaults to I<index1>.
+Attempts to delete a tear-off menu entry are ignored (instead, you
+should change the B<tearOff> option to remove the tear-off entry).
+
+=item I<$menu>-E<gt>B<entrycget>(I<index, option>)
+
+Returns the current value of a configuration option for
+the entry given by I<index>.
+I<Option> may have any of the values accepted by the B<add>
+method.
+
+=item I<$menu>-E<gt>B<entryconfigure>(I<index> ?,I<options>?)
+
+This method is similar to the B<configure> method, except that
+it applies to the options for an individual entry, whereas B<configure>
+applies to the options for the menu as a whole.
+I<Options> may have any of the values accepted by the B<add>
+method. If I<options> are specified, options are modified
+as indicated
+in the method call and the method returns an empty string.
+If no I<options> are specified, returns a list describing
+the current options for entry I<index> (see L<Tk::options> for
+information on the format of this list).
+
+=item I<$menu>-E<gt>B<index>(I<index>)
+
+Returns the numerical index corresponding to I<index>, or
+B<none> if I<index> was specified as B<none>.
+
+=item I<$menu>-E<gt>B<insert>(I<index, type>?, I<-option>=E<gt>I<value>, ...?)
+
+Same as the B<add> method except that it inserts the new
+entry just before the entry given by I<index>, instead of appending
+to the end of the menu. The I<type>, I<-option>, and I<value>
+arguments have the same interpretation as for the B<add> widget
+method. It is not possible to insert new menu entries before the
+tear-off entry, if the menu has one.
+
+=item I<$menu>-E<gt>B<invoke>(I<index>)
+
+Invoke the action of the menu entry. See the sections on the
+individual entries above for details on what happens. If the
+menu entry is disabled then nothing happens. If the
+entry has a callback associated with it then the result of that
+callback is returned as the result of the B<invoke> widget
+method. Otherwise the result is an empty string. Note: invoking
+a menu entry does not automatically unpost the menu; the default
+bindings normally take care of this before invoking the B<invoke>
+method.
+
+=item I<$menu>-E<gt>B<post>(I<x, y>)
+
+Arrange for the menu to be displayed on the screen at the root-window
+coordinates given by I<x> and I<y>. These coordinates are
+adjusted if necessary to guarantee that the entire menu is visible on
+the screen. This method normally returns an empty string.
+If the B<postCommand> option has been specified, then its value is
+executed before posting the menu and the result of
+that callback is returned as the result of the B<post> widget
+method.
+If an error returns while executing the method, then the error is
+returned without posting the menu.
+
+=item I<$menu>-E<gt>B<postcascade>(I<index>)
+
+Posts the submenu associated with the cascade entry given by
+I<index>, and unposts any previously posted submenu.
+If I<index> doesn't correspond to a cascade entry,
+or if I<$menu> isn't posted,
+the method has no effect except to unpost any currently posted
+submenu.
+
+=item I<$menu>-E<gt>B<type>(I<index>)
+
+Returns the type of the menu entry given by I<index>.
+This is the I<type> argument passed to the B<add> widget
+method when the entry was created, such as B<command>
+or B<separator>, or B<tearoff> for a tear-off entry.
+
+=item I<$menu>-E<gt>B<unpost>
+
+Unmap the window so that it is no longer displayed. If a
+lower-level cascaded menu is posted, unpost that menu. Returns an
+empty string. This method does not work on Windows and the
+Macintosh, as those platforms have their own way of unposting menus.
+
+=item I<$menu>-E<gt>B<yposition>(I<index>)
+
+Returns a decimal string giving the y-coordinate within the menu
+window of the topmost pixel in the entry specified by I<index>.
+
+=back
+
+=head1 MENU CONFIGURATIONS
+
+The default bindings support four different ways of using menus:
+
+=over 4
+
+=item B<Pulldown Menus in Menubar>
+
+This is the most command case. You create a menu widget that will become the
+menu bar. You then add cascade entries to this menu, specifying the
+pull down menus you wish to use in your menu bar. You then create all
+of the pulldowns. Once you have done this, specify the menu using the
+B<-menu> option of the toplevel's method. See the
+B<toplevel> manual entry for details.
+
+=item B<Pulldown Menus in Menu Buttons>
+
+This is the compatable way to do menu bars. You create one menubutton
+widget for each top-level menu, and typically you arrange a series of
+menubuttons in a row in a menubar window. You also create the top-level menus
+and any cascaded submenus, and tie them together with B<-menu>
+options in menubuttons and cascade menu entries. The top-level menu must
+be a child of the menubutton, and each submenu must be a child of the
+menu that refers to it. Once you have done this, the default bindings
+will allow users to traverse and invoke the tree of menus via its
+menubutton; see the B<menubutton> documentation for details.
+
+=item B<Popup Menus>
+
+Popup menus typically post in response to a mouse button press or
+keystroke. You create the popup menus and any cascaded submenus,
+then you call the B<Post> method at the appropriate time
+to post the top-level menu.
+
+I<$menu>-E<gt>B<Post>(I<$x>,I<$y>?,I<$entry>?)
+
+I<$x> and I<$y> are the root window coordinates at which the I<$menu>
+will be displayed. If I<$entry> is specified then that entry is centred
+on that point, otherwise the top-left corner of the I<$menu> is placed
+at that point.
+
+B<Menu> also inherits methods from L<Tk::Wm> and so the method
+B<Popup> can be used to position menu relative to other windows, the
+mouse cursor or the screen.
+
+=item B<Option Menus>
+
+An option menu consists of a menubutton with an associated menu
+that allows you to select one of several values. The current value
+is displayed in the menubutton and is also stored in a global
+variable. Use the L<Tk::Optionmenu> class to create option
+menubuttons and their menus.
+
+=item B<Torn-off Menus>
+
+You create a torn-off menu by invoking the tear-off entry at
+the top of an existing menu. The default bindings will create a new menu
+that is a copy of the original menu and leave it permanently
+posted as a top-level window. The torn-off menu behaves just
+the same as the original menu.
+
+=back
+
+=head1 DEFAULT BINDINGS
+
+Tk automatically creates class bindings for menus that give them
+the following default behavior:
+
+=over 4
+
+=item [1]
+
+When the mouse enters a menu, the entry underneath the mouse
+cursor activates; as the mouse moves around the menu, the active
+entry changes to track the mouse.
+
+=item [2]
+
+When the mouse leaves a menu all of the entries in the menu
+deactivate, except in the special case where the mouse moves from
+a menu to a cascaded submenu.
+
+=item [3]
+
+When a button is released over a menu, the active entry (if any) is invoked.
+The menu also unposts unless it is a torn-off menu.
+
+=item [4]
+
+The Space and Return keys invoke the active entry and
+unpost the menu.
+
+=item [5]
+
+If any of the entries in a menu have letters underlined with
+with B<-underline> option, then pressing one of the underlined
+letters (or its upper-case or lower-case equivalent) invokes that
+entry and unposts the menu.
+
+=item [6]
+
+The Escape key aborts a menu selection in progress without invoking any
+entry. It also unposts the menu unless it is a torn-off menu.
+
+=item [7]
+
+The Up and Down keys activate the next higher or lower entry
+in the menu. When one end of the menu is reached, the active
+entry wraps around to the other end.
+
+=item [8]
+
+The Left key moves to the next menu to the left.
+If the current menu is a cascaded submenu, then the submenu is
+unposted and the current menu entry becomes the cascade entry
+in the parent.
+If the current menu is a top-level menu posted from a
+menubutton, then the current menubutton is unposted and the
+next menubutton to the left is posted.
+Otherwise the key has no effect.
+The left-right order of menubuttons is determined by their stacking
+order: Tk assumes that the lowest menubutton (which by default
+is the first one created) is on the left.
+
+=item [9]
+
+The Right key moves to the next menu to the right.
+If the current entry is a cascade entry, then the submenu is
+posted and the current menu entry becomes the first entry
+in the submenu.
+Otherwise, if the current menu was posted from a
+menubutton, then the current menubutton is unposted and the
+next menubutton to the right is posted.
+
+Disabled menu entries are non-responsive: they don't activate and
+they ignore mouse button presses and releases.
+
+The behavior of menus can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 BUGS
+
+At present it isn't possible to use the
+option database to specify values for the options to individual
+entries.
+
+=head1 SEE ALSO
+
+L<Tk::callbacks|Tk::callbacks>
+
+=head1 KEYWORDS
+
+menu, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Menu/Item.pm b/Master/tlpkg/tlperl/lib/Tk/Menu/Item.pm
new file mode 100644
index 00000000000..167715f9382
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Menu/Item.pm
@@ -0,0 +1,178 @@
+package Tk::Menu::Item;
+
+require Tk::Menu;
+
+use Carp;
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/Tk/Menu/Item.pm#4 $
+
+sub PreInit
+{
+ # Dummy (virtual) method
+ my ($class,$menu,$minfo) = @_;
+}
+
+sub new
+{
+ my ($class,$menu,%minfo) = @_;
+ my $kind = $class->kind;
+ my $name = $minfo{'-label'};
+ if (defined $kind)
+ {
+ my $invoke = delete $minfo{'-invoke'};
+ if (defined $name)
+ {
+ # Use ~ in name/label to set -underline
+ if (defined($minfo{-label}) && !defined($minfo{-underline}))
+ {
+ my $cleanlabel = $minfo{-label};
+ my $underline = ($cleanlabel =~ s/^(.*)~/$1/) ? length($1): undef;
+ if (defined($underline) && ($underline >= 0))
+ {
+ $minfo{-underline} = $underline;
+ $name = $cleanlabel if ($minfo{-label} eq $name);
+ $minfo{-label} = $cleanlabel;
+ }
+ }
+ }
+ else
+ {
+ $name = $minfo{'-bitmap'} || $minfo{'-image'};
+ croak('No -label') unless defined($name);
+ $minfo{'-label'} = $name;
+ }
+ $class->PreInit($menu,\%minfo);
+ $menu->add($kind,%minfo);
+ $menu->invoke('last') if ($invoke);
+ }
+ else
+ {
+ $menu->add('separator');
+ }
+ return bless [$menu,$name],$class;
+}
+
+sub configure
+{
+ my $obj = shift;
+ my ($menu,$name) = @$obj;
+ my %args = @_;
+ $obj->[1] = $args{'-label'} if exists $args{'-label'};
+ $menu->entryconfigure($name,@_);
+}
+
+sub cget
+{
+ my $obj = shift;
+ my ($menu,$name) = @$obj;
+ $menu->entrycget($name,@_);
+}
+
+sub parentMenu
+{
+ my $obj = shift;
+ return $obj->[0];
+}
+
+# Default "kind" is a command
+sub kind { return 'command' }
+
+# Now the derived packages
+
+package Tk::Menu::Separator;
+use base qw(Tk::Menu::Item);
+Construct Tk::Menu 'Separator';
+sub kind { return undef }
+
+package Tk::Menu::Button;
+use base qw(Tk::Menu::Item);
+Construct Tk::Menu 'Button';
+Construct Tk::Menu 'Command';
+
+#package Tk::Menu::Command;
+#use base qw(Tk::Menu::Button);
+#Construct Tk::Menu 'Command';
+
+package Tk::Menu::Cascade;
+use base qw(Tk::Menu::Item);
+Construct Tk::Menu 'Cascade';
+sub kind { return 'cascade' }
+use Carp;
+
+sub PreInit
+{
+ my ($class,$menu,$minfo) = @_;
+ my $tearoff = delete $minfo->{-tearoff};
+ my $items = delete $minfo->{-menuitems};
+ my $widgetvar = delete $minfo->{-menuvar};
+ my $command = delete $minfo->{-postcommand};
+ my $name = delete $minfo->{'Name'};
+ $name = $minfo->{'-label'} unless defined $name;
+ my @args = ();
+ push(@args, '-tearoff' => $tearoff) if (defined $tearoff);
+ push(@args, '-menuitems' => $items) if (defined $items);
+ push(@args, '-postcommand' => $command) if (defined $command);
+ my $submenu = $minfo->{'-menu'};
+ unless (defined $submenu)
+ {
+ $minfo->{'-menu'} = $submenu = $menu->Menu(Name => $name, @args);
+ }
+ $$widgetvar = $submenu if (defined($widgetvar) && ref($widgetvar));
+}
+
+sub menu
+{
+ my ($self,%args) = @_;
+ my $w = $self->parentMenu;
+ my $menu = $self->cget('-menu');
+ if (!defined $menu)
+ {
+ require Tk::Menu;
+ $w->ColorOptions(\%args);
+ my $name = $self->cget('-label');
+ warn "Had to (re-)reate menu for $name";
+ $menu = $w->Menu(Name => $name, %args);
+ $self->configure('-menu'=>$menu);
+ }
+ else
+ {
+ $menu->configure(%args) if %args;
+ }
+ return $menu;
+}
+
+# Some convenience methods
+
+sub separator { shift->menu->Separator(@_); }
+sub command { shift->menu->Command(@_); }
+sub cascade { shift->menu->Cascade(@_); }
+sub checkbutton { shift->menu->Checkbutton(@_); }
+sub radiobutton { shift->menu->Radiobutton(@_); }
+
+sub pack
+{
+ my $w = shift;
+ if ($^W)
+ {
+ require Carp;
+ Carp::carp("Cannot 'pack' $w - done automatically")
+ }
+}
+
+package Tk::Menu::Checkbutton;
+use base qw(Tk::Menu::Item);
+Construct Tk::Menu 'Checkbutton';
+sub kind { return 'checkbutton' }
+
+package Tk::Menu::Radiobutton;
+use base qw(Tk::Menu::Item);
+Construct Tk::Menu 'Radiobutton';
+sub kind { return 'radiobutton' }
+
+package Tk::Menu::Item;
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Menu/Item.pod b/Master/tlpkg/tlperl/lib/Tk/Menu/Item.pod
new file mode 100644
index 00000000000..dabaadb8a58
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Menu/Item.pod
@@ -0,0 +1,96 @@
+
+=head1 NAME
+
+Tk::Menu::Item - Base class for Menu items
+
+=for pm Tk/Menu/Item.pm
+
+=for category Implementation
+
+=head1 SYNOPSIS
+
+ require Tk::Menu::Item;
+
+ my $but = $menu->Button(...);
+ $but->configure(...);
+ my $what = $but->cget();
+
+ package Whatever;
+ require Tk::Menu::Item;
+ @ISA = qw(Tk::Menu::Item);
+
+ sub PreInit
+ {
+ my ($class,$menu,$info) = @_;
+ $info->{'-xxxxx'} = ...
+ my $y = delete $info->{'-yyyy'};
+ }
+
+=head1 DESCRIPTION
+
+Tk::Menu::Item is the base class from which Tk::Menu::Button,
+Tk::Menu::Cascade, Tk::Menu::Radiobutton and Tk::Menu::Checkbutton are derived.
+There is also a Tk::Menu::Separator.
+
+Constructors are declared so that $menu-E<gt>Button(...) etc. do what you would
+expect.
+
+The C<-label> option is pre-processed allowing ~ to be prefixed to the character
+to derive a C<-underline> value. Thus
+
+ $menu->Button(-label => 'Goto ~Home',...)
+
+ is equivalent to
+
+ $menu->Button(-label => 'Goto Home', -underline => 6, ...)
+
+The C<Cascade> menu item creates a sub-menu and accepts
+these options:
+
+=over 4
+
+=item B<-menuitems>
+
+A list of items for the sub-menu.
+Within this list (which is also accepted by Menu and Menubutton) the first
+two elements of each item should be the "constructor" name and the label:
+
+ -menuitems => [
+ [Button => '~Quit', -command => [destroy => $mw]],
+ [Checkbutton => '~Oil', -variable => \$oil],
+ ]
+
+=item B<-postcommand>
+
+A callback to be invoked before posting the menu.
+
+=item B<-tearoff>
+
+Specifies whether sub-menu can be torn-off or not.
+
+=item B<-menuvar>
+
+Scalar reference that will be set to the newly-created sub-menu.
+
+=back
+
+The returned object is currently a blessed reference to an array of two items:
+the containing Menu and the 'label'.
+Methods C<configure> and C<cget> are mapped onto underlying C<entryconfigure>
+and C<entrycget>.
+
+The main purpose of the OO interface is to allow derived item classes to
+be defined which pre-set the options used to create a more basic item.
+
+=head1 BUGS
+
+This OO interface is very new. Using the label as the "key" is a problem
+for separaror items which don't have one. The alternative would be to
+use an index into the menu but that is a problem if items are deleted
+(or inserted other than at the end).
+
+There should probably be a PostInit entry point too, or a more widget like
+defered 'configure'.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Menubar.pm b/Master/tlpkg/tlperl/lib/Tk/Menubar.pm
new file mode 100644
index 00000000000..54b745130bf
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Menubar.pm
@@ -0,0 +1,15 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Menubar;
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Menubar.pm#6 $
+
+use Tk::Frame;
+use Tk::Menu;
+# use Carp;
+# carp "Tk::Menubar is obsolete" if $^W;
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Menubutton.pm b/Master/tlpkg/tlperl/lib/Tk/Menubutton.pm
new file mode 100644
index 00000000000..f3f4481b2ca
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Menubutton.pm
@@ -0,0 +1,401 @@
+# Converted from menu.tcl --
+#
+# This file defines the default bindings for Tk menus and menubuttons.
+# It also implements keyboard traversal of menus and implements a few
+# other utility procedures related to menus.
+#
+# @(#) menu.tcl 1.34 94/12/19 17:09:09
+#
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+
+package Tk::Menubutton;
+require Tk;
+
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/Menubutton/Menubutton.pm#4 $
+
+use base qw(Tk::Widget);
+
+Construct Tk::Widget 'Menubutton';
+
+import Tk qw(&Ev $XS_VERSION);
+
+bootstrap Tk::Menubutton;
+
+sub Tk_cmd { \&Tk::menubutton }
+
+sub InitObject
+{
+ my ($mb,$args) = @_;
+ my $menuitems = delete $args->{-menuitems};
+ my $tearoff = delete $args->{-tearoff};
+ $mb->SUPER::InitObject($args);
+ if ((defined($menuitems) || defined($tearoff)) && %$args)
+ {
+ $mb->configure(%$args);
+ %$args = ();
+ }
+ $mb->menu(-tearoff => $tearoff) if (defined $tearoff);
+ $mb->AddItems(@$menuitems) if (defined $menuitems)
+}
+
+
+#
+#-------------------------------------------------------------------------
+# Elements of tkPriv that are used in this file:
+#
+# cursor - Saves the -cursor option for the posted menubutton.
+# focus - Saves the focus during a menu selection operation.
+# Focus gets restored here when the menu is unposted.
+# inMenubutton - The name of the menubutton widget containing
+# the mouse, or an empty string if the mouse is
+# not over any menubutton.
+# popup - If a menu has been popped up via tk_popup, this
+# gives the name of the menu. Otherwise this
+# value is empty.
+# postedMb - Name of the menubutton whose menu is currently
+# posted, or an empty string if nothing is posted
+# A grab is set on this widget.
+# relief - Used to save the original relief of the current
+# menubutton.
+# window - When the mouse is over a menu, this holds the
+# name of the menu; it's cleared when the mouse
+# leaves the menu.
+#-------------------------------------------------------------------------
+#-------------------------------------------------------------------------
+# Overall note:
+# This file is tricky because there are four different ways that menus
+# can be used:
+#
+# 1. As a pulldown from a menubutton. This is the most common usage.
+# In this style, the variable tkPriv(postedMb) identifies the posted
+# menubutton.
+# 2. As a torn-off menu copied from some other menu. In this style
+# tkPriv(postedMb) is empty, and the top-level menu is no
+# override-redirect.
+# 3. As an option menu, triggered from an option menubutton. In thi
+# style tkPriv(postedMb) identifies the posted menubutton.
+# 4. As a popup menu. In this style tkPriv(postedMb) is empty and
+# the top-level menu is override-redirect.
+#
+# The various binding procedures use the state described above to
+# distinguish the various cases and take different actions in each
+# case.
+#-------------------------------------------------------------------------
+# Menu::Bind --
+# This procedure is invoked the first time the mouse enters a menubutton
+# widget or a menubutton widget receives the input focus. It creates
+# all of the class bindings for both menubuttons and menus.
+#
+# Arguments:
+# w - The widget that was just entered or just received
+# the input focus.
+# event - Indicates which event caused the procedure to be invoked
+# (Enter or FocusIn). It is used so that we can carry out
+# the functions of that event in addition to setting up
+# bindings.
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<FocusIn>','NoOp');
+ $mw->bind($class,'<Enter>','Enter');
+ $mw->bind($class,'<Leave>','Leave');
+ $mw->bind($class,'<1>','ButtonDown');
+ $mw->bind($class,'<Motion>',['Motion','up',Ev('X'),Ev('Y')]);
+ $mw->bind($class,'<B1-Motion>',['Motion','down',Ev('X'),Ev('Y')]);
+ $mw->bind($class,'<ButtonRelease-1>','ButtonUp');
+ $mw->bind($class,'<space>','PostFirst');
+ $mw->bind($class,'<Return>','PostFirst');
+ return $class;
+}
+
+sub ButtonDown
+{my $w = shift;
+ my $Ev = $w->XEvent;
+ $Tk::inMenubutton->Post($Ev->X,$Ev->Y) if (defined $Tk::inMenubutton);
+}
+
+sub PostFirst
+{
+ my $w = shift;
+ my $menu = $w->cget('-menu');
+ $w->Post();
+ $menu->FirstEntry() if (defined $menu);
+}
+
+
+# Enter --
+# This procedure is invoked when the mouse enters a menubutton
+# widget. It activates the widget unless it is disabled. Note:
+# this procedure is only invoked when mouse button 1 is *not* down.
+# The procedure B1Enter is invoked if the button is down.
+#
+# Arguments:
+# w - The name of the widget.
+sub Enter
+{
+ my $w = shift;
+ $Tk::inMenubutton->Leave if (defined $Tk::inMenubutton);
+ $Tk::inMenubutton = $w;
+ if ($w->cget('-state') ne 'disabled')
+ {
+ $w->configure('-state','active')
+ }
+}
+
+sub Leave
+{
+ my $w = shift;
+ $Tk::inMenubutton = undef;
+ return unless Tk::Exists($w);
+ if ($w->cget('-state') eq 'active')
+ {
+ $w->configure('-state','normal')
+ }
+}
+# Post --
+# Given a menubutton, this procedure does all the work of posting
+# its associated menu and unposting any other menu that is currently
+# posted.
+#
+# Arguments:
+# w - The name of the menubutton widget whose menu
+# is to be posted.
+# x, y - Root coordinates of cursor, used for positioning
+# option menus. If not specified, then the center
+# of the menubutton is used for an option menu.
+sub Post
+{
+ my $w = shift;
+ my $x = shift;
+ my $y = shift;
+ return if ($w->cget('-state') eq 'disabled');
+ return if (defined $Tk::postedMb && $w == $Tk::postedMb);
+ my $menu = $w->cget('-menu');
+ return unless (defined($menu) && $menu->index('last') ne 'none');
+
+ my $tearoff = $Tk::platform eq 'unix' || $menu->cget('-type') eq 'tearoff';
+
+ my $wpath = $w->PathName;
+ my $mpath = $menu->PathName;
+ unless (index($mpath,"$wpath.") == 0)
+ {
+ die "Cannot post $mpath : not a descendant of $wpath";
+ }
+
+ my $cur = $Tk::postedMb;
+ if (defined $cur)
+ {
+ Tk::Menu->Unpost(undef); # fixme
+ }
+ $Tk::cursor = $w->cget('-cursor');
+ $Tk::relief = $w->cget('-relief');
+ $w->configure('-cursor','arrow');
+ $w->configure('-relief','raised');
+ $Tk::postedMb = $w;
+ $Tk::focus = $w->focusCurrent;
+ $menu->activate('none');
+ $menu->GenerateMenuSelect;
+ # If this looks like an option menubutton then post the menu so
+ # that the current entry is on top of the mouse. Otherwise post
+ # the menu just below the menubutton, as for a pull-down.
+
+ eval
+ {local $SIG{'__DIE__'};
+ my $dir = $w->cget('-direction');
+ if ($dir eq 'above')
+ {
+ $menu->post($w->rootx, $w->rooty - $menu->ReqHeight);
+ }
+ elsif ($dir eq 'below')
+ {
+ $menu->post($w->rootx, $w->rooty + $w->Height);
+ }
+ elsif ($dir eq 'left')
+ {
+ my $x = $w->rootx - $menu->ReqWidth;
+ my $y = int((2*$w->rooty + $w->Height) / 2);
+ if ($w->cget('-indicatoron') == 1 && defined($w->cget('-textvariable')))
+ {
+ $menu->PostOverPoint($x,$y,$menu->FindName($w->cget('-text')))
+ }
+ else
+ {
+ $menu->post($x,$y);
+ }
+ }
+ elsif ($dir eq 'right')
+ {
+ my $x = $w->rootx + $w->Width;
+ my $y = int((2*$w->rooty + $w->Height) / 2);
+ if ($w->cget('-indicatoron') == 1 && defined($w->cget('-textvariable')))
+ {
+ $menu->PostOverPoint($x,$y,$menu->FindName($w->cget('-text')))
+ }
+ else
+ {
+ $menu->post($x,$y);
+ }
+ }
+ else
+ {
+ if ($w->cget('-indicatoron') == 1 && defined($w->cget('-textvariable')))
+ {
+ if (!defined($y))
+ {
+ $x = $w->rootx+$w->width/2;
+ $y = $w->rooty+$w->height/2
+ }
+ $menu->PostOverPoint($x,$y,$menu->FindName($w->cget('-text')))
+ }
+ else
+ {
+ $menu->post($w->rootx,$w->rooty+$w->height);
+ }
+ }
+ };
+ if ($@)
+ {
+ Tk::Menu->Unpost;
+ die $@
+ }
+
+ $Tk::tearoff = $tearoff;
+ if ($tearoff)
+ {
+ $menu->focus;
+ if ($w->viewable)
+ {
+ $w->SaveGrabInfo;
+ $w->grabGlobal;
+ }
+ }
+}
+# Motion --
+# This procedure handles mouse motion events inside menubuttons, and
+# also outside menubuttons when a menubutton has a grab (e.g. when a
+# menu selection operation is in progress).
+#
+# Arguments:
+# w - The name of the menubutton widget.
+# upDown - "down" means button 1 is pressed, "up" means
+# it isn't.
+# rootx, rooty - Coordinates of mouse, in (virtual?) root window.
+sub Motion
+{
+ my $w = shift;
+ my $upDown = shift;
+ my $rootx = shift;
+ my $rooty = shift;
+ return if (defined($Tk::inMenubutton) && $Tk::inMenubutton == $w);
+ my $new = $w->Containing($rootx,$rooty);
+ if (defined($Tk::inMenubutton))
+ {
+ if (!defined($new) || ($new != $Tk::inMenubutton && $w->toplevel != $new->toplevel))
+ {
+ $Tk::inMenubutton->Leave();
+ }
+ }
+ if (defined($new) && $new->IsMenubutton && $new->cget('-indicatoron') == 0 &&
+ $w->cget('-indicatoron') == 0)
+ {
+ if ($upDown eq 'down')
+ {
+ $new->Post($rootx,$rooty);
+ }
+ else
+ {
+ $new->Enter();
+ }
+ }
+}
+# ButtonUp --
+# This procedure is invoked to handle button 1 releases for menubuttons.
+# If the release happens inside the menubutton then leave its menu
+# posted with element 0 activated. Otherwise, unpost the menu.
+#
+# Arguments:
+# w - The name of the menubutton widget.
+
+sub ButtonUp {
+ my $w = shift;
+
+ my $tearoff = $Tk::platform eq 'unix' || (defined($w->cget('-menu')) &&
+ $w->cget('-menu')->cget('-type') eq 'tearoff');
+ if ($tearoff && (defined($Tk::postedMb) && $Tk::postedMb == $w)
+ && (defined($Tk::inMenubutton) && $Tk::inMenubutton == $w)) {
+ $Tk::postedMb->cget(-menu)->FirstEntry();
+ } else {
+ Tk::Menu->Unpost(undef);
+ }
+} # end ButtonUp
+
+# Some convenience methods
+
+sub menu
+{
+ my ($w,%args) = @_;
+ my $menu = $w->cget('-menu');
+ if (!defined $menu)
+ {
+ require Tk::Menu;
+ $w->ColorOptions(\%args) if ($Tk::platform eq 'unix');
+ $menu = $w->Menu(%args);
+ $w->configure('-menu'=>$menu);
+ }
+ else
+ {
+ $menu->configure(%args);
+ }
+ return $menu;
+}
+
+sub separator { require Tk::Menu::Item; shift->menu->Separator(@_); }
+sub command { require Tk::Menu::Item; shift->menu->Command(@_); }
+sub cascade { require Tk::Menu::Item; shift->menu->Cascade(@_); }
+sub checkbutton { require Tk::Menu::Item; shift->menu->Checkbutton(@_); }
+sub radiobutton { require Tk::Menu::Item; shift->menu->Radiobutton(@_); }
+
+sub AddItems
+{
+ shift->menu->AddItems(@_);
+}
+
+sub entryconfigure
+{
+ shift->menu->entryconfigure(@_);
+}
+
+sub entrycget
+{
+ shift->menu->entrycget(@_);
+}
+
+sub FindMenu
+{
+ my $child = shift;
+ my $char = shift;
+ my $ul = $child->cget('-underline');
+ if (defined $ul && $ul >= 0 && $child->cget('-state') ne 'disabled')
+ {
+ my $char2 = $child->cget('-text');
+ $char2 = substr("\L$char2",$ul,1) if (defined $char2);
+ if (!defined($char) || $char eq '' || (defined($char2) && "\l$char" eq $char2))
+ {
+ $child->PostFirst;
+ return $child;
+ }
+ }
+ return undef;
+}
+
+1;
+
+__END__
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Menubutton.pod b/Master/tlpkg/tlperl/lib/Tk/Menubutton.pod
new file mode 100644
index 00000000000..fcda3e958aa
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Menubutton.pod
@@ -0,0 +1,249 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Menubutton - Create and manipulate Menubutton widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$menubutton> = I<$parent>-E<gt>B<Menubutton>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground> B<-cursor> B<-highlightthickness> B<-takefocus>
+B<-activeforeground> B<-disabledforeground> B<-image> B<-text>
+B<-anchor> B<-font> B<-justify> B<-textvariable>
+B<-background> B<-foreground> B<-padx> B<-underline>
+B<-bitmap> B<-highlightbackground> B<-pady> B<-wraplength>
+B<-borderwidth> B<-highlightcolor> B<-relief>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Command-Line Name: B<-compound>
+
+=item Database Name: B<compound>
+
+=item Database Class: B<Compound>
+
+Specifies whether the button should display both an image and text,
+and if so, where the image should be placed relative to the text.
+Valid values for this option are B<bottom>, B<center>, B<left>,
+B<none>, B<right> and B<top>. The default value is B<none>, meaning
+that the button will display either an image or text, depending on the
+values of the -image and -bitmap options.
+
+=item Name: B<direction>
+
+=item Class: B<Height>
+
+=item Switch: B<-direction>
+
+Specifies where the menu is going to be popup up. B<above> tries to
+pop the menu above the menubutton. B<below> tries to pop the menu
+below the menubutton. B<left> tries to pop the menu to the left of
+the menubutton. B<right> tries to pop the menu to the right of the
+menu button. B<flush> pops the menu directly over the menubutton.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies a desired height for the menubutton.
+If an image or bitmap is being displayed in the menubutton then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in lines of text.
+If this option isn't specified, the menubutton's desired height is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=item Name: B<indicatorOn>
+
+=item Class: B<IndicatorOn>
+
+=item Switch: B<-indicatoron>
+
+The value must be a proper boolean value. If it is true then
+a small indicator rectangle will be displayed on the right side
+of the menubutton and the default menu bindings will treat this
+as an option menubutton. If false then no indicator will be
+displayed.
+
+=item Name: B<menu>
+
+=item Class: B<MenuName>
+
+=item Switch: B<-menu>
+
+Specifies the path name of the menu associated with this menubutton.
+The menu must be a child of the menubutton.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of three states for the menubutton: B<normal>, B<active>,
+or B<disabled>. In normal state the menubutton is displayed using the
+B<foreground> and B<background> options. The active state is
+typically used when the pointer is over the menubutton. In active state
+the menubutton is displayed using the B<activeForeground> and
+B<activeBackground> options. Disabled state means that the menubutton
+should be insensitive: the default bindings will refuse to activate
+the widget and will ignore mouse button presses.
+In this state the B<disabledForeground> and
+B<background> options determine how the button is displayed.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies a desired width for the menubutton.
+If an image or bitmap is being displayed in the menubutton then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in characters.
+If this option isn't specified, the menubutton's desired width is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Menubutton> method creates a new window (given by the
+$widget argument) and makes it into a menubutton widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the menubutton such as its colors, font,
+text, and initial relief. The B<menubutton> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A menubutton is a widget that displays a textual string, bitmap, or image
+and is associated with a menu widget.
+If text is displayed, it must all be in a single font, but it
+can occupy multiple lines on the screen (if it contains newlines
+or if wrapping occurs because of the B<wrapLength> option) and
+one of the characters may optionally be underlined using the
+B<underline> option. In normal usage, pressing
+mouse button 1 over the menubutton causes the associated menu to
+be posted just underneath the menubutton. If the mouse is moved over
+the menu before releasing the mouse button, the button release
+causes the underlying menu entry to be invoked. When the button
+is released, the menu is unposted.
+
+Menubuttons are typically organized into groups called menu bars
+that allow scanning:
+if the mouse button is pressed over one menubutton (causing it
+to post its menu) and the mouse is moved over another menubutton
+in the same menu bar without releasing the mouse button, then the
+menu of the first menubutton is unposted and the menu of the
+new menubutton is posted instead.
+
+There are several interactions between menubuttons and menus; see
+the B<menu> manual entry for information on various menu configurations,
+such as pulldown menus and option menus.
+
+=head1 WIDGET METHODS
+
+The B<Menubutton> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The B<menu> method returns the menu associated with the widget.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+=head1 DEFAULT BINDINGS
+
+Tk automatically creates class bindings for menubuttons that give them
+the following default behavior:
+
+=over 4
+
+=item [1]
+
+A menubutton activates whenever the mouse passes over it and deactivates
+whenever the mouse leaves it.
+
+=item [2]
+
+Pressing mouse button 1 over a menubutton posts the menubutton:
+its relief changes to raised and its associated menu is posted
+under the menubutton. If the mouse is dragged down into the menu
+with the button still down, and if the mouse button is then
+released over an entry in the menu, the menubutton is unposted
+and the menu entry is invoked.
+
+=item [3]
+
+If button 1 is pressed over a menubutton and then released over that
+menubutton, the menubutton stays posted: you can still move the mouse
+over the menu and click button 1 on an entry to invoke it.
+Once a menu entry has been invoked, the menubutton unposts itself.
+
+=item [4]
+
+If button 1 is pressed over a menubutton and then dragged over some
+other menubutton, the original menubutton unposts itself and the
+new menubutton posts.
+
+=item [5]
+
+If button 1 is pressed over a menubutton and released outside
+any menubutton or menu, the menubutton unposts without invoking
+any menu entry.
+
+=item [6]
+
+When a menubutton is posted, its associated menu claims the input
+focus to allow keyboard traversal of the menu and its submenus.
+See the B<menu> documentation for details on these bindings.
+
+=item [7]
+
+If the B<underline> option has been specified for a menubutton
+then keyboard traversal may be used to post the menubutton:
+Alt+I<x>, where I<x> is the underlined character (or its
+lower-case or upper-case equivalent), may be typed in any window
+under the menubutton's toplevel to post the menubutton.
+
+=item [8]
+
+The F10 key may be typed in any window to post the first menubutton
+under its toplevel window that isn't disabled.
+
+=item [9]
+
+If a menubutton has the input focus, the space and return keys
+post the menubutton.
+
+If the menubutton's state is B<disabled> then none of the above
+actions occur: the menubutton is completely non-responsive.
+
+The behavior of menubuttons can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 KEYWORDS
+
+menubutton, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Message.pm b/Master/tlpkg/tlperl/lib/Tk/Message.pm
new file mode 100644
index 00000000000..63b0f170097
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Message.pm
@@ -0,0 +1,20 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Message;
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Message.pm#6 $
+
+require Tk::Widget;
+
+use base qw(Tk::Widget);
+
+Construct Tk::Widget 'Message';
+
+sub Tk_cmd { \&Tk::message }
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Message.pod b/Master/tlpkg/tlperl/lib/Tk/Message.pod
new file mode 100644
index 00000000000..9b0d67f3118
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Message.pod
@@ -0,0 +1,151 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Message - Create and manipulate Message widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$message> = I<$parent>-E<gt>B<Message>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-anchor> B<-font> B<-highlightthickness> B<-takefocus>
+B<-background> B<-foreground> B<-padx> B<-text>
+B<-borderwidth> B<-highlightbackground> B<-pady> B<-textvariable>
+B<-cursor> B<-highlightcolor> B<-relief> B<-width>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<aspect>
+
+=item Class: B<Aspect>
+
+=item Switch: B<-aspect>
+
+Specifies a non-negative integer value indicating desired
+aspect ratio for the text. The aspect ratio is specified as
+100*width/height. 100 means the text should
+be as wide as it is tall, 200 means the text should
+be twice as wide as it is tall, 50 means the text should
+be twice as tall as it is wide, and so on.
+Used to choose line length for text if B<width> option
+isn't specified.
+Defaults to 150.
+
+=item Name: B<justify>
+
+=item Class: B<Justify>
+
+=item Switch: B<-justify>
+
+Specifies how to justify lines of text.
+Must be one of B<left>, B<center>, or B<right>. Defaults
+to B<left>.
+This option works together with the B<anchor>, B<aspect>,
+B<padX>, B<padY>, and B<width> options to provide a variety
+of arrangements of the text within the window.
+The B<aspect> and B<width> options determine the amount of
+screen space needed to display the text.
+The B<anchor>, B<padX>, and B<padY> options determine where this
+rectangular area is displayed within the widget's window, and the
+B<justify> option determines how each line is displayed within that
+rectangular region.
+For example, suppose B<anchor> is B<e> and B<justify> is
+B<left>, and that the message window is much larger than needed
+for the text.
+The the text will displayed so that the left edges of all the lines
+line up and the right edge of the longest line is B<padX> from
+the right side of the window; the entire text block will be centered
+in the vertical span of the window.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the length of lines in the window.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+If this option has a value greater than zero then the B<aspect>
+option is ignored and the B<width> option determines the line
+length.
+If this option has a value less than or equal to zero, then
+the B<aspect> option determines the line length.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Message> method creates a new window (given by the
+$widget argument) and makes it into a message widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the message such as its colors, font,
+text, and initial relief. The B<message> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A message is a widget that displays a textual string. A message
+widget has three special features. First, it breaks up
+its string into lines in order to produce a given aspect ratio
+for the window. The line breaks are chosen at word boundaries
+wherever possible (if not even a single word would fit on a
+line, then the word will be split across lines). Newline characters
+in the string will force line breaks; they can be used, for example,
+to leave blank lines in the display.
+
+The second feature of a message widget is justification. The text
+may be displayed left-justified (each line starts at the left side of
+the window), centered on a line-by-line basis, or right-justified
+(each line ends at the right side of the window).
+
+The third feature of a message widget is that it handles control
+characters and non-printing characters specially. Tab characters
+are replaced with enough blank space to line up on the next
+8-character boundary. Newlines cause line breaks. Other control
+characters (ASCII code less than 0x20) and characters not defined
+in the font are displayed as a four-character sequence B<\x>I<hh> where
+I<hh> is the two-digit hexadecimal number corresponding to
+the character. In the unusual case where the font doesn't contain
+all of the characters in ``0123456789abcdef\x'' then control
+characters and undefined characters are not displayed at all.
+
+=head1 WIDGET METHODS
+
+The B<Message> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+=head1 DEFAULT BINDINGS
+
+When a new message is created, it has no default event bindings:
+messages are intended for output purposes only.
+
+=head1 BUGS
+
+Tabs don't work very well with text that is centered or right-justified.
+The most common result is that the line is justified wrong.
+
+=head1 KEYWORDS
+
+message, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/MsgBox.pm b/Master/tlpkg/tlperl/lib/Tk/MsgBox.pm
new file mode 100644
index 00000000000..9c753cf4e33
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/MsgBox.pm
@@ -0,0 +1,506 @@
+# -*- perl -*-
+
+# msgbox.tcl --
+#
+# Implements messageboxes for platforms that do not have native
+# messagebox support.
+#
+# RCS: @(#) $Id: msgbox.tcl,v 1.30 2006/01/25 18:22:04 dgp Exp $
+#
+# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+# Translated to Perl/Tk by Slaven Rezic
+
+package Tk::MsgBox;
+
+use Tk qw(Ev);
+
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.002';
+
+use base qw(Tk::Toplevel);
+Construct Tk::Widget 'MsgBox';
+
+sub import {
+ if (defined $_[1] and $_[1] eq 'as_default') {
+ local $^W = 0;
+ package Tk;
+ *tk_messageBox = sub {
+ Tk::MsgBox::_tk_messageBox(@_);
+ };
+ }
+}
+
+use vars qw(%image);
+
+sub ClassInit {
+ my($class, $mw) = @_;
+ $class->SUPER::ClassInit($mw);
+
+ $image{b1}{$mw} = $mw->Bitmap(-foreground => 'black',
+ -data => "#define b1_width 32\n#define b1_height 32
+static unsigned char q1_bits[] = {
+ 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x07, 0xe0, 0x00, 0xc0, 0x00, 0x00, 0x03,
+ 0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10,
+ 0x04, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40,
+ 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
+ 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
+ 0x01, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40,
+ 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x08,
+ 0x60, 0x00, 0x00, 0x04, 0x80, 0x03, 0x80, 0x03, 0x00, 0x0c, 0x78, 0x00,
+ 0x00, 0x30, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00,
+ 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};");
+
+ $image{b2}{$mw} = $mw->Bitmap(-foreground => 'white',
+ -data => "#define b2_width 32\n#define b2_height 32
+static unsigned char b2_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00,
+ 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f,
+ 0xf8, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
+ 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f,
+ 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f,
+ 0xfe, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
+ 0xf8, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0x07,
+ 0x80, 0xff, 0xff, 0x03, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xf0, 0x07, 0x00,
+ 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};");
+
+ $image{'q'}{$mw} = $mw->Bitmap(-foreground => 'blue',
+ -data => "#define q_width 32\n#define q_height 32
+static unsigned char q_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00,
+ 0x00, 0x10, 0x0f, 0x00, 0x00, 0x18, 0x1e, 0x00, 0x00, 0x38, 0x1e, 0x00,
+ 0x00, 0x38, 0x1e, 0x00, 0x00, 0x10, 0x0f, 0x00, 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
+ 0x00, 0xe0, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};");
+
+ $image{'i'}{$mw} = $mw->Bitmap(-foreground => 'blue',
+ -data => "#define i_width 32\n#define i_height 32
+static unsigned char i_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00,
+ 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf8, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00,
+ 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};");
+
+ $image{'w1'}{$mw} = $mw->Bitmap(-foreground => 'black',
+ -data => "#define w1_width 32\n#define w1_height 32
+static unsigned char w1_bits[] = {
+ 0x00, 0x80, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x20, 0x04, 0x00,
+ 0x00, 0x10, 0x04, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x08, 0x08, 0x00,
+ 0x00, 0x08, 0x10, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x04, 0x20, 0x00,
+ 0x00, 0x02, 0x20, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x01, 0x40, 0x00,
+ 0x00, 0x01, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x01,
+ 0x40, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x02,
+ 0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08,
+ 0x08, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10,
+ 0x04, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x40,
+ 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x20,
+ 0xfc, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00};");
+
+ $image{'w2'}{$mw} = $mw->Bitmap(-foreground => 'yellow',
+ -data => "#define w2_width 32\n#define w2_height 32
+static unsigned char w2_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00,
+ 0x00, 0xe0, 0x03, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x00,
+ 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x1f, 0x00,
+ 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xfe, 0x3f, 0x00,
+ 0x00, 0xfe, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x00,
+ 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0x01,
+ 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07,
+ 0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x0f,
+ 0xf8, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x3f,
+ 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x1f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};");
+
+ $image{'w3'}{$mw} = $mw->Bitmap(-foreground => 'black',
+ -data => "#define w3_width 32\n#define w3_height 32
+static unsigned char w3_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xc0, 0x03, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00,
+ 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00,
+ 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00,
+ 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00,
+ 0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};");
+
+ $class;
+}
+
+# ::tk::MessageBox --
+#
+# Pops up a messagebox with an application-supplied message with
+# an icon and a list of buttons. This procedure will be called
+# by tk_messageBox if the platform does not have native
+# messagebox support, or if the particular type of messagebox is
+# not supported natively.
+#
+# Color icons are used on Unix displays that have a color
+# depth of 4 or more and $tk_strictMotif is not on.
+#
+# This procedure is a private procedure shouldn't be called
+# directly. Call tk_messageBox instead.
+#
+# See the user documentation for details on what tk_messageBox does.
+#
+sub Populate {
+ my($w, $args) = @_;
+
+ $w->SUPER::Populate($args);
+
+ {
+ my $icon = delete $args->{-icon};
+ if (!defined $icon) {
+ $icon = 'info';
+ }
+ if (!grep {$icon eq $_} qw(info warning error question)) {
+ die "bad -icon value \"$icon\": must be error, info, question, or warning";
+ }
+ if ($Tk::platform eq 'aqua') {
+ if ($icon eq 'error') {
+ $icon = 'stop';
+ } elsif ($icon eq 'warning') {
+ $icon = 'caution';
+ } elsif ($icon eq 'info') {
+ $icon = 'note';
+ }
+ }
+ $w->{Configure}{icon} = $icon;
+ }
+
+ {
+ my $type = delete $args->{-type};
+ if (!defined $type) {
+ $type = 'ok';
+ }
+ if ($type =~ m{^abortretryignore$}i) {
+ $w->{Names} = [qw(abort retry ignore)];
+ $w->{Labels} = [qw(&Abort &Retry &Ignore)];
+ $w->{Cancel} = 'abort';
+ } elsif ($type =~ m{^ok$}i) {
+ $w->{Names} = [qw(ok)];
+ $w->{Labels} = [qw(&OK)];
+ $w->{Cancel} = 'ok';
+ } elsif ($type =~ m{^okcancel$}i) {
+ $w->{Names} = [qw(ok cancel)];
+ $w->{Labels} = [qw(&OK &Cancel)];
+ $w->{Cancel} = 'cancel';
+ } elsif ($type =~ m{^retrycancel$}i) {
+ $w->{Names} = [qw(retry cancel)];
+ $w->{Labels} = [qw(&Retry &Cancel)];
+ $w->{Cancel} = 'cancel';
+ } elsif ($type =~ m{^yesno$}i) {
+ $w->{Names} = [qw(yes no)];
+ $w->{Labels} = [qw(&Yes &No)];
+ $w->{Cancel} = 'no';
+ } elsif ($type =~ m{^yesnocancel$}i) {
+ $w->{Names} = [qw(yes no cancel)];
+ $w->{Labels} = [qw(&Yes &No &Cancel)];
+ $w->{Cancel} = 'cancel';
+ } else {
+ die "bad -type value \"$type\": must be abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel";
+ }
+ $w->{Configure}{type} = $type;
+ }
+
+ $w->iconname('Dialog');
+
+ $w->withdraw;
+ #
+ # The default value of the title is space (" ") not the empty string
+ # because for some window managers, a
+ # wm title .foo ""
+ # causes the window title to be "foo" instead of the empty string.
+ #
+ $w->ConfigSpecs
+ ('-default' => ['PASSIVE',undef,undef,''],
+ '-detail' => ['PASSIVE',undef,undef,''],
+ '-message' => ['PASSIVE',undef,undef,''],
+ #not needed, we can do it different way in perl: '-parent' => ['PASSIVE' ...],
+ '-title' => ['PASSIVE',undef,undef," "],
+ );
+ $w;
+}
+
+sub Show {
+ my $w = shift;
+
+ # If reusing the widget:
+ $_->destroy for ($w->children);
+
+ my @buttons;
+ for my $i (0 .. $#{ $w->{Names} }) {
+ my($name, $lab) = ($w->{Names}[$i], $w->{Labels}[$i]);
+ push @buttons, [$name, -text => $lab]; # XXX missing: mc (message catalog)
+ }
+
+ # If no default button was specified, the default default is the
+ # first button (Bug: 2218).
+
+ if ($w->cget(-default) eq "") {
+ $w->configure(-default => $buttons[0][0]);
+ }
+
+ my $valid = 0;
+ foreach my $btn (@buttons) {
+ if ($btn->[0] eq $w->cget(-default)) {
+ $valid = 1;
+ last;
+ }
+ }
+ if (!$valid) {
+ die "invalid default button \"" . $w->cget(-default) . "\"";
+ }
+
+ ### skip the step 2, not needed in Perl/Tk
+
+ # 3. Create the top-level window and divide it into top
+ # and bottom parts.
+
+ $w->title($w->cget(-title));
+ $w->protocol('WM_DELETE_WINDOW' => sub {
+ $w->Subwidget($w->{Cancel})->invoke;
+ });
+ # There is only one background colour for the whole dialog
+ my $bg = $w->cget(-background);
+
+ # Message boxes should be transient with respect to their parent so that
+ # they always stay on top of the parent window. But some window managers
+ # will simply create the child window as withdrawn if the parent is not
+ # viewable (because it is withdrawn or iconified). This is not good for
+ # "grab"bed windows. So only make the message box transient if the parent
+ # is viewable.
+ #
+ if ($w->parent->toplevel->viewable) {
+ $w->transient($w->parent);
+ }
+
+#XXX?
+# if {$windowingsystem eq "aqua"} {
+# unsupported::MacWindowStyle style $w dBoxProc # XXX what's that?
+# }
+
+ my $w_bot = $w->Frame(-background => $bg)->pack(qw(-side bottom -fill both));
+#XXX??? NYI? $w_bot->gridAnchor('center');
+ my $w_top = $w->Frame(-background => $bg)->pack(qw(-side top -fill both -expand 1));
+ if ($Tk::platform ne "aqua") {
+ $w_bot->configure(qw(-relief raised -bd 1));
+ $w_top->configure(qw(-relief raised -bd 1));
+ }
+
+ # 4. Fill the top part with bitmap, message and detail (use the
+ # option database for -wraplength and -font so that they can be
+ # overridden by the caller).
+
+ $w->optionAdd('*MsgBox.msg.wrapLength', '3i', 'widgetDefault');
+ $w->optionAdd('*MsgBox.dtl.wrapLength', '3i', 'widgetDefault');
+ if ($Tk::platform eq "aqua") {
+ $w->optionAdd('*MsgBox.msg.font', 'system', 'widgetDefault');
+ $w->optionAdd('*MsgBox.dtl.font', 'system', 'widgetDefault');
+ } else {
+ $w->optionAdd('*MsgBox.msg.font', [qw(Times 14)], 'widgetDefault');
+ $w->optionAdd('*MsgBox.dtl.font', [qw(Times 10)], 'widgetDefault');
+ }
+
+ my $w_msg = $w->Label(qw(Name msg -anchor nw -justify left),
+ -text => $w->cget(-message),
+ -background => $bg,
+ );
+ my $w_dtl;
+ if ($w->cget(-detail) ne "") {
+ $w_dtl = $w->Label(qw(Name dtl -anchor nw -justify left),
+ -text => $w->cget(-detail),
+ -background => $bg,
+ );
+ }
+ my $w_bitmap;
+ my $icon = $w->{Configure}{icon};
+ if ($icon ne "") {
+ if ($Tk::platform eq "aqua"
+ || ($w->depth < 4) || $Tk::strictMotif) {
+ $w_bitmap = $w->Label(Name => "bitmap",
+ -bitmap => $icon,
+ -background => $bg,
+ );
+ } else {
+ $w_bitmap = $w->Canvas(Name => "bitmap",
+ qw(-width 32 -height 32 -highlightthickness 0),
+ -background => $bg,
+ );
+ my $mw = $w->MainWindow;
+ if ($icon eq 'error') {
+ $w_bitmap->create(qw(oval 0 0 31 31 -fill red -outline black));
+ $w_bitmap->create(qw(line 9 9 23 23 -fill white -width 4));
+ $w_bitmap->create(qw(line 9 23 23 9 -fill white -width 4));
+ } elsif ($icon eq 'info') {
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{b1}{$mw});
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{b2}{$mw});
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{i}{$mw});
+ } elsif ($icon eq 'question') {
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{b1}{$mw});
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{b2}{$mw});
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{'q'}{$mw});
+ } else {
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{w1}{$mw});
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{w2}{$mw});
+ $w_bitmap->create(qw(image 0 0 -anchor nw),
+ -image => $image{w3}{$mw});
+ }
+ }
+ } else {
+ # Unlike in Tcl/Tk, a placeholder is needed here
+ $w_bitmap = $w->Label;
+ }
+ Tk::grid($w_bitmap, $w_msg, -in => $w_top, qw(-sticky news -padx 2m -pady 2m));
+ $w_top->gridColumnconfigure(qw(1 -weight 1));
+ if (Tk::Exists($w_dtl)) {
+ Tk::grid('^', $w_dtl, -in => $w_top, qw(-sticky news -padx 2m), -pady => [0, '2m']);
+ $w_top->gridRowconfigure(qw(1 -weight 1));
+ } else {
+ $w_top->gridRowconfigure(qw(0 -weight 1));
+ }
+
+ # 5. Create a row of buttons at the bottom of the dialog.
+
+ my $i = 0;
+ for my $but (@buttons) {
+ my($name, @opts) = @$but;
+ if (!@opts) {
+ # Capitalize the first letter of $name
+ @opts = (-text => ucfirst $name);
+ }
+
+ my $cw = $w->AmpWidget('Button', -padx => '3m', @opts,
+ -command => sub { $w->{selectedButton} = $name });
+ $w->Advertise($name => $cw);
+ if ($name eq $w->cget(-default)) {
+ $cw->configure(qw(-default active));
+ } else {
+ $cw->configure(qw(-default normal));
+ }
+ $cw->grid(-in => $w_bot, -row => 0, -column => $i,
+ qw(-padx 3m -pady 2m -sticky ew));
+ $w_bot->gridColumnconfigure($i, -uniform => 'buttons');
+ $i++;
+
+ # create the binding for the key accelerator, based on the underline
+ #
+ # set underIdx [$w.$name cget -under]
+ # if {$underIdx >= 0} {
+ # set key [string index [$w.$name cget -text] $underIdx]
+ # bind $w <Alt-[string tolower $key]> [list $w.$name invoke]
+ # bind $w <Alt-[string toupper $key]> [list $w.$name invoke]
+ # }
+ }
+ $w->bind('<Alt-Key>', [sub { $w->AltKeyInDialog($_[1]) }, Ev('%A')]);
+
+ if ($w->cget(-default) ne "") {
+ $w->bind('<FocusIn>', sub {
+ my $e = shift->XEvent;
+ my $w = $e->W;
+ if ($w->isa('Tk::Button')) {
+ $w->configure(qw(-default active));
+ }
+ });
+ $w->bind('<FocusOut>', sub {
+ my $e = shift->XEvent;
+ my $w = $e->W;
+ if ($w->isa('Tk::Button')) {
+ $w->configure(qw(-default normal));
+ }
+ });
+ }
+
+ # 6. Create bindings for <Return>, <Escape> and <Destroy> on the dialog
+
+ $w->bind('<Return>' => sub {
+ my $e = shift->XEvent;
+ my $w = $e->W;
+ if ($w->isa('Tk::Button')) {
+ $w->invoke;
+ }
+ });
+
+ # Invoke the designated cancelling operation
+ $w->bind('<Escape>' => sub { $w->Subwidget($w->{Cancel})->invoke });
+
+ # At <Destroy> the buttons have vanished, so must do this directly.
+ $w_msg->bind('<Destroy>' => sub { $w->{selectedButton} = $w->{Cancel} });
+
+ # 7. Withdraw the window, then update all the geometry information
+ # so we know how big it wants to be, then center the window in the
+ # display and de-iconify it.
+
+ # ::tk::PlaceWindow $w widget $data(-parent)
+ $w->withdraw;
+ $w->Popup;
+
+ # 8. Set a grab and claim the focus too.
+
+ my $focus;
+ if ($w->cget(-default) ne "") {
+ $focus = $w->Subwidget($w->cget(-default));
+ } else {
+ $focus = $w;
+ }
+ $w->SetFocusGrab($focus);
+
+ # 9. Wait for the user to respond, then restore the focus and
+ # return the index of the selected button. Restore the focus
+ # before deleting the window, since otherwise the window manager
+ # may take the focus away so we can't redirect it. Finally,
+ # restore any grab that was in effect.
+
+ $w->waitVariable(\$w->{selectedButton});
+ # Copy the result now so any <Destroy> that happens won't cause
+ # trouble
+ my $result = $w->{selectedButton};
+
+ $w->RestoreFocusGrab($focus, 'withdraw');
+
+ return $result;
+}
+
+sub _tk_messageBox {
+ my(%args) = @_;
+ my $parent = delete $args{-parent};
+ my $md = $parent->MsgBox(%args);
+ my $an = $md->Show;
+ $md->destroy;
+ $an;
+}
+
+1;
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/MsgBox.pod b/Master/tlpkg/tlperl/lib/Tk/MsgBox.pod
new file mode 100644
index 00000000000..6f5536cf89c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/MsgBox.pod
@@ -0,0 +1,83 @@
+
+=head1 NAME
+
+Tk::MsgBox - create and manipulate a message dialog
+
+=for pm Tk/MsgBox.pm
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+ use Tk::MsgBox
+ ...
+ $d = $top->MsgBox(-title => "Title", -type => "okcancel");
+ ...
+ $button = $d->Show;
+
+=head1 DESCRIPTION
+
+B<MsgBox> is a simple dialog with predefined buttons.
+
+=head1 OPTIONS
+
+The options recognized by B<MsgBox> are as follows:
+
+=over 4
+
+=item B<-icon>
+
+Specify the icon of the MsgBox. Valid values are B<error>, B<info>,
+B<question>, or B<warning>.
+
+=item B<-type>
+
+Specify the type of the MsgBox. Valid values are B<abortretryignore>,
+B<ok>, B<okcancel>, B<retrycancel>, B<yesno>, or B<yesnocancel>. The
+type determines the buttons to be shown.
+
+=item B<-default>
+
+Specify the default button. This must be one of B<abort>, B<retry>,
+B<ignore>, B<ok>, B<cancel>, B<yes>, or B<no>, depending on the type
+of the MsgBox previously specified.
+
+=item B<-detail>
+
+Specify text for the detail region of the MsgBox.
+
+=item B<-message>
+
+Specify the message text of the MsgBox.
+
+=item B<-title>
+
+Specify the title of the MsgBox.
+
+=back
+
+=head1 METHODS
+
+B<MsgBox> supports only one method as of now:
+
+=over 4
+
+=item B<Show()>
+
+Displays the MsgBox until the user invokes one of the buttons. Returns
+the name of the button invoked.
+
+=back
+
+=head1 AUTHOR
+
+Translated from Tcl/Tk by B<Slaven Rezic> srezic@cpan.org
+
+This code is distributed under the same terms as Perl.
+
+=head1 SEE ALSO
+
+L<Tk::messageBox>, L<Tk::DialogBox>, L<Tk::Dialog>.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Mwm.pod b/Master/tlpkg/tlperl/lib/Tk/Mwm.pod
new file mode 100644
index 00000000000..e9c09cd0358
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Mwm.pod
@@ -0,0 +1,109 @@
+
+=head1 NAME
+
+Tk::Mwm - Communicate with the Motif(tm) window manager.
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+S< >B<use Tk::Mwm;>
+
+S< >I<$toplevel>-E<gt>B<mwm>I<Option>?(I<args>)?
+
+S< >I<$toplevel>-E<gt>B<mwm>(I<option> ?,I<args>?)
+
+=head1 DESCRIPTION
+
+Interface to special extentions supported by mwm.
+
+=head1 METHODS
+
+=over 4
+
+=item I<$toplevel>-E<gt>B<mwmDecoration>?(?option??=E<gt>value? ?,...?)?
+
+When no options are given, this method returns the values of all the
+decorations options for the toplevel window with the I<$toplevel>.
+When only one option is given without specifying the value, the
+current value of that option is returned.
+When more than one "option-value" pairs are passed to this method,
+the specified values will be assigned to the corresponding options. As
+a result, the appearance of the Motif decorations around the toplevel
+window will be changed.
+Possible options are: B<-border>, B<-menu>, B<-maximize>,
+B<-minimize>, B<-resizeh> and B<-title>. The value must be a
+Boolean value. The values returned by this command are undefined when
+the window is not managed by mwm.
+
+=item I<$toplevel>-E<gt>B<mwmIsmwmrunning>
+
+This returns value is true if mwm is running on the screen where the specified
+window is located, false otherwise.
+
+=item I<$toplevel>-E<gt>B<mwmProtocol>
+
+When no additional options are given, this method returns all
+protocols associated with this toplevel window.
+
+=item I<$toplevel>-E<gt>B<mwmProtocol>(B<activate> =E<gt> I<protocol_name>)
+
+Activate the mwm protocol message in mwm's menu.
+
+=item I<$toplevel>-E<gt>B<MwmProtocol>(B<add> =E<gt> I<protocol_name>, I<menu_message>)
+
+Add a new mwm protocol message for this toplevel window. The
+message is identified by the string name specified in
+I<protocol_name>. A menu item will be added into mwm's menu as
+specified by I<menu_message>. Once a new mwm protocol message is
+added to a toplevel, it can be caught by the TK B<protocol>
+method. Here is an example:
+
+S< >I<$toplevel>-E<gt>B<mwmProtocol>(B<'add'> =E<gt> 'MY_PRINT_HELLO', '"Print Hello" _H CtrlE<lt>KeyE<gt>H');
+
+S< >I<$toplevel>-E<gt>B<protocol>(B<'MY_PRINT_HELLO'> =E<gt> sub {print "Hello"});
+
+=item I<$toplevel>-E<gt>B<mwmProtocol>(B<'deactivate'> =E<gt> I<protocol_name>)
+
+Deactivate the mwm protocol message in mwm's menu.
+
+=item I<$toplevel>-E<gt>B<mwmProtocol>(B<'delete'> =E<gt> I<protocol_name>)
+
+Delete the mwm protocol message from mwm's menu. Please note that the
+window manager protocol handler associated with this protocol (by the
+B<protocol> method) is not deleted automatically. You have to
+delete the protocol handle explicitly. E.g.:
+
+S< >I<$mw>-E<gt>B<mwmProtocol>(B<'delete'> =E<gt> 'MY_PRINT_HELLO');
+
+S< >I<$mw>-E<gt>B<protocol>(B<'MY_PRINT_HELLO'> =E<gt> '');
+
+=back
+
+=head1 BUGS
+
+This is a Tix extension which perl/Tk has adopted. It has not been
+tested as perl/Tk's author has not got round to installing a Motif Window
+Manager.
+
+On some versions of mwm, the B<-border> will not disappear unless
+B<-resizeh> is turned off. Also, the B<-title> will not disappear
+unless all of B<-title>, B<-menu>, B<-maximize> and
+B<-minimize> are turned off.
+
+=head1 SEE ALSO
+
+L<Tk::Wm|Tk::Wm>
+L<Tk::tixWm|Tk::tixWm>
+L<Tk::Toplevel|Tk::Toplevel>
+
+=head1 KEYWORDS
+
+window manager, mwm, TIX
+
+=head1 AUTHOR
+
+Ioi Kim Lam - ioi@graphics.cis.upenn.edu
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/NBFrame.pm b/Master/tlpkg/tlperl/lib/Tk/NBFrame.pm
new file mode 100644
index 00000000000..0e45251f852
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/NBFrame.pm
@@ -0,0 +1,20 @@
+package Tk::NBFrame;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/NBFrame/NBFrame.pm#4 $
+
+use Tk qw($XS_VERSION);
+
+use base qw(Tk::Widget);
+
+Construct Tk::Widget 'NBFrame';
+
+bootstrap Tk::NBFrame;
+
+sub Tk_cmd { \&Tk::nbframe }
+
+Tk::Methods qw(activate add delete focus info geometryinfo identify
+ move pagecget pageconfigure);
+
+1;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/NoteBook.pm b/Master/tlpkg/tlperl/lib/Tk/NoteBook.pm
new file mode 100644
index 00000000000..a1f2eedb09e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/NoteBook.pm
@@ -0,0 +1,480 @@
+package Tk::NoteBook;
+#
+# Implementation of NoteBook widget.
+# Derived from NoteBook.tcl in Tix 4.0
+
+# Contributed by Rajappa Iyer <rsi@earthling.net>
+# Hacked by Nick for 'menu' traversal.
+# Restructured by Nick
+
+use vars qw($VERSION);
+
+#$VERSION = sprintf '4.%03d', q$Revision: #9 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.011';
+require Tk::NBFrame;
+
+use base qw(Tk::Derived Tk::NBFrame);
+Tk::Widget->Construct('NoteBook');
+use strict;
+
+use Tk qw(Ev);
+
+use Carp;
+require Tk::Frame;
+
+sub TraverseToNoteBook;
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ # class binding does not work right due to extra level of
+ # widget hierachy
+ $mw->bind($class,'<ButtonPress-1>', ['MouseDown',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<ButtonRelease-1>', ['MouseUp',Ev('x'),Ev('y')]);
+
+ $mw->bind($class,'<B1-Motion>', ['MouseDown',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<Left>', ['FocusNext','prev']);
+ $mw->bind($class,'<Right>', ['FocusNext','next']);
+
+ $mw->bind($class,'<Return>', 'SetFocusByKey');
+ $mw->bind($class,'<space>', 'SetFocusByKey');
+ return $class;
+}
+
+sub raised
+{
+ return shift->{'topchild'};
+}
+
+sub Populate
+{
+ my ($w, $args) = @_;
+
+ $w->SUPER::Populate($args);
+ $w->{'pad-x1'} = undef;
+ $w->{'pad-x2'} = undef;
+ $w->{'pad-y1'} = undef;
+ $w->{'pad-y2'} = undef;
+
+ $w->{'windows'} = [];
+ $w->{'nWindows'} = 0;
+ $w->{'minH'} = 1;
+ $w->{'minW'} = 1;
+
+ $w->{'counter'} = 0;
+ $w->{'resize'} = 0;
+
+ $w->ConfigSpecs(-ipadx => ['PASSIVE', 'ipadX', 'Pad', 0],
+ -ipady => ['PASSIVE', 'ipadY', 'Pad', 0],
+ -takefocus => ['SELF', 'takeFocus', 'TakeFocus', 0],
+ -dynamicgeometry => ['PASSIVE', 'dynamicGeometry', 'DynamicGeometry', 0]);
+
+ # SetBindings
+ $w->bind('<Configure>','MasterGeomProc');
+
+ $args->{-slave} = 1;
+ $args->{-takefocus} = 1;
+ $args->{-relief} = 'raised';
+
+ $w->QueueResize;
+}
+
+
+#---------------------------
+# Public methods
+#---------------------------
+
+sub page_widget
+{
+ my $w = shift;
+ $w->{'_pages_'} = {} unless exists $w->{'_pages_'};
+ my $h = $w->{'_pages_'};
+ if (@_)
+ {
+ my $name = shift;
+ if (@_)
+ {
+ my $cw = shift;
+ if (defined $cw)
+ {
+ $h->{$name} = $cw;
+ }
+ else
+ {
+ return delete $h->{$name};
+ }
+ }
+ return $h->{$name};
+ }
+ else
+ {
+ return (values %$h);
+ }
+}
+
+sub add
+{
+ my ($w, $child, %args) = @_;
+
+ croak("$child already exists") if defined $w->page_widget($child);
+
+ my $f = Tk::Frame->new($w,Name => $child,-relief => 'raised');
+
+ my $ccmd = delete $args{-createcmd};
+ my $rcmd = delete $args{-raisecmd};
+ $f->{-createcmd} = Tk::Callback->new($ccmd) if (defined $ccmd);
+ $f->{-raisecmd} = Tk::Callback->new($rcmd) if (defined $rcmd);
+
+ # manage our geometry
+ $w->ManageGeometry($f);
+ # create default bindings
+ $f->bind('<Configure>',[$w,'ClientGeomProc','-configure', $f]);
+ $f->bind('<Destroy>', [$w,'delete',$child,1]);
+ $w->page_widget($child,$f);
+ $w->{'nWindows'}++;
+ push(@{$w->{'windows'}}, $child);
+ $w->SUPER::add($child,%args);
+ return $f;
+}
+
+sub raise
+{
+ my ($w, $child) = @_;
+ return unless defined $child;
+ if ($w->pagecget($child, -state) eq 'normal')
+ {
+ $w->activate($child);
+ $w->focus($child);
+ my $childw = $w->page_widget($child);
+ if ($childw)
+ {
+ if (defined $childw->{-createcmd})
+ {
+ $childw->{-createcmd}->Call($childw);
+ delete $childw->{-createcmd};
+ }
+ # hide the original visible window
+ my $oldtop = $w->{'topchild'};
+ if (defined($oldtop) && ($oldtop ne $child))
+ {
+ $w->page_widget($oldtop)->UnmapWindow;
+ }
+ $w->{'topchild'} = $child;
+ my $myW = $w->Width;
+ my $myH = $w->Height;
+
+ if (!defined $w->{'pad-x1'}) {
+ $w->InitTabSize;
+ }
+
+ my $cW = $myW - $w->{'pad-x1'} - $w->{'pad-x2'} - 2 * (defined $w->{-ipadx} ? $w->{-ipadx} : 0);
+ my $cH = $myH - $w->{'pad-y1'} - $w->{'pad-y2'} - 2 * (defined $w->{-ipady} ? $w->{-ipady} : 0);
+ my $cX = $w->{'pad-x1'} + (defined $w->{-ipadx} ? $w->{-ipadx} : 0);
+ my $cY = $w->{'pad-y1'} + (defined $w->{-ipady} ? $w->{-ipady} : 0);
+
+ if ($cW > 0 && $cH > 0)
+ {
+ $childw->MoveResizeWindow($cX, $cY, $cW, $cH);
+ $childw->MapWindow;
+ $childw->raise;
+ }
+ if ((not defined $oldtop) || ($oldtop ne $child))
+ {
+ if (defined $childw->{-raisecmd})
+ {
+ $childw->{-raisecmd}->Call($childw);
+ }
+ }
+ }
+ }
+}
+
+sub pageconfigure
+{
+ my ($w, $child, %args) = @_;
+ my $childw = $w->page_widget($child);
+ if (defined $childw)
+ {
+ my $ccmd = delete $args{-createcmd};
+ my $rcmd = delete $args{-raisecmd};
+ $childw->{-createcmd} = Tk::Callback->new($ccmd) if (defined $ccmd);
+ $childw->{-raisecmd} = Tk::Callback->new($rcmd) if (defined $rcmd);
+ $w->SUPER::pageconfigure($child, %args) if (keys %args);
+ }
+}
+
+sub pages {
+ my ($w) = @_;
+ return @{$w->{'windows'}};
+}
+
+sub pagecget
+{
+ my ($w, $child, $opt) = @_;
+ my $childw = $w->page_widget($child);
+ if (defined $childw)
+ {
+ return $childw->{-createcmd} if ($opt =~ /-createcmd/);
+ return $childw->{-raisecmd} if ($opt =~ /-raisecmd/);
+ return $w->SUPER::pagecget($child, $opt);
+ }
+ else
+ {
+ carp "page $child does not exist";
+ }
+}
+
+sub delete
+{
+ my ($w, $child, $destroy) = @_;
+ my $childw = $w->page_widget($child,undef);
+ if (defined $childw)
+ {
+ $childw->bind('<Destroy>', undef);
+ $childw->destroy;
+ @{$w->{'windows'}} = grep($_ ne $child, @{$w->{'windows'}});
+ $w->{'nWindows'}--;
+ $w->SUPER::delete($child);
+ # see if the child to be deleted was the top child
+ if ((defined $w->{'topchild'}) && ($w->{'topchild'} eq $child))
+ {
+ delete $w->{'topchild'};
+ if ( @{$w->{'windows'}})
+ {
+ $w->raise($w->{'windows'}[0]);
+ }
+ }
+ }
+ else
+ {
+ carp "page $child does not exist" unless $destroy;
+ }
+}
+
+#---------------------------------------
+# Private methods
+#---------------------------------------
+
+sub MouseDown {
+ my ($w, $x, $y) = @_;
+ my $name = $w->identify($x, $y);
+ $w->focus($name);
+ $w->{'down'} = $name;
+}
+
+sub MouseUp {
+ my ($w, $x, $y) = @_;
+ my $name = $w->identify($x, $y);
+ if ((defined $name) && (defined $w->{'down'}) &&
+ ($name eq $w->{'down'}) &&
+ ($w->pagecget($name, -state) eq 'normal')) {
+ $w->raise($name);
+ } else {
+ $w->focus($name);
+ }
+}
+
+sub FocusNext {
+ my ($w, $dir) = @_;
+ my $name;
+
+ if (not defined $w->info('focus')) {
+ $name = $w->info('active');
+ $w->focus($name);
+ } else {
+ $name = $w->info('focus' . $dir);
+ $w->focus($name);
+ }
+}
+
+sub SetFocusByKey {
+ my ($w) = @_;
+
+ my $name = $w->info('focus');
+ if (defined $name) {
+ if ($w->pagecget($name, -state) eq 'normal') {
+ $w->raise($name);
+ $w->activate($name);
+ }
+ }
+}
+
+sub NoteBookFind {
+ my ($w, $char) = @_;
+
+ my $page;
+ foreach $page (@{$w->{'windows'}}) {
+ my $i = $w->pagecget($page, -underline);
+ my $c = substr($page, $i, 1);
+ if ($char =~ /$c/) {
+ if ($w->pagecget($page, -state) ne 'disabled') {
+ return $page;
+ }
+ }
+ }
+ return undef;
+}
+
+# This is called by TraveseToMenu when an <Alt-Keypress> occurs
+# See the code in Tk.pm
+sub FindMenu {
+ my ($w, $char) = @_;
+
+ my $page;
+ foreach $page (@{$w->{'windows'}}) {
+ my $i = $w->pagecget($page, -underline);
+ my $l = $w->pagecget($page, -label);
+ next if (not defined $l);
+ my $c = substr($l, $i, 1);
+ if ($char =~ /$c/i) {
+ if ($w->pagecget($page, -state) ne 'disabled') {
+ $w->raise($page);
+ return $w;
+ }
+ }
+ }
+ return undef;
+}
+
+
+sub MasterGeomProc
+{
+ my ($w) = @_;
+ if (Tk::Exists($w))
+ {
+ $w->{'resize'} = 0 unless (defined $w->{'resize'});
+ $w->QueueResize;
+ }
+}
+
+sub SlaveGeometryRequest
+{
+ my $w = shift;
+ if (Tk::Exists($w))
+ {
+ $w->QueueResize;
+ }
+}
+
+sub LostSlave {
+ my ($w, $s) = @_;
+ $s->UnmapWindow;
+}
+
+sub ClientGeomProc
+{
+ my ($w, $flag, $client) = @_;
+ $w->QueueResize if (Tk::Exists($w));
+ if ($flag =~ /-lostslave/)
+ {
+ carp "Geometry Management Error: Another geometry manager has taken control of $client. This error is usually caused because a widget has been created in the wrong frame: it should have been created inside $client instead of $w";
+ }
+}
+
+sub QueueResize
+{
+ my $w = shift;
+ $w->afterIdle(['Resize', $w]) unless ($w->{'resize'}++);
+}
+
+sub Resize {
+
+ my ($w) = @_;
+
+ return unless Tk::Exists($w) && $w->{'nWindows'} && $w->{'resize'};
+
+ $w->InitTabSize;
+
+ $w->{'resize'} = 0;
+ my $reqW = $w->{-width} || 0;
+ my $reqH = $w->{-height} || 0;
+
+ if ($reqW * $reqH == 0)
+ {
+ if ((not defined $w->cget('-dynamicgeometry')) ||
+ ($w->cget('-dynamicgeometry') == 0)) {
+ $reqW = 1;
+ $reqH = 1;
+
+ my $childw;
+ foreach $childw ($w->page_widget)
+ {
+ my $cW = $childw->ReqWidth;
+ my $cH = $childw->ReqHeight;
+ $reqW = $cW if ($reqW < $cW);
+ $reqH = $cH if ($reqH < $cH);
+ }
+ } else {
+ if (defined $w->{'topchild'}) {
+ my $topw = $w->page_widget($w->{'topchild'});
+ $reqW = $topw->ReqWidth;
+ $reqH = $topw->ReqHeight;
+ } else {
+ $reqW = 1;
+ $reqH = 1;
+ }
+ }
+ $reqW += $w->{'pad-x1'} + $w->{'pad-x2'} + 2 * (defined $w->{-ipadx} ? $w->{-ipadx} : 0);
+ $reqH += $w->{'pad-y1'} + $w->{'pad-y2'} + 2 * (defined $w->{-ipady} ? $w->{-ipady} : 0);
+ $reqW = ($reqW > $w->{'minW'}) ? $reqW : $w->{'minW'};
+ $reqH = ($reqH > $w->{'minH'}) ? $reqH : $w->{'minH'};
+ }
+ if (($w->ReqWidth != $reqW) ||
+ ($w->ReqHeight != $reqH)) {
+ $w->{'counter'} = 0 if (not defined $w->{'counter'});
+ if ($w->{'counter'} < 50) {
+ $w->{'counter'}++;
+ $w->GeometryRequest($reqW, $reqH);
+ $w->afterIdle([$w,'Resize']);
+ $w->{'resize'} = 1;
+ return;
+ }
+ }
+ $w->{'counter'} = 0;
+ $w->raise($w->{'topchild'} || ${$w->{'windows'}}[0]);
+ $w->{'resize'} = 0;
+}
+
+sub InitTabSize {
+ my ($w) = @_;
+ my ($tW, $tH) = $w->geometryinfo;
+ $w->{'pad-x1'} = 2;
+ $w->{'pad-x2'} = 2;
+ $w->{'pad-y1'} = $tH + (defined $w->{'-ipadx'} ? $w->{'-ipadx'} : 0) + 1;
+ $w->{'pad-y2'} = 2;
+ $w->{'minW'} = $tW;
+ $w->{'minH'} = $tH;
+}
+
+sub BalloonInfo
+{
+ my ($notebook,$balloon,$X,$Y,@opt) = @_;
+ my $page = $notebook->identify($X-$notebook->rootx,$Y-$notebook->rooty);
+ foreach my $opt (@opt)
+ {
+ my $info = $balloon->GetOption($opt,$notebook);
+ if ($opt =~ /^-(statusmsg|balloonmsg)$/ && UNIVERSAL::isa($info,'HASH'))
+ {
+ if (!defined $page)
+ {
+ $balloon->Deactivate;
+ return;
+ }
+ $balloon->Subclient($page);
+ if (exists $info->{$page})
+ {
+ return $info->{$page}
+ }
+ else
+ {
+ return '';
+ }
+ }
+ return $info;
+ }
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/NoteBook.pod b/Master/tlpkg/tlperl/lib/Tk/NoteBook.pod
new file mode 100644
index 00000000000..2cc84bb3fad
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/NoteBook.pod
@@ -0,0 +1,235 @@
+
+=head1 NAME
+
+Tk::NoteBook - display several windows in limited space with notebook metaphor.
+
+=for pm Tixish/NoteBook.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+ use Tk::NoteBook;
+ ...
+ $w = $frame->NoteBook();
+ $page1 = $w->add("page1", options);
+ $page2 = $w->add("page2", options);
+ ...
+ $page2 = $w->add("page2", options);
+
+=head1 DESCRIPTION
+
+The NoteBook widget provides a notebook metaphor to display several
+windows in limited space. The notebook is divided into a stack of pages
+of which only one is displayed at any time. The other pages can be
+selected by means of choosing the visual "tabs" at the top of the
+widget. Additionally, the <Tab> key may be used to traverse the pages.
+If B<-underline> is used, Alt- bindings will also work.
+
+The widget takes all the options that a Frame does. In addition,
+it supports the following options:
+
+=over 4
+
+=item B<-dynamicgeometry>
+
+If set to false (default and recommended), the size of the NoteBook
+will match the size of the largest page. Otherwise the size will
+match the size of the current page causing the NoteBook to change
+size when different pages of different sizes are selected.
+
+=item B<-ipadx>
+
+The amount of internal horizontal padding around the pages.
+
+=item B<-ipady>
+
+The amount of internal vertical padding around the pages.
+
+=item B<-backpagecolor>
+
+The background color of the tabs and back page.
+
+=item B<-disabledforeground>
+
+XXX
+
+=item B<-focuscolor>
+
+The color of the focus border around the tabs.
+
+=item B<-font>
+
+The font of the tab labels.
+
+=item B<-inactivebackground>
+
+XXX
+
+=item B<-tabpadx>
+
+Horizonzal padding around the tab label.
+
+=item B<-tabpady>
+
+Vertical padding around the tab label.
+
+=back
+
+=head1 METHODS
+
+The following methods may be used with a NoteBook object in addition
+to standard methods.
+
+=over 4
+
+=item B<add(>I<pageName>, I<options>B<)>
+
+Adds a page with name I<pageName> to the notebook. Returns an object
+of type B<Frame>. The recognized I<options> are:
+
+=over 4
+
+=item B<-anchor>
+
+Specifies how the information in a tab is to be displayed. Must be
+one of B<n>, B<ne>, B<e>, B<se>, B<s>, B<sw>, B<w>, B<nw> or
+B<center>.
+
+=item B<-bitmap>
+
+Specifies a bitmap to display on the tab of this page. The bitmap
+is displayed only if none of the B<-label> or B<-image> options
+are specified.
+
+=item B<-image>
+
+Specifies an image to display on the tab of this page. The image
+is displayed only if the B<-label> option is not specified.
+
+=item B<-label>
+
+Specifies the text string to display on the tab of this page.
+
+=item B<-justify>
+
+When there are multiple lines of text displayed in a tab, this
+option determines the justification of the lines.
+
+=item B<-createcmd>
+
+Specifies a L<callback|Tk::callbacks> to be called the first time the page is
+shown on the screen. This option can be used to delay the creation
+of the contents of a page until necessary. It can be useful in
+situations where there are a large number of pages in a NoteBook
+widget; with B<-createcmd> you do not have to make the user wait
+until all pages are constructed before displaying the first page.
+
+=item B<-raisecmd>
+
+Specifies a L<callback|Tk::callbacks> to be called whenever this page is raised
+by the user.
+
+=item B<-state>
+
+Specifies whether this page can be raised by the user. Must be
+either B<normal> or B<disabled>.
+
+=item B<-underline>
+
+Specifies the integer index of a character to underline in the
+tab. This option is used by the default bindings to implement
+keyboard traversal for menu buttons and menu entries. 0
+corresponds to the first character of text displayed on the
+widget, 1 to the next character and so on.
+
+=item B<-wraplength>
+
+This option specifies the maximum line length of the label string
+on this tab. If the line length of the label string exceeds this
+length, then it is wrapped onto the next line so that no line is
+longer than the specified length. The value may be specified in
+any standard forms for screen distances. If this value is less
+than or equal to 0, then no wrapping is done: lines will break
+only at newline characters in the text.
+
+=back
+
+=item B<delete(>I<pageName>B<)>
+
+Deletes the page identified by I<pageName>.
+
+=item B<pagecget(>I<pageName>, I<-option>B<)>
+
+Returns the current value of the configuration option given by
+I<-option> in the page given by I<pageName>. I<Option> may have any of
+the values accepted in the B<add> method.
+
+=item B<pageconfigure(>I<pageName>, I<options>B<)>
+
+Like configure for the page indicated by I<pageName>. I<Options> may
+be any of the options accepted by the B<add> method.
+
+=item B<pages>
+
+Returns a list consisting of the names of all currently defined
+pages, i.e., those created with the B<add> method.
+
+=item B<page_widget(>I<pageName>B<)>
+
+Returns the page with name I<pageName>.
+
+=item B<raise(>I<pageName>B<)>
+
+Raise the page identified by I<pageName>.
+
+=item B<raised()>
+
+Returns the name of the currently raised page.
+
+=item B<geometryinfo>
+
+Return the dimensions of the tab area.
+
+=item B<identify(>I<x>,I<y>B<)>
+
+Identify the tab's page name under the specified coordinates. Return
+an empty string if there's no tab.
+
+=item B<info(E<quot>pagesE<quot>)>
+
+Return a list of all pages.
+
+=item B<info(E<quot>focusE<quot>)>
+
+Return the page name of the tab with the current focus.
+
+=item B<info(E<quot>focusnextE<quot>)>
+
+Return the page name of the tab which would receive the next focus.
+
+=item B<info(E<quot>focusprevE<quot>)>
+
+Return the page name of the tab which had the previous focus.
+
+=item B<info(E<quot>activeE<quot>)>
+
+Return the page name of the active tab.
+
+=back
+
+=head1 BUGS
+
+The options C<-width> and C<-height> do not work.
+
+=head1 AUTHORS
+
+B<Rajappa Iyer> <rsi@earthling.net>
+Nick Ing-Simmons <nick@ni-s.u-net.com>
+
+This code and documentation was derived from NoteBook.tcl in
+Tix4.0 written by Ioi Lam. It may be distributed under the same
+conditions as Perl itself.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Optionmenu.pm b/Master/tlpkg/tlperl/lib/Tk/Optionmenu.pm
new file mode 100644
index 00000000000..c95f008cd4d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Optionmenu.pm
@@ -0,0 +1,128 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Optionmenu;
+require Tk::Menubutton;
+require Tk::Menu;
+use Carp;
+
+use vars qw($VERSION);
+$VERSION = '4.014'; # $Id: //depot/Tkutf8/Tk/Optionmenu.pm#13 $
+
+use base qw(Tk::Derived Tk::Menubutton);
+
+use strict;
+
+Construct Tk::Widget 'Optionmenu';
+
+sub Populate
+{
+ my ($w,$args) = @_;
+ $w->SUPER::Populate($args);
+ $args->{-indicatoron} = 1;
+ my $menu = $w->menu(-tearoff => 0);
+
+ # Should we allow -menubackground etc. as in -label* of Frame ?
+
+ $w->ConfigSpecs(-command => ['CALLBACK',undef,undef,undef],
+ -options => ['METHOD', undef, undef, undef],
+ -variable=> ['PASSIVE', undef, undef, undef],
+ -font => [['SELF',$menu], undef, undef, undef],
+ -foreground => [['SELF', 'CHILDREN'], undef, undef, undef],
+
+ -takefocus => [ qw/SELF takefocus Takefocus 1/ ],
+ -highlightthickness => [ qw/SELF highlightThickness HighlightThickness 1/ ],
+ -relief => [ qw/SELF relief Relief raised/ ],
+
+ );
+
+ # configure -variable and -command now so that when -options
+ # is set by main-line configure they are there to be set/called.
+
+ my $tvar = delete $args->{-textvariable};
+ my $vvar = delete $args->{-variable};
+ if (!defined($vvar))
+ {
+ if (defined $tvar)
+ {
+ $vvar = $tvar;
+ }
+ else
+ {
+ my $new;
+ $vvar = \$new;
+ }
+ }
+ $tvar = $vvar if (!defined($tvar));
+ $w->configure(-textvariable => $tvar, -variable => $vvar);
+ $w->configure(-command => $vvar) if ($vvar = delete $args->{-command});
+}
+
+sub setOption
+{
+ my ($w, $label, $val) = @_;
+ my $tvar = $w->cget(-textvariable);
+ my $vvar = $w->cget(-variable);
+ if (@_ == 2)
+ {
+ $val = $label;
+ }
+ $$tvar = $label if $tvar;
+ $$vvar = $val if $vvar;
+ $w->Callback(-command => $val);
+}
+
+sub addOptions
+{
+ my $w = shift;
+ my $menu = $w->menu;
+ my $tvar = $w->cget(-textvariable);
+ my $vvar = $w->cget(-variable);
+ my $oldt = $$tvar;
+ my $width = $w->cget('-width');
+ my %hash;
+ my $first;
+ while (@_)
+ {
+ my $val = shift;
+ my $label = $val;
+ if (ref $val)
+ {
+ if ($vvar == $tvar)
+ {
+ my $new = $label;
+ $w->configure(-textvariable => ($tvar = \$new));
+ }
+ ($label, $val) = @$val;
+ }
+ my $len = length($label);
+ $width = $len if (!defined($width) || $len > $width);
+ $menu->command(-label => $label, -command => [ $w , 'setOption', $label, $val ]);
+ $hash{$label} = $val;
+ $first = $label unless defined $first;
+ }
+ if (!defined($oldt) || !exists($hash{$oldt}))
+ {
+ $w->setOption($first, $hash{$first}) if defined $first;
+ }
+ $w->configure('-width' => $width);
+}
+
+sub options
+{
+ my ($w,$opts) = @_;
+ if (@_ > 1)
+ {
+ $w->menu->delete(0,'end');
+ $w->addOptions(@$opts);
+ }
+ else
+ {
+ return $w->_cget('-options');
+ }
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Optionmenu.pod b/Master/tlpkg/tlperl/lib/Tk/Optionmenu.pod
new file mode 100644
index 00000000000..f5e514c63b3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Optionmenu.pod
@@ -0,0 +1,100 @@
+
+=head1 NAME
+
+Tk::Optionmenu - Let the user select one of some predefined options values
+
+=for pm Tk/Optionmenu.pm
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+ use Tk::Optionmenu;
+
+ $opt = $w->Optionmenu(
+ -options => REFERENCE_to_OPTIONLIST,
+ -command => CALLBACK,
+ -variable => SCALAR_REF,
+ );
+
+ $opt->addOptions( OPTIONLIST );
+
+ # OPTION LIST is
+ # a) $val1, $val2, $val3,...
+ # b) [ $lab1=>$val1], [$lab2=>val2], ... ]
+ # c) combination of a) and b), e.g.,
+ # val1, [$lab2=>val2], val3, val4, [...], ...
+
+=head1 DESCRIPTION
+
+The B<Optionmenu> widget allows the user chose between a given set
+of options.
+
+If the user should be able to change the available option have a look
+at L<Tk::BrowseEntry>.
+
+=head1 OPTIONS
+
+=over 4
+
+=item -options
+
+(Re)sets the list of options presented.
+
+=item -command
+
+Defines the L<callback|Tk::callbacks> that is invokes when a new option
+is selected.
+
+=item -variable
+
+Reference to a scalar that contains the current value of the
+selected option.
+
+=item -textvariable
+
+Reference to a scalar that contains the text label of the current value of the
+selected option.
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item addOptions
+
+Adds OPTION_LIST to the already available options.
+
+=back
+
+=head1 EXAMPLE
+
+ use Tk;
+ my $mw = MainWindow->new();
+
+ my ($var, $tvar);
+ my $opt = $mw->Optionmenu(
+ -options => [[jan=>1], [feb=>2], [mar=>3], [apr=>4]],
+ -command => sub { print "got: ", shift, "\n" },
+ -variable => \$var,
+ -textvariable => \$tvar
+ )->pack;
+
+ $opt->addOptions([may=>5],[jun=>6],[jul=>7],[aug=>8]);
+
+ my $f = $mw->Frame(-relief=>'groove', -borderwidth => 2)->pack;
+ $f->Label(-textvariable=>\$tvar)->pack(-side => 'left');
+ $f->Label(-text => " -> ")->pack(-side => 'left');
+ $f->Label(-textvariable=>\$var)->pack(-side => 'left');
+
+ $mw->Button(-text=>'Exit', -command=>sub{$mw->destroy})->pack;
+
+ MainLoop;
+
+=head1 SEE ALSO
+
+L<Tk::Menubutton>, L<Tk::BrowseEntry>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/PNG.pm b/Master/tlpkg/tlperl/lib/Tk/PNG.pm
new file mode 100644
index 00000000000..39974315645
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/PNG.pm
@@ -0,0 +1,50 @@
+package Tk::PNG;
+require DynaLoader;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # was: sprintf '4.%03d', q$Revision: #3 $ =~ /\D(\d+)\s*$/;
+
+use Tk 800.005;
+require Tk::Image;
+require Tk::Photo;
+
+use base qw(DynaLoader);
+
+bootstrap Tk::PNG $Tk::VERSION;
+
+1;
+
+__END__
+
+=head1 NAME
+
+Tk::PNG - PNG loader for Tk::Photo
+
+=head1 SYNOPSIS
+
+ use Tk;
+ use Tk::PNG;
+
+ my $image = $widget->Photo('-format' => 'png', -file => 'something.png');
+
+
+=head1 DESCRIPTION
+
+This is an extension for Tk which supplies
+PNG format loader for Photo image type.
+
+=head1 HISTORY
+
+This extension is by default bundled with Perl/Tk since Tk804.
+
+=head1 AUTHOR
+
+Nick Ing-Simmons E<lt>nick@ing-simmons.netE<gt>
+
+=head1 SEE ALSO
+
+L<Tk::Photo>.
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Pane.pm b/Master/tlpkg/tlperl/lib/Tk/Pane.pm
new file mode 100644
index 00000000000..36c5203a42d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Pane.pm
@@ -0,0 +1,544 @@
+# Tk::Pane.pm
+#
+# Copyright (c) 1997-1998 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+package Tk::Pane;
+
+use vars qw($VERSION);
+$VERSION = '4.007'; # $Id: //depot/Tkutf8/Tk/Pane.pm#7 $
+
+use Tk;
+use Tk::Widget;
+use Tk::Derived;
+use Tk::Frame;
+
+use strict;
+
+use base qw(Tk::Derived Tk::Frame);
+
+Construct Tk::Widget 'Pane';
+
+use Tk::Submethods(
+ grid => [qw/bbox columnconfigure location propagate rowconfigure size slaves/],
+ pack => [qw/propagate slaves/]
+);
+
+sub ClassInit {
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Configure>',['QueueLayout',4]);
+ $mw->bind($class,'<FocusIn>', 'NoOp');
+ return $class;
+}
+
+sub Populate {
+ my $pan = shift;
+
+ my $frame = $pan->Component(Frame => "frame");
+
+ $pan->afterIdle(['Manage',$pan,$frame]);
+ $pan->afterIdle(['QueueLayout',$pan,1]);
+
+ $pan->Delegates(
+ DEFAULT => $frame,
+ # FIXME
+ # These are a hack to avoid an existing bug in Tk::Widget::DelegateFor
+ # which has been reported and should be fixed in the next Tk release
+ see => $pan,
+ xview => $pan,
+ yview => $pan,
+ );
+
+ $pan->ConfigSpecs(
+ DEFAULT => [$frame],
+ -sticky => [PASSIVE => undef, undef, undef],
+ -gridded => [PASSIVE => undef, undef, undef],
+ -xscrollcommand => [CALLBACK => undef, undef, undef],
+ -yscrollcommand => [CALLBACK => undef, undef, undef],
+ );
+
+
+ $pan;
+}
+
+
+sub grid {
+ my $w = shift;
+ $w = $w->Subwidget('frame')
+ if (@_ && $_[0] =~ /^(?: bbox
+ |columnconfigure
+ |location
+ |propagate
+ |rowconfigure
+ |size
+ |slaves)$/x);
+ $w->SUPER::grid(@_);
+}
+
+sub slave {
+ my $w = shift;
+ $w->Subwidget('frame');
+}
+
+sub pack {
+ my $w = shift;
+ $w = $w->Subwidget('frame')
+ if (@_ && $_[0] =~ /^(?:propagate|slaves)$/x);
+ $w->SUPER::pack(@_);
+}
+
+sub QueueLayout {
+ shift if ref $_[1];
+ my($m,$why) = @_;
+ $m->afterIdle(['Layout',$m]) unless ($m->{LayoutPending});
+ $m->{LayoutPending} |= $why;
+}
+
+sub AdjustXY {
+ my($w,$Wref,$X,$st,$scrl,$getx) = @_;
+ my $W = $$Wref;
+
+ if($w >= $W) {
+ my $v = 0;
+ if($getx) {
+ $v |= 1 if $st =~ /[Ww]/;
+ $v |= 2 if $st =~ /[Ee]/;
+ }
+ else {
+ $v |= 1 if $st =~ /[Nn]/;
+ $v |= 2 if $st =~ /[Ss]/;
+ }
+
+ if($v == 0) {
+ $X = int(($w - $W) / 2);
+ }
+ elsif($v == 1) {
+ $X = 0;
+ }
+ elsif($v == 2) {
+ $X = int($w - $W);
+ }
+ else {
+ $X = 0;
+ $$Wref = $w;
+ }
+ $scrl->Call(0,1)
+ if $scrl;
+ }
+ elsif($scrl) {
+ $X = 0
+ if $X > 0;
+ $X = $w - $W
+ if(($X + $W) < $w);
+ $scrl->Call(-$X / $W,(-$X + $w) / $W);
+ }
+ else {
+ $X = 0;
+ $$Wref = $w;
+ }
+
+ return $X;
+}
+
+sub Layout {
+ my $pan = shift;
+ my $why = $pan->{LayoutPending};
+
+ my $slv = $pan->Subwidget('frame');
+
+ return unless $slv;
+
+ my $H = $slv->ReqHeight;
+ my $W = $slv->ReqWidth;
+ my $X = $slv->x;
+ my $Y = $slv->y;
+ my $w = $pan->width;
+ my $h = $pan->height;
+ my $yscrl = $pan->{Configure}{'-yscrollcommand'};
+ my $xscrl = $pan->{Configure}{'-xscrollcommand'};
+
+ $yscrl = undef
+ if(defined($yscrl) && UNIVERSAL::isa($yscrl, 'SCALAR') && !defined($$yscrl));
+ $xscrl = undef
+ if(defined($xscrl) && UNIVERSAL::isa($xscrl, 'SCALAR') && !defined($$xscrl));
+
+ if($why & 1) {
+ $h = $pan->{Configure}{'-height'} || 0
+ unless($h > 1);
+ $w = $pan->{Configure}{'-width'} || 0
+ unless($w > 1);
+
+ $h = $H
+ unless($h > 1 || defined($yscrl));
+ $w = $W
+ unless($w > 1 || defined($xscrl));
+
+ $w = 100 if $w <= 1;
+ $h = 100 if $h <= 1;
+
+ $pan->GeometryRequest($w,$h);
+ }
+
+ my $st = $pan->{Configure}{'-sticky'} || '';
+
+ $pan->{LayoutPending} = 0;
+
+ $slv->MoveResizeWindow(
+ AdjustXY($w,\$W,$X,$st,$xscrl,1),
+ AdjustXY($h,\$H,$Y,$st,$yscrl,0),
+ $W,$H
+ );
+}
+
+sub SlaveGeometryRequest {
+ my ($m,$s) = @_;
+ $m->QueueLayout(1);
+}
+
+sub LostSlave {
+ my($m,$s) = @_;
+ $m->{Slave} = undef;
+}
+
+sub Manage {
+ my $m = shift;
+ my $s = shift;
+
+ $m->{Slave} = $s;
+ $m->ManageGeometry($s);
+ $s->MapWindow;
+ $m->QueueLayout(2);
+}
+
+sub xview {
+ my $pan = shift;
+
+ unless(@_) {
+ my $scrl = $pan->{Configure}{'-xscrollcommand'};
+ return (0,1) unless $scrl;
+ my $slv = $pan->Subwidget('frame');
+ my $sw = $slv->ReqWidth;
+ my $ldx = $pan->rootx - $slv->rootx;
+ my $rdx = $ldx + $pan->width;
+ $ldx = $ldx <= 0 ? 0 : $ldx / $sw;
+ $rdx = $rdx >= $sw ? 1 : $rdx / $sw;
+ return( $ldx , $rdx);
+ }
+ elsif(@_ == 1) {
+ my $widget = shift;
+ my $slv = $pan->Subwidget('frame');
+ xyview(1,$pan,
+ moveto => ($widget->rootx - $slv->rootx) / $slv->ReqWidth);
+ }
+ else {
+ xyview(1,$pan,@_);
+ }
+}
+
+sub yview {
+ my $pan = shift;
+
+ unless(@_) {
+ my $scrl = $pan->{Configure}{'-yscrollcommand'};
+ return (0,1) unless $scrl;
+ my $slv = $pan->Subwidget('frame');
+ my $sh = $slv->ReqHeight;
+ my $tdy = $pan->rooty - $slv->rooty;
+ my $bdy = $tdy + $pan->height;
+ $tdy = $tdy <= 0 ? 0 : $tdy / $sh;
+ $bdy = $bdy >= $sh ? 1 : $bdy / $sh;
+ return( $tdy, $bdy);
+ }
+ elsif(@_ == 1) {
+ my $widget = shift;
+ my $slv = $pan->Subwidget('frame');
+ xyview(0,$pan,
+ moveto => ($widget->rooty - $slv->rooty) / $slv->ReqHeight);
+ }
+ else {
+ xyview(0,$pan,@_);
+ }
+}
+
+sub xyview {
+ my($horz,$pan,$cmd,$val,$mul) = @_;
+ my $slv = $pan->Subwidget('frame');
+ return unless $slv;
+
+ my($XY,$WH,$wh,$scrl,@a);
+
+ if($horz) {
+ $XY = $slv->x;
+ $WH = $slv->ReqWidth;
+ $wh = $pan->width;
+ $scrl = $pan->{Configure}{'-xscrollcommand'};
+ }
+ else {
+ $XY = $slv->y;
+ $WH = $slv->ReqHeight;
+ $wh = $pan->height;
+ $scrl = $pan->{Configure}{'-yscrollcommand'};
+ }
+
+ $scrl = undef
+ if(UNIVERSAL::isa($scrl, 'SCALAR') && !defined($$scrl));
+
+ if($WH < $wh) {
+ $scrl->Call(0,1);
+ return;
+ }
+
+ if($cmd eq 'scroll') {
+ my $dxy = 0;
+
+ my $gridded = $pan->{Configure}{'-gridded'} || '';
+ my $do_gridded = ($gridded eq 'both'
+ || (!$horz == ($gridded ne 'x'))) ? 1 : 0;
+
+ if($do_gridded && $mul eq 'pages') {
+ my $ch = ($slv->children)[0];
+ if(defined($ch) && $ch->manager eq 'grid') {
+ @a = $horz
+ ? (1-$XY,int($slv->width / 2))
+ : (int($slv->height / 2),1-$XY);
+ my $rc = ($slv->gridLocation(@a))[$horz ? 0 : 1];
+ my $mrc = ($slv->gridSize)[$horz ? 0 : 1];
+ $rc += $val;
+ $rc = 0 if $rc < 0;
+ $rc = $mrc if $rc > $mrc;
+ my $gsl;
+ while($rc >= 0 && $rc < $mrc) {
+ $gsl = ($slv->gridSlaves(-row => $rc))[0];
+ last
+ if defined $gsl;
+ $rc += $val;
+ }
+ if(defined $gsl) {
+ @a = $horz ? ($rc,0) : (0,$rc);
+ $XY = 0 - ($slv->gridBbox(@a))[$horz ? 0 : 1];
+ }
+ else {
+ $XY = $val > 0 ? $wh - $WH : 0;
+ }
+ $dxy = $val; $val = 0;
+ }
+ }
+ $dxy = $mul eq 'pages' ? ($horz ? $pan->width : $pan->height) : 10
+ unless $dxy;
+ $XY -= $dxy * $val;
+ }
+ elsif($cmd eq 'moveto') {
+ $XY = -int($WH * $val);
+ }
+
+ $XY = $wh - $WH
+ if($XY < ($wh - $WH));
+ $XY = 0
+ if $XY > 0;
+
+ @a = $horz
+ ? ( $XY, $slv->y)
+ : ($slv->x, $XY);
+
+ $slv->MoveWindow(@a);
+
+ $scrl->Call(-$XY / $WH,(-$XY + $wh) / $WH);
+}
+
+sub see {
+ my $pan = shift;
+ my $widget = shift;
+ my %opt = @_;
+ my $slv = $pan->Subwidget('frame');
+
+ my $anchor = defined $opt{'-anchor'} ? $opt{'-anchor'} : "";
+
+ if($pan->{Configure}{'-yscrollcommand'}) {
+ my $yanchor = lc(($anchor =~ /([NnSs]?)/)[0] || "");
+ my $pty = $pan->rooty;
+ my $ph = $pan->height;
+ my $pby = $pty + $ph;
+ my $ty = $widget->rooty;
+ my $wh = $widget->height;
+ my $by = $ty + $wh;
+ my $h = $slv->ReqHeight;
+
+ if($yanchor eq 'n' || ($yanchor ne 's' && ($wh >= $h || $ty < $pty))) {
+ my $y = $ty - $slv->rooty;
+ $pan->yview(moveto => $y / $h);
+ }
+ elsif($yanchor eq 's' || $by > $pby) {
+ my $y = $by - $ph - $slv->rooty;
+ $pan->yview(moveto => $y / $h);
+ }
+ }
+
+ if($pan->{Configure}{'-xscrollcommand'}) {
+ my $xanchor = lc(($anchor =~ /([WwEe]?)/)[0] || "");
+ my $ptx = $pan->rootx;
+ my $pw = $pan->width;
+ my $pbx = $ptx + $pw;
+ my $tx = $widget->rootx;
+ my $ww = $widget->width;
+ my $bx = $tx + $ww;
+ my $w = $slv->ReqWidth;
+
+ if($xanchor eq 'w' || ( $xanchor ne 'e' && ($ww >= $w || $tx < $ptx))) {
+ my $x = $tx - $slv->rootx;
+ $pan->xview(moveto => $x / $w);
+ }
+ elsif($xanchor eq 'e' || $bx > $pbx) {
+ my $x = $bx - $pw - $slv->rootx;
+ $pan->xview(moveto => $x / $w);
+ }
+ }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Tk::Pane - A window panner
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ use Tk::Pane;
+
+ $pane = $mw->Scrolled(Pane, Name => 'fred',
+ -scrollbars => 'soe',
+ -sticky => 'we',
+ -gridded => 'y'
+ );
+
+ $pane->Frame;
+
+ $pane->pack;
+
+=head1 DESCRIPTION
+
+B<Tk::Pane> provides a scrollable frame widget. Once created it can be
+treated as a frame, except it is scrollable.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-gridded> =E<gt> I<direction>
+
+Specifies if the top and left edges of the pane should snap to a
+grid column. This option is only useful if the widgets in the pane
+are managed by the I<grid> geometry manager. Possible values are
+B<x>, B<y> and B<xy>.
+
+=item B<-sticky> =E<gt> I<style>
+
+If Pane is larger than its requested dimensions, this option may be used to
+position (or stretch) the slave within its cavity. I<Style> is a string that
+contains zero or more of the characters n, s, e or w. The string can optionally
+contains spaces or commas, but they are ignored. Each letter refers to a side
+(north, south, east, or west) that the slave will "stick" to. If both n and s
+(or e and w) are specified, the slave will be stretched to fill the entire
+height (or width) of its cavity.
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item I<$pane>-E<gt>B<see>(I<$widget> ?,I<options>?)
+
+Adjusts the view so that I<$widget> is visable. Aditional parameters in
+I<options-value> pairs can be passed, each I<option-value> pair must be
+one of the following
+
+=over 8
+
+=item B<-anchor> =E<gt> I<anchor>
+
+Specifies how to make the widget visable. If not given then as much of
+the widget as possible is made visable.
+
+Possible values are B<n>, B<s>, B<w>, B<e>, B<nw>, B<ne>, B<sw> and B<se>.
+This will cause an edge on the widget to be aligned with the corresponding
+edge on the pane. for example B<nw> will cause the top left of the widget
+to be placed at the top left of the pane. B<s> will cause the bottom of the
+widget to be placed at the bottom of the pane, and as much of the widget
+as possible made visable in the x direction.
+
+=back
+
+=item I<$pane>-E<gt>B<xview>
+
+Returns a list containing two elements, both of which are real fractions
+between 0 and 1. The first element gives the position of the left of the
+window, relative to the Pane as a whole (0.5 means it is halfway through the
+Pane, for example). The second element gives the position of the right of the
+window, relative to the Pane as a whole.
+
+=item I<$pane>-E<gt>B<xview>(I<$widget>)
+
+Adjusts the view in the window so that I<widget> is displayed at the left of
+the window.
+
+=item I<$pane>-E<gt>B<xview>(B<moveto> =E<gt> I<fraction>)
+
+Adjusts the view in the window so that I<fraction> of the total width of the
+Pane is off-screen to the left. fraction must be a fraction between 0 and 1.
+
+=item I<$pane>-E<gt>B<xview>(B<scroll> =E<gt> I<number>, I<what>)
+
+This command shifts the view in the window left or right according to I<number>
+and I<what>. I<Number> must be an integer. I<What> must be either B<units> or
+B<pages> or an abbreviation of one of these. If I<what> is B<units>, the view
+adjusts left or right by I<number>*10 screen units on the display; if it is
+B<pages> then the view adjusts by number screenfuls. If number is negative then
+widgets farther to the left become visible; if it is positive then widgets
+farther to the right become visible.
+
+=item I<$pane>-E<gt>B<yview>
+
+Returns a list containing two elements, both of which are real fractions
+between 0 and 1. The first element gives the position of the top of the
+window, relative to the Pane as a whole (0.5 means it is halfway through the
+Pane, for example). The second element gives the position of the bottom of the
+window, relative to the Pane as a whole.
+
+=item I<$pane>-E<gt>B<yview>(I<$widget>)
+
+Adjusts the view in the window so that I<widget> is displayed at the top of the
+window.
+
+=item I<$pane>-E<gt>B<yview>(B<moveto> =E<gt> I<fraction>)
+
+Adjusts the view in the window so that I<fraction> of the total width of the
+Pane is off-screen to the top. fraction must be a fraction between 0 and 1.
+
+=item I<$pane>-E<gt>B<yview>(B<scroll> =E<gt> I<number>, I<what>)
+
+This command shifts the view in the window up or down according to I<number>
+and I<what>. I<Number> must be an integer. I<What> must be either B<units> or
+B<pages> or an abbreviation of one of these. If I<what> is B<units>, the view
+adjusts up or down by I<number>*10 screen units on the display; if it is
+B<pages> then the view adjusts by number screenfuls. If number is negative then
+widgets farther up become visible; if it is positive then widgets farther down
+become visible.
+
+=back
+
+=head1 AUTHOR
+
+Graham Barr E<lt>F<gbarr@pobox.com>E<gt>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997-1998 Graham Barr. All rights reserved.
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/Panedwindow.pm b/Master/tlpkg/tlperl/lib/Tk/Panedwindow.pm
new file mode 100644
index 00000000000..ae279f20012
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Panedwindow.pm
@@ -0,0 +1,221 @@
+package Tk::Panedwindow;
+use strict;
+
+use vars qw/$VERSION/;
+$VERSION = '4.004'; # sprintf '4.%03d', q$Revision: #3 $ =~ /#(\d+)/;
+
+# A Panedwindow widget (similar to Adjuster).
+
+use Tk qw/Ev/;
+use base qw/Tk::Widget/;
+
+Construct Tk::Widget 'Panedwindow';
+
+sub Tk_cmd { \&Tk::panedwindow }
+
+Tk::Methods('add', 'forget', 'identify', 'proxy', 'sash', 'panes');
+
+use Tk::Submethods (
+ 'proxy' => [qw/coord forget place/],
+ 'sash' => [qw/coord mark place/],
+);
+
+sub ClassInit {
+
+ my ($class,$mw) = @_;
+
+ $class->SUPER::ClassInit($mw);
+
+ $mw->bind($class, '<Button-1>' => ['MarkSash' => Ev('x'), Ev('y'), 1]);
+ $mw->bind($class, '<Button-2>' => ['MarkSash' => Ev('x'), Ev('y'), 0]);
+ $mw->bind($class, '<B1-Motion>' => ['DragSash' => Ev('x'), Ev('y'), 1]);
+ $mw->bind($class, '<B2-Motion>' => ['DragSash' => Ev('x'), Ev('y'), 0]);
+ $mw->bind($class, '<ButtonRelease-1>' => ['ReleaseSash' => 1]);
+ $mw->bind($class, '<ButtonRelease-2>' => ['ReleaseSash' => 0]);
+ $mw->bind($class, '<Motion>' => ['Motion' => Ev('x'), Ev('y')]);
+ $mw->bind($class, '<Leave>' => ['Leave']);
+
+ return $class;
+
+} # end ClassInit
+
+sub MarkSash {
+
+ # MarkSash
+ #
+ # Handle marking the correct sash for possible dragging
+ #
+ # Arguments:
+ # w the widget
+ # x widget local x coord
+ # y widget local y coord
+ # proxy whether this should be a proxy sash
+ # Results:
+ # None
+
+ my ($w, $x, $y, $proxy) = @_;
+
+ my @what = $w->identify($x, $y);
+ if ( @what == 2 ) {
+ my ($index, $which) = @what[0 .. 1];
+ if (not $Tk::strictMotif or $which eq 'handle') {
+ $w->sashMark($index, $x, $y) if not $proxy;
+ $w->{_sash} = $index;
+ my ($sx, $sy) = $w->sashCoord($index);
+ $w->{_dx} = $sx - $x;
+ $w->{_dy} = $sy - $y;
+ }
+ }
+
+} # end MarkSash
+
+sub DragSash {
+
+ # DragSash
+ #
+ # Handle dragging of the correct sash
+ #
+ # Arguments:
+ # w the widget
+ # x widget local x coord
+ # y widget local y coord
+ # proxy whether this should be a proxy sash
+ # Results:
+ # Moves sash
+
+ my ($w, $x, $y, $proxy) = @_;
+
+ if ( exists $w->{_sash} ) {
+ if ($proxy) {
+ $w->proxyPlace($x + $w->{_dx}, $y + $w->{_dy});
+ } else {
+ $w->sashPlace($w->{_sash}, $x + $w->{_dx}, $y + $w->{_dy});
+ }
+ }
+
+} # end DragSash
+
+sub ReleaseSash {
+
+ # ReleaseSash
+ #
+ # Handle releasing of the sash
+ #
+ # Arguments:
+ # w the widget
+ # proxy whether this should be a proxy sash
+ # Results:
+ # Returns ...
+
+ my ($w, $proxy) = @_;
+
+ if ( exists $w->{_sash} ) {
+ if ($proxy) {
+ my ($x, $y) = $w->proxyCoord;
+ $w->sashPlace($w->{_sash}, $x, $y);
+ $w->proxyForget;
+ }
+ delete $w->{'_sash', '_dx', '_dy'};
+ }
+
+} # end ReleaseSash
+
+sub Motion {
+
+ # Motion
+ #
+ # Handle motion on the widget. This is used to change the cursor
+ # when the user moves over the sash area.
+ #
+ # Arguments:
+ # w the widget
+ # x widget local x coord
+ # y widget local y coord
+ # Results:
+ # May change the cursor. Sets up a timer to verify that we are still
+ # over the widget.
+
+ my ($w, $x, $y) = @_;
+
+ my @id = $w->identify($x, $y);
+ if ( (@id == 2) and
+ (not $Tk::strictMotif or $id[1] eq 'handle') ) {
+ if ( not exists $w->{_panecursor} ) {
+ $w->{_panecursor} = $w->cget(-cursor);
+ if ( not defined $w->cget(-sashcursor) ) {
+ if ( $w->cget(-orient) eq 'horizontal' ) {
+ $w->configure(-cursor => 'sb_h_double_arrow');
+ } else {
+ $w->configure(-cursor => 'sb_v_double_arrow');
+ }
+ } else {
+ $w->configure(-cursor => $w->cget(-sashcursor));
+ }
+ if ( exists $w->{_pwAfterId} ) {
+ $w->afterCancel($w->{_pwAfterId});
+ }
+ $w->{_pwAfterId} = $w->after(150 => ['Cursor' => $w]);
+ }
+ return
+ }
+ if ( exists $w->{_panecursor} ) {
+ $w->configure(-cursor => $w->{_panecursor});
+ delete $w->{_panecursor};
+ }
+
+} # end Motion
+
+sub Cursor {
+
+ # Cursor
+ #
+ # Handles returning the normal cursor when we are no longer over the
+ # sash area. This needs to be done this way, because the panedwindow
+ # won't see Leave events when the mouse moves from the sash to a
+ # paned child, although the child does receive an Enter event.
+ #
+ # Arguments:
+ # w the widget
+ # Results:
+ # May restore the default cursor, or schedule a timer to do it.
+
+ my ($w) = @_;
+
+ if ( exists $w->{_panecursor} ) {
+ if ( $w->containing($w->pointerx, $w->pointery) == $w ) {
+ $w->{_pwAfterId} = $w->after(150 => ['Cursor' => $w]);
+ } else {
+ $w->configure(-cursor => $w->{_panecursor});
+ delete $w->{_panecursor};
+ if ( exists $w->{_pwAfterId} ) {
+ $w->afterCancel($w->{_pwAfterId});
+ delete $w->{_pwAfterId};
+ }
+ }
+ }
+
+} # end Cursor
+
+sub Leave {
+
+ # Leave
+ #
+ # Return to default cursor when leaving the pw widget.
+ #
+ # Arguments:
+ # w the widget
+ # Results:
+ # Restores the default cursor
+
+ my ($w) = @_;
+
+ if ( exists $w->{_panecursor} ) {
+ $w->configure(-cursor => $w->{_panecursor});
+ delete $w->{_panecursor};
+ }
+
+} # end Leave
+
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Panedwindow.pod b/Master/tlpkg/tlperl/lib/Tk/Panedwindow.pod
new file mode 100644
index 00000000000..673938d55e5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Panedwindow.pod
@@ -0,0 +1,326 @@
+# Copyright (c) 1992 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# RCS: @(#) $Id: panedwindow.n,v 1.2.2.1 2003/07/17 20:49:00 dkf Exp $
+
+=head1 NAME
+
+Tk::Panedwindow - Create and manipulate Panedwindow widgets
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+I<$panedwindow> = I<$parent>-E<gt>B<Panedwindow>(?I<options>?);
+
+ -background -height -width
+ -borderwidth -orient
+ -cursor -relief
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Option: B<-handlepad>
+
+=item Name: B<handlePad>
+
+=item Class: B<HandlePad>
+
+When sash handles are drawn, specifies the distance from the top or
+left end of the sash (depending on the orientation of the widget) at
+which to draw the handle. May be any value accepted by B<Tk_GetPixels>.
+
+=item Option: B<-handlesize>
+
+=item Name: B<handleSize>
+
+=item Class: B<HandleSize>
+
+Specifies the side length of a sash handle. Handles are always
+drawn as squares. May be any value accepted by B<Tk_GetPixels>.
+
+=item Option: B<-opaqueresize>
+
+=item Name: B<opaqueResize>
+
+=item Class: B<OpaqueResize>
+
+Specifies whether panes should be resized as a sash is moved (true),
+or if resizing should be deferred until the sash is placed (false).
+
+=item Option: B<-sashcursor>
+
+=item Name: B<sashCursor>
+
+=item Class: B<SashCursor>
+
+Mouse cursor to use when over a sash. If null,
+B<sb_h_double_arrow> will be used for horizontal Panedwindows, and
+B<sb_v_double_arrow> will be used for vertical Panedwindows.
+
+=item Option: B<-sashpad>
+
+=item Name: B<sashPad>
+
+=item Class: B<SashPad>
+
+Specifies the amount of padding to leave of each side of a sash. May
+be any value accepted by B<Tk_GetPixels>.
+
+=item Option: B<-sashrelief>
+
+=item Name: B<sashRelief>
+
+=item Class: B<SashRelief>
+
+Relief to use when drawing a sash. May be any of the standard Tk
+relief values.
+
+=item Option: B<-sashwidth>
+
+=item Name: B<sashWidth>
+
+=item Class: B<SashWidth>
+
+Specifies the width of each sash. May be any value accepted by
+B<Tk_GetPixels>.
+
+=item Option: B<-showhandle>
+
+=item Name: B<showHandle>
+
+=item Class: B<ShowHandle>
+
+Specifies whether sash handles should be shown. May be any valid
+boolean value.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Panedwindow> method creates a new window (given by the
+$panedwindow argument) and makes it into a Panedwindow widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the Panedwindow
+such as its default background color and relief.
+
+A Panedwindow widget contains any number of panes, arranged
+horizontally or vertically, according to the value of the
+B<-orient> option. Each pane contains one widget, and each pair of
+panes is separated by a moveable (via mouse movements) sash. Moving a
+sash causes the widgets on either side of the sash to be resized.
+
+=head1 WIDGET METHODS
+
+The B<Panedwindow> method
+may be used to invoke various operations on the widget. It has the
+following general form:
+
+ $widget->method(?arg arg ...?);
+
+The following
+commands are possible for Panedwindow widgets:
+
+=over 4
+
+=item I<$widget>-E<gt>B<add>(?window ...? ?option value ...?);
+
+Add one or more windows to the Panedwindow, each in a separate pane.
+The arguments consist of the names of one or more windows
+followed by pairs of arguments that specify how to manage the windows.
+I<Option> may have any of the values accepted by the
+B<configure> subcommand.
+
+=item I<$widget>-E<gt>B<cget>(I<option>);
+
+Returns the current value of the configuration option given by
+I<option>. I<Option> may have any of the values accepted by the
+B<Panedwindow> command.
+
+=item I<$widget>-E<gt>B<configure>(I<?option?, ?value, option, value, ...?>);
+
+Query or modify the configuration options of the widget. If no
+I<option> is specified, returns a list describing all of the
+available options for $widget (see L<Tk::configure> for
+information on the format of this list). If I<option> is specified
+with no I<value>, then the command returns a list describing the
+one named option (this list will be identical to the corresponding
+sublist of the value returned if no I<option> is specified). If
+one or more I<option-value> pairs are specified, then the command
+modifies the given widget option(s) to have the given value(s); in
+this case the command returns an empty string. I<Option> may have
+any of the values accepted by the B<Panedwindow> command.
+
+=item I<$widget>-E<gt>B<forget>(?window ...?);
+
+Remove the pane containing $widget from the Panedwindow. All
+geometry management options for $widget will be forgotten.
+
+=item I<$widget>-E<gt>B<identify>(I<x, y>);
+
+Identify the Panedwindow component underneath the point given by
+I<x> and I<y>, in window coordinates. If the point is over a
+sash or a sash handle, the result is a two element list containing the
+index of the sash or handle, and a word indicating whether it is over
+a sash or a handle, such as [0, 'sash'] or [2, 'handle']. If the point is
+over any other part of the Panedwindow, the result is an empty list.
+
+=item I<$widget>-E<gt>B<proxy>(I<?args?>);
+
+This command is used to query and change the position of the sash
+proxy, used for rubberband-style pane resizing. It can take any of
+the following forms:
+
+=over 4
+
+=item I<$widget>-E<gt>B<proxyCoord>;
+
+Return a list containing the x and y coordinates of the most recent
+proxy location.
+
+=item I<$widget>-E<gt>B<proxyForget>;
+
+Remove the proxy from the display.
+
+=item I<$widget>-E<gt>B<proxyPlace>(I<x, y>);
+
+Place the proxy at the given I<x> and I<y> coordinates.
+
+=back
+
+=item I<$widget>-E<gt>B<sash>(I<?args?>);
+
+This command is used to query and change the position of sashes in the
+Panedwindow. It can take any of the following forms:
+
+=over 4
+
+=item I<$widget>-E<gt>B<sashCoord>(I<index>);
+
+Return the current x and y coordinate pair for the sash given by
+I<index>. I<Index> must be an integer between 0 and 1 less than
+the number of panes in the Panedwindow. The coordinates given are
+those of the top left corner of the region containing the sash.
+I<$widget>-E<gt>B<sashDragto>(I<index, x, y>)
+This command computes the difference between the given coordinates and the
+coordinates given to the last B<sash coord> command for the given
+sash. It then moves that sash the computed difference. The return
+value is the empty string.
+
+=item I<$widget>-E<gt>B<sashMark>(I<index, x, y>);
+
+Records I<x> and I<y> for the sash given by I<index>; used in
+conjunction with later dragto commands to move the sash.
+
+=item I<$widget>-E<gt>B<sashPlace>(I<index, x, y>);
+
+Place the sash given by I<index> at the given coordinates.
+
+=back
+
+=item $widget I<$widget>-E<gt>B<panecget>(option);
+
+Query a management option for $widget. I<Option> may be any
+value allowed by the B<paneconfigure> subcommand.
+
+=item $widget I<$widget>-E<gt>B<paneconfigure>(?option? ?value option value ...?);
+
+Query or modify the management options for $widget. If no
+I<option> is specified, returns a list describing all of the
+available options for $widget (see L<Tk::configure> for
+information on the format of this list). If I<option> is specified
+with no I<value>, then the command returns a list describing the
+one named option (this list will be identical to the corresponding
+sublist of the value returned if no I<option> is specified). If
+one or more I<option-value> pairs are specified, then the command
+modifies the given widget option(s) to have the given value(s); in
+this case the command returns an empty string. The following options
+are supported:
+
+=over 4
+
+=item B<-after> =E<gt> $widget
+
+Insert the window after the window specified. $widget should be the
+name of a window already managed by $widget.
+
+=item B<-before> =E<gt> $widget
+
+Insert the window before the window specified. $widget should be
+the name of a window already managed by $widget.
+
+=item B<-height> =E<gt> I<size>
+
+Specify a height for the window. The height will be the outer
+dimension of the window including its border, if any. If I<size>
+is an empty string, or if B<-height> is not specified, then the
+height requested internally by the window will be used initially; the
+height may later be adjusted by the movement of sashes in the
+Panedwindow. I<Size> may be any value accepted by B<Tk_GetPixels>.
+
+=item B<-minsize> =E<gt> I<n>
+
+Specifies that the size of the window cannot be made less than
+I<n>. This constraint only affects the size of the widget in the
+paned dimension -- the x dimension for horizontal Panedwindows, the y
+dimension for vertical Panedwindows. May be any value accepted by
+B<Tk_GetPixels>.
+
+=item B<-padx> =E<gt> I<n>
+
+Specifies a non-negative value indicating how much extra space to
+leave on each side of the window in the X-direction. The value may
+have any of the forms accepted by B<Tk_GetPixels>.
+
+=item B<-pady> =E<gt> I<n>
+
+Specifies a non-negative value indicating how much extra space to
+leave on each side of the window in the Y-direction. The value may
+have any of the forms accepted by B<Tk_GetPixels>.
+
+=item B<-sticky> =E<gt> I<style>
+
+If a window's pane is larger than the requested dimensions of the
+window, this option may be used to position (or stretch) the window
+within its pane. I<Style> is a string that contains zero or more
+of the characters B<n>, B<s>, B<e> or B<w>. The string
+can optionally contains spaces or commas, but they are ignored. Each
+letter refers to a side (north, south, east, or west) that the window
+will "stick" to. If both B<n> and B<s> (or B<e> and B<w>)
+are specified, the window will be stretched to fill the entire height
+(or width) of its cavity.
+
+=item B<-width> =E<gt> I<size>
+
+Specify a width for the window. The width will be the outer
+dimension of the window including its border, if any. If I<size>
+is an empty string, or if B<-width> is not specified, then the
+width requested internally by the window will be used initially; the
+width may later be adjusted by the movement of sashes in the
+Panedwindow. I<Size> may be any value accepted by B<Tk_GetPixels>.
+
+=back
+
+=item I<$widget>-E<gt>B<panes>;
+
+Returns an ordered list of the widgets managed by $widget.
+
+=back
+
+=head1 RESIZING PANES
+
+A pane is resized by grabbing the sash (or sash handle if present) and
+dragging with the mouse. This is accomplished via mouse motion
+bindings on the widget. When a sash is moved, the sizes of the panes
+on each side of the sash, and thus the widgets in those panes, are
+adjusted.
+
+When a pane is resized from outside (eg, it is packed to expand and
+fill, and the containing toplevel is resized), space is added to the final
+(rightmost or bottommost) pane in the window.
+
+=head1 KEYWORDS
+
+Panedwindow, widget, geometry management
diff --git a/Master/tlpkg/tlperl/lib/Tk/Photo.pm b/Master/tlpkg/tlperl/lib/Tk/Photo.pm
new file mode 100644
index 00000000000..587c8c239b9
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Photo.pm
@@ -0,0 +1,22 @@
+package Tk::Photo;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # sprintf '4.%03d', 4+q$Revision: #4 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw($XS_VERSION);
+
+use base qw(Tk::Image);
+
+Construct Tk::Image 'Photo';
+
+sub Tk_image { 'photo' }
+
+Tk::Methods('blank','copy','data','formats','get','put','read',
+ 'redither','transparency','write');
+
+use Tk::Submethods (
+ 'transparency' => [qw/get set/],
+);
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Photo.pod b/Master/tlpkg/tlperl/lib/Tk/Photo.pod
new file mode 100644
index 00000000000..02a691d6261
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Photo.pod
@@ -0,0 +1,475 @@
+# Copyright (c) 1994 The Australian National University
+# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# Author: Paul Mackerras (paulus@cs.anu.edu.au),
+# Department of Computer Science,
+# Australian National University.
+# RCS: @(#) $Id: photo.n,v 1.2 1998/09/14 18:22:59 stanton Exp $
+#
+
+=head1 NAME
+
+Tk::Photo - Full-color images
+
+=for category Tk Image Classes
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<Photo>(?I<name>??, I<options>?)
+
+=head1 DESCRIPTION
+
+A photo is an L<image|Tk::Image> whose pixels can display any color or be
+transparent. A photo image is stored internally in full color (32
+bits per pixel), and is displayed using dithering if necessary. Image
+data for a photo image can be obtained from a file or a string, or it
+can be supplied from
+C code through a procedural interface. At present, only GIF,
+XBM, XPM, BMP, JPEG, PNG and PPM/PGM
+formats are supported, but an interface exists to allow additional
+image file formats to be added easily. A photo image is transparent
+in regions where no image data has been supplied
+or where it has been set transparent by the B<transparencySet>
+subcommand.
+
+=head1 CREATING PHOTOS
+
+Photos are created using the B<Photo> method.
+B<Photo> supports the following I<options>:
+
+=over 4
+
+=item B<-data> =E<gt> I<string>
+
+Specifies the contents of the image as a string.
+The string can
+contain base64 encoded data or binary data.
+The format of the
+string must be one of those for which there is an image file format
+handler that will accept string data. If both the B<-data>
+and B<-file> options are specified, the B<-file> option takes
+precedence.
+
+=item B<-format> =E<gt> I<format-name>
+
+Specifies the name of the file format for the data specified with the
+B<-data> or B<-file> option.
+
+=item B<-file> =E<gt> I<name>
+
+I<name> gives the name of a file that is to be read to supply data
+for the photo image. The file format must be one of those for which
+there is an image file format handler that can read data.
+
+=item B<-gamma> =E<gt> I<value>
+
+Specifies that the colors allocated for displaying this image in a
+window should be corrected for a non-linear display with the specified
+gamma exponent value. (The intensity produced by most
+CRT displays is a power function of the input value, to a good
+approximation; gamma is the exponent and is typically around 2).
+The value specified must be greater than zero. The default
+value is one (no correction). In general, values greater than one
+will make the image lighter, and values less than one will make it
+darker.
+
+=item B<-height> =E<gt> I<number>
+
+Specifies the height of the image, in pixels. This option is useful
+primarily in situations where the user wishes to build up the contents
+of the image piece by piece. A value of zero (the default) allows the
+image to expand or shrink vertically to fit the data stored in it.
+
+=item B<-palette> =E<gt> I<palette-spec>
+
+Specifies the resolution of the color cube to be allocated for
+displaying this image, and thus the number of colors used from the
+colormaps of the windows where it is displayed. The
+I<palette-spec> string may be either a single decimal number,
+specifying the number of shades of gray to use, or three decimal
+numbers separated by slashes (/), specifying the number of shades of
+red, green and blue to use, respectively. If the first form (a single
+number) is used, the image will be displayed in monochrome (i.e.,
+grayscale).
+
+=item B<-width> =E<gt> I<number>
+
+Specifies the width of the image, in pixels. This option is useful
+primarily in situations where the user wishes to build up the contents
+of the image piece by piece. A value of zero (the default) allows the
+image to expand or shrink horizontally to fit the data stored in it.
+
+=back
+
+=head1 IMAGE METHODS
+
+When a photo image is created, Tk also creates a new object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+
+Those options that write data to the image generally expand the size
+of the image, if necessary, to accommodate the data written to the
+image, unless the user has specified non-zero values for the
+B<-width> and/or B<-height> configuration options, in which
+case the width and/or height, respectively, of the image will not be
+changed.
+
+The following addition methods are available for photo images:
+
+=over 4
+
+=item I<$image>-E<gt>B<blank>
+
+Blank the image; that is, set the entire image to have no data, so it
+will be displayed as transparent, and the background of whatever
+window it is displayed in will show through.
+
+=item I<$image>-E<gt>B<copy>(I<sourceImage> ?,I<option value(s) ...>?)
+
+Copies a region from the image called I<$sourceImage> (which must
+be a photo image) to the image called I<$image>, possibly with
+pixel zooming and/or subsampling. If no options are specified, this
+method copies the whole of I<$sourceImage> into I<$image>,
+starting at coordinates (0,0) in I<$image>. The following
+options may be specified:
+
+=over 8
+
+=item B<-from> =E<gt> I<x1, y1, ? ,x2, y2?>
+
+Specifies a rectangular sub-region of the source image to be copied.
+(I<x1,y1>) and (I<x2,y2>) specify diagonally opposite corners of
+the rectangle. If I<x2> and I<y2> are not specified, the
+default value is the bottom-right corner of the source image. The
+pixels copied will include the left and top edges of the specified
+rectangle but not the bottom or right edges. If the B<-from>
+option is not given, the default is the whole source image.
+
+=item B<-to> =E<gt> I<x1, y1, ?, x2, y2?>
+
+Specifies a rectangular sub-region of the destination image to be
+affected. (I<x1,y1>) and (I<x2,y2>) specify diagonally opposite
+corners of the rectangle. If I<x2> and I<y2> are not specified,
+the default value is (I<x1,y1>) plus the size of the source
+region (after subsampling and zooming, if specified). If I<x2> and
+I<y2> are specified, the source region will be replicated if
+necessary to fill the destination region in a tiled fashion.
+
+=item B<-shrink>
+
+Specifies that the size of the destination image should be reduced, if
+necessary, so that the region being copied into is at the bottom-right
+corner of the image. This option will not affect the width or height
+of the image if the user has specified a non-zero value for the
+B<-width> or B<-height> configuration option, respectively.
+
+=item B<-zoom> =E<gt> I<x, y>
+
+Specifies that the source region should be magnified by a factor of
+I<x> in the X direction and I<y> in the Y direction. If I<y>
+is not given, the default value is the same as I<x>. With this
+option, each pixel in the source image will be expanded into a block
+of I<x> x I<y> pixels in the destination image, all the same
+color. I<x> and I<y> must be greater than 0.
+
+=item B<-subsample> =E<gt> I<x, y>
+
+Specifies that the source image should be reduced in size by using
+only every I<x>th pixel in the X direction and I<y>th pixel in
+the Y direction. Negative values will cause the image to be flipped
+about the Y or X axes, respectively. If I<y> is not given, the
+default value is the same as I<x>.
+
+=item B<-compositingrule> =E<gt> I<rule>
+
+Specifies how transparent pixels in the source image are combined with
+the destination image. When a compositing rule of I<overlay> is
+set, the old contents of the destination image are visible, as if the
+source image were printed on a piece of transparent film and placed
+over the top of the destination. When a compositing rule of I<set>
+is set, the old contents of the destination image are discarded and
+the source image is used as-is. The default compositing rule is
+I<overlay>.
+
+=back
+
+=item I<$image>-E<gt>B<data>(?I<option value(s), ...>?)
+
+Returns image data in the form of a string.
+The following options may be specified:
+
+=over 8
+
+=item B<-background> =E<gt> I< color>
+
+If the color is specified, the data will not contain any transparency
+information. In all transparent pixels the color will be replaced by
+the specified color.
+
+=item B<-format> =E<gt> I<format-name>
+
+Specifies the name of the image file format handler to be used.
+Specifically, this method searches
+for the first handler whose name matches a initial substring of
+I<format-name> and which has the capability to read this image data.
+If this option is not given, this method uses the first
+handler that has the capability to read the image data.
+
+=item B<-from> =E<gt> I<x1, y1, ?, x2, y2?>
+
+Specifies a rectangular region of I<$image> to be
+returned. If only I<x1> and I<y1> are specified, the region
+extends from I<(x1,y1)> to the bottom-right corner of
+I<$image>. If all four coordinates are given, they specify
+diagonally opposite corners of the rectangular region, including x1,y1
+and excluding x2,y2. The default,
+if this option is not given, is the whole image.
+
+=item B<-grayscale>
+
+If this options is specified, the data will not contain color
+information. All pixel data will be transformed into grayscale.
+
+=back
+
+=item I<$image>-E<gt>B<get>(I<x, y>)
+
+Returns the color of the pixel at coordinates (I<x>,I<y>) in the
+image as a list of three integers between 0 and 255, representing the
+red, green and blue components respectively.
+
+=item I<$image>-E<gt>B<put>(I<data> ?,B<-format>=E<gt>I<format-name>? ?,B<-to>=E<gt>I< x1 y1 ?x2 y2?>?)
+
+Sets pixels in I<$image> to the data specified in I<data>.
+This command first searches the list of image file format handlers for
+a handler that can interpret the data in I<data>, and then reads
+the image encoded within into I<$image> (the destination image).
+If I<data> does not match any known format, an attempt to interpret
+it as a (top-to-bottom) list of scan-lines is made, with each
+scan-line being a (left-to-right) list of pixel colors (see
+B<Tk_GetColor> for a description of valid colors.) Every scan-line
+must be of the same length. Note that when I<data> is a single
+color name, you are instructing Tk to fill a rectangular region with
+that color. The following options may be specified:
+
+=over 4
+
+=item B<-format> =E<gt>I<format-name>
+
+Specifies the format of the image data in I<data>.
+Specifically, only image file format handlers whose names begin with
+I<format-name> will be used while searching for an image data
+format handler to read the data.
+
+=item B<-to> =E<gt>I<x, y> ?I<, x2, y2>?
+
+Specifies the coordinates of the top-left corner (I<x1>,I<y1>)
+of the region of I<$image> into which data from I<filename>
+are to be read. The default is (0,0). If I<x2>,I<y2> is given
+and I<data> is not large enough to cover the rectangle specified by
+this option, the image data extracted will be tiled so it covers the
+entire destination rectangle. Note that if I<data> specifies a
+single color value, then a region extending to the bottom-right corner
+represented by (I<x2>,I<y2>) will be filled with that color.
+
+=back
+
+=item I<$image>-E<gt>B<read>(I<filename> ?,I<option value(s), ...>?)
+
+Reads image data from the file named I<filename> into the image.
+This method first searches the list of
+image file format handlers for a handler that can interpret the data
+in I<filename>, and then reads the image in I<filename> into
+I<$image> (the destination image). The following options may be
+specified:
+
+=over 8
+
+=item B<-format> =E<gt> I<format-name>
+
+Specifies the format of the image data in I<filename>.
+Specifically, only image file format handlers whose names begin with
+I<format-name> will be used while searching for an image data
+format handler to read the data.
+
+=item B<-from> =E<gt> I<x1, y1, x2, y2>
+
+Specifies a rectangular sub-region of the image file data to be copied
+to the destination image. If only I<x1> and I<y1> are
+specified, the region extends from (I<x1,y1>) to the bottom-right
+corner of the image in the image file. If all four coordinates are
+specified, they specify diagonally opposite corners or the region.
+The default, if this option is not specified, is the whole of the
+image in the image file.
+
+=item B<-shrink>
+
+If this option is specified, the size of I<$image> will be reduced, if
+necessary, so that the region into which the image file data are read
+is at the bottom-right corner of the I<$image>. This option
+will not affect the width or height of the image if the user has
+specified a non-zero value for the B<-width> or B<-height>
+configuration option, respectively.
+
+=item B<-to> =E<gt> I<x, y>
+
+Specifies the coordinates of the top-left corner of the region of
+I<$image> into which data from I<filename> are to be read.
+The default is (0,0).
+
+=back
+
+=item I<$image>-E<gt>B<redither>
+
+The dithering algorithm used in displaying photo images propagates
+quantization errors from one pixel to its neighbors.
+If the image data for I<$image> is supplied in pieces, the
+dithered image may not be exactly correct. Normally the difference is
+not noticeable, but if it is a problem, this method can be used to
+recalculate the dithered image in each window where the image is
+displayed.
+
+=item I<$image>-E<gt>B<transparency>(I<subcommand, ?arg, arg ...?>);
+
+Allows examination and manipulation of the transparency information in
+the photo image. Several subcommands are available:
+
+=over 4
+
+=item I<$image>-E<gt>B<transparencyGet>(I<x, y>);
+
+Returns a boolean indicating if the pixel at (I<x>,I<y>) is
+transparent.
+
+=item I<$image>-E<gt>B<transparencySet>(I<x, y, boolean>);
+
+Makes the pixel at (I<x>,I<y>) transparent if I<boolean> is
+true, and makes that pixel opaque otherwise.
+
+=back
+
+=item I<$image>-E<gt>B<write>(I<filename> ?,I<option value(s), ...>?)
+
+Writes image data from I<$image> to a file named I<filename>.
+The following options may be specified:
+
+=over 8
+
+=item B<-background> =E<gt> I< color>
+
+If the color is specified, the data will not contain any transparency
+information. In all transparent pixels the color will be replaced by
+the specified color.
+
+=item B<-format> =E<gt> I<format-name>
+
+Specifies the name of the image file format handler to be used to
+write the data to the file. Specifically, this subcommand searches
+for the first handler whose name matches a initial substring of
+I<format-name> and which has the capability to write an image
+file. If this option is not given, this subcommand uses the first
+handler that has the capability to write an image file.
+
+=item B<-from> =E<gt> I<x1, y1, ?, x2, y2?>
+
+Specifies a rectangular region of I<$image> to be written to the
+image file. If only I<x1> and I<y1> are specified, the region
+extends from I<(x1,y1)> to the bottom-right corner of
+I<$image>. If all four coordinates are given, they specify
+diagonally opposite corners of the rectangular region. The default,
+if this option is not given, is the whole image.
+
+
+=item B<-grayscale>
+
+If this options is specified, the data will not contain color
+information. All pixel data will be transformed into grayscale.
+
+=back
+
+=back
+
+=head1 IMAGE FORMATS
+
+The photo image code is structured to allow handlers for additional
+image file formats to be added easily. The photo image code maintains
+a list of these handlers. Handlers are added to the list by
+registering them with a call to B<Tk_CreatePhotoImageFormat>. The
+standard Tk distribution comes with handlers for XBM, XPM, BMP, JPEG,
+PNG and PPM/PGM formats, which are automatically registered on
+initialization.
+
+When reading an image file or processing
+string data specified with the B<-data> configuration option, the
+photo image code invokes each handler in turn until one is
+found that claims to be able to read the data in the file or string.
+Usually this will find the correct handler, but if it doesn't, the
+user may give a format name with the B<-format> option to specify
+which handler to use. In fact the photo image code will try those
+handlers whose names begin with the string specified for the
+B<-format> option (the comparison is case-insensitive). For
+example, if the user specifies B<-format> B<=E<gt>> B<gif>, then a handler
+named GIF87 or GIF89 may be invoked, but a handler
+named JPEG may not (assuming that such handlers had been
+registered).
+
+When writing image data to a file, the processing of the
+B<-format> option is slightly different: the string value given
+for the B<-format> option must begin with the complete name of the
+requested handler, and may contain additional information following
+that, which the handler can use, for example, to specify which variant
+to use of the formats supported by the handler.
+Note that not all image handlers may support writing transparency data
+to a file, even where the target image format does.
+
+=head1 COLOR ALLOCATION
+
+When a photo image is displayed in a window, the photo image code
+allocates colors to use to display the image and dithers the image, if
+necessary, to display a reasonable approximation to the image using
+the colors that are available. The colors are allocated as a color
+cube, that is, the number of colors allocated is the product of the
+number of shades of red, green and blue.
+
+Normally, the number of
+colors allocated is chosen based on the depth of the window. For
+example, in an 8-bit PseudoColor window, the photo image code will
+attempt to allocate seven shades of red, seven shades of green and
+four shades of blue, for a total of 198 colors. In a 1-bit StaticGray
+(monochrome) window, it will allocate two colors, black and white. In
+a 24-bit DirectColor or TrueColor window, it will allocate 256 shades
+each of red, green and blue. Fortunately, because of the way that
+pixel values can be combined in DirectColor and TrueColor windows,
+this only requires 256 colors to be allocated. If not all of the
+colors can be allocated, the photo image code reduces the number of
+shades of each primary color and tries again.
+
+The user can exercise some control over the number of colors that a
+photo image uses with the B<-palette> configuration option. If
+this option is used, it specifies the maximum number of shades of
+each primary color to try to allocate. It can also be used to force
+the image to be displayed in shades of gray, even on a color display,
+by giving a single number rather than three numbers separated by
+slashes.
+
+=head1 CREDITS
+
+The photo image type was designed and implemented by Paul Mackerras,
+based on his earlier photo widget and some suggestions from
+John Ousterhout.
+
+=head1 SEE ALSO
+
+L<Tk::Bitmap|Tk::Bitmap>
+L<Tk::Image|Tk::Image>
+L<Tk::Pixmap|Tk::Pixmap>
+
+=head1 KEYWORDS
+
+photo, image, color
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Pixmap.pm b/Master/tlpkg/tlperl/lib/Tk/Pixmap.pm
new file mode 100644
index 00000000000..3fbc3179b56
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Pixmap.pm
@@ -0,0 +1,19 @@
+package Tk::Pixmap;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/TixPixmap/Pixmap.pm#4 $
+
+use Tk qw($XS_VERSION);
+
+use Tk::Image ();
+
+use base qw(Tk::Image);
+
+Construct Tk::Image 'Pixmap';
+
+bootstrap Tk::Pixmap;
+
+sub Tk_image { 'pixmap' }
+
+1;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Pixmap.pod b/Master/tlpkg/tlperl/lib/Tk/Pixmap.pod
new file mode 100644
index 00000000000..d0f36b00e65
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Pixmap.pod
@@ -0,0 +1,64 @@
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distribution are in the file
+# license.tcl.
+
+=head1 NAME
+
+Tk::Pixmap - Create color images from XPM files.
+
+=for category Tk Image Classes
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<Pixmap>?(I<name>?,I<options>?)?
+
+=head1 DESCRIPTION
+
+XPM is a popular X Window image file format for storing color icons.
+The B<Pixmap> image type can be used to create color images using XPM files.
+
+Pixmaps support the following I<options>:
+
+=over 4
+
+=item B<-data> =E<gt> I<string>
+
+Specifies the contents of the source pixmap as a string. The string
+must adhere to the XPM file format (e.g., as generated by the
+B<pixmap(1)> program). If both the B<-data> and B<-file>
+options are specified, the B<-data> option takes precedence.
+Please note that the XPM file parsing code in the xpm library is
+somewhat fragile. The first line of the string must be "B</* XPM>
+*/" or otherwise a segmatation fault will be caused.
+
+=item B<-file> =E<gt> I<name>
+
+I<name> gives the name of a file whose contents define the source
+pixmap. The file must adhere to the XPM file format (e.g., as
+generated by the B<pixmap(1)> program).
+
+=back
+
+=head1 IMAGE METHODS
+
+When a pixmap image is created, Tk also creates a new object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+
+=head1 SEE ALSO
+
+L<Tk::Image|Tk::Image>
+
+=head1 KEYWORDS
+
+pixmap, image, tix
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Popup.pod b/Master/tlpkg/tlperl/lib/Tk/Popup.pod
new file mode 100644
index 00000000000..8d40a4ed275
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Popup.pod
@@ -0,0 +1,89 @@
+
+=head1 NAME
+
+Tk::Wm::Popup - popup dialog windows.
+
+=for pm Tk/Wm.pm
+
+=for category Tk Toplevel widgets
+
+=head1 SYNOPSIS
+
+ $dialog->Popup(qw/
+ -popover => 'cursor' | $widget | undef,
+ -overanchor => c | n | ne | e | se | s | sw | w | nw,
+ -popanchor => c | n | ne | e | se | s | sw | w | nw,
+ /);
+
+=head1 DESCRIPTION
+
+You've probably had occasion to use a Dialog (or DialogBox)
+widget. These widgets are derived from a Toplevel (which is a subclass
+of Tk::Wm, the window manager) and spend most of their time in a
+withdrawn state. It's also common to use Toplevels as containers for
+custom built popup windows. Menus, too, are dialogs derived from the
+window manager class. For this discussion, we'll use the simple term
+I<dialog> to refer any widget that pops up and awaits user
+interaction, whether it be a Menu, a special purpose Toplevel, or any
+of the dialog-type widgets, including, but not limited to, ColorEditor,
+Dialog, DialogBox, ErrorDialog, FileSelect, FBox, getOpenFile and
+getSaveFile.
+
+When it's time to display these dialogs, we call the Perl/Tk
+window manager B<Popup> method. B<Popup> accepts three special purpose
+options that specify placement information in high-level terms rather
+than numerical coordinates. It is B<Popup>'s responsibility to take
+our human specifications and turn them into actual screen
+coordinates before displaying the dialog.
+
+We can direct the dialog to appear in two general locations, either
+over another window (e.g. the root window (screen) or a particular
+widget), or over the cursor. This is called the I<popover
+location>. Once we've made this decision we can further refine the
+exact placement of the dialog relative to the popover location by
+specifying the intersection of two I<anchor points>. The I<popanchor
+point> is associated with the dialog and the I<overanchor point> is
+associated with the popover location (whether it be a window or the
+cursor). The point where the two anchor points coincide is the I<popup
+locus>. Anchor points are string values and can be I<c> (for center),
+or any of the eight cardinal compass points: I<n>, I<ne>, I<e>, I<se>,
+I<s>, I<sw>, I<w> or I<nw>.
+
+For example, if I<-popover> specifies a widget, I<-popanchor> is I<sw>,
+and I<-overanchor> is I<ne>, the the dialog's southwest corner pops up
+at the widget's northeast corner.
+
+=head1 OPTIONS
+
+The options recognized by B<Popup> are as follows:
+
+=over 4
+
+=item B<-popover>
+
+Specifies whether the dialog "pops over" a window or the cursor.
+It may be the string I<cursor>, a widget reference, or undef for the
+root window.
+
+=item B<-popanchor>
+
+Specifies the anchor point of the dialog. For instance, if I<e> is
+specified, the right side of the dialog is the anchor.
+
+=item B<-overanchor>
+
+Specifies where the dialog should anchor relative to the popover
+location. For instance, if I<e> is specified the dialog appears over
+the right side of the popover location and if it's I<ne> the the
+dialog is positioned at the upper-right corner of the popover location.
+
+=back
+
+=head1 AUTHOR
+
+Nick Ing-Simmons, Steve Lidie
+
+This code is distributed under the same terms as Perl.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Pretty.pm b/Master/tlpkg/tlperl/lib/Tk/Pretty.pm
new file mode 100644
index 00000000000..7e442a4bcbc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Pretty.pm
@@ -0,0 +1,93 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Pretty;
+require Exporter;
+
+use vars qw($VERSION @EXPORT);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Pretty.pm#6 $
+
+use base qw(Exporter);
+
+@EXPORT = qw(Pretty PrintArgs);
+
+sub pretty_list
+{
+ join(',',map(&Pretty($_),@_));
+}
+
+sub Pretty
+{
+ return pretty_list(@_) if (@_ > 1);
+ my $obj = shift;
+ return 'undef' unless defined($obj);
+ my $type = "$obj";
+ return $type if ($type =~ /=HASH/ && exists($obj->{"_Tcl_CmdInfo_\0"}));
+ my $result = '';
+ if (ref $obj)
+ {
+ my $class;
+ if ($type =~ /^([^=]+)=(.*)$/)
+ {
+ $class = $1;
+ $type = $2;
+ $result .= 'bless(';
+ }
+ if ($type =~ /^ARRAY/)
+ {
+ $result .= '[';
+ $result .= pretty_list(@$obj);
+ $result .= ']';
+ }
+ elsif ($type =~ /^HASH/)
+ {
+ $result .= '{';
+ if (%$obj)
+ {
+ my ($key, $value);
+ while (($key,$value) = each %$obj)
+ {
+ $result .= $key . '=>' . Pretty($value) . ',';
+ }
+ chop($result);
+ }
+ $result .= '}';
+ }
+ elsif ($type =~ /^REF/)
+ {
+ $result .= "\\" . Pretty($$obj);
+ }
+ elsif ($type =~ /^SCALAR/)
+ {
+ $result .= Pretty($$obj);
+ }
+ else
+ {
+ $result .= $type;
+ }
+ $result .= ",$class)" if (defined $class);
+ }
+ else
+ {
+ if ($obj =~ /^-?[0-9]+(.[0-9]*(e[+-][0-9]+)?)?$/ ||
+ $obj =~ /^[A-Z_][A-Za-z_0-9]*$/ ||
+ $obj =~ /^[a-z_][A-Za-z_0-9]*[A-Z_][A-Za-z_0-9]*$/
+ )
+ {
+ $result .= $obj;
+ }
+ else
+ {
+ $result .= "'" . $obj . "'";
+ }
+ }
+ return $result;
+}
+
+sub PrintArgs
+{
+ my $name = (caller(1))[3];
+ print "$name(",Pretty(@_),")\n";
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/ProgressBar.pm b/Master/tlpkg/tlperl/lib/Tk/ProgressBar.pm
new file mode 100644
index 00000000000..f41abff6fdc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ProgressBar.pm
@@ -0,0 +1,498 @@
+package Tk::ProgressBar;
+
+use vars qw($VERSION);
+$VERSION = '4.014'; # was: sprintf '4.%03d', q$Revision: #10 $ =~ /\D(\d+)\s*$/;
+
+use Tk;
+use Tk::Canvas;
+use Tk::Trace;
+use Carp;
+use strict;
+
+use base qw(Tk::Derived Tk::Canvas);
+
+Construct Tk::Widget 'ProgressBar';
+
+sub ClassInit {
+ my ($class,$mw) = @_;
+
+ $class->SUPER::ClassInit($mw);
+
+ $mw->bind($class,'<Configure>', ['_layoutRequest',1]);
+}
+
+
+sub Populate {
+ my($c,$args) = @_;
+
+ $c->ConfigSpecs(
+ -width => [PASSIVE => undef, undef, 0],
+ '-length' => [PASSIVE => undef, undef, 0],
+ -from => [PASSIVE => undef, undef, 0],
+ -to => [PASSIVE => undef, undef, 100],
+ -blocks => [PASSIVE => undef, undef, 10],
+ -padx => [PASSIVE => 'padX', 'Pad', 0],
+ -pady => [PASSIVE => 'padY', 'Pad', 0],
+ -gap => [PASSIVE => undef, undef, 1],
+ -colors => [PASSIVE => undef, undef, undef],
+ -relief => [SELF => 'relief', 'Relief', 'sunken'],
+ -value => [METHOD => undef, undef, undef],
+ -variable => [METHOD => undef, undef, undef],
+ -anchor => [METHOD => 'anchor', 'Anchor', 'w'],
+ -resolution
+ => [PASSIVE => undef, undef, 1.0],
+ -highlightthickness
+ => [SELF => 'highlightThickness','HighlightThickness',0],
+ -troughcolor
+ => [PASSIVE => 'troughColor', 'Background', 'grey55'],
+ );
+ _layoutRequest($c,1);
+ $c->OnDestroy(['Destroyed' => $c]);
+}
+
+sub anchor {
+ my $c = shift;
+ my $var = \$c->{Configure}{'-anchor'};
+ my $old = $$var;
+
+ if(@_) {
+ my $new = shift;
+ croak "bad anchor position \"$new\": must be n, s, w or e"
+ unless $new =~ /^[news]$/;
+ $$var = $new;
+ }
+
+ $old;
+}
+
+sub _layoutRequest {
+ my $c = shift;
+ my $why = shift;
+ $c->afterIdle(['_arrange',$c]) unless $c->{'layout_pending'};
+ $c->{'layout_pending'} |= $why;
+}
+
+sub _arrange {
+ my $c = shift;
+ my $why = $c->{'layout_pending'};
+
+ $c->{'layout_pending'} = 0;
+
+ my $w = $c->Width;
+ my $h = $c->Height;
+ my $bw = $c->cget('-borderwidth') + $c->cget('-highlightthickness');
+ my $x = abs(int($c->{Configure}{'-padx'})) + $bw;
+ my $y = abs(int($c->{Configure}{'-pady'})) + $bw;
+ my $value = $c->value;
+ my $from = $c->{Configure}{'-from'};
+ my $to = $c->{Configure}{'-to'};
+ my $horz = $c->{Configure}{'-anchor'} =~ /[ew]/i ? 1 : 0;
+ my $dir = $c->{Configure}{'-anchor'} =~ /[se]/i ? -1 : 1;
+
+ my($minv,$maxv) = $from < $to ? ($from,$to) : ($to,$from);
+
+ if($w == 1 && $h == 1) {
+ my $bw = $c->cget('-borderwidth');
+ my $defw = 10 + $y*2 + $bw *2;
+ my $defl = ($maxv - $minv) + $x*2 + $bw*2;
+
+ $h = $c->pixels($c->{Configure}{'-length'}) || $defl;
+ $w = $c->pixels($c->{Configure}{'-width'}) || $defw;
+
+ ($w,$h) = ($h,$w) if $horz;
+ $c->GeometryRequest($w,$h);
+ $c->parent->update;
+ $c->update;
+
+ $w = $c->Width;
+ $h = $c->Height;
+ }
+
+ $w -= $x*2;
+ $h -= $y*2;
+
+ my $length = $horz ? $w : $h;
+ my $width = $horz ? $h : $w;
+
+ my $blocks = int($c->{Configure}{'-blocks'});
+ my $gap = int($c->{Configure}{'-gap'});
+
+ $blocks = 1 if $blocks < 1;
+
+ my $gwidth = $gap * ( $blocks - 1);
+ my $bwidth = ($length - $gwidth) / $blocks;
+
+ if($bwidth < 3 || $blocks <= 1 || $gap <= 0) {
+ $blocks = 1;
+ $bwidth = $length;
+ $gap = 0;
+ }
+
+ if($why & 1) {
+ my $colors = $c->{Configure}{'-colors'} || [];
+ my $bdir = $from < $to ? $dir : 0 - $dir;
+
+ $c->delete('all');
+
+ $c->createRectangle(0,0,$w+$x*2,$h+$y*2,
+ -fill => $c->{Configure}{'-troughcolor'},
+ -width => 0,
+ -outline => undef);
+
+ $c->{'cover'} = $c->createRectangle($x,$y,$w,$h,
+ -fill => $c->{Configure}{'-troughcolor'},
+ -width => 0,
+ -outline => undef);
+
+ my($x0,$y0,$x1,$y1);
+
+ if($horz) {
+ if($bdir > 0) {
+ ($x0,$y0) = ($x - $gap,$y);
+ }
+ else {
+ ($x0,$y0) = ($length + $x + $gap,$y);
+ }
+ ($x1,$y1) = ($x0,$y0 + $width);
+ }
+ else {
+ if($bdir > 0) {
+ ($x0,$y0) = ($x,$y - $gap);
+ }
+ else {
+ ($x0,$y0) = ($x,$length + $y + $gap);
+ }
+ ($x1,$y1) = ($x0 + $width,$y0);
+ }
+
+ my $blks = $blocks;
+ my $dval = ($maxv - $minv) / $blocks;
+ my $color = $c->cget('-foreground');
+ my $pos = 0;
+ my $val = $minv;
+
+ while($val < $maxv) {
+ my($bw,$nval);
+
+ while(($pos < @$colors) && $colors->[$pos] <= $val) {
+ $color = $colors->[$pos+1];
+ $pos += 2;
+ }
+
+ if($blocks == 1) {
+ $nval = defined($colors->[$pos])
+ ? $colors->[$pos] : $maxv;
+ $bw = (($nval - $val) / ($maxv - $minv)) * $length;
+ }
+ else {
+ $bw = $bwidth;
+ $nval = $val + $dval if($blocks > 1);
+ }
+
+ if($horz) {
+ if($bdir > 0) {
+ $x0 = $x1 + $gap;
+ $x1 = $x0 + $bw;
+ }
+ else {
+ $x1 = $x0 - $gap;
+ $x0 = $x1 - $bw;
+ }
+ }
+ else {
+ if($bdir > 0) {
+ $y0 = $y1 + $gap;
+ $y1 = $y0 + $bw;
+ }
+ else {
+ $y1 = $y0 - $gap;
+ $y0 = $y1 - $bw;
+ }
+ }
+
+ $c->createRectangle($x0,$y0,$x1,$y1,
+ -fill => $color,
+ -width => 0,
+ -outline => undef
+ );
+ $val = $nval;
+ }
+ }
+
+ my $cover = $c->{'cover'};
+ my $ddir = $from > $to ? 1 : -1;
+
+ if(($value <=> $to) == (0-$ddir)) {
+ $c->lower($cover);
+ }
+ elsif(($value <=> $from) == $ddir) {
+ $c->raise($cover);
+ my $x1 = $horz ? $x + $length : $x + $width;
+ my $y1 = $horz ? $y + $width : $y + $length;
+ $c->coords($cover,$x,$y,$x1,$y1);
+ }
+ else {
+ my $step;
+ $value = int($value / $step) * $step
+ if(defined($step = $c->{Configure}{'-resolution'}) && $step > 0);
+
+ $maxv = $minv+1
+ if $minv == $maxv;
+
+ my $range = $maxv - $minv;
+ my $bval = $range / $blocks;
+ my $offset = abs($value - $from);
+ my $ioff = int($offset / $bval);
+ my $start = $ioff * ($bwidth + $gap);
+ $start += ($offset - ($ioff * $bval)) / $bval * $bwidth;
+
+ my($x0,$x1,$y0,$y1);
+
+ if($horz) {
+ $y0 = $y;
+ $y1 = $y + $h;
+ if($dir > 0) {
+ $x0 = $x + $start;
+ $x1 = $x + $w;
+ }
+ else {
+ $x0 = $x;
+ $x1 = $w + $x - $start;
+ }
+ }
+ else {
+ $x0 = $x;
+ $x1 = $x + $w;
+ if($dir > 0) {
+ $y0 = $y + $start;
+ $y1 = $y + $h;
+ }
+ else {
+ $y0 = $y;
+ $y1 = $h + $y - $start;
+ }
+ }
+
+
+ $c->raise($cover);
+ $c->coords($cover,$x0,$y0,$x1,$y1);
+ }
+}
+
+sub value {
+ my $c = shift;
+ my $val = defined($c->{'-variable'})
+ ? $c->{'-variable'}
+ : \$c->{'-value'};
+ my $old = defined($$val) ? $$val : $c->{Configure}{'-from'};
+
+ if(@_) {
+ my $value = shift;
+ $$val = defined($value) ? $value : $c->{Configure}{'-from'};
+ _layoutRequest($c,2);
+ }
+
+ $old;
+}
+
+sub variable {
+ my $c = shift;
+ my $oldvarref = $c->{'-variable'};
+ my $oldval; $oldval = $$oldvarref if $oldvarref;
+ if(@_) {
+ my $varref = shift;
+ if ($oldvarref)
+ {
+ $c->traceVdelete($oldvarref);
+ }
+ $c->{'-variable'} = $varref;
+ $c->traceVariable($varref, 'w', sub { $c->value($_[1]) });
+ $$varref = $oldval;
+ _layoutRequest($c,2);
+ }
+ $oldval;
+}
+
+sub Destroyed
+{
+ my $c = shift;
+ my $var = delete $c->{'-variable'};
+ $c->traceVdelete($var);
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Tk::ProgressBar - A graphical progress bar
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ use Tk::ProgressBar;
+
+ $progress = $parent->ProgressBar(
+ -width => 20,
+ -length => 200,
+ -anchor => 's',
+ -from => 0,
+ -to => 100,
+ -blocks => 10,
+ -colors => [0, 'green', 50, 'yellow' , 80, 'red'],
+ -variable => \$percent_done
+ );
+
+ $progress->value($position);
+
+=head1 DESCRIPTION
+
+B<Tk::ProgressBar> provides a widget which will show a graphical representation
+of a value, given maximum and minimum reference values.
+
+=head1 STANDARD OPTIONS
+
+The following standard widget options are supported:
+
+=over 4
+
+=item B<-borderwidth>
+
+=item B<-highlightthickness>
+
+Defaults to 0.
+
+=item B<-padx>
+
+Defaults to 0.
+
+=item B<-pady>
+
+Defaults to 0.
+
+=item B<-relief>
+
+Defaults to C<sunken>
+
+=item B<-troughcolor>
+
+The color to be used for the background (trough) of the progress bar.
+Default is to use grey55.
+
+=back
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item B<-anchor>
+
+This can be used to position the start point of the bar. Default
+is 'w' (horizontal bar starting from the left). A vertical bar can be
+configured by using either 's' or 'n'.
+
+=item B<-blocks>
+
+This controls the number of blocks to be used to construct the progress
+bar. The default is to break the bar into 10 blocks.
+
+=item B<-colors>
+
+Controls the colors to be used for different positions of the progress bar.
+The colors should be supplied as a reference to an array containing pairs
+of positions and colors.
+
+ -colors => [ 0, 'green', 50, 'red' ]
+
+means that for the range 0 to 50 the progress bar should be green
+and for higher values it should be red.
+
+
+=item B<-from>
+
+This sets the lower limit of the progress bar. If the bar is set to a
+value below the lower limt no bar will be displayed. Defaults to 0.
+See the C<-to> description for more information.
+
+=item B<-gap>
+
+This is the spacing (in pixels) between each block. Defaults to 1.
+Use 0 to get a continuous bar.
+
+
+=item B<-length>
+
+Specifies the desired long dimension of the ProgressBar in screen
+units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical
+ProgressBars this is the ProgressBars height; for horizontal scales it
+is the ProgressBars width. The default length is calculated from the
+values of C<-padx>, C<-borderwidth>, C<-highlightthickness> and the
+difference between C<-from> and C<-to>.
+
+
+=item B<-resolution>
+
+A real value specifying the resolution for the scale. If this value is greater
+than zero then the scale's value will always be rounded to an even multiple of
+this value, as will tick marks and the endpoints of the scale. If the value is
+less than zero then no rounding occurs. Defaults to 1 (i.e., the value will be
+integral).
+
+=item B<-to>
+
+This sets the upper limit of the progress bar. If a value is specified
+(for example, using the C<value> method) that lies above this value the
+full progress bar will be displayed. Defaults to 100.
+
+
+
+=item B<-variable>
+
+Specifies the reference to a scalar variable to link to the ProgressBar.
+Whenever the value of the variable changes, the ProgressBar will update
+to reflect this value. (See also the B<value> method below.)
+
+=item B<-value>
+
+This can be used to set the current position of the progress bar
+when used in conjunction with the standard C<configure>. It is
+usually recommended to use the B<value> method instead.
+
+
+=item B<-width>
+
+Specifies the desired narrow dimension of the ProgressBar in screen
+units (i.e. any of the forms acceptable to Tk_GetPixels). For
+vertical ProgressBars this is the ProgressBars width; for horizontal
+bars this is the ProgressBars height. The default width is derived
+from the values of C<-borderwidth> and C<-pady> and C<-highlightthickness>.
+
+=back
+
+=head1 WIDGET METHODS
+
+=over 4
+
+=item I<$ProgressBar>-E<gt>B<value>(?I<value>?)
+
+If I<value> is omitted, returns the current value of the ProgressBar. If
+I<value> is given, the value of the ProgressBar is set. If I<$value> is
+given but undefined the value of the option B<-from> is used.
+
+=back
+
+
+=head1 AUTHOR
+
+Graham Barr E<lt>F<gbarr@pobox.com>E<gt>
+
+=head1 COPYRIGHT
+
+Copyright (c) 1997-1998 Graham Barr. All rights reserved.
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/README.Adjust b/Master/tlpkg/tlperl/lib/Tk/README.Adjust
new file mode 100644
index 00000000000..8c3eba45717
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/README.Adjust
@@ -0,0 +1,77 @@
+Subject: Adjuster
+Date: Wed, 16 Dec 1998 22:23:23 +0100
+From: Stephen Kun <stephen.kun@is.gaertner.de>
+To: Nick Ing-Simmons <nick@ni-s.u-net.com>
+
+
+
+
+3. How do I find out whether slave is a pack or grid master or if it is not a
+master (for setting packPropagate(0))
+Currently I set both on the slave.
+
+4. In setting position of drag bar, I do a lot of calcs for each motion event.
+Some could be done one for first, then used again for subsequent calls, eg:
+borderwidth of master, etc.
+I've now partially done this and store them on the widget.
+
+5. Do I need XSync and idletasks calls in Adjuster.pm?
+XSync causes a bug. idletasks doesn't make any difference in practice, from
+what I can see. I've commented both out.
+Bug when using XSync:
+ Run pack_adj_4r
+ Shorten whole window from right so that left window edge crosses leftmost
+ adjuster. Buttons on other adjusters disappear
+
+6. Sometimes the effect given by the Restore method, is undesirable. Eg.
+for multi-columns. Then when you expand say the 1st column, the size of the
+col at the end gets reduced to 0 width when the Adjuster forces itself in.
+Then when you reduce the size of the first column again, the end col is still
+0 width.
+Better would be:
+a) put the restore functionality on a flag OR
+b) when a col is reduced because of a Restore, it saves previous width of
+its slave, and attempts to restore it when the space becomes availabe. (Sounds
+impracticable.)
+I've implemented a) with default ON. In the documentation I'll recommend the
+default for the 1st Adjuster, then OFF for the remaining.
+
+8. What about a packAdjustForget? Given that Adjuster doesn't work well for
+grid anyway, and doesn't consider other managers, that wouldn't be too bad.
+I'm not going to do this, but someone mentioned it a while ago. I can
+see me probably wanting it too at some point.
+Are you for the idea?
+
+10. Grid doesn't work well with Adjuster, didn't before either. I think
+this has to do with grid, rather than adjuster. You get the same effect
+if you grid a row of widgets, then reduce the width of the window.
+Bugs demonstrated by grid_adj_4l:
+a) there's never an Unmap event for the adjuster.
+b) after adjusting, widgets protrude into border on right.
+c) grid('Propagate', 0) on MainWindow has no effect - window shrinks/grows
+ when widgets are adjusted
+d) widgets shuffle to correct position on startup
+I don't recommend use of grid with Adjust!
+
+11. Have taken out __END__ temporarily for testing
+Will put it back before publishing on the mailing list.
+
+12. Why do the adjusters in my testcases come out grey? That's not the
+default background.
+
+13. Could packAdjust return ($adj, $w). Could then do:
+ my $canv = $top->Canvas()->packAdjust();
+OR
+ my ($adj, $canv) = $top->Canvas()->packAdjust();
+Latter is good if you want to configure or unpack adjuster later.
+I realise this is very Kludgy, but there's no other way to get the
+Adjuster from packAdjust.
+I suppose the workaround of creating the Adjuster yourself is OK. When
+you do it by hand though, there's more chance of making mistakes, eg
+forgetting the -side (which defaults then to 'top') which would cause havoc.
+What's your opinion.
+
+14. Run the script adj_button_bug: You can't reduce size of button.
+Button can be expanded, but as soon as focus enters button, it springs back
+to its original size. Why?
+It's not important though.
diff --git a/Master/tlpkg/tlperl/lib/Tk/ROText.pm b/Master/tlpkg/tlperl/lib/Tk/ROText.pm
new file mode 100644
index 00000000000..21fe52004db
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ROText.pm
@@ -0,0 +1,48 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::ROText;
+
+use vars qw($VERSION);
+#$VERSION = sprintf '4.%03d', q$Revision: #10 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.011';
+
+use Tk::Text;
+use base qw(Tk::Derived Tk::Text);
+
+Construct Tk::Widget 'ROText';
+
+sub clipEvents
+{
+ return qw[Copy];
+}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ my $val = $class->bindRdOnly($mw);
+ my $cb = $mw->bind($class,'<Next>');
+ $mw->bind($class,'<space>',$cb) if (defined $cb);
+ $cb = $mw->bind($class,'<Prior>');
+ $mw->bind($class,'<BackSpace>',$cb) if (defined $cb);
+ $class->clipboardOperations($mw,'Copy');
+ return $val;
+}
+
+sub Populate
+{
+ my($self,$args) = @_;
+ $self->SUPER::Populate($args);
+ my $m = $self->menu->entrycget($self->menu->index('Search'), '-menu');
+ $m->delete($m->index('Replace'));
+ $self->ConfigSpecs(-background => ['SELF'],
+ -foreground => ['SELF'],
+ );
+}
+
+sub Tk::Widget::ScrlROText { shift->Scrolled('ROText' => @_) }
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/ROText.pod b/Master/tlpkg/tlperl/lib/Tk/ROText.pod
new file mode 100644
index 00000000000..b442164ae72
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ROText.pod
@@ -0,0 +1,48 @@
+
+=head1 NAME
+
+Tk::ROText - 'readonly' perl/Tk Text widget
+
+=for pm Tk/ROText.pm
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ use Tk::ROText;
+ ...
+ $ro = $mw->ROText(?options,...?);
+
+=head1 DESCRIPTION
+
+This "I<IS A>" text widget with all bindings removed that would alter
+the contents of the text widget. The contents can still be modified
+via method calls.
+
+=head2 BINDINGS
+
+Only read-only bindings from L<Tk::Text> are available in
+B<Tk::ROText>. Additionally the following bindings are defined:
+
+=over
+
+=item <space>
+
+Move the cursor forward by one screenful.
+
+=item <BackSpace>
+
+Move the cursor backward by one screenful.
+
+=back
+
+=head1 KEYWORDS
+
+widget, text, readonly
+
+=head1 SEE ALSO
+
+L<Tk::Text>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Radiobutton.pm b/Master/tlpkg/tlperl/lib/Tk/Radiobutton.pm
new file mode 100644
index 00000000000..d09d41b4208
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Radiobutton.pm
@@ -0,0 +1,45 @@
+# Conversion from Tk4.0 button.tcl competed.
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+
+package Tk::Radiobutton;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Radiobutton.pm#6 $
+
+# modify it under the same terms as Perl itself, subject
+# to additional disclaimer in license.terms due to partial
+# derivation from Tk4.0 sources.
+
+require Tk::Button;
+
+
+use base qw(Tk::Button);
+Construct Tk::Widget 'Radiobutton';
+
+sub Tk_cmd { \&Tk::radiobutton }
+
+sub CreateOptions
+{
+ return (shift->SUPER::CreateOptions,'-variable');
+}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Enter>', 'Enter');
+ $mw->bind($class,'<Leave>', 'Leave');
+ $mw->bind($class,'<1>', 'Invoke');
+ $mw->bind($class,'<space>', 'Invoke');
+ return $class;
+}
+
+sub Invoke
+{
+ my $w = shift;
+ $w->invoke() unless($w->cget('-state') eq 'disabled');
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Radiobutton.pod b/Master/tlpkg/tlperl/lib/Tk/Radiobutton.pod
new file mode 100644
index 00000000000..82fad4893fd
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Radiobutton.pod
@@ -0,0 +1,333 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Radiobutton - Create and manipulate Radiobutton widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$radiobutton> = I<$parent>-E<gt>B<Radiobutton>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground>
+B<-activeforeground>
+B<-anchor>
+B<-background>
+B<-bitmap>
+B<-borderwidth>
+B<-compound>
+B<-cursor>
+B<-disabledforeground>
+B<-font>
+B<-foreground>
+B<-highlightbackground>
+B<-highlightcolor>
+B<-highlightthickness>
+B<-image>
+B<-justify>
+B<-padx>
+B<-pady>
+B<-relief>
+B<-takefocus>
+B<-text>
+B<-textvariable>
+B<-underline>
+B<-wraplength>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies a L<perl/Tk callback|Tk::callbacks> to associate with the button. This command
+is typically invoked when mouse button 1 is released over the button
+window. The button's global variable (B<-variable> option) will
+be updated before the command is invoked.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies a desired height for the button.
+If an image or bitmap is being displayed in the button then the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in lines of text.
+If this option isn't specified, the button's desired height is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=item Name: B<indicatorOn>
+
+=item Class: B<IndicatorOn>
+
+=item Switch: B<-indicatoron>
+
+Specifies whether or not the indicator should be drawn. Must be a
+proper boolean value. If false, the B<relief> option is
+ignored and the widget's relief is always sunken if the widget is
+selected and raised otherwise.
+
+=item Command-Line Name: B<-offrelief>
+
+=item Database Name: B<offRelief>
+
+=item Database Class: B<OffRelief>
+
+Specifies the relief for the checkbutton when the indicator is not
+drawn and the checkbutton is off. The default value is B<raised>. By
+setting this option to B<flat> and setting
+B<-indicatoron false -overrelief raised>, the effect is achieved of
+having a flat button
+that raises on mouse-over and which is depressed when activated. This
+is the behavior typically exhibited by the Bold, Italic, and
+Underline checkbuttons on the toolbar of a word-processor, for
+example.
+
+=item Command-Line Name: B<-overrelief>
+
+=item Database Name: B<overRelief>
+
+=item Database Class: B<OverRelief>
+
+Specifies an alternative relief for the button, to be used when
+the mouse cursor is over the widget. This option can be used to
+make toolbar buttons, by configuring B<-relief flat -overrelief
+raised>. If the value of this option is the empty string, then
+no alternative relief is used when the mouse cursor is over the
+button. The empty string is the default value.
+
+=item Name: B<selectColor>
+
+=item Class: B<Background>
+
+=item Switch: B<-selectcolor>
+
+Specifies a background color to use when the button is selected.
+If B<indicatorOn> is true then the color applies to the indicator.
+Under Windows, this color is used as the background for the indicator
+regardless of the select state.
+If B<indicatorOn> is false, this color is used as the background
+for the entire widget, in place of B<background> or B<activeBackground>,
+whenever the widget is selected.
+If specified as an empty string then no special color is used for
+displaying when the widget is selected.
+
+=item Name: B<selectImage>
+
+=item Class: B<SelectImage>
+
+=item Switch: B<-selectimage>
+
+Specifies an image to display (in place of the B<image> option)
+when the radiobutton is selected.
+This option is ignored unless the B<image> option has been
+specified.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of three states for the radiobutton: B<normal>, B<active>,
+or B<disabled>. In normal state the radiobutton is displayed using the
+B<foreground> and B<background> options. The active state is
+typically used when the pointer is over the radiobutton. In active state
+the radiobutton is displayed using the B<activeForeground> and
+B<activeBackground> options. Disabled state means that the radiobutton
+should be insensitive: the default bindings will refuse to activate
+the widget and will ignore mouse button presses.
+In this state the B<disabledForeground> and
+B<background> options determine how the radiobutton is displayed.
+
+=item Name: B<value>
+
+=item Class: B<Value>
+
+=item Switch: B<-value>
+
+Specifies value to store in the button's associated variable whenever
+this button is selected.
+
+=item Name: B<variable>
+
+=item Class: B<Variable>
+
+=item Switch: B<-variable>
+
+Specifies reference to a variable to set whenever this button is
+selected. Changes in this variable also cause the button to select
+or deselect itself. Defaults to the value C<\$Tk::selectedButton>.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies a desired width for the button.
+If an image or bitmap is being displayed in the button, the value is in
+screen units (i.e. any of the forms acceptable to B<Tk_GetPixels>);
+for text it is in characters.
+If this option isn't specified, the button's desired width is computed
+from the size of the image or bitmap or text being displayed in it.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Radiobutton> method creates a new window (given by the
+$widget argument) and makes it into a radiobutton widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the radiobutton such as its colors, font,
+text, and initial relief. The B<radiobutton> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A radiobutton is a widget that displays a textual string, bitmap or image
+and a diamond or circle called an I<indicator>.
+If text is displayed, it must all be in a single font, but it
+can occupy multiple lines on the screen (if it contains newlines
+or if wrapping occurs because of the B<wrapLength> option) and
+one of the characters may optionally be underlined using the
+B<underline> option. A radiobutton has
+all of the behavior of a simple button: it can display itself in either
+of three different ways, according to the B<state> option;
+it can be made to appear
+raised, sunken, or flat; it can be made to flash; and it invokes
+a L<perl/Tk callback|Tk::callbacks> whenever mouse button 1 is clicked over the
+check button.
+
+In addition, radiobuttons can be I<selected>.
+If a radiobutton is selected, the indicator is normally
+drawn with a selected appearance, and
+a Tcl variable associated with the radiobutton is set to a particular
+value (normally 1).
+Under Unix, the indicator is drawn with a sunken relief and a special
+color. Under Windows, the indicator is drawn with a round mark inside.
+If the radiobutton is not selected, then the indicator is drawn with a
+deselected appearance, and the associated variable is
+set to a different value (typically 0).
+Under Unix, the indicator is drawn with a raised relief and no special
+color. Under Windows, the indicator is drawn without a round mark inside.
+Typically, several radiobuttons share a single variable and the
+value of the variable indicates which radiobutton is to be selected.
+When a radiobutton is selected it sets the value of the variable to
+indicate that fact; each radiobutton also monitors the value of
+the variable and automatically selects and deselects itself when the
+variable's value changes.
+By default the variable B<selectedButton>
+is used; its contents give the name of the button that is
+selected, or the empty string if no button associated with that
+variable is selected.
+The name of the variable for a radiobutton,
+plus the variable to be stored into it, may be modified with options
+on the command line or in the option database.
+Configuration options may also be used to modify the way the
+indicator is displayed (or whether it is displayed at all).
+By default a radiobutton is configured to select itself on button clicks.
+
+=head1 WIDGET METHODS
+
+The B<Radiobutton> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for radiobutton widgets:
+
+=over 4
+
+=item I<$radiobutton>-E<gt>B<deselect>
+
+Deselects the radiobutton and sets the associated variable to an
+empty string.
+If this radiobutton was not currently selected, the command has
+no effect.
+
+=item I<$radiobutton>-E<gt>B<flash>
+
+Flashes the radiobutton. This is accomplished by redisplaying the radiobutton
+several times, alternating between active and normal colors. At
+the end of the flash the radiobutton is left in the same normal/active
+state as when the command was invoked.
+This command is ignored if the radiobutton's state is B<disabled>.
+
+=item I<$radiobutton>-E<gt>B<invoke>
+
+Does just what would have happened if the user invoked the radiobutton
+with the mouse: selects the button and invokes
+its associated Tcl command, if there is one.
+The return value is the return value from the Tcl command, or an
+empty string if there is no command associated with the radiobutton.
+This command is ignored if the radiobutton's state is B<disabled>.
+
+=item I<$radiobutton>-E<gt>B<select>
+
+Selects the radiobutton and sets the associated variable to the
+value corresponding to this widget.
+
+=back
+
+=head1 BINDINGS
+
+Tk automatically creates class bindings for radiobuttons that give them
+the following default behavior:
+
+=over 4
+
+=item [1]
+
+On Unix systems, a radiobutton activates whenever the mouse passes
+over it and deactivates whenever the mouse leaves the radiobutton. On
+Mac and Windows systems, when mouse button 1 is pressed over a
+radiobutton, the button activates whenever the mouse pointer is inside
+the button, and deactivates whenever the mouse pointer leaves the
+button.
+
+=item [2]
+
+When mouse button 1 is pressed over a radiobutton it is invoked (it
+becomes selected and the command associated with the button is
+invoked, if there is one).
+
+=item [3]
+
+When a radiobutton has the input focus, the space key causes the radiobutton
+to be invoked.
+
+If the radiobutton's state is B<disabled> then none of the above
+actions occur: the radiobutton is completely non-responsive.
+
+The behavior of radiobuttons can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 KEYWORDS
+
+radiobutton, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Region.pm b/Master/tlpkg/tlperl/lib/Tk/Region.pm
new file mode 100644
index 00000000000..3e02bd2ff49
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Region.pm
@@ -0,0 +1,182 @@
+package Tk::Region;
+
+# Ideas in progress do not document ...
+
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Region.pm#6 $
+
+use Tk::Widget ();
+
+Construct Tk::Widget 'Region';
+
+my %index = (-widget => 1, '-x' => 2, '-y' => 3, -width => 4, -height => 5);
+
+sub _attr
+{
+ my ($obj,$key,$val) = @_;
+ if (@_ > 2)
+ {
+ $obj->{$key} = $val;
+ }
+ return $obj->{$key}
+}
+
+foreach my $name (qw(widget x y width height))
+ {
+ my $key = "-$name";
+ no strict 'refs';
+ *{$name} = sub { shift->_attr($key,@_) };
+ }
+
+sub new
+{
+ my $class = shift;
+ my $widget = shift;
+ my $obj = bless [\%index,$widget,0,0,0,0],$class;
+ $obj->configure(@_);
+}
+
+sub cfgDefault
+{
+ my ($class,$key) = @_;
+ return undef;
+}
+
+sub cfgName
+{
+ my ($class,$key) = @_;
+ $key =~ s/^-//;
+ return lcfirst($key);
+}
+
+sub cfgClass
+{
+ return ucfirst(shift->cfgName(@_));
+}
+
+sub configure
+{
+ my $obj = shift;
+ my @results;
+ if (@_ > 1)
+ {
+ while (@_)
+ {
+ my $key = shift;
+ my $val = shift;
+ if (exists $obj->{$key})
+ {
+ $obj->{$key} = $val;
+ }
+ else
+ {
+ my ($meth) = $key =~ /^-(\w+)$/;
+ croak("Invalid option $key") unless $obj->can($meth);
+ $obj->$meth($val);
+ }
+ }
+ }
+ elsif (@_ == 1)
+ {
+ my $key = shift;
+ my $value = $obj->cget($key);
+ push(@results,$key,$obj->cfgName($key),$obj->cfgClass($key),$obj->cfgDefault($key),$value);
+ }
+ else
+ {
+ foreach my $key (sort keys %$obj)
+ {
+ push(@results,scalar($obj->configure($key)))
+ }
+ }
+ return wantarray ? @results : \@results;
+}
+
+sub cget
+{
+ my $obj = shift;
+ my $key = shift;
+ return $obj->{$key} if exists $obj->{$key};
+ my ($meth) = $key =~ /^-(\w+)$/;
+ croak("Invalid option $key") unless $obj->can($meth);
+ return $obj->$meth();
+}
+
+sub bbox
+{
+ my $obj = shift;
+ my @results;
+ if (@_)
+ {
+ my $ref = (@_ == 1) ? shift : \@_;
+ my ($x1,$y1,$x2,$y2) = (ref $ref) ? @$ref : split(/\s+/,$ref);
+ ($x2,$x1) = ($x1,$x2) if ($x2 < $x1);
+ ($y2,$y1) = ($y1,$y2) if ($y2 < $y1);
+ $obj->width($x2-$x1);
+ $obj->height($y2-$y1);
+ $obj->x($x1);
+ $obj->y($y1);
+ }
+ else
+ {
+ my $x = $obj->x;
+ my $y = $obj->x;
+ push(@results,$x,$y,$x+$obj->width,$y+$obj->height);
+ }
+ return wantarray ? @results : \@results;
+}
+
+sub rootx
+{
+ my $obj = shift;
+ if (@_)
+ {
+ my $x = shift;
+ $obj->x($x-$obj->widget->rootx);
+ }
+ return $obj->widget->rootx + $obj->{'-x'}
+}
+
+sub rooty
+{
+ my $obj = shift;
+ if (@_)
+ {
+ my $y = shift;
+ $obj->y($y-$obj->widget->rootx);
+ }
+ return $obj->widget->rooty + $obj->{'-y'}
+}
+
+sub rootxy
+{
+ my $obj = shift;
+ if (@_)
+ {
+ $obj->rootx(shift);
+ $obj->rooty(shift);
+ }
+ my @results = ($obj->rootx,$obj->rooty);
+ return wantarray ? @results : \@results;
+}
+
+sub rootbbox
+{
+ my $obj = shift;
+ my ($x1,$y1) = $obj->rootxy;
+ my $x2 = $x1+$obj->width;
+ my $y2 = $y1+$obj->height;
+ my @results = ($x1,$y1,$x2,$y2);
+ return wantarray ? @results : \@results;
+}
+
+
+*Width = \&width;
+*Height = \&height;
+*X = \&rootx;
+*Y = \&rooty;
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Reindex.pm b/Master/tlpkg/tlperl/lib/Tk/Reindex.pm
new file mode 100644
index 00000000000..7be04e7c88e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Reindex.pm
@@ -0,0 +1,233 @@
+package Tk::Reindex;
+
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/TextList/Reindex.pm#4 $
+
+use Tk;
+use base qw(Tk::Derived);
+
+
+sub Populate
+{
+ my ($w, $args) = @_;
+
+ $w->_callbase('Populate',$args);
+
+ $w->ConfigSpecs(-linestart => ["PASSIVE", "lineStart", "LineStart", 0],
+ -toindexcmd => ["CALLBACK", "toIndexCmd", "ToIndexCmd" , [\&to_index,$w]],
+ -fromindexcmd => ["CALLBACK", "fromIndexCmd","FromIndexCmd", [\&from_index,$w]]);
+}
+
+sub import
+{
+ my($module,$base)=@_;
+ my $pkg=(caller)[0];
+
+ no strict 'refs';
+ *{"${pkg}::_reindexbase"}=sub{$base};
+}
+
+sub _callbase
+{
+ my($w,$sub)=(shift,shift);
+ my $supersub=$w->_reindexbase()."::$sub";
+ $w->$supersub(@_);
+}
+
+BEGIN
+{
+ # list of subroutines and index argument number (-1 as first element means return value)
+ my %subs=('bbox' => [0],
+ 'compare' => [0,2],
+ 'delete' => [0,1],
+ 'dlineinfo' => [0],
+ 'dump' => \&_find_dump_index,
+ 'get' => [0,1],
+ 'index' => [-1,0],
+ 'insert' => [0],
+ 'mark' => \&_find_mark_index,
+ 'search' => \&_find_search_index,
+ 'see' => [0],
+ 'tag' => \&_find_tag_index,
+ 'window' => [1],
+ 'image' => [1],
+ );
+
+ foreach my $sub (keys %subs)
+ {
+ my $args=$subs{$sub};
+ my $argsub=ref $args eq 'CODE'?$args:sub{$args};
+ my $newsub=sub
+ {
+ my($w)=shift;
+ my(@iargs)=grep($_<=$#_,@{$argsub->(@_)});
+ my $iret; $iret=shift @iargs if @iargs && $iargs[0]==-1;
+ my(@args)=@_;
+ @args[@iargs]=$w->Callback(-toindexcmd,@args[@iargs]);
+ my(@ret)=$w->_callbase($sub,@args);
+ @ret=$w->Callback(-fromindexcmd,@ret) if $iret;
+ wantarray?@ret:$ret[0];
+ };
+ no strict 'refs';
+ *{$sub}=$newsub;
+ }
+}
+
+sub to_index
+{
+ my $w=shift;
+ my $offset=$w->cget(-linestart)+1;
+ my(@args)=@_;
+ foreach (@args)
+ {
+ s/^\d+(?=\.)/$&+$offset/e;
+ }
+ @args;
+}
+
+sub from_index
+{
+ my $w=shift;
+ my $offset=$w->cget(-linestart)+1;
+ my(@args)=@_;
+ foreach (@args)
+ {
+ s/^\d+(?=\.)/$&-$offset/e
+ }
+ @args;
+}
+
+sub _find_dump_index
+{
+ my $idx=_count_options(@_);
+ [$idx,$idx+1];
+}
+
+sub _find_search_index
+{
+ my $idx=_count_options(@_);
+ [$idx+1,$idx+2];
+}
+
+sub _count_options
+{
+ my $idx=0;
+ while($_[$idx]=~/^-/g)
+ {
+ $idx++;
+ $idx++ if $' eq 'count' or $' eq 'command';
+ last if $' eq '-';
+ }
+ $idx;
+}
+
+sub _find_tag_index
+{
+ return [1] if $_[0] eq 'names';
+ return [2,3] if $_[0]=~/^(add|remove|nextrange|prevrange)$/;
+ return [-1] if $_[0] eq 'ranges';
+ return [];
+}
+
+sub _find_mark_index
+{
+ return [2] if $_[0] eq 'set';
+ return [1] if $_[0] eq 'next' or $_[0] eq 'previous';
+ return [];
+}
+
+1;
+
+=head1 NAME
+
+Tk::Reindex - change the base index of Text-like widgets
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ use Tk::ReindexedText;
+ $t1=$w->ReindexedText(-linestart => 2);
+
+ use Tk::ReindexedROText;
+ $t2=$w->ReindexedROText(-linestart => 0);
+
+=head1 DESCRIPTION
+
+Creates a new widget class based on B<Text>-like widgets that can
+redefine the line number base (normally B<Text> widgets start line
+numbers at 1), or possibly other manipulations on indexes.
+
+=head1 STANDARD OPTIONS
+
+The newly-defined widget takes all the same options as the base
+widget, which defaults to B<Text>.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over
+
+=item Name: B<lineStart>
+
+=item Class: B<LineStart>
+
+=item Switch: B<-linestart>
+
+Sets the line number of the first line in the B<Text> widget. The
+default B<-toindexcmd> and B<-fromindexcmd> use this configuration
+option.
+
+-item Name: B<toIndexCmd> B<fromIndexCmd>
+
+-item Class: B<ToIndexCmd> B<FromIndexCmd>
+
+-item Switch: B<-toindexcmd> B<-fromindexcmd>
+
+These two options specify callbacks that are called with a list of
+indexes and are responsible for translating them to/from indexes that
+the base B<Text> widget can understand. The callback is passed the
+widget followed by a list of indexes, and should return a list of
+translated indexes. B<-toindexcmd> should translate from 'user'
+indexes to 'native' B<Text>-compatible indexes, and B<-fromindexcmd>
+should translate from 'native' indexes to 'user' indexes.
+
+The default callbacks simply add/subtract the offset given by the
+B<-linestart> option for all indexes in 'line.character' format.
+
+It would probably be prudent to make these functions inverses of each
+other.
+
+=back
+
+=head1 CLASS METHODS
+
+=over
+
+=item import
+
+To make new Reindex widgets, this function should be called via B<use>
+with the name of the Text-like base class that you are extending with
+"Reindex" capability. 'use base(Tk::Reindex Tk::nameofbasewidget)'
+should also be specified for that widget.
+
+=back
+
+=head1 BUGS
+
+I've used the word "indexes" instead of "indices" throughout the
+documentation.
+
+All the built-in perl code for widget bindings & methods will use the
+new 'user' indexes. Which means all this index manipulation might
+might break code that is trying to parse/manipulate indexes. Or even
+assume that '1.0' is the beginning index. B<Tk::Text::Contents> comes
+to mind.
+
+=head1 AUTHOR
+
+Andrew Allen <ada@fc.hp.com>
+
+This code may be distributed under the same conditions as Perl.
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/ReindexedROText.pm b/Master/tlpkg/tlperl/lib/Tk/ReindexedROText.pm
new file mode 100644
index 00000000000..8c293f5fa61
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ReindexedROText.pm
@@ -0,0 +1,13 @@
+use strict;
+package Tk::ReindexedROText;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/TextList/ReindexedROText.pm#4 $
+
+use Tk::Reindex qw(Tk::ROText);
+use base qw(Tk::Reindex Tk::ROText);
+Construct Tk::Widget 'ReindexedROText';
+
+1;
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/ReindexedText.pm b/Master/tlpkg/tlperl/lib/Tk/ReindexedText.pm
new file mode 100644
index 00000000000..c16a6fe7fd7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/ReindexedText.pm
@@ -0,0 +1,13 @@
+use strict;
+package Tk::ReindexedText;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/TextList/ReindexedText.pm#4 $
+
+use Tk::Reindex qw(Tk::Text);
+use base qw(Tk::Reindex Tk::Text);
+Construct Tk::Widget 'ReindexedText';
+
+1;
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Scale.pm b/Master/tlpkg/tlperl/lib/Tk/Scale.pm
new file mode 100644
index 00000000000..57c7bb11aa1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Scale.pm
@@ -0,0 +1,278 @@
+# Converted from scale.tcl --
+#
+# This file defines the default bindings for Tk scale widgets.
+#
+# @(#) scale.tcl 1.3 94/12/17 16:05:23
+#
+# Copyright (c) 1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+package Tk::Scale;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Scale/Scale.pm#4 $
+
+use Tk qw($XS_VERSION);
+use AutoLoader;
+
+use base qw(Tk::Widget);
+
+Construct Tk::Widget 'Scale';
+
+bootstrap Tk::Scale;
+
+sub Tk_cmd { \&Tk::scale }
+
+Tk::Methods('coords','get','identify','set');
+
+
+import Tk qw(Ev);
+
+#
+# Bind --
+# This procedure below invoked the first time the mouse enters a
+# scale widget or a scale widget receives the input focus. It creates
+# all of the class bindings for scales.
+#
+# Arguments:
+# event - Indicates which event caused the procedure to be invoked
+# (Enter or FocusIn). It is used so that we can carry out
+# the functions of that event in addition to setting up
+# bindings.
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+
+ $mw->bind($class,'<Enter>',['Enter',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<Motion>',['Activate',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<Leave>','Leave');
+
+ $mw->bind($class,'<1>',['ButtonDown',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B1-Motion>',['Drag',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B1-Leave>','NoOp');
+ $mw->bind($class,'<B1-Enter>','NoOp');
+ $mw->bind($class,'<ButtonRelease-1>',['ButtonUp',Ev('x'),Ev('y')]);
+
+ $mw->bind($class,'<2>',['ButtonDown',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B2-Motion>',['Drag',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B2-Leave>','NoOp');
+ $mw->bind($class,'<B2-Enter>','NoOp');
+ $mw->bind($class,'<ButtonRelease-2>',['ButtonUp',Ev('x'),Ev('y')]);
+
+ $mw->bind($class,'<Control-1>',['ControlPress',Ev('x'),Ev('y')]);
+
+ $mw->bind($class,'<Up>',['Increment','up','little','noRepeat']);
+ $mw->bind($class,'<Down>',['Increment','down','little','noRepeat']);
+ $mw->bind($class,'<Left>',['Increment','up','little','noRepeat']);
+ $mw->bind($class,'<Right>',['Increment','down','little','noRepeat']);
+
+ $mw->bind($class,'<Control-Up>',['Increment','up','big','noRepeat']);
+ $mw->bind($class,'<Control-Down>',['Increment','down','big','noRepeat']);
+ $mw->bind($class,'<Control-Left>',['Increment','up','big','noRepeat']);
+ $mw->bind($class,'<Control-Right>',['Increment','down','big','noRepeat']);
+
+ $mw->bind($class,'<Home>',['set',Ev('cget','-from')]);
+ $mw->bind($class,'<End>',['set',Ev('cget','-to')]);
+ return $class;
+}
+
+1;
+
+__END__
+
+# Activate --
+# This procedure is invoked to check a given x-y position in the
+# scale and activate the slider if the x-y position falls within
+# the slider.
+#
+# Arguments:
+# w - The scale widget.
+# x, y - Mouse coordinates.
+sub Activate
+{
+ my $w = shift;
+ my $x = shift;
+ my $y = shift;
+ return if ($w->cget('-state') eq 'disabled');
+ my $ident = $w->identify($x,$y);
+ if (defined($ident) && $ident eq 'slider')
+ {
+ $w->configure(-state => 'active')
+ }
+ else
+ {
+ $w->configure(-state => 'normal')
+ }
+}
+
+sub Leave
+{
+ my ($w) = @_;
+ $w->configure('-activebackground',$w->{'activeBg'}) if ($Tk::strictMotif);
+ $w->configure('-state','normal') if ($w->cget('-state') eq 'active');
+}
+
+sub Enter
+{
+ my ($w,$x,$y) = @_;
+ if ($Tk::strictMotif)
+ {
+ $w->{'activeBg'} = $w->cget('-activebackground');
+ $w->configure('-activebackground',$w->cget('-background'));
+ }
+ $w->Activate($x,$y);
+}
+
+sub ButtonUp
+{
+ my ($w,$x,$y) = @_;
+ $w->CancelRepeat();
+ $w->EndDrag();
+ $w->Activate($x,$y)
+}
+
+
+# ButtonDown --
+# This procedure is invoked when a button is pressed in a scale. It
+# takes different actions depending on where the button was pressed.
+#
+# Arguments:
+# w - The scale widget.
+# x, y - Mouse coordinates of button press.
+sub ButtonDown
+{
+ my $w = shift;
+ my $x = shift;
+ my $y = shift;
+ $Tk::dragging = 0;
+ $el = $w->identify($x,$y);
+ return unless ($el);
+ if ($el eq 'trough1')
+ {
+ $w->Increment('up','little','initial')
+ }
+ elsif ($el eq 'trough2')
+ {
+ $w->Increment('down','little','initial')
+ }
+ elsif ($el eq 'slider')
+ {
+ $Tk::dragging = 1;
+ my @coords = $w->coords();
+ $Tk::deltaX = $x-$coords[0];
+ $Tk::deltaY = $y-$coords[1];
+ }
+}
+# Drag --
+# This procedure is called when the mouse is dragged with
+# mouse button 1 down. If the drag started inside the slider
+# (i.e. the scale is active) then the scale's value is adjusted
+# to reflect the mouse's position.
+#
+# Arguments:
+# w - The scale widget.
+# x, y - Mouse coordinates.
+sub Drag
+{
+ my $w = shift;
+ my $x = shift;
+ my $y = shift;
+ if (!$Tk::dragging)
+ {
+ return;
+ }
+ $w->set($w->get($x-$Tk::deltaX,$y-$Tk::deltaY))
+}
+# EndDrag --
+# This procedure is called to end an interactive drag of the
+# slider. It just marks the drag as over.
+# Arguments:
+# w - The scale widget.
+sub EndDrag
+{
+ my $w = shift;
+ if (!$Tk::dragging)
+ {
+ return;
+ }
+ $Tk::dragging = 0;
+}
+# Increment --
+# This procedure is invoked to increment the value of a scale and
+# to set up auto-repeating of the action if that is desired. The
+# way the value is incremented depends on the "dir" and "big"
+# arguments.
+#
+# Arguments:
+# w - The scale widget.
+# dir - "up" means move value towards -from, "down" means
+# move towards -to.
+# big - Size of increments: "big" or "little".
+# repeat - Whether and how to auto-repeat the action: "noRepeat"
+# means don't auto-repeat, "initial" means this is the
+# first action in an auto-repeat sequence, and "again"
+# means this is the second repetition or later.
+sub Increment
+{
+ my $w = shift;
+ my $dir = shift;
+ my $big = shift;
+ my $repeat = shift;
+ my $inc;
+ if ($big eq 'big')
+ {
+ $inc = $w->cget('-bigincrement');
+ if ($inc == 0)
+ {
+ $inc = abs(($w->cget('-to')-$w->cget('-from')))/10.0
+ }
+ if ($inc < $w->cget('-resolution'))
+ {
+ $inc = $w->cget('-resolution')
+ }
+ }
+ else
+ {
+ $inc = $w->cget('-resolution')
+ }
+ if (($w->cget('-from') > $w->cget('-to')) ^ ($dir eq 'up'))
+ {
+ $inc = -$inc
+ }
+ $w->set($w->get()+$inc);
+ if ($repeat eq 'again')
+ {
+ $w->RepeatId($w->after($w->cget('-repeatinterval'),'Increment',$w,$dir,$big,'again'));
+ }
+ elsif ($repeat eq 'initial')
+ {
+ $w->RepeatId($w->after($w->cget('-repeatdelay'),'Increment',$w,$dir,$big,'again'));
+ }
+}
+# ControlPress --
+# This procedure handles button presses that are made with the Control
+# key down. Depending on the mouse position, it adjusts the scale
+# value to one end of the range or the other.
+#
+# Arguments:
+# w - The scale widget.
+# x, y - Mouse coordinates where the button was pressed.
+sub ControlPress
+{
+ my ($w,$x,$y) = @_;
+ my $el = $w->identify($x,$y);
+ return unless ($el);
+ if ($el eq 'trough1')
+ {
+ $w->set($w->cget('-from'))
+ }
+ elsif ($el eq 'trough2')
+ {
+ $w->set($w->cget('-to'))
+ }
+}
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Scale.pod b/Master/tlpkg/tlperl/lib/Tk/Scale.pod
new file mode 100644
index 00000000000..f7de2390bba
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Scale.pod
@@ -0,0 +1,356 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Scale - Create and manipulate Scale widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$scale> = I<$parent>-E<gt>B<Scale>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground> B<-font> B<-highlightthickness> B<-repeatinterval>
+B<-background> B<-foreground> B<-orient> B<-takefocus>
+B<-borderwidth> B<-highlightbackground> B<-relief> B<-troughcolor>
+B<-cursor> B<-highlightcolor> B<-repeatdelay>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<bigIncrement>
+
+=item Class: B<BigIncrement>
+
+=item Switch: B<-bigincrement>
+
+Some interactions with the scale cause its value to change by
+``large'' increments; this option specifies the size of the
+large increments. If specified as 0, the large increments default
+to 1/10 the range of the scale.
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies the prefix of a L<perl/Tk callback|Tk::callbacks> to invoke whenever the scale's
+value is changed via a method.
+The actual command consists
+of this option followed by a space and a real number indicating the
+new value of the scale.
+
+=item Name: B<digits>
+
+=item Class: B<Digits>
+
+=item Switch: B<-digits>
+
+An integer specifying how many significant digits should be retained
+when converting the value of the scale to a string.
+If the number is less than or equal to zero, then the scale picks
+the smallest value that guarantees that every possible slider
+position prints as a different string.
+
+=item Name: B<from>
+
+=item Class: B<From>
+
+=item Switch: B<-from>
+
+A real value corresponding to the left or top end of the scale.
+
+=item Name: B<label>
+
+=item Class: B<Label>
+
+=item Switch: B<-label>
+
+A string to display as a label for the scale. For
+vertical scales the label is displayed just to the right of the
+top end of the scale. For horizontal scales the label is displayed
+just above the left end of the scale. If the option is specified
+as an empty string, no label is displayed.
+
+=item Name: B<length>
+
+=item Class: B<Length>
+
+=item Switch: B<-length>
+
+Specifies the desired long dimension of the scale in screen units
+(i.e. any of the forms acceptable to B<Tk_GetPixels>).
+For vertical scales this is the scale's height; for horizontal scales
+it is the scale's width.
+
+=item Name: B<resolution>
+
+=item Class: B<Resolution>
+
+=item Switch: B<-resolution>
+
+A real value specifying the resolution for the scale.
+If this value is greater than zero then the scale's value will always be
+rounded to an even multiple of this value, as will tick marks and
+the endpoints of the scale. If the value is less than zero then no
+rounding occurs. Defaults to 1 (i.e., the value will be integral).
+
+=item Name: B<showValue>
+
+=item Class: B<ShowValue>
+
+=item Switch: B<-showvalue>
+
+Specifies a boolean value indicating whether or not the current
+value of the scale is to be displayed.
+
+=item Name: B<sliderLength>
+
+=item Class: B<SliderLength>
+
+=item Switch: B<-sliderlength>
+
+Specfies the size of the slider, measured in screen units along the slider's
+long dimension. The value may be specified in any of the forms acceptable
+to B<Tk_GetPixels>.
+
+=item Name: B<sliderRelief>
+
+=item Class: B<SliderRelief>
+
+=item Switch: B<-sliderrelief>
+
+Specifies the relief to use when drawing the slider, such as B<raised>
+or B<sunken>.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of three states for the scale: B<normal>,
+B<active>, or B<disabled>.
+If the scale is disabled then the value may not be changed and the scale
+won't activate.
+If the scale is active, the slider is displayed using the color
+specified by the B<activeBackground> option.
+
+=item Name: B<tickInterval>
+
+=item Class: B<TickInterval>
+
+=item Switch: B<-tickinterval>
+
+Must be a real value.
+Determines the spacing between numerical
+tick marks displayed below or to the left of the slider.
+If 0, no tick marks will be displayed.
+
+=item Name: B<to>
+
+=item Class: B<To>
+
+=item Switch: B<-to>
+
+Specifies a real value corresponding
+to the right or bottom end of the scale.
+This value may be either less than or greater than the B<from> option.
+
+=item Name: B<variable>
+
+=item Class: B<Variable>
+
+=item Switch: B<-variable>
+
+Specifies the name of a global variable to link to the scale. Whenever the
+value of the variable changes, the scale will update to reflect this
+value.
+Whenever the scale is manipulated interactively, the variable
+will be modified to reflect the scale's new value.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired narrow dimension of the trough in screen units
+(i.e. any of the forms acceptable to B<Tk_GetPixels>).
+For vertical scales this is the trough's width; for horizontal scales
+this is the trough's height.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Scale> method creates a new window (given by the
+$widget argument) and makes it into a scale widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the scale such as its colors, orientation,
+and relief. The B<scale> command returns its
+$widget argument. At the time this command is invoked,
+there must not exist a window named $widget, but
+$widget's parent must exist.
+
+A scale is a widget that displays a rectangular I<trough> and a
+small I<slider>. The trough corresponds to a range
+of real values (determined by the B<from>, B<to>, and
+B<resolution> options),
+and the position of the slider selects a particular real value.
+The slider's position (and hence the scale's value) may be adjusted
+with the mouse or keyboard as described in
+the L<"BINDINGS"> section below. Whenever the scale's value is changed, a Tcl
+command is invoked (using the B<command> option) to notify
+other interested widgets of the change.
+In addition, the value
+of the scale can be linked to a Tcl variable (using the B<variable>
+option), so that changes in either are reflected in the other.
+
+Three annotations may be displayed in a scale widget: a label
+appearing at the top right of the widget (top left for horizontal
+scales), a number displayed just to the left of the slider
+(just above the slider for horizontal scales), and a collection
+of numerical tick marks just to the left of the current value
+(just below the trough for horizontal scales). Each of these three
+annotations may be enabled or disabled using the
+configuration options.
+
+=head1 WIDGET METHODS
+
+The B<Scale> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for scale widgets:
+
+=over 4
+
+=item I<$scale>-E<gt>B<coords>(?I<value>?)
+
+Returns a list whose elements are the x and y coordinates of
+the point along the centerline of the trough that corresponds
+to I<value>.
+If I<value> is omitted then the scale's current value is used.
+
+=item I<$scale>-E<gt>B<get>(?I<x, y>?)
+
+If I<x> and I<y> are omitted, returns the current value
+of the scale. If I<x> and I<y> are specified, they give
+pixel coordinates within the widget; the command returns
+the scale value corresponding to the given pixel.
+Only one of I<x> or I<y> is used: for horizontal scales
+I<y> is ignored, and for vertical scales I<x> is ignored.
+
+=item I<$scale>-E<gt>B<identify>(I<x, y>)
+
+Returns a string indicating what part of the scale lies under
+the coordinates given by I<x> and I<y>.
+A return value of B<slider> means that the point is over
+the slider; B<trough1> means that the point is over the
+portion of the slider above or to the left of the slider;
+and B<trough2> means that the point is over the portion
+of the slider below or to the right of the slider.
+If the point isn't over one of these elements, an empty string
+is returned.
+
+=item I<$scale>-E<gt>B<set>(I<value>)
+
+This command is invoked to change the current value of the scale,
+and hence the position at which the slider is displayed. I<Value>
+gives the new value for the scale.
+The command has no effect if the scale is disabled.
+
+=back
+
+=head1 BINDINGS
+
+Tk automatically creates class bindings for scales that give them
+the following default behavior.
+Where the behavior is different for vertical and horizontal scales,
+the horizontal behavior is described in parentheses.
+
+=over 4
+
+=item [1]
+
+If button 1 is pressed in the trough, the scale's value will
+be incremented or decremented by the value of the B<resolution>
+option so that the slider moves in the direction of the cursor.
+If the button is held down, the action auto-repeats.
+
+=item [2]
+
+If button 1 is pressed over the slider, the slider can be dragged
+with the mouse.
+
+=item [3]
+
+If button 1 is pressed in the trough with the Control key down,
+the slider moves all the way to the end of its range, in the
+direction towards the mouse cursor.
+
+=item [4]
+
+If button 2 is pressed, the scale's value is set to the mouse
+position. If the mouse is dragged with button 2 down, the scale's
+value changes with the drag.
+
+=item [5]
+
+The Up and Left keys move the slider up (left) by the value
+of the B<resolution> option.
+
+=item [6]
+
+The Down and Right keys move the slider down (right) by the value
+of the B<resolution> option.
+
+=item [7]
+
+Control-Up and Control-Left move the slider up (left) by the
+value of the B<bigIncrement> option.
+
+=item [8]
+
+Control-Down and Control-Right move the slider down (right) by the
+value of the B<bigIncrement> option.
+
+=item [9]
+
+Home moves the slider to the top (left) end of its range.
+
+=item [10]
+
+End moves the slider to the bottom (right) end of its range.
+
+If the scale is disabled using the B<state> option then
+none of the above bindings have any effect.
+
+The behavior of scales can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 KEYWORDS
+
+scale, slider, trough, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Scrollbar.pm b/Master/tlpkg/tlperl/lib/Tk/Scrollbar.pm
new file mode 100644
index 00000000000..6b416e04b30
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Scrollbar.pm
@@ -0,0 +1,429 @@
+# Conversion from Tk4.0 scrollbar.tcl competed.
+package Tk::Scrollbar;
+
+use vars qw($VERSION);
+$VERSION = '4.010'; # $Id: //depot/Tkutf8/Scrollbar/Scrollbar.pm#10 $
+
+use Tk qw($XS_VERSION Ev);
+use AutoLoader;
+
+use base qw(Tk::Widget);
+
+#use strict;
+#use vars qw($pressX $pressY @initValues $initPos $activeBg);
+
+Construct Tk::Widget 'Scrollbar';
+
+bootstrap Tk::Scrollbar;
+
+sub Tk_cmd { \&Tk::scrollbar }
+
+Tk::Methods('activate','delta','fraction','get','identify','set');
+
+sub Needed
+{
+ my ($sb) = @_;
+ my @val = $sb->get;
+ return 1 unless (@val == 2);
+ return 1 if $val[0] != 0.0;
+ return 1 if $val[1] != 1.0;
+ return 0;
+}
+
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class, '<Enter>', 'Enter');
+ $mw->bind($class, '<Motion>', 'Motion');
+ $mw->bind($class, '<Leave>', 'Leave');
+
+ $mw->bind($class, '<1>', 'ButtonDown');
+ $mw->bind($class, '<B1-Motion>', ['Drag', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<ButtonRelease-1>', 'ButtonUp');
+ $mw->bind($class, '<B1-Leave>', 'NoOp'); # prevent generic <Leave>
+ $mw->bind($class, '<B1-Enter>', 'NoOp'); # prevent generic <Enter>
+ $mw->bind($class, '<Control-1>', 'ScrlTopBottom');
+
+ $mw->bind($class, '<2>', 'ButtonDown');
+ $mw->bind($class, '<B2-Motion>', ['Drag', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<ButtonRelease-2>', 'ButtonUp');
+ $mw->bind($class, '<B2-Leave>', 'NoOp'); # prevent generic <Leave>
+ $mw->bind($class, '<B2-Enter>', 'NoOp'); # prevent generic <Enter>
+ $mw->bind($class, '<Control-2>', 'ScrlTopBottom');
+
+ $mw->bind($class, '<Up>', ['ScrlByUnits','v',-1]);
+ $mw->bind($class, '<Down>', ['ScrlByUnits','v', 1]);
+ $mw->bind($class, '<Control-Up>', ['ScrlByPages','v',-1]);
+ $mw->bind($class, '<Control-Down>', ['ScrlByPages','v', 1]);
+
+ $mw->bind($class, '<Left>', ['ScrlByUnits','h',-1]);
+ $mw->bind($class, '<Right>', ['ScrlByUnits','h', 1]);
+ $mw->bind($class, '<Control-Left>', ['ScrlByPages','h',-1]);
+ $mw->bind($class, '<Control-Right>', ['ScrlByPages','h', 1]);
+
+ $mw->bind($class, '<Prior>', ['ScrlByPages','hv',-1]);
+ $mw->bind($class, '<Next>', ['ScrlByPages','hv', 1]);
+
+ # X11 mousewheel - honour for horizontal too.
+ $mw->bind($class, '<4>', ['ScrlByUnits','hv',-5]);
+ $mw->bind($class, '<5>', ['ScrlByUnits','hv', 5]);
+
+ $mw->bind($class, '<Home>', ['ScrlToPos', 0]);
+ $mw->bind($class, '<End>', ['ScrlToPos', 1]);
+
+ $mw->bind($class, '<4>', ['ScrlByUnits','v',-3]);
+ $mw->bind($class, '<5>', ['ScrlByUnits','v', 3]);
+
+ return $class;
+
+}
+
+1;
+
+__END__
+
+sub Enter
+{
+ my $w = shift;
+ my $e = $w->XEvent;
+ if ($Tk::strictMotif)
+ {
+ my $bg = $w->cget('-background');
+ $activeBg = $w->cget('-activebackground');
+ $w->configure('-activebackground' => $bg);
+ }
+ $w->activate($w->identify($e->x,$e->y));
+}
+
+sub Leave
+{
+ my $w = shift;
+ if ($Tk::strictMotif)
+ {
+ $w->configure('-activebackground' => $activeBg) if (defined $activeBg) ;
+ }
+ $w->activate('');
+}
+
+sub Motion
+{
+ my $w = shift;
+ my $e = $w->XEvent;
+ $w->activate($w->identify($e->x,$e->y));
+}
+
+# tkScrollButtonDown --
+# This procedure is invoked when a button is pressed in a scrollbar.
+# It changes the way the scrollbar is displayed and takes actions
+# depending on where the mouse is.
+#
+# Arguments:
+# w - The scrollbar widget.
+# x, y - Mouse coordinates.
+
+sub ButtonDown
+{my $w = shift;
+ my $e = $w->XEvent;
+ my $element = $w->identify($e->x,$e->y);
+ $w->configure('-activerelief' => 'sunken');
+ if ($e->b == 1 and
+ (defined($element) && $element eq 'slider'))
+ {
+ $w->StartDrag($e->x,$e->y);
+ }
+ elsif ($e->b == 2 and
+ (defined($element) && $element =~ /^(trough[12]|slider)$/o))
+ {
+ my $pos = $w->fraction($e->x, $e->y);
+ my($head, $tail) = $w->get;
+ my $len = $tail - $head;
+
+ $head = $pos - $len/2;
+ $tail = $pos + $len/2;
+ if ($head < 0) {
+ $head = 0;
+ $tail = $len;
+ }
+ elsif ($tail > 1) {
+ $head = 1 - $len;
+ $tail = 1;
+ }
+ $w->ScrlToPos($head);
+ $w->set($head, $tail);
+
+ $w->StartDrag($e->x,$e->y);
+ }
+ else
+ {
+ $w->Select($element,'initial');
+ }
+}
+
+# tkScrollButtonUp --
+# This procedure is invoked when a button is released in a scrollbar.
+# It cancels scans and auto-repeats that were in progress, and restores
+# the way the active element is displayed.
+#
+# Arguments:
+# w - The scrollbar widget.
+# x, y - Mouse coordinates.
+
+sub ButtonUp
+{my $w = shift;
+ my $e = $w->XEvent;
+ $w->CancelRepeat;
+ $w->configure('-activerelief' => 'raised');
+ $w->EndDrag($e->x,$e->y);
+ $w->activate($w->identify($e->x,$e->y));
+}
+
+# tkScrollSelect --
+# This procedure is invoked when button 1 is pressed over the scrollbar.
+# It invokes one of several scrolling actions depending on where in
+# the scrollbar the button was pressed.
+#
+# Arguments:
+# w - The scrollbar widget.
+# element - The element of the scrollbar that was selected, such
+# as "arrow1" or "trough2". Shouldn't be "slider".
+# repeat - Whether and how to auto-repeat the action: "noRepeat"
+# means don't auto-repeat, "initial" means this is the
+# first action in an auto-repeat sequence, and "again"
+# means this is the second repetition or later.
+
+sub Select
+{
+ my $w = shift;
+ my $element = shift;
+ my $repeat = shift;
+ return unless defined ($element);
+ if ($element eq 'arrow1')
+ {
+ $w->ScrlByUnits('hv',-1);
+ }
+ elsif ($element eq 'trough1')
+ {
+ $w->ScrlByPages('hv',-1);
+ }
+ elsif ($element eq 'trough2')
+ {
+ $w->ScrlByPages('hv', 1);
+ }
+ elsif ($element eq 'arrow2')
+ {
+ $w->ScrlByUnits('hv', 1);
+ }
+ else
+ {
+ return;
+ }
+
+ if ($repeat eq 'again')
+ {
+ $w->RepeatId($w->after($w->cget('-repeatinterval'),['Select',$w,$element,'again']));
+ }
+ elsif ($repeat eq 'initial')
+ {
+ $w->RepeatId($w->after($w->cget('-repeatdelay'),['Select',$w,$element,'again']));
+ }
+}
+
+# tkScrollStartDrag --
+# This procedure is called to initiate a drag of the slider. It just
+# remembers the starting position of the slider.
+#
+# Arguments:
+# w - The scrollbar widget.
+# x, y - The mouse position at the start of the drag operation.
+
+sub StartDrag
+{
+ my($w,$x,$y) = @_;
+ return unless (defined ($w->cget('-command')));
+ $pressX = $x;
+ $pressY = $y;
+ @initValues = $w->get;
+ my $iv0 = $initValues[0];
+ if (@initValues == 2)
+ {
+ $initPos = $iv0;
+ }
+ elsif ($iv0 == 0)
+ {
+ $initPos = 0;
+ }
+ else
+ {
+ $initPos = $initValues[2]/$initValues[0];
+ }
+}
+
+# tkScrollDrag --
+# This procedure is called for each mouse motion even when the slider
+# is being dragged. It notifies the associated widget if we're not
+# jump scrolling, and it just updates the scrollbar if we are jump
+# scrolling.
+#
+# Arguments:
+# w - The scrollbar widget.
+# x, y - The current mouse position.
+
+sub Drag
+{
+ my($w,$x,$y) = @_;
+ return if !defined $initPos;
+ my $delta = $w->delta($x-$pressX, $y-$pressY);
+ if ($w->cget('-jump'))
+ {
+ if (@initValues == 2)
+ {
+ $w->set($initValues[0]+$delta, $initValues[1]+$delta);
+ }
+ else
+ {
+ $delta = sprintf "%d", $delta * $initValues[0]; # round()
+ $initValues[2] += $delta;
+ $initValues[3] += $delta;
+ $w->set(@initValues[2,3]);
+ }
+ }
+ else
+ {
+ $w->ScrlToPos($initPos+$delta);
+ }
+}
+
+# tkScrollEndDrag --
+# This procedure is called to end an interactive drag of the slider.
+# It scrolls the window if we're in jump mode, otherwise it does nothing.
+#
+# Arguments:
+# w - The scrollbar widget.
+# x, y - The mouse position at the end of the drag operation.
+
+sub EndDrag
+{
+ my($w,$x,$y) = @_;
+ return if (!defined $initPos);
+ if ($w->cget('-jump'))
+ {
+ my $delta = $w->delta($x-$pressX, $y-$pressY);
+ $w->ScrlToPos($initPos+$delta);
+ }
+ undef $initPos;
+}
+
+# tkScrlByUnits --
+# This procedure tells the scrollbar's associated widget to scroll up
+# or down by a given number of units. It notifies the associated widget
+# in different ways for old and new command syntaxes.
+#
+# Arguments:
+# w - The scrollbar widget.
+# orient - Which kinds of scrollbars this applies to: "h" for
+# horizontal, "v" for vertical, "hv" for both.
+# amount - How many units to scroll: typically 1 or -1.
+
+sub ScrlByUnits
+{my $w = shift;
+ my $orient = shift;
+ my $amount = shift;
+ my $cmd = $w->cget('-command');
+ return unless (defined $cmd);
+ return if (index($orient,substr($w->cget('-orient'),0,1)) < 0);
+ my @info = $w->get;
+ if (@info == 2)
+ {
+ $cmd->Call('scroll',$amount,'units');
+ }
+ else
+ {
+ $cmd->Call($info[2]+$amount);
+ }
+}
+
+# tkScrlByPages --
+# This procedure tells the scrollbar's associated widget to scroll up
+# or down by a given number of screenfuls. It notifies the associated
+# widget in different ways for old and new command syntaxes.
+#
+# Arguments:
+# w - The scrollbar widget.
+# orient - Which kinds of scrollbars this applies to: "h" for
+# horizontal, "v" for vertical, "hv" for both.
+# amount - How many screens to scroll: typically 1 or -1.
+
+sub ScrlByPages
+{
+ my $w = shift;
+ my $orient = shift;
+ my $amount = shift;
+ my $cmd = $w->cget('-command');
+ return unless (defined $cmd);
+ return if (index($orient,substr($w->cget('-orient'),0,1)) < 0);
+ my @info = $w->get;
+ if (@info == 2)
+ {
+ $cmd->Call('scroll',$amount,'pages');
+ }
+ else
+ {
+ $cmd->Call($info[2]+$amount*($info[1]-1));
+ }
+}
+
+# tkScrlToPos --
+# This procedure tells the scrollbar's associated widget to scroll to
+# a particular location, given by a fraction between 0 and 1. It notifies
+# the associated widget in different ways for old and new command syntaxes.
+#
+# Arguments:
+# w - The scrollbar widget.
+# pos - A fraction between 0 and 1 indicating a desired position
+# in the document.
+
+sub ScrlToPos
+{
+ my $w = shift;
+ my $pos = shift;
+ my $cmd = $w->cget('-command');
+ return unless (defined $cmd);
+ my @info = $w->get;
+ if (@info == 2)
+ {
+ $cmd->Call('moveto',$pos);
+ }
+ else
+ {
+ $cmd->Call(int($info[0]*$pos));
+ }
+}
+
+# tkScrlTopBottom
+# Scroll to the top or bottom of the document, depending on the mouse
+# position.
+#
+# Arguments:
+# w - The scrollbar widget.
+# x, y - Mouse coordinates within the widget.
+
+sub ScrlTopBottom
+{
+ my $w = shift;
+ my $e = $w->XEvent;
+ my $element = $w->identify($e->x,$e->y);
+ return unless ($element);
+ if ($element =~ /1$/)
+ {
+ $w->ScrlToPos(0);
+ }
+ elsif ($element =~ /2$/)
+ {
+ $w->ScrlToPos(1);
+ }
+}
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Scrollbar.pod b/Master/tlpkg/tlperl/lib/Tk/Scrollbar.pod
new file mode 100644
index 00000000000..838eb97e666
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Scrollbar.pod
@@ -0,0 +1,429 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Scrollbar - Create and manipulate Scrollbar widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+I<$scrollbar> = I<$parent>-E<gt>B<Scrollbar>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-activebackground> B<-highlightbackground> B<-orient> B<-takefocus>
+B<-background> B<-highlightcolor> B<-relief> B<-troughcolor>
+B<-borderwidth> B<-highlightthickness> B<-repeatdelay>
+B<-cursor> B<-jump> B<-repeatinterval>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<activeRelief>
+
+=item Class: B<ActiveRelief>
+
+=item Switch: B<-activerelief>
+
+Specifies the relief to use when displaying the element that is
+active, if any.
+Elements other than the active element are always displayed with
+a raised relief.
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies a callback to invoke to change the view
+in the widget associated with the scrollbar. When a user requests
+a view change by manipulating the scrollbar, the callback is
+invoked. The callback is passed
+additional arguments as described later. This option almost always has
+a value such as B<[xview =E<gt> $widget]> or B<[yview =E<gt> $widget]>, consisting of the
+a widget object and either B<xview> (if the scrollbar is for
+horizontal scrolling) or B<yview> (for vertical scrolling).
+All scrollable widgets have B<xview> and B<yview> methods
+that take exactly the additional arguments appended by the scrollbar
+as described in L<"SCROLLING COMMANDS"> below.
+
+=item Name: B<elementBorderWidth>
+
+=item Class: B<BorderWidth>
+
+=item Switch: B<-elementborderwidth>
+
+Specifies the width of borders drawn around the internal elements
+of the scrollbar (the two arrows and the slider). The value may
+have any of the forms acceptable to B<Tk_GetPixels>.
+If this value is less than zero, the value of the B<borderWidth>
+option is used in its place.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired narrow dimension of the scrollbar window,
+not including 3-D border, if any. For vertical
+scrollbars this will be the width and for horizontal scrollbars
+this will be the height.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Scrollbar> method creates a new window (given by the
+$widget argument) and makes it into a scrollbar widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the scrollbar
+such as its colors, orientation, and relief.
+The B<scrollbar> command returns its $widget argument.
+At the time this command is invoked, there must not exist a window
+named $widget, but $widget's parent must exist.
+
+A scrollbar is a widget that displays two arrows, one at each end of
+the scrollbar, and a I<slider> in the middle portion of the
+scrollbar.
+It provides information about what is visible in an I<associated window>
+that displays an document of some sort (such as a file being edited or
+a drawing).
+The position and size of the slider indicate which portion of the
+document is visible in the associated window. For example, if the
+slider in a vertical scrollbar covers the top third of the area
+between the two arrows, it means that the associated window displays
+the top third of its document.
+
+Scrollbars can be used to adjust the view in the associated window
+by clicking or dragging with the mouse.
+See L<"BINDINGS"> below for details.
+
+=head1 ELEMENTS
+
+A scrollbar displays five elements, which are referred to in the
+methods for the scrollbar:
+
+=over 4
+
+=item B<arrow1>
+
+The top or left arrow in the scrollbar.
+
+=item B<trough1>
+
+The region between the slider and B<arrow1>.
+
+=item B<slider>
+
+The rectangle that indicates what is visible in the associated widget.
+
+=item B<trough2>
+
+The region between the slider and B<arrow2>.
+
+=item B<arrow2>
+
+The bottom or right arrow in the scrollbar.
+
+=back
+
+=head1 WIDGET METHODS
+
+The B<Scrollbar> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for scrollbar widgets:
+
+=over 4
+
+=item I<$scrollbar>-E<gt>B<activate>(?I<element>?)
+
+Marks the element indicated by I<element> as active, which
+causes it to be displayed as specified by the B<activeBackground>
+and B<activeRelief> options.
+The only element values understood by this command are B<arrow1>,
+B<slider>, or B<arrow2>.
+If any other value is specified then no element of the scrollbar
+will be active.
+If I<element> is not specified, the command returns
+the name of the element that is currently active, or an empty string
+if no element is active.
+
+=item I<$scrollbar>-E<gt>B<delta>(I<deltaX, deltaY>)
+
+Returns a real number indicating the fractional change in
+the scrollbar setting that corresponds to a given change
+in slider position. For example, if the scrollbar is horizontal,
+the result indicates how much the scrollbar setting must change
+to move the slider I<deltaX> pixels to the right (I<deltaY> is
+ignored in this case).
+If the scrollbar is vertical, the result indicates how much the
+scrollbar setting must change to move the slider I<deltaY> pixels
+down. The arguments and the result may be zero or negative.
+
+=item I<$scrollbar>-E<gt>B<fraction>(I<x, y>)
+
+Returns a real number between 0 and 1 indicating where the point
+given by I<x> and I<y> lies in the trough area of the scrollbar.
+The value 0 corresponds to the top or left of the trough, the
+value 1 corresponds to the bottom or right, 0.5 corresponds to
+the middle, and so on.
+I<X> and I<y> must be pixel coordinates relative to the scrollbar
+widget.
+If I<x> and I<y> refer to a point outside the trough, the closest
+point in the trough is used.
+
+=item I<$scrollbar>-E<gt>B<get>
+
+Returns the scrollbar settings in the form of a list whose
+elements are the arguments to the most recent B<set> method.
+
+=item I<$scrollbar>-E<gt>B<identify>(I<x, y>)
+
+Returns the name of the element under the point given by I<x> and
+I<y> (such as B<arrow1>), or an empty string if the point does
+not lie in any element of the scrollbar.
+I<X> and I<y> must be pixel coordinates relative to the scrollbar
+widget.
+
+=item I<$scrollbar>-E<gt>B<set>(I<first, last>)
+
+This command is invoked by the scrollbar's associated widget to
+tell the scrollbar about the current view in the widget.
+The command takes two arguments, each of which is a real fraction
+between 0 and 1.
+The fractions describe the range of the document that is visible in
+the associated widget.
+For example, if I<first> is 0.2 and I<last> is 0.4, it means
+that the first part of the document visible in the window is 20%
+of the way through the document, and the last visible part is 40%
+of the way through.
+
+=back
+
+=head1 SCROLLING COMMANDS
+
+When the user interacts with the scrollbar, for example by dragging
+the slider, the scrollbar notifies the associated widget that it
+must change its view.
+The scrollbar makes the notification by evaluating a callback
+specified as the scrollbar's B<-command> option.
+The callback may take several forms.
+In each case, the intial arguments passed are those
+specified in the B<-command> callback itself,
+which usually has a form like [B<yview> =E<gt> I<$widget>].
+(Which will invoke I<$widget>-E<gt>B<yview>(...) where
+the ... part is as below. See L<Tk::callbacks> for details.)
+The callback is passed additional arguments as follows:
+
+=over 4
+
+=item B<moveto>,I<fraction>
+
+I<Fraction> is a real number between 0 and 1.
+The widget should adjust its view so that the point given
+by I<fraction> appears at the beginning of the widget.
+If I<fraction> is 0 it refers to the beginning of the
+document. 1.0 refers to the end of the document, 0.333
+refers to a point one-third of the way through the document,
+and so on.
+
+=item B<scroll,>I<number,>B<units>
+
+The widget should adjust its view by I<number> units.
+The units are defined in whatever way makes sense for the widget,
+such as characters or lines in a text widget.
+I<Number> is either 1, which means one unit should scroll off
+the top or left of the window, or -1, which means that one unit
+should scroll off the bottom or right of the window.
+
+=item B<scroll>,I<number>,B<page>
+
+The widget should adjust its view by I<number> pages.
+It is up to the widget to define the meaning of a page; typically
+it is slightly less than what fits in the window, so that there
+is a slight overlap between the old and new views.
+I<Number> is either 1, which means the next page should
+become visible, or -1, which means that the previous page should
+become visible.
+
+=back
+
+=head1 OLD COMMAND SYNTAX
+
+In versions of Tk before 4.0, the B<set> and B<get> widget
+commands used a different form.
+This form is still supported for backward compatibility, but it
+is deprecated.
+In the old command syntax, the B<set> method has the
+following form:
+
+=over 4
+
+=item I<$scrollbar>-E<gt>B<set>(I<totalUnits, windowUnits, firstUnit, lastUnit>)
+
+In this form the arguments are all integers.
+I<TotalUnits> gives the total size of the object being displayed in the
+associated widget. The meaning of one unit depends on the associated
+widget; for example, in a text editor widget units might
+correspond to lines of
+text. I<WindowUnits> indicates the total number of units that
+can fit in the associated window at one time. I<FirstUnit>
+and I<lastUnit> give the indices of the first and last units
+currently visible in the associated window (zero corresponds to the
+first unit of the object).
+
+=back
+
+Under the old syntax the B<get> method returns a list
+of four integers, consisting of the I<totalUnits>, I<windowUnits>,
+I<firstUnit>, and I<lastUnit> values from the last B<set>
+method.
+
+The callbacks generated by scrollbars also have a different form
+when the old syntax is being used, the callback is passed a single argument:
+
+=over 4
+
+=item I<unit>
+
+I<Unit> is an integer that indicates what should appear at
+the top or left of the associated widget's window.
+It has the same meaning as the I<firstUnit> and I<lastUnit>
+arguments to the B<set> method.
+
+=back
+
+The most recent B<set> method determines whether or not
+to use the old syntax.
+If it is given two real arguments then the new syntax will be
+used in the future, and if it is given four integer arguments then
+the old syntax will be used.
+
+=head1 BINDINGS
+
+Tk automatically creates class bindings for scrollbars that give them
+the following default behavior.
+If the behavior is different for vertical and horizontal scrollbars,
+the horizontal behavior is described in parentheses.
+
+=over 4
+
+=item [1]
+
+Pressing button 1 over B<arrow1> causes the view in the
+associated widget to shift up (left) by one unit so that the
+document appears to move down (right) one unit.
+If the button is held down, the action auto-repeats.
+
+=item [2]
+
+Pressing button 1 over B<trough1> causes the view in the
+associated widget to shift up (left) by one screenful so that the
+document appears to move down (right) one screenful.
+If the button is held down, the action auto-repeats.
+
+=item [3]
+
+Pressing button 1 over the slider and dragging causes the view
+to drag with the slider.
+If the B<jump> option is true, then the view doesn't drag along
+with the slider; it changes only when the mouse button is released.
+
+=item [4]
+
+Pressing button 1 over B<trough2> causes the view in the
+associated widget to shift down (right) by one screenful so that the
+document appears to move up (left) one screenful.
+If the button is held down, the action auto-repeats.
+
+=item [5]
+
+Pressing button 1 over B<arrow2> causes the view in the
+associated widget to shift down (right) by one unit so that the
+document appears to move up (left) one unit.
+If the button is held down, the action auto-repeats.
+
+=item [6]
+
+If button 2 is pressed over the trough or the slider, it sets
+the view to correspond to the mouse position; dragging the
+mouse with button 2 down causes the view to drag with the mouse.
+If button 2 is pressed over one of the arrows, it causes the
+same behavior as pressing button 1.
+
+=item [7]
+
+If button 1 is pressed with the Control key down, then if the
+mouse is over B<arrow1> or B<trough1> the view changes
+to the very top (left) of the document; if the mouse is over
+B<arrow2> or B<trough2> the view changes
+to the very bottom (right) of the document; if the mouse is
+anywhere else then the button press has no effect.
+
+=item [8]
+
+In vertical scrollbars the Up and Down keys have the same behavior
+as mouse clicks over B<arrow1> and B<arrow2>, respectively.
+In horizontal scrollbars these keys have no effect.
+
+=item [9]
+
+In vertical scrollbars Control-Up and Control-Down have the same
+behavior as mouse clicks over B<trough1> and B<trough2>, respectively.
+In horizontal scrollbars these keys have no effect.
+
+=item [10]
+
+In horizontal scrollbars the Up and Down keys have the same behavior
+as mouse clicks over B<arrow1> and B<arrow2>, respectively.
+In vertical scrollbars these keys have no effect.
+
+=item [11]
+
+In horizontal scrollbars Control-Up and Control-Down have the same
+behavior as mouse clicks over B<trough1> and B<trough2>, respectively.
+In vertical scrollbars these keys have no effect.
+
+=item [12]
+
+The Prior and Next keys have the same behavior
+as mouse clicks over B<trough1> and B<trough2>, respectively.
+
+=item [13]
+
+The Home key adjusts the view to the top (left edge) of the document.
+
+=item [14]
+
+The End key adjusts the view to the bottom (right edge) of the document.
+
+=back
+
+=head1 SEE ALSO
+
+L<Tk::callbacks|Tk::callbacks>
+L<Tk::Scrolled|Tk::Scrolled>
+
+=head1 KEYWORDS
+
+scrollbar, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Scrolled.pod b/Master/tlpkg/tlperl/lib/Tk/Scrolled.pod
new file mode 100644
index 00000000000..cd6c648ef5e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Scrolled.pod
@@ -0,0 +1,86 @@
+=head1 NAME
+
+Tk::Scrolled - Create a widget with attached scrollbar(s)
+
+=for category Derived Widgets
+
+=for index_group Perl/Tk Constructs
+
+=head1 SYNOPSIS
+
+S< >I<$whatever> = I<$parent>-E<gt>B<Scrolled>(I<Whatever> ?,B<-scrollbars>=E<gt>I<where>? ?,...?);
+
+=head1 DESCRIPTION
+
+To stop a flood of B<ScrlWhatever> widgets Perl/Tk introcuded the special
+constructor B<Scrolled>. B<Scrolled> creates a widget of the given Class
+I<Whatever> with attached L<scrollbar(s)|Tk::Scrollbar>.
+
+=head1 OPTIONS
+
+All options beside B<-scrollbars> explained below are passed to
+the I<Whatever> widget constructor.
+
+=over 4
+
+=item -scrollbars
+
+Expects as argument the position where the scrollbars should be
+created: B<w>, B<e> or B<n>, B<s> or a combination of
+them. If the one or both positions are prefixed with B<o> the
+scrollbar will only show up if there is a 'real' need to scroll.
+
+=back
+
+=head1 ADVERTISED SUBWIDGETS
+
+See L<Tk::mega/"Subwidget"> how to use advertised widgets.
+
+=over 4
+
+=item scrolled
+
+the scrolled widget
+
+=item I<widget>
+
+same as B<scrolled> above. I<widget> is the kind of widget passed
+to scrolled as first argument in all lowercase.
+
+=item xscrollbar
+
+the B<Scrollbar> widget used for horizontal scrolling (if it exists)
+
+=item yscrollbar
+
+the B<Scrollbar> widget used for vertical scrolling (if it exists)
+
+=item corner
+
+a frame in the corner between the vertical and horizontal scrolbar
+
+=back
+
+=head1 BUGS
+
+If a widget does not support I<-{x,y}scrollcommand> options,
+B<Scrolled> does not complain if the specified widget class does
+not support them. E.g.,
+
+S< >I<$parent>->B<Scrolled>(B<'Button'>, ...)
+
+One does not get an error message or warning when one tries to
+configure scrollbars after the widget construction:
+
+S< >I<$ascrolled>->B<configure>(B<-scrollbars> => B<'e'>);
+
+=head1 SEE ALSO
+
+L<Tk::Scrollbar|Tk::Scrollbar>
+
+=head1 KEYWORDS
+
+scrolled, scrollbar
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Spinbox.pm b/Master/tlpkg/tlperl/lib/Tk/Spinbox.pm
new file mode 100644
index 00000000000..849983078af
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Spinbox.pm
@@ -0,0 +1,115 @@
+package Tk::Spinbox;
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.007'; # sprintf '4.%03d',q$Revision: #6 $ =~ /#(\d+)/;
+
+use base 'Tk::Entry';
+
+sub Tk_cmd { \&Tk::spinbox }
+
+# Also inherits Entry's methods
+Tk::Methods( "identify", "invoke", "set" );
+use Tk::Submethods ( 'selection' => ["element"] );
+
+Construct Tk::Widget 'Spinbox';
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+
+ $class->SUPER::ClassInit($mw);
+
+ $mw->bind($class, '<Up>', [invoke => 'buttonup']);
+ $mw->bind($class, '<4>', [invoke => 'buttonup']);
+ $mw->bind($class, '<Down>',[invoke => 'buttondown']);
+ $mw->bind($class, '<5>', [invoke => 'buttondown']);
+
+ return $class;
+}
+
+sub Invoke
+{
+ my ($w,$elem) = @_;
+ unless ($w->{_outside})
+ {
+ $w->invoke($elem);
+ $w->{_repeated}++;
+ }
+ my $delay = $w->cget('-repeatinterval');
+ if ($delay > 0)
+ {
+ $w->RepeatId($w->after($delay,[Invoke => $w,$elem]));
+ }
+}
+
+sub Button1
+{
+ my ($w,$x,$y) = @_;
+ my $elem = $w->identify($x,$y);
+ $w->{_element} = $elem || 'entry';
+ if ($w->{_element} eq 'entry')
+ {
+ $w->SUPER::Button1($x,$y);
+ }
+ elsif ($w->cget('-state') ne 'disabled')
+ {
+ $w->selectionElement($elem);
+ $w->{_repeated} = 0;
+ $w->{_outside} = 0;
+ $w->{_relief} = $w->cget("-${elem}relief");
+ $w->CancelRepeat;
+ my $delay = $w->cget('-repeatdelay');
+ $w->RepeatId($w->after($delay,[Invoke => $w,$elem])) if $delay > 0;
+ }
+}
+
+sub Motion
+{
+ my ($w,$x,$y) = @_;
+ my $elem = $w->identify($x,$y);
+ $w->{_element} = $elem || 'entry' unless $w->{_element};
+ if ($w->{_element} eq 'entry')
+ {
+ $w->SUPER::Motion($x,$y);
+ }
+ else
+ {
+ if (!defined($elem) || $elem ne $w->{_element})
+ {
+ # Moved outside the button
+ unless ($w->{_outside})
+ {
+ $w->{_outside} = 1;
+ $w->selectionElement('none');
+ }
+ }
+ elsif ($w->{_outside})
+ {
+ # Moved back over the button
+ $w->selectionElement($elem);
+ $w->{_outside} = 0;
+ }
+ }
+}
+
+sub Button1Release
+{
+ my ($w,$x,$y) = @_;
+ $w->SUPER::Button1Release($x,$y);
+ my $elem = $w->{_element};
+ if (defined($elem) && $elem ne 'entry')
+ {
+ my $repeated = $w->{_repeated};
+ if (defined($repeated) && !$repeated)
+ {
+ $w->invoke($elem);
+ }
+ my $relief = delete $w->{_relief};
+ $w->configure("-${elem}relief",$relief) if $relief
+ }
+ $w->selectionElement('none');
+}
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Spinbox.pod b/Master/tlpkg/tlperl/lib/Tk/Spinbox.pod
new file mode 100644
index 00000000000..b18b7e1b9ae
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Spinbox.pod
@@ -0,0 +1,819 @@
+# Copyright (c) 2000 Jeffrey Hobbs.
+# Copyright (c) 2000 Ajuba Solutions.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# RCS: @(#) $Id: spinbox.n,v 1.3 2001/12/18 23:02:35 hobbs Exp $
+
+=head1 NAME
+
+Tk::Spinbox - Create and manipulate Spinbox widgets
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+I<$spinbox> = I<$parent>-E<gt>Spinbox(?I<options>?);
+
+ -activebackground -highlightthickness -repeatinterval
+ -background -insertbackground -selectbackground
+ -borderwidth -insertborderwidth -selectborderwidth
+ -cursor -insertontime -selectforeground
+ -exportselection -insertwidth -takefocus
+ -font -insertofftime -textvariable
+ -foreground -justify -xscrollcommand
+ -highlightbackground -relief
+ -highlightcolor -repeatdelay
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Option: B<-buttonbackground>
+
+=item Name: B<buttonBackground>
+
+=item Class: B<Background>
+
+The background color to be used for the spin buttons.
+
+=item Option: B<-buttoncursor>
+
+=item Name: B<buttonCursor>
+
+=item Class: B<Cursor>
+
+The cursor to be used when over the spin buttons. If this is empty
+(the default), a default cursor will be used.
+
+=item Option: B<-buttondownrelief>
+
+=item Name: B<buttonDownRelief>
+
+=item Class: B<Relief>
+
+The relief to be used for the upper spin button.
+
+=item Option: B<-buttonuprelief>
+
+=item Name: B<buttonUpRelief>
+
+=item Class: B<Relief>
+
+The relief to be used for the lower spin button.
+
+=item Option: B<-command>
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+Specifies a Perl/Tk callback to invoke whenever a Spinbutton is invoked.
+The callback has these two arguments I<appended> to any existing callback
+arguments: the current value of the widget and the direction of the button
+press (B<up> or B<down>).
+
+=item Option: B<-disabledbackground>
+
+=item Name: B<disabledBackground>
+
+=item Class: B<DisabledBackground>
+
+Specifies the background color to use when the Spinbox is disabled. If
+this option is the empty string, the normal background color is used.
+
+=item Option: B<-disabledforeground>
+
+=item Name: B<disabledForeground>
+
+=item Class: B<DisabledForeground>
+
+Specifies the foreground color to use when the Spinbox is disabled. If
+this option is the empty string, the normal foreground color is used.
+
+=item Option: B<-format>
+
+=item Name: B<format>
+
+=item Class: B<Format>
+
+Specifies an alternate format to use when setting the string value
+when using the B<-from> and B<-to> range.
+This must be a format specifier of the form B<%E<lt>padE<gt>.E<lt>padE<gt>f>,
+as it will format a floating-point number.
+
+=item Option: B<-from>
+
+=item Name: B<from>
+
+=item Class: B<From>
+
+A floating-point value corresponding to the lowest value for a Spinbox, to
+be used in conjunction with B<-to> and B<-increment>. When all
+are specified correctly, the Spinbox will use these values to control its
+contents. This value must be less than the B<-to> option.
+If B<-values> is specified, it supercedes this option.
+
+=item Option: B<-invalidcommand>
+
+=item Alias: B<-invcmd>
+
+=item Name: B<invalidCommand>
+
+=item Class: B<InvalidCommand>
+
+Specifies a script to eval when B<validateCommand> returns 0. Setting
+it to an empty string disables this feature (the default). The best use of
+this option is to set it to I<bell>. See B<Validation> below for
+more information.
+
+=item Option: B<-increment>
+
+=item Name: B<increment>
+
+=item Class: B<Increment>
+
+A floating-point value specifying the increment. When used with
+B<-from> and B<-to>, the value in the widget will be adjusted by
+B<-increment> when a spin button is pressed (up adds the value,
+down subtracts the value).
+
+=item Option: B<-readonlybackground>
+
+=item Name: B<readonlyBackground>
+
+=item Class: B<ReadonlyBackground>
+
+Specifies the background color to use when the Spinbox is readonly. If
+this option is the empty string, the normal background color is used.
+
+=item Option: B<-state>
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+Specifies one of three states for the Spinbox: B<normal>,
+B<disabled>, or B<readonly>. If the Spinbox is readonly, then the
+value may not be changed using methods and no insertion cursor
+will be displayed, even if the input focus is in the widget; the
+contents of the widget may still be selected. If the Spinbox is
+disabled, the value may not be changed, no insertion cursor will be
+displayed, the contents will not be selectable, and the Spinbox may
+be displayed in a different color, depending on the values of the
+B<-disabledforeground> and B<-disabledbackground> options.
+
+=item Option: B<-to>
+
+=item Name: B<to>
+
+=item Class: B<To>
+
+A floating-point value corresponding to the highest value for the Spinbox,
+to be used in conjunction with B<-from> and B<-increment>. When
+all are specified correctly, the Spinbox will use these values to control
+its contents. This value must be greater than the B<-from> option.
+If B<-values> is specified, it supercedes this option.
+
+=item Option: B<-validate>
+
+=item Name: B<validate>
+
+=item Class: B<Validate>
+
+Specifies the mode in which validation should operate: B<none>,
+B<focus>, B<focusin>, B<focusout>, B<key>, or B<all>.
+It defaults to B<none>. When you want validation, you must explicitly
+state which mode you wish to use. See B<Validation> below for more.
+
+=item Option: B<-validatecommand>
+
+=item Alias: B<-vcmd>
+
+=item Name: B<validateCommand>
+
+=item Class: B<ValidateCommand>
+
+Specifies a script to evaluate when you want to validate the input in the
+widget. Setting it to an empty string disables this feature (the default).
+Validation occurs according to the value of B<-validate>.
+This command must return a valid boolean value. If it returns 0 (or
+the valid boolean equivalent) then the value of the widget will not
+change and the B<invalidCommand> will be evaluated if it is set. If it
+returns 1, then value will be changed.
+See B<Validation> below for more information.
+
+=item Option: B<-values>
+
+=item Name: B<values>
+
+=item Class: B<Values>
+
+Must be a proper list value. If specified, the Spinbox will use these
+values as to control its contents, starting with the first value. This
+option has precedence over the B<-from> and B<-to> range.
+
+=item Option: B<-width>
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+Specifies an integer value indicating the desired width of the Spinbox window,
+in average-size characters of the widget's font.
+If the value is less than or equal to zero, the widget picks a
+size just large enough to hold its current text.
+
+=item Option: B<-wrap>
+
+=item Name: B<wrap>
+
+=item Class: B<Wrap>
+
+Must be a proper boolean value. If on, the Spinbox will wrap around the
+values of data in the widget.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Spinbox> method creates a new window (given by the
+$spinbox argument) and makes it into a Spinbox widget.
+Additional options, described above, may be specified on the
+command line or in the option database
+to configure aspects of the Spinbox such as its colors, font,
+and relief.
+
+A B<Spinbox> is an extended B<Entry> widget that allows he user
+to move, or spin, through a fixed set of ascending or descending values
+such as times or dates in addition to editing the value as in an
+B<entry>. When first created, a Spinbox's string is empty.
+A portion of the Spinbox may be selected as described below.
+If a Spinbox is exporting its selection (see the B<exportSelection>
+option), then it will observe the standard protocols for handling the
+selection; Spinbox selections are available as type B<STRING>.
+Spinboxes also observe the standard Tk rules for dealing with the
+input focus. When a Spinbox has the input focus it displays an
+I<insertion cursor> to indicate where new characters will be
+inserted.
+
+Spinboxes are capable of displaying strings that are too long to
+fit entirely within the widget's window. In this case, only a
+portion of the string will be displayed; commands described below
+may be used to change the view in the window. Spinboxes use
+the standard B<-xscrollcommand> mechanism for interacting with
+scrollbars (see the description of the B<-xscrollcommand> option
+for details). They also support scanning, as described below.
+
+=head1 VALIDATION
+
+Validation works by setting the B<validateCommand>
+option to a callback which will be evaluated according to the B<validate>
+option as follows:
+
+=over 4
+
+=item B<none>
+
+Default. This means no validation will occur.
+
+=item B<focus>
+
+B<validateCommand> will be called when the Spinbox receives or
+loses focus.
+
+=item B<focusin>
+
+B<validateCommand> will be called when the Spinbox receives focus.
+
+=item B<focusout>
+
+B<validateCommand> will be called when the Spinbox loses focus.
+
+=item B<key>
+
+B<validateCommand> will be called when the Spinbox is edited.
+
+=item B<all>
+
+B<validateCommand> will be called for all above conditions.
+
+
+The B<validateCommand> and B<invalidCommand> callbacks are invoked
+with at least 5 positional arguments, which are I<appended> to any already
+existing callback arguments:
+
+=over 4
+
+=item * 1
+
+The proposed value of the entry. If you are configuring the
+entry widget to have a new textVariable, this will be the value of that
+textVariable.
+
+=item * 2
+
+The characters to be added (or deleted). This will be C<undef>
+if validation is due to focus, explcit call to validate or if change
+is due to C<-textvariable> changing.
+
+=item * 3
+
+The current value of entry i.e. before the proposed change.
+
+=item * 4
+
+The index of character string to be added/deleted, if any. Otherwise -1.
+
+=item * 5
+
+Type of action. 1 == INSERT, 0 == DELETE,
+-1 if it's a forced validation or textVariable validation.
+
+=back
+
+In general, the B<textVariable> and B<validateCommand> can be
+dangerous to mix. Any problems have been overcome so that using the
+B<validateCommand> will not interfere with the traditional behavior of
+the Spinbox widget. Using the B<textVariable> for read-only purposes will
+never cause problems. The danger comes when you try set the
+B<textVariable> to something that the B<validateCommand> would not
+accept, which causes B<validate> to become I<none> (the
+B<invalidCommand> will not be triggered). The same happens
+when an error occurs evaluating the B<validateCommand>.
+
+Primarily, an error will occur when the B<validateCommand> or
+B<invalidCommand> encounters an error in its script while evaluating or
+B<validateCommand> does not return a valid boolean value. The
+B<validate> option will also set itself to B<none> when you edit the
+Spinbox widget from within either the B<validateCommand> or the
+B<invalidCommand>. Such editions will override the one that was being
+validated. If you wish to edit the value of the widget
+during validation and still have the B<validate> option set, you should
+include the command
+
+ my $val = $spinbox->cget(-validate);
+ $spinbox->configure(-validate => $val);
+
+in the B<validateCommand> or B<invalidCommand> (whichever one you
+were editing the Spinbox widget from). It is also recommended to not set an
+associated B<textVariable> during validation, as that can cause the
+Spinbox widget to become out of sync with the B<textVariable>.
+
+=back
+
+=head1 WIDGET METHODS
+
+The B<Spinbox> command creates a widget object whose
+name is $widget. This command may be used to invoke various
+operations on the widget. It has the following general form:
+
+ $widget->method(?arg arg ...?);
+
+Many of the methods for Spinboxes take one or more indices as
+arguments. An index specifies a particular character in the Spinbox's
+string, in any of the following ways:
+
+=over 4
+
+=item I<number>
+
+Specifies the character as a numerical index, where 0 corresponds
+to the first character in the string.
+
+=item B<anchor>
+
+Indicates the anchor point for the selection, which is set with the
+B<select from> and B<select adjust> methods.
+
+=item B<end>
+
+Indicates the character just after the last one in the Spinbox's string.
+This is equivalent to specifying a numerical index equal to the length
+of the Spinbox's string.
+
+=item B<insert>
+
+Indicates the character adjacent to and immediately following the
+insertion cursor.
+
+=item B<sel.first>
+
+Indicates the first character in the selection. It is an error to
+use this form if the selection isn't in the Spinbox window.
+
+=item B<sel.last>
+
+Indicates the character just after the last one in the selection.
+It is an error to use this form if the selection isn't in the
+Spinbox window.
+
+=item B<@>I<number>
+
+In this form, I<number> is treated as an x-coordinate in the
+Spinbox's window; the character spanning that x-coordinate is used.
+For example, ``B<@0>'' indicates the left-most character in the
+window.
+
+=back
+
+Abbreviations may be used for any of the forms above, e.g. ``B<e>''
+or ``B<sel.f>''. In general, out-of-range indices are automatically
+rounded to the nearest legal value.
+
+The following commands are possible for Spinbox widgets:
+
+=over 4
+
+=item I<$widget>-E<gt>B<bbox>(I<index>);
+
+Returns a list of four numbers describing the bounding box of the
+character given by I<index>.
+The first two elements of the list give the x and y coordinates of
+the upper-left corner of the screen area covered by the character
+(in pixels relative to the widget) and the last two elements give
+the width and height of the character, in pixels.
+The bounding box may refer to a region outside the visible area
+of the window.
+
+=item I<$widget>-E<gt>B<cget>(I<option>);
+
+Returns the current value of the configuration option given
+by I<option>.
+I<Option> may have any of the values accepted by the B<Spinbox>
+command.
+
+=item I<$widget>-E<gt>B<configure>(?I<option>?, ?I<value, option, value, ...>?);
+
+Query or modify the configuration options of the widget.
+If no I<option> is specified, returns a list describing all of
+the available options for $widget (see L<Tk::configure> for
+information on the format of this list). If I<option> is specified
+with no I<value>, then the command returns a list describing the
+one named option (this list will be identical to the corresponding
+sublist of the value returned if no I<option> is specified). If
+one or more I<option-value> pairs are specified, then the command
+modifies the given widget option(s) to have the given value(s); in
+this case the command returns an empty string.
+I<Option> may have any of the values accepted by the B<Spinbox>
+command.
+
+=item I<$widget>-E<gt>B<delete>(I<first, >?I<last>?);
+
+Delete one or more elements of the Spinbox.
+I<First> is the index of the first character to delete, and
+I<last> is the index of the character just after the last
+one to delete.
+If I<last> isn't specified it defaults to I<first>+1,
+i.e. a single character is deleted.
+This command returns an empty string.
+
+=item I<$widget>-E<gt>B<get>;
+
+Returns the Spinbox's string.
+
+=item I<$widget>-E<gt>B<icursor>(I<index>);
+
+Arrange for the insertion cursor to be displayed just before the character
+given by I<index>. Returns an empty string.
+
+=item I<$widget>-E<gt>B<identify>(I<x, y>);
+
+Returns the name of the window element corresponding to coordinates
+I<x> and I<y> in the Spinbox. Return value is one of:
+B<none>, B<buttondown>, B<buttonup>, B<entry>.
+
+=item I<$widget>-E<gt>B<index>(I<index>);
+
+Returns the numerical index corresponding to I<index>.
+
+=item I<$widget>-E<gt>B<insert>(I<index, string>);
+
+Insert the characters of I<string> just before the character
+indicated by I<index>. Returns an empty string.
+
+=item I<$widget>-E<gt>B<invoke>(I<element>);
+
+Causes the specified element, either B<buttondown> or B<buttonup>,
+to be invoked, triggering the action associated with it.
+
+=item I<$widget>-E<gt>B<scan>(I<option, args>);
+
+This command is used to implement scanning on Spinboxes. It has
+two forms, depending on I<option>:
+
+=over 4
+
+=item I<$widget>-E<gt>B<scanMark>(I<x>);
+
+Records I<x> and the current view in the Spinbox window; used in
+conjunction with later B<scan dragto> commands. Typically this
+command is associated with a mouse button press in the widget. It
+returns an empty string.
+
+=item I<$widget>-E<gt>B<scanDragto>(I<x>);
+
+This command computes the difference between its I<x> argument
+and the I<x> argument to the last B<scan mark> command for
+the widget. It then adjusts the view left or right by 10 times the
+difference in x-coordinates. This command is typically associated
+with mouse motion events in the widget, to produce the effect of
+dragging the Spinbox at high speed through the window. The return
+value is an empty string.
+
+=back
+
+=item I<$widget>-E<gt>B<selection>(I<option, arg>);
+
+This command is used to adjust the selection within a Spinbox. It
+has several forms, depending on I<option>:
+
+=over 4
+
+=item I<$widget>-E<gt>B<selectionAdjust>(I<index>);
+
+Locate the end of the selection nearest to the character given by
+I<index>, and adjust that end of the selection to be at I<index>
+(i.e including but not going beyond I<index>). The other
+end of the selection is made the anchor point for future
+B<select to> commands. If the selection
+isn't currently in the Spinbox, then a new selection is created to
+include the characters between I<index> and the most recent
+selection anchor point, inclusive.
+Returns an empty string.
+
+=item I<$widget>-E<gt>B<selectionClear>;
+
+Clear the selection if it is currently in this widget. If the
+selection isn't in this widget then the command has no effect.
+Returns an empty string.
+
+=item I<$widget>-E<gt>B<selectionElement>(?I<element>?);
+
+Sets or gets the currently selected element. If a spinbutton element
+is specified, it will be displayed depressed.
+
+=item I<$widget>-E<gt>B<selectionFrom>(I<index>);
+
+Set the selection anchor point to just before the character
+given by I<index>. Doesn't change the selection.
+Returns an empty string.
+
+=item I<$widget>-E<gt>B<selectionPresent>;
+
+Returns 1 if there is are characters selected in the Spinbox,
+0 if nothing is selected.
+
+=item I<$widget>-E<gt>B<selectionRange>(I<start, >I<end>);
+
+Sets the selection to include the characters starting with
+the one indexed by I<start> and ending with the one just
+before I<end>.
+If I<end> refers to the same character as I<start> or an
+earlier one, then the Spinbox's selection is cleared.
+
+=item I<$widget>-E<gt>B<selectionTo>(I<index>);
+
+If I<index> is before the anchor point, set the selection
+to the characters from I<index> up to but not including
+the anchor point.
+If I<index> is the same as the anchor point, do nothing.
+If I<index> is after the anchor point, set the selection
+to the characters from the anchor point up to but not including
+I<index>.
+The anchor point is determined by the most recent B<select from>
+or B<select adjust> command in this widget.
+If the selection isn't in this widget then a new selection is
+created using the most recent anchor point specified for the widget.
+Returns an empty string.
+
+=back
+
+=item I<$widget>-E<gt>B<set>(?I<string>?);
+
+If I<string> is specified, the Spinbox will try and set it to this
+value, otherwise it just returns the Spinbox's string.
+If validation is on, it will occur when setting the string.
+
+=item I<$widget>-E<gt>B<validate>;
+
+This command is used to force an evaluation of the B<validateCommand>
+independent of the conditions specified by the B<validate> option.
+This is done by temporarily setting the B<validate> option to B<all>.
+It returns 0 or 1.
+
+=item I<$widget>-E<gt>B<xview>(I<args>);
+
+This command is used to query and change the horizontal position of the
+text in the widget's window. It can take any of the following
+forms:
+
+=over 4
+
+=item I<$widget>-E<gt>B<xview>;
+
+Returns a list containing two elements.
+Each element is a real fraction between 0 and 1; together they describe
+the horizontal span that is visible in the window.
+For example, if the first element is .2 and the second element is .6,
+20% of the Spinbox's text is off-screen to the left, the middle 40% is visible
+in the window, and 40% of the text is off-screen to the right.
+These are the same values passed to scrollbars via the B<-xscrollcommand>
+option.
+
+=item I<$widget>-E<gt>B<xview>(I<index>);
+
+Adjusts the view in the window so that the character given by I<index>
+is displayed at the left edge of the window.
+
+=item I<$widget>-E<gt>B<xviewMoveto>(I<fraction>);
+
+Adjusts the view in the window so that the character I<fraction> of the
+way through the text appears at the left edge of the window.
+I<Fraction> must be a fraction between 0 and 1.
+
+=item I<$widget>-E<gt>B<xviewScroll>(I<number, what>);
+
+This command shifts the view in the window left or right according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages> or an abbreviation
+of one of these.
+If I<what> is B<units>, the view adjusts left or right by
+I<number> average-width characters on the display; if it is
+B<pages> then the view adjusts by I<number> screenfuls.
+If I<number> is negative then characters farther to the left
+become visible; if it is positive then characters farther to the right
+become visible.
+
+=back
+
+=back
+
+=head1 DEFAULT BINDINGS
+
+Tk automatically creates class bindings for Spinboxes that give them
+the following default behavior.
+In the descriptions below, ``word'' refers to a contiguous group
+of letters, digits, or ``_'' characters, or any single character
+other than these.
+
+=over 4
+
+=item [1]
+
+Clicking mouse button 1 positions the insertion cursor
+just before the character underneath the mouse cursor, sets the
+input focus to this widget, and clears any selection in the widget.
+Dragging with mouse button 1 strokes out a selection between
+the insertion cursor and the character under the mouse.
+
+=item [2]
+
+Double-clicking with mouse button 1 selects the word under the mouse
+and positions the insertion cursor at the beginning of the word.
+Dragging after a double click will stroke out a selection consisting
+of whole words.
+
+=item [3]
+
+Triple-clicking with mouse button 1 selects all of the text in the
+Spinbox and positions the insertion cursor before the first character.
+
+=item [4]
+
+The ends of the selection can be adjusted by dragging with mouse
+button 1 while the Shift key is down; this will adjust the end
+of the selection that was nearest to the mouse cursor when button
+1 was pressed.
+If the button is double-clicked before dragging then the selection
+will be adjusted in units of whole words.
+
+=item [5]
+
+Clicking mouse button 1 with the Control key down will position the
+insertion cursor in the Spinbox without affecting the selection.
+
+=item [6]
+
+If any normal printing characters are typed in a Spinbox, they are
+inserted at the point of the insertion cursor.
+
+=item [7]
+
+The view in the Spinbox can be adjusted by dragging with mouse button 2.
+If mouse button 2 is clicked without moving the mouse, the selection
+is copied into the Spinbox at the position of the mouse cursor.
+
+=item [8]
+
+If the mouse is dragged out of the Spinbox on the left or right sides
+while button 1 is pressed, the Spinbox will automatically scroll to
+make more text visible (if there is more text off-screen on the side
+where the mouse left the window).
+
+=item [9]
+
+The Left and Right keys move the insertion cursor one character to the
+left or right; they also clear any selection in the Spinbox and set
+the selection anchor.
+If Left or Right is typed with the Shift key down, then the insertion
+cursor moves and the selection is extended to include the new character.
+Control-Left and Control-Right move the insertion cursor by words, and
+Control-Shift-Left and Control-Shift-Right move the insertion cursor
+by words and also extend the selection.
+Control-b and Control-f behave the same as Left and Right, respectively.
+Meta-b and Meta-f behave the same as Control-Left and Control-Right,
+respectively.
+
+=item [10]
+
+The Home key, or Control-a, will move the insertion cursor to the
+beginning of the Spinbox and clear any selection in the Spinbox.
+Shift-Home moves the insertion cursor to the beginning of the Spinbox
+and also extends the selection to that point.
+
+=item [11]
+
+The End key, or Control-e, will move the insertion cursor to the
+end of the Spinbox and clear any selection in the Spinbox.
+Shift-End moves the cursor to the end and extends the selection
+to that point.
+
+=item [12]
+
+The Select key and Control-Space set the selection anchor to the position
+of the insertion cursor. They don't affect the current selection.
+Shift-Select and Control-Shift-Space adjust the selection to the
+current position of the insertion cursor, selecting from the anchor
+to the insertion cursor if there was not any selection previously.
+
+=item [13]
+
+Control-/ selects all the text in the Spinbox.
+
+=item [14]
+
+Control-\ clears any selection in the Spinbox.
+
+=item [15]
+
+The F16 key (labelled Copy on many Sun workstations) or Meta-w
+copies the selection in the widget to the clipboard, if there is a selection.
+
+=item [16]
+
+The F20 key (labelled Cut on many Sun workstations) or Control-w
+copies the selection in the widget to the clipboard and deletes
+the selection.
+If there is no selection in the widget then these keys have no effect.
+
+=item [17]
+
+The F18 key (labelled Paste on many Sun workstations) or Control-y
+inserts the contents of the clipboard at the position of the
+insertion cursor.
+
+=item [18]
+
+The Delete key deletes the selection, if there is one in the Spinbox.
+If there is no selection, it deletes the character to the right of
+the insertion cursor.
+
+=item [19]
+
+The BackSpace key and Control-h delete the selection, if there is one
+in the Spinbox.
+If there is no selection, it deletes the character to the left of
+the insertion cursor.
+
+=item [20]
+
+Control-d deletes the character to the right of the insertion cursor.
+
+=item [21]
+
+Meta-d deletes the word to the right of the insertion cursor.
+
+=item [22]
+
+Control-k deletes all the characters to the right of the insertion
+cursor.
+
+=item [23]
+
+Control-t reverses the order of the two characters to the right of
+the insertion cursor.
+
+If the Spinbox is disabled using the B<-state> option, then the Spinbox's
+view can still be adjusted and text in the Spinbox can still be selected,
+but no insertion cursor will be displayed and no text modifications will
+take place.
+
+The behavior of Spinboxes can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+=back
+
+=head1 KEYWORDS
+
+Spinbox, Entry, widget
diff --git a/Master/tlpkg/tlperl/lib/Tk/Stats.pm b/Master/tlpkg/tlperl/lib/Tk/Stats.pm
new file mode 100644
index 00000000000..39bedfb1a47
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Stats.pm
@@ -0,0 +1,26 @@
+package Tk::Stats;
+
+($lu,$ls) = times;
+
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/Stats.pm#4 $
+
+sub stats
+ {
+ my ($u,$s) = times;
+ my $du = $u-$lu;
+ my $ds = $s-$ls;
+ $ls = $s;
+ $lu = $u;
+ print sprintf(' dt=%4.2f du=%4.2f ds=%4.2f',$du+$ds,$du,$ds);
+ print sprintf(' t=%4.2f u=%4.2f s=%4.2f',$u+$s,$u,$s);
+ print ' ',shift,"\n";
+ }
+
+sub import
+{
+ stats($_[1]);
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Submethods.pm b/Master/tlpkg/tlperl/lib/Tk/Submethods.pm
new file mode 100644
index 00000000000..2741611172e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Submethods.pm
@@ -0,0 +1,45 @@
+package Tk::Submethods;
+
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/Tk/Submethods.pm#4 $
+
+sub import
+{
+ my $class = shift;
+ no strict 'refs';
+ my $package = caller(0);
+ while (@_)
+ {
+ my $fn = shift;
+ my $sm = shift;
+ foreach my $sub (@{$sm})
+ {
+ my ($suffix) = $sub =~ /(\w+)$/;
+ my $pfn = $package.'::'.$fn;
+ *{$pfn."\u$suffix"} = sub { shift->$pfn($sub,@_) };
+ }
+ }
+}
+
+sub Direct
+{
+ my $class = shift;
+ no strict 'refs';
+ my $package = caller(0);
+ while (@_)
+ {
+ my $fn = shift;
+ my $sm = shift;
+ my $sub;
+ foreach $sub (@{$sm})
+ {
+ # eval "sub ${package}::${sub} { shift->$fn('$sub',\@_) }";
+ *{$package.'::'.$sub} = sub { shift->$fn($sub,@_) };
+ }
+ }
+}
+
+1;
+
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Submethods.pod b/Master/tlpkg/tlperl/lib/Tk/Submethods.pod
new file mode 100644
index 00000000000..2a83334f8b2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Submethods.pod
@@ -0,0 +1,27 @@
+
+=head1 NAME
+
+Tk::Submethods - add aliases for tk sub-commands
+
+=for pm Tk/Submethods.pm
+
+=for category Implementation
+
+=head1 SYNOPSIS
+
+ use Tk::Submethods ( 'command1' => [qw(sub1 sub2 sub3)],
+ 'command2' => [qw(sub1 sub2 sub3)]);
+
+=head1 DESCRIPTION
+
+Creates C<-E<gt>commandSub(...)> as an alias for C<-E<gt>command('sub',...)>
+e.g. C<-E<gt>grabRelease> for C<-E<gt>grab('release')>.
+
+For each command/subcommand pair this creates a closure with command
+and subcommand as bound lexical variables and assigns a reference to this
+to a 'glob' in the callers package.
+
+Someday the sub-commands may be created directly in the C code.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/SunConst.pod b/Master/tlpkg/tlperl/lib/Tk/SunConst.pod
new file mode 100644
index 00000000000..eb5d892871b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/SunConst.pod
@@ -0,0 +1,18 @@
+
+=head1 NAME
+
+Tk::DragDrop::SunConst - Constants for Sun's Drag&Drop protocol
+
+=for pm DragDrop/DragDrop/SunConst.pm
+
+=for category Experimental Modules
+
+=head1 DESCRIPTION
+
+This module defines symbolic name subs for the numeric constants that
+make up Sun's Drag&Drop protocol. They are in this module with Exporter
+as they are shared between the two halves (Dropper and Receiver) of
+the protocol.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/TList.pm b/Master/tlpkg/tlperl/lib/Tk/TList.pm
new file mode 100644
index 00000000000..65ce18796bb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TList.pm
@@ -0,0 +1,416 @@
+package Tk::TList;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/TList/TList.pm#6 $
+
+use Tk qw(Ev $XS_VERSION);
+
+use base qw(Tk::Widget);
+
+use strict;
+
+Construct Tk::Widget 'TList';
+
+bootstrap Tk::TList;
+
+sub Tk_cmd { \&Tk::tlist }
+
+Tk::Methods qw(insert index anchor delete dragsite dropsite entrycget
+ entryconfigure info nearest see selection xview yview);
+
+use Tk::Submethods ( 'delete' => [qw(all entry offsprings siblings)],
+ 'info' => [qw(anchor dragsite dropsite selection)],
+ 'selection' => [qw(clear get includes set)],
+ 'anchor' => [qw(clear set)],
+ 'dragsite' => [qw(clear set)],
+ 'dropsite' => [qw(clear set)],
+ );
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+
+ $mw->bind($class,'<ButtonPress-1>',[ 'Button1' ] );
+ $mw->bind($class,'<Shift-ButtonPress-1>',[ 'ShiftButton1' ] );
+ $mw->bind($class,'<Control-ButtonRelease-1>','Control_ButtonRelease_1');
+ $mw->bind($class,'<ButtonRelease-1>','ButtonRelease_1');
+ $mw->bind($class,'<B1-Motion>',[ 'Button1Motion' ] );
+ $mw->bind($class,'<B1-Leave>',[ 'AutoScan' ] );
+
+ $mw->bind($class,'<Double-ButtonPress-1>',['Double1']);
+
+ $mw->bind($class,'<Control-B1-Motion>','Control_B1_Motion');
+ $mw->bind($class,'<Control-ButtonPress-1>',['CtrlButton1']);
+ $mw->bind($class,'<Control-Double-ButtonPress-1>',['CtrlButton1']);
+
+ $mw->bind($class,'<B1-Enter>','B1_Enter');
+
+ $mw->bind($class,'<Up>', ['DirKey', 'up']);
+ $mw->bind($class,'<Down>',['DirKey', 'down']);
+
+ $mw->bind($class,'<Left>', ['DirKey', 'left']);
+ $mw->bind($class,'<Right>',['DirKey', 'right']);
+
+ $mw->bind($class,'<Prior>','Prior');
+ $mw->bind($class,'<Next>','Next');
+
+ $mw->bind($class,'<Return>', ['KeyboardActivate']);
+ $mw->bind($class,'<space>', ['KeyboardBrowse']);
+
+ return $class;
+}
+
+sub Control_ButtonRelease_1
+{
+}
+
+
+sub ButtonRelease_1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->CancelRepeat
+ if($w->cget('-selectmode') ne 'dragdrop');
+ $w->ButtonRelease1($Ev);
+}
+
+
+sub Control_B1_Motion
+{
+}
+
+
+sub B1_Enter
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->CancelRepeat
+ if($w->cget('-selectmode') ne 'dragdrop');
+}
+
+
+sub Prior
+{
+shift->yview('scroll', -1, 'pages')
+}
+
+
+sub Next
+{
+shift->yview('scroll', 1, 'pages')
+}
+
+
+sub Button1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ delete $w->{'shiftanchor'};
+
+ $w->focus()
+ if($w->cget('-takefocus'));
+
+ my $mode = $w->cget('-selectmode');
+
+ if ($mode eq 'dragdrop')
+ {
+ # $w->Send_WaitDrag($Ev->y);
+ return;
+ }
+
+ my $ent = $w->GetNearest($Ev->x, $Ev->y);
+
+ return unless defined $ent;
+
+ my $browse = 0;
+
+ if($mode eq 'single')
+ {
+ $w->anchor('set', $ent);
+ }
+ elsif($mode eq 'browse')
+ {
+ $w->anchor('set', $ent);
+ $w->selection('clear' );
+ $w->selection('set', $ent);
+ $browse = 1;
+ }
+ elsif($mode eq 'multiple')
+ {
+ $w->selection('clear');
+ $w->anchor('set', $ent);
+ $w->selection('set', $ent);
+ $browse = 1;
+ }
+ elsif($mode eq 'extended')
+ {
+ $w->anchor('set', $ent);
+ $w->selection('clear');
+ $w->selection('set', $ent);
+ $browse = 1;
+ }
+
+ $w->Callback(-browsecmd => $ent) if ($browse);
+}
+
+sub ShiftButton1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ my $to = $w->GetNearest($Ev->x,$Ev->y);
+
+ delete $w->{'shiftanchor'};
+
+ return unless defined $to;
+
+ my $mode = $w->cget('-selectmode');
+
+ if ($mode eq 'extended')
+ {
+ my $from = $w->info('anchor');
+ if (defined $from)
+ {
+ $w->selection('clear');
+ $w->selection('set', $from, $to);
+ }
+ else
+ {
+ $w->anchor('set', $to);
+ $w->selection('clear');
+ $w->selection('set', $to);
+ }
+ }
+}
+
+sub GetNearest
+{
+ my ($w,$x,$y) = @_;
+ my $ent = $w->nearest($x,$y);
+ if (defined $ent)
+ {
+ my $state = $w->entrycget($ent, '-state');
+ return $ent if (!defined($state) || $state ne 'disabled');
+ }
+ return undef;
+}
+
+sub ButtonRelease1
+{
+ my ($w, $Ev) = @_;
+
+ delete $w->{'shiftanchor'};
+
+ my $mode = $w->cget('-selectmode');
+
+ if($mode eq 'dragdrop')
+ {
+# $w->Send_DoneDrag();
+ return;
+ }
+
+ my ($x, $y) = ($Ev->x, $Ev->y);
+ my $ent = $w->GetNearest($x,$y);
+
+ return unless defined $ent;
+
+ if($x < 0 || $y < 0 || $x > $w->width || $y > $w->height)
+ {
+ $w->selection('clear');
+
+ return if($mode eq 'single' || $mode eq 'browse')
+
+ }
+ else
+ {
+ if($mode eq 'single' || $mode eq 'browse')
+ {
+ $w->anchor('set', $ent);
+ $w->selection('clear');
+ $w->selection('set', $ent);
+
+ }
+ elsif($mode eq 'multiple')
+ {
+ $w->selection('set', $ent);
+ }
+ elsif($mode eq 'extended')
+ {
+ $w->selection('set', $ent);
+ }
+ }
+
+ $w->Callback(-browsecmd =>$ent);
+}
+
+sub Button1Motion
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ delete $w->{'shiftanchor'};
+
+ my $mode = $w->cget('-selectmode');
+
+ if ($mode eq 'dragdrop')
+ {
+# $w->Send_StartDrag();
+ return;
+ }
+
+ my $ent = $w->GetNearest($Ev->x,$Ev->y);
+
+ return unless defined $ent;
+
+ if($mode eq 'single')
+ {
+ $w->anchor('set', $ent);
+ }
+ elsif($mode eq 'multiple' || $mode eq 'extended')
+ {
+ my $from = $w->info('anchor');
+ if (defined $from)
+ {
+ $w->selection('clear');
+ $w->selection('set', $from, $ent);
+ }
+ else
+ {
+ $w->anchor('set', $ent);
+ $w->selection('clear');
+ $w->selection('set', $ent);
+ }
+ }
+
+ if($mode ne 'single')
+ {
+ $w->Callback(-browsecmd =>$ent);
+ }
+}
+
+sub Double1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ delete $w->{'shiftanchor'};
+
+ my $ent = $w->GetNearest($Ev->x,$Ev->y);
+
+ return unless defined $ent;
+
+ $w->anchor('set', $ent) unless defined($w->info('anchor'));
+
+ $w->selection('set', $ent);
+ $w->Callback(-command => $ent);
+}
+
+sub CtrlButton1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+
+ delete $w->{'shiftanchor'};
+
+ my $ent = $w->GetNearest($Ev->x,$Ev->y);
+
+ return unless defined $ent;
+
+ my $mode = $w->cget('-selectmode');
+
+ if($mode eq 'extended')
+ {
+ $w->anchor('set', $ent) unless defined( $w->info('anchor') );
+
+ if($w->selection('includes', $ent))
+ {
+ $w->selection('clear', $ent);
+ }
+ else
+ {
+ $w->selection('set', $ent);
+ }
+ $w->Callback(-browsecmd =>$ent);
+ }
+}
+
+sub DirKey
+{
+ my ($w,$dir) = @_;
+ my $anchor = $w->info('anchor');
+
+ my $new = (defined $anchor) ? $w->info($dir,$anchor) : 0;
+
+ $w->anchorSet($new);
+ $w->see($new);
+}
+
+sub KeyboardActivate
+{
+ my $w = shift;
+
+ my $anchor = $w->info('anchor');
+
+ return unless defined $anchor;
+
+ if($w->cget('-selectmode'))
+ {
+ $w->selection('clear');
+ $w->selection('set', $anchor);
+ }
+ $w->Callback(-command => $anchor);
+}
+
+sub KeyboardBrowse
+{
+ my $w = shift;
+
+ my $anchor = $w->info('anchor');
+
+ return unless defined $anchor;
+
+ if($w->cget('-selectmode'))
+ {
+ $w->selection('clear');
+ $w->selection('set', $anchor);
+ }
+ $w->Callback(-browsecmd =>$anchor);
+}
+
+sub AutoScan
+{
+ my $w = shift;
+
+ return if($w->cget('-selectmode') eq 'dragdrop');
+
+ my $Ev = $w->XEvent;
+ my $y = $Ev->y;
+ my $x = $Ev->x;
+
+ if($y >= $w->height)
+ {
+ $w->yview('scroll', 1, 'units');
+ }
+ elsif($y < 0)
+ {
+ $w->yview('scroll', -1, 'units');
+ }
+ elsif($x >= $w->width)
+ {
+ $w->xview('scroll', 2, 'units');
+ }
+ elsif($x < 0)
+ {
+ $w->xview('scroll', -2, 'units');
+ }
+ else
+ {
+ return;
+ }
+ $w->RepeatId($w->after(50,[AutoScan => $w]));
+ $w->Button1Motion;
+}
+
+1;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/TList.pod b/Master/tlpkg/tlperl/lib/Tk/TList.pod
new file mode 100644
index 00000000000..b8937fa8ef0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TList.pod
@@ -0,0 +1,597 @@
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distribution are in the file
+# license.tcl.
+
+=head1 NAME
+
+Tk::TList - Create and manipulate Tix Tabular List widgets
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+S< >I<$tlist> = I<$parent>-E<gt>B<TList>(?I<options>?);
+
+=head1 SUPER-CLASS
+
+None.
+
+=head1 STANDARD OPTIONS
+
+B<-background> B<-borderwidth> B<-class> B<-cursor> B<-foreground>
+B<-font> B<-height> B<-highlightcolor> B<-highlightthickness>
+B<-relief> B<-selectbackground> B<-selectforeground>
+B<-xscrollcommand> B<-yscrollcommand> B<-width>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<browsecmd>
+
+=item Class: B<BrowseCmd>
+
+=item Switch: B<-browsecmd>
+
+Specifies a perl/Tk B<callback> to be executed when the user browses through the
+entries in the TList widget.
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies the perl/Tk B<callback> to be executed when the user invokes a list
+entry in the TList widget. Normally the user invokes a list
+entry by double-clicking it or pressing the Return key.
+
+=item Name: B<foreground>
+
+=item Class: B<Foreground>
+
+=item Switch: B<-foreground>
+
+=item Alias: B<-fg>
+
+Specifies the default foreground color for the list entries.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies the desired height for the window in number of characters.
+
+=item Name: B<itemType>
+
+=item Class: B<ItemType>
+
+=item Switch: B<-itemtype>
+
+Specifies the default type of display item for this TList widget. When
+you call the B<insert> methods, display items of this
+type will be created if the B<-itemtype> option is not specified.
+
+=item Name: B<orient>
+
+=item Class: B<Orient>
+
+=item Switch: B<-orient>
+
+Specifies the order of tabularizing the list entries. When set to
+"B<vertical>", the entries are arranged in a column, from top to
+bottom. If the entries cannot be contained in one column, the
+remaining entries will go to the next column, and so on. When set to
+"B<horizontal>", the entries are arranged in a row, from left to
+right. If the entries cannot be contained in one row, the remaining
+entries will go to the next row, and so on.
+
+=item Name: B<padX>
+
+=item Class: B<Pad>
+
+=item Switch: B<-padx>
+
+The default horizontal padding for list entries.
+
+=item Name: B<padY>
+
+=item Class: B<Pad>
+
+=item Switch: B<-padx>
+
+The default vertical padding for list entries.
+
+=item Name: B<selectBackground>
+
+=item Class: B<SelectBackground>
+
+=item Switch: B<-selectbackground>
+
+Specifies the background color for the selected list entries.
+
+=item Name: B<selectBorderWidth>
+
+=item Class: B<BorderWidth>
+
+=item Switch: B<-selectborderwidth>
+
+Specifies a non-negative value indicating the width of the 3-D border
+to draw around selected items. The value may have any of the forms
+acceptable to B<Tk_GetPixels>.
+
+=item Name: B<selectForeground>
+
+=item Class: B<SelectForeground>
+
+=item Switch: B<-selectforeground>
+
+Specifies the foreground color for the selected list entries.
+
+=item Name: B<selectMode>
+
+=item Class: B<SelectMode>
+
+=item Switch: B<-selectmode>
+
+Specifies one of several styles for manipulating the selection. The
+value of the option may be arbitrary, but the default bindings expect
+it to be either B<single>, B<browse>, B<multiple>, or
+B<extended>; the default value is B<single>.
+
+=item Name: B<sizeCmd>
+
+=item Class: B<SizeCmd>
+
+=item Switch: B<-sizecmd>
+
+Specifies a perl/Tk B<callback> to be called whenever the TList widget
+changes its size. This command can be useful to implement "user scroll
+bars when needed" features.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies whether the TList command should react to user actions. When
+set to "B<normal>", the TList reacts to user actions in the normal
+way. When set to "B<disabled>", the TList can only be scrolled, but
+its entries cannot be selected or activated.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired width for the window in characters.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<TList> method creates a new window (given by the
+$widget argument) and makes it into a TList widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+TList widget such as its cursor and relief.
+
+The TList widget can be used to display data in a tabular format. The
+list entries of a TList widget are similar to the entries in the Tk
+listbox widget. The main differences are (1) the TList widget can
+display the list entries in a two dimensional format and (2) you can
+use graphical images as well as multiple colors and fonts for
+the list entries.
+
+Each list entry is identified by an B<index>, which can be in the
+following forms:
+
+=over 4
+
+=item I<number>
+
+An integer that indicates the position of the entry in the list. 0
+means the first position, 1 means the second position, and so on.
+
+=item B<end>
+
+Indicates the end of the listbox. For some commands this means just
+after the last entry; for other commands it means the last entry.
+
+=item B<@>I<x>,I<y>
+
+Indicates the element that covers the point in the listbox window
+specified by x and y (in pixel coordinates). If no element covers that
+point, then the closest element to that point is used.
+
+=back
+
+=head1 DISPLAY ITEMS
+
+Each list entry in an TList widget is associated with a B<display>
+item. The display item determines what visual information should
+be displayed for this list entry. Please see L<Tk::DItem>
+for a list of all display items.
+
+When a list entry is created by the B<insert> command, the type of
+its display item is determined by the B<-itemtype> option passed
+to these commands. If the B<-itemtype> is omitted, then by default
+the type specified by this TList widget's B<-itemtype> option is
+used.
+
+=head1 WIDGET METHODS
+
+The B<TList> method creates a widget object.
+
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for TList widgets:
+
+=over 4
+
+=item I<$tlist>-E<gt>B<anchorSet>(I<index>)
+
+Sets the anchor to the list entry identified by I<index>. The
+anchor is the end of the selection that is fixed while dragging out a
+selection with the mouse.
+
+=item I<$tlist>-E<gt>B<anchorClear>
+
+Removes the anchor, if any, from this TList widget. This only removes
+the surrounding highlights of the anchor entry and does not affect its
+selection status.
+
+=item I<$tlist>-E<gt>B<delete>(I<from, >?I<to>?)
+
+Deletes one or more list entries between the two entries specified by
+the indices I<from> and I<to>. If I<to> is not specified, deletes
+the single entry specified by I<from>.
+
+=item I<$tlist>-E<gt>B<dragsiteSet>(I<index>)
+
+Sets the dragsite to the list entry identified by
+I<index>. The dragsite is used to indicate the source of a
+drag-and-drop action. Currently drag-and-drop functionality has not
+been implemented in Tix yet.
+
+=item I<$tlist>-E<gt>B<dragsiteClear>
+
+Remove the dragsite, if any, from the this TList widget. This only
+removes the surrounding highlights of the dragsite entry and does not
+affect its selection status.
+
+=item I<$tlist>-E<gt>B<dropsiteSet>(I<index>)
+
+Sets the dropsite to the list entry identified by I<index>. The
+dropsite is used to indicate the target of a drag-and-drop
+action. Currently drag-and-drop functionality has not been implemented
+in Tix yet.
+
+=item I<$tlist>-E<gt>B<dropsiteClear>
+
+Remove the dropsite, if any, from the this TList widget. This only
+removes the surrounding highlights of the dropsite entry and does not
+affect its selection status.
+
+=item I<$tlist>-E<gt>B<entrycget>(I<index, option>)
+
+Returns the current value of the configuration option given by
+I<option> for the entry indentfied by I<index>. I<Option> may
+have any of the values accepted by the B<insert> method.
+
+=item I<$tlist>-E<gt>B<entryconfigure>(I<index, >?I<option>?, I<?value, option, value, ...>?)
+
+Query or modify the configuration options of the list entry identified
+by I<index>. If no I<option> is specified, returns a list
+describing all of the available options for I<index> (see
+B<Tk_ConfigureInfo> for information on the format of this list). If
+I<option> is specified with no I<value>, then the method
+returns a list describing the one named option (this list will be
+identical to the corresponding sublist of the value returned if no
+I<option> is specified). If one or more I<option-value> pairs
+are specified, then the command modifies the given option(s) to have
+the given value(s); in this case the method returns an empty string.
+I<Option> may have any of the values accepted by the B<insert>
+method. The exact set of options depends on the
+value of the B<-itemtype> option passed to the the B<insert>
+method when this list entry is created.
+
+=item I<$tlist>-E<gt>B<insert>(I<index, >?I<option, value, ...>?)
+
+Creates a new list entry at the position indicated by I<index>. The
+following configuration options can be given to configure the list
+entry:
+
+=over 8
+
+=item B<-itemtype> => I<type>
+
+Specifies the type of display item to be display for the new list
+entry. I<type> must be a valid display item type. Currently the
+available display item types are B<image>, B<imagetext>,
+B<text>, and I<$widget>. If this option is not specified, then by
+default the type specified by this TList widget's B<-itemtype>
+option is used.
+
+=item B<-state> => I<state>
+
+Specifies whether this entry can be selected or invoked by the user.
+Must be either B<normal> or B<disabled>.
+
+=item B<-data> => I<data>
+
+Arbitrary data to be associated with the entry (a perl scalar value).
+
+=back
+
+The B<insert> method accepts additional configuration options
+to configure the display item associated with this list entry. The set
+of additional configuration options depends on the type of the display
+item given by the B<-itemtype> option. Please see
+L<Tk::DItem> for a list of the configuration options for
+each of the display item types.
+
+=item I<$tlist>-E<gt>B<info>(I<option, >I<arg, ...>)
+
+Query information about the TList widget. I<option> can be one
+of the following:
+
+=over 8
+
+=item I<$tlist>-E<gt>B<info>(B<anchor, >I<index>)
+
+Returns the index of the current anchor, if any, of the TList
+widget. If the anchor is not set, returns the empty string.
+
+=item I<$tlist>-E<gt>B<info>(B<dragsite, >I<index>)
+
+Returns the index of the current dragsite, if any, of the TList
+widget. If the dragsite is not set, returns the empty string.
+
+=item I<$tlist>-E<gt>B<info>(B<dropsite, >I<index>)
+
+Returns the index of the current dropsite, if any, of the TList
+widget. If the dropsite is not set, returns the empty string.
+
+=item I<$tlist>-E<gt>B<info>(B<selection>)
+
+Returns a list of selected elements in the TList widget. If no entries
+are selected, returns an empty string.
+
+=back
+
+=item I<$tlist>-E<gt>B<nearest>(I<x, y>)
+
+Given an I<(x,y)> coordinate within the TList window, this command
+returns the index of the TList element nearest to that coordinate.
+
+=item I<$tlist>-E<gt>B<see>(I<index>)
+
+Adjust the view in the TList so that the entry given by I<index> is
+visible. If the entry is already visible then the command has no
+effect; otherwise TList scrolls to bring the element into view at the edge
+to which it is nearest.
+
+=item I<$tlist>-E<gt>B<selection>(I<option, >I<arg, ...>)
+
+This command is used to adjust the selection within a TList widget. It
+has several forms, depending on I<option>:
+
+=over 8
+
+=item I<$tlist>-E<gt>B<selectionClear>(?I<from>?, ?I<to>?)
+
+When no extra arguments are given, deselects all of the list entrie(s)
+in this TList widget. When only I<from> is given, only the list
+entry identified by I<from> is deselected. When both I<from> and
+I<to> are given, deselects all of the list entrie(s) between
+between I<from> and I<to>, inclusive, without affecting the
+selection state of entries outside that range.
+
+=item I<$tlist>-E<gt>B<selectionIncludes>(I<index>)
+
+Returns 1 if the list entry indicated by I<index> is currently
+selected; returns 0 otherwise.
+
+=item I<$tlist>-E<gt>B<selectionSet>(I<from, >?I<to>?)
+
+Selects all of the list entrie(s) between between I<from> and
+I<to>, inclusive, without affecting the selection state of entries
+outside that range. When only I<from> is given, only the list entry
+identified by I<from> is selected.
+
+=back
+
+=item I<$tlist>-E<gt>B<xview>(I<args>)
+
+This command is used to query and change the horizontal position of the
+information in the widget's window. It can take any of the following
+forms:
+
+=over 8
+
+=item I<$tlist>-E<gt>B<xview>
+
+Returns a list containing two elements. Each element is a real
+fraction between 0 and 1; together they describe the horizontal span
+that is visible in the window. For example, if the first element is
+0.2 and the second element is 0.6, 20% of the TList entry is
+off-screen to the left, the middle 40% is visible in the window, and
+40% of the entry is off-screen to the right. These are the same values
+passed to scrollbars via the B<-xscrollcommand> option.
+
+=item I<$tlist>-E<gt>B<xview>(I<index>)
+
+Adjusts the view in the window so that the list entry identified by
+I<index> is aligned to the left edge of the window.
+
+=item I<$tlist>-E<gt>B<xviewMoveto>(I<fraction>)
+
+Adjusts the view in the window so that I<fraction> of the total
+width of the TList is off-screen to the left. I<fraction> must be
+a fraction between 0 and 1.
+
+=item I<$tlist>-E<gt>B<xviewScroll>(I<number, what>)
+
+This command shifts the view in the window left or right according to
+I<number> and I<what>. I<Number> must be an integer.
+I<What> must be either B<units> or B<pages> or an
+abbreviation of one of these. If I<what> is B<units>, the view
+adjusts left or right by I<number> character units (the width of
+the B<0> character) on the display; if it is B<pages> then the
+view adjusts by I<number> screenfuls. If I<number> is negative
+then characters farther to the left become visible; if it is positive
+then characters farther to the right become visible.
+
+=back
+
+=item I<$tlist>-E<gt>B<yview>(I<?args>?)
+
+This command is used to query and change the vertical position of the
+entries in the widget's window. It can take any of the following forms:
+
+=over 8
+
+=item I<$tlist>-E<gt>B<yview>
+
+Returns a list containing two elements, both of which are real
+fractions between 0 and 1. The first element gives the position of
+the list element at the top of the window, relative to the TList as a
+whole (0.5 means it is halfway through the TList, for example). The
+second element gives the position of the list entry just after the
+last one in the window, relative to the TList as a whole. These are
+the same values passed to scrollbars via the B<-yscrollcommand>
+option.
+
+=item I<$tlist>-E<gt>B<yview>(I<index>)
+
+Adjusts the view in the window so that the list entry given by
+I<index> is displayed at the top of the window.
+
+=item I<$tlist>-E<gt>B<yviewMoveto>(I<fraction>)
+
+Adjusts the view in the window so that the list entry given by
+I<fraction> appears at the top of the window. I<Fraction> is a
+fraction between 0 and 1; 0 indicates the first entry in the TList,
+0.33 indicates the entry one-third the way through the TList, and so
+on.
+
+=item I<$tlist>-E<gt>B<yviewScroll>(I<number, what>)
+
+This command adjust the view in the window up or down according to
+I<number> and I<what>. I<Number> must be an integer.
+I<What> must be either B<units> or B<pages>. If I<what>
+is B<units>, the view adjusts up or down by I<number> lines; if
+it is B<pages> then the view adjusts by I<number> screenfuls.
+If I<number> is negative then earlier entries become visible; if
+it is positive then later entries become visible.
+
+=back
+
+=back
+
+=head1 BINDINGS
+
+=over 4
+
+=item [1]
+
+If the B<-selectmode> is "browse", when the user drags the mouse
+pointer over the list entries, the entry under the pointer will be
+highlighted and the B<-browsecmd> procedure will be called with
+one parameter, the index of the highlighted entry. Only one entry
+can be highlighted at a time. The B<-command> procedure will be
+called when the user double-clicks on a list entry.
+
+=item [2]
+
+If the B<-selectmode> is "single", the entries will only be
+highlighted by mouse E<lt>ButtonRelease-1E<gt> events. When a new list entry
+is highlighted, the B<-browsecmd> procedure will be called with
+one parameter indicating the highlighted list entry. The
+B<-command> procedure will be called when the user double-clicks
+on a list entry.
+
+=item [3]
+
+If the B<-selectmode> is "multiple", when the user drags the mouse
+pointer over the list entries, all the entries under the pointer will
+be highlighted. However, only a contiguous region of list entries can
+be selected. When the highlighted area is changed, the
+B<-browsecmd> procedure will be called with an undefined
+parameter. It is the responsibility of the B<-browsecmd> procedure
+to find out the exact highlighted selection in the TList. The
+B<-command> procedure will be called when the user double-clicks
+on a list entry.
+
+=item [4]
+
+If the B<-selectmode> is "extended", when the user drags the mouse
+pointer over the list entries, all the entries under the pointer will
+be highlighted. The user can also make disjointed selections using
+E<lt>Control-ButtonPress-1E<gt>. When the highlighted area is changed, the
+B<-browsecmd> procedure will be called with an undefined
+parameter. It is the responsibility of the B<-browsecmd> procedure
+to find out the exact highlighted selection in the TList. The
+B<-command> procedure will be called when the user double-clicks
+on a list entry.
+
+=back
+
+=cut
+
+# BUG:
+# click on 'one' in example below does not make
+# it 'active' item (didn't GBARR reported this before!?)
+
+=head1 EXAMPLE
+
+This example demonstrates how to use an TList to store a list of
+numbers:
+
+ use strict;
+ use Tk ();
+ use Tk::TList;
+
+ my $mw = Tk::MainWindow->new();
+ my $image = $mw->Getimage('folder');
+ my $tlist = $mw->TList(-orient => 'vertical');
+ for my $text ( qw/one two three four five six seven eight nine/ ) {
+ $tlist->insert('end',
+ -itemtype=>'imagetext', -image=>$image, -text=>$text);
+ }
+
+ $tlist->pack(-expand=>'yes', -fill=>'both');
+
+ Tk::MainLoop;
+
+=head1 SEE ALSO
+
+L<Tk::options|Tk::options>
+L<Tk::Widget|Tk::Widget>
+L<Tk::DItem|Tk::DItem>
+L<Tk::HList|Tk::HList>
+L<Tk::TixGrid|Tk::TixGrid>
+
+=head1 KEYWORDS
+
+Tix(n), Tabular Listbox, Display Items
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Table.pm b/Master/tlpkg/tlperl/lib/Tk/Table.pm
new file mode 100644
index 00000000000..2eae67fbd97
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Table.pm
@@ -0,0 +1,597 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Table;
+use strict;
+
+use vars qw($VERSION);
+$VERSION = '4.015'; # was: sprintf '4.%03d', q$Revision: #12 $ =~ /\D(\d+)\s*$/;
+
+use AutoLoader;
+use base qw(Tk::Frame);
+
+Construct Tk::Widget 'Table';
+
+# Constants for QueueLayout flags
+sub _SlaveSize () { 1 } # Slave has asked for change of width or height
+sub _SlaveChange () { 2 } # We lost or gained a slave
+sub _ViewChange () { 4 } # xview or yview called
+sub _ConfigEvent () { 8 } # Table has changed size
+sub _ScrollBars () { 32 } # Scrollabrs came or went
+sub _RowColCount () { 16 } # rows or columns configured
+
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Configure>',['QueueLayout',_ConfigEvent]);
+ $mw->bind($class,'<FocusIn>', 'NoOp');
+ $mw->XYscrollBind($class);
+ return $class;
+}
+
+sub _view
+{
+ my ($t,$s,$page,$a,$op,$num,$type) = @_;
+ if ($op eq 'moveto')
+ {
+ $$s = int(@$a*$num);
+ }
+ else
+ {
+ $num *= ($page/2) if ($type eq 'pages');
+ $$s += $num;
+ }
+ $$s = 0 if ($$s < 0);
+ $t->QueueLayout(_ViewChange);
+}
+
+sub xview
+{
+ my $t = shift;
+ $t->_view(\$t->{Left},$t->cget('-columns'),$t->{Width},@_);
+}
+
+sub yview
+{
+ my $t = shift;
+ $t->_view(\$t->{Top},$t->cget('-rows'),$t->{Height},@_);
+}
+
+sub FocusChildren
+{
+ my $t = shift;
+ return () if ($t->cget('-takefocus'));
+ return $t->SUPER::FocusChildren;
+}
+
+sub Populate
+{
+ my ($t,$args) = @_;
+ $t->SUPER::Populate($args);
+ $t->ConfigSpecs('-scrollbars' => [METHOD => 'scrollbars','Scrollbars','nw'],
+ '-takefocus' => [SELF => 'takeFocus','TakeFocus',1],
+ '-rows' => [METHOD => 'rows','Rows',10],
+ '-fixedrows' => [METHOD => 'fixedRows','FixedRows',0],
+ '-columns' => [METHOD => 'columns','Columns',10],
+ '-fixedcolumns' => [METHOD => 'fixedColumn','FixedColumns',0],
+ '-highlightthickness' => [SELF => 'highlightThickness','HighlightThickness',2]
+ );
+ $t->_init;
+}
+
+sub sizeN
+{
+ my ($n,$a) = @_;
+ my $max = 0;
+ my $i = 0;
+ my $sum = 0;
+ while ($i < @$a && $i < $n)
+ {
+ my $n = $a->[$i++];
+ $a->[$i-1] = $n = 0 unless (defined $n);
+ $sum += $n;
+ }
+ $max = $sum if ($sum > $max);
+ while ($i < @$a)
+ {
+ $sum = $sum-$a->[$i-$n]+$a->[$i];
+ $max = $sum if ($sum > $max);
+ $i++;
+ }
+ return $max;
+}
+
+sub total
+{
+ my ($a) = @_;
+ my $total = 0;
+ my $x;
+ foreach $x (@{$a})
+ {
+ $total += $x;
+ }
+ return $total;
+}
+
+sub constrain
+{
+ my ($sb,$a,$pixels,$fixed) = @_;
+ my $n = $$sb+$fixed;
+ my $total = 0;
+ my $i;
+ $n = @$a if ($n > @$a);
+ $n = $fixed if ($n < $fixed);
+ for ($i= 0; $i < $fixed; $i++)
+ {
+ (defined($a->[$i])) && ($total += $a->[$i]);
+ }
+ for ($i=$n; $total < $pixels && $i < @$a; $i++)
+ {
+ $a->[$i] ||= 0;
+ $total += $a->[$i];
+ }
+ while ($n > $fixed)
+ {
+ if (($total += $a->[--$n]) > $pixels)
+ {
+ $n++;
+ last;
+ }
+ }
+ $$sb = $n-$fixed;
+}
+
+sub Layout
+{
+ my ($t) = @_;
+ return unless Tk::Exists($t);
+ my $rows = @{$t->{Row}};
+ my $bw = $t->cget(-highlightthickness);
+ my $frows = $t->cget(-fixedrows);
+ my $fcols = $t->cget(-fixedcolumns);
+ my $sb = $t->cget(-scrollbars);
+ my $H = $t->Height;
+ my $W = $t->Width;
+ my $tadj = $bw;
+ my $badj = $bw;
+ my $ladj = $bw;
+ my $radj = $bw;
+ my @xs = ($W,0,0,0);
+ my @ys = (0,$H,0,0);
+ my $xsb;
+ my $ysb;
+
+ my $why = $t->{LayoutPending};
+ $t->{LayoutPending} = 0;
+
+ if ($sb =~ /[ns]/)
+ {
+ $t->{xsb} = $t->Scrollbar(-orient => 'horizontal', -command => ['xview' => $t]) unless (defined $t->{xsb});
+ $xsb = $t->{xsb};
+ $t->Advertise('xscrollbar' => $xsb);
+ $xs[3] = $xsb->ReqHeight;
+ if ($sb =~ /n/)
+ {
+ $xs[1] = $tadj;
+ $tadj += $xs[3];
+ }
+ else
+ {
+ $badj += $xs[3];
+ $xs[1] = $H-$badj;
+ }
+ }
+ else
+ {
+ $t->{xsb}->UnmapWindow if (defined $t->{xsb});
+ }
+
+ if ($sb =~ /[ew]/)
+ {
+ $t->{ysb} = $t->Scrollbar(-orient => 'vertical', -command => ['yview' => $t]) unless (defined $t->{ysb});
+ $ysb = $t->{ysb};
+ $t->Advertise('yscrollbar' => $ysb);
+ $ys[2] = $ysb->ReqWidth;
+ if ($sb =~ /w/)
+ {
+ $ys[0] = $ladj;
+ $ladj += $ys[2];
+ }
+ else
+ {
+ $radj += $ys[2];
+ $ys[0] = $W-$radj;
+ }
+ }
+ else
+ {
+ $t->{ysb}->UnmapWindow if (defined $t->{ysb});
+ }
+
+ constrain(\$t->{Top}, $t->{Height},$H-($tadj+$badj),$frows);
+ constrain(\$t->{Left},$t->{Width}, $W-($ladj+$radj),$fcols);
+
+ my $top = $t->{Top}+$frows;
+ my $left = $t->{Left}+$fcols;
+
+ if ($why & (_ScrollBars|_RowColCount|_SlaveSize))
+ {
+ # Width and/or Height of element or
+ # number of rows and/or columns or
+ # scrollbar presence has changed
+ my $w = sizeN($t->cget('-columns'),$t->{Width})+$radj+$ladj;
+ my $h = sizeN($t->cget('-rows'),$t->{Height})+$tadj+$badj;
+ $t->GeometryRequest($w,$h);
+ }
+
+ if ($rows)
+ {
+ my $cols = @{$t->{Width}};
+ my $yhwm = $top-$frows;
+ my $xhwm = $left-$fcols;
+ my $y = $tadj;
+ my $r;
+ for ($r = 0; $r < $rows; $r++)
+ {
+ my $h = $t->{Height}[$r];
+ next unless defined $h;
+ if (($r < $top && $r >= $frows) || ($y+$h > $H-$badj))
+ {
+ if (defined $t->{Row}[$r])
+ {
+ my $c;
+ for ($c = 0; $c < @{$t->{Row}[$r]}; $c++)
+ {
+ my $s = $t->{Row}[$r][$c];
+ if (defined $s)
+ {
+ $s->UnmapWindow;
+ if ($why & 1)
+ {
+ my $w = $t->{Width}[$c];
+ $s->ResizeWindow($w,$h);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ my $hwm = $left-$fcols;
+ my $sh = 0;
+ my $x = $ladj;
+ my $c;
+ $ys[1] = $y if ($y < $ys[1] && $r >= $frows);
+ for ($c = 0; $c <$cols; $c++)
+ {
+ my $s = $t->{Row}[$r][$c];
+ my $w = $t->{Width}[$c];
+ if (($c < $left && $c >= $fcols) || ($x+$w > $W-$radj) )
+ {
+ if (defined $s)
+ {
+ $s->UnmapWindow;
+ $s->ResizeWindow($w,$h) if ($why & 1);
+ }
+ }
+ else
+ {
+ $xs[0] = $x if ($x < $xs[0] && $c >= $fcols);
+ if (defined $s)
+ {
+ if ($why & 1)
+ {
+ $s->MoveResizeWindow($x,$y,$w,$h);
+ }
+ else
+ {
+ $s->MoveWindow($x,$y);
+ }
+ $s->MapWindow;
+ }
+ $x += $w;
+ if ($c >= $fcols)
+ {
+ $hwm++;
+ $sh += $w
+ }
+ }
+ }
+ $xhwm = $hwm if ($hwm > $xhwm);
+ $xs[2] = $sh if ($sh > $xs[2]);
+ $y += $h;
+ if ($r >= $frows)
+ {
+ $ys[3] += $h;
+ $yhwm++;
+ }
+ }
+ }
+ $t->{Bottom} = $yhwm;
+ $t->{Right} = $xhwm;
+ if (defined $xsb && $xs[2] > 0)
+ {
+ $xsb->MoveResizeWindow(@xs);
+ $cols -= $fcols;
+ if ($cols > 0)
+ {
+ $xsb->set($t->{Left}/$cols,$t->{Right}/$cols);
+ $xsb->MapWindow;
+ }
+ }
+ if (defined $ysb && $ys[3] > 0)
+ {
+ $ysb->MoveResizeWindow(@ys);
+ $rows -= $frows;
+ if ($rows > 0)
+ {
+ $ysb->set($t->{Top}/$rows,$t->{Bottom}/$rows);
+ $ysb->MapWindow;
+ }
+ }
+ }
+}
+
+sub QueueLayout
+{
+ my ($m,$why) = @_;
+ $m->afterIdle(['Layout',$m]) unless ($m->{LayoutPending});
+ $m->{LayoutPending} |= $why;
+}
+
+sub SlaveGeometryRequest
+{
+ my ($m,$s) = @_;
+ my ($row,$col) = @{$m->{Slave}{$s->PathName}};
+ my $sw = $s->ReqWidth;
+ my $sh = $s->ReqHeight;
+ my $sz = 0;
+ if ($sw > $m->{Width}[$col])
+ {
+ $m->{Width}[$col] = $sw;
+ $m->QueueLayout(_SlaveSize);
+ $sz++;
+ }
+ if ( (not defined ($m->{Height}[$row])) or $sh > $m->{Height}[$row])
+ {
+ $m->{Height}[$row] = $sh;
+ $m->QueueLayout(_SlaveSize);
+ $sz++;
+ }
+ if (!$sz)
+ {
+ $s->ResizeWindow($m->{Width}[$col],$m->{Height}[$row]);
+ }
+}
+
+sub get
+{
+ my ($t,$row,$col) = @_;
+ return $t->{Row}[$row][$col];
+}
+
+sub LostSlave
+{
+ my ($t,$s) = @_;
+ my $info = delete $t->{Slave}{$s->PathName};
+ if (defined $info)
+ {
+ my ($row,$col) = @$info;
+ $t->{Row}[$row][$col] = undef;
+ $s->UnmapWindow;
+ }
+ else
+ {
+ $t->BackTrace('Cannot find' . $s->PathName);
+ }
+ $t->QueueLayout(_SlaveChange);
+}
+
+sub clear {
+ my $self = shift;
+ my $rows = $self->cget(-rows);
+ my $cols = $self->cget(-columns);
+ foreach my $r (1 .. $rows) {
+ foreach my $c (1 .. $cols) {
+ my $old = $self->get( $r, $c );
+ next unless $old;
+ $self->LostSlave($old);
+ $old->destroy;
+ }
+ }
+ $self->_init;
+ $self->QueueLayout(_SlaveSize);
+}
+
+sub _init {
+ my $self = shift;
+ $self->{'Width'} = [];
+ $self->{'Height'} = [];
+ $self->{'Row'} = [];
+ $self->{'Slave'} = {};
+ $self->{'Top'} = 0;
+ $self->{'Left'} = 0;
+ $self->{'Bottom'} = 0;
+ $self->{'Right'} = 0;
+ $self->{LayoutPending} = 0;
+}
+
+sub put
+{
+ my ($t,$row,$col,$w) = @_;
+ $w = $t->Label(-text => $w) unless (ref $w);
+ $t->ManageGeometry($w);
+ unless (defined $t->{Row}[$row])
+ {
+ $t->{Row}[$row] = [];
+ $t->{Height}[$row] = 0;
+ }
+ unless (defined $t->{Width}[$col])
+ {
+ $t->{Width}[$col] = 0;
+ }
+ my $old = $t->{Row}[$row][$col];
+ if (defined $old)
+ {
+ $old->UnmanageGeometry;
+ $t->LostSlave($old);
+ }
+ $t->{Row}[$row][$col] = $w;
+ $t->{Slave}{$w->PathName} = [$row,$col];
+ $t->SlaveGeometryRequest($w);
+ $t->QueueLayout(_SlaveChange);
+ return $old;
+}
+
+#
+# configure methods
+#
+
+sub scrollbars
+{
+ my ($t,$v) = @_;
+ if (@_ > 1)
+ {
+ $t->_configure(-scrollbars => $v);
+ $t->QueueLayout(_ScrollBars);
+ }
+ return $t->_cget('-scrollbars');
+}
+
+sub rows
+{
+ my ($t,$r) = @_;
+ if (@_ > 1)
+ {
+ $t->_configure(-rows => $r);
+ if ($t->{Row} && @{$t->{Row}} > $r)
+ {
+ for my $y ($r .. $#{$t->{Row}})
+ {
+ for my $s (@{$t->{Row}[$y]})
+ {
+ $s->destroy if $s;
+ }
+ }
+ splice @{ $t->{Row} }, $r;
+ }
+ $t->QueueLayout(_RowColCount);
+ }
+ return $t->_cget('-rows');
+}
+
+sub fixedrows
+{
+ my ($t,$r) = @_;
+ if (@_ > 1)
+ {
+ $t->_configure(-fixedrows => $r);
+ $t->QueueLayout(_RowColCount);
+ }
+ return $t->_cget('-fixedrows');
+}
+
+sub columns
+{
+ my ($t,$r) = @_;
+ if (@_ > 1)
+ {
+ $t->_configure(-columns => $r);
+ if ($t->{Row})
+ {
+ for my $row (@{$t->{Row}})
+ {
+ for my $s (@$row[$r .. $#$row])
+ {
+ $s->destroy if $s;
+ }
+ { # FIXME? - Steve was getting warnings :
+ # splice() offset past end of array
+ local $^W = 0;
+ splice @$row, $r;
+ }
+ }
+ }
+ $t->QueueLayout(_RowColCount);
+ }
+ return $t->_cget('-columns');
+}
+
+sub fixedcolumns
+{
+ my ($t,$r) = @_;
+ if (@_ > 1)
+ {
+ $t->_configure(-fixedcolumns => $r);
+ $t->QueueLayout(_RowColCount);
+ }
+ return $t->_cget('-fixedcolumns');
+}
+
+1;
+__END__
+sub Create
+{
+ my $t = shift;
+ my $r = shift;
+ my $c = shift;
+ my $kind = shift;
+ $t->put($r,$c,$t->$kind(@_));
+}
+
+sub totalColumns
+{
+ scalar @{shift->{'Width'}};
+}
+
+sub totalRows
+{
+ scalar @{shift->{'Height'}};
+}
+
+sub Posn
+{
+ my ($t,$s) = @_;
+ my $info = $t->{Slave}{$s->PathName};
+ return (wantarray) ? @$info : $info;
+}
+
+sub see
+{
+ my $t = shift;
+ my ($row,$col) = (@_ == 2) ? @_ : @{$t->{Slave}{$_[0]->PathName}};
+ my $see = 1;
+ if (($row -= $t->cget('-fixedrows')) >= 0)
+ {
+ if ($row < $t->{Top})
+ {
+ $t->{Top} = $row;
+ $t->QueueLayout(_ViewChange);
+ $see = 0;
+ }
+ elsif ($row >= $t->{Bottom})
+ {
+ $t->{Top} += ($row - $t->{Bottom}+1);
+ $t->QueueLayout(_ViewChange);
+ $see = 0;
+ }
+ }
+ if (($col -= $t->cget('-fixedcolumns')) >= 0)
+ {
+ if ($col < $t->{Left})
+ {
+ $t->{Left} = $col;
+ $t->QueueLayout(_ViewChange);
+ $see = 0;
+ }
+ elsif ($col >= $t->{Right})
+ {
+ $t->{Left} += ($col - $t->{Right}+1);
+ $t->QueueLayout(_ViewChange);
+ $see = 0;
+ }
+ }
+ return $see;
+}
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Table.pod b/Master/tlpkg/tlperl/lib/Tk/Table.pod
new file mode 100644
index 00000000000..f73e93907b4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Table.pod
@@ -0,0 +1,97 @@
+
+=head1 NAME
+
+Tk::Table - Scrollable 2 dimensional table of Tk widgets
+
+=for pm Tk/Table.pm
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+ use Tk::Table;
+
+ $table = $parent->Table(-rows => number,
+ -columns => number,
+ -scrollbars => anchor,
+ -fixedrows => number,
+ -fixedcolumns => number,
+ -takefocus => boolean);
+
+ $widget = $table->Button(...);
+
+ $old = $table->put($row,$col,$widget);
+ $old = $table->put($row,$col,"Text"); # simple Label
+ $widget = $table->get($row,$col);
+
+ $cols = $table->totalColumns;
+ $rows = $table->totalRows;
+
+ $table->see($widget);
+ $table->see($row,$col);
+
+ ($row,$col) = $table->Posn($widget);
+
+=head1 DESCRIPTION
+
+Tk::Table is an all-perl widget/geometry manager which allows a two dimensional
+table of arbitary perl/Tk widgets to be displayed.
+
+Entries in the Table are simply ordinary perl/Tk widgets. They should
+be created with the Table as their parent. Widgets are positioned in the
+table using:
+
+ $table->put($row,$col,$widget)
+
+If I<$widget> is not a reference it is treated as a string, and
+a Lable widget is created with the string as its text.
+
+All the widgets in each column are set to the same width - the requested
+width of the widest widget in the column.
+Likewise, all the widgets in each row are set to the same height - the requested
+height of the tallest widget in the column.
+
+A number of rows and/or columns can be marked as 'fixed' - and so can serve
+as 'headings' for the remainder the rows which are scrollable.
+
+The requested size of the table as a whole is such that the number of rows
+specified by -rows (default 10), and number of columns specified by -columns
+(default 10) can be displayed.
+
+If the Table is told it can take the keyboard focus then cursor and scroll
+keys scroll the displayed widgets.
+
+The Table will create and manage its own scrollbars if requested via
+-scrollbars.
+
+The table can be emptied using
+
+ $table->clear
+
+the widgets which were in the table are destroyed.
+
+
+The Tk::Table widget is derived from a Tk::Frame, so inherits all its
+configure options.
+
+=head1 BUGS / Snags / Possible enhancements
+
+=over 4
+
+=item *
+
+Very large Tables consume a lot of X windows.
+
+=item *
+
+No equivalent of pack's -anchor/-pad etc. options
+
+=back
+
+=head1 SEE ALSO
+
+L<Tk::grid>, L<Tk::HList>, L<Tk::TableMatrix>, L<Tk::MListbox>,
+L<Tk::Columns>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Tcl-perl.pod b/Master/tlpkg/tlperl/lib/Tk/Tcl-perl.pod
new file mode 100644
index 00000000000..2310e0738e4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Tcl-perl.pod
@@ -0,0 +1,200 @@
+=head1 NAME
+
+Tcl vs perl - very old suspect documentation on porting.
+
+=for category Other Modules and Languages
+
+=head1 DESCRIPTION
+
+This isn't really a .pod yet, nor is it Tcl vs perl
+it is a copy of John's comparison of Malcolm's original perl/Tk
+port with the current one. It is also out-of-date in places.
+
+ From: john@WPI.EDU (John Stoffel )
+
+ Here are some thoughts on the new Tk extension and how I think the
+ organization of the commands looks. Mostly, I'm happy with it, it
+ makes some things more organized and more consistent with tcl/tk, but
+ since the overlying language is so different, I don't think we need to
+ follow exactly the tcl/tk model for how to call the language.
+
+ The basic structure of the Tk program is:
+
+ require Tk;
+
+ $top = MainWindow->new();
+
+ #
+ # create widgets
+ #
+
+ Tk::MainLoop;
+
+ sub method1 {
+ }
+
+ sub methodN {
+ }
+
+ This is pretty much the same as tkperl5a5, with some cosmetic naming
+ changes, and some more useful command name and usage changes. A quick
+ comparison in no particular order follows:
+
+ tkperl5a5 Tk
+ ------------------------------- -----------------------------------
+ $top=tkinit(name,display,sync); $top=MainWindow->new();
+
+ tkpack $w, ... ; $w->pack(...)
+
+ $w = Class::new($top, ...); $w = $top->Class(...);
+
+ tkmainloop; Tk::MainLoop;
+
+ tkbind($w,"<key>",sub); $w->bind("<key>",sub);
+
+ tkdelete($w, ...); $w->delete(...);
+
+ $w->scanmark(...); $w->scan("mark", ...);
+
+ $w->scandragto(...); $w->scan("dragto", ...);
+
+ $w->tkselect(); $w->Select();
+
+ $w->selectadjust(...); $w->selection("adjust", ...);
+
+ $w->selectto(...); $w->selection("to", ...);
+
+ $w->selectfrom(...); $w->selection("from", ...);
+
+ $w->tkindex(...); $w->index(...);
+
+ tclcmd("xxx",...); &Tk::xxx(...) # all Tk commands, but no Tcl at all
+
+ tclcmd("winfo", xxx, $w, ...); $w->xxx(...);
+
+ $w->mark(...);
+
+ $w->tag(...);
+
+ $w->grabstatus(); $w->grab("status");
+
+ $w->grabrelease(...); $w->grab("release", ...);
+
+ focus($w); $w->focus;
+
+ update(); Tk->update();
+
+ idletasks(); Tk->update("idletasks");
+
+ wm("cmd",$w, ...); $w->cmd(...);
+
+ destroy($w); $w->destroy();
+
+ Tk::option(...);
+ $w->OptionGet(name,Class)
+
+ $w->place(...)
+
+ Tk::property(...);
+
+ $w = Entry::new($parent,...)
+
+ is now
+
+ $w = $parent->Entry(...)
+
+ As this allows new to be inherited from a Window class.
+
+ -method=>x,-slave=>y
+
+ is now
+
+ -command => [x,y]
+
+ 1st element of list is treated as "method" if y is an object reference.
+ (You can have -command => [a,b,c,d,e] too; b..e get passed as args).
+
+ Object references are now hashes rather than scalars and there
+ is only ever one such per window. The Tcl_CmdInfo and PathName
+ are entries in the hash.
+
+ (This allows derived classes to
+ re-bless the hash and keep their on stuff in it too.)
+
+ Tk's "Tcl_Interp" is in fact a ref to "." window.
+ You can find all the Tk windows descended from it as their object
+ references get added (by PathName) into this hash.
+ $w->MainWindow returns this hash from any window.
+
+ I think that it should extend to multiple tkinits / Tk->news
+ with different Display's - if Tk code does.
+
+ Finally "bind" passes window as "extra" (or only)
+ argument. Thus
+
+ Tk::Button->bind(<Any-Enter>,"Enter");
+
+ Binds Enter events to Tk::Button::Enter by default
+ but gets called as $w->Enter so derived class of Button can just
+ define its own Enter method. &EvWref and associated globals and race
+ conditions are no longer needed.
+
+ One thing to beware of : commands bound to events with $widget->bind
+ follow same pattern, but get passed extra args :
+
+ $widget->bind(<Any-1>,[sub {print shift}, $one, $two ]);
+
+ When sub gets called it has :
+
+ $widget $one $two
+
+ passed.
+
+ 1st extra arg is reference to the per-widget hash that serves as the
+ perl object for the widget.
+
+ Every time an XEvent a reference to a special class is placed
+ in the widget hash. It can be retrieved by $w->XEvent method.
+
+ The methods of the XEvent class are the
+ Tcl/Tk % special characters.
+
+ Thus:
+
+ $widget->bind(<Any-KeyPress>,
+ sub {
+ my $w = shift;
+ my $e = $w->XEvent;
+ print $w->PathName," ",$e->A," pressed ,$e->xy,"\n");
+ });
+
+ XEvent->xy is a special case which returns "@" . $e->x . "," . $e->y
+ which is common in Text package.
+
+ Because of passing a blessed widget hash to "bound" subs they can be
+ bound to (possibly inherited) methods of the widget's class:
+
+ Class->bind(<Any-Down>,Down);
+
+ sub Class::Down
+ {
+ my $w = shift;
+ # handle down arrow
+ }
+
+ Also:
+
+ -command and friends can take a list the 1st element can be a ref to
+ as sub or a method name. Remaining elements are passed as args to the
+ sub at "invoke" time. Thus :
+
+ $b= $w->Button(blah blah, '-command' => [sub{print shift} , $fred ]);
+
+ Should do the trick, provided $fred is defined at time of button creation.
+
+ Thus 1st element of list is equivalent to Malcolm's -method and second
+ would be his -slave. Any further elements are a bonus and avoid
+ having to pass ref to an array/hash as a slave.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Text.pm b/Master/tlpkg/tlperl/lib/Tk/Text.pm
new file mode 100644
index 00000000000..da41159252b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Text.pm
@@ -0,0 +1,1671 @@
+# text.tcl --
+#
+# This file defines the default bindings for Tk text widgets.
+#
+# @(#) text.tcl 1.18 94/12/17 16:05:26
+#
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994 Sun Microsystems, Inc.
+# perl/Tk version:
+# Copyright (c) 1995-2004 Nick Ing-Simmons
+# Copyright (c) 1999 Greg London
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+package Tk::Text;
+use AutoLoader;
+use Carp;
+use strict;
+
+use Text::Tabs;
+
+use vars qw($VERSION);
+#$VERSION = sprintf '4.%03d', q$Revision: #24 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.028';
+
+use Tk qw(Ev $XS_VERSION);
+use base qw(Tk::Clipboard Tk::Widget);
+
+Construct Tk::Widget 'Text';
+
+bootstrap Tk::Text;
+
+sub Tk_cmd { \&Tk::text }
+
+sub Tk::Widget::ScrlText { shift->Scrolled('Text' => @_) }
+
+Tk::Methods('bbox','compare','debug','delete','dlineinfo','dump','edit',
+ 'get','image','index','insert','mark','scan','search',
+ 'see','tag','window','xview','yview');
+
+use Tk::Submethods ( 'mark' => [qw(gravity names next previous set unset)],
+ 'scan' => [qw(mark dragto)],
+ 'tag' => [qw(add bind cget configure delete lower
+ names nextrange prevrange raise ranges remove)],
+ 'window' => [qw(cget configure create names)],
+ 'image' => [qw(cget configure create names)],
+ 'xview' => [qw(moveto scroll)],
+ 'yview' => [qw(moveto scroll)],
+ 'edit' => [qw(modified redo reset separator undo)],
+ );
+
+sub Tag;
+sub Tags;
+
+sub bindRdOnly
+{
+
+ my ($class,$mw) = @_;
+
+ # Standard Motif bindings:
+ $mw->bind($class,'<Meta-B1-Motion>','NoOp');
+ $mw->bind($class,'<Meta-1>','NoOp');
+ $mw->bind($class,'<Alt-KeyPress>','NoOp');
+ $mw->bind($class,'<Escape>','unselectAll');
+
+ $mw->bind($class,'<1>',['Button1',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B1-Motion>','B1_Motion' ) ;
+ $mw->bind($class,'<B1-Leave>','B1_Leave' ) ;
+ $mw->bind($class,'<B1-Enter>','CancelRepeat');
+ $mw->bind($class,'<ButtonRelease-1>','CancelRepeat');
+ $mw->bind($class,'<Control-1>',['markSet','insert',Ev('@')]);
+
+ $mw->bind($class,'<Double-1>','selectWord' ) ;
+ $mw->bind($class,'<Triple-1>','selectLine' ) ;
+ $mw->bind($class,'<Shift-1>','adjustSelect' ) ;
+ $mw->bind($class,'<Double-Shift-1>',['SelectTo',Ev('@'),'word']);
+ $mw->bind($class,'<Triple-Shift-1>',['SelectTo',Ev('@'),'line']);
+
+ $mw->bind($class,'<Left>',['SetCursor',Ev('index','insert-1c')]);
+ $mw->bind($class,'<Shift-Left>',['KeySelect',Ev('index','insert-1c')]);
+ $mw->bind($class,'<Control-Left>',['SetCursor',Ev('index','insert-1c wordstart')]);
+ $mw->bind($class,'<Shift-Control-Left>',['KeySelect',Ev('index','insert-1c wordstart')]);
+
+ $mw->bind($class,'<Right>',['SetCursor',Ev('index','insert+1c')]);
+ $mw->bind($class,'<Shift-Right>',['KeySelect',Ev('index','insert+1c')]);
+ $mw->bind($class,'<Control-Right>',['SetCursor',Ev('index','insert+1c wordend')]);
+ $mw->bind($class,'<Shift-Control-Right>',['KeySelect',Ev('index','insert wordend')]);
+
+ $mw->bind($class,'<Up>',['SetCursor',Ev('UpDownLine',-1)]);
+ $mw->bind($class,'<Shift-Up>',['KeySelect',Ev('UpDownLine',-1)]);
+ $mw->bind($class,'<Control-Up>',['SetCursor',Ev('PrevPara','insert')]);
+ $mw->bind($class,'<Shift-Control-Up>',['KeySelect',Ev('PrevPara','insert')]);
+
+ $mw->bind($class,'<Down>',['SetCursor',Ev('UpDownLine',1)]);
+ $mw->bind($class,'<Shift-Down>',['KeySelect',Ev('UpDownLine',1)]);
+ $mw->bind($class,'<Control-Down>',['SetCursor',Ev('NextPara','insert')]);
+ $mw->bind($class,'<Shift-Control-Down>',['KeySelect',Ev('NextPara','insert')]);
+
+ $mw->bind($class,'<Home>',['SetCursor','insert linestart']);
+ $mw->bind($class,'<Shift-Home>',['KeySelect','insert linestart']);
+ $mw->bind($class,'<Control-Home>',['SetCursor','1.0']);
+ $mw->bind($class,'<Control-Shift-Home>',['KeySelect','1.0']);
+
+ $mw->bind($class,'<End>',['SetCursor','insert lineend']);
+ $mw->bind($class,'<Shift-End>',['KeySelect','insert lineend']);
+ $mw->bind($class,'<Control-End>',['SetCursor','end-1char']);
+ $mw->bind($class,'<Control-Shift-End>',['KeySelect','end-1char']);
+
+ $mw->bind($class,'<Prior>',['SetCursor',Ev('ScrollPages',-1)]);
+ $mw->bind($class,'<Shift-Prior>',['KeySelect',Ev('ScrollPages',-1)]);
+ $mw->bind($class,'<Control-Prior>',['xview','scroll',-1,'page']);
+
+ $mw->bind($class,'<Next>',['SetCursor',Ev('ScrollPages',1)]);
+ $mw->bind($class,'<Shift-Next>',['KeySelect',Ev('ScrollPages',1)]);
+ $mw->bind($class,'<Control-Next>',['xview','scroll',1,'page']);
+
+ $mw->bind($class,'<Shift-Tab>', 'NoOp'); # Needed only to keep <Tab> binding from triggering; does not have to actually do anything.
+ $mw->bind($class,'<Control-Tab>','focusNext');
+ $mw->bind($class,'<Control-Shift-Tab>','focusPrev');
+
+ $mw->bind($class,'<Control-space>',['markSet','anchor','insert']);
+ $mw->bind($class,'<Select>',['markSet','anchor','insert']);
+ $mw->bind($class,'<Control-Shift-space>',['SelectTo','insert','char']);
+ $mw->bind($class,'<Shift-Select>',['SelectTo','insert','char']);
+ $mw->bind($class,'<Control-slash>','selectAll');
+ $mw->bind($class,'<Control-backslash>','unselectAll');
+
+ if (!$Tk::strictMotif)
+ {
+ $mw->bind($class,'<Control-a>', ['SetCursor','insert linestart']);
+ $mw->bind($class,'<Control-b>', ['SetCursor','insert-1c']);
+ $mw->bind($class,'<Control-e>', ['SetCursor','insert lineend']);
+ $mw->bind($class,'<Control-f>', ['SetCursor','insert+1c']);
+ $mw->bind($class,'<Meta-b>', ['SetCursor','insert-1c wordstart']);
+ $mw->bind($class,'<Meta-f>', ['SetCursor','insert wordend']);
+ $mw->bind($class,'<Meta-less>', ['SetCursor','1.0']);
+ $mw->bind($class,'<Meta-greater>', ['SetCursor','end-1c']);
+
+ $mw->bind($class,'<Control-n>', ['SetCursor',Ev('UpDownLine',1)]);
+ $mw->bind($class,'<Control-p>', ['SetCursor',Ev('UpDownLine',-1)]);
+
+ $mw->bind($class,'<2>',['Button2',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B2-Motion>',['Motion2',Ev('x'),Ev('y')]);
+ }
+ $mw->bind($class,'<Destroy>','Destroy');
+ $mw->bind($class, '<3>', ['PostPopupMenu', Ev('X'), Ev('Y')] );
+ $mw->YMouseWheelBind($class);
+ $mw->XMouseWheelBind($class);
+
+ $mw->MouseWheelBind($class);
+
+ return $class;
+}
+
+sub selectAll
+{
+ my ($w) = @_;
+ $w->tagAdd('sel','1.0','end');
+}
+
+sub unselectAll
+{
+ my ($w) = @_;
+ $w->tagRemove('sel','1.0','end');
+}
+
+sub adjustSelect
+{
+ my ($w) = @_;
+ my $Ev = $w->XEvent;
+ $w->ResetAnchor($Ev->xy);
+ $w->SelectTo($Ev->xy,'char')
+}
+
+sub selectLine
+{
+ my ($w) = @_;
+ my $Ev = $w->XEvent;
+ $w->SelectTo($Ev->xy,'line');
+ Tk::catch { $w->markSet('insert','sel.first') };
+}
+
+sub selectWord
+{
+ my ($w) = @_;
+ my $Ev = $w->XEvent;
+ $w->SelectTo($Ev->xy,'word');
+ Tk::catch { $w->markSet('insert','sel.first') }
+}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $class->SUPER::ClassInit($mw);
+
+ $class->bindRdOnly($mw);
+
+ $mw->bind($class,'<Tab>', 'insertTab');
+ $mw->bind($class,'<Control-i>', ['Insert',"\t"]);
+ $mw->bind($class,'<Return>', ['Insert',"\n"]);
+ $mw->bind($class,'<Delete>','Delete');
+ $mw->bind($class,'<BackSpace>','Backspace');
+ $mw->bind($class,'<Insert>', \&ToggleInsertMode ) ;
+ $mw->bind($class,'<KeyPress>',['InsertKeypress',Ev('A')]);
+
+ $mw->bind($class,'<F1>', 'clipboardColumnCopy');
+ $mw->bind($class,'<F2>', 'clipboardColumnCut');
+ $mw->bind($class,'<F3>', 'clipboardColumnPaste');
+
+ # Additional emacs-like bindings:
+
+ if (!$Tk::strictMotif)
+ {
+ $mw->bind($class,'<Control-d>',['delete','insert']);
+ $mw->bind($class,'<Control-k>','deleteToEndofLine') ;
+ $mw->bind($class,'<Control-o>','openLine');
+ $mw->bind($class,'<Control-t>','Transpose');
+ $mw->bind($class,'<Meta-d>',['delete','insert','insert wordend']);
+ $mw->bind($class,'<Meta-BackSpace>',['delete','insert-1c wordstart','insert']);
+
+ # A few additional bindings of my own.
+ $mw->bind($class,'<Control-h>','deleteBefore');
+ $mw->bind($class,'<ButtonRelease-2>','ButtonRelease2');
+ }
+#JD# $Tk::prevPos = undef;
+ return $class;
+}
+
+sub insertTab
+{
+ my ($w) = @_;
+ $w->Insert("\t");
+ $w->focus;
+ $w->break
+}
+
+sub deleteToEndofLine
+{
+ my ($w) = @_;
+ if ($w->compare('insert','==','insert lineend'))
+ {
+ $w->delete('insert')
+ }
+ else
+ {
+ $w->delete('insert','insert lineend')
+ }
+}
+
+sub openLine
+{
+ my ($w) = @_;
+ $w->insert('insert',"\n");
+ $w->markSet('insert','insert-1c')
+}
+
+sub Button2
+{
+ my ($w,$x,$y) = @_;
+ $w->scan('mark',$x,$y);
+ $Tk::x = $x;
+ $Tk::y = $y;
+ $Tk::mouseMoved = 0;
+}
+
+sub Motion2
+{
+ my ($w,$x,$y) = @_;
+ $Tk::mouseMoved = 1 if ($x != $Tk::x || $y != $Tk::y);
+ $w->scan('dragto',$x,$y) if ($Tk::mouseMoved);
+}
+
+sub ButtonRelease2
+{
+ my ($w) = @_;
+ my $Ev = $w->XEvent;
+ if (!$Tk::mouseMoved)
+ {
+ Tk::catch
+ {
+ $w->mark('set','insert',$Ev->xy);
+ $w->insert($Ev->xy,$w->SelectionGet);
+ $w->focus if ($w->cget('-state') eq "normal");
+ }
+ }
+}
+
+sub InsertSelection
+{
+ my ($w) = @_;
+ Tk::catch { $w->Insert($w->SelectionGet) }
+}
+
+sub Backspace
+{
+ my ($w) = @_;
+ my $sel = Tk::catch { $w->tag('nextrange','sel','1.0','end') };
+ if (defined $sel)
+ {
+ $w->delete('sel.first','sel.last');
+ return;
+ }
+ $w->deleteBefore;
+}
+
+sub deleteBefore
+{
+ my ($w) = @_;
+ if ($w->compare('insert','!=','1.0'))
+ {
+ $w->delete('insert-1c');
+ $w->see('insert')
+ }
+}
+
+sub Delete
+{
+ my ($w) = @_;
+ my $sel = Tk::catch { $w->tag('nextrange','sel','1.0','end') };
+ if (defined $sel)
+ {
+ $w->delete('sel.first','sel.last')
+ }
+ else
+ {
+ $w->delete('insert');
+ $w->see('insert')
+ }
+}
+
+# Button1 --
+# This procedure is invoked to handle button-1 presses in text
+# widgets. It moves the insertion cursor, sets the selection anchor,
+# and claims the input focus.
+#
+# Arguments:
+# w - The text window in which the button was pressed.
+# x - The x-coordinate of the button press.
+# y - The x-coordinate of the button press.
+sub Button1
+{
+ my ($w,$x,$y) = @_;
+ $Tk::selectMode = 'char';
+ $Tk::mouseMoved = 0;
+ $w->SetCursor('@'.$x.','.$y);
+ $w->markSet('anchor','insert');
+ $w->focus() if ($w->cget('-state') eq 'normal');
+}
+
+sub B1_Motion
+{
+ my ($w) = @_;
+ return unless defined $Tk::mouseMoved;
+ my $Ev = $w->XEvent;
+ $Tk::x = $Ev->x;
+ $Tk::y = $Ev->y;
+ $w->SelectTo($Ev->xy)
+}
+
+sub B1_Leave
+{
+ my ($w) = @_;
+ my $Ev = $w->XEvent;
+ $Tk::x = $Ev->x;
+ $Tk::y = $Ev->y;
+ $w->AutoScan;
+}
+
+# SelectTo --
+# This procedure is invoked to extend the selection, typically when
+# dragging it with the mouse. Depending on the selection mode (character,
+# word, line) it selects in different-sized units. This procedure
+# ignores mouse motions initially until the mouse has moved from
+# one character to another or until there have been multiple clicks.
+#
+# Arguments:
+# w - The text window in which the button was pressed.
+# index - Index of character at which the mouse button was pressed.
+sub SelectTo
+{
+ my ($w, $index, $mode)= @_;
+ $Tk::selectMode = $mode if defined ($mode);
+ my $cur = $w->index($index);
+ my $anchor = Tk::catch { $w->index('anchor') };
+ if (!defined $anchor)
+ {
+ $w->markSet('anchor',$anchor = $cur);
+ $Tk::mouseMoved = 0;
+ }
+ elsif ($w->compare($cur,'!=',$anchor))
+ {
+ $Tk::mouseMoved = 1;
+ }
+ $Tk::selectMode = 'char' unless (defined $Tk::selectMode);
+ $mode = $Tk::selectMode;
+ my ($first,$last);
+ if ($mode eq 'char')
+ {
+ if ($w->compare($cur,'<','anchor'))
+ {
+ $first = $cur;
+ $last = 'anchor';
+ }
+ else
+ {
+ $first = 'anchor';
+ $last = $cur
+ }
+ }
+ elsif ($mode eq 'word')
+ {
+ if ($w->compare($cur,'<','anchor'))
+ {
+ $first = $w->index("$cur wordstart");
+ $last = $w->index('anchor - 1c wordend')
+ }
+ else
+ {
+ $first = $w->index('anchor wordstart');
+ $last = $w->index("$cur wordend")
+ }
+ }
+ elsif ($mode eq 'line')
+ {
+ if ($w->compare($cur,'<','anchor'))
+ {
+ $first = $w->index("$cur linestart");
+ $last = $w->index('anchor - 1c lineend + 1c')
+ }
+ else
+ {
+ $first = $w->index('anchor linestart');
+ $last = $w->index("$cur lineend + 1c")
+ }
+ }
+ if ($Tk::mouseMoved || $Tk::selectMode ne 'char')
+ {
+ $w->tagRemove('sel','1.0',$first);
+ $w->tagAdd('sel',$first,$last);
+ $w->tagRemove('sel',$last,'end');
+ $w->idletasks;
+ }
+}
+# AutoScan --
+# This procedure is invoked when the mouse leaves a text window
+# with button 1 down. It scrolls the window up, down, left, or right,
+# depending on where the mouse is (this information was saved in
+# tkPriv(x) and tkPriv(y)), and reschedules itself as an 'after'
+# command so that the window continues to scroll until the mouse
+# moves back into the window or the mouse button is released.
+#
+# Arguments:
+# w - The text window.
+sub AutoScan
+{
+ my ($w) = @_;
+ if ($Tk::y >= $w->height)
+ {
+ $w->yview('scroll',2,'units')
+ }
+ elsif ($Tk::y < 0)
+ {
+ $w->yview('scroll',-2,'units')
+ }
+ elsif ($Tk::x >= $w->width)
+ {
+ $w->xview('scroll',2,'units')
+ }
+ elsif ($Tk::x < 0)
+ {
+ $w->xview('scroll',-2,'units')
+ }
+ else
+ {
+ return;
+ }
+ $w->SelectTo('@' . $Tk::x . ','. $Tk::y);
+ $w->RepeatId($w->after(50,['AutoScan',$w]));
+}
+# SetCursor
+# Move the insertion cursor to a given position in a text. Also
+# clears the selection, if there is one in the text, and makes sure
+# that the insertion cursor is visible.
+#
+# Arguments:
+# w - The text window.
+# pos - The desired new position for the cursor in the window.
+sub SetCursor
+{
+ my ($w,$pos) = @_;
+ $pos = 'end - 1 chars' if $w->compare($pos,'==','end');
+ $w->markSet('insert',$pos);
+ $w->unselectAll;
+ $w->see('insert');
+}
+# KeySelect
+# This procedure is invoked when stroking out selections using the
+# keyboard. It moves the cursor to a new position, then extends
+# the selection to that position.
+#
+# Arguments:
+# w - The text window.
+# new - A new position for the insertion cursor (the cursor has not
+# actually been moved to this position yet).
+sub KeySelect
+{
+ my ($w,$new) = @_;
+ my ($first,$last);
+ if (!defined $w->tag('ranges','sel'))
+ {
+ # No selection yet
+ $w->markSet('anchor','insert');
+ if ($w->compare($new,'<','insert'))
+ {
+ $w->tagAdd('sel',$new,'insert')
+ }
+ else
+ {
+ $w->tagAdd('sel','insert',$new)
+ }
+ }
+ else
+ {
+ # Selection exists
+ if ($w->compare($new,'<','anchor'))
+ {
+ $first = $new;
+ $last = 'anchor'
+ }
+ else
+ {
+ $first = 'anchor';
+ $last = $new
+ }
+ $w->tagRemove('sel','1.0',$first);
+ $w->tagAdd('sel',$first,$last);
+ $w->tagRemove('sel',$last,'end')
+ }
+ $w->markSet('insert',$new);
+ $w->see('insert');
+ $w->idletasks;
+}
+# ResetAnchor --
+# Set the selection anchor to whichever end is farthest from the
+# index argument. One special trick: if the selection has two or
+# fewer characters, just leave the anchor where it is. In this
+# case it does not matter which point gets chosen for the anchor,
+# and for the things like Shift-Left and Shift-Right this produces
+# better behavior when the cursor moves back and forth across the
+# anchor.
+#
+# Arguments:
+# w - The text widget.
+# index - Position at which mouse button was pressed, which determines
+# which end of selection should be used as anchor point.
+sub ResetAnchor
+{
+ my ($w,$index) = @_;
+ if (!defined $w->tag('ranges','sel'))
+ {
+ $w->markSet('anchor',$index);
+ return;
+ }
+ my $a = $w->index($index);
+ my $b = $w->index('sel.first');
+ my $c = $w->index('sel.last');
+ if ($w->compare($a,'<',$b))
+ {
+ $w->markSet('anchor','sel.last');
+ return;
+ }
+ if ($w->compare($a,'>',$c))
+ {
+ $w->markSet('anchor','sel.first');
+ return;
+ }
+ my ($lineA,$chA) = split(/\./,$a);
+ my ($lineB,$chB) = split(/\./,$b);
+ my ($lineC,$chC) = split(/\./,$c);
+ if ($lineB < $lineC+2)
+ {
+ my $total = length($w->get($b,$c));
+ if ($total <= 2)
+ {
+ return;
+ }
+ if (length($w->get($b,$a)) < $total/2)
+ {
+ $w->markSet('anchor','sel.last')
+ }
+ else
+ {
+ $w->markSet('anchor','sel.first')
+ }
+ return;
+ }
+ if ($lineA-$lineB < $lineC-$lineA)
+ {
+ $w->markSet('anchor','sel.last')
+ }
+ else
+ {
+ $w->markSet('anchor','sel.first')
+ }
+}
+
+########################################################################
+sub markExists
+{
+ my ($w, $markname)=@_;
+ my $mark_exists=0;
+ my @markNames_list = $w->markNames;
+ foreach my $mark (@markNames_list)
+ { if ($markname eq $mark) {$mark_exists=1;last;} }
+ return $mark_exists;
+}
+
+########################################################################
+sub OverstrikeMode
+{
+ my ($w,$mode) = @_;
+
+ $w->{'OVERSTRIKE_MODE'} =0 unless exists($w->{'OVERSTRIKE_MODE'});
+
+ $w->{'OVERSTRIKE_MODE'}=$mode if (@_ > 1);
+
+ return $w->{'OVERSTRIKE_MODE'};
+}
+
+########################################################################
+# pressed the <Insert> key, just above 'Del' key.
+# this toggles between insert mode and overstrike mode.
+sub ToggleInsertMode
+{
+ my ($w)=@_;
+ $w->OverstrikeMode(!$w->OverstrikeMode);
+}
+
+########################################################################
+sub InsertKeypress
+{
+ my ($w,$char)=@_;
+ return unless length($char);
+ if ($w->OverstrikeMode)
+ {
+ my $current=$w->get('insert');
+ $w->delete('insert') unless($current eq "\n");
+ }
+ $w->Insert($char);
+}
+
+########################################################################
+sub GotoLineNumber
+{
+ my ($w,$line_number) = @_;
+ $line_number=~ s/^\s+|\s+$//g;
+ return if $line_number =~ m/\D/;
+ my ($last_line,$junk) = split(/\./, $w->index('end'));
+ if ($line_number > $last_line) {$line_number = $last_line; }
+ $w->{'LAST_GOTO_LINE'} = $line_number;
+ $w->markSet('insert', $line_number.'.0');
+ $w->see('insert');
+}
+
+########################################################################
+sub GotoLineNumberPopUp
+{
+ my ($w)=@_;
+ my $popup = $w->{'GOTO_LINE_NUMBER_POPUP'};
+
+ unless (defined($w->{'LAST_GOTO_LINE'}))
+ {
+ my ($line,$col) = split(/\./, $w->index('insert'));
+ $w->{'LAST_GOTO_LINE'} = $line;
+ }
+
+ ## if anything is selected when bring up the pop-up, put it in entry window.
+ my $selected;
+ eval { $selected = $w->SelectionGet(-selection => "PRIMARY"); };
+ unless ($@)
+ {
+ if (defined($selected) and length($selected))
+ {
+ unless ($selected =~ /\D/)
+ {
+ $w->{'LAST_GOTO_LINE'} = $selected;
+ }
+ }
+ }
+ unless (defined($popup))
+ {
+ require Tk::DialogBox;
+ $popup = $w->DialogBox(-buttons => [qw[Ok Cancel]],-title => "Goto Line Number", -popover => $w,
+ -command => sub { $w->GotoLineNumber($w->{'LAST_GOTO_LINE'}) if $_[0] eq 'Ok'});
+ $w->{'GOTO_LINE_NUMBER_POPUP'}=$popup;
+ $popup->resizable('no','no');
+ my $frame = $popup->Frame->pack(-fill => 'x');
+ $frame->Label(-text=>'Enter line number: ')->pack(-side => 'left');
+ my $entry = $frame->Entry(-background=>'white', -width=>25,
+ -textvariable => \$w->{'LAST_GOTO_LINE'})->pack(-side =>'left',-fill => 'x');
+ $popup->Advertise(entry => $entry);
+ }
+ $popup->Popup;
+ $popup->Subwidget('entry')->focus;
+ $popup->Wait;
+}
+
+########################################################################
+
+sub getSelected
+{
+ shift->GetTextTaggedWith('sel');
+}
+
+sub deleteSelected
+{
+ shift->DeleteTextTaggedWith('sel');
+}
+
+sub GetTextTaggedWith
+{
+ my ($w,$tag) = @_;
+
+ my @ranges = $w->tagRanges($tag);
+ my $range_total = @ranges;
+ my $return_text='';
+
+ # if nothing selected, then ignore
+ if ($range_total == 0) {return $return_text;}
+
+ # for every range-pair, get selected text
+ while(@ranges)
+ {
+ my $first = shift(@ranges);
+ my $last = shift(@ranges);
+ my $text = $w->get($first , $last);
+ if(defined($text))
+ {$return_text = $return_text . $text;}
+ # if there is more tagged text, separate with an end of line character
+ if(@ranges)
+ {$return_text = $return_text . "\n";}
+ }
+ return $return_text;
+}
+
+########################################################################
+sub DeleteTextTaggedWith
+{
+ my ($w,$tag) = @_;
+ my @ranges = $w->tagRanges($tag);
+ my $range_total = @ranges;
+
+ # if nothing tagged with that tag, then ignore
+ if ($range_total == 0) {return;}
+
+ # insert marks where selections are located
+ # marks will move with text even as text is inserted and deleted
+ # in a previous selection.
+ for (my $i=0; $i<$range_total; $i++)
+ { $w->markSet('mark_tag_'.$i => $ranges[$i]); }
+
+ # for every selected mark pair, insert new text and delete old text
+ for (my $i=0; $i<$range_total; $i=$i+2)
+ {
+ my $first = $w->index('mark_tag_'.$i);
+ my $last = $w->index('mark_tag_'.($i+1));
+
+ my $text = $w->delete($first , $last);
+ }
+
+ # delete the marks
+ for (my $i=0; $i<$range_total; $i++)
+ { $w->markUnset('mark_tag_'.$i); }
+}
+
+
+########################################################################
+sub FindAll
+{
+ my ($w,$mode, $case, $pattern ) = @_;
+ ### 'sel' tags accumulate, need to remove any previous existing
+ $w->unselectAll;
+
+ my $match_length=0;
+ my $start_index;
+ my $end_index = '1.0';
+
+ while(defined($end_index))
+ {
+ if ($case eq '-nocase')
+ {
+ $start_index = $w->search(
+ $mode,
+ $case,
+ -count => \$match_length,
+ "--",
+ $pattern ,
+ $end_index,
+ 'end');
+ }
+ else
+ {
+ $start_index = $w->search(
+ $mode,
+ -count => \$match_length,
+ "--",
+ $pattern ,
+ $end_index,
+ 'end');
+ }
+
+ unless(defined($start_index) && $start_index) {last;}
+
+ my ($line,$col) = split(/\./, $start_index);
+ $col = $col + $match_length;
+ $end_index = $line.'.'.$col;
+ $w->tagAdd('sel', $start_index, $end_index);
+ }
+}
+
+########################################################################
+# get current selected text and search for the next occurrence
+sub FindSelectionNext
+{
+ my ($w) = @_;
+ my $selected;
+ eval {$selected = $w->SelectionGet(-selection => "PRIMARY"); };
+ return if($@);
+ return unless (defined($selected) and length($selected));
+
+ $w->FindNext('-forward', '-exact', '-case', $selected);
+}
+
+########################################################################
+# get current selected text and search for the previous occurrence
+sub FindSelectionPrevious
+{
+ my ($w) = @_;
+ my $selected;
+ eval {$selected = $w->SelectionGet(-selection => "PRIMARY"); };
+ return if($@);
+ return unless (defined($selected) and length($selected));
+
+ $w->FindNext('-backward', '-exact', '-case', $selected);
+}
+
+
+
+########################################################################
+sub FindNext
+{
+ my ($w,$direction, $mode, $case, $pattern ) = @_;
+
+ ## if searching forward, start search at end of selected block
+ ## if backward, start search from start of selected block.
+ ## dont want search to find currently selected text.
+ ## tag 'sel' may not be defined, use eval loop to trap error
+ my $is_forward = $direction =~ m{^-f} && $direction eq substr("-forwards", 0, length($direction));
+ eval {
+ if ($is_forward)
+ {
+ $w->markSet('insert', 'sel.last');
+ $w->markSet('current', 'sel.last');
+ }
+ else
+ {
+ $w->markSet('insert', 'sel.first');
+ $w->markSet('current', 'sel.first');
+ }
+ };
+
+ my $saved_index=$w->index('insert');
+
+ # remove any previous existing tags
+ $w->unselectAll;
+
+ my $match_length=0;
+ my $start_index;
+
+ if ($case eq '-nocase')
+ {
+ $start_index = $w->search(
+ $direction,
+ $mode,
+ $case,
+ -count => \$match_length,
+ "--",
+ $pattern ,
+ 'insert');
+ }
+ else
+ {
+ $start_index = $w->search(
+ $direction,
+ $mode,
+ -count => \$match_length,
+ "--",
+ $pattern ,
+ 'insert');
+ }
+
+ unless(defined($start_index)) { return 0; }
+ if(length($start_index) == 0) { return 0; }
+
+ my ($line,$col) = split(/\./, $start_index);
+ $col = $col + $match_length;
+ my $end_index = $line.'.'.$col;
+ $w->tagAdd('sel', $start_index, $end_index);
+
+ $w->see($start_index);
+
+ if ($is_forward)
+ {
+ $w->markSet('insert', $end_index);
+ $w->markSet('current', $end_index);
+ }
+ else
+ {
+ $w->markSet('insert', $start_index);
+ $w->markSet('current', $start_index);
+ }
+
+ my $compared_index = $w->index('insert');
+
+ my $ret_val;
+ if ($compared_index eq $saved_index)
+ {$ret_val=0;}
+ else
+ {$ret_val=1;}
+ return $ret_val;
+}
+
+########################################################################
+sub FindAndReplaceAll
+{
+ my ($w,$mode, $case, $find, $replace ) = @_;
+ $w->markSet('insert', '1.0');
+ $w->unselectAll;
+ while($w->FindNext('-forward', $mode, $case, $find))
+ {
+ $w->ReplaceSelectionsWith($replace);
+ }
+}
+
+########################################################################
+sub ReplaceSelectionsWith
+{
+ my ($w,$new_text ) = @_;
+
+ my @ranges = $w->tagRanges('sel');
+ my $range_total = @ranges;
+
+ # if nothing selected, then ignore
+ if ($range_total == 0) {return};
+
+ # insert marks where selections are located
+ # marks will move with text even as text is inserted and deleted
+ # in a previous selection.
+ for (my $i=0; $i<$range_total; $i++)
+ {$w->markSet('mark_sel_'.$i => $ranges[$i]); }
+
+ # for every selected mark pair, insert new text and delete old text
+ my ($first, $last);
+ for (my $i=0; $i<$range_total; $i=$i+2)
+ {
+ $first = $w->index('mark_sel_'.$i);
+ $last = $w->index('mark_sel_'.($i+1));
+
+ ##########################################################################
+ # eventually, want to be able to get selected text,
+ # support regular expression matching, determine replace_text
+ # $replace_text = $selected_text=~m/$new_text/ (or whatever would work)
+ # will have to pass in mode and case flags.
+ # this would allow a regular expression search and replace to be performed
+ # example, look for "line (\d+):" and replace with "$1 >" or similar
+ ##########################################################################
+
+ $w->insert($last, $new_text);
+ $w->delete($first, $last);
+
+ }
+ ############################################################
+ # set the insert cursor to the end of the last insertion mark
+ $w->markSet('insert',$w->index('mark_sel_'.($range_total-1)));
+
+ # delete the marks
+ for (my $i=0; $i<$range_total; $i++)
+ { $w->markUnset('mark_sel_'.$i); }
+}
+########################################################################
+sub FindAndReplacePopUp
+{
+ my ($w)=@_;
+ $w->findandreplacepopup(0);
+}
+
+########################################################################
+sub FindPopUp
+{
+ my ($w)=@_;
+ $w->findandreplacepopup(1);
+}
+
+########################################################################
+
+sub findandreplacepopup
+{
+ my ($w,$find_only)=@_;
+
+ my $pop = $w->Toplevel;
+ $pop->transient($w->toplevel);
+ if ($find_only)
+ { $pop->title("Find"); }
+ else
+ { $pop->title("Find and/or Replace"); }
+ my $frame = $pop->Frame->pack(-anchor=>'nw');
+
+ $frame->Label(-text=>"Direction:")
+ ->grid(-row=> 1, -column=>1, -padx=> 20, -sticky => 'nw');
+ my $direction = '-forward';
+ $frame->Radiobutton(
+ -variable => \$direction,
+ -text => 'forward',-value => '-forward' )
+ ->grid(-row=> 2, -column=>1, -padx=> 20, -sticky => 'nw');
+ $frame->Radiobutton(
+ -variable => \$direction,
+ -text => 'backward',-value => '-backward' )
+ ->grid(-row=> 3, -column=>1, -padx=> 20, -sticky => 'nw');
+
+ $frame->Label(-text=>"Mode:")
+ ->grid(-row=> 1, -column=>2, -padx=> 20, -sticky => 'nw');
+ my $mode = '-exact';
+ $frame->Radiobutton(
+ -variable => \$mode, -text => 'exact',-value => '-exact' )
+ ->grid(-row=> 2, -column=>2, -padx=> 20, -sticky => 'nw');
+ $frame->Radiobutton(
+ -variable => \$mode, -text => 'regexp',-value => '-regexp' )
+ ->grid(-row=> 3, -column=>2, -padx=> 20, -sticky => 'nw');
+
+ $frame->Label(-text=>"Case:")
+ ->grid(-row=> 1, -column=>3, -padx=> 20, -sticky => 'nw');
+ my $case = '-case';
+ $frame->Radiobutton(
+ -variable => \$case, -text => 'case',-value => '-case' )
+ ->grid(-row=> 2, -column=>3, -padx=> 20, -sticky => 'nw');
+ $frame->Radiobutton(
+ -variable => \$case, -text => 'nocase',-value => '-nocase' )
+ ->grid(-row=> 3, -column=>3, -padx=> 20, -sticky => 'nw');
+
+ ######################################################
+ my $find_entry = $pop->Entry(-width=>25);
+ $find_entry->focus;
+
+ my $donext = sub {$w->FindNext ($direction,$mode,$case,$find_entry->get())};
+
+ $find_entry -> pack(-anchor=>'nw', '-expand' => 'yes' , -fill => 'x'); # autosizing
+
+ ###### if any $w text is selected, put it in the find entry
+ ###### could be more than one text block selected, get first selection
+ my @ranges = $w->tagRanges('sel');
+ if (@ranges)
+ {
+ my $first = shift(@ranges);
+ my $last = shift(@ranges);
+
+ # limit to one line
+ my ($first_line, $first_col) = split(/\./,$first);
+ my ($last_line, $last_col) = split(/\./,$last);
+ unless($first_line == $last_line)
+ {$last = $first. ' lineend';}
+
+ $find_entry->insert('insert', $w->get($first , $last));
+ }
+ else
+ {
+ my $selected;
+ eval {$selected=$w->SelectionGet(-selection => "PRIMARY"); };
+ if($@) {}
+ elsif (defined($selected))
+ {$find_entry->insert('insert', $selected);}
+ }
+
+ $find_entry->icursor(0);
+
+ my ($replace_entry,$button_replace,$button_replace_all);
+ unless ($find_only)
+ {
+ $replace_entry = $pop->Entry(-width=>25);
+
+ $replace_entry -> pack(-anchor=>'nw', '-expand' => 'yes' , -fill => 'x');
+ }
+
+
+ my $button_find = $pop->Button(-text=>'Find', -command => $donext, -default => 'active')
+ -> pack(-side => 'left');
+
+ my $button_find_all = $pop->Button(-text=>'Find All',
+ -command => sub {$w->FindAll($mode,$case,$find_entry->get());} )
+ ->pack(-side => 'left');
+
+ unless ($find_only)
+ {
+ $button_replace = $pop->Button(-text=>'Replace', -default => 'normal',
+ -command => sub {$w->ReplaceSelectionsWith($replace_entry->get());} )
+ -> pack(-side =>'left');
+ $button_replace_all = $pop->Button(-text=>'Replace All',
+ -command => sub {$w->FindAndReplaceAll
+ ($mode,$case,$find_entry->get(),$replace_entry->get());} )
+ ->pack(-side => 'left');
+ }
+
+
+ my $button_cancel = $pop->Button(-text=>'Cancel',
+ -command => sub {$pop->destroy()} )
+ ->pack(-side => 'left');
+
+ $find_entry->bind("<Return>" => [$button_find, 'invoke']);
+ $find_entry->bind("<Escape>" => [$button_cancel, 'invoke']);
+
+ $find_entry->bind("<Return>" => [$button_find, 'invoke']);
+ $find_entry->bind("<Escape>" => [$button_cancel, 'invoke']);
+
+ $pop->resizable('yes','no');
+ return $pop;
+}
+
+# paste clipboard into current location
+sub clipboardPaste
+{
+ my ($w) = @_;
+ local $@;
+ Tk::catch { $w->Insert($w->clipboardGet) };
+}
+
+########################################################################
+# Insert --
+# Insert a string into a text at the point of the insertion cursor.
+# If there is a selection in the text, and it covers the point of the
+# insertion cursor, then delete the selection before inserting.
+#
+# Arguments:
+# w - The text window in which to insert the string
+# string - The string to insert (usually just a single character)
+sub Insert
+{
+ my ($w,$string) = @_;
+ return unless (defined $string && $string ne '');
+ #figure out if cursor is inside a selection
+ my @ranges = $w->tagRanges('sel');
+ if (@ranges)
+ {
+ while (@ranges)
+ {
+ my ($first,$last) = splice(@ranges,0,2);
+ if ($w->compare($first,'<=','insert') && $w->compare($last,'>=','insert'))
+ {
+ $w->ReplaceSelectionsWith($string);
+ return;
+ }
+ }
+ }
+ # paste it at the current cursor location
+ $w->insert('insert',$string);
+ $w->see('insert');
+}
+
+# UpDownLine --
+# Returns the index of the character one *display* line above or below the
+# insertion cursor. There are two tricky things here. First,
+# we want to maintain the original column across repeated operations,
+# even though some lines that will get passed through do not have
+# enough characters to cover the original column. Second, do not
+# try to scroll past the beginning or end of the text.
+#
+# This may have some weirdness associated with a proportional font. Ie.
+# the insertion cursor will zigzag up or down according to the width of
+# the character at destination.
+#
+# Arguments:
+# w - The text window in which the cursor is to move.
+# n - The number of lines to move: -1 for up one line,
+# +1 for down one line.
+sub UpDownLine
+{
+ my ($w,$n) = @_;
+ $w->see('insert');
+ my $i = $w->index('insert');
+
+ my ($line,$char) = split(/\./,$i);
+
+ my $testX; #used to check the "new" position
+ my $testY; #used to check the "new" position
+
+ (my $bx, my $by, my $bw, my $bh) = $w->bbox($i);
+ (my $lx, my $ly, my $lw, my $lh) = $w->dlineinfo($i);
+
+ if ( ($n == -1) and ($by <= $bh) )
+ {
+ #On first display line.. so scroll up and recalculate..
+ $w->yview('scroll', -1, 'units');
+ unless (($w->yview)[0]) {
+ #first line of entire text - keep same position.
+ return $i;
+ }
+ ($bx, $by, $bw, $bh) = $w->bbox($i);
+ ($lx, $ly, $lw, $lh) = $w->dlineinfo($i);
+ }
+ elsif ( ($n == 1) and
+ ($ly + $lh) > ( $w->height - 2*$w->cget(-bd) - 2*$w->cget(-highlightthickness) - $lh + 1) )
+ {
+ #On last display line.. so scroll down and recalculate..
+ $w->yview('scroll', 1, 'units');
+ ($bx, $by, $bw, $bh) = $w->bbox($i);
+ ($lx, $ly, $lw, $lh) = $w->dlineinfo($i);
+ }
+
+ # Calculate the vertical position of the next display line
+ my $Yoffset = 0;
+ $Yoffset = $by - $ly + 1 if ($n== -1);
+ $Yoffset = $ly + $lh + 1 - $by if ($n == 1);
+ $Yoffset*=$n;
+ $testY = $by + $Yoffset;
+
+ # Save the original 'x' position of the insert cursor if:
+ # 1. This is the first time through -- or --
+ # 2. The insert cursor position has changed from the previous
+ # time the up or down key was pressed -- or --
+ # 3. The cursor has reached the beginning or end of the widget.
+
+ {
+ no warnings 'uninitialized';
+ if (not defined $w->{'origx'} or ($w->{'lastindex'} != $i) )
+ {
+ $w->{'origx'} = $bx;
+ }
+ }
+
+ # Try to keep the same column if possible
+ $testX = $w->{'origx'};
+
+ # Get the coordinates of the possible new position
+ my $testindex = $w->index('@'.$testX.','.$testY );
+ $w->see($testindex);
+ my ($nx,$ny,$nw,$nh) = $w->bbox($testindex);
+
+ # Which side of the character should we position the cursor -
+ # mainly for a proportional font
+ if ($testX > $nx+$nw/2)
+ {
+ $testX = $nx+$nw+1;
+ }
+
+ my $newindex = $w->index('@'.$testX.','.$testY );
+
+ if ( $w->compare($newindex,'==','end - 1 char') and ($ny == $ly ) )
+ {
+ # Then we are trying to the 'end' of the text from
+ # the same display line - don't do that
+ return $i;
+ }
+
+ $w->{'lastindex'} = $newindex;
+ $w->see($newindex);
+ return $newindex;
+}
+
+# PrevPara --
+# Returns the index of the beginning of the paragraph just before a given
+# position in the text (the beginning of a paragraph is the first non-blank
+# character after a blank line).
+#
+# Arguments:
+# w - The text window in which the cursor is to move.
+# pos - Position at which to start search.
+sub PrevPara
+{
+ my ($w,$pos) = @_;
+ $pos = $w->index("$pos linestart");
+ while (1)
+ {
+ if ($w->get("$pos - 1 line") eq "\n" && $w->get($pos) ne "\n" || $pos eq '1.0' )
+ {
+ my $string = $w->get($pos,"$pos lineend");
+ if ($string =~ /^(\s)+/)
+ {
+ my $off = length($1);
+ $pos = $w->index("$pos + $off chars")
+ }
+ if ($w->compare($pos,'!=','insert') || $pos eq '1.0')
+ {
+ return $pos;
+ }
+ }
+ $pos = $w->index("$pos - 1 line")
+ }
+}
+# NextPara --
+# Returns the index of the beginning of the paragraph just after a given
+# position in the text (the beginning of a paragraph is the first non-blank
+# character after a blank line).
+#
+# Arguments:
+# w - The text window in which the cursor is to move.
+# start - Position at which to start search.
+sub NextPara
+{
+ my ($w,$start) = @_;
+ my $pos = $w->index("$start linestart + 1 line");
+ while ($w->get($pos) ne "\n")
+ {
+ if ($w->compare($pos,'==','end'))
+ {
+ return $w->index('end - 1c');
+ }
+ $pos = $w->index("$pos + 1 line")
+ }
+ while ($w->get($pos) eq "\n" )
+ {
+ $pos = $w->index("$pos + 1 line");
+ if ($w->compare($pos,'==','end'))
+ {
+ return $w->index('end - 1c');
+ }
+ }
+ my $string = $w->get($pos,"$pos lineend");
+ if ($string =~ /^(\s+)/)
+ {
+ my $off = length($1);
+ return $w->index("$pos + $off chars");
+ }
+ return $pos;
+}
+# ScrollPages --
+# This is a utility procedure used in bindings for moving up and down
+# pages and possibly extending the selection along the way. It scrolls
+# the view in the widget by the number of pages, and it returns the
+# index of the character that is at the same position in the new view
+# as the insertion cursor used to be in the old view.
+#
+# Arguments:
+# w - The text window in which the cursor is to move.
+# count - Number of pages forward to scroll; may be negative
+# to scroll backwards.
+sub ScrollPages
+{
+ my ($w,$count) = @_;
+ my @bbox = $w->bbox('insert');
+ $w->yview('scroll',$count,'pages');
+ if (!@bbox)
+ {
+ return $w->index('@' . int($w->height/2) . ',' . 0);
+ }
+ my $x = int($bbox[0]+$bbox[2]/2);
+ my $y = int($bbox[1]+$bbox[3]/2);
+ return $w->index('@' . $x . ',' . $y);
+}
+
+sub Contents
+{
+ my $w = shift;
+ if (@_)
+ {
+ $w->delete('1.0','end');
+ $w->insert('end',shift) while (@_);
+ }
+ else
+ {
+ return $w->get('1.0','end');
+ }
+}
+
+sub Destroy
+{
+ my ($w) = @_;
+ delete $w->{_Tags_};
+}
+
+sub Transpose
+{
+ my ($w) = @_;
+ my $pos = 'insert';
+ $pos = $w->index("$pos + 1 char") if ($w->compare($pos,'!=',"$pos lineend"));
+ return if ($w->compare("$pos - 1 char",'==','1.0'));
+ my $new = $w->get("$pos - 1 char").$w->get("$pos - 2 char");
+ $w->delete("$pos - 2 char",$pos);
+ $w->insert('insert',$new);
+ $w->see('insert');
+}
+
+sub Tag
+{
+ my $w = shift;
+ my $name = shift;
+ Carp::confess('No args') unless (ref $w and defined $name);
+ $w->{_Tags_} = {} unless (exists $w->{_Tags_});
+ unless (exists $w->{_Tags_}{$name})
+ {
+ require Tk::Text::Tag;
+ $w->{_Tags_}{$name} = 'Tk::Text::Tag'->new($w,$name);
+ }
+ $w->{_Tags_}{$name}->configure(@_) if (@_);
+ return $w->{_Tags_}{$name};
+}
+
+sub Tags
+{
+ my ($w,$name) = @_;
+ my @result = ();
+ foreach $name ($w->tagNames(@_))
+ {
+ push(@result,$w->Tag($name));
+ }
+ return @result;
+}
+
+sub TIEHANDLE
+{
+ my ($class,$obj) = @_;
+ return $obj;
+}
+
+sub PRINT
+{
+ my $w = shift;
+ # Find out whether 'end' is displayed at the moment
+ # Retrieve the position of the bottom of the window as
+ # a fraction of the entire contents of the Text widget
+ my $yview = ($w->yview)[1];
+
+ # If $yview is 1.0 this means that 'end' is visible in the window
+ my $update = 0;
+ $update = 1 if $yview == 1.0;
+
+ # Loop over all input strings
+ while (@_)
+ {
+ $w->insert('end',shift);
+ }
+ # Move the window to see the end of the text if required
+ $w->see('end') if $update;
+}
+
+sub PRINTF
+{
+ my $w = shift;
+ $w->PRINT(sprintf(shift,@_));
+}
+
+sub WRITE
+{
+ my ($w, $scalar, $length, $offset) = @_;
+ unless (defined $length) { $length = length $scalar }
+ unless (defined $offset) { $offset = 0 }
+ $w->PRINT(substr($scalar, $offset, $length));
+}
+
+sub WhatLineNumberPopUp
+{
+ my ($w)=@_;
+ my ($line,$col) = split(/\./,$w->index('insert'));
+ $w->messageBox(-type => 'Ok', -title => "What Line Number",
+ -message => "The cursor is on line $line (column is $col)");
+}
+
+sub MenuLabels
+{
+ return qw[~File ~Edit ~Search ~View];
+}
+
+sub SearchMenuItems
+{
+ my ($w) = @_;
+ return [
+ ['command'=>'~Find', -command => [$w => 'FindPopUp']],
+ ['command'=>'Find ~Next', -command => [$w => 'FindSelectionNext']],
+ ['command'=>'Find ~Previous', -command => [$w => 'FindSelectionPrevious']],
+ ['command'=>'~Replace', -command => [$w => 'FindAndReplacePopUp']]
+ ];
+}
+
+sub EditMenuItems
+{
+ my ($w) = @_;
+ my @items = ();
+ foreach my $op ($w->clipEvents)
+ {
+ push(@items,['command' => "~$op", -command => [ $w => "clipboard$op"]]);
+ }
+ push(@items,
+ '-',
+ ['command'=>'Select All', -command => [$w => 'selectAll']],
+ ['command'=>'Unselect All', -command => [$w => 'unselectAll']],
+ );
+ return \@items;
+}
+
+sub ViewMenuItems
+{
+ my ($w) = @_;
+ my $v;
+ tie $v,'Tk::Configure',$w,'-wrap';
+ return [
+ ['command'=>'Goto ~Line...', -command => [$w => 'GotoLineNumberPopUp']],
+ ['command'=>'~Which Line?', -command => [$w => 'WhatLineNumberPopUp']],
+ ['cascade'=> 'Wrap', -tearoff => 0, -menuitems => [
+ [radiobutton => 'Word', -variable => \$v, -value => 'word'],
+ [radiobutton => 'Character', -variable => \$v, -value => 'char'],
+ [radiobutton => 'None', -variable => \$v, -value => 'none'],
+ ]],
+ ];
+}
+
+########################################################################
+sub clipboardColumnCopy
+{
+ my ($w) = @_;
+ $w->Column_Copy_or_Cut(0);
+}
+
+sub clipboardColumnCut
+{
+ my ($w) = @_;
+ $w->Column_Copy_or_Cut(1);
+}
+
+########################################################################
+sub Column_Copy_or_Cut
+{
+ my ($w, $cut) = @_;
+ my @ranges = $w->tagRanges('sel');
+ my $range_total = @ranges;
+ # this only makes sense if there is one selected block
+ unless ($range_total==2)
+ {
+ $w->bell;
+ return;
+ }
+
+ my $selection_start_index = shift(@ranges);
+ my $selection_end_index = shift(@ranges);
+
+ my ($start_line, $start_column) = split(/\./, $selection_start_index);
+ my ($end_line, $end_column) = split(/\./, $selection_end_index);
+
+ # correct indices for tabs
+ my $string;
+ $string = $w->get($start_line.'.0', $start_line.'.0 lineend');
+ $string = substr($string, 0, $start_column);
+ $string = expand($string);
+ my $tab_start_column = length($string);
+
+ $string = $w->get($end_line.'.0', $end_line.'.0 lineend');
+ $string = substr($string, 0, $end_column);
+ $string = expand($string);
+ my $tab_end_column = length($string);
+
+ my $length = $tab_end_column - $tab_start_column;
+
+ $selection_start_index = $start_line . '.' . $tab_start_column;
+ $selection_end_index = $end_line . '.' . $tab_end_column;
+
+ # clear the clipboard
+ $w->clipboardClear;
+ my ($clipstring, $startstring, $endstring);
+ my $padded_string = ' 'x$tab_end_column;
+ for(my $line = $start_line; $line <= $end_line; $line++)
+ {
+ $string = $w->get($line.'.0', $line.'.0 lineend');
+ $string = expand($string) . $padded_string;
+ $clipstring = substr($string, $tab_start_column, $length);
+ #$clipstring = unexpand($clipstring);
+ $w->clipboardAppend($clipstring."\n");
+
+ if ($cut)
+ {
+ $startstring = substr($string, 0, $tab_start_column);
+ $startstring = unexpand($startstring);
+ $start_column = length($startstring);
+
+ $endstring = substr($string, 0, $tab_end_column );
+ $endstring = unexpand($endstring);
+ $end_column = length($endstring);
+
+ $w->delete($line.'.'.$start_column, $line.'.'.$end_column);
+ }
+ }
+}
+
+########################################################################
+
+sub clipboardColumnPaste
+{
+ my ($w) = @_;
+ my @ranges = $w->tagRanges('sel');
+ my $range_total = @ranges;
+ if ($range_total)
+ {
+ warn " there cannot be any selections during clipboardColumnPaste. \n";
+ $w->bell;
+ return;
+ }
+
+ my $clipboard_text;
+ eval
+ {
+ $clipboard_text = $w->SelectionGet(-selection => "CLIPBOARD");
+ };
+
+ return unless (defined($clipboard_text));
+ return unless (length($clipboard_text));
+ my $string;
+
+ my $current_index = $w->index('insert');
+ my ($current_line, $current_column) = split(/\./,$current_index);
+ $string = $w->get($current_line.'.0', $current_line.'.'.$current_column);
+ $string = expand($string);
+ $current_column = length($string);
+
+ my @clipboard_lines = split(/\n/,$clipboard_text);
+ my $length;
+ my $end_index;
+ my ($delete_start_column, $delete_end_column, $insert_column_index);
+ foreach my $line (@clipboard_lines)
+ {
+ if ($w->OverstrikeMode)
+ {
+ #figure out start and end indexes to delete, compensating for tabs.
+ $string = $w->get($current_line.'.0', $current_line.'.0 lineend');
+ $string = expand($string);
+ $string = substr($string, 0, $current_column);
+ $string = unexpand($string);
+ $delete_start_column = length($string);
+
+ $string = $w->get($current_line.'.0', $current_line.'.0 lineend');
+ $string = expand($string);
+ $string = substr($string, 0, $current_column + length($line));
+ chomp($string); # dont delete a "\n" on end of line.
+ $string = unexpand($string);
+ $delete_end_column = length($string);
+
+
+
+ $w->delete(
+ $current_line.'.'.$delete_start_column ,
+ $current_line.'.'.$delete_end_column
+ );
+ }
+
+ $string = $w->get($current_line.'.0', $current_line.'.0 lineend');
+ $string = expand($string);
+ $string = substr($string, 0, $current_column);
+ $string = unexpand($string);
+ $insert_column_index = length($string);
+
+ $w->insert($current_line.'.'.$insert_column_index, unexpand($line));
+ $current_line++;
+ }
+
+}
+
+# Backward compatibility
+sub GetMenu
+{
+ carp((caller(0))[3]." is deprecated") if $^W;
+ shift->menu
+}
+
+1;
+__END__
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Text.pod b/Master/tlpkg/tlperl/lib/Tk/Text.pod
new file mode 100644
index 00000000000..3f266979ed3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Text.pod
@@ -0,0 +1,2220 @@
+# Copyright (c) 1992 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# Copyright (c) 2002 O'Reilly & Associates Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Text - Create and manipulate Text widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+B<text> $text ?I<options>?
+
+B<-background> B<-highlightbackground> B<-insertontime> B<-selectborderwidth>
+B<-borderwidth> B<-highlightcolor> B<-insertwidth> B<-selectforeground>
+B<-cursor> B<-highlightthickness> B<-padx> B<-setgrid>
+B<-exportselection> B<-insertbackground> B<-pady> B<-takefocus>
+B<-font> B<-insertborderwidth> B<-relief> B<-xscrollcommand>
+B<-foreground> B<-insertofftime> B<-selectbackground> B<-yscrollcommand>
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies the desired height for the window, in units of characters
+in the font given by the B<-font> option.
+Must be at least one.
+
+=item Name: B<spacing1>
+
+=item Class: B<Spacing1>
+
+=item Switch: B<-spacing1>
+
+Requests additional space above each text line in the widget,
+using any of the standard forms for screen distances.
+If a line wraps, this option only applies to the first line
+on the display.
+This option may be overriden with B<-spacing1> options in
+tags.
+
+=item Name: B<spacing2>
+
+=item Class: B<Spacing2>
+
+=item Switch: B<-spacing2>
+
+For lines that wrap (so that they cover more than one line on the
+display) this option specifies additional space to provide between
+the display lines that represent a single line of text.
+The value may have any of the standard forms for screen distances.
+This option may be overriden with B<-spacing2> options in
+tags.
+
+=item Name: B<spacing3>
+
+=item Class: B<Spacing3>
+
+=item Switch: B<-spacing3>
+
+Requests additional space below each text line in the widget,
+using any of the standard forms for screen distances.
+If a line wraps, this option only applies to the last line
+on the display.
+This option may be overriden with B<-spacing3> options in
+tags.
+
+=item Name: B<state>
+
+=item Class: B<State>
+
+=item Switch: B<-state>
+
+Specifies one of two states for the text: B<normal> or B<disabled>.
+If the text is disabled then characters may not be inserted or deleted
+and no insertion cursor will be displayed, even if the input focus is
+in the widget.
+
+=item Name: B<tabs>
+
+=item Class: B<Tabs>
+
+=item Switch: B<-tabs>
+
+Specifies a set of tab stops for the window. The option's value consists
+of a list of screen distances giving the positions of the tab stops. Each
+position may optionally be followed in the next list element
+by one of the keywords B<left>, B<right>, B<center>,
+or B<numeric>, which specifies how to justify
+text relative to the tab stop. B<Left> is the default; it causes
+the text following the tab character to be positioned with its left edge
+at the tab position. B<Right> means that the right edge of the text
+following the tab character is positioned at the tab position, and
+B<center> means that the text is centered at the tab position.
+B<Numeric> means that the decimal point in the text is positioned
+at the tab position; if there is no decimal point then the least
+significant digit of the number is positioned just to the left of the
+tab position; if there is no number in the text then the text is
+right-justified at the tab position.
+For example, B<-tabs =E<gt> [qw/2c left 4c 6c center/]> creates three
+tab stops at two-centimeter intervals; the first two use left
+justification and the third uses center justification.
+If the list of tab stops does not have enough elements to cover all
+of the tabs in a text line, then Tk extrapolates new tab stops using
+the spacing and alignment from the last tab stop in the list.
+The value of the B<tabs> option may be overridden by B<-tabs>
+options in tags.
+If no B<-tabs> option is specified, or if it is specified as
+an empty list, then Tk uses default tabs spaced every eight
+(average size) characters.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired width for the window in units of characters
+in the font given by the B<-font> option.
+If the font doesn't have a uniform width then the width of the
+character ``0'' is used in translating from character units to
+screen units.
+
+=item Name: B<wrap>
+
+=item Class: B<Wrap>
+
+=item Switch: B<-wrap>
+
+Specifies how to handle lines in the text that are too long to be
+displayed in a single line of the text's window.
+The value must be B<none> or B<char> or B<word>.
+A wrap mode of B<none> means that each line of text appears as
+exactly one line on the screen; extra characters that don't fit
+on the screen are not displayed.
+In the other modes each line of text will be broken up into several
+screen lines if necessary to keep all the characters visible.
+In B<char> mode a screen line break may occur after any character;
+in B<word> mode a line break will only be made at word boundaries.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Text> method creates a new window (given by the
+$text argument) and makes it into a text widget.
+Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the text such as its default background color
+and relief. The B<text> command returns the
+path name of the new window.
+
+A text widget displays one or more lines of text and allows that
+text to be edited.
+Text widgets support four different kinds of annotations on the
+text, called tags, marks, embedded windows or embedded images.
+Tags allow different portions of the text
+to be displayed with different fonts and colors.
+In addition, L<perl/Tk callbacks|Tk::callbacks> can be associated with tags so
+that scripts are invoked when particular actions such as keystrokes
+and mouse button presses occur in particular ranges of the text.
+See L<"TAGS"> below for more details.
+
+The second form of annotation consists of marks, which are floating
+markers in the text.
+Marks are used to keep track of various interesting positions in the
+text as it is edited.
+See L<"MARKS"> below for more details.
+
+The third form of annotation allows arbitrary windows to be
+embedded in a text widget.
+See L<"EMBEDDED WINDOWS"> below for more details.
+
+The fourth form of annotation allows Tk images to be embedded in a text
+widget.
+See L<"EMBEDDED IMAGES"> below for more details.
+
+The Perl/Tk B<Text> widget does not support undo/redo, use the B<TextUndo>
+widget instead.
+
+=head1 INDICES
+
+Many of the methods for texts take one or more indices
+as arguments.
+An index is a string used to indicate a particular place within
+a text, such as a place to insert characters or one endpoint of a
+range of characters to delete.
+Indices have the syntax
+
+ base modifier modifier modifier ...
+
+Where I<base> gives a starting point and the I<modifier>s
+adjust the index from the starting point (e.g. move forward or
+backward one character). Every index must contain a I<base>,
+but the I<modifier>s are optional.
+
+The I<base> for an index must have one of the following forms:
+
+=over 4
+
+=item I<line>B<.>I<char>
+
+Indicates I<char>'th character on line I<line>.
+Lines are numbered from 1 for consistency with other UNIX programs
+that use this numbering scheme.
+Within a line, characters are numbered from 0.
+If I<char> is B<end> then it refers to the newline character
+that ends the line.
+
+=item B<@>I<x>B<,>I<y>
+
+Indicates the character that covers the pixel whose x and y coordinates
+within the text's window are I<x> and I<y>.
+
+=item B<end>
+
+Indicates the end of the text (the character just after the last
+newline).
+
+=item I<mark>
+
+Indicates the character just after the mark whose name is I<mark>.
+
+=item I<tag>B<.first>
+
+Indicates the first character in the text that has been tagged with
+I<tag>.
+This form generates an error if no characters are currently tagged
+with I<tag>.
+
+=item I<tag>B<.last>
+
+Indicates the character just after the last one in the text that has
+been tagged with I<tag>.
+This form generates an error if no characters are currently tagged
+with I<tag>.
+
+=item I<$widget>
+
+Indicates the position of the embedded window referenced by I<$widget>.
+This form generates an error if I<$widget> does not reference to an
+embedded window.
+
+=item I<imageName>
+
+Indicates the position of the embedded image whose name is
+I<imageName>.
+This form generates an error if there is no embedded image
+by the given name.
+
+If the I<base> could match more than one of the above forms, such
+as a I<mark> and I<imageName> both having the same value, then
+the form earlier in the above list takes precedence.
+If modifiers follow the base index, each one of them must have one
+of the forms listed below. Keywords such as B<chars> and B<wordend>
+may be abbreviated as long as the abbreviation is unambiguous.
+
+=item B<+ >I<count>B< chars>
+
+Adjust the index forward by I<count> characters, moving to later
+lines in the text if necessary. If there are fewer than I<count>
+characters in the text after the current index, then set the index
+to the last character in the text.
+Spaces on either side of I<count> are optional.
+
+=item B<- >I<count>B< chars>
+
+Adjust the index backward by I<count> characters, moving to earlier
+lines in the text if necessary. If there are fewer than I<count>
+characters in the text before the current index, then set the index
+to the first character in the text.
+Spaces on either side of I<count> are optional.
+
+=item B<+ >I<count>B< lines>
+
+Adjust the index forward by I<count> lines, retaining the same
+character position within the line. If there are fewer than I<count>
+lines after the line containing the current index, then set the index
+to refer to the same character position on the last line of the text.
+Then, if the line is not long enough to contain a character at the indicated
+character position, adjust the character position to refer to the last
+character of the line (the newline).
+Spaces on either side of I<count> are optional.
+
+=item B<- >I<count>B< lines>
+
+Adjust the index backward by I<count> lines, retaining the same
+character position within the line. If there are fewer than I<count>
+lines before the line containing the current index, then set the index
+to refer to the same character position on the first line of the text.
+Then, if the line is not long enough to contain a character at the indicated
+character position, adjust the character position to refer to the last
+character of the line (the newline).
+Spaces on either side of I<count> are optional.
+
+=item B<linestart>
+
+Adjust the index to refer to the first character on the line.
+
+=item B<lineend>
+
+Adjust the index to refer to the last character on the line (the newline).
+
+=item B<wordstart>
+
+Adjust the index to refer to the first character of the word containing
+the current index. A word consists of any number of adjacent characters
+that are letters, digits, or underscores, or a single character that
+is not one of these.
+
+=item B<wordend>
+
+Adjust the index to refer to the character just after the last one of the
+word containing the current index. If the current index refers to the last
+character of the text then it is not modified.
+
+If more than one modifier is present then they are applied in
+left-to-right order. For example, the index ``B<end - 1 chars>''
+refers to the next-to-last character in the text and
+``B<insert wordstart - 1 c>'' refers to the character just before
+the first one in the word containing the insertion cursor.
+
+=back
+
+=head1 TAGS
+
+The first form of annotation in text widgets is a tag.
+A tag is a textual string that is associated with some of the characters
+in a text.
+Tags may contain arbitrary characters, but it is probably best to
+avoid using the the characters `` '' (space), B<+>, or B<->:
+these characters have special meaning in indices, so tags containing
+them can't be used as indices.
+There may be any number of tags associated with characters in a
+text.
+Each tag may refer to a single character, a range of characters, or
+several ranges of characters.
+An individual character may have any number of tags associated with it.
+
+A priority order is defined among tags, and this order is used in
+implementing some of the tag-related functions described below.
+When a tag is defined (by associating it with characters or setting
+its display options or binding callbacks to it), it is given
+a priority higher than any existing tag.
+The priority order of tags may be redefined using the
+``I<$text>-E<gt>B<tagRaise>'' and ``I<$text>-E<gt>B<tagLower>''
+methods.
+
+Tags serve three purposes in text widgets.
+First, they control the way information is displayed on the screen.
+By default, characters are displayed as determined by the
+B<background>, B<font>, and B<foreground> options for the
+text widget.
+However, display options may be associated with individual tags
+using the ``I<$text>-E<gt>B<tagConfigure>'' method.
+If a character has been tagged, then the display options associated
+with the tag override the default display style.
+The following options are currently supported for tags:
+
+=over 4
+
+=item B<-background> =E<gt> I<color>
+
+I<Color> specifies the background color to use for characters
+associated with the tag.
+It may have any of the forms accepted by B<Tk_GetColor>.
+
+=item B<-bgstipple> =E<gt> I<bitmap>
+
+I<Bitmap> specifies a bitmap that is used as a stipple pattern
+for the background.
+It may have any of the forms accepted by B<Tk_GetBitmap>.
+If I<bitmap> hasn't been specified, or if it is specified
+as an empty string, then a solid fill will be used for the
+background.
+
+=item B<-borderwidth> =E<gt> I<pixels>
+
+I<Pixels> specifies the width of a 3-D border to draw around
+the background.
+It may have any of the forms accepted by B<Tk_GetPixels>.
+This option is used in conjunction with the B<-relief>
+option to give a 3-D appearance to the background for characters;
+it is ignored unless the B<-background> option
+has been set for the tag.
+
+=item B<-elide> =E<gt> boolean
+
+Elide specifies whether the data should be elided. Elided data
+is not displayed and takes no space on screen, but further on
+behaves just as normal data.
+
+=item B<-data> =E<gt> I<value>
+
+Allows an arbitrary perl scalar I<value> to be associated with the tag.
+
+=item B<-fgstipple> =E<gt> I<bitmap>
+
+I<Bitmap> specifies a bitmap that is used as a stipple pattern
+when drawing text and other foreground information such as
+underlines.
+It may have any of the forms accepted by B<Tk_GetBitmap>.
+If I<bitmap> hasn't been specified, or if it is specified
+as an empty string, then a solid fill will be used.
+
+=item B<-font> =E<gt> I<fontName>
+
+I<FontName> is the name of a font to use for drawing characters.
+It may have any of the forms accepted by B<Tk_GetFontStruct>.
+
+=item B<-foreground> =E<gt> I<color>
+
+I<Color> specifies the color to use when drawing text and other
+foreground information such as underlines.
+It may have any of the forms accepted by B<Tk_GetColor>.
+
+=item B<-justify> =E<gt> I<justify>
+
+If the first character of a display line has a tag for which this
+option has been specified, then I<justify> determines how to
+justify the line.
+It must be one of B<left>, B<right>, or B<center>.
+If a line wraps, then the justification for each line on the
+display is determined by the first character of that display line.
+
+=item B<-lmargin1> =E<gt> I<pixels>
+
+If the first character of a text line has a tag for which this
+option has been specified, then I<pixels> specifies how
+much the line should be indented from the left edge of the
+window.
+I<Pixels> may have any of the standard forms for screen
+distances.
+If a line of text wraps, this option only applies to the
+first line on the display; the B<-lmargin2> option controls
+the indentation for subsequent lines.
+
+=item B<-lmargin2> =E<gt> I<pixels>
+
+If the first character of a display line has a tag for which this
+option has been specified, and if the display line is not the
+first for its text line (i.e., the text line has wrapped), then
+I<pixels> specifies how much the line should be indented from
+the left edge of the window.
+I<Pixels> may have any of the standard forms for screen
+distances.
+This option is only used when wrapping is enabled, and it only
+applies to the second and later display lines for a text line.
+
+=item B<-offset> =E<gt> I<pixels>
+
+I<Pixels> specifies an amount by which the text's baseline
+should be offset vertically from the baseline of the overall
+line, in pixels.
+For example, a positive offset can be used for superscripts
+and a negative offset can be used for subscripts.
+I<Pixels> may have any of the standard forms for screen
+distances.
+
+=item B<-overstrike> =E<gt> I<boolean>
+
+Specifies whether or not to draw a horizontal rule through
+the middle of characters.
+I<Boolean> may have any of the forms accepted by B<Tk_GetBoolean>.
+
+=item B<-relief> =E<gt> I<relief>
+
+I<Relief> specifies the 3-D relief to use for drawing backgrounds,
+in any of the forms accepted by B<Tk_GetRelief>.
+This option is used in conjunction with the B<-borderwidth>
+option to give a 3-D appearance to the background for characters;
+it is ignored unless the B<-background> option
+has been set for the tag.
+
+=item B<-rmargin> =E<gt> I<pixels>
+
+If the first character of a display line has a tag for which this
+option has been specified, then I<pixels> specifies how wide
+a margin to leave between the end of the line and the right
+edge of the window.
+I<Pixels> may have any of the standard forms for screen
+distances.
+This option is only used when wrapping is enabled.
+If a text line wraps, the right margin for each line on the
+display is determined by the first character of that display
+line.
+
+=item B<-spacing1> =E<gt> I<pixels>
+
+I<Pixels> specifies how much additional space should be
+left above each text line, using any of the standard forms for
+screen distances.
+If a line wraps, this option only applies to the first
+line on the display.
+
+=item B<-spacing2> =E<gt> I<pixels>
+
+For lines that wrap, this option specifies how much additional
+space to leave between the display lines for a single text line.
+I<Pixels> may have any of the standard forms for screen
+distances.
+
+=item B<-spacing3> =E<gt> I<pixels>
+
+I<Pixels> specifies how much additional space should be
+left below each text line, using any of the standard forms for
+screen distances.
+If a line wraps, this option only applies to the last
+line on the display.
+
+=item B<-tabs> =E<gt> I<tabList>
+
+I<TabList> specifies a set of tab stops in the same form
+as for the B<-tabs> option for the text widget. This
+option only applies to a display line if it applies to the
+first character on that display line.
+If this option is specified as an empty string, it cancels
+the option, leaving it unspecified for the tag (the default).
+If the option is specified as a non-empty string that is
+an empty list, such as B<-tabs => " ">, then it requests
+default 8-character tabs as described for the B<tabs>
+widget option.
+
+=item B<-underline> =E<gt> I<boolean>
+
+I<Boolean> specifies whether or not to draw an underline underneath
+characters.
+It may have any of the forms accepted by B<Tk_GetBoolean>.
+
+=item B<-wrap> =E<gt> I<mode>
+
+I<Mode> specifies how to handle lines that are wider than the
+text's window.
+It has the same legal values as the B<-wrap> option
+for the text widget: B<none>, B<char>, or B<word>.
+If this tag option is specified, it overrides the B<-wrap> option
+for the text widget.
+
+=back
+
+If a character has several tags associated with it, and if their
+display options conflict, then the options of the highest priority
+tag are used.
+If a particular display option hasn't been specified for a
+particular tag, or if it is specified as an empty string, then
+that option will never be used; the next-highest-priority
+tag's option will used instead.
+If no tag specifies a particular display option, then the default
+style for the widget will be used.
+
+The second purpose for tags is event bindings.
+You can associate bindings with a tag in much the same way you can
+associate bindings with a widget class: whenever particular X
+events occur on characters with the given tag, a given
+<perl/Tk callback|Tk::callbacks> will be executed.
+Tag bindings can be used to give behaviors to ranges of characters;
+among other things, this allows hypertext-like
+features to be implemented.
+For details, see the description of the B<tagBind> widget
+method below.
+
+The third use for tags is in managing the selection.
+See L<"THE SELECTION"> below.
+
+=head1 MARKS
+
+The second form of annotation in text widgets is a mark.
+Marks are used for remembering particular places in a text.
+They are something like tags, in that they have names and
+they refer to places in the file, but a mark isn't associated
+with particular characters.
+Instead, a mark is associated with the gap between two characters.
+Only a single position may be associated with a mark at any given
+time.
+If the characters around a mark are deleted the mark will still
+remain; it will just have new neighbor characters.
+In contrast, if the characters containing a tag are deleted then
+the tag will no longer have an association with characters in
+the file.
+Marks may be manipulated with the ``I<$text>-E<gt>B<mark>'' text widget
+method, and their current locations may be determined by using the
+mark name as an index in methods.
+
+Each mark also has a I<gravity>, which is either B<left> or
+B<right>.
+The gravity for a mark specifies what happens to the mark when
+text is inserted at the point of the mark.
+If a mark has left gravity, then the mark is treated as if it
+were attached to the character on its left, so the mark will
+remain to the left of any text inserted at the mark position.
+If the mark has right gravity, new text inserted at the mark
+position will appear to the right of the mark. The gravity
+for a mark defaults to B<right>.
+
+The name space for marks is different from that for tags: the
+same name may be used for both a mark and a tag, but they will refer
+to different things.
+
+Two marks have special significance.
+First, the mark B<insert> is associated with the insertion cursor,
+as described under L<"THE INSERTION CURSOR"> below.
+Second, the mark B<current> is associated with the character
+closest to the mouse and is adjusted automatically to track the
+mouse position and any changes to the text in the widget (one
+exception: B<current> is not updated in response to mouse
+motions if a mouse button is down; the update will be deferred
+until all mouse buttons have been released).
+Neither of these special marks may be deleted.
+
+=head1 EMBEDDED WINDOWS
+
+The third form of annotation in text widgets is an embedded window.
+Each embedded window annotation causes a window to be displayed
+at a particular point in the text.
+There may be any number of embedded windows in a text widget,
+and any widget may be used as an embedded window (subject to the
+usual rules for geometry management, which require the text window
+to be the parent of the embedded window or a descendant of its
+parent).
+The embedded window's position on the screen will be updated as the
+text is modified or scrolled, and it will be mapped and unmapped as
+it moves into and out of the visible area of the text widget.
+Each embedded window occupies one character's worth of index space
+in the text widget, and it may be referred to either by the name
+of its embedded window or by its position in the widget's
+index space.
+If the range of text containing the embedded window is deleted then
+the window is destroyed.
+
+When an embedded window is added to a text widget with the
+B<widgetCreate> method, several configuration
+options may be associated with it.
+These options may be modified later with the B<widgetConfigure>
+method.
+The following options are currently supported:
+
+=over 4
+
+=item B<-align> =E<gt> I<where>
+
+If the window is not as tall as the line in which it is displayed,
+this option determines where the window is displayed in the line.
+I<Where> must have one of the values B<top> (align the top of the window
+with the top of the line), B<center> (center the window
+within the range of the line), B<bottom> (align the bottom of the
+window with the bottom of the line's area),
+or B<baseline> (align the bottom of the window with the baseline
+of the line).
+
+=item B<-create> =E<gt> I<callback>
+
+Specifies a L<callback|Tk::callbacks> that may be evaluated to create the window
+for the annotation.
+If no B<-window> option has been specified for the annotation
+this I<callback> will be evaluated when the annotation is about to
+be displayed on the screen.
+I<Callback> must create a window for the annotation and return
+the name of that window as its result.
+If the annotation's window should ever be deleted, I<callback>
+will be evaluated again the next time the annotation is displayed.
+
+=item B<-padx> =E<gt> I<pixels>
+
+I<Pixels> specifies the amount of extra space to leave on
+each side of the embedded window.
+It may have any of the usual forms defined for a screen distance
+(see B<Tk_GetPixels>).
+
+=item B<-pady> =E<gt> I<pixels>
+
+I<Pixels> specifies the amount of extra space to leave on
+the top and on the bottom of the embedded window.
+It may have any of the usual forms defined for a screen distance
+(see B<Tk_GetPixels>).
+
+=item B<-stretch> =E<gt> I<boolean>
+
+If the requested height of the embedded window is less than the
+height of the line in which it is displayed, this option can be
+used to specify whether the window should be stretched vertically
+to fill its line.
+If the B<-pady> option has been specified as well, then the
+requested padding will be retained even if the window is
+stretched.
+
+=item B<-window> =E<gt> I<$widget>
+
+Specifies the name of a window to display in the annotation.
+
+=back
+
+=head1 EMBEDDED IMAGES
+
+The final form of annotation in text widgets is an embedded image.
+Each embedded image annotation causes an image to be displayed
+at a particular point in the text.
+There may be any number of embedded images in a text widget,
+and a particular image may be embedded in multiple places in the same
+text widget.
+The embedded image's position on the screen will be updated as the
+text is modified or scrolled.
+Each embedded image occupies one character's worth of index space
+in the text widget, and it may be referred to either by
+its position in the widget's index space, or the name it is assigned
+when the image is inserted into the text widget with B<imageCreate>.
+If the range of text containing the embedded image is deleted then
+that copy of the image is removed from the screen.
+
+When an embedded image is added to a text widget with the B<image>
+create method, a name unique to this instance of the image
+is returned. This name may then be used to refer to this image
+instance. The name is taken to be the value of the B<-name> option
+(described below). If the B<-name> option is not provided, the
+B<-image> name is used instead. If the I<imageName> is already
+in use in the text widget, then B<#>I<nn> is added to the end of the
+I<imageName>, where I<nn> is an arbitrary integer. This insures
+the I<imageName> is unique.
+Once this name is assigned to this instance of the image, it does not
+change, even though the B<-image> or B<-name> values can be changed
+with B<image configure>.
+
+When an embedded image is added to a text widget with the
+B<imageCreate> method, several configuration
+options may be associated with it.
+These options may be modified later with the B<image configure>
+method.
+The following options are currently supported:
+
+=over 4
+
+=item B<-align> =E<gt> I<where>
+
+If the image is not as tall as the line in which it is displayed,
+this option determines where the image is displayed in the line.
+I<Where> must have one of the values B<top> (align the top of the image
+with the top of the line), B<center> (center the image
+within the range of the line), B<bottom> (align the bottom of the
+image with the bottom of the line's area),
+or B<baseline> (align the bottom of the image with the baseline
+of the line).
+
+=item B<-image> =E<gt> I<image>
+
+Specifies the name of the Tk image to display in the annotation.
+If I<image> is not a valid Tk image, then an error is returned.
+
+=item B<-name> =E<gt> I<ImageName>
+
+Specifies the name by which this image instance may be referenced in
+the text widget. If I<ImageName> is not supplied, then the
+name of the Tk image is used instead.
+If the I<imageName> is already in use, I<#nn> is appended to
+the end of the name as described above.
+
+=item B<-padx> =E<gt> I<pixels>
+
+I<Pixels> specifies the amount of extra space to leave on
+each side of the embedded image.
+It may have any of the usual forms defined for a screen distance.
+
+=item B<-pady> =E<gt> I<pixels>
+
+I<Pixels> specifies the amount of extra space to leave on
+the top and on the bottom of the embedded image.
+It may have any of the usual forms defined for a screen distance.
+
+=back
+
+=head1 THE SELECTION
+
+Selection support is implemented via tags.
+If the B<exportSelection> option for the text widget is true
+then the B<sel> tag will be associated with the selection:
+
+=over 4
+
+=item [1]
+
+Whenever characters are tagged with B<sel> the text widget
+will claim ownership of the selection.
+
+=item [2]
+
+Attempts to retrieve the
+selection will be serviced by the text widget, returning all the
+characters with the B<sel> tag.
+
+=item [3]
+
+If the selection is claimed away by another application or by another
+window within this application, then the B<sel> tag will be removed
+from all characters in the text.
+
+=item [4]
+
+Whenever the sel tag range changes a virtual event B<<<Selection>>>
+is generated.
+
+The B<sel> tag is automatically defined when a text widget is
+created, and it may not be deleted with the ``I<$text>-E<gt>B<tagDelete>''
+method. Furthermore, the B<selectBackground>,
+B<selectBorderWidth>, and B<selectForeground> options for
+the text widget are tied to the B<-background>,
+B<-borderwidth>, and B<-foreground> options for the B<sel>
+tag: changes in either will automatically be reflected in the
+other.
+
+=back
+
+=head1 THE INSERTION CURSOR
+
+The mark named B<insert> has special significance in text widgets.
+It is defined automatically when a text widget is created and it
+may not be unset with the ``I<$text>-E<gt>B<markUnset>'' widget
+command.
+The B<insert> mark represents the position of the insertion
+cursor, and the insertion cursor will automatically be drawn at
+this point whenever the text widget has the input focus.
+
+=head1 THE MODIFIED FLAG
+
+The text widget can keep track of changes to the content of the widget
+by means of the modified flag. Inserting or deleting text will set this
+flag. The flag can be queried, set and cleared programatically as well.
+Whenever the flag changes state a B<<<Modified>>> virtual event is gener-
+ated. See the edit modified widget command for more details.
+
+
+=head1 WIDGET METHODS
+
+The B<Text> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for text widgets.
+In addition, the extended text widget methods as documented
+in I<"Mastering Perl/Tk"> are included in this pod (with
+permission from the publisher, B<O'Reilly and Associates Inc.>).
+
+=over 4
+
+=item I<$text>-E<gt>B<adjustSelect>
+
+Moves the end point of the selection and anchor point to the
+mouse pointer location.
+
+=item I<$text>-E<gt>B<bbox>(I<index>)
+
+Returns a list of four elements describing the screen area
+of the character given by I<index>.
+The first two elements of the list give the x and y coordinates
+of the upper-left corner of the area occupied by the
+character, and the last two elements give the width and height
+of the area.
+If the character is only partially visible on the screen, then
+the return value reflects just the visible part.
+If the character is not visible on the screen then the return
+value is an empty list.
+
+=item I<$text>-E<gt>B<clipboardColumnCopy>
+
+Performs a rectangular copy of the currently selected text with
+basic compensation for tab characters.
+
+=item I<$text>-E<gt>B<clipboardColumnCut>
+
+Performs a rectangular cut of the currently selected text with
+basic compensation for tab characters.
+
+=item I<$text>-E<gt>B<clipboardColumnPaste>
+
+Performs a rectangular paste of the text in the clipboard. The
+upper-left corner is specified by the current position of the
+insert mark with basic compensation for tab characters.
+
+=item I<$text>-E<gt>B<compare>(I<index1, op, index2>)
+
+Compares the indices given by I<index1> and I<index2> according
+to the relational operator given by I<op>, and returns 1 if
+the relationship is satisfied and 0 if it isn't.
+I<Op> must be one of the operators E<lt>, E<lt>=, ==, E<gt>=, E<gt>, or !=.
+If I<op> is == then 1 is returned if the two indices refer to
+the same character, if I<op> is E<lt> then 1 is returned if I<index1>
+refers to an earlier character in the text than I<index2>, and
+so on.
+
+=item I<$text>-E<gt>B<Contents>(I<?args>?)
+
+Query or change the entire contents of the text widget. If no
+arguments are given, the entire contents of the text widget are
+returned. If any arguments are given, the entire contents of the
+text widget are deleted and replaced by the argument list.
+
+=item I<$text>-E<gt>B<debug>(?I<boolean>?)
+
+If I<boolean> is specified, then it must have one of the true or
+false values accepted by Tcl_GetBoolean.
+If the value is a true one then internal consistency checks will be
+turned on in the B-tree code associated with text widgets.
+If I<boolean> has a false value then the debugging checks will
+be turned off.
+In either case the command returns an empty string.
+If I<boolean> is not specified then the command returns B<on>
+or B<off> to indicate whether or not debugging is turned on.
+There is a single debugging switch shared by all text widgets: turning
+debugging on or off in any widget turns it on or off for all widgets.
+For widgets with large amounts of text, the consistency checks may
+cause a noticeable slow-down.
+
+=item I<$text>-E<gt>B<delete>(I<index1, >?I<index2>?)
+
+Delete a range of characters from the text.
+If both I<index1> and I<index2> are specified, then delete
+all the characters starting with the one given by I<index1>
+and stopping just before I<index2> (i.e. the character at
+I<index2> is not deleted).
+If I<index2> doesn't specify a position later in the text
+than I<index1> then no characters are deleted.
+If I<index2> isn't specified then the single character at
+I<index1> is deleted.
+It is not allowable to delete characters in a way that would leave
+the text without a newline as the last character.
+The command returns an empty string.
+If more indices are given, multiple ranges of text will
+be deleted. All indices are first checked for validity before
+any deletions are made. They are sorted and the text is removed
+from the last range to the first range to deleted text does not
+cause a undesired index shifting side-effects. If multiple
+ranges with the same start index are given, then the longest
+range is used. If overlapping ranges are given, then they will
+be merged into spans that do not cause deletion of text outside
+the given ranges due to text shifted during deletion.
+
+=item I<$text>-E<gt>B<deleteSelected>
+
+Delete the currently selected text.
+
+=item I<$text>-E<gt>B<deleteTextTaggedWith>(I<tag>)
+
+Delete the text tagged with the I<tag> parameter.
+
+=item I<$text>-E<gt>B<deleteToEndofLine>
+
+Delete from the insert mark location to the end of line.
+
+=item I<$text>-E<gt>B<dlineinfo>(I<index>)
+
+Returns a list with five elements describing the area occupied
+by the display line containing I<index>.
+The first two elements of the list give the x and y coordinates
+of the upper-left corner of the area occupied by the
+line, the third and fourth elements give the width and height
+of the area, and the fifth element gives the position of the baseline
+for the line, measured down from the top of the area.
+All of this information is measured in pixels.
+If the current wrap mode is B<none> and the line extends beyond
+the boundaries of the window,
+the area returned reflects the entire area of the line, including the
+portions that are out of the window.
+If the line is shorter than the full width of the window then the
+area returned reflects just the portion of the line that is occupied
+by characters and embedded windows.
+If the display line containing I<index> is not visible on
+the screen then the return value is an empty list.
+
+=item I<$text>-E<gt>B<dump>(?I<switches>?, I<index1, >?I<index2>?)
+
+Return the contents of the text widget from I<index1> up to,
+but not including I<index2>,
+including the text and
+information about marks, tags, and embedded windows.
+If I<index2> is not specified, then it defaults to
+one character past I<index1>. The information is returned
+in the following format:
+
+I<key1 value1 index1 key2 value2 index2> ...
+
+The possible I<key> values are B<text>, B<mark>,
+B<tagon>, B<tagoff>, and I<$text>. The corresponding
+I<value> is the text, mark name, tag name, or window name.
+The I<index> information is the index of the
+start of the text, the mark, the tag transition, or the window.
+One or more of the following switches (or abbreviations thereof)
+may be specified to control the dump:
+
+=over 4
+
+=item B<-all>
+
+Return information about all elements: text, marks, tags, and windows.
+This is the default.
+
+=item B<-command> =E<gt> I<callback>
+
+Instead of returning the information as the result of the dump operation,
+invoke the I<callback> on each element of the text widget within the range.
+The callback has three arguments appended to it before it is evaluated:
+the I<key>, I<value>, and I<index>.
+
+=item B<-mark>
+
+Include information about marks in the dump results.
+
+=item B<-tag>
+
+Include information about tag transitions in the dump results. Tag information is
+returned as B<tagon> and B<tagoff> elements that indicate the
+begin and end of each range of each tag, respectively.
+
+=item B<-text>
+
+Include information about text in the dump results. The value is the
+text up to the next element or the end of range indicated by I<index2>.
+A text element does not span newlines. A multi-line block of text that
+contains no marks or tag transitions will still be dumped as a set
+of text seqments that each end with a newline. The newline is part
+of the value.
+
+=item B<-window>
+
+=back
+
+Include information about embedded windows in the dump results.
+The value of a window is its Tk pathname, unless the window
+has not been created yet. (It must have a create script.)
+In this case an empty string is returned, and you must query the
+window by its index position to get more information.
+
+=item I<$text>-E<gt>B<edit>( I< option, ?arg, arg ...?> );
+
+This command controls the undo mechanism and the modified flag.
+The exact behavior of the command depends on the option argument
+that follows the edit argument. The following forms of the command
+are currently supported:
+
+=over 4
+
+=item I<$text>-E<gt>B<editModified>( ?boolean? );
+
+If boolean is not specified, returns the modified flag of
+the widget. The insert, delete, edit undo and edit redo
+commands or the user can set or clear the modified flag.
+If boolean is specified, sets the modified flag of the
+widget to boolean.
+
+=item I<$text>-E<gt>B<editRedo>;
+
+(Not implemented, use B<TextUndo>.) When the B<-undo> option is true,
+reapplies the last undone edits provided no other edits were done
+since then. Generates an error when the redo stack is empty. Does
+nothing when the B<-undo> option is false.
+
+=item I<$text>-E<gt>B<editReset>;
+
+(Not implemented, use B<TextUndo>.) Clears the undo and redo stacks.
+
+=item I<$text>-E<gt>B<editSeparator>;
+
+(Not implemented, use B<TextUndo>.) Inserts a separator (boundary) on
+the undo stack. Does nothing when the -undo option is false.
+
+=item I<$text>-E<gt>B<editUndo>;
+
+(Not implemented, use B<TextUndo>.) Undoes the last edit action when
+the -undo option is true. An edit action is defined as all the insert
+and delete commands that are recorded on the undo stack in between two
+separators. Generates an error when the undo stack is empty. Does
+nothing when the -undo option is false.
+
+=back
+
+=item I<$text>-E<gt>B<FindAll>(I<mode, case, pattern>)
+
+Removes any current selections and then performs a global text
+search. All matches are tagged with the B<sel> tag.
+
+I<mode> can be be B<-exact> or B<-regexp>. See the B<search> command
+for more information
+
+I<case> can be B<-nocase> or B<-case>. See the B<search> command
+for more information
+
+I<pattern> is an exact string to match if I<mode> is B<-exact> or a
+regular expression if the match I<mode> is B<-regexp>.
+
+
+=item I<$text>-E<gt>B<FindAndReplaceAll>(I<mode, case, find, replace>)
+
+Same as the B<FindAll> method, however additionally substitutes the
+matched text with the characters I<replace>.
+
+=item I<$text>-E<gt>B<FindAndReplacePopUp>
+
+Creates a find-and-replace popup window if one does not already exist.
+If there is currently selected text, then the 'find' field will be
+'pre-filled' with the selection.
+
+=item I<$text>-E<gt>B<FindNext>(I<direction, mode, case, pattern>)
+
+Removes any current selections and then performs a forward or reverse
+text search. All matches are tagged with the B<sel> tag. I<direction>
+can be B<-forwards> or B<-backwards>. I<mode, case> and I<pattern> are
+as for the B<FindAll> method.
+
+=item I<$text>-E<gt>B<FindPopUp>
+
+Creates a find popup, if one does not yet exist. If there is currently
+selected text, then the 'find' field will be 'pre-filled' with the
+selection.
+
+=item I<$text>-E<gt>B<FindSelectionNext>
+
+Gets the currently selected text and removes all selections. It then
+finds the next exact, case-sensitive string that matches in a forward
+direction and selects the text and makes the new selection visible.
+
+=item I<$text>-E<gt>B<FindSelectionPrevious>
+
+Gets the currently selected text and removes all selections. It then
+finds the next exact, case-sensitive string that matches in a reverse
+direction and selects the text and makes the new selection visible.
+
+=item I<$text>-E<gt>B<get>(I<index1, >?I<index2>?)
+
+Return a range of characters from the text. The return value will be
+all the characters in the text starting with the one whose index is
+I<index1> and ending just before the one whose index is I<index2> (the
+character at I<index2> will not be returned). If I<index2> is omitted
+then the single character at I<index1> is returned. If there are no
+characters in the specified range (e.g. I<index1> is past the end of
+the file or I<index2> is less than or equal to I<index1>) then an
+empty string is returned. If the specified range contains embedded
+windows, no information about them is included in the returned string.
+If multiple index pairs are given, multiple ranges of text will be
+returned in a list. Invalid ranges will not be represented with empty
+strings in the list. The ranges are returned in the order passed to
+B<get>.
+
+=item I<$text>-E<gt>B<getSelected>
+
+Return the currently selected text.
+
+=item I<$text>-E<gt>B<GetTextTaggedWith>(I<tag>)
+
+Return the text tagged with the I<tag> parameter.
+
+=item I<$text>-E<gt>B<GotoLineNumber>(I<line_number>)
+
+Set the insert mark to I<line_number> and ensures the line is
+visible.
+
+=item I<$text>-E<gt>B<GotoLineNumberPopUp>(I<line_number>)
+
+Displays a popup, pre-filling it with selected numeric text
+(if any), or the line number from B<GotoLineNumber> (if any).
+
+=item I<$text>-E<gt>B<image>(I<option>, ?I<arg, arg, ...>?)
+
+=item I<$text>-E<gt>B<image>I<Option>(?I<arg, arg, ...>?)
+
+This method is used to manipulate embedded images.
+The behavior of the method depends on the I<option> argument
+that follows the B<image> prefix.
+The following forms of the methods are currently supported:
+
+=over 8
+
+=item I<$text>-E<gt>B<imageCget>(I<index, option>)
+
+Returns the value of a configuration option for an embedded image.
+I<Index> identifies the embedded image, and I<option>
+specifies a particular configuration option, which must be one of
+the ones listed in L<"EMBEDDED IMAGES">.
+
+=item I<$text>-E<gt>B<imageConfigure>(I<index, >?I<option, value, ...>?)
+
+Query or modify the configuration options for an embedded image.
+If no I<option> is specified, returns a list describing all of
+the available options for the embedded image at I<index>
+(see L<Tk::options> for information on the format of this list).
+If I<option> is specified with no I<value>, then the command
+returns a list describing the one named option (this list will be
+identical to the corresponding sublist of the value returned if no
+I<option> is specified).
+If one or more I<option-value> pairs are specified, then the command
+modifies the given option(s) to have the given value(s); in
+this case the command returns an empty string.
+See L<"EMBEDDED IMAGES"> for information on the options that
+are supported.
+
+=item I<$text>-E<gt>B<imageCreate>(I<index, >?I<option, value, ...>?)
+
+This command creates a new image annotation, which will appear
+in the text at the position given by I<index>.
+Any number of I<option-value> pairs may be specified to
+configure the annotation.
+Returns a unique identifier that may be used as an index to refer to
+this image.
+See L<"EMBEDDED IMAGES"> for information on the options that
+are supported, and a description of the identifier returned.
+
+=item I<$text>-E<gt>B<imageNames>
+
+Returns a list whose elements are the names of all image instances currently
+embedded in $text.
+
+=back
+
+=item I<$text>-E<gt>B<index>(I<index>)
+
+Returns the position corresponding to I<index> in the form
+I<line.char> where I<line> is the line number and I<char>
+is the character number.
+I<Index> may have any of the forms described under L<"INDICES"> above.
+
+=item I<$text>-E<gt>B<insert>(I<index, chars, >?I<tagList, chars, tagList, ...>?)
+
+Inserts all of the I<chars> arguments just before the character at
+I<index>.
+If I<index> refers to the end of the text (the character after
+the last newline) then the new text is inserted just before the
+last newline instead.
+If there is a single I<chars> argument and no I<tagList>, then
+the new text will receive any tags that are present on both the
+character before and the character after the insertion point; if a tag
+is present on only one of these characters then it will not be
+applied to the new text.
+If I<tagList> is specified then it consists of a list of
+tag names; the new characters will receive all of the tags in
+this list and no others, regardless of the tags present around
+the insertion point.
+If multiple I<chars>-I<tagList> argument pairs are present,
+they produce the same effect as if a separate B<insert> widget
+command had been issued for each pair, in order.
+The last I<tagList> argument may be omitted.
+
+=item I<$text>-E<gt>B<Insert>(I<string>)
+
+Do NOT confuse this with the lower-case B<insert> method.
+Insert I<string> at the point of the insertion cursor. If there is
+a selection in the text, and it covers the point of the insertion
+cursor, then it deletes the selection before inserting.
+
+=item I<$text>-E<gt>B<InsertKeypress>(I<character>)
+
+Inserts I<character> at the B<insert> mark. If in overstrike mode,
+it firsts deletes the character at the B<insert> mark.
+
+=item I<$text>-E<gt>B<InsertSelection>
+
+Inserts the current selection at the B<insert> mark.
+
+=item I<$text>-E<gt>B<insertTab>
+
+Inserts a tab (\t) character at the B<insert> mark.
+
+=item I<$text>-E<gt>B<mark>(I<option, >?I<arg, arg, ...>?)
+
+This command is used to manipulate marks. The exact behavior of
+the command depends on the I<option> argument that follows
+the B<mark> argument. The following forms of the command
+are currently supported:
+
+=over 8
+
+=item I<$text>-E<gt>B<markGravity>(I<markName, >?I<direction>?)
+
+If I<direction> is not specified, returns B<left> or B<right>
+to indicate which of its adjacent characters I<markName> is attached
+to.
+If I<direction> is specified, it must be B<left> or B<right>;
+the gravity of I<markName> is set to the given value.
+
+=item I<$text>-E<gt>B<markNames>
+
+Returns a list whose elements are the names of all the marks that
+are currently set.
+
+=item I<$text>-E<gt>B<markNext>(I<index>)
+
+Returns the name of the next mark at or after I<index>.
+If I<index> is specified in numerical form, then the search for
+the next mark begins at that index.
+If I<index> is the name of a mark, then the search for
+the next mark begins immediately after that mark.
+This can still return a mark at the same position if
+there are multiple marks at the same index.
+These semantics mean that the B<mark next> operation can be used to
+step through all the marks in a text widget in the same order
+as the mark information returned by the B<dump> operation.
+If a mark has been set to the special B<end> index,
+then it appears to be I<after> B<end> with respect to the B<mark next> operation.
+An empty string is returned if there are no marks after I<index>.
+
+=item I<$text>-E<gt>B<markPrevious>(I<index>)
+
+Returns the name of the mark at or before I<index>.
+If I<index> is specified in numerical form, then the search for
+the previous mark begins with the character just before that index.
+If I<index> is the name of a mark, then the search for
+the next mark begins immediately before that mark.
+This can still return a mark at the same position if
+there are multiple marks at the same index.
+These semantics mean that the B<mark previous> operation can be used to
+step through all the marks in a text widget in the reverse order
+as the mark information returned by the B<dump> operation.
+An empty string is returned if there are no marks before I<index>.
+
+=item I<$text>-E<gt>B<markSet>(I<markName, index>)
+
+Sets the mark named I<markName> to a position just before the
+character at I<index>.
+If I<markName> already exists, it is moved from its old position;
+if it doesn't exist, a new mark is created.
+This command returns an empty string.
+
+=item I<$text>-E<gt>B<markUnset>(I<markName>?, I<markName, markName, ...>?)
+
+Remove the mark corresponding to each of the I<markName> arguments.
+The removed marks will not be usable in indices and will not be
+returned by future calls to ``I<$text>-E<gt>B<markNames>''.
+This command returns an empty string.
+
+=back
+
+=item I<$text>-E<gt>B<markExists>(I<markname>)
+
+Returns true if I<markname> exists - false otherwise.
+
+=item I<$text>-E<gt>B<menu>(I<?menu?>)
+
+If I<menu> reference is given as an argument, then the text widget
+menu is adjusted to use this new I<menu>. If the I<menu> argument
+is B<undef>, then this command disables the current text widget menu.
+If the I<menu> argument is omitted altogether, then the current text
+widget menu reference is returned.
+
+=item I<$text>-E<gt>B<openLine>
+
+Inserts a newline (\n) at the insert mark.
+
+=item I<$text>-E<gt>B<OverstrikeMode>(I<?boolean?>)
+
+Returns the overstrike mode if I<boolean> is omitted or sets the
+overstrike mode to I<boolean>. True means overstrike mode is enabled.
+
+=item I<$text>-E<gt>B<PostPopupMenu>(I<x,y>)
+
+Creates a popup menu at the specified (I<x,y>) pixel coordinates. The
+default menu has File, Edit, Search and View menu items which cascade
+to sub-menus for further commands. There is an implicit E<lt>Button-3E<gt>
+binding to this method that posts the menu over the cursor.
+
+=item I<$text>-E<gt>B<ResetAnchor>
+
+Sets the selection anchor to whichever end is farthest from the index
+argument.
+
+=item I<$text>-E<gt>B<scan>(I<option>, I<args>) or
+
+=item I<$text>-E<gt>B<scan>I<option>(I<args>)
+
+This method is used to implement scanning on texts. It has
+two forms, depending on I<option>:
+
+=over 8
+
+=item I<$text>-E<gt>B<scanMark>(I<x, y>)
+
+Records I<x> and I<y> and the current view in the text window,
+for use in conjunction with later B<scanDragto> method.
+Typically this method is associated with a mouse button press in
+the widget. It returns an empty string.
+
+=item I<$text>-E<gt>B<scanDragto>(I<x, y>)
+
+This command computes the difference between its I<x> and I<y>
+arguments and the I<x> and I<y> arguments to the last
+B<scanMark> method for the widget.
+It then adjusts the view by 10 times the difference in coordinates.
+This command is typically associated
+with mouse motion events in the widget, to produce the effect of
+dragging the text at high speed through the window. The return
+value is an empty string.
+
+=back
+
+=item I<$text>-E<gt>B<search>(?I<switches>,? I<pattern, index, >?I<stopIndex>?)
+
+Searches the text in I<$text> starting at I<index> for a range
+of characters that matches I<pattern>.
+If a match is found, the index of the first character in the match is
+returned as result; otherwise an empty string is returned.
+One or more of the following switches (or abbreviations thereof)
+may be specified to control the search:
+
+=over 8
+
+=item B<-forwards>
+
+The search will proceed forward through the text, finding the first
+matching range starting at or after the position given by I<index>.
+This is the default.
+
+=item B<-backwards>
+
+The search will proceed backward through the text, finding the
+matching range closest to I<index> whose first character
+is before I<index>.
+
+=item B<-exact>
+
+Use exact matching: the characters in the matching range must be
+identical to those in I<pattern>.
+This is the default.
+
+=item B<-regexp>
+
+Treat I<pattern> as a regular expression and match it against
+the text using the rules for regular expressions (see the B<regexp>
+command for details).
+
+=item B<-nocase>
+
+Ignore case differences between the pattern and the text.
+
+=item B<-count>I< varName>
+
+The argument following B<-count> gives the name of a variable;
+if a match is found, the number of characters in the matching
+range will be stored in the variable.
+
+=item B<-hidden>
+
+Find hidden text as well. By default only displayed text is found.
+
+=item B<-->
+
+This switch has no effect except to terminate the list of switches:
+the next argument will be treated as I<pattern> even if it starts
+with B<->.
+
+=back
+
+=back
+
+The matching range must be entirely within a single line of text.
+For regular expression matching the newlines are removed from the ends
+of the lines before matching: use the B<$> feature in regular
+expressions to match the end of a line.
+For exact matching the newlines are retained.
+If I<stopIndex> is specified, the search stops at that index:
+for forward searches, no match at or after I<stopIndex> will
+be considered; for backward searches, no match earlier in the
+text than I<stopIndex> will be considered.
+If I<stopIndex> is omitted, the entire text will be searched:
+when the beginning or end of the text is reached, the search
+continues at the other end until the starting location is reached
+again; if I<stopIndex> is specified, no wrap-around will occur.
+
+=over 4
+
+=item I<$text>-E<gt>B<see>(I<index>)
+
+Adjusts the view in the window so that the character given by I<index>
+is completely visible.
+If I<index> is already visible then the command does nothing.
+If I<index> is a short distance out of view, the command
+adjusts the view just enough to make I<index> visible at the
+edge of the window.
+If I<index> is far out of view, then the command centers
+I<index> in the window.
+
+=item I<$text>-E<gt>B<selectAll>
+
+Selects all the text in the widget.
+
+=item I<$text>-E<gt>B<selectLine>
+
+Selects the line with the insert mark.
+
+=item I<$text>-E<gt>B<selectWord>
+
+Selects the word with the insert mark.
+
+=item I<$text>-E<gt>B<SetCursor>(I<position>)
+
+Moves the insert mark to I<position>.
+
+=item I<$text>-E<gt>B<tag>(I<option, >?I<arg, arg, ...>?)
+
+This command is used to manipulate tags. The exact behavior of the
+command depends on the I<option> argument that follows the
+B<tag> argument. The following forms of the command are currently
+supported:
+
+=over 8
+
+=item I<$text>-E<gt>B<tagAdd>(I<tagName, index1, >?I<index2, index1, index2, ...>?)
+
+Associate the tag I<tagName> with all of the characters starting
+with I<index1> and ending just before
+I<index2> (the character at I<index2> isn't tagged).
+A single command may contain any number of I<index1>-I<index2>
+pairs.
+If the last I<index2> is omitted then the single character at
+I<index1> is tagged.
+If there are no characters in the specified range (e.g. I<index1>
+is past the end of the file or I<index2> is less than or equal
+to I<index1>) then the command has no effect.
+
+=item I<$text>-E<gt>B<tagBind>(I<tagName, >?I<sequence>?, ?I<script>?)
+
+This command associates I<script> with the tag given by
+I<tagName>.
+Whenever the event sequence given by I<sequence> occurs for a
+character that has been tagged with I<tagName>,
+the script will be invoked.
+This method is similar to the B<bind> command except that
+it operates on characters in a text rather than entire widgets.
+See the L<Tk::bind> documentation for complete details
+on the syntax of I<sequence> and the substitutions performed
+on I<script> before invoking it.
+If all arguments are specified then a new binding is created, replacing
+any existing binding for the same I<sequence> and I<tagName>
+(if the first character of I<script> is ``+'' then I<script>
+augments an existing binding rather than replacing it).
+In this case the return value is an empty string.
+If I<script> is omitted then the command returns the I<script>
+associated with I<tagName> and I<sequence> (an error occurs
+if there is no such binding).
+If both I<script> and I<sequence> are omitted then the command
+returns a list of all the sequences for which bindings have been
+defined for I<tagName>.
+
+The only events for which bindings may be specified are those related
+to the mouse and keyboard (such as B<Enter>, B<Leave>,
+B<ButtonPress>, B<Motion>, and B<KeyPress>) or virtual events.
+Event bindings for a text widget use the B<current> mark described
+under L<"MARKS"> above. An B<Enter> event triggers for a tag when the tag
+first becomes present on the current character, and a B<Leave> event
+triggers for a tag when it ceases to be present on the current character.
+B<Enter> and B<Leave> events can happen either because the
+B<current> mark moved or because the character at that position
+changed. Note that these events are different than B<Enter> and
+B<Leave> events for windows. Mouse and keyboard events are directed
+to the current character. If a virtual event is used in a binding, that
+binding can trigger only if the virtual event is defined by an underlying
+mouse-related or keyboard-related event.
+
+It is possible for the current character to have multiple tags,
+and for each of them to have a binding for a particular event
+sequence.
+When this occurs, one binding is invoked for each tag, in order
+from lowest-priority to highest priority.
+If there are multiple matching bindings for a single tag, then
+the most specific binding is chosen (see the the documentation for
+the B<bind> command for details).
+B<continue> and B<break> commands within binding scripts
+are processed in the same way as for bindings created with
+the B<bind> command.
+
+If bindings are created for the widget as a whole using the
+B<bind> command, then those bindings will supplement the
+tag bindings.
+The tag bindings will be invoked first, followed by bindings
+for the window as a whole.
+
+=item I<$text>-E<gt>B<tagCget>(I<tagName, option>)
+
+This command returns the current value of the option named I<option>
+associated with the tag given by I<tagName>.
+I<Option> may have any of the values accepted by the B<tag configure>
+method.
+
+=item I<$text>-E<gt>B<tagConfigure>(I<tagName, >?I<option>?, ?I<value>?, ?I<option, value, ...>?)
+
+This command is similar to the B<configure> method except
+that it modifies options associated with the tag given by I<tagName>
+instead of modifying options for the overall text widget.
+If no I<option> is specified, the command returns a list describing
+all of the available options for I<tagName>
+(see L<Tk::options> for information on the format of this list).
+If I<option> is specified with no I<value>, then the command returns
+a list describing the one named option (this list will be identical to
+the corresponding sublist of the value returned if no I<option>
+is specified).
+If one or more I<option-value> pairs are specified, then the command
+modifies the given option(s) to have the given value(s) in I<tagName>;
+in this case the command returns an empty string.
+See L<"TAGS"> above for details on the options available for tags.
+
+=item I<$text>-E<gt>B<tagDelete>(I<tagName, >?I<tagName, ...>?)
+
+Deletes all tag information for each of the I<tagName>
+arguments.
+The command removes the tags from all characters in the file
+and also deletes any other information associated with the tags,
+such as bindings and display information.
+The command returns an empty string.
+
+=item I<$text>-E<gt>B<tagLower>(I<tagName>?, I<belowThis>?)
+
+Changes the priority of tag I<tagName> so that it is just lower
+in priority than the tag whose name is I<belowThis>.
+If I<belowThis> is omitted, then I<tagName>'s priority
+is changed to make it lowest priority of all tags.
+
+=item I<$text>-E<gt>B<tagNames>(?I<index>?)
+
+Returns a list whose elements are the names of all the tags that
+are active at the character position given by I<index>.
+If I<index> is omitted, then the return value will describe
+all of the tags that exist for the text (this includes all tags
+that have been named in a ``I<$text>-E<gt>B<tag>'' widget
+command but haven't been deleted by a ``I<$text>-E<gt>B<tagDelete>''
+method, even if no characters are currently marked with
+the tag).
+The list will be sorted in order from lowest priority to highest
+priority.
+
+=item I<$text>-E<gt>B<tagNextrange>(I<tagName, index1, >?I<index2>?)
+
+This command searches the text for a range of characters tagged
+with I<tagName> where the first character of the range is
+no earlier than the character at I<index1> and no later than
+the character just before I<index2> (a range starting at
+I<index2> will not be considered).
+If several matching ranges exist, the first one is chosen.
+The command's return value is a list containing
+two elements, which are the index of the first character of the
+range and the index of the character just after the last one in
+the range.
+If no matching range is found then the return value is an
+empty string.
+If I<index2> is not given then it defaults to the end of the text.
+
+=item I<$text>-E<gt>B<tagPrevrange>(I<tagName, index1, >?I<index2>?)
+
+This command searches the text for a range of characters tagged
+with I<tagName> where the first character of the range is
+before the character at I<index1> and no earlier than
+the character at I<index2> (a range starting at
+I<index2> will be considered).
+If several matching ranges exist, the one closest to I<index1> is chosen.
+The command's return value is a list containing
+two elements, which are the index of the first character of the
+range and the index of the character just after the last one in
+the range.
+If no matching range is found then the return value is an
+empty string.
+If I<index2> is not given then it defaults to the beginning of the text.
+
+=item I<$text>-E<gt>B<tagRaise>(I<tagName, >?I<aboveThis>?)
+
+Changes the priority of tag I<tagName> so that it is just higher
+in priority than the tag whose name is I<aboveThis>.
+If I<aboveThis> is omitted, then I<tagName>'s priority
+is changed to make it highest priority of all tags.
+
+=item I<$text>-E<gt>B<tagRanges>(I<tagName>)
+
+Returns a list describing all of the ranges of text that have been
+tagged with I<tagName>.
+The first two elements of the list describe the first tagged range
+in the text, the next two elements describe the second range, and
+so on.
+The first element of each pair contains the index of the first
+character of the range, and the second element of the pair contains
+the index of the character just after the last one in the
+range.
+If there are no characters tagged with I<tag> then an
+empty string is returned.
+
+=item I<$text>-E<gt>B<tagRemove>(I<tagName, index1, >?I<index2, index1, index2, ...>?)
+
+Remove the tag I<tagName> from all of the characters starting
+at I<index1> and ending just before
+I<index2> (the character at I<index2> isn't affected).
+A single command may contain any number of I<index1>-I<index2>
+pairs.
+If the last I<index2> is omitted then the single character at
+I<index1> is tagged.
+If there are no characters in the specified range (e.g. I<index1>
+is past the end of the file or I<index2> is less than or equal
+to I<index1>) then the command has no effect.
+This command returns an empty string.
+
+=back
+
+=item I<$text>-E<gt>B<ToggleInsertMode>
+
+Toggles the current overstrike mode.
+
+=item I<$text>-E<gt>B<unselectAll>
+
+Unselects all the text in the widget.
+
+=item I<$text>-E<gt>B<WhatLineNumberPopup>
+
+Creates a popup that displays the current line number of the
+insert mark.
+
+=item I<$text>->B<widget>(I<option?, arg, arg, ...>?)
+
+=item I<$text>->B<widget>I<Option>(?I<arg, arg, ...>?)
+
+This method is used to manipulate embedded windows.
+The behavior of the method depends on the I<option> argument
+that follows the B<window> argument.
+The following forms of the method are currently supported:
+
+=over 8
+
+=item I<$text>->B<windowCget>(I<index, option>)
+
+Returns the value of a configuration option for an embedded window.
+I<Index> identifies the embedded window, and I<option>
+specifies a particular configuration option, which must be one of
+the ones listed in L<"EMBEDDED WINDOWS"> above.
+
+=item I<$text>->B<windowConfigure>(I<index>?, I<option, value, ...>?)
+
+Query or modify the configuration options for an embedded window.
+If no I<option> is specified, returns a list describing all of
+the available options for the embedded window at I<index>
+(see L<Tk::options> for information on the format of this list).
+If I<option> is specified with no I<value>, then the command
+returns a list describing the one named option (this list will be
+identical to the corresponding sublist of the value returned if no
+I<option> is specified).
+If one or more I<option-value> pairs are specified, then the command
+modifies the given option(s) to have the given value(s); in
+this case the command returns an empty string.
+See L<"EMBEDDED WINDOWS"> above for information on the options that
+are supported.
+
+=item I<$text>->B<windowCreate>(I<index>?, I<option, value, ...>?)
+
+This command creates a new window annotation, which will appear
+in the text at the position given by I<index>.
+Any number of I<option-value> pairs may be specified to
+configure the annotation.
+See L<"EMBEDDED WINDOWS"> above for information on the options that
+are supported.
+Returns an empty string.
+
+=item I<$text>->B<windowNames>
+
+Returns a list whose elements are the names of all windows currently
+embedded in $text.
+
+=back
+
+=item I<$text>->B<xview>(I<option, args>)
+
+This command is used to query and change the horizontal position of the
+text in the widget's window. It can take any of the following
+forms:
+
+=over 8
+
+=item I<$text>->B<xview>
+
+Returns a list containing two elements.
+Each element is a real fraction between 0 and 1; together they describe
+the portion of the document's horizontal span that is visible in
+the window.
+For example, if the first element is .2 and the second element is .6,
+20% of the text is off-screen to the left, the middle 40% is visible
+in the window, and 40% of the text is off-screen to the right.
+The fractions refer only to the lines that are actually visible in the
+window: if the lines in the window are all very short, so that they
+are entirely visible, the returned fractions will be 0 and 1,
+even if there are other lines in the text that are
+much wider than the window.
+These are the same values passed to scrollbars via the B<-xscrollcommand>
+option.
+
+=item I<$text>-E<gt>B<xviewMoveto>(I<fraction>)
+
+Adjusts the view in the window so that I<fraction> of the horizontal
+span of the text is off-screen to the left.
+I<Fraction> is a fraction between 0 and 1.
+
+=item I<$text>-E<gt>B<xviewScroll>(I<number, what>)
+
+This command shifts the view in the window left or right according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages> or an abbreviation
+of one of these.
+If I<what> is B<units>, the view adjusts left or right by
+I<number> average-width characters on the display; if it is
+B<pages> then the view adjusts by I<number> screenfuls.
+If I<number> is negative then characters farther to the left
+become visible; if it is positive then characters farther to the right
+become visible.
+
+=back
+
+=item I<$text>-E<gt>B<yview>(I<?args>?)
+
+This command is used to query and change the vertical position of the
+text in the widget's window.
+It can take any of the following forms:
+
+=over 8
+
+=item I<$text>-E<gt>B<yview>
+
+Returns a list containing two elements, both of which are real fractions
+between 0 and 1.
+The first element gives the position of the first character in the
+top line in the window, relative to the text as a whole (0.5 means
+it is halfway through the text, for example).
+The second element gives the position of the character just after
+the last one in the bottom line of the window,
+relative to the text as a whole.
+These are the same values passed to scrollbars via the B<-yscrollcommand>
+option.
+
+=item I<$text>-E<gt>B<yviewMoveto>(I<fraction>)
+
+Adjusts the view in the window so that the character given by I<fraction>
+appears on the top line of the window.
+I<Fraction> is a fraction between 0 and 1; 0 indicates the first
+character in the text, 0.33 indicates the character one-third the
+way through the text, and so on.
+
+=item I<$text>-E<gt>B<yviewScroll>(I<number, what>)
+
+This command adjust the view in the window up or down according to
+I<number> and I<what>.
+I<Number> must be an integer.
+I<What> must be either B<units> or B<pages>.
+If I<what> is B<units>, the view adjusts up or down by
+I<number> lines on the display; if it is B<pages> then
+the view adjusts by I<number> screenfuls.
+If I<number> is negative then earlier positions in the text
+become visible; if it is positive then later positions in the text
+become visible.
+
+=item I<$text>->B<yview>(?B<-pickplace>,? I<index>)
+
+Changes the view in the I<$text>'s window to make I<index> visible.
+If the B<-pickplace> option isn't specified then I<index> will
+appear at the top of the window.
+If B<-pickplace> is specified then the widget chooses where
+I<index> appears in the window:
+
+=over 12
+
+=item [1]
+
+If I<index> is already visible somewhere in the window then the
+command does nothing.
+
+=item [2]
+
+If I<index> is only a few lines off-screen above the window then
+it will be positioned at the top of the window.
+
+=item [3]
+
+If I<index> is only a few lines off-screen below the window then
+it will be positioned at the bottom of the window.
+
+=item [4]
+
+Otherwise, I<index> will be centered in the window.
+
+=back
+
+=back
+
+=back
+
+The B<-pickplace> option has been obsoleted by the B<see> widget
+command (B<see> handles both x- and y-motion to make a location
+visible, whereas B<-pickplace> only handles motion in y).
+
+=over 4
+
+=item I<$text>-E<gt>B<yview>(I<number>)
+
+This command makes the first character on the line after
+the one given by I<number> visible at the top of the window.
+I<Number> must be an integer.
+This command used to be used for scrolling, but now it is obsolete.
+
+=back
+
+=head1 BINDINGS
+
+Tk automatically creates class bindings for texts that give them
+the following default behavior.
+In the descriptions below, ``word'' refers to a contiguous group
+of letters, digits, or ``_'' characters, or any single character
+other than these.
+
+=over 4
+
+=item [1]
+
+Clicking mouse button 1 positions the insertion cursor
+just before the character underneath the mouse cursor, sets the
+input focus to this widget, and clears any selection in the widget.
+Dragging with mouse button 1 strokes out a selection between
+the insertion cursor and the character under the mouse.
+
+=item [2]
+
+Double-clicking with mouse button 1 selects the word under the mouse
+and positions the insertion cursor at the beginning of the word.
+Dragging after a double click will stroke out a selection consisting
+of whole words.
+
+=item [3]
+
+Triple-clicking with mouse button 1 selects the line under the mouse
+and positions the insertion cursor at the beginning of the line.
+Dragging after a triple click will stroke out a selection consisting
+of whole lines.
+
+=item [4]
+
+The ends of the selection can be adjusted by dragging with mouse
+button 1 while the Shift key is down; this will adjust the end
+of the selection that was nearest to the mouse cursor when button
+1 was pressed.
+If the button is double-clicked before dragging then the selection
+will be adjusted in units of whole words; if it is triple-clicked
+then the selection will be adjusted in units of whole lines.
+
+=item [5]
+
+Clicking mouse button 1 with the Control key down will reposition the
+insertion cursor without affecting the selection.
+
+=item [6]
+
+If any normal printing characters are typed, they are
+inserted at the point of the insertion cursor.
+
+=item [7]
+
+The view in the widget can be adjusted by dragging with mouse button 2.
+If mouse button 2 is clicked without moving the mouse, the selection
+is copied into the text at the position of the mouse cursor.
+The Insert key also inserts the selection, but at the position of
+the insertion cursor.
+
+=item [8]
+
+If the mouse is dragged out of the widget
+while button 1 is pressed, the entry will automatically scroll to
+make more text visible (if there is more text off-screen on the side
+where the mouse left the window).
+
+=item [9]
+
+The Left and Right keys move the insertion cursor one character to the
+left or right; they also clear any selection in the text.
+If Left or Right is typed with the Shift key down, then the insertion
+cursor moves and the selection is extended to include the new character.
+Control-Left and Control-Right move the insertion cursor by words, and
+Control-Shift-Left and Control-Shift-Right move the insertion cursor
+by words and also extend the selection.
+Control-b and Control-f behave the same as Left and Right, respectively.
+Meta-b and Meta-f behave the same as Control-Left and Control-Right,
+respectively.
+
+=item [10]
+
+The Up and Down keys move the insertion cursor one line up or
+down and clear any selection in the text.
+If Up or Right is typed with the Shift key down, then the insertion
+cursor moves and the selection is extended to include the new character.
+Control-Up and Control-Down move the insertion cursor by paragraphs (groups
+of lines separated by blank lines), and
+Control-Shift-Up and Control-Shift-Down move the insertion cursor
+by paragraphs and also extend the selection.
+Control-p and Control-n behave the same as Up and Down, respectively.
+
+=item [11]
+
+The Next and Prior keys move the insertion cursor forward or backwards
+by one screenful and clear any selection in the text.
+If the Shift key is held down while Next or Prior is typed, then
+the selection is extended to include the new character.
+Control-v moves the view down one screenful without moving the
+insertion cursor or adjusting the selection.
+
+=item [12]
+
+Control-Next and Control-Prior scroll the view right or left by one page
+without moving the insertion cursor or affecting the selection.
+
+=item [13]
+
+Home and Control-a move the insertion cursor to the
+beginning of its line and clear any selection in the widget.
+Shift-Home moves the insertion cursor to the beginning of the line
+and also extends the selection to that point.
+
+=item [14]
+
+End and Control-e move the insertion cursor to the
+end of the line and clear any selection in the widget.
+Shift-End moves the cursor to the end of the line and extends the selection
+to that point.
+
+=item [15]
+
+Control-Home and Meta-E<lt> move the insertion cursor to the beginning of
+the text and clear any selection in the widget.
+Control-Shift-Home moves the insertion cursor to the beginning of the text
+and also extends the selection to that point.
+
+=item [16]
+
+Control-End and Meta-E<gt> move the insertion cursor to the end of the
+text and clear any selection in the widget.
+Control-Shift-End moves the cursor to the end of the text and extends
+the selection to that point.
+
+=item [17]
+
+The Select key and Control-Space set the selection anchor to the position
+of the insertion cursor. They don't affect the current selection.
+Shift-Select and Control-Shift-Space adjust the selection to the
+current position of the insertion cursor, selecting from the anchor
+to the insertion cursor if there was not any selection previously.
+
+=item [18]
+
+Control-/ selects the entire contents of the widget.
+
+=item [19]
+
+Control-\ clears any selection in the widget.
+
+=item [20]
+
+The F16 key (labelled Copy on many Sun workstations) or Meta-w
+copies the selection in the widget to the clipboard, if there is a selection.
+
+=item [21]
+
+The F20 key (labelled Cut on many Sun workstations) or Control-w
+copies the selection in the widget to the clipboard and deletes
+the selection.
+If there is no selection in the widget then these keys have no effect.
+
+=item [22]
+
+The F18 key (labelled Paste on many Sun workstations) or Control-y
+inserts the contents of the clipboard at the position of the
+insertion cursor.
+
+=item [23]
+
+The Delete key deletes the selection, if there is one in the widget.
+If there is no selection, it deletes the character to the right of
+the insertion cursor.
+
+=item [24]
+
+Backspace and Control-h delete the selection, if there is one
+in the widget.
+If there is no selection, they delete the character to the left of
+the insertion cursor.
+
+=item [25]
+
+Control-d deletes the character to the right of the insertion cursor.
+
+=item [26]
+
+Meta-d deletes the word to the right of the insertion cursor.
+
+=item [27]
+
+Control-k deletes from the insertion cursor to the end of its line;
+if the insertion cursor is already at the end of a line, then
+Control-k deletes the newline character.
+
+=item [28]
+
+Control-o opens a new line by inserting a newline character in
+front of the insertion cursor without moving the insertion cursor.
+
+=item [29]
+
+Meta-backspace and Meta-Delete delete the word to the left of the
+insertion cursor.
+
+=item [30]
+
+Control-x deletes whatever is selected in the text widget.
+
+=item [31]
+
+Control-t reverses the order of the two characters to the right of
+the insertion cursor.
+
+=item [32]
+
+Control-z (and Control-underscore on UNIX when tk_strictMotif is
+true) undoes the last edit action if the -undo option is true.
+Does nothing otherwise.
+
+=item [33]
+
+Control-Z (or Control-y on Windows) reapplies the last undone edit
+action if the -undo option is true. Does nothing otherwise.
+
+=back
+
+If the widget is disabled using the B<-state> option, then its
+view can still be adjusted and text can still be selected,
+but no insertion cursor will be displayed and no text modifications will
+take place.
+
+The behavior of texts can be changed by defining new bindings for
+individual widgets or by redefining the class bindings.
+
+
+=head1 TIED INTERFACE
+
+The Perl/Tk Text widget also has built-in TIEHANDLE methods for
+B<print> and B<printf> statements. This means you can print to file
+handles tied to a Text widget, and the tied methods automatically
+insert the print statement's arguments into the Text widget.
+
+For example:
+
+ #!/usr/local/bin/perl -w
+ use POSIX 'acos';
+ use Tk;
+ use strict;
+
+ my $mw = MainWindow->new;
+ my $text = $mw->Text(qw/-width 40 -height 10/)->pack;
+
+ tie *STDOUT, ref $text, $text;
+
+ print "Hello Text World!\n";
+ printf "pi ~= %1.5f", acos(-1.0);
+
+ MainLoop;
+
+To tie a scrolled Text widget, use the Subwidget method to get to the
+E<quot>realE<quot> widget:
+
+ my $text = $mw->Scrolled('Text')->pack;
+ tie *STDOUT, 'Tk::Text', $text->Subwidget('scrolled');
+
+=head1 PERFORMANCE ISSUES
+
+Text widgets should run efficiently under a variety
+of conditions. The text widget uses about 2-3 bytes of
+main memory for each byte of text, so texts containing a megabyte
+or more should be practical on most workstations.
+Text is represented internally with a modified B-tree structure
+that makes operations relatively efficient even with large texts.
+Tags are included in the B-tree structure in a way that allows
+tags to span large ranges or have many disjoint smaller ranges
+without loss of efficiency.
+Marks are also implemented in a way that allows large numbers of
+marks.
+In most cases it is fine to have large numbers of unique tags,
+or a tag that has many distinct ranges.
+
+One performance problem can arise if you have hundreds or thousands
+of different tags that all have the following characteristics:
+the first and last ranges of each tag are near the beginning and
+end of the text, respectively,
+or a single tag range covers most of the text widget.
+The cost of adding and deleting tags like this is proportional
+to the number of other tags with the same properties.
+In contrast, there is no problem with having thousands of distinct
+tags if their overall ranges are localized and spread uniformly throughout
+the text.
+
+Very long text lines can be expensive,
+especially if they have many marks and tags within them.
+
+The display line with the insert cursor is redrawn each time the
+cursor blinks, which causes a steady stream of graphics traffic.
+Set the B<-insertofftime> option to 0 avoid this.
+
+=head1 SEE ALSO
+
+L<Tk::ROText|Tk::ROText>
+L<Tk::TextUndo|Tk::TextUndo>
+
+=head1 KEYWORDS
+
+text, widget
+
+=cut
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Text/Tag.pm b/Master/tlpkg/tlperl/lib/Tk/Text/Tag.pm
new file mode 100644
index 00000000000..827278eb88c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Text/Tag.pm
@@ -0,0 +1,46 @@
+package Tk::Text::Tag;
+require Tk::Text;
+
+use overload '""' => \&name;
+
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Text/Text/Tag.pm#4 $
+
+sub _apply
+{
+ my $self = shift;
+ my $meth = shift;
+ $self->widget->tag($meth => $self->name,@_);
+}
+
+sub name
+{
+ return shift->[0];
+}
+
+sub widget
+{
+ return shift->[1];
+}
+
+BEGIN
+{
+ my $meth;
+ foreach $meth (qw(cget configure bind add))
+ {
+ *{$meth} = sub { shift->_apply($meth,@_) }
+ }
+}
+
+sub new
+{
+ my $class = shift;
+ my $widget = shift;
+ my $name = shift;
+ my $obj = bless [$name,$widget],$class;
+ $obj->configure(@_) if (@_);
+ return $obj;
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/TextEdit.pm b/Master/tlpkg/tlperl/lib/Tk/TextEdit.pm
new file mode 100644
index 00000000000..e1ff20b6149
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TextEdit.pm
@@ -0,0 +1,509 @@
+# Copyright (c) 1999 Greg Bartels. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+# Special thanks to Nick Ing-Simmons for pushing a lot of
+# my text edit functionality into Text.pm and TextUndo.pm
+# otherwise, this module would have been monstrous.
+
+# Andy Worhal had it wrong, its "fifteen megabytes of fame"
+# -Greg Bartels
+
+package Tk::TextEdit;
+
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/TextEdit.pm#4 $
+
+use Tk qw (Ev);
+use AutoLoader;
+
+use Text::Tabs;
+
+use base qw(Tk::TextUndo);
+
+Construct Tk::Widget 'TextEdit';
+
+#######################################################################
+#######################################################################
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $class->SUPER::ClassInit($mw);
+
+ $mw->bind($class,'<F5>', 'IndentSelectedLines');
+ $mw->bind($class,'<F6>', 'UnindentSelectedLines');
+
+ $mw->bind($class,'<F7>', 'CommentSelectedLines');
+ $mw->bind($class,'<F8>', 'UncommentSelectedLines');
+
+ return $class;
+}
+
+# 8 horizontal pixels in the "space" character in default font.
+my $tab_multiplier = 8;
+
+sub debug_code_f1
+{
+ my $w=shift;
+}
+
+sub debug_code_f2
+{
+ my $w=shift;
+}
+
+#######################################################################
+#######################################################################
+sub InitObject
+{
+ my ($w) = @_;
+ $w->SUPER::InitObject;
+
+ $w->{'INDENT_STRING'} = "\t"; # Greg mode=>"\t", Nick mode=>" "
+ $w->{'LINE_COMMENT_STRING'} = "#"; # assuming perl comments
+
+ my %pair_descriptor_hash =
+ (
+ 'PARENS' => [ 'multiline', '(', ')', "[()]" ],
+ 'CURLIES' => [ 'multiline', '{', '}', "[{}]" ],
+ 'BRACES' => [ 'multiline', '[', ']', "[][]" ],
+ 'DOUBLEQUOTE' => [ 'singleline', "\"","\"" ],
+ 'SINGLEQUOTE' => [ 'singleline', "'","'" ],
+ );
+
+ $w->{'HIGHLIGHT_PAIR_DESCRIPTOR_HASH_REF'}=\%pair_descriptor_hash;
+
+ $w->tagConfigure
+ ('CURSOR_HIGHLIGHT_PARENS', -foreground=>'white', -background=>'violet');
+ $w->tagConfigure
+ ('CURSOR_HIGHLIGHT_CURLIES', -foreground=>'white', -background=>'blue');
+ $w->tagConfigure
+ ('CURSOR_HIGHLIGHT_BRACES', -foreground=>'white', -background=>'purple');
+ $w->tagConfigure
+ ('CURSOR_HIGHLIGHT_DOUBLEQUOTE', -foreground=>'black', -background=>'green');
+ $w->tagConfigure
+ ('CURSOR_HIGHLIGHT_SINGLEQUOTE', -foreground=>'black', -background=>'grey');
+
+ $w->tagConfigure('BLOCK_HIGHLIGHT_PARENS', -background=>'red');
+ $w->tagConfigure('BLOCK_HIGHLIGHT_CURLIES', -background=>'orange');
+ $w->tagConfigure('BLOCK_HIGHLIGHT_BRACES', -background=>'red');
+ $w->tagConfigure('BLOCK_HIGHLIGHT_DOUBLEQUOTE', -background=>'red');
+ $w->tagConfigure('BLOCK_HIGHLIGHT_SINGLEQUOTE', -background=>'red');
+
+ $w->tagRaise('BLOCK_HIGHLIGHT_PARENS','CURSOR_HIGHLIGHT_PARENS');
+ $w->tagRaise('BLOCK_HIGHLIGHT_CURLIES','CURSOR_HIGHLIGHT_CURLIES');
+ $w->tagRaise('BLOCK_HIGHLIGHT_BRACES','CURSOR_HIGHLIGHT_BRACES');
+ $w->tagRaise('BLOCK_HIGHLIGHT_DOUBLEQUOTE','CURSOR_HIGHLIGHT_DOUBLEQUOTE');
+ $w->tagRaise('BLOCK_HIGHLIGHT_SINGLEQUOTE','CURSOR_HIGHLIGHT_SINGLEQUOTE');
+
+ $w->{'UPDATE_WIDGET_PERIOD'}=300; # how much time between each call.
+ $w->{'WINDOW_PLUS_AND_MINUS_VALUE'}=80;
+ $w->SetGUICallbackIndex(0);
+ $w->schedule_next_callback;
+
+}
+
+#######################################################################
+
+sub cancel_current_gui_callback_and_restart_from_beginning
+{
+ my ($w)=@_;
+ if(defined($w->{'UPDATE_WIDGET_AFTER_REFERENCE'}))
+ {$w->{'UPDATE_WIDGET_AFTER_REFERENCE'}->cancel();}
+ $w->SetGUICallbackIndex(0);
+
+ $w->schedule_next_callback;
+}
+
+sub schedule_next_callback
+{
+ my ($w)=@_;
+ return if $w->NoMoreGUICallbacksToCall; #stops infinite recursive call.
+ $w->{'UPDATE_WIDGET_AFTER_REFERENCE'} = $w->after
+ ($w->{'UPDATE_WIDGET_PERIOD'},
+ sub
+ {
+ $w->CallNextGUICallback;
+ $w->schedule_next_callback;
+ }
+ );
+
+}
+
+
+#######################################################################
+# use these methods to pass the TextEdit widget an anonymous array
+# of code references.
+# any time the widget changes that requires the display to be updated,
+# then these code references will be scheduled in sequence for calling.
+# splitting them up allows them to be prioritized by order,
+# and prevents the widget from "freezing" too long if they were
+# one large callback. scheduling them apart allows the widget time
+# to respond to user inputs.
+#######################################################################
+sub SetGUICallbacks
+{
+ my ($w,$callback_array_ref) = @_;
+ $w->{GUI_CALLBACK_ARRAY_REF}=$callback_array_ref;
+ $w->SetGUICallbackIndex(0);
+}
+
+sub GetGUICallbacks
+{
+ return shift->{GUI_CALLBACK_ARRAY_REF};
+}
+
+sub SetGUICallbackIndex
+{
+ my ($w, $val)=@_;
+ $w->{GUI_CALLBACK_ARRAY_INDEX}=$val;
+}
+
+sub GetGUICallbackIndex
+{
+ return shift->{GUI_CALLBACK_ARRAY_INDEX};
+}
+
+sub IncrementGUICallbackIndex
+{
+ shift->{GUI_CALLBACK_ARRAY_INDEX} += 1;
+}
+
+sub NoMoreGUICallbacksToCall
+{
+ my ($w) = @_;
+ return 0 unless defined ($w->{GUI_CALLBACK_ARRAY_REF});
+ return 0 unless defined ($w->{GUI_CALLBACK_ARRAY_INDEX});
+ my $arr_ref = $w->{GUI_CALLBACK_ARRAY_REF};
+ my $arr_ind = $w->{GUI_CALLBACK_ARRAY_INDEX};
+ return $arr_ind >= @$arr_ref;
+}
+
+sub CallNextGUICallback
+{
+ my ($w) = @_;
+ return if $w->NoMoreGUICallbacksToCall;
+ my $arr_ref = $w->{GUI_CALLBACK_ARRAY_REF};
+ my $arr_ind = $w->{GUI_CALLBACK_ARRAY_INDEX};
+ &{$arr_ref->[$arr_ind]};
+ $w->IncrementGUICallbackIndex;
+}
+
+
+#######################################################################
+#######################################################################
+
+sub insert
+{
+ my $w = shift;
+ $w->SUPER::insert(@_);
+ $w->cancel_current_gui_callback_and_restart_from_beginning;
+}
+
+sub delete
+{
+ my $w = shift;
+ $w->SUPER::delete(@_);
+ $w->cancel_current_gui_callback_and_restart_from_beginning;
+}
+
+sub SetCursor
+{
+ my $w = shift;
+ $w->SUPER::SetCursor(@_);
+ $w->cancel_current_gui_callback_and_restart_from_beginning;
+}
+
+sub OverstrikeMode
+{
+ my ($w,$mode) = @_;
+ if (defined($mode))
+ {
+ $w->SUPER::OverstrikeMode($mode);
+ $w->cancel_current_gui_callback_and_restart_from_beginning;
+ }
+ return $w->SUPER::OverstrikeMode;
+}
+
+
+#######################################################################
+# use yview on scrollbar to get fractional coordinates.
+# scale this by the total length of the text to find the
+# approximate start line of widget and end line of widget.
+#######################################################################
+sub GetScreenWindowCoordinates
+{
+ my $w = shift;
+ my ($top_frac, $bot_frac) = $w->yview;
+ my $end_index = $w->index('end');
+ my ($lines,$columns) = split (/\./,$end_index);
+ my $window = $w->{'WINDOW_PLUS_AND_MINUS_VALUE'};
+ my $top_line = int(($top_frac * $lines) - $window);
+ $top_line = 0 if ($top_line < 0);
+ my $bot_line = int(($bot_frac * $lines) + $window);
+ $bot_line = $lines if ($bot_line > $lines);
+ my $top_index = $top_line . '.0';
+ my $bot_index = $bot_line . '.0';
+
+ $_[0] = $top_index;
+ $_[1] = $bot_index;
+}
+
+########################################################################
+# take two indices as inputs.
+# if they are on the same line or same column (accounting for tabs)
+# then return 1
+# else return 0
+# (assume indices passed in are in line.column format)
+########################################################################
+sub IndicesLookGood
+{
+ my ($w, $start, $end, $singleline) = @_;
+
+ return 0 unless ( (defined($start)) and (defined($end)));
+
+ my ($start_line, $start_column) = split (/\./,$start);
+ my ($end_line, $end_column) = split (/\./,$end);
+
+ ##########################
+ # good if on the same line
+ ##########################
+ return 1 if ($start_line == $end_line);
+
+ ##########################
+ # if not on same line and its a singleline, its bad
+ ##########################
+ return 0 if $singleline;
+
+
+ # get both lines, convert the tabs to spaces, and get the new column.
+ # see if they line up or not.
+ my $string;
+ $string = $w->get($start_line.'.0', $start_line.'.0 lineend');
+ $string = substr($string, 0, $start_column+1);
+ $string = expand($string);
+ $start_column = length($string);
+
+ $string = $w->get($end_line.'.0', $end_line.'.0 lineend');
+ $string = substr($string, 0, $end_column +1);
+ $string = expand($string);
+ $end_column = length($string);
+
+ ##########################
+ # good if on the same column (adjusting for tabs)
+ ##########################
+ return 1 if ($start_column == $end_column);
+
+ # otherwise its bad
+ return 0;
+}
+
+########################################################################
+# if searching backward, count paranthesis until find a start parenthesis
+# which does not have a forward match.
+#
+# (<= search backward will return this index
+# ()
+# START X HERE
+# ( ( ) () )
+# )<== search forward will return this index
+#
+# if searching forward, count paranthesis until find a end parenthesis
+# which does not have a rearward match.
+########################################################################
+sub searchForBaseCharacterInPair
+{
+ my
+ (
+ $w, $top_index, $searchfromindex, $bot_index,
+ $direction, $startchar, $endchar, $charpair
+ )=@_;
+ my ($plus_one_char, $search_end_index, $index_offset, $done_index);
+ if ($direction eq '-forward')
+ {
+ $plus_one_char = $endchar;
+ $search_end_index = $bot_index;
+ $index_offset = ' +1c';
+ $done_index = $w->index('end');
+ }
+ else
+ {
+ $plus_one_char = $startchar;
+ $search_end_index = $top_index;
+ $index_offset = '';
+ $done_index = '1.0';
+ }
+
+ my $at_done_index = 0;
+ my $count = 0;
+ my $char;
+ while(1)
+ {
+ $searchfromindex = $w->search
+ ($direction, '-regexp', $charpair, $searchfromindex, $search_end_index );
+
+ last unless(defined($searchfromindex));
+ $char = $w->get($searchfromindex, $w->index($searchfromindex.' +1c'));
+ if ($char eq $plus_one_char)
+ {$count += 1;}
+ else
+ {$count -= 1;}
+ last if ($count==1);
+ # boundary condition exists when first char in widget is the match char
+ # need to be able to determine if search tried to go past index '1.0'
+ # if so, set index to undef and return.
+ if ( $at_done_index )
+ {
+ $searchfromindex = undef;
+ last;
+ }
+ $at_done_index = 1 if ($searchfromindex eq $done_index);
+ $searchfromindex=$w->index($searchfromindex . $index_offset);
+ }
+ return $searchfromindex;
+}
+
+########################################################################
+# highlight a character pair that most closely brackets the cursor.
+# allows you to pick and choose which ones you want to do.
+########################################################################
+
+sub HighlightParenthesisAroundCursor
+{
+ my ($w)=@_;
+ $w->HighlightSinglePairBracketingCursor
+ ( '(', ')', '[()]', 'CURSOR_HIGHLIGHT_PARENS','BLOCK_HIGHLIGHT_PARENS',0);
+}
+
+sub HighlightCurlyBracesAroundCursor
+{
+ my ($w)=@_;
+ $w->HighlightSinglePairBracketingCursor
+ ( '{', '}', '[{}]', 'CURSOR_HIGHLIGHT_CURLIES','BLOCK_HIGHLIGHT_CURLIES',0);
+}
+
+sub HighlightBracesAroundCursor
+{
+ my ($w)=@_;
+ $w->HighlightSinglePairBracketingCursor
+ ( '[', ']','[][]', 'CURSOR_HIGHLIGHT_BRACES','BLOCK_HIGHLIGHT_BRACES',0);
+}
+
+sub HighlightDoubleQuotesAroundCursor
+{
+ my ($w)=@_;
+ $w->HighlightSinglePairBracketingCursor
+ ( "\"", "\"", "\"", 'CURSOR_HIGHLIGHT_DOUBLEQUOTE','BLOCK_HIGHLIGHT_DOUBLEQUOTE',1);
+}
+
+sub HighlightSingleQuotesAroundCursor
+{
+ my ($w)=@_;
+ $w->HighlightSinglePairBracketingCursor
+ ( "'", "'", "'", 'CURSOR_HIGHLIGHT_SINGLEQUOTE','BLOCK_HIGHLIGHT_SINGLEQUOTE',1);
+}
+
+########################################################################
+# highlight all the character pairs that most closely bracket the cursor.
+########################################################################
+sub HighlightAllPairsBracketingCursor
+{
+ my ($w)=@_;
+ $w->HighlightParenthesisAroundCursor;
+ $w->HighlightCurlyBracesAroundCursor;
+ $w->HighlightBracesAroundCursor;
+ $w->HighlightDoubleQuotesAroundCursor;
+ $w->HighlightSingleQuotesAroundCursor;
+}
+
+########################################################################
+# search for a pair of matching characters that bracket the
+# cursor and tag them with the given tagname.
+# startchar might be '['
+# endchar would then be ']'
+# tagname is a name of a tag, which has already been
+# configured to highlight however the user wants them to behave.
+# error tagname is the tag to highlight the chars with if there
+# is a problem of some kind.
+# singleline indicates whether the character pairs must occur
+# on a single line. quotation marks are single line characters usually.
+########################################################################
+sub HighlightSinglePairBracketingCursor
+{
+ my
+ (
+ $w, $startchar, $endchar, $charpair,
+ $good_tagname, $bad_tagname, $single_line
+ ) = @_;
+ $single_line=0 unless defined($single_line);
+ $w->tagRemove($good_tagname, '1.0','end');
+ $w->tagRemove($bad_tagname, '1.0','end');
+ my $top_index; my $bot_index;
+ my $cursor = $w->index('insert');
+ if ($single_line)
+ {
+ $top_index = $w->index($cursor.' linestart');
+ $bot_index = $w->index($cursor.' lineend');
+ }
+ else
+ {
+ $w->GetScreenWindowCoordinates($top_index, $bot_index);
+ }
+
+ # search backward for the startchar
+ # $top_index, $searchfromindex, $bot_index,
+ # $direction, $startchar, $endchar, $charpair
+
+ my $startindex = $w->searchForBaseCharacterInPair
+ (
+ $top_index, $cursor, $bot_index,
+ '-backward', $startchar, $endchar, $charpair
+ );
+
+ # search forward for the endchar
+ my $endindex = $w->searchForBaseCharacterInPair
+ (
+ $top_index, $cursor, $bot_index,
+ '-forward', $startchar, $endchar, $charpair
+ );
+ return unless ((defined $startindex) and (defined $endindex));
+
+ my $final_tag = $bad_tagname;
+ if ($w->IndicesLookGood( $startindex, $endindex, $single_line))
+ {
+ $final_tag = $good_tagname;
+ }
+
+ $w->tagAdd($final_tag, $startindex, $w->index($startindex.'+1c') );
+ $w->tagAdd($final_tag, $endindex, $w->index( $endindex.'+1c') );
+}
+
+####################################################################
+sub IndentSelectedLines
+{
+ my($w)=@_;
+ $w->insertStringAtStartOfSelectedLines($w->{'INDENT_STRING'});
+}
+
+sub UnindentSelectedLines
+{
+ my($w)=@_;
+ $w->deleteStringAtStartOfSelectedLines($w->{'INDENT_STRING'});
+}
+
+sub CommentSelectedLines
+{
+ my($w)=@_;
+ $w->insertStringAtStartOfSelectedLines($w->{'LINE_COMMENT_STRING'});
+}
+
+sub UncommentSelectedLines
+{
+ my($w)=@_;
+ $w->deleteStringAtStartOfSelectedLines($w->{'LINE_COMMENT_STRING'});
+}
+
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/TextList.pm b/Master/tlpkg/tlperl/lib/Tk/TextList.pm
new file mode 100644
index 00000000000..40c4c6ee7eb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TextList.pm
@@ -0,0 +1,982 @@
+# Copyright (c) 1999 Greg London. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+# code for bindings taken from Listbox.pm
+
+# comments specifying method functionality taken from
+# "Perl/Tk Pocket Reference" by Stephen Lidie.
+
+#######################################################################
+# this module uses a text module as its base class to create a list box.
+# this will allow list box functionality to also have all the functionality
+# of the Text widget.
+#
+# note that most methods use an element number to indicate which
+# element in the list to work on.
+# the exception to this is the tag and mark methods which
+# are dual natured. These methods may accept either the
+# normal element number, or they will also take a element.char index,
+# which would be useful for applying tags to part of a line in the list.
+#
+#######################################################################
+
+package Tk::TextList;
+
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/TextList/TextList.pm#5 $
+
+use base qw(Tk::Derived Tk::ReindexedROText );
+
+use Tk qw (Ev);
+
+Construct Tk::Widget 'TextList';
+
+#######################################################################
+# the following line causes Populate to get called
+# @ISA = qw(Tk::Derived ... );
+#######################################################################
+sub Populate
+{
+ my ($w,$args)=@_;
+ my $option=delete $args->{'-selectmode'};
+ $w->SUPER::Populate($args);
+ $w->ConfigSpecs( -selectmode => ['PASSIVE','selectMode','SelectMode','browse'],
+ -takefocus => ['PASSIVE','takeFocus','TakeFocus',1],
+ -spacing3 => ['SELF', undef, undef, 3],
+ -insertwidth => ['SELF', undef, undef, 0],
+ );
+
+}
+
+#######################################################################
+#######################################################################
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+
+ # Standard Motif bindings:
+ $mw->bind($class,'<1>',['BeginSelect',Ev('index',Ev('@'))]);
+ $mw->bind($class,'<B1-Motion>',['Motion',Ev('index',Ev('@'))]);
+ $mw->bind($class,'<ButtonRelease-1>','ButtonRelease_1');
+
+ $mw->bind($class,'<Shift-1>',['BeginExtend',Ev('index',Ev('@'))]);
+ $mw->bind($class,'<Control-1>',['BeginToggle',Ev('index',Ev('@'))]);
+
+ $mw->bind($class,'<B1-Leave>',['AutoScan',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B1-Enter>','CancelRepeat');
+ $mw->bind($class,'<Up>',['UpDown',-1]);
+ $mw->bind($class,'<Shift-Up>',['ExtendUpDown',-1]);
+ $mw->bind($class,'<Down>',['UpDown',1]);
+ $mw->bind($class,'<Shift-Down>',['ExtendUpDown',1]);
+
+ $mw->XscrollBind($class);
+ $mw->PriorNextBind($class);
+
+ $mw->bind($class,'<Control-Home>','Cntrl_Home');
+
+ $mw->bind($class,'<Shift-Control-Home>',['DataExtend',0]);
+ $mw->bind($class,'<Control-End>','Cntrl_End');
+
+ $mw->bind($class,'<Shift-Control-End>',['DataExtend','end']);
+ $class->clipboardOperations($mw,'Copy');
+ $mw->bind($class,'<space>',['BeginSelect',Ev('index','active')]);
+ $mw->bind($class,'<Select>',['BeginSelect',Ev('index','active')]);
+ $mw->bind($class,'<Control-Shift-space>',['BeginExtend',Ev('index','active')]);
+ $mw->bind($class,'<Shift-Select>',['BeginExtend',Ev('index','active')]);
+ $mw->bind($class,'<Escape>','Cancel');
+ $mw->bind($class,'<Control-slash>','SelectAll');
+ $mw->bind($class,'<Control-backslash>','Cntrl_backslash');
+ ;
+ # Additional Tk bindings that aren't part of the Motif look and feel:
+ $mw->bind($class,'<2>',['scan','mark',Ev('x'),Ev('y')]);
+ $mw->bind($class,'<B2-Motion>',['scan','dragto',Ev('x'),Ev('y')]);
+
+ $mw->bind($class,'<FocusIn>' , ['tagConfigure','_ACTIVE_TAG', -underline=>1]);
+ $mw->bind($class,'<FocusOut>', ['tagConfigure','_ACTIVE_TAG', -underline=>0]);
+
+ return $class;
+}
+
+#######################################################################
+# set the active element to index
+# "active" is a text "mark" which underlines the marked text.
+#######################################################################
+sub activate
+{
+ my($w,$element)=@_;
+ $element= $w->index($element).'.0';
+ $w->SUPER::tag('remove', '_ACTIVE_TAG', '1.0','end');
+ $w->SUPER::tag('add', '_ACTIVE_TAG',
+ $element.' linestart', $element.' lineend');
+ $w->SUPER::mark('set', 'active', $element);
+}
+
+
+#######################################################################
+# bbox returns a list (x,y,width,height) giving an approximate
+# bounding box of character given by index
+#######################################################################
+sub bbox
+{
+ my($w,$element)=@_;
+ $element=$w->index($element).'.0' unless ($element=~/\./);
+ return $w->SUPER::bbox($element);
+}
+
+#######################################################################
+# returns a list of indices of all elements currently selected
+#######################################################################
+sub curselection
+{
+ my ($w)=@_;
+ my @ranges = $w->SUPER::tag('ranges', 'sel');
+ my @selection_list;
+ while (@ranges)
+ {
+ my ($first,$firstcol) = split(/\./,shift(@ranges));
+ my ($last,$lastcol) = split(/\./,shift(@ranges));
+
+ #########################################################################
+ # if previous selection ended on the same line that this selection starts,
+ # then fiddle the numbers so that this line number isnt included twice.
+ #########################################################################
+ if (defined($selection_list[-1]) and ($first == $selection_list[-1]))
+ {
+ $first++; # count this selection starting from the next line.
+ }
+
+ if ($lastcol==0)
+ {
+ $last-=1;
+ }
+
+ #########################################################################
+ # if incrementing $first causes it to be greater than $last,
+ # then do nothing,
+ # else add (first .. last) to list
+ #########################################################################
+ unless ($first>$last)
+ {
+ push(@selection_list, $first .. $last);
+ }
+ }
+ return @selection_list;
+}
+
+
+#######################################################################
+# deletes range of elements from element1 to element2
+# defaults to element1
+#######################################################################
+sub delete
+{
+ my ($w, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element2=$element1 unless(defined($element2));
+ $element2=$w->index($element2);
+ $w->SUPER::delete($element1.'.0' , $element2.'.0 lineend');
+}
+
+#######################################################################
+# deletes range of characters from index1 to index2
+# defaults to index1+1c
+# index is line.char notation.
+#######################################################################
+sub deleteChar
+{
+ my ($w, $index1, $index2)=@_;
+ $index1=$w->index($index1);
+ $index2=$index1.' +1c' unless(defined($index2));
+ $index2=$w->index($index2);
+ $w->SUPER::delete($index1, $index2);
+}
+
+#######################################################################
+# returns as a list contents of elements from $element1 to $element2
+# defaults to element1.
+#######################################################################
+sub get
+{
+ my ($w, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element2=$element1 unless(defined($element2));
+ $element2=$w->index($element2);
+ my @getlist;
+ for(my $i=$element1; $i<=$element2; $i++)
+ {
+ push(@getlist, $w->SUPER::get($i.'.0 linestart', $i.'.0 lineend'));
+ }
+
+ return @getlist;
+}
+
+#######################################################################
+# return text between index1 and index2 which are line.char notation.
+# return value is a single string. index2 defaults to index1+1c
+# index is line.char notation.
+######################################################################
+sub getChar
+{
+ my $w=shift;
+ return $w->SUPER::get(@_);
+}
+
+#######################################################################
+# returns index in number notation
+# this method returns an element number, ie the 5th element.
+#######################################################################
+sub index
+{
+ my ($w,$element)=@_;
+ return undef unless(defined($element));
+ $element=0 if $element<0;
+ $element .= '.0' unless $element=~/\D/;
+ $element = $w->SUPER::index($element);
+ my($line,$col)=split(/\./,$element);
+ return $line;
+}
+
+#######################################################################
+# returns index in line.char notation
+# this method returns an index specific to a character within an element
+#######################################################################
+sub indexChar
+{
+ my $w=shift;
+ return $w->SUPER::index(@_);
+}
+
+
+#######################################################################
+# inserts specified elements just before element at index
+#######################################################################
+sub insert
+{
+ my $w=shift;
+ my $element=shift;
+ $element=$w->index($element);
+ my $item;
+ while (@_)
+ {
+ $item = shift(@_);
+ $item .= "\n";
+ $w->SUPER::insert($element++.'.0', $item);
+ }
+}
+
+#######################################################################
+# inserts string just before character at index.
+# index is line.char notation.
+#######################################################################
+sub insertChar
+{
+ my $w=shift;
+ $w->SUPER::insert(@_);
+}
+
+
+
+#######################################################################
+# returns index of element nearest to y-coordinate
+#
+# currently not defined
+#######################################################################
+#sub nearest
+#{
+# return undef;
+#}
+
+#######################################################################
+# Sets the selection anchor to element at index
+#######################################################################
+sub selectionAnchor
+{
+ my ($w, $element)=@_;
+ $element=$w->index($element);
+ $w->SUPER::mark('set', 'anchor', $element.'.0');
+}
+
+#######################################################################
+# deselects elements between index1 and index2, inclusive
+#######################################################################
+sub selectionClear
+{
+ my ($w, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element2=$element1 unless(defined($element2));
+ $element2=$w->index($element2);
+ $w->SUPER::tag('remove', 'sel', $element1.'.0', $element2.'.0 lineend +1c');
+}
+
+#######################################################################
+# returns 1 if element at index is selected, 0 otherwise.
+#######################################################################
+sub selectionIncludes
+{
+ my ($w, $element)=@_;
+ $element=$w->index($element);
+ my @list = $w->curselection;
+ my $line;
+ foreach $line (@list)
+ {
+ if ($line == $element) {return 1;}
+ }
+ return 0;
+}
+
+#######################################################################
+# adds all elements between element1 and element2 inclusive to selection
+#######################################################################
+sub selectionSet
+{
+ my ($w, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element2=$element1 unless(defined($element2));
+ $element2=$w->index($element2);
+ $w->SUPER::tag('add', 'sel', $element1.'.0', $element2.'.0 lineend +1c');
+}
+
+#######################################################################
+# for ->selection(option,args) calling convention
+#######################################################################
+sub selection
+{
+# my ($w,$sub)=(shift,"selection".ucfirst(shift));
+# no strict 'refs';
+# # can't use $w->$sub, since it might call overridden method-- bleh
+# &($sub)($w,@_);
+}
+
+
+#######################################################################
+# adjusts the view in window so element at index is completely visible
+#######################################################################
+sub see
+{
+ my ($w, $element)=@_;
+ $element=$w->index($element);
+ $w->SUPER::see($element.'.0');
+}
+
+#######################################################################
+# returns number of elements in listbox
+#######################################################################
+sub size
+{
+ my ($w)=@_;
+ my $element = $w->index('end');
+ # theres a weird thing with the 'end' mark sometimes being on a line
+ # with text, and sometimes being on a line all by itself
+ my ($text) = $w->get($element);
+ if (length($text) == 0)
+ {$element -= 1;}
+ return $element;
+}
+
+
+
+#######################################################################
+# add a tag based on element numbers
+#######################################################################
+sub tagAdd
+{
+ my ($w, $tagName, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element1.='.0';
+
+ $element2=$element1.' lineend' unless(defined($element2));
+ $element2=$w->index($element2);
+ $element2.='.0 lineend +1c';
+
+ $w->SUPER::tag('add', $tagName, $element1, $element2);
+}
+
+#######################################################################
+# add a tag based on line.char indexes
+#######################################################################
+sub tagAddChar
+{
+ my $w=shift;
+ $w->SUPER::tag('add',@_);
+}
+
+
+#######################################################################
+# remove a tag based on element numbers
+#######################################################################
+sub tagRemove
+{
+ my ($w, $tagName, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element1.='.0';
+
+ $element2=$element1.' lineend' unless(defined($element2));
+ $element2=$w->index($element2);
+ $element2.='.0 lineend +1c';
+
+ $w->SUPER::tag('remove', 'sel', $element1, $element2);
+}
+
+#######################################################################
+# remove a tag based on line.char indexes
+#######################################################################
+sub tagRemoveChar
+{
+ my $w=shift;
+ $w->SUPER::tag('remove', @_);
+}
+
+
+
+
+#######################################################################
+# perform tagNextRange based on element numbers
+#######################################################################
+sub tagNextRange
+{
+ my ($w, $tagName, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element1.='.0';
+
+ $element2=$element1 unless(defined($element2));
+ $element2=$w->index($element2);
+ $element2.='.0 lineend +1c';
+
+ my $index = $w->SUPER::tag('nextrange', 'sel', $element1, $element2);
+ my ($line,$col)=split(/\./,$index);
+ return $line;
+}
+
+#######################################################################
+# perform tagNextRange based on line.char indexes
+#######################################################################
+sub tagNextRangeChar
+{
+ my $w=shift;
+ $w->SUPER::tag('nextrange', @_);
+}
+
+#######################################################################
+# perform tagPrevRange based on element numbers
+#######################################################################
+sub tagPrevRange
+{
+ my ($w, $tagName, $element1, $element2)=@_;
+ $element1=$w->index($element1);
+ $element1.='.0';
+
+ $element2=$element1 unless(defined($element2));
+ $element2=$w->index($element2);
+ $element2.='.0 lineend +1c';
+
+ my $index = $w->SUPER::tag('prevrange', 'sel', $element1, $element2);
+ my ($line,$col)=split(/\./,$index);
+ return $line;
+}
+
+#######################################################################
+# perform tagPrevRange based on line.char indexes
+#######################################################################
+sub tagPrevRangeChar
+{
+ my $w=shift;
+ $w->SUPER::tag('prevrange', @_);
+}
+
+
+
+#######################################################################
+# perform markSet based on element numbers
+#######################################################################
+sub markSet
+{
+ my ($w,$mark,$element1)=@_;
+ $element1=$w->index($element1);
+ $element1.='.0';
+ $w->SUPER::mark('set', $element1,$mark);
+}
+
+#######################################################################
+# perform markSet based on line.char indexes
+#######################################################################
+sub markSetChar
+{
+ my $w=shift;
+ $w->SUPER::mark('set', @_);
+}
+
+#######################################################################
+# perform markNext based on element numbers
+#######################################################################
+sub markNext
+{
+ my ($w,$element1)=@_;
+ $element1=$w->index($element1);
+ $element1.='.0';
+ return $w->SUPER::mark('next', $element1);
+}
+
+#######################################################################
+# perform markNext based on line.char indexes
+#######################################################################
+sub markNextChar
+{
+ my $w=shift;
+ $w->SUPER::mark('next', @_);
+}
+
+
+#######################################################################
+# perform markPrevious based on element numbers
+#######################################################################
+sub markPrevious
+{
+ my ($w,$element1)=@_;
+ $element1=$w->index($element1);
+ $element1.='.0';
+ return $w->SUPER::mark('previous', $element1);
+}
+
+#######################################################################
+# perform markPrevious based on line.char indexes
+#######################################################################
+sub markPreviousChar
+{
+ my $w=shift;
+ $w->SUPER::mark('previous', @_);
+}
+
+
+
+
+sub ButtonRelease_1
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->CancelRepeat;
+ $w->activate($Ev->xy);
+}
+
+
+sub Cntrl_Home
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->activate(0);
+ $w->see(0);
+ $w->selectionClear(0,'end');
+ $w->selectionSet(0)
+}
+
+
+sub Cntrl_End
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $w->activate('end');
+ $w->see('end');
+ $w->selectionClear(0,'end');
+ $w->selectionSet('end')
+}
+
+
+sub Cntrl_backslash
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ if ($w->cget('-selectmode') ne 'browse')
+ {
+ $w->selectionClear(0,'end');
+ }
+}
+
+# BeginSelect --
+#
+# This procedure is typically invoked on button-1 presses. It begins
+# the process of making a selection in the listbox. Its exact behavior
+# depends on the selection mode currently in effect for the listbox;
+# see the Motif documentation for details.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element for the selection operation (typically the
+# one under the pointer). Must be in numerical form.
+sub BeginSelect
+{
+ my $w = shift;
+ my $el = shift;
+ if ($w->cget('-selectmode') eq 'multiple')
+ {
+ if ($w->selectionIncludes($el))
+ {
+ $w->selectionClear($el)
+ }
+ else
+ {
+ $w->selectionSet($el)
+ }
+ }
+ else
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet($el);
+ $w->selectionAnchor($el);
+ my @list = ();
+ $w->{'SELECTION_LIST_REF'} = \@list;
+ $w->{'PREVIOUS_ELEMENT'} = $el
+ }
+ $w->focus if ($w->cget('-takefocus'));
+}
+# Motion --
+#
+# This procedure is called to process mouse motion events while
+# button 1 is down. It may move or extend the selection, depending
+# on the listbox's selection mode.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element under the pointer (must be a number).
+sub Motion
+{
+ my $w = shift;
+ my $el = shift;
+ if (defined($w->{'PREVIOUS_ELEMENT'}) && $el == $w->{'PREVIOUS_ELEMENT'})
+ {
+ return;
+ }
+
+ # if no selections, select current
+ if($w->curselection==0)
+ {
+ $w->activate($el);
+ $w->selectionSet($el);
+ $w->selectionAnchor($el);
+ $w->{'PREVIOUS_ELEMENT'}=$el;
+ return;
+ }
+
+ my $anchor = $w->index('anchor');
+ my $mode = $w->cget('-selectmode');
+ if ($mode eq 'browse')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet($el);
+ $w->{'PREVIOUS_ELEMENT'} = $el;
+ }
+ elsif ($mode eq 'extended')
+ {
+ my $i = $w->{'PREVIOUS_ELEMENT'};
+ if ($w->selectionIncludes('anchor'))
+ {
+ $w->selectionClear($i,$el);
+ $w->selectionSet('anchor',$el)
+ }
+ else
+ {
+ $w->selectionClear($i,$el);
+ $w->selectionClear('anchor',$el)
+ }
+ while ($i < $el && $i < $anchor)
+ {
+ if (Tk::lsearch($w->{'SELECTION_LIST_REF'},$i) >= 0)
+ {
+ $w->selectionSet($i)
+ }
+ $i += 1
+ }
+ while ($i > $el && $i > $anchor)
+ {
+ if (Tk::lsearch($w->{'SELECTION_LIST_REF'},$i) >= 0)
+ {
+ $w->selectionSet($i)
+ }
+ $i += -1
+ }
+ $w->{'PREVIOUS_ELEMENT'} = $el
+ }
+}
+# BeginExtend --
+#
+# This procedure is typically invoked on shift-button-1 presses. It
+# begins the process of extending a selection in the listbox. Its
+# exact behavior depends on the selection mode currently in effect
+# for the listbox; see the Motif documentation for details.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element for the selection operation (typically the
+# one under the pointer). Must be in numerical form.
+sub BeginExtend
+{
+ my $w = shift;
+ my $el = shift;
+
+ # if no selections, select current
+ if($w->curselection==0)
+ {
+ $w->activate($el);
+ $w->selectionSet($el);
+ $w->selectionAnchor($el);
+ $w->{'PREVIOUS_ELEMENT'}=$el;
+ return;
+ }
+
+ if ($w->cget('-selectmode') eq 'extended' && $w->selectionIncludes('anchor'))
+ {
+ $w->Motion($el)
+ }
+}
+# BeginToggle --
+#
+# This procedure is typically invoked on control-button-1 presses. It
+# begins the process of toggling a selection in the listbox. Its
+# exact behavior depends on the selection mode currently in effect
+# for the listbox; see the Motif documentation for details.
+#
+# Arguments:
+# w - The listbox widget.
+# el - The element for the selection operation (typically the
+# one under the pointer). Must be in numerical form.
+sub BeginToggle
+{
+ my $w = shift;
+ my $el = shift;
+ if ($w->cget('-selectmode') eq 'extended')
+ {
+ my @list = $w->curselection();
+ $w->{'SELECTION_LIST_REF'} = \@list;
+ $w->{'PREVIOUS_ELEMENT'} = $el;
+ $w->selectionAnchor($el);
+ if ($w->selectionIncludes($el))
+ {
+ $w->selectionClear($el)
+ }
+ else
+ {
+ $w->selectionSet($el)
+ }
+ }
+}
+# AutoScan --
+# This procedure is invoked when the mouse leaves an entry window
+# with button 1 down. It scrolls the window up, down, left, or
+# right, depending on where the mouse left the window, and reschedules
+# itself as an "after" command so that the window continues to scroll until
+# the mouse moves back into the window or the mouse button is released.
+#
+# Arguments:
+# w - The entry window.
+# x - The x-coordinate of the mouse when it left the window.
+# y - The y-coordinate of the mouse when it left the window.
+sub AutoScan
+{
+ my $w = shift;
+ my $x = shift;
+ my $y = shift;
+ if ($y >= $w->height)
+ {
+ $w->yview('scroll',1,'units')
+ }
+ elsif ($y < 0)
+ {
+ $w->yview('scroll',-1,'units')
+ }
+ elsif ($x >= $w->width)
+ {
+ $w->xview('scroll',2,'units')
+ }
+ elsif ($x < 0)
+ {
+ $w->xview('scroll',-2,'units')
+ }
+ else
+ {
+ return;
+ }
+ $w->Motion($w->index("@" . $x . ',' . $y));
+ $w->RepeatId($w->after(50,'AutoScan',$w,$x,$y));
+}
+# UpDown --
+#
+# Moves the location cursor (active element) up or down by one element,
+# and changes the selection if we're in browse or extended selection
+# mode.
+#
+# Arguments:
+# w - The listbox widget.
+# amount - +1 to move down one item, -1 to move back one item.
+sub UpDown
+{
+ my $w = shift;
+ my $amount = shift;
+ $w->activate($w->index('active')+$amount);
+ $w->see('active');
+ my $selectmode = $w->cget('-selectmode');
+ if ($selectmode eq 'browse')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet('active')
+ }
+ elsif ($selectmode eq 'extended')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet('active');
+ $w->selectionAnchor('active');
+ $w->{'PREVIOUS_ELEMENT'} = $w->index('active');
+ my @list = ();
+ $w->{'SELECTION_LIST_REF'}=\@list;
+ }
+}
+# ExtendUpDown --
+#
+# Does nothing unless we're in extended selection mode; in this
+# case it moves the location cursor (active element) up or down by
+# one element, and extends the selection to that point.
+#
+# Arguments:
+# w - The listbox widget.
+# amount - +1 to move down one item, -1 to move back one item.
+sub ExtendUpDown
+{
+ my $w = shift;
+ my $amount = shift;
+ if ($w->cget('-selectmode') ne 'extended')
+ {
+ return;
+ }
+ $w->activate($w->index('active')+$amount);
+ $w->see('active');
+ $w->Motion($w->index('active'))
+}
+# DataExtend
+#
+# This procedure is called for key-presses such as Shift-KEndData.
+# If the selection mode isn't multiple or extend then it does nothing.
+# Otherwise it moves the active element to el and, if we're in
+# extended mode, extends the selection to that point.
+#
+# Arguments:
+# w - The listbox widget.
+# el - An integer element number.
+sub DataExtend
+{
+ my $w = shift;
+ my $el = shift;
+ my $mode = $w->cget('-selectmode');
+ if ($mode eq 'extended')
+ {
+ $w->activate($el);
+ $w->see($el);
+ if ($w->selectionIncludes('anchor'))
+ {
+ $w->Motion($el)
+ }
+ }
+ elsif ($mode eq 'multiple')
+ {
+ $w->activate($el);
+ $w->see($el)
+ }
+}
+# Cancel
+#
+# This procedure is invoked to cancel an extended selection in
+# progress. If there is an extended selection in progress, it
+# restores all of the items between the active one and the anchor
+# to their previous selection state.
+#
+# Arguments:
+# w - The listbox widget.
+sub Cancel
+{
+ my $w = shift;
+ if ($w->cget('-selectmode') ne 'extended' || !defined $w->{'PREVIOUS_ELEMENT'})
+ {
+ return;
+ }
+ my $first = $w->index('anchor');
+ my $last = $w->{'PREVIOUS_ELEMENT'};
+ if ($first > $last)
+ {
+ ($first,$last)=($last,$first);
+ }
+ $w->selectionClear($first,$last);
+ while ($first <= $last)
+ {
+ if (Tk::lsearch($w->{'SELECTION_LIST_REF'},$first) >= 0)
+ {
+ $w->selectionSet($first)
+ }
+ $first += 1
+ }
+}
+# SelectAll
+#
+# This procedure is invoked to handle the "select all" operation.
+# For single and browse mode, it just selects the active element.
+# Otherwise it selects everything in the widget.
+#
+# Arguments:
+# w - The listbox widget.
+sub SelectAll
+{
+ my $w = shift;
+ my $mode = $w->cget('-selectmode');
+ if ($mode eq 'single' || $mode eq 'browse')
+ {
+ $w->selectionClear(0,'end');
+ $w->selectionSet('active')
+ }
+ else
+ {
+ $w->selectionSet(0,'end')
+ }
+}
+
+sub SetList
+{
+ my $w = shift;
+ $w->delete(0,'end');
+ $w->insert('end',@_);
+}
+
+sub deleteSelected
+{
+ my $w = shift;
+ my $i;
+ foreach $i (reverse $w->curselection)
+ {
+ $w->delete($i);
+ }
+}
+
+sub clipboardPaste
+{
+ my $w = shift;
+ my $element = $w->index('active') || $w->index($w->XEvent->xy);
+ my $str;
+ eval {local $SIG{__DIE__}; $str = $w->clipboardGet };
+ return if $@;
+ foreach (split("\n",$str))
+ {
+ $w->insert($element++,$_);
+ }
+}
+
+sub getSelected
+{
+ my ($w) = @_;
+ my $i;
+ my (@result) = ();
+ foreach $i ($w->curselection)
+ {
+ push(@result,$w->get($i));
+ }
+ return (wantarray) ? @result : $result[0];
+}
+
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/TextUndo.pm b/Master/tlpkg/tlperl/lib/Tk/TextUndo.pm
new file mode 100644
index 00000000000..dc6ce5fee98
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TextUndo.pm
@@ -0,0 +1,1023 @@
+# Copyright (c) 1995-2004 Nick Ing-Simmons.
+# Copyright (c) 1999 Greg London.
+# All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::TextUndo;
+
+use vars qw($VERSION $DoDebug);
+$VERSION = '4.015'; # $Id: //depot/Tkutf8/Tk/TextUndo.pm#15 $
+$DoDebug = 0;
+
+use Tk qw (Ev);
+use AutoLoader;
+
+use Tk::Text ();
+use base qw(Tk::Text);
+
+Construct Tk::Widget 'TextUndo';
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<<Undo>>','undo');
+ $mw->bind($class,'<<Redo>>','redo');
+
+ return $class->SUPER::ClassInit($mw);
+}
+
+
+####################################################################
+# methods for manipulating the undo and redo stacks.
+# no one should directly access the stacks except for these methods.
+# everyone else must access the stacks through these methods.
+####################################################################
+sub ResetUndo
+{
+ my ($w) = @_;
+ delete $w->{UNDO};
+ delete $w->{REDO};
+}
+
+sub PushUndo
+{
+ my $w = shift;
+ $w->{UNDO} = [] unless (exists $w->{UNDO});
+ push(@{$w->{UNDO}},@_);
+}
+
+sub PushRedo
+{
+ my $w = shift;
+ $w->{REDO} = [] unless (exists $w->{REDO});
+ push(@{$w->{REDO}},@_);
+}
+
+sub PopUndo
+{
+ my ($w) = @_;
+ return pop(@{$w->{UNDO}}) if defined $w->{UNDO};
+ return undef;
+}
+
+sub PopRedo
+{
+ my ($w) = @_;
+ return pop(@{$w->{REDO}}) if defined $w->{REDO};
+ return undef;
+}
+
+sub ShiftRedo
+{
+ my ($w) = @_;
+ return shift(@{$w->{REDO}}) if defined $w->{REDO};
+ return undef;
+}
+
+sub numberChanges
+{
+ my ($w) = @_;
+ return 0 unless (exists $w->{'UNDO'}) and (defined($w->{'UNDO'}));
+ return scalar(@{$w->{'UNDO'}});
+}
+
+sub SizeRedo
+{
+ my ($w) = @_;
+ return 0 unless exists $w->{'REDO'};
+ return scalar(@{$w->{'REDO'}});
+}
+
+sub getUndoAtIndex
+{
+ my ($w,$index) = @_;
+ return undef unless (exists $w->{UNDO});
+ return $w->{UNDO}[$index];
+}
+
+sub getRedoAtIndex
+{
+ my ($w,$index) = @_;
+ return undef unless (exists $w->{REDO});
+ return $w->{REDO}[$index];
+}
+
+####################################################################
+# type "hello there"
+# hello there_
+# hit UNDO
+# hello_
+# type "out"
+# hello out_
+# pressing REDO should not do anything
+# pressing UNDO should make "out" disappear.
+# pressing UNDO should make "there" reappear.
+# pressing UNDO should make "there" disappear.
+# pressing UNDO should make "hello" disappear.
+#
+# if there is anything in REDO stack and
+# the OperationMode is normal, (i.e. not in the middle of an ->undo or ->redo)
+# then before performing the current operation
+# take the REDO stack, and put it on UNDO stack
+# such that UNDO/REDO keystrokes will still make logical sense.
+#
+# call this method at the beginning of any overloaded method
+# which adds operations to the undo or redo stacks.
+# it will perform all the magic needed to handle the redo stack.
+####################################################################
+sub CheckForRedoShuffle
+{
+ my ($w) = @_;
+ my $size_redo = $w->SizeRedo;
+ return unless $size_redo && ($w->OperationMode eq 'normal');
+ # local $DoDebug = 1;
+
+ # we are about to 'do' something new, but have something in REDO stack.
+ # The REDOs may conflict with new ops, but we want to preserve them.
+ # So convert them to UNDOs - effectively do them and their inverses
+ # so net effect on the widget is no-change.
+
+ $w->dump_array('StartShuffle');
+
+ $w->OperationMode('REDO_MAGIC');
+ $w->MarkSelectionsSavePositions;
+
+ my @pvtundo;
+
+ # go through REDO array from end downto 0, i.e. pseudo pop
+ # then pretend we did 'redo' get inverse, and push into UNDO array
+ # and 'do' the op.
+ for (my $i=$size_redo-1; $i>=0 ; $i--)
+ {
+ my ($op,@args) = @{$w->getRedoAtIndex($i)};
+ my $op_undo = $op .'_UNDO';
+ # save the inverse of the op on the UNDO array
+ # do this before the re-doing the op - after a 'delete' we cannot see
+ # text we deleted!
+ my $undo = $w->$op_undo(@args);
+ $w->PushUndo($undo);
+ # We must 'do' the operation now so if this is an insert
+ # the text and tags are available for inspection in delete_UNDO, and
+ # indices reflect changes.
+ $w->$op(@args);
+ # Save the undo that will reverse what we just did - it is
+ # on the undo stack but will be tricky to find
+ push(@pvtundo,$undo);
+ }
+
+ # Now shift each item off REDO array until empty
+ # push each item onto UNDO array - this reverses the order
+ # and we are not altering buffer so we cannot look in the
+ # buffer to compute inverses - which is why we saved them above
+
+ while ($w->SizeRedo)
+ {
+ my $ref = $w->ShiftRedo;
+ $w->PushUndo($ref);
+ }
+
+ # Finally undo whatever we did to compensate for doing it
+ # and get buffer back to state it was before we started.
+ while (@pvtundo)
+ {
+ my ($op,@args) = @{pop(@pvtundo)};
+ $w->$op(@args);
+ }
+
+ $w->RestoreSelectionsMarkedSaved;
+ $w->OperationMode('normal');
+ $w->dump_array('EndShuffle');
+}
+
+# sets/returns undo/redo/normal operation mode
+sub OperationMode
+{
+ my ($w,$mode) = @_;
+ $w->{'OPERATION_MODE'} = $mode if (@_ > 1);
+ $w->{'OPERATION_MODE'} = 'normal' unless exists($w->{'OPERATION_MODE'});
+ return $w->{'OPERATION_MODE'};
+}
+
+####################################################################
+# dump the undo and redo stacks to the screen.
+# used for debug purposes.
+sub dump_array
+{
+ return unless $DoDebug;
+ my ($w,$why) = @_;
+ print "At $why:\n";
+ foreach my $key ('UNDO','REDO')
+ {
+ if (defined($w->{$key}))
+ {
+ print " $key array is:\n";
+ my $array = $w->{$key};
+ foreach my $ref (@$array)
+ {
+ my @items;
+ foreach my $item (@$ref)
+ {
+ my $loc = $item;
+ $loc =~ tr/\n/\^/;
+ push(@items,$loc);
+ }
+ print " [",join(',',@items),"]\n";
+ }
+ }
+ }
+ print "\n";
+}
+
+
+############################################################
+############################################################
+# these are a group of methods used to indicate the start and end of
+# several operations that are to be undo/redo 'ed in a single step.
+#
+# in other words, "glob" a bunch of operations together.
+#
+# for example, a search and replace should be undone with a single
+# keystroke, rather than one keypress undoes the insert and another
+# undoes the delete.
+# all other methods should access the count via these methods.
+# no other method should directly access the {GLOB_COUNT} value directly
+#############################################################
+#############################################################
+
+sub AddOperation
+{
+ my ($w,@operation) = @_;
+ my $mode = $w->OperationMode;
+
+ if ($mode eq 'normal')
+ {$w->PushUndo([@operation]);}
+ elsif ($mode eq 'undo')
+ {$w->PushRedo([@operation]);}
+ elsif ($mode eq 'redo')
+ {$w->PushUndo([@operation]);}
+ else
+ {die "invalid destination '$mode', must be one of 'normal', 'undo' or 'redo'";}
+}
+
+sub addGlobStart # add it to end of undo list
+{
+ my ($w, $who) = @_;
+ unless (defined($who)) {$who = (caller(1))[3];}
+ $w->CheckForRedoShuffle;
+ $w->dump_array('Start'.$who);
+ $w->AddOperation('GlobStart', $who) ;
+}
+
+sub addGlobEnd # add it to end of undo list
+{
+ my ($w, $who) = @_;
+ unless (defined($who)) {$who = (caller(1))[3];}
+ my $topundo = $w->getUndoAtIndex(-1);
+ if ($topundo->[0] eq 'GlobStart')
+ {
+ $w->PopUndo;
+ }
+ else
+ {
+ my $nxtundo = $w->getUndoAtIndex(-2);
+ if ($nxtundo->[0] eq 'GlobStart')
+ {
+ $w->PopUndo;
+ $w->PopUndo;
+ $w->PushUndo($topundo);
+ }
+ else
+ {
+ $w->AddOperation('GlobEnd', $who);
+ }
+ }
+ $w->dump_array('End'.$who);
+}
+
+sub GlobStart
+{
+ my ($w, $who) = @_;
+ unless (defined($w->{GLOB_COUNT})) {$w->{GLOB_COUNT}=0;}
+ if ($w->OperationMode eq 'normal')
+ {
+ $w->PushUndo($w->GlobStart_UNDO($who));
+ }
+ $w->{GLOB_COUNT} = $w->{GLOB_COUNT} + 1;
+}
+
+sub GlobStart_UNDO
+{
+ my ($w, $who) = @_;
+ $who = 'GlobEnd_UNDO' unless defined($who);
+ return ['GlobEnd',$who];
+}
+
+sub GlobEnd
+{
+ my ($w, $who) = @_;
+ unless (defined($w->{GLOB_COUNT})) {$w->{GLOB_COUNT}=0;}
+ if ($w->OperationMode eq 'normal')
+ {
+ $w->PushUndo($w->GlobStart_UNDO($who));
+ }
+ $w->{GLOB_COUNT} = $w->{GLOB_COUNT} - 1;
+}
+
+sub GlobEnd_UNDO
+{
+ my ($w, $who) = @_;
+ $who = 'GlobStart_UNDO' unless defined($who);
+ return ['GlobStart',$who];
+}
+
+sub GlobCount
+{
+ my ($w,$count) = @_;
+ unless ( exists($w->{'GLOB_COUNT'}) and defined($w->{'GLOB_COUNT'}) )
+ {
+ $w->{'GLOB_COUNT'}=0;
+ }
+ if (defined($count))
+ {
+ $w->{'GLOB_COUNT'}=$count;
+ }
+ return $w->{'GLOB_COUNT'};
+}
+
+####################################################################
+# two methods should be used by applications to access undo and redo
+# capability, namely, $w->undo; and $w->redo; methods.
+# these methods undo and redo the last operation, respectively.
+####################################################################
+sub undo
+{
+ my ($w) = @_;
+ $w->dump_array('Start'.'undo');
+ unless ($w->numberChanges) {$w->bell; return;} # beep and return if empty
+ $w->GlobCount(0); #initialize to zero
+ $w->OperationMode('undo');
+ do
+ {
+ my ($op,@args) = @{$w->PopUndo}; # get undo operation, convert ref to array
+ my $undo_op = $op .'_UNDO';
+ $w->PushRedo($w->$undo_op(@args)); # find out how to undo it
+ $w->$op(@args); # do the operation
+ } while($w->GlobCount and $w->numberChanges);
+ $w->OperationMode('normal');
+ $w->dump_array('End'.'undo');
+}
+
+sub redo
+{
+ my ($w) = @_;
+ unless ($w->SizeRedo) {$w->bell; return;} # beep and return if empty
+ $w->OperationMode('redo');
+ $w->GlobCount(0); #initialize to zero
+ do
+ {
+ my ($op,@args) = @{$w->PopRedo}; # get op from redo stack, convert to list
+ my $undo_op = $op .'_UNDO';
+ $w->PushUndo($w->$undo_op(@args)); # figure out how to undo operation
+ $w->$op(@args); # do the operation
+ } while($w->GlobCount and $w->SizeRedo);
+ $w->OperationMode('normal');
+}
+
+
+############################################################
+# override low level subroutines so that they work with UNDO/REDO capability.
+# every overridden subroutine must also have a corresponding *_UNDO subroutine.
+# the *_UNDO method takes the same parameters in and returns an array reference
+# which is how to undo itself.
+# note that the *_UNDO must receive absolute indexes.
+# ->insert receives 'markname' as the starting index.
+# ->insert must convert 'markname' using $absindex=$w->index('markname')
+# and pass $absindex to ->insert_UNDO.
+############################################################
+
+sub insert
+{
+ my $w = shift;
+ $w->markSet('insert', $w->index(shift) );
+ while(@_)
+ {
+ my $index1 = $w->index('insert');
+ my $string = shift;
+ my $taglist_ref; $taglist_ref = shift if @_;
+
+ if ($w->OperationMode eq 'normal')
+ {
+ $w->CheckForRedoShuffle;
+ $w->PushUndo($w->insert_UNDO($index1,$string,$taglist_ref));
+ }
+ $w->markSet('notepos' => $index1);
+ $w->SUPER::insert($index1,$string,$taglist_ref);
+ $w->markSet('insert', $w->index('notepos'));
+ }
+}
+
+sub insert_UNDO
+{
+ my $w = shift;
+ my $index = shift;
+ my $string = '';
+ # This possible call: ->insert (index, string, tag, string, tag...);
+ # if more than one string, keep reading strings in (discarding tags)
+ # until all strings are read in and $string contains entire text inserted.
+ while (@_)
+ {
+ $string .= shift;
+ shift if (@_); # discard tag
+ }
+ # calculate index
+ # possible things to insert:
+ # carriage return
+ # single character (not CR)
+ # single line of characters (not ending in CR)
+ # single line of characters ending with a CR
+ # multi-line characters. last line does not end with CR
+ # multi-line characters, last line does end with CR.
+ my ($line,$col) = split(/\./,$index);
+ if ($string =~ /\n(.*)$/)
+ {
+ $line += $string =~ tr/\n/\n/;
+ $col = length($1);
+ }
+ else
+ {
+ $col += length($string);
+ }
+ return ['delete', $index, $line.'.'.$col];
+}
+
+sub delete
+{
+ my ($w, $start, $stop) = @_;
+ unless(defined($stop))
+ { $stop = $start .'+1c'; }
+ my $index1 = $w->index($start);
+ my $index2 = $w->index($stop);
+ if ($w->OperationMode eq 'normal')
+ {
+ $w->CheckForRedoShuffle;
+ $w->PushUndo($w->delete_UNDO($index1,$index2));
+ }
+ $w->SUPER::delete($index1,$index2);
+ # why call SetCursor - it has side effects
+ # which cause a whole slew if save/restore hassles ?
+ $w->SetCursor($index1);
+}
+
+sub delete_UNDO
+{
+ my ($w, $index1, $index2) = @_;
+ my %tags;
+ my @result = ( 'insert' => $index1 );
+ my $str = '';
+
+ ###############################################################
+ # get tags in range and return them in a format that
+ # can be inserted.
+ # $text->insert('1.0', $string1, [tag1,tag2], $string2, [tag2, tag3]);
+ # note, have to break tags up into sequential order
+ # in reference to _all_ tags.
+ ###############################################################
+
+ $w->dump('-text','-tag', -command => sub {
+ my ($kind,$value,$posn) = @_;
+ if ($kind eq 'text')
+ {
+ $str .= $value;
+ }
+ else
+ {
+ push(@result,$str,[keys %tags]) if (length $str);
+ $str = '';
+ if ($kind eq 'tagon')
+ {
+ $tags{$value} = 1;
+ }
+ elsif ($kind eq 'tagoff')
+ {
+ delete $tags{$value};
+ }
+ }
+ }, $index1, $index2);
+ push(@result,$str,[keys %tags]) if (length $str);
+ return \@result;
+}
+
+############################################################
+# override subroutines which are collections of low level
+# routines executed in sequence.
+# wrap a globstart and globend around the SUPER:: version of routine.
+############################################################
+
+sub ReplaceSelectionsWith
+{
+ my $w = shift;
+ $w->addGlobStart;
+ $w->SUPER::ReplaceSelectionsWith(@_);
+ $w->addGlobEnd;
+}
+
+sub FindAndReplaceAll
+{
+ my $w = shift;
+ $w->addGlobStart;
+ $w->SUPER::FindAndReplaceAll(@_);
+ $w->addGlobEnd;
+}
+
+sub clipboardCut
+{
+ my $w = shift;
+ $w->addGlobStart;
+ $w->SUPER::clipboardCut(@_);
+ $w->addGlobEnd;
+}
+
+sub clipboardPaste
+{
+ my $w = shift;
+ $w->addGlobStart;
+ $w->SUPER::clipboardPaste(@_);
+ $w->addGlobEnd;
+}
+
+sub clipboardColumnCut
+{
+ my $w = shift;
+ $w->addGlobStart;
+ $w->SUPER::clipboardColumnCut(@_);
+ $w->addGlobEnd;
+}
+
+sub clipboardColumnPaste
+{
+ my $w = shift;
+ $w->addGlobStart;
+ $w->SUPER::clipboardColumnPaste(@_);
+ $w->addGlobEnd;
+}
+
+# Greg: this method is more tightly coupled to the base class
+# than I would prefer, but I know of no other way to do it.
+
+sub Insert
+{
+ my ($w,$char)=@_;
+ return if $char eq '';
+ $w->addGlobStart;
+ $w->SUPER::Insert($char);
+ $w->addGlobEnd;
+ $w->see('insert');
+}
+
+
+sub InsertKeypress
+{
+ my ($w,$char)=@_;
+ return if $char eq '';
+ if ($char =~ /^\S$/ and !$w->OverstrikeMode and !$w->tagRanges('sel'))
+ {
+ my $index = $w->index('insert');
+ my $undo_item = $w->getUndoAtIndex(-1);
+ if (defined($undo_item) &&
+ ($undo_item->[0] eq 'delete') &&
+ ($undo_item->[2] == $index)
+ )
+ {
+ $w->SUPER::insert($index,$char);
+ $undo_item->[2] = $w->index('insert');
+ $w->see('insert');
+ return;
+ }
+ }
+ $w->addGlobStart;
+ $w->SUPER::InsertKeypress($char);
+ $w->addGlobEnd;
+}
+
+############################################################
+sub TextUndoFileProgress
+{
+ my ($w,$action,$filename,$count,$val,$total) = @_;
+ return unless(defined($filename) and defined($count));
+
+ my $popup = $w->{'FILE_PROGRESS_POP_UP'};
+ unless (defined($popup))
+ {
+ $w->update;
+ $popup = $w->Toplevel(-title => "File Progress",-popover => $w);
+ $popup->transient($w->toplevel);
+ $popup->withdraw;
+ $popup->resizable('no','no');
+ $popup->Label(-textvariable => \$popup->{ACTION})->pack;
+ $popup->Label(-textvariable => \$popup->{FILENAME})->pack;
+ $popup->Label(-textvariable => \$popup->{COUNT})->pack;
+ my $f = $popup->Frame(-height => 10, -border => 2, -relief => 'sunken')->pack(-fill => 'x');
+ my $i = $f->Frame(-background => 'blue', -relief => 'raised', -border => 2);
+ $w->{'FILE_PROGRESS_POP_UP'} = $popup;
+ $popup->{PROGBAR} = $i;
+ }
+ $popup->{ACTION} = $action;
+ $popup->{COUNT} = "lines: $count";
+ $popup->{FILENAME} = "Filename: $filename";
+ if (defined($val) && defined($total) && $total != 0)
+ {
+ $popup->{PROGBAR}->place('-x' => 0, '-y' => 0, -relheight => 1, -relwidth => $val/$total);
+ }
+ else
+ {
+ $popup->{PROGBAR}->placeForget;
+ }
+
+ $popup->idletasks;
+ unless ($popup->viewable)
+ {
+ $w->idletasks;
+ $w->toplevel->deiconify unless $w->viewable;
+ $popup->Popup;
+ }
+ $popup->update;
+ return $popup;
+}
+
+sub FileName
+{
+ my ($w,$filename) = @_;
+ if (@_ > 1)
+ {
+ $w->{'FILENAME'}=$filename;
+ }
+ return $w->{'FILENAME'};
+}
+
+sub PerlIO_layers
+{
+ my ($w,$layers) = @_;
+ $w->{PERLIO_LAYERS} = $layers if @_ > 1;
+ return $w->{PERLIO_LAYERS} || '' ;
+}
+
+sub ConfirmDiscard
+{
+ my ($w)=@_;
+ if ($w->numberChanges)
+ {
+ my $ans = $w->messageBox(-icon => 'warning',
+ -type => 'YesNoCancel', -default => 'Yes',
+ -message =>
+"The text has been modified without being saved.
+Save edits?");
+ return 0 if $ans eq 'Cancel';
+ return 0 if ($ans eq 'Yes' && !$w->Save);
+ }
+ return 1;
+}
+
+################################################################################
+# if the file has been modified since being saved, a pop up window will be
+# created, asking the user to confirm whether or not to exit.
+# this allows the user to return to the application and save the file.
+# the code would look something like this:
+#
+# if ($w->user_wants_to_exit)
+# {$w->ConfirmExit;}
+#
+# it is also possible to trap attempts to delete the main window.
+# this allows the ->ConfirmExit method to be called when the main window
+# is attempted to be deleted.
+#
+# $mw->protocol('WM_DELETE_WINDOW'=>
+# sub{$w->ConfirmExit;});
+#
+# finally, it might be desirable to trap Control-C signals at the
+# application level so that ->ConfirmExit is also called.
+#
+# $SIG{INT}= sub{$w->ConfirmExit;};
+#
+################################################################################
+
+sub ConfirmExit
+{
+ my ($w) = @_;
+ $w->toplevel->destroy if $w->ConfirmDiscard;
+}
+
+sub Save
+{
+ my ($w,$filename) = @_;
+ $filename = $w->FileName unless defined $filename;
+ return $w->FileSaveAsPopup unless defined $filename;
+ my $layers = $w->PerlIO_layers;
+ if (open(my $file,">$layers",$filename))
+ {
+ my $status;
+ my $count=0;
+ my $index = '1.0';
+ my $progress;
+ my ($lines) = $w->index('end - 1 chars') =~ /^(\d+)\./;
+ while ($w->compare($index,'<','end'))
+ {
+# my $end = $w->index("$index + 1024 chars");
+ my $end = $w->index("$index lineend +1c");
+ print $file $w->get($index,$end);
+ $index = $end;
+ if (($count++%1000) == 0)
+ {
+ $progress = $w->TextUndoFileProgress (Saving => $filename,$count,$count,$lines);
+ }
+ }
+ $progress->withdraw if defined $progress;
+ if (close($file))
+ {
+ $w->ResetUndo;
+ $w->FileName($filename);
+ return 1;
+ }
+ }
+ else
+ {
+ $w->BackTrace("Cannot open $filename:$!");
+ }
+ return 0;
+}
+
+sub Load
+{
+ my ($w,$filename) = @_;
+ $filename = $w->FileName unless (defined($filename));
+ return 0 unless defined $filename;
+ my $layers = $w->PerlIO_layers;
+ if (open(my $file,"<$layers",$filename))
+ {
+ $w->MainWindow->Busy;
+ $w->EmptyDocument;
+ my $count=1;
+ my $progress;
+ while (<$file>)
+ {
+ $w->SUPER::insert('end',$_);
+ if (($count++%1000) == 0)
+ {
+ $progress = $w->TextUndoFileProgress (Loading => $filename,
+ $count,tell($file),-s $filename);
+ }
+ }
+ close($file);
+ $progress->withdraw if defined $progress;
+ $w->markSet('insert' => '1.0');
+ $w->FileName($filename);
+ $w->MainWindow->Unbusy;
+ }
+ else
+ {
+ $w->BackTrace("Cannot open $filename:$!");
+ }
+}
+
+sub IncludeFile
+{
+ my ($w,$filename) = @_;
+ unless (defined($filename))
+ {$w->BackTrace("filename not specified"); return;}
+ my $layers = $w->PerlIO_layers;
+ if (open(my $file,"<$layers",$filename))
+ {
+ $w->Busy;
+ my $count=1;
+ $w->addGlobStart;
+ my $progress;
+ while (<$file>)
+ {
+ $w->insert('insert',$_);
+ if (($count++%1000) == 0)
+ {
+ $progress = $w->TextUndoFileProgress(Including => $filename,
+ $count,tell($file),-s $filename);
+ }
+ }
+ $progress->withdraw if defined $progress;
+ $w->addGlobEnd;
+ close($file);
+ $w->Unbusy;
+ }
+ else
+ {
+ $w->BackTrace("Cannot open $filename:$!");
+ }
+}
+
+# clear document without pushing it into UNDO array, (use SUPER::delete)
+# (using plain delete(1.0,end) on a really big document fills up the undo array)
+# and then clear the Undo and Redo stacks.
+sub EmptyDocument
+{
+ my ($w) = @_;
+ $w->SUPER::delete('1.0','end');
+ $w->ResetUndo;
+ $w->FileName(undef);
+}
+
+sub ConfirmEmptyDocument
+{
+ my ($w)=@_;
+ $w->EmptyDocument if $w->ConfirmDiscard;
+}
+
+sub FileMenuItems
+{
+ my ($w) = @_;
+ return [
+ ["command"=>'~Open', -command => [$w => 'FileLoadPopup']],
+ ["command"=>'~Save', -command => [$w => 'Save' ]],
+ ["command"=>'Save ~As', -command => [$w => 'FileSaveAsPopup']],
+ ["command"=>'~Include', -command => [$w => 'IncludeFilePopup']],
+ ["command"=>'~Clear', -command => [$w => 'ConfirmEmptyDocument']],
+ "-",@{$w->SUPER::FileMenuItems}
+ ]
+}
+
+sub EditMenuItems
+{
+ my ($w) = @_;
+
+ return [
+ ["command"=>'Undo', -command => [$w => 'undo']],
+ ["command"=>'Redo', -command => [$w => 'redo']],
+ "-",@{$w->SUPER::EditMenuItems}
+ ];
+}
+
+sub CreateFileSelect
+{
+ my $w = shift;
+ my $k = shift;
+ my $name = $w->FileName;
+ my @types = (['All Files', '*']);
+ my $dir = undef;
+ if (defined $name)
+ {
+ require File::Basename;
+ my $sfx;
+ ($name,$dir,$sfx) = File::Basename::fileparse($name,'\..*');
+ #
+ # it should never happen where we have a file suffix and
+ # no file name... but fileparse() screws this up with dotfiles.
+ #
+ if (length($sfx) && !length($name)) { ($name, $sfx) = ($sfx, $name) }
+
+ if (defined($sfx) && length($sfx))
+ {
+ unshift(@types,['Similar Files',[$sfx]]);
+ $name .= $sfx;
+ }
+ }
+ return $w->$k(-initialdir => $dir, -initialfile => $name,
+ -filetypes => \@types, @_);
+}
+
+sub FileLoadPopup
+{
+ my ($w)=@_;
+ my $name = $w->CreateFileSelect('getOpenFile',-title => 'File Load');
+ return $w->Load($name) if defined($name) and length($name);
+ return 0;
+}
+
+sub IncludeFilePopup
+{
+ my ($w)=@_;
+ my $name = $w->CreateFileSelect('getOpenFile',-title => 'File Include');
+ return $w->IncludeFile($name) if defined($name) and length($name);
+ return 0;
+}
+
+sub FileSaveAsPopup
+{
+ my ($w)=@_;
+ my $name = $w->CreateFileSelect('getSaveFile',-title => 'File Save As');
+ return $w->Save($name) if defined($name) and length($name);
+ return 0;
+}
+
+
+sub MarkSelectionsSavePositions
+{
+ my ($w)=@_;
+ $w->markSet('MarkInsertSavePosition','insert');
+ my @ranges = $w->tagRanges('sel');
+ my $i = 0;
+ while (@ranges)
+ {
+ my ($start,$end) = splice(@ranges,0,2);
+ $w->markSet( 'MarkSelectionsSavePositions_'.++$i, $start);
+ $w->markSet( 'MarkSelectionsSavePositions_'.++$i, $end);
+ $w->tagRemove('sel',$start,$end);
+ }
+}
+
+sub RestoreSelectionsMarkedSaved
+{
+ my ($w)=@_;
+ my $i = 1;
+ my %mark_hash;
+ foreach my $mark ($w->markNames)
+ {
+ $mark_hash{$mark}=1;
+ }
+ while(1)
+ {
+ my $markstart = 'MarkSelectionsSavePositions_'.$i++;
+ last unless(exists($mark_hash{$markstart}));
+ my $indexstart = $w->index($markstart);
+ my $markend = 'MarkSelectionsSavePositions_'.$i++;
+ last unless(exists($mark_hash{$markend}));
+ my $indexend = $w->index($markend);
+ $w->tagAdd('sel',$indexstart, $indexend);
+ $w->markUnset($markstart, $markend);
+ }
+ $w->markSet('insert','MarkInsertSavePosition');
+}
+
+####################################################################
+# selected lines may be discontinous sequence.
+sub GetMarkedSelectedLineNumbers
+{
+ my ($w) = @_;
+
+ my $i = 1;
+ my %mark_hash;
+ my @ranges;
+ foreach my $mark ($w->markNames)
+ {
+ $mark_hash{$mark}=1;
+ }
+
+ while(1)
+ {
+ my $markstart = 'MarkSelectionsSavePositions_'.$i++;
+ last unless(exists($mark_hash{$markstart}));
+ my $indexstart = $w->index($markstart);
+ my $markend = 'MarkSelectionsSavePositions_'.$i++;
+ last unless(exists($mark_hash{$markend}));
+ my $indexend = $w->index($markend);
+
+ push(@ranges, $indexstart, $indexend);
+ }
+
+ my @selection_list;
+ while (@ranges)
+ {
+ my ($first) = split(/\./,shift(@ranges));
+ my ($last) = split(/\./,shift(@ranges));
+ # if previous selection ended on the same line that this selection starts,
+ # then fiddle the numbers so that this line number isnt included twice.
+ if (defined($selection_list[-1]) and ($first == $selection_list[-1]))
+ {
+ # if this selection ends on the same line its starts, then skip this sel
+ next if ($first == $last);
+ $first++; # count this selection starting from the next line.
+ }
+ push(@selection_list, $first .. $last);
+ }
+ return @selection_list;
+}
+
+sub insertStringAtStartOfSelectedLines
+{
+ my ($w,$insert_string)=@_;
+ $w->addGlobStart;
+ $w->MarkSelectionsSavePositions;
+ foreach my $line ($w->GetMarkedSelectedLineNumbers)
+ {
+ $w->insert($line.'.0', $insert_string);
+ }
+ $w->RestoreSelectionsMarkedSaved;
+ $w->addGlobEnd;
+}
+
+sub deleteStringAtStartOfSelectedLines
+{
+ my ($w,$insert_string)=@_;
+ $w->addGlobStart;
+ $w->MarkSelectionsSavePositions;
+ my $length = length($insert_string);
+ foreach my $line ($w->GetMarkedSelectedLineNumbers)
+ {
+ my $start = $line.'.0';
+ my $end = $line.'.'.$length;
+ my $current_text = $w->get($start, $end);
+ next unless ($current_text eq $insert_string);
+ $w->delete($start, $end);
+ }
+ $w->RestoreSelectionsMarkedSaved;
+ $w->addGlobEnd;
+}
+
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/TextUndo.pod b/Master/tlpkg/tlperl/lib/Tk/TextUndo.pod
new file mode 100644
index 00000000000..2b9d98a3c4a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TextUndo.pod
@@ -0,0 +1,73 @@
+
+=head1 NAME
+
+Tk::TextUndo - perl/tk text widget with bindings to undo changes.
+
+=for pm Tk/TextUndo.pm
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+S< >B<use Tk::TextUndo;>
+
+S< >I<$testundo> = I<$parent>-E<gt>B<TextUndo>(?I<-option>=E<gt>I<value>, ...?);
+
+=head1 DESCRIPTION
+
+This IS-A text widget with an unlimited 'undo' history but without
+a re'undo' capability.
+
+=head2 Bindings
+
+The C<TextUndo> widget has the same bindings as the L<Text|Tk::Text> widget.
+In addition there are the following bindings:
+
+=over 4
+
+=item Event <L4> <<Undo>>
+
+undo the last change. Pressing <L4> several times undo
+step by step the changes made to the text widget.
+
+=back
+
+=head2 Methods
+
+The C<TextUndo> widget has the same methods as C<Text> widget.
+Additional methods for the C<TextUndo> widget are:
+
+=over 4
+
+=item $text->Load($filename);
+
+Loads the contents of the $filename into the text widget. Load()
+delete the previous contents of the text widget as well as it's
+undo history of the previous file.
+
+=item $text->Save(?$otherfilename?)
+
+Save contents of the text widget to a file. If the
+$otherfilename is not specified, the text widget contents
+writes the file of $filename used in the last Load()
+call. If no file was previously Load()'ed an error message
+pops up. The default filename of the last Load() call
+is not overwriten by $otherfilename.
+
+=item $text->FileName(?$otherfilename?)
+
+If passed an argument sets the file name associated with the loaded
+document. Returns the current file name associated with the document.
+
+=back
+
+=head1 KEYS
+
+widget, text, undo
+
+=head1 SEE ALSO
+
+L<Tk::Text>, L<Tk::ROText>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Tiler.pm b/Master/tlpkg/tlperl/lib/Tk/Tiler.pm
new file mode 100644
index 00000000000..ee05dacae63
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Tiler.pm
@@ -0,0 +1,202 @@
+# Copyright (c) 1995-2004 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+# An example of a geometry manager "widget" in perl
+package Tk::Tiler;
+require Tk;
+require Tk::Frame;
+
+use vars qw($VERSION);
+#$VERSION = sprintf '4.%03d', q$Revision: #12 $ =~ /\D(\d+)\s*$/;
+$VERSION = '4.013';
+
+use base qw(Tk::Frame);
+
+Construct Tk::Widget 'Tiler';
+sub Tk::Widget::ScrlTiler { shift->Scrolled('Tiler' => @_) }
+
+sub FocusChildren
+{
+ return (wantarray) ? () : 0;
+}
+
+sub Populate
+{
+ my ($obj,$args) = @_;
+ $obj->SUPER::Populate($args);
+ $obj->{Slaves} = [];
+ $obj->{LayoutPending} = 0;
+ $obj->{Start} = 0;
+ $obj->{Sw} = 0;
+ $obj->{Sh} = 0;
+ $obj->ConfigSpecs('-takefocus' => ['SELF', 'takeFocus','TakeFocus',1],
+ '-highlightthickness' => ['SELF', 'highlightThickness','HighlightThickness',2],
+ '-yscrollcommand' => ['CALLBACK',undef,undef,undef],
+ '-columns' => ['PASSIVE','columns','Columns',5],
+ '-rows' => ['PASSIVE','rows','Rows',10]
+ );
+ return $obj;
+}
+
+sub change_size
+{
+ my ($w) = shift;
+ my $r = $w->cget('-rows');
+ my $c = $w->cget('-columns');
+ my $bw = $w->cget(-highlightthickness);
+ if (defined $r && defined $c)
+ {
+ $w->GeometryRequest($c*$w->{Sw}+2*$bw,$r*$w->{Sh}+2*$bw);
+ }
+}
+
+sub Layout
+{
+ my $m = shift;
+ my $bw = $m->cget(-highlightthickness);
+ my $why = $m->{LayoutPending};
+ $m->{LayoutPending} = 0;
+ my $W = $m->Width;
+ my $H = $m->Height;
+ my $w = $m->{Sw} || 1; # max width of slave
+ my $h = $m->{Sh} || 1; # max height of slave
+ my $x = $bw;
+ my $y = $bw;
+ my $start = 0;
+ # Set size and position of slaves
+ my $rows = $m->{Rows} = int(($H-2*$bw)/$h) || 1;
+ my $cols = $m->{Cols} = int(($W-2*$bw)/$w) || 1;
+ my $need = $m->{Need} = int( (@{$m->{Slaves}}+$cols-1)/$cols );
+ $m->{Start} = ($need - $rows) if ($m->{Start} + $rows > $need);
+
+ $m->{Start} = 0 if ($m->{Start} < 0);
+ my $row = 0;
+ my @posn = ();
+ my $s;
+ foreach $s (@{$m->{Slaves}})
+ {
+ if ($row < $m->{Start})
+ {
+ $s->UnmapWindow;
+ $x += $w;
+ if ($x+$w+$bw > $W)
+ {
+ $x = $bw;
+ $row++;
+ }
+ }
+ elsif ($y+$h+$bw > $H)
+ {
+ $s->UnmapWindow;
+ $s->ResizeWindow($w,$h) if ($why & 1);
+ }
+ else
+ {
+ push(@posn,[$s,$x,$y]);
+ $x += $w;
+ if ($x+$w+$bw > $W)
+ {
+ $x = $bw;
+ $y += $h;
+ $row++;
+ }
+ }
+ $s->ResizeWindow($w,$h) if ($why & 1);
+ }
+ $row++ if ($x > $bw);
+ if (defined $m->{Prev} && $m->{Prev} > $m->{Start})
+ {
+ @posn = reverse(@posn);
+ }
+ while (@posn)
+ {
+ my $posn = shift(@posn);
+ my ($s,$x,$y) = (@$posn);
+ $s->MoveWindow($x,$y);
+ $s->MapWindow;
+ }
+ $m->{Prev} = $m->{Start};
+ $m->Callback(-yscrollcommand => $m->{Start}/$need,$row/$need) if $need;
+}
+
+sub QueueLayout
+{
+ my ($m,$why) = @_;
+ $m->afterIdle(['Layout',$m]) unless ($m->{LayoutPending});
+ $m->{LayoutPending} |= $why;
+}
+
+sub SlaveGeometryRequest
+{
+ my ($m,$s) = @_;
+ my $sw = $s->ReqWidth;
+ my $sh = $s->ReqHeight;
+ my $sz = 0;
+ if ($sw > $m->{Sw})
+ {
+ $m->{Sw} = $sw;
+ $m->QueueLayout(1);
+ $sz++;
+ }
+ if ($sh > $m->{Sh})
+ {
+ $m->{Sh} = $sh;
+ $m->QueueLayout(1);
+ $sz++;
+ }
+ $m->change_size if ($sz);
+}
+
+sub LostSlave
+{
+ my ($m,$s) = @_;
+ @{$m->{Slaves}} = grep($_ != $s,@{$m->{Slaves}});
+ $m->QueueLayout(2);
+}
+
+sub Manage
+{
+ my $m = shift;
+ my $s;
+ foreach $s (@_)
+ {
+ $m->ManageGeometry($s);
+ push(@{$m->{Slaves}},$s);
+ $m->SlaveGeometryRequest($s);
+ }
+ $m->QueueLayout(2 | 1);
+}
+
+sub moveto
+ {
+ my ($m,$frac) = (@_);
+ $m->{Start} = int($m->{Need} * $frac);
+ $m->QueueLayout(4);
+ }
+
+sub scroll
+ {
+ my ($m,$delta,$type) = @_;
+ $delta *= $m->{Rows}/2 if ($type eq 'pages');
+ $m->{Start} += $delta;
+ $m->QueueLayout(4);
+ }
+
+sub yview { my $w = shift; my $c = shift; $w->$c(@_) }
+
+sub FocusIn
+{
+ my ($w) = @_;
+# print 'Focus ',$w->PathName,"\n";
+}
+
+sub ClassInit
+{
+ my ($class,$mw) = @_;
+ $mw->bind($class,'<Configure>',['QueueLayout',8]);
+ $mw->bind($class,'<FocusIn>', 'NoOp');
+ $mw->YscrollBind($class);
+ return $class;
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Tiler.pod b/Master/tlpkg/tlperl/lib/Tk/Tiler.pod
new file mode 100644
index 00000000000..2db172ebaf1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Tiler.pod
@@ -0,0 +1,32 @@
+
+=head1 NAME
+
+Tk::Tiler - Scrollable frame with sub-widgets arranged into rows
+
+=for pm Tk/Tiler.pm
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+ use Tk::Tiler;
+
+ my $tl = $parent->Scrolled('Tiler', -columns => n, -rows => n);
+
+ my $a = $tl->Xxxxx(...);
+ my $b = $tl->Xxxxx(...);
+ my $c = $tl->Xxxxx(...);
+
+ $tl->Manage($a,$b,$c);
+
+=head1 DESCRIPTION
+
+Tiler is derived form Tk::Frame. It is a geometry managing widget which
+accepts widgets to manage. It places the widgets in a grid with as many
+widgets as possible in a row. All the "slots" in the grid are the same size,
+which is determined by the largest managed widget.
+
+The grid may be scrolled vertically.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/TixGrid.pm b/Master/tlpkg/tlperl/lib/Tk/TixGrid.pm
new file mode 100644
index 00000000000..35f7e6c2099
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TixGrid.pm
@@ -0,0 +1,1597 @@
+
+# TODO:
+#
+# o How to get into state 's0' 'b0' so cursor keys start
+# working (compare with Tk/Widget XYscrollBind
+# o the options -browsecmd and -command callback are not
+# not implemented (as in Tix)
+# o privateData 'state' used only once (check again Grid.tcl)
+# o FloatEntry 'sometimes not activeted immediately on selection
+# o check also Leave Binding. Looks like entry does get unpost'ed
+
+package Tk::TixGrid;
+
+BEGIN
+ {
+ use vars '$DEBUG';
+ $DEBUG = (defined($ENV{USER}) and $ENV{USER} eq 'ach') ? 1 : 0;
+ print STDERR "tixGrid: debug = $DEBUG\n" if $DEBUG;
+ }
+
+use strict;
+use vars qw($VERSION);
+$VERSION = '4.010'; # sprintf '4.%03d', q$Revision: #9 $ =~ /\D(\d+)\s*$/;
+
+use Tk qw(Ev $XS_VERSION);
+use Tk::Widget;
+use Carp;
+
+# carp "\n".__PACKAGE__.' is deprecated' unless defined($Test::ntest);
+
+use base 'Tk::Widget';
+
+Construct Tk::Widget 'TixGrid';
+
+bootstrap Tk::TixGrid;
+
+sub Tk_cmd { \&Tk::tixGrid }
+
+sub Tk::Widget::SrclTixGrid { shift->Scrolled('TixGrid' => @_) }
+
+Tk::Methods qw(anchor bdtype delete entrycget entryconfigure format index
+ move set size unset xview yview
+ dragsite dropsite geometryinfo info
+ nearest see selection sort );
+
+use Tk::Submethods
+ (
+ 'anchor' => [ qw(get set) ],
+ 'delete' => [ qw(column row) ],
+ 'info' => [ qw(bbox exists anchor) ],
+ 'move' => [ qw(column row) ],
+ 'selection' => [ qw(adjust clear includes set) ],
+ 'size' => [ qw(column row) ],
+ 'format' => [ qw(grid border) ],
+ );
+
+# edit subcommand is special. It justs invokes tcl code:
+#
+# edit set x y -> tixGrid:EditCell $w, x, y
+# edit apply -> tixGrid:EditApply
+
+# xxx Create an edit sub?
+# sub edit { .... }
+
+sub editSet
+ {
+ die "wrong args. Should be \$w->editSet(x,y)\n" unless @_ == 3;
+ my ($w, $x, $y) = @_;
+ $w->EditCell($x, $y);
+ }
+
+sub editApply
+ {
+ die "wrong args. Should be \$w->editApply()\n" unless @_ == 1;
+ my ($w) = @_;
+ $w->EditApply()
+ }
+
+
+####################################################
+##
+## For button 2 scrolling. So TixGrid has 'standard'
+## standard scrolling interface
+##
+
+#sub scanMark
+# {
+# die "wrong # args: \$w->scanMark(x,y)\n" unless @_ == 3;
+# my ($w) = @_;
+# $w->{__scanMarkXY__} = [ @_[1,2] ];
+# return "";
+# }
+#
+#sub scanDragto
+# {
+# die "wrong # args: \$w->scanDragto(x,y)\n" unless @_ == 3;
+# my ($w, $x, $y) = @_;
+# my ($ox, $oy) = @{ $w->{__scanMarkXY__} };
+#
+# #...
+#
+# return "";
+# }
+
+### end button 2 scrolling stuff ####################
+
+
+# Grid.tcl --
+#
+# This file defines the default bindings for Tix Grid widgets.
+#
+# Copyright (c) 1996, Expert Interface Technologies
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# Bindings translated to perl/Tk by Achim Bohnet <ach@mpe.mpg.de>
+
+sub ClassInit
+ {
+ my ($class, $mw) = @_;
+ $class->SUPER::ClassInit($mw);
+
+ $mw->XYscrollBind($class);
+
+ ##
+ ## Button bindings
+ ##
+
+ $mw->bind($class, '<ButtonPress-1>', ['Button_1', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<Shift-ButtonPress-1>', ['Shift_Button_1', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<Control-ButtonPress-1>',['Control_Button_1', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<ButtonRelease-1>', ['ButtonRelease_1', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<Double-ButtonPress-1>', ['Double_1', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<B1-Motion>','Button_Motion');
+ $mw->bind($class, '<Control-B1-Motion>','Control_Button_Motion');
+ $mw->bind($class, '<B1-Leave>','Button_Leave');
+ $mw->bind($class, '<Double-ButtonPress-1>', ['Double_1', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<B1-Enter>', ['B1_Enter', Ev('x'), Ev('y')]);
+ $mw->bind($class, '<Control-B1-Leave>','Control_Button_Leave');
+ $mw->bind($class, '<Control-B1-Enter>', ['Control_B1_Enter', Ev('x'), Ev('y')]);
+
+ ##
+ ## Keyboard bindings
+ ##
+
+ $mw->bind($class, '<Up>', ['DirKey', 'up' ]);
+ $mw->bind($class, '<Down>', ['DirKey', 'down' ]);
+ $mw->bind($class, '<Left>', ['DirKey', 'left' ]);
+ $mw->bind($class, '<Right>', ['DirKey', 'right' ]);
+
+ $mw->PriorNextBind($class);
+
+ $mw->bind($class, '<Return>', 'Return');
+ $mw->bind($class, '<space>', 'Space' );
+
+ return $class;
+ }
+
+#----------------------------------------------------------------------
+#
+#
+# Mouse bindings
+#
+#
+#----------------------------------------------------------------------
+
+sub Button_1
+ {
+ my $w = shift;
+
+ return if $w->cget('-state') eq 'disabled';
+ $w->SetFocus;
+ $w->ChgState(@_,
+ [
+ '0'=>'1',
+ ]
+ );
+ }
+
+sub Shift_Button_1
+ {
+ my $w = shift;
+
+ return if $w->cget('-state') eq 'disabled';
+ $w->SetFocus;
+
+# $w->ChgState(@_,
+# [
+# ]
+# );
+ }
+
+sub Control_Button_1
+ {
+ my $w = shift;
+
+ return if $w->cget('-state') eq 'disabled';
+ $w->SetFocus;
+
+ $w->ChgState(@_,
+ [
+ 's0' => 's1',
+ 'b0' => 'b1',
+ 'm0' => 'm1',
+ 'e0' => 'e10',
+ ]
+ );
+ }
+
+sub ButtonRelease_1
+ {
+ shift->ChgState(@_,
+ [
+ '2' => '5',
+ '4' => '3',
+ ]
+ );
+ }
+
+sub B1_Motion
+ {
+ shift->ChgState(@_,
+ [
+ '2' => '4',
+ '4' => '4',
+ ]
+ );
+ }
+
+
+sub Control_B1_Motion
+ {
+ shift->ChgState(@_,
+ [
+ 's2' => 's4',
+ 's4' => 's4',
+ 'b2' => 'b4',
+ 'b4' => 'b4',
+ 'm2' => 'm4',
+ 'm5' => 'm4',
+ ]
+ );
+ }
+
+
+sub Double_1
+ {
+ shift->ChgState(@_,
+ [
+ 's0' => 's7',
+ 'b0' => 'b7',
+ ]
+ );
+ }
+
+
+sub B1_Leave
+ {
+ shift->ChgState(@_,
+ [
+ 's2' => 's5',
+ 's4' => 's5',
+ 'b2' => 'b5',
+ 'b4' => 'b5',
+ 'm2' => 'm8',
+ 'm5' => 'm8',
+ 'e2' => 'e8',
+ 'e5' => 'e8',
+ ]
+ );
+ }
+
+
+sub B1_Enter
+ {
+ shift->ChgState(@_,
+ [
+ 's5' => 's4',
+ 's6' => 's4',
+ 'b5' => 'b4',
+ 'b6' => 'b4',
+ 'm8' => 'm4',
+ 'm9' => 'm4',
+ 'e8' => 'e4',
+ 'e9' => 'e4',
+ ]
+ );
+ }
+
+
+sub Control_B1_Leave
+ {
+ shift->ChgState(@_,
+ [
+ 's2' => 's5',
+ 's4' => 's5',
+ 'b2' => 'b5',
+ 'b4' => 'b5',
+ 'm2' => 'm8',
+ 'm5' => 'm8',
+ ]
+ );
+ }
+
+
+sub Control_B1_Enter
+ {
+ shift->ChgState(@_,
+ [
+ 's5' => 's4',
+ 's6' => 's4',
+ 'b5' => 'b4',
+ 'b6' => 'b4',
+ 'm8' => 'm4',
+ 'm9' => 'm4',
+ ]
+ );
+ }
+
+
+sub AutoScan
+ {
+ shift->ChgState(@_,
+ [
+ 's5' => 's9',
+ 's6' => 's9',
+ 'b5' => 'b9',
+ 'b6' => 'b9',
+ 'm8' => 'm9',
+ 'm9' => 'm9',
+ 'e8' => 'm9',
+ 'e9' => 'm9',
+ ]
+ );
+ }
+
+#----------------------------------------------------------------------
+#
+#
+# Key bindings
+#
+#
+#----------------------------------------------------------------------
+
+sub DirKey
+ {
+ my ($w, $key) = @_;
+
+ return if $w->cget('-state') eq 'disabled';
+
+print STDERR "$w->DirKey($key)\n" if $DEBUG;
+ $w->ChgState($key,
+ [
+ 's0' => 's8',
+ 'b0' => 'b8',
+ ]
+ );
+ }
+
+
+sub Return
+ {
+ my ($w) = @_;
+
+ return if $w->cget('-state') eq 'disabled';
+
+ $w->ChgState(
+ [
+ 's0' => 's9',
+ 'b0' => 'b9',
+ ]
+ );
+ }
+
+
+sub Space
+ {
+ my ($w) = @_;
+
+ return if $w->cget('-state') eq 'disabled';
+
+ $w->ChgState(
+ [
+ 's0' => 's10',
+ 'b0' => 'b10',
+ ]
+ );
+ }
+
+
+#----------------------------------------------------------------------
+#
+# STATE MANIPULATION
+#
+#
+#----------------------------------------------------------------------
+
+sub GetState
+ {
+ my ($w) = @_;
+ my $data = $w->privateData();
+ $data->{state} = 0 unless exists $data->{state};
+ return $data->{state};
+}
+
+sub Button_Motion
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $Tk::x = $Ev->x;
+ $Tk::y = $Ev->y;
+ $Tk::X = $Ev->X;
+ $Tk::Y = $Ev->Y;
+ $w->B1_Motion($Tk::x, $Tk::y);
+}
+
+
+sub Control_Button_Motion
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $Tk::x = $Ev->x;
+ $Tk::y = $Ev->y;
+ $Tk::X = $Ev->X;
+ $Tk::Y = $Ev->Y;
+ $w->Control_B1_Motion($Tk::x, $Tk::y);
+}
+
+
+sub Button_Leave
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $Tk::x = $Ev->x;
+ $Tk::y = $Ev->y;
+ $Tk::X = $Ev->X;
+ $Tk::Y = $Ev->Y;
+ $w->B1_Leave();
+}
+
+
+sub Control_Button_Leave
+{
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $Tk::x = $Ev->x;
+ $Tk::y = $Ev->y;
+ $Tk::X = $Ev->X;
+ $Tk::Y = $Ev->Y;
+ $w->Control_B1_Leave();
+}
+
+
+sub SetState
+ {
+ my ($w, $state) = @_;
+ $w->privateData()->{state} = $state;
+ }
+
+sub GoState
+ {
+ my ($w, $state) = (shift, shift);
+ print STDERR 'Gostate: ', $w->GetState, " --> $state, " if $DEBUG;
+ $w->SetState($state);
+ my $method = "GoState_$state";
+
+ print STDERR 'args=(', join(',',@_), ')'.
+ "\t(",$w->cget('-selectmode').
+ ',',$w->cget('-selectunit').")\n" if $DEBUG;
+
+ if (0)
+ {
+ $@ = '';
+ %@ = (); # Workaround to prevent spurious loss of $@
+ eval { $w->$method(@_) };
+ print STDERR "Error Gostate: '$state': ", $@ if $@;
+ return undef;
+ }
+
+ $w->$method(@_);
+ return undef
+ }
+
+##
+## ChgState is a fancy case statement
+##
+
+sub ChgState
+ {
+ my $w = shift;
+ my $map = pop;
+ print STDERR 'ChgState(', join(',',@_,'['), join(',',@$map,),']) ' if $DEBUG;
+ my $state = $w->GetState;
+
+ my ($match, $to);
+ while (@$map)
+ {
+ $match = shift @$map;
+ $to = shift @$map;
+ if ($match eq $state)
+ {
+ print STDERR "$state --> $to \n" if $DEBUG;
+ $w->GoState($to, @_);
+ return;
+ }
+ }
+ print STDERR "*no* chg for $state\n" if $DEBUG;
+ }
+
+
+#----------------------------------------------------------------------
+# SELECTION ROUTINES
+#----------------------------------------------------------------------
+
+#proc tixGrid:SelectSingle {w ent} {
+# $w selection set [lindex $ent 0] [lindex $ent 1]
+# tixGrid:CallBrowseCmd $w $ent
+#}
+
+sub SelectSingle
+ {
+ my ($w, $n1, $n2) = @_;
+ $w->selection('set', $n1, $n2);
+ $w->Callback('-browsecmd' => $n1, $n2);
+ }
+
+#----------------------------------------------------------------------
+# SINGLE SELECTION
+#----------------------------------------------------------------------
+
+sub GoState_0
+ {
+ my ($w) = @_;
+ my $list = $w->privateData()->{list};
+ return unless defined $list;
+
+ foreach my $cmd (@$list)
+ {
+ # XXX should do more something like $w->Callback'('__pending_cmds__');
+ eval $cmd; # XXX why in tcl in global context (binding?)
+ }
+ undef(@$list); # XXX should really delete? Maybe on needed in TCL
+ }
+
+# XXXX how to translate global context
+# what does unset
+#proc tixGrid:GoState-0 {w} {
+# set list $w:_list
+# global $list
+#
+# if [info exists $list] {
+# foreach cmd [set $list] {
+# uplevel #0 $cmd
+# }
+# if [info exists $list] {
+# unset $list
+# }
+# }
+#}
+
+sub GoState_1
+ {
+ my ($w, $x, $y) = @_;
+
+ my @ent = $w->mynearest($x,$y);
+ if (@ent)
+ {
+ $w->SetAnchor(@ent);
+ }
+ $w->CheckEdit;
+ $w->selection('clear', 0, 0, 'max', 'max');
+
+ if ($w->cget('-selectmode') ne 'single')
+ {
+ $w->SelectSingle(@ent);
+ }
+ $w->GoState(2);
+ }
+
+sub GoState_2
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_3
+ {
+ my ($w, $x, $y) = @_;
+
+ my @ent = $w->mynearest($x,$y);
+ if (@ent)
+ {
+ $w->SelectSingle(@ent);
+ }
+ $w->GoState(0);
+
+ }
+
+sub GoState_4
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x,$y);
+ my $mode = $w->cget('-selectmode');
+
+ if ($mode eq 'single')
+ {
+ $w->SetAnchor(@ent);
+ }
+ elsif ($mode eq 'browse')
+ {
+ $w->SetAnchor(@ent);
+ $w->selection('clear', 0, 0, 'max', 'max');
+ $w->SelectSingle(@ent);
+ }
+ elsif ($mode eq 'multiple' ||
+ $mode eq 'extended')
+ {
+ my (@anchor) = $w->anchor('get');
+ $w->selection('adjust', @anchor[0,1], @ent[0,1]);
+ }
+ }
+
+sub GoState_5
+ {
+ my ($w, $x, $y) = @_;
+
+ my @ent = $w->mynearest($x,$y);
+ if (@ent)
+ {
+ $w->SelectSingle(@ent);
+ $w->SetEdit(@ent);
+ }
+ $w->GoState(0);
+
+ }
+
+##############################################
+# BUG xxx
+# return scalar instead of errors
+
+sub mynearest { shift->split_s2a('nearest', @_); }
+sub myanchorGet { shift->split_s2a('anchor', 'get', @_); }
+
+sub split_s2a
+ {
+ my $w = shift;
+ my $method = shift;
+ my @ent = $w->$method(@_);
+ if (@ent == 1)
+ {
+my $tmp = $ent[0];
+ @ent = split(/ /, $ent[0]) if @ent == 1;
+print STDERR join('|',"$method splitted '$tmp' =>",@ent,"\n") if $DEBUG;
+ }
+ else
+ {
+#print STDERR join("|","$method splitted is okay :",@ent,"\n") if $DEBUG;
+ }
+ return @ent;
+ }
+
+##############################################
+
+
+sub GoState_s5
+ {
+ shift->StartScan();
+ }
+
+
+sub GoState_s6
+ {
+ shift->DoScan();
+ }
+
+
+sub GoState_s7
+ {
+ my ($w, $x, $y) = @_;
+
+ my @ent = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-command' => @ent);
+ }
+ $w->GoState('s0');
+ }
+
+
+sub GoState_s8
+ {
+ my ($w, $key) = @_;
+
+ ## BUGS ....
+ ## - anchor is bad, only bbox, exists8
+ ## - looks like anchor is 1-dim: set anchor 0
+ ## - method see unknown (even when defined with Tk::Method)
+
+ my (@anchor) = $w->info('anchor');
+ if (@anchor)
+ {
+ @anchor = ();
+ }
+ else
+ {
+ @anchor = $w->info($key, @anchor);
+ }
+
+ $w->anchor('set', @anchor);
+ $w->see(@anchor);
+
+ $w->GoState('s0');
+ }
+
+#proc tixGrid:GoState-s8 {w key} {
+# set anchor [$w info anchor]
+#
+# if {$anchor == ""} {
+# set anchor 0
+# } else {
+# set anchor [$w info $key $anchor]
+# }
+#
+# $w anchor set $anchor
+# $w see $anchor
+# tixGrid:GoState s0 $w
+#}
+
+
+sub GoState_s9
+ {
+ my ($w, $key) = @_;
+
+#print STDERR "GoState_s9 is not implemented\n";
+
+ my (@anchor) = $w->info('anchor');
+ unless (@anchor)
+ {
+ @anchor = ();
+ $w->anchor('set', @anchor);
+ $w->see(@anchor);
+ }
+
+ unless ($w->info('anchor'))
+ {
+ # ! may not have any elements
+ #
+ $w->Callback('-command' => $w->info('anchor'));
+ $w->selection('clear');
+ $w->selection('set', @anchor);
+ }
+
+ $w->GoState('s0');
+ }
+
+
+sub GoState_s10
+ {
+ my ($w, $key) = @_;
+
+ my (@anchor) = $w->info('anchor');
+ if (@anchor)
+ {
+ @anchor = ();
+ $w->anchor('set', @anchor);
+ $w->see(@anchor);
+ }
+
+ unless ($w->info('anchor'))
+ {
+ # ! may not have any elements
+ #
+ $w->Callback('-browsecmd' => $w->info('anchor'));
+ $w->selection('clear');
+ $w->selection('set', @anchor);
+ }
+
+ $w->GoState('s0');
+ }
+
+
+#----------------------------------------------------------------------
+# BROWSE SELECTION
+#----------------------------------------------------------------------
+
+sub GoState_b0
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_b1
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->anchor('set', @ent);
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-browsecmd' => @ent);
+ }
+
+ $w->GoState('b2');
+ }
+
+sub GoState_b2
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_b3
+ {
+ my ($w) = @_;
+
+ my (@ent) = $w->info('anchor');
+ if (@ent)
+ {
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->selection('set', @ent);
+ $w->Callback('-browsecmd' => @ent);
+ }
+
+ $w->GoState('b0');
+ }
+
+
+sub GoState_b4
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->anchor('set', @ent);
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-browsecmd' => @ent);
+ }
+ }
+
+
+sub GoState_b5 { shift->StartScan(); }
+
+
+sub GoState_b6 { shift->DoScan(); }
+
+
+sub GoState_b7
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-command' => @ent);
+ }
+ $w->GoState('b0');
+ }
+
+
+sub GoState_b8
+ {
+ my ($w, $key) = @_;
+
+ my (@anchor) = $w->info('anchor');
+ if (@anchor)
+ {
+ @anchor = $w->info('key', @anchor);
+ }
+ else
+ {
+ @anchor = (0,0); # ?????
+ }
+
+ $w->anchor('set', @anchor);
+ $w->selection('clear');
+ $w->selection('set', @anchor);
+ $w->see(@anchor);
+
+ $w->Callback('-browsecmd' => @anchor);
+ $w->GoState('b0');
+ }
+
+
+sub GoState_b9
+ {
+ my ($w) = @_;
+
+ my (@anchor) = $w->info('anchor');
+ unless (@anchor)
+ {
+ @anchor = (0,0);
+ $w->anchor('set', @anchor);
+ $w->see(@anchor);
+ }
+
+ if ($w->info('anchor'))
+ {
+ # ! may not have any elements
+ #
+ $w->Callback('-command' => $w->info('anchor'));
+ $w->selection('clear');
+ $w->selection('set', @anchor);
+ }
+
+ $w->GoState('b0');
+ }
+
+
+sub GoState_b10
+ {
+ my ($w) = @_;
+
+ my (@anchor) = $w->info('anchor');
+ unless (@anchor)
+ {
+ @anchor = (0,0);
+ $w->anchor('set', @anchor);
+ $w->see(@anchor);
+ }
+
+ if ($w->info('anchor'))
+ {
+ # ! may not have any elements
+ #
+ $w->Callback('-browsecmd' => $w->info('anchor'));
+ $w->selection('clear');
+ $w->selection('set', @anchor);
+ }
+
+ $w->GoState('b0');
+ }
+
+#----------------------------------------------------------------------
+# MULTIPLE SELECTION
+#----------------------------------------------------------------------
+
+
+sub GoState_m0
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_m1
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x,$y);
+ if (@ent)
+ {
+ $w->anchor('set', @ent);
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-browsecmd' => @ent);
+ }
+
+ $w->GoState('m2');
+ }
+
+sub GoState_m2
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_m3
+ {
+ my ($w) = @_;
+
+ my (@ent) = $w->info('anchor');
+ if (@ent)
+ {
+ $w->Callback('-browsecmd' => @ent);
+ }
+
+ $w->GoState('m0');
+ }
+
+
+sub GoState_m4
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@from) = $w->info('anchor');
+ my (@to) = $w->mynearest($x, $y);
+ if (@to)
+ {
+ $w->selection('clear');
+ $w->selection('set', @from, @to);
+ $w->Callback('-browsecmd' => @to);
+ }
+ $w->GoState('m5');
+ }
+
+sub GoState_m5
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_m6
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->Callback('-browsecmd' => @ent);
+ }
+ $w->GoState('m0');
+ }
+
+sub GoState_m7
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@from) = $w->info('anchor');
+ my (@to) = $w->mynearest($x, $y);
+ unless (@from)
+ {
+ @from = @to;
+ $w->anchor('set', @from);
+ }
+ if (@to)
+ {
+ $w->selection('clear');
+ $w->selection('set', @from, @to);
+ $w->Callback('-browsecmd' => @to);
+ }
+ $w->GoState('m5');
+ }
+
+
+sub GoState_m8 { shift->StartScan() }
+
+
+sub GoState_m9 { shift->DoScan() }
+
+
+sub GoState_xm7
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-browsecmd' => @ent);
+ }
+ $w->GoState('m0');
+ }
+
+#----------------------------------------------------------------------
+# EXTENDED SELECTION
+#----------------------------------------------------------------------
+
+sub GoState_e0
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_e1
+ {
+ my ($w, $x, $y) = @_;
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->anchor('set', @ent);
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-browsecmd' => @ent);
+ }
+ $w->GoState('e2');
+ }
+
+
+sub GoState_e2
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_e3
+ {
+ my ($w) = @_;
+
+ my (@ent) = $w->info('anchor');
+ if (@ent)
+ {
+ $w->Callback('-browsecmd' => @ent);
+ }
+ $w->GoState('e0');
+ }
+
+sub GoState_e4
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@from) = $w->info('anchor');
+ my (@to) = $w->mynearest($x, $y);
+ if (@to)
+ {
+ $w->selection('clear');
+ $w->selection('set', @from, @to);
+ $w->Callback('-browsecmd' => @to);
+ }
+ $w->GoState('e5');
+ }
+
+sub GoState_e5
+ {
+ my ($w) = @_;
+ }
+
+sub GoState_e6
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->Callback('-browsecmd' => @ent);
+ }
+ $w->GoState('e0');
+ }
+
+sub GoState_e7
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@from) = $w->info('anchor');
+ my (@to) = $w->mynearest($x, $y);
+ unless (@from)
+ {
+ @from = @to;
+ $w->anchor('set', @from);
+ }
+ if (@to)
+ {
+ $w->selection('clear');
+ $w->selection('set', @from, @to);
+ $w->Callback('-browsecmd' => @to);
+ }
+ $w->GoState('e5');
+ }
+
+sub GoState_e8 { shift->StartScan(); }
+
+sub GoState_e9 { shift->DoScan(); }
+
+sub GoState_e10
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ if ($w->info('anchor'))
+ {
+ $w->anchor('set', @ent);
+ }
+ if ($w->selection('includes', @ent))
+ {
+ $w->selection('clear', @ent);
+ }
+ else
+ {
+ $w->selection('set', @ent);
+ }
+ $w->Callback('-browsecmd' => @ent);
+ }
+ $w->GoState('e2');
+ }
+
+sub GoState_xe7
+ {
+ my ($w, $x, $y) = @_;
+
+ my (@ent) = $w->mynearest($x, $y);
+ if (@ent)
+ {
+ $w->selection('clear');
+ $w->selection('set', @ent);
+ $w->Callback('-command' => @ent);
+ }
+ $w->GoState('e0');
+ }
+
+
+#----------------------------------------------------------------------
+# HODGE PODGE
+#----------------------------------------------------------------------
+
+sub GoState_12
+ {
+ my ($w, $x, $y) = @_;
+
+ $w->CancelRepeat; # xxx will not work
+ $w->GoState(5, $x, $y);
+ }
+#proc tixGrid:GoState-12 {w x y} {
+# tkCancelRepeat
+# tixGrid:GoState 5 $w $x $y
+#}
+
+sub GoState_13
+ {
+ # FIX: a) $ent or @ent, b) 13 is never called!!? same in Grid.tcl
+ my ($w, @ent, @oldEnt) = @_;
+
+ my $data = $w->MainWindow->privateData('Tix');
+ $data->{indicator} = \@ent;
+ $data->{oldEntry} = \@oldEnt;
+ $w->IndicatorCmd('<Arm>', @ent);
+ }
+# set tkPriv(tix,oldEnt) $oldEnt
+# tixGrid:IndicatorCmd $w <Arm> $ent
+#}
+
+sub GoState_14
+ {
+ my ($w, $x, $y) = @_;
+
+ my $data = $w->MainWindow->privateData('Tix');
+ if ($w->InsideArmedIndicator($x, $y))
+ {
+ $w->anchor('set', @{ $data->{indicator} });
+ $w->selection('clear');
+ $w->selection('set', @{ $data->{indicator} });
+ $w->IndicatorCmd('<Activate>', @{ $data->{indicator} });
+ }
+ else
+ {
+ $w->IndicatorCmd('<Disarm>', @{ $data->{indicator} });
+ }
+ delete($data->{indicator});
+ $w->GoState(0);
+ }
+
+sub GoState_16
+ {
+ my ($w, @ent) = @_;
+
+ return unless (@ent);
+ if ($w->cget('-selectmode') ne 'single')
+ {
+ $w->Select(@ent);
+ $w->Browse(@ent);
+ }
+ }
+
+sub GoState_18
+ {
+ my ($w) = @_;
+
+ $w->CancelRepeat; ## xxx
+ $w->GoState(6, $Tk::x, $Tk::y);
+ }
+
+sub GoState_20
+ {
+ my ($w, $x, $y) = @_;
+
+ my $data = $w->MainWindow->privateData('Tix');
+ if ($w->InsideArmedIndicator($x, $y))
+ {
+ $w->IndicatorCmd('<Arm>', $data->{'indicator'});
+ }
+ else
+ {
+ $w->GoState(21, $x, $y);
+ }
+ }
+
+sub GoState_21
+ {
+ my ($w, $x, $y) = @_;
+
+ my $data = $w->MainWindow->privateData('Tix');
+ unless ($w->InsideArmedIndicator($x, $y))
+ {
+ $w->IndicatorCmd('<Disarm>', $data->{'indicator'});
+ }
+ else
+ {
+ $w->GoState(20, $x, $y);
+ }
+ }
+
+sub GoState_22
+ {
+ my ($w) = @_;
+ my $data = $w->MainWindow->privateData('Tix');
+ if (@{ $data->{oldEntry} })
+ {
+ $w->anchor('set', @{ $data->{oldEntry} });
+ }
+ else
+ {
+ $w->anchor('clear');
+ }
+ $w->GoState(0);
+ }
+
+
+#----------------------------------------------------------------------
+# callback actions
+#----------------------------------------------------------------------
+
+sub SetAnchor
+ {
+ my ($w, @ent) = @_;
+
+ if (@ent)
+ {
+ $w->anchor('set', @ent);
+# $w->see(@ent);
+ }
+ }
+
+# xxx check @ent of @$ent
+sub Select
+ {
+ my ($w, @ent) = @_;
+ $w->selection('clear');
+ $w->selection('set', @ent)
+ }
+
+# xxx check new After handling
+sub StartScan
+ {
+ my ($w) = @_;
+ $Tk::afterId = $w->after(50, [AutoScan, $w]);
+ }
+
+sub DoScan
+ {
+ my ($w) = @_;
+ my $x = $Tk::x;
+ my $y = $Tk::y;
+ my $X = $Tk::X;
+ my $Y = $Tk::Y;
+
+ my $out = 0;
+ if ($y >= $w->height)
+ {
+ $w->yview('scroll', 1, 'units');
+ $out = 1;
+ }
+ if ($y < 0)
+ {
+ $w->yview('scroll', -1, 'units');
+ $out = 1;
+ }
+ if ($x >= $w->width)
+ {
+ $w->xview('scroll', 2, 'units');
+ $out = 1;
+ }
+ if ($x < 0)
+ {
+ $w->xview('scroll', -2, 'units');
+ $out = 1;
+ }
+ if ($out)
+ {
+ $Tk::afterId = $w->after(50, ['AutoScan', $w]);
+ }
+ }
+
+
+#proc tixGrid:CallBrowseCmd {w ent} {
+# return
+#
+# set browsecmd [$w cget -browsecmd]
+# if {$browsecmd != ""} {
+# set bind(specs) {%V}
+# set bind(%V) $ent
+#
+# tixEvalCmdBinding $w $browsecmd bind $ent
+# }
+#}
+
+#proc tixGrid:CallCommand {w ent} {
+# set command [$w cget -command]
+# if {$command != ""} {
+# set bind(specs) {%V}
+# set bind(%V) $ent
+#
+# tixEvalCmdBinding $w $command bind $ent
+# }
+#}
+
+# tixGrid:EditCell --
+#
+# This command is called when "$w edit set $x $y" is called. It causes
+# an SetEdit call when the grid's state is 0.
+#
+
+sub EditCell
+ {
+ my ($w, $x, $y) = @_;
+ my $list = $w->privateData()->{'list'};
+ if ($w->GetState == 0)
+ {
+ $w->SetEdit($x, $y); # xxx really correct ? once 2, once 4 args?
+ }
+ else
+ {
+ push(@$list, [ $w, 'SetEdit', $x, $y]);
+ }
+ }
+#proc tixGrid:EditCell {w x y} {
+# set list $w:_list
+# global $list
+#
+# case [tixGrid:GetState $w] {
+# {0} {
+# tixGrid:SetEdit $w [list $x $y]
+# }
+# default {
+# lappend $list [list tixGrid:SetEdit $w [list $x $y]]
+# }
+# }
+#}
+
+
+# tixGrid:EditApply --
+#
+# This command is called when "$w edit apply $x $y" is called. It causes
+# an CheckEdit call when the grid's state is 0.
+#
+
+sub EditApply
+ {
+ my ($w) = @_;
+ my $list = $w->privateData()->{'list'};
+ if ($w->GetState eq 0)
+ {
+ $w->CheckEdit; # xxx really correct ? once 2, once 4 args?
+ }
+ else
+ {
+ push(@$list, $w->CheckEdit);
+ }
+ }
+#proc tixGrid:EditApply {w} {
+# set list $w:_list
+# global $list
+#
+# case [tixGrid:GetState $w] {
+# {0} {
+# tixGrid:CheckEdit $w
+# }
+# default {
+# lappend $list [list tixGrid:CheckEdit $w]
+# }
+# }
+#}
+
+# tixGrid:CheckEdit --
+#
+# This procedure is called when the user sets the focus on a cell.
+# If another cell is being edited, apply the changes of that cell.
+#
+
+sub CheckEdit
+ {
+ my ($w) = @_;
+ my $edit = $w->privateData->{editentry};
+ if (Tk::Exists($edit))
+ {
+ # If it -command is not empty, it is being used for another cell.
+ # Invoke it so that the other cell can be updated.
+ #
+ if (defined $edit->cget('-command'))
+ {
+ $edit->invoke; # xxx no args??
+ }
+ }
+ }
+
+sub SetFocus
+ {
+ my ($w) = @_;
+ if ($w->cget('-takefocus'))
+ {
+$w->focus;
+# # xxx translation of if ![string match $w.* [focus -displayof $w]] {
+# my $hasfocus = $w->focus(-displayof => $w)->pathname;
+# my $pathname = $w->pathname;
+# if ($hasfocus =~ /\Q$pathname\E.*/)
+# {
+# $w->focus
+# }
+ }
+ }
+
+
+# tixGrid:SetEdit --
+#
+# Puts a floatentry on top of an editable entry.
+#
+
+sub SetEdit
+ {
+ my ($w, $px, $py) = @_;
+
+ $w->CheckEdit;
+
+ my $efc = $w->cget('-editnotifycmd');
+ return unless ( defined($efc) && length($efc) );
+
+ unless ($w->Callback('-editnotifycmd' => $px, $py))
+ {
+ print STDERR "editnotifycmd not defined or returned false\n";
+ return;
+ }
+
+ my $oldvalue;
+ if ($w->info('exists', $px, $py))
+ {
+ # if entry doesn't support -text option. Can't edit it.
+ #
+ # If the application wants to force editing of an entry, it could
+ # delete or replace the entry in the editnotifyCmd procedure.
+ #
+ Tk::catch { $oldvalue = $w->entrycget($px, $py, '-text'); };
+ if ($@)
+ {
+ return;
+ }
+ }
+ else
+ {
+ $oldvalue = '';
+ }
+
+ my @bbox = $w->info('bbox', $px, $py);
+
+ my $edit = $w->privateData()->{__EDIT__};
+ unless (Tk::Exists($edit))
+ {
+ require Tk::FloatEntry;
+ $edit = $w->FloatEntry();
+ $w->privateData()->{__EDIT__} = $edit;
+ }
+ $edit->configure(-command=>[\&DoneEdit, $w, $px, $py]);
+ $edit->post(@bbox);
+ $edit->configure(-value=>$oldvalue);
+}
+
+
+sub DoneEdit
+ {
+ my ($w, $x, $y, @args) = @_;
+
+ my $edit = $w->privateData()->{__EDIT__};
+ $edit->configure(-command=>undef);
+ $edit->unpost;
+
+ # FIX xxx
+ # set value [tixEvent value]
+ my $value = $edit->get;
+ if ($w->info('exists', $x, $y))
+ {
+ Tk::catch { $w->entryconfigure($x, $y, -text=>$value) };
+ if ($@)
+ {
+ return
+ }
+ }
+ elsif ( length($value) )
+ {
+ # This needs to be catch'ed because the default itemtype may
+ # not support the -text option
+ #
+ Tk::catch { $w->set($x,$y,-text $value); };
+ if ($@)
+ {
+ return;
+ }
+ }
+ else
+ {
+ return;
+ }
+ $w->Callback('-editdonecmd' => $x, $y);
+ }
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/TixGrid.pod b/Master/tlpkg/tlperl/lib/Tk/TixGrid.pod
new file mode 100644
index 00000000000..23aa4468bfa
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TixGrid.pod
@@ -0,0 +1,539 @@
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and
+# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distribution are in the file
+# license.tcl.
+
+## TO CHECK:
+##
+## callback: checked for defined of code ref (compare -edit*cmd)
+##
+## option
+## formatcmd mentions format method but there is no format
+## method documented
+##
+## methods:
+## bdtype: what is it? no description given
+## see: not documented? Not implemented??
+##
+## todo: missing peaces marked by ????
+
+=head1 NAME
+
+Tk::TixGrid - Create and manipulate Tix Grid widgets
+
+=for pm TixGrid/TixGrid.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+S< >I<$tixgrid> = I<$parent>->B<TixGrid>?(I<options>)?;
+
+=head1 DESCRIPTION
+
+This widget is intended as the basis of "spread sheet" like interfaces.
+The widget displays its contents in a two dimensional "grid" of cells.
+Each cell may contain one Tix display item, which may be in text,
+graphics or other formats. See L<Tk::DItem> for more information
+about Tix display items. Because these "items" need not be "windows" large
+grids can be handled without consuming excessive display system resources.
+
+Individual cells, or groups of cells, can be formatted with a wide range of
+attributes, such as its color, relief and border. However because the
+widget is intended to handle large grids the mechanisms to achieve these
+are lower level, and more callback oriented than for other widgets. The
+assumption is that to avoid storing display details of a large number
+of cells, the data will be re-computed as needed.
+
+The port of Tix C code and some of the bindings to perl/Tk is done but still
+need further work. In several places the intent of the Tix code is not
+yet understood. For example the 'edit' interface is clearly intended
+for spread-sheet like cell content editing in an auxillary "entry" widget
+or similar, but how that should work is not yet clear.
+
+The B<TixGrid> method creates a new TixGrid window and returns a
+blessed reference of this TixGrid widget. Additional options,
+described below, may be specified on the command line or in the
+option database to configure aspects of the B<TixGrid> widget.
+
+=head1 STANDARD OPTIONS
+
+B<-background>
+ B<-borderwidth>
+ B<-cursor>
+ B<-font>
+ B<-foreground>
+ B<-height>
+ B<-highlightbackground>
+ B<-highlightcolor>
+ B<-highlightthickness>
+ B<-padx>
+ B<-pady>
+ B<-relief>
+ B<-selectbackground>
+ B<-selectborderwidth>
+ B<-selectforeground>
+ B<-state>
+ B<-takefocus>
+ B<-width>
+ B<-xscrollcommand>
+ B<-yscrollcommand>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<browseCmd>
+
+=item Class: B<BrowseCmd>
+
+=item Switch: B<-browsecmd>
+
+If defined, gives a perl/Tk L<callback|Tk::callbacks> to be executed when the
+user browses a grid cell (This is normally the case when the user clicks on an
+entry). When this callback is called, it is passed with two additional
+parameters: I<x> I<y>, where (I<x>,I<y>) is the location of the cell that has
+just been clicked.
+
+=item Name: B<Command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+If defined, gives a perl/Tk L<callback|Tk::callbacks> to be executed when the
+user double-clicks a grid cell. When this callback is called, it is passed
+with two additional parameters: I<x> I<y>, where (I<x>,I<y>) is the location of
+the cell that has just been clicked.
+
+=item Name: B<editDoneCmd>
+
+=item Class: B<EditDoneCmd>
+
+=item Switch: B<-editdonecmd>
+
+If defined, gives a perl/Tk L<callback|Tk::callbacks>
+to be executed when the
+user has edited grid cell. When this callback is called, it is
+passed with two additional parameters: I<x> I<y>, where (I<x>,I<y>)
+is the location of the cell that has just been edited.
+
+=item Name: B<editNotifyCmd>
+
+=item Class: B<EditNotifyCmd>
+
+=item Switch: B<-editnotifycmd>
+
+If defined gives a perl/Tk L<callback|Tk::callbacks>
+to be executed when the user tries to edit a grid cell.
+When this callback is called, it is passed with two additional
+parameters: I<x> I<y>, where (I<x>,I<y>,) is the location
+of the cell. This callback should return a boolean value: B<true>
+indicates that the cell is editable and B<false> otherwise.
+
+=item Name: B<FloatingCols>
+
+=item Class: B<floatingCols>
+
+=item Switch: B<-floatingcols>
+
+Defines the number of extra columns beyond the existing grid
+that can be brought into view by scrolling.
+
+=item Name: B<FloatingRows>
+
+=item Class: B<floatingRows>
+
+=item Switch: B<-floatingrows>
+
+Defines the number of extra rows beyond the the existing grid
+that can be brought into view by scrolling.
+
+=item Name: B<formatCmd>
+
+=item Class: B<FormatCmd>
+
+=item Switch: B<-formatcmd>
+
+If defined, gives a perl/Tk L<callback|Tk::callbacks> to be
+executed when the grid cells need to be displayed on the screen.
+Its primary purpose is to draw the background of the region
+before the cells are rendered on top. This is normally
+achieved by calling B<formatGrid> or B<formatBorder> (see below).
+However other uses can be made of this low-level callback. For example it can be used
+to "lazily" populate the grid by calling the B<set> method only as cells come
+into view.
+
+When this callback is called, it is passed with five additional
+parameters: I<type> I<x1> I<y1> I<x2> I<y2>.
+
+I<x1> I<y1> I<x2> I<y2> gives the extent of the region that needs
+formatting.
+
+I<type> gives the logical type of the region in the grid. It may be one of the
+following.
+
+=over 8
+
+=item B<x_region>
+
+The horizontal margin.
+
+=item B<y_region>
+
+The vertical margin.
+
+=item B<s_region>
+
+The area in the top left corner where the horizontal and vertical margins
+are joined.
+
+=item B<main>
+
+The main body i.e. all the cells that do not fall into the above three types.
+
+=back
+
+=item Name: B<leftMargin>
+
+=item Class: B<LeftMargin>
+
+=item Switch: B<-leftmargin>
+
+Gives the width of vertical margin in cells (columns).
+A zero indicates that no vertical margin exists. A positive value I<N>
+indicates that first I<N> columns are "labels" and are always displayed
+and not scrolled.
+
+=item Name: B<itemType>
+
+=item Class: B<ItemType>
+
+=item Switch: B<-itemtype>
+
+Default item type for cells.
+
+=item Name: B<selectMode>
+
+=item Class: B<SelectMode>
+
+=item Switch: B<-selectmode>
+
+Specifies one of several styles for manipulating the selection.
+The value of the option may be arbitrary, but the default bindings
+expect it to be either B<single>, B<browse>, B<multiple>, or B<extended>;
+the default value is B<single>.
+
+=item Name: B<selectUnit>
+
+=item Class: B<SelectUnit>
+
+=item Switch: B<-selectunit>
+
+Specifies the selection unit. Valid values are B<cell>, B<column> or B<row>.
+
+=item Name: B<sizeCmd>
+
+=item Class: B<SizeCmd>
+
+=item Switch: B<-sizecmd>
+
+Callback is called (with no extra arguments) when grid sizes are
+re-computed. For example if window changes size, a different font
+is specified etc.
+
+It is called just after scrollbars (if present) are updated.
+
+=item Name: B<topMargin>
+
+=item Class: B<TopMargin>
+
+=item Switch: B<-topmargin>
+
+Gives the width of horizontal margin in cells (rows).
+A zero indicates that no horizontal margin exists. A positive value
+I<N> indicates that first I<N> rows are "labels" and are always
+displayed and not scrolled.
+
+=back
+
+=head1 WIDGET METHODS
+
+The B<TixGrid> method creates a TixGrid widget and returns a blessed
+reference of this TixGrid widget. This reference may be used to
+invoke various operations on the widget. It has the following general
+form:
+
+S< >I<$tixgrid>->B<method>?(I<arg, arg, ...>)?
+
+I<arg>s determine the exact behavior of the method.
+
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are possible for B<TixGrid> widgets:
+
+=over 4
+
+=item I<$tixgrid>->B<anchorGet>(I<x>, I<y>)
+
+=item I<$tixgrid>->B<anchorSet>(I<x>, I<y>)
+
+=item I<$tixgrid>->B<anchorClear>
+
+Manipulates the B<anchor cell> of the B<TixGrid> widget.
+The anchor cell is the end of the selection that is fixed
+while the user is dragging out a selection with the mouse.
+
+=item ($bd,$col,$row) = I<$tixgrid>->B<bdtype>(I<x,y> ?,I<xDelta>,I<yDelta>?)
+
+Determines if the the screen (pixel) position I<x,y> is in a border.
+This is useful for changing the mouse cursor when the user points at a
+border - e.g. to indicate that the border can be adjusted
+interactively.
+
+If in a border returns a list of three elements. First element
+is 'xy', 'x' or 'y', second two elements are integers.
+(Value of these are not understood, seem to indicate which
+column and row of the border the screen position corresponds to?)
+
+If not in a border returns an empty list.
+
+=item I<$tixgrid>->B<delete>(I<dim>, I<from>?, I<to>?)
+
+=item I<$tixgrid>->B<deleteColumn>(I<from>?, I<to>?)
+
+=item I<$tixgrid>->B<deleteRow>(I<from>?, I<to>?)
+
+I<Dim> may be B<row> or B<column>. If I<to> is not given,
+deletes a single row (or column) at the position I<from>.
+If I<to> is given, deletes the range of rows (or columns)
+from position I<from> through I<to>.
+
+=item I<$tixgrid>->B<dragsite>(I<option>, I<x>, I<y>)
+
+=item I<$tixgrid>->B<dropsite>(I<option>, I<x>, I<y>)
+
+Tcl/Tix has (or was going to have) Drag&Drop support.
+Meaning for perl/Tk is not clear yet.
+
+=item I<$tixgrid>->B<editApply>
+
+If any cell is being edited, de-highlight the cell and
+applies the changes.
+
+=item I<$tixgrid>->B<editSet>(I<x>, I<y>)
+
+Highlights the cell at (I<x>,I<y>) for editing,
+if the B<-editnotify> callback returns true for this cell.
+
+=item I<$tixgrid>->B<entrycget>(I<x>, I<y>, 'I<-option>')
+
+=item I<$tixgrid>->B<entryconfigure>(I<x>, I<y>?, I<-option>??=>I<value>, I<-option>=>I<value>, I<...>?)
+
+Provide a configue interface to cells in the grid.
+The I<-option>s depend on the item type of the cell.
+
+=item I<$tixgrid>->B<formatBorder>(I<x1,y1>, I<x2,y2>, I<options>);
+
+=item I<$tixgrid>->B<formatGrid>(I<x1,y1>, I<x2,y2>, I<options>);
+
+The B<formatBorder> and B<formatBorder> methods can only be called by the
+B<-formatcmd> callback of the tixGrid widget. They draw the background of
+the region described by I<x1,y1>, I<x2,y2> according the the supplied
+I<options>. One call to B<-formatcmd> callback can make multiple
+calls to B<formatBorder> and/or B<formatBorder> for different
+sub-regions.
+
+B<formatBorder> draws the background using Tk relief style,
+B<formatGrid> also draws grid lines between the cells.
+It only makes sense to call one or the other for a particular
+sub-region as one will over-write the other.
+
+The options allowed are:
+
+=over 8
+
+=item -background / -bg
+
+=item -borderwidth / -bd
+
+=item -filled
+
+=item -relief
+
+=item -selectbackground
+
+=item -xoff
+
+=item -xon
+
+=item -yoff
+
+=item -yon
+
+=back
+
+The B<-xon/-xoff and -yon/-yoff> options are obscure. If anyone
+can figure out how to do something interesting given what
+F<pTk/tixGrFmt.c> is doing with them please let Nick know!.
+
+=item I<$tixgrid>->B<geometryinfo>(?I<width>, I<height>?)
+
+Returns list of four values - two sets of two floating point numbers.
+First set is the scrollbar fractions for x direction, second set
+is scrollbar fractions for y direction. If I<width> and I<height>
+are specified then fractions are based on as if window size was of
+specified size (in pixels, but not allowing normal GetPixels units).
+Otherwise fractions are based on current size of the window.
+
+Usage obscure.
+
+=item I<$tixgrid>->B<index>(I<xcoord>, I<ycoord>)
+
+Retuns I<(x, y)> of entry at position (I<$coordx>, I<$coordy>).
+Either coordinate may be B<'max'> which is largest existing entry
+in that direction, B<'end'> which is one I<beyond> largest existing
+entry, or a number. (This is how you find out how big the grid is.)
+
+=item I<$tixgrid>->B<infoBbox>(I<x>,I<y>)
+
+Return the pixel bounding box of the cell at I<x,y>.
+
+=item I<$tixgrid>->B<infoExists>(I<x>,I<y>)
+
+Returns true if there is an item in the cell at I<x,y>.
+Throws an exception (dies) if I<x,y> is outside the
+grid - this may change (Nick doesn't like it).
+
+=item I<$tixgrid>->B<move>(I<dim>, I<from>, I<to>, I<offset>)
+
+=item I<$tixgrid>->B<moveColumn>(I<from>, I<to>, I<offset>)
+
+=item I<$tixgrid>->B<moveRow>(I<from>, I<to>, I<offset>)
+
+I<Dim> may be B<row> or B<column>. Moves the range of rows
+(or columns) from position I<from> through I<to> by the distance
+indicated by I<offset>. For example,
+I<$tixgrid>->B<moveRow>(B<2>, B<4>, B<1>) moves the rows 2,3,4
+to rows 3,4,5.
+
+=item I<$tixgrid>->B<nearest>(I<x>, I<y>)
+
+Screen pos (pixels) to entry (nx,ny) translation.
+
+=item I<$tixgrid>->B<selectionAdjust>(I<x1>, I<y1> ?,I<x2>, I<y2>?)
+
+=item I<$tixgrid>->B<selectionClear>(I<x1>, I<y1> ?,I<x2>, I<y2>?)
+
+=item I<$tixgrid>->B<selectionIncludes>(I<x1>, I<y1> ?,I<x2>, I<y2>?)
+
+=item I<$tixgrid>->B<selectionSet>(I<x1>, I<y1> ?,I<x2>, I<y2>?)
+
+=item I<$tixgrid>->B<selectionToggle>(I<x1>, I<y1> ?,I<x2>, I<y2>?)
+
+Selection support methods - probably buggy.
+
+x1 (y1) has not to be greater than x2 (y2), but only x2 and y2 can be 'max'.
+
+BUG: I<selectionIncludes>: has no visible effect (as in Tix). Eh???
+
+BUG: I<selectionClear>: only works for 0, 0, max, max (as in Tix). Eh???
+
+When I<x2, y2> are not given they default to I<x1, y1>, respectively.
+
+=item I<$tixgrid>->B<set>(I<x>, I<y>?, B<-itemtype>=>I<type>??, I<-option>=>I<value>, I<...>?)
+
+Creates a new display item at the cell at (I<x>,I<y>). The optional
+B<-itemtype> parameter gives the type of the display item.
+An additional list of I<option-value> pairs specify options
+of the display item. If a display item already exists at this cell,
+the old item will be deleted automatically.
+
+=item I<$tixgrid>->B<size>(I<dim>, I<index>?, I<-option>??=>I<value>, I<...>?)
+
+=item I<$tixgrid>->B<sizeColumn>(I<index>?, I<-option>??=>I<value>, I<...>?)
+
+=item I<$tixgrid>->B<sizeRow>(I<index>?, I<-option>??=>I<value>, I<...>?)
+
+Queries or sets the size of the row or column given by I<dim> and
+I<index>. I<Dim> may be B<row> or B<column>. I<Index> may be any
+non-negative integer that gives the position of a given row (or column).
+I<Index> can also be the string B<default>; in this case, this method
+queries or sets the default size of all rows (or columns).
+When no I<option-value> pair is given, this method returns
+a list containing the current size setting of the given row (or column).
+When I<option-value> pairs are given, the corresponding options
+of the size setting of the given row are changed. I<-option> may be
+one of the following:
+
+=over 8
+
+=item B<-pad0> => I<pixels>
+
+Specifies the paddings to the left of a column or the top of a row.
+
+=item B<-pad1> => I<pixels>
+
+Specifies the paddings to the right of a column or the bottom of a row.
+
+=item B<-size> => I<val>
+
+Specifies the width of a column or the height of a row.
+I<Val> may be: B<auto> -- the width of the column is set
+the widest cell in the column; a valid Tk screen distance
+unit (see B<Tk_GetPixels>); or a real number following by the
+word B<chars> (e.g. B<3.4chars>) that sets the width of the
+column to the given number of characters.
+
+=back
+
+=item I<$tixgrid>->B<sort>(I<dimension>, I<start>, I<end>, ?I<args ...>?)
+
+?docu here? (not supported on Win* OSs up to now)
+
+=item I<$tixgrid>->B<unset>(I<x>, I<y>)
+
+Clears the cell at (I<x>,I<y>) by removing its display item.
+
+=item I<$tixgrid>->B<xview>
+
+Normal horizontal scrollbar method.
+
+=item I<$tixgrid>->B<yview>
+
+Normal vertical scrollbar method.
+
+=back
+
+=head1 BINDINGS
+
+To be done - only most obvious basic bindings work. The Tcl/Tix code
+was coded as a "state machine" which is not easy to follow.
+
+=head1 SEE ALSO
+
+L<Tk::DItem|Tk::DItem>
+L<Tk::callbacks|Tk::callbacks>
+L<Tk::FloatEntry|Tk::FloatEntry>
+
+=head1 BUGS
+
+Tcl/Tix was/is not finished and both C code and bindings of TixGrid
+have some bugs.
+
+=head1 KEYWORDS
+
+tix, tixgrid, table, display item, spreadsheet
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Tk.xbm b/Master/tlpkg/tlperl/lib/Tk/Tk.xbm
new file mode 100644
index 00000000000..136d4793037
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Tk.xbm
@@ -0,0 +1,44 @@
+#define Tk.xbm_width 61
+#define Tk.xbm_height 61
+static unsigned char Tk.xbm_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xf8, 0x0e, 0x00, 0x00,
+ 0x00, 0xe0, 0x1e, 0x00, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0xfb, 0x1e, 0x00,
+ 0xfe, 0x7f, 0x00, 0x00, 0x80, 0xdf, 0x0f, 0x00, 0xff, 0xbf, 0x00, 0x00,
+ 0x80, 0xe0, 0x3d, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x47, 0x7f, 0x80,
+ 0xff, 0xfd, 0x01, 0x00, 0x00, 0x7f, 0x3e, 0xc0, 0xff, 0xf1, 0x01, 0x00,
+ 0x00, 0x30, 0x7f, 0xf0, 0xfe, 0xb3, 0x03, 0x00, 0x00, 0xf8, 0x3e, 0x7c,
+ 0xff, 0xcf, 0x07, 0x00, 0x00, 0x78, 0x37, 0xfc, 0x7b, 0xc3, 0x07, 0x00,
+ 0x00, 0xfc, 0x3d, 0xfe, 0x3c, 0x25, 0x0e, 0x00, 0x00, 0xfc, 0x3e, 0x5f,
+ 0x18, 0x41, 0x0b, 0x00, 0x00, 0x5c, 0x3f, 0x5f, 0xf0, 0x59, 0x1b, 0x00,
+ 0x00, 0xdc, 0x9f, 0x3f, 0xe8, 0xbe, 0x17, 0x00, 0x00, 0xbc, 0x9f, 0x2f,
+ 0xa8, 0x5b, 0x15, 0x00, 0x00, 0xdc, 0xdf, 0x25, 0x48, 0x7a, 0x34, 0x00,
+ 0x00, 0x7c, 0xce, 0x1f, 0x20, 0x2c, 0x36, 0x00, 0x00, 0x7c, 0xa7, 0x1f,
+ 0xcc, 0x09, 0xf0, 0x00, 0x00, 0xfc, 0xae, 0x1f, 0x49, 0x05, 0xf6, 0x00,
+ 0x00, 0xfc, 0xac, 0x3f, 0xf8, 0x11, 0xf6, 0x00, 0x00, 0xf8, 0x8d, 0x3f,
+ 0x8e, 0x0e, 0xd6, 0x01, 0x00, 0xf8, 0x9c, 0x7e, 0xd7, 0x5b, 0xff, 0x03,
+ 0x00, 0x70, 0x83, 0x5f, 0xcf, 0xfd, 0xbf, 0x01, 0x00, 0xe0, 0xc3, 0x3b,
+ 0xc7, 0xff, 0x3f, 0x03, 0x00, 0xe0, 0xcf, 0xbf, 0xe3, 0xff, 0x97, 0x03,
+ 0x00, 0x80, 0xfb, 0x7f, 0xfb, 0xff, 0x17, 0x01, 0x00, 0x80, 0xef, 0xff,
+ 0xb3, 0x6f, 0x17, 0x03, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x3f, 0x17, 0x03,
+ 0x00, 0x00, 0x88, 0xff, 0xbf, 0x3f, 0x1b, 0x03, 0x00, 0x00, 0x00, 0x7b,
+ 0x3d, 0x1f, 0x9f, 0x01, 0x00, 0x00, 0x80, 0x1f, 0x7f, 0x1f, 0x9e, 0x00,
+ 0x00, 0x00, 0x80, 0x1f, 0x3f, 0x0f, 0x1e, 0x00, 0x00, 0x00, 0x80, 0x1f,
+ 0x1f, 0x0f, 0x1e, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x1f, 0x0e, 0x1e, 0x00,
+ 0x00, 0xfe, 0x81, 0x8f, 0x1f, 0x0f, 0x1c, 0x00, 0x00, 0x98, 0x81, 0xc7,
+ 0x1f, 0x0e, 0x18, 0x00, 0x00, 0x98, 0x01, 0xc7, 0x0f, 0x0a, 0x18, 0x00,
+ 0xfc, 0x98, 0x99, 0xc7, 0x07, 0x0e, 0x18, 0x00, 0x8c, 0x99, 0x8d, 0xc7,
+ 0x02, 0x0e, 0x18, 0x00, 0x8c, 0x99, 0x07, 0xc3, 0x03, 0x03, 0x18, 0x00,
+ 0x8c, 0x99, 0x07, 0xc7, 0x01, 0x03, 0x28, 0x00, 0x8c, 0x99, 0x0d, 0x03,
+ 0x03, 0x01, 0x08, 0x00, 0xfc, 0x98, 0x19, 0x03, 0x86, 0x01, 0x18, 0x00,
+ 0x0c, 0x00, 0x00, 0x03, 0xc4, 0x01, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x03,
+ 0x88, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x03, 0x90, 0x00, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x01,
+ 0xf0, 0x01, 0x08, 0x00, 0x00, 0x00, 0x80, 0x01, 0xf8, 0x01, 0x18, 0x00,
+ 0x00, 0x00, 0xc0, 0x01, 0x9e, 0x03, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x01,
+ 0xb3, 0x01, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x18, 0x00,
+ 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0xdc, 0x00,
+ 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/Master/tlpkg/tlperl/lib/Tk/Tk.xpm b/Master/tlpkg/tlperl/lib/Tk/Tk.xpm
new file mode 100644
index 00000000000..7880a637f39
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Tk.xpm
@@ -0,0 +1,41 @@
+/* XPM */
+static char *Tk[] = {
+/* width height num_colors chars_per_pixel */
+" 32 32 2 1",
+/* colors */
+"# c #008080",
+"a c #ff0000",
+/* pixels */
+"################################",
+"################################",
+"################################",
+"################################",
+"################################",
+"################################",
+"##########aaaaaaaa##############",
+"#######aaaaaaaaaaaa#######aa####",
+"#####aaaaaaaaaaaaaa######aaa####",
+"####aaaaaaaaaaaaaaaa####aaaa####",
+"####aaaaaaa######aa####aaaa#####",
+"###aaaa#########aaa###aaaa######",
+"###aaaa#########aa###aaaa#######",
+"######aa#######aa####aaa########",
+"##############aaa###aaaa########",
+"#############aaa###aaaa##aaa####",
+"#############aa####aaa#aaaaa####",
+"############aaa###aaa#aaaaaa####",
+"###########aaa####aa#aa#aaa#####",
+"###########aaa###aa#aa#aaa######",
+"##########aaa####aaaaaaaa#aa####",
+"##########aaa####aaaaaaa##aa####",
+"#########aaaa####aaaaaaaaaa#####",
+"#########aaa#####aa##aaaaa######",
+"#########aaa##########aa########",
+"################################",
+"################################",
+"################################",
+"################################",
+"################################",
+"################################",
+"################################"
+};
diff --git a/Master/tlpkg/tlperl/lib/Tk/TkXSUB.def b/Master/tlpkg/tlperl/lib/Tk/TkXSUB.def
new file mode 100644
index 00000000000..8f60974226e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/TkXSUB.def
@@ -0,0 +1,62 @@
+MkXSUB("Tk::bind", XS_Tk_bind, XStoBind, Tk_BindObjCmd)
+MkXSUB("Tk::pack", XS_Tk_pack, XStoAfterSub, Tk_PackObjCmd)
+MkXSUB("Tk::grid", XS_Tk_grid, XStoGrid, Tk_GridObjCmd)
+MkXSUB("Tk::place", XS_Tk_place, XStoAfterSub, Tk_PlaceObjCmd)
+MkXSUB("Tk::form", XS_Tk_form, XStoAfterSub, Tix_FormCmd)
+MkXSUB("Tk::itemstyle", XS_Tk_itemstyle, XStoTclCmd, Tix_ItemStyleCmd)
+MkXSUB("Tk::winfo", XS_Tk_winfo, XStoSubCmd, Tk_WinfoObjCmd)
+MkXSUB("Tk::font", XS_Tk_font, XStoFont, Tk_FontObjCmd)
+MkXSUB("Tk::wm", XS_Tk_wm, XStoAfterSub, Tk_WmObjCmd)
+MkXSUB("Tk::grab", XS_Tk_grab, XStoSubCmd, Tk_GrabObjCmd)
+MkXSUB("Tk::focus", XS_Tk_focus, XStoSubCmd, Tk_FocusObjCmd)
+MkXSUB("Tk::event", XS_Tk_event, XStoEvent, Tk_EventObjCmd)
+MkXSUB("Tk::property", XS_Tk_property, XStoSubCmd, Tk_PropertyCmd)
+MkXSUB("Tk::clipboard", XS_Tk_clipboard, XStoDisplayof, Tk_ClipboardObjCmd)
+MkXSUB("Tk::bell", XS_Tk_bell, XStoDisplayof, Tk_BellObjCmd)
+MkXSUB("Tk::bindtags", XS_Tk_bindtags, XStoTk, Tk_BindtagsObjCmd)
+MkXSUB("Tk::destroy", XS_Tk_destroy, XStoTk, Tk_DestroyObjCmd)
+MkXSUB("Tk::raise", XS_Tk_raise, XStoTk, Tk_RaiseObjCmd)
+MkXSUB("Tk::lower", XS_Tk_lower, XStoTk, Tk_LowerObjCmd)
+MkXSUB("Tk::option", XS_Tk_option, XStoOption, Tk_OptionObjCmd)
+MkXSUB("Tk::image", XS_Tk_image, XStoImage, Tk_ImageObjCmd)
+MkXSUB("Tk::selection", XS_Tk_selection, XStoTk, Tk_SelectionObjCmd)
+
+#if defined(__WIN32__) || defined(MAC_TCL)
+MkXSUB("Tk::tk_chooseColor", XS_Tk_tk_chooseColor, XStoTk, Tk_ChooseColorObjCmd)
+MkXSUB("Tk::tk_chooseDirectory", XS_Tk_tk_chooseDirectory, XStoTk, Tk_ChooseDirectoryObjCmd)
+MkXSUB("Tk::tk_getOpenFile", XS_Tk_tk_getOpenFile, XStoTk, Tk_GetOpenFileObjCmd)
+MkXSUB("Tk::tk_getSaveFile", XS_Tk_tk_getSaveFile, XStoTk, Tk_GetSaveFileObjCmd)
+#endif
+#if defined(__WIN32__)
+MkXSUB("Tk::tk_messageBox", XS_Tk_tk_messageBox, XStoTk, Tk_MessageBoxObjCmd)
+#endif
+
+MkXSUB("Tk::tk", XS_Tk_tk, XStoTclCmd, Tk_TkObjCmd)
+
+#if 0
+MkXSUB("Tk::exit", XS_Tk_exit, XStoNoWindow, Tcl_ExitCmd)
+MkXSUB("Tk::fileevent", XS_Tk_fileevent, XStoNoWindow, Tcl_FileeventCmd)
+#endif
+MkXSUB("Tk::after", XS_Tk_after, XStoNoWindow, Tcl_AfterObjCmd)
+#ifndef WIN32
+MkXSUB("Tk::send", XS_Tk_send, XStoTclCmd, Tk_SendCmd)
+#endif
+
+MkXSUB("Tk::button", XS_Tk_button, XStoTclCmdNull, Tk_ButtonObjCmd)
+MkXSUB("Tk::checkbutton", XS_Tk_checkbutton, XStoTclCmdNull, Tk_CheckbuttonObjCmd)
+MkXSUB("Tk::label", XS_Tk_label, XStoTclCmdNull, Tk_LabelObjCmd)
+MkXSUB("Tk::radiobutton", XS_Tk_radiobutton, XStoTclCmdNull, Tk_RadiobuttonObjCmd)
+MkXSUB("Tk::_menu", XS_Tk__menu, XStoTclCmdNull, 0)
+
+MkXSUB("Tk::message", XS_Tk_message, XStoTclCmd, Tk_MessageObjCmd)
+MkXSUB("Tk::frame", XS_Tk_frame, XStoTclCmd, Tk_FrameObjCmd)
+MkXSUB("Tk::labelframe", XS_Tk_labelframe, XStoTclCmd, Tk_LabelframeObjCmd)
+MkXSUB("Tk::panedwindow", XS_Tk_panedwindow, XStoTclCmd, Tk_PanedWindowObjCmd)
+MkXSUB("Tk::toplevel", XS_Tk_toplevel, XStoTclCmd, Tk_ToplevelObjCmd)
+MkXSUB("Tk::update", XS_Tk_update, XStoTclCmd, Tk_UpdateObjCmd)
+MkXSUB("Tk::tkwait", XS_Tk_tkwait, XStoTclCmd, Tk_TkwaitObjCmd)
+MkXSUB("Tk::configure", XS_Tk_configure, XStoWidget, newSVpv("configure",0))
+MkXSUB("Tk::cget", XS_Tk_cget, XStoWidget, newSVpv("cget",0))
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Toplevel.pm b/Master/tlpkg/tlperl/lib/Tk/Toplevel.pm
new file mode 100644
index 00000000000..7bcd156d475
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Toplevel.pm
@@ -0,0 +1,211 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Toplevel;
+use AutoLoader;
+
+use vars qw($VERSION);
+$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Toplevel.pm#6 $
+
+use base qw(Tk::Wm Tk::Frame);
+
+Construct Tk::Widget 'Toplevel';
+
+sub Tk_cmd { \&Tk::toplevel }
+
+sub CreateOptions
+{
+ return (shift->SUPER::CreateOptions,'-screen','-use')
+}
+
+sub Populate
+{
+ my ($cw,$arg) = @_;
+ $cw->SUPER::Populate($arg);
+ $cw->ConfigSpecs('-title',['METHOD',undef,undef,$cw->class]);
+}
+
+sub Icon
+{
+ my ($top,%args) = @_;
+ my $icon = $top->iconwindow;
+ my $state = $top->state;
+ if ($state ne 'withdrawn')
+ {
+ $top->withdraw;
+ $top->update; # Let attributes propogate
+ }
+ unless (defined $icon)
+ {
+ $icon = Tk::Toplevel->new($top,'-borderwidth' => 0,'-class'=>'Icon');
+ $icon->withdraw;
+ # Fake Populate
+ my $lab = $icon->Component('Label' => 'icon');
+ $lab->pack('-expand'=>1,'-fill' => 'both');
+ $icon->ConfigSpecs(DEFAULT => ['DESCENDANTS']);
+ # Now do tail of InitObject
+ $icon->ConfigDefault(\%args);
+ # And configure that new would have done
+ $top->iconwindow($icon);
+ $top->update;
+ $lab->DisableButtonEvents;
+ $lab->update;
+ }
+ $top->iconimage($args{'-image'}) if (exists $args{'-image'});
+ $icon->configure(%args);
+ $icon->idletasks; # Let size request propogate
+ $icon->geometry($icon->ReqWidth . 'x' . $icon->ReqHeight);
+ $icon->update; # Let attributes propogate
+ $top->deiconify if ($state eq 'normal');
+ $top->iconify if ($state eq 'iconic');
+}
+
+sub menu
+{
+ my $w = shift;
+ my $menu;
+ $menu = $w->cget('-menu');
+ unless (defined $menu)
+ {
+ $w->configure(-menu => ($menu = $w->SUPER::menu))
+ }
+ $menu->configure(@_) if @_;
+ return $menu;
+}
+
+
+1;
+__END__
+
+#----------------------------------------------------------------------
+#
+# Focus Group
+#
+# Focus groups are used to handle the user's focusing actions inside a
+# toplevel.
+#
+# One example of using focus groups is: when the user focuses on an
+# entry, the text in the entry is highlighted and the cursor is put to
+# the end of the text. When the user changes focus to another widget,
+# the text in the previously focused entry is validated.
+#
+
+#----------------------------------------------------------------------
+# tkFocusGroup_Create --
+#
+# Create a focus group. All the widgets in a focus group must be
+# within the same focus toplevel. Each toplevel can have only
+# one focus group, which is identified by the name of the
+# toplevel widget.
+#
+sub FG_Create {
+ my $t = shift;
+ unless (exists $t->{'_fg'}) {
+ $t->{'_fg'} = 1;
+ $t->bind('<FocusIn>', sub {
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $t->FG_In($w, $Ev->d);
+ }
+ );
+ $t->bind('<FocusOut>', sub {
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $t->FG_Out($w, $Ev->d);
+ }
+ );
+ $t->bind('<Destroy>', sub {
+ my $w = shift;
+ my $Ev = $w->XEvent;
+ $t->FG_Destroy($w);
+ }
+ );
+ # <Destroy> is not sufficient to break loops if never mapped.
+ $t->OnDestroy([$t,'FG_Destroy']);
+ }
+}
+
+# tkFocusGroup_BindIn --
+#
+# Add a widget into the "FocusIn" list of the focus group. The $cmd will be
+# called when the widget is focused on by the user.
+#
+sub FG_BindIn {
+ my($t, $w, $cmd) = @_;
+ $t->Error("focus group \"$t\" doesn't exist") unless (exists $t->{'_fg'});
+ $t->{'_FocusIn'}{$w} = Tk::Callback->new($cmd);
+}
+
+# tkFocusGroup_BindOut --
+#
+# Add a widget into the "FocusOut" list of the focus group. The
+# $cmd will be called when the widget loses the focus (User
+# types Tab or click on another widget).
+#
+sub FG_BindOut {
+ my($t, $w, $cmd) = @_;
+ $t->Error("focus group \"$t\" doesn't exist") unless (exists $t->{'_fg'});
+ $t->{'_FocusOut'}{$w} = Tk::Callback->new($cmd);
+}
+
+# tkFocusGroup_Destroy --
+#
+# Cleans up when members of the focus group is deleted, or when the
+# toplevel itself gets deleted.
+#
+sub FG_Destroy {
+ my($t, $w) = @_;
+ if (!defined($w) || $t == $w) {
+ delete $t->{'_fg'};
+ delete $t->{'_focus'};
+ delete $t->{'_FocusOut'};
+ delete $t->{'_FocusIn'};
+ } else {
+ if (exists $t->{'_focus'}) {
+ delete $t->{'_focus'} if ($t->{'_focus'} == $w);
+ }
+ delete $t->{'_FocusIn'}{$w};
+ delete $t->{'_FocusOut'}{$w};
+ }
+}
+
+# tkFocusGroup_In --
+#
+# Handles the <FocusIn> event. Calls the FocusIn command for the newly
+# focused widget in the focus group.
+#
+sub FG_In {
+ my($t, $w, $detail) = @_;
+ if (defined $t->{'_focus'} and $t->{'_focus'} eq $w) {
+ # This is already in focus
+ return;
+ } else {
+ $t->{'_focus'} = $w;
+ $t->{'_FocusIn'}{$w}->Call if exists $t->{'_FocusIn'}{$w};
+ }
+}
+
+# tkFocusGroup_Out --
+#
+# Handles the <FocusOut> event. Checks if this is really a lose
+# focus event, not one generated by the mouse moving out of the
+# toplevel window. Calls the FocusOut command for the widget
+# who loses its focus.
+#
+sub FG_Out {
+ my($t, $w, $detail) = @_;
+ if ($detail ne 'NotifyNonlinear' and $detail ne 'NotifyNonlinearVirtual') {
+ # This is caused by mouse moving out of the window
+ return;
+ }
+ unless (exists $t->{'_FocusOut'}{$w}) {
+ return;
+ } else {
+ $t->{'_FocusOut'}{$w}->Call;
+ delete $t->{'_focus'};
+ }
+}
+
+1;
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/Toplevel.pod b/Master/tlpkg/tlperl/lib/Tk/Toplevel.pod
new file mode 100644
index 00000000000..e3bbf579c0b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Toplevel.pod
@@ -0,0 +1,199 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Toplevel - Create and manipulate Toplevel widgets
+
+=for category Tk Widget Classes
+
+=head1 SYNOPSIS
+
+S< >I<$toplevel> = I<$parent>-E<gt>B<Toplevel>(?I<options>?);
+
+=head1 STANDARD OPTIONS
+
+B<-borderwidth> B<-highlightbackground> B<-highlightthickness> B<-takefocus>
+B<-class> B<-highlightcolor> B<-relief>
+B<-cursor>
+
+See L<Tk::options> for details of the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<background>
+
+=item Class: B<Background>
+
+=item Switch: B<-background>
+
+This option is the same as the standard B<background> option
+except that its value may also be specified as an undefined value.
+In this case, the widget will display no background or border, and
+no colors will be consumed from its colormap for its background
+and border.
+
+=item Name: B<colormap>
+
+=item Class: B<Colormap>
+
+=item Switch: B<-colormap>
+
+Specifies a colormap to use for the window.
+The value may be either B<new>, in which case a new colormap is
+created for the window and its children, or the name of another
+window (which must be on the same screen and have the same visual
+as $widget), in which case the new window will use the colormap
+from the specified window.
+If the B<colormap> option is not specified, the new window
+uses the default colormap of its screen.
+This option may not be changed with the B<configure>
+method.
+
+=item Name: B<container>
+
+=item Class: B<Container>
+
+=item Switch: B<-container>
+
+The value must be a boolean. If true, it means that this window will
+be used as a container in which some other application will be embedded
+(for example, a Tk toplevel can be embedded using the B<-use> option).
+The window will support the appropriate window manager protocols for
+things like geometry requests. The window should not have any
+children of its own in this application.
+This option may not be changed with the B<configure>
+method.
+
+=item Name: B<height>
+
+=item Class: B<Height>
+
+=item Switch: B<-height>
+
+Specifies the desired height for the window in any of the forms
+acceptable to B<Tk_GetPixels>.
+If this option is less than or equal to zero then the window will
+not request any size at all.
+
+=item Name: B<menu>
+
+=item Class: B<Menu>
+
+=item Switch: B<-menu>
+
+Specifies a menu widget to be used as a menubar. On the Macintosh, the
+menubar will be displayed accross the top of the main monitor. On
+Microsoft Windows and all UNIX platforms, the menu will appear accross
+the toplevel window as part of the window dressing maintained by the
+window manager.
+
+=item Name: B<"">
+
+=item Class: B<"">
+
+=item Switch: B<-screen>
+
+Specifies the screen on which to place the new window.
+Any valid screen name may be used, even one associated with a
+different display.
+Defaults to the same screen as its parent.
+This option is special in that it may not be specified via the option
+database, and it may not be modified with the B<configure>
+method.
+
+=item Switch: B<-title>
+
+Specifies the title of the toplevel window.
+
+=item Name: B<use>
+
+=item Class: B<Use>
+
+=item Switch: B<-use>
+
+This option is used for embedding. If the value isn't an empty string,
+it must be the the window identifier of a container window, specified as
+a hexadecimal string like the ones returned by the B<winfo id>
+command. The toplevel widget will be created as a child of the given
+container instead of the root window for the screen. If the container
+window is in a Tk application, it must be a frame or toplevel widget for
+which the B<-container> option was specified.
+This option may not be changed with the B<configure>
+method.
+
+=item Name: B<visual>
+
+=item Class: B<Visual>
+
+=item Switch: B<-visual>
+
+Specifies visual information for the new window in any of the
+forms accepted by B<Tk_GetVisual>.
+If this option is not specified, the new window will use the default
+visual for its screen.
+The B<visual> option may not be modified with the B<configure>
+method.
+
+=item Name: B<width>
+
+=item Class: B<Width>
+
+=item Switch: B<-width>
+
+Specifies the desired width for the window in any of the forms
+acceptable to B<Tk_GetPixels>.
+If this option is less than or equal to zero then the window will
+not request any size at all.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Toplevel> method creates a new toplevel widget (given
+by the $widget argument). Additional
+options, described above, may be specified on the command line
+or in the option database
+to configure aspects of the toplevel such as its background color
+and relief. The B<toplevel> command returns the
+path name of the new window.
+
+A toplevel is similar to a frame except that it is created as a
+top-level window: its X parent is the root window of a screen
+rather than the logical parent from its path name. The primary
+purpose of a toplevel is to serve as a container for dialog boxes
+and other collections of widgets. The only visible features
+of a toplevel are its background color and an optional 3-D border
+to make the toplevel appear raised or sunken.
+
+=head1 WIDGET METHODS
+
+The B<Toplevel> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class, and the L<Tk::Wm|Tk::Wm> class.
+
+=head1 BINDINGS
+
+When a new toplevel is created, it has no default event bindings:
+toplevels are not intended to be interactive.
+
+=head1 SEE ALSO
+
+L<Tk::Widget|Tk::Widget>
+L<Tk::Wm|Tk::Wm>
+
+=head1 KEYWORDS
+
+toplevel, widget
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Trace.pm b/Master/tlpkg/tlperl/lib/Tk/Trace.pm
new file mode 100644
index 00000000000..b663620452a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Trace.pm
@@ -0,0 +1,405 @@
+package Tk::Trace;
+
+use vars qw($VERSION);
+$VERSION = '4.009'; # was: sprintf '4.%03d', q$Revision: #7 $ =~ /\D(\d+)\s*$/;
+
+use Carp;
+use Tie::Watch;
+use strict;
+
+# The %TRACE hash is indexed by stringified variable reference. Each hash
+# bucket contains an array reference having two elements:
+#
+# ->[0] = a reference to the variable's Tie::Watch object
+# ->[1] = a hash reference with these keys: -fetch, -store, -destroy
+# ->{key} = [ active flag, [ callback list ] ]
+# where each callback is a normalized callback array reference
+#
+# Thus, each trace type (r w u ) may have multiple traces.
+
+my %TRACE; # watchpoints indexed by stringified ref
+
+my %OP = ( # trace to Tie::Watch operation map
+ r => '-fetch',
+ w => '-store',
+ u => '-destroy',
+);
+
+sub fetch {
+
+ # fetch() wraps the user's callback with necessary tie() bookkeeping
+ # and invokes the callback with the proper arguments. It expects:
+ #
+ # $_[0] = Tie::Watch object
+ # $_[1] = undef for a scalar, an index/key for an array/hash
+ #
+ # The user's callback is passed these arguments:
+ #
+ # $_[0] = undef for a scalar, index/key for array/hash
+ # $_[1] = current value
+ # $_[2] = operation 'r'
+ # $_[3 .. $#_] = optional user callback arguments
+ #
+ # The user callback returns the final value to assign the variable.
+
+ my $self = shift; # Tie::Watch object
+ my $val = $self->Fetch(@_); # get variable's current value
+ my $aref = $self->Args('-fetch'); # argument reference
+ my $call = $TRACE{$aref->[0]}->[1]->{-fetch}; # active flag/callbacks
+ return $val unless $call->[0]; # if fetch inactive
+
+ my $final_val;
+ foreach my $aref (reverse @$call[ 1 .. $#{$call} ] ) {
+ my ( @args_copy ) = @$aref;
+ my $sub = shift @args_copy; # user's callback
+ unshift @_, undef if scalar @_ == 0; # undef "index" for a scalar
+ my @args = @_; # save for post-callback work
+ $args[1] = &$sub(@_, $val, 'r', @args_copy); # invoke user callback
+ shift @args unless defined $args[0]; # drop scalar "index"
+ $final_val = $self->Store(@args); # update variable's value
+ }
+ $final_val;
+
+} # end fetch
+
+sub store {
+
+ # store() wraps the user's callback with necessary tie() bookkeeping
+ # and invokes the callback with the proper arguments. It expects:
+ #
+ # $_[0] = Tie::Watch object
+ # $_[1] = new value for a scalar, index/key for an array/hash
+ # $_[2] = undef for a scalar, new value for an array/hash
+ #
+ # The user's callback is passed these arguments:
+ #
+ # $_[0] = undef for a scalar, index/key for array/hash
+ # $_[1] = new value
+ # $_[2] = operation 'w'
+ # $_[3 .. $#_] = optional user callback arguments
+ #
+ # The user callback returns the final value to assign the variable.
+
+ my $self = shift; # Tie::Watch object
+ my $val = $self->Store(@_); # store variable's new value
+ my $aref = $self->Args('-store'); # argument reference
+ my $call = $TRACE{$aref->[0]}->[1]->{-store}; # active flag/callbacks
+ return $val unless $call->[0]; # if store inactive
+
+ foreach my $aref ( reverse @$call[ 1 .. $#{$call} ] ) {
+ my ( @args_copy ) = @$aref;
+ my $sub = shift @args_copy; # user's callback
+ unshift @_, undef if scalar @_ == 1; # undef "index" for a scalar
+ my @args = @_; # save for post-callback work
+ $args[1] = &$sub(@_, 'w', @args_copy); # invoke user callback
+ shift @args unless defined $args[0]; # drop scalar "index"
+ $self->Store(@args); # update variable's value
+ }
+
+} # end store
+
+sub destroy {
+
+ # destroy() wraps the user's callback with necessary tie() bookkeeping
+ # and invokes the callback with the proper arguments. It expects:
+ #
+ # $_[0] = Tie::Watch object
+ #
+ # The user's callback is passed these arguments:
+ #
+ # $_[0] = undef for a scalar, index/key for array/hash
+ # $_[1] = final value
+ # $_[2] = operation 'u'
+ # $_[3 .. $#_] = optional user callback arguments
+
+ my $self = shift; # Tie::Watch object
+ my $val = $self->Fetch(@_); # variable's final value
+ my $aref = $self->Args('-destroy'); # argument reference
+ my $call = $TRACE{$aref->[0]}->[1]->{-destroy}; # active flag/callbacks
+ return $val unless $call->[0]; # if destroy inactive
+
+ foreach my $aref ( reverse @$call[ 1 .. $#{$call} ] ) {
+ my ( @args_copy ) = @$aref;
+ my $sub = shift @args_copy; # user's callback
+ my $val = $self->Fetch(@_); # get final value
+ &$sub(undef, $val, 'u', @args_copy); # invoke user callback
+ $self->Destroy(@_); # destroy variable
+ }
+
+} # end destroy
+
+sub Tk::Widget::traceVariable {
+
+ my( $parent, $vref, $op, $callback ) = @_;
+
+ {
+ $^W = 0;
+ croak "Illegal parent '$parent', not a widget" unless ref $parent;
+ croak "Illegal variable '$vref', not a reference" unless ref $vref;
+ croak "Illegal trace operation '$op'" unless $op;
+ croak "Illegal trace operation '$op'" if $op =~ /[^rwu]/;
+ croak "Illegal callback ($callback)" unless $callback;
+ }
+
+ # Need to add our internal callback to user's callback arg list
+ # so we can call ours first, followed by the user's callback and
+ # any user arguments. Trace callbacks are activated as requied.
+
+ my $trace = $TRACE{$vref};
+ if ( not defined $trace ) {
+ my $watch = Tie::Watch->new(
+ -variable => $vref,
+ -fetch => [ \&fetch, $vref ],
+ -store => [ \&store, $vref ],
+ -destroy => [ \&destroy, $vref ],
+ );
+ $trace = $TRACE{$vref} =
+ [$watch,
+ {
+ -fetch => [ 0 ],
+ -store => [ 0 ],
+ -destroy => [ 0 ],
+ }
+ ];
+ }
+
+ $callback = [ $callback ] if ref $callback eq 'CODE';
+
+ foreach my $o (split '', $op) {
+ push @{$trace->[1]->{$OP{$o}}}, $callback;
+ $trace->[1]->{$OP{$o}}->[0] = 1; # activate
+ }
+
+ return $trace; # for peeking
+
+} # end traceVariable
+
+sub Tk::Widget::traceVdelete {
+
+ my ( $parent, $vref, $op_not_honored, $callabck_not_honored ) = @_;
+
+ if ( defined $vref && defined $TRACE{$vref} && defined $TRACE{$vref}->[0] ) {
+ $$vref = $TRACE{$vref}->[0]->Fetch;
+ $TRACE{$vref}->[0]->Unwatch;
+ delete $TRACE{$vref};
+ }
+
+} # end traceVdelete
+
+sub Tk::Widget::traceVinfo {
+
+ my ( $parent, $vref ) = @_;
+
+ return ( defined $TRACE{$vref}->[0] ) ? $TRACE{$vref}->[0]->Info : undef;
+
+} # end traceVinfo
+
+=head1 NAME
+
+Tk::Trace - emulate Tcl/Tk B<trace> functions.
+
+=head1 SYNOPSIS
+
+ use Tk::Trace
+
+ $mw->traceVariable(\$v, 'wru' => [\&update_meter, $scale]);
+ %vinfo = $mw->traceVinfo(\$v);
+ print "Trace info :\n ", join("\n ", @{$vinfo{-legible}}), "\n";
+ $mw->traceVdelete(\$v);
+
+=head1 DESCRIPTION
+
+This class module emulates the Tcl/Tk B<trace> family of commands by
+binding subroutines of your devising to Perl variables using simple
+B<Tie::Watch> features.
+
+Callback format is patterned after the Perl/Tk scheme: supply either a
+code reference, or, supply an array reference and pass the callback
+code reference in the first element of the array, followed by callback
+arguments.
+
+User callbacks are passed these arguments:
+
+ $_[0] = undef for a scalar, index/key for array/hash
+ $_[1] = variable's current (read), new (write), final (undef) value
+ $_[2] = operation (r, w, or u)
+ $_[3 .. $#_] = optional user callback arguments
+
+As a Trace user, you have an important responsibility when writing your
+callback, since you control the final value assigned to the variable.
+A typical callback might look like:
+
+ sub callback {
+ my($index, $value, $op, @args) = @_;
+ return if $op eq 'u';
+ # .... code which uses $value ...
+ return $value; # variable's final value
+ }
+
+Note that the callback's return value becomes the variable's final value,
+for either read or write traces.
+
+For write operations, the variable is updated with its new value before
+the callback is invoked.
+
+Multiple read, write and undef callbacks can be attached to a variable,
+which are invoked in reverse order of creation.
+
+=head1 METHODS
+
+=over 4
+
+=item $mw->traceVariable(varRef, op => callback);
+
+B<varRef> is a reference to the scalar, array or hash variable you
+wish to trace. B<op> is the trace operation, and can be any combination
+of B<r> for read, B<w> for write, and B<u> for undef. B<callback> is a
+standard Perl/Tk callback, and is invoked, depending upon the value of
+B<op>, whenever the variable is read, written, or destroyed.
+
+=item %vinfo = $mw->traceVinfo(varRef);
+
+Returns a hash detailing the internals of the Trace object, with these
+keys:
+
+ %vinfo = (
+ -variable => varRef
+ -debug => '0'
+ -shadow => '1'
+ -value => 'HELLO SCALAR'
+ -destroy => callback
+ -fetch => callback
+ -store => callback
+ -legible => above data formatted as a list of string, for printing
+ );
+
+For array and hash Trace objects, the B<-value> key is replaced with a
+B<-ptr> key which is a reference to the parallel array or hash.
+Additionally, for an array or hash, there are key/value pairs for
+all the variable specific callbacks.
+
+=item $mw->traceVdelete(\$v);
+
+Stop tracing the variable.
+
+=back
+
+=head1 EXAMPLES
+
+ # Trace a Scale's variable and move a meter in unison.
+
+ use Tk;
+ use Tk::widgets qw/Trace/;
+
+ $pi = 3.1415926;
+ $mw = MainWindow->new;
+ $c = $mw->Canvas( qw/-width 200 -height 110 -bd 2 -relief sunken/ )->grid;
+ $c->createLine( qw/100 100 10 100 -tag meter -arrow last -width 5/ );
+ $s = $mw->Scale( qw/-orient h -from 0 -to 100 -variable/ => \$v )->grid;
+ $mw->Label( -text => 'Slide Me for 5 Seconds' )->grid;
+
+ $mw->traceVariable( \$v, 'w' => [ \&update_meter, $s ] );
+
+ $mw->after( 5000 => sub {
+ print "Untrace time ...\n";
+ %vinfo = $s->traceVinfo( \$v );
+ print "Watch info :\n ", join("\n ", @{$vinfo{-legible}}), "\n";
+ $c->traceVdelete( \$v );
+ });
+
+ MainLoop;
+
+ sub update_meter {
+ my( $index, $value, $op, @args ) = @_;
+ return if $op eq 'u';
+ $min = $s->cget( -from );
+ $max = $s->cget( -to );
+ $pos = $value / abs( $max - $min );
+ $x = 100.0 - 90.0 * ( cos( $pos * $pi ) );
+ $y = 100.0 - 90.0 * ( sin( $pos * $pi ) );
+ $c->coords( qw/meter 100 100/, $x, $y );
+ return $value;
+ }
+
+ # Predictive text entry.
+
+ use Tk;
+ use Tk::widgets qw/ LabEntry Trace /;
+ use strict;
+
+ my @words = qw/radio television telephone turntable microphone/;
+
+ my $mw = MainWindow->new;
+
+ my $e = $mw->LabEntry(
+ qw/ -label Thing -width 40 /,
+ -labelPack => [ qw/ -side left / ],
+ -textvariable => \my $thing,
+ );
+ my $t = $mw->Text( qw/ -height 10 -width 50 / );;
+
+ $t->pack( $e, qw/ -side top / );
+
+ $e->focus;
+ $e->traceVariable( \$thing, 'w', [ \&trace_thing, $e, $t ] );
+
+ foreach my $k ( 1 .. 12 ) {
+ $e->bind( "<F${k}>" => [ \&ins, $t, Ev('K') ] );
+ }
+ $e->bind( '<Return>' =>
+ sub {
+ print "$thing\n";
+ $_[0]->delete( 0, 'end' );
+ }
+ );
+
+ MainLoop;
+
+ sub trace_thing {
+
+ my( $index, $value, $op, $e, $t ) = @_;
+
+ return unless $value;
+
+ $t->delete( qw/ 1.0 end / );
+ foreach my $w ( @words ) {
+ if ( $w =~ /^$value/ ) {
+ $t->insert( 'end', "$w\n" );
+ }
+ }
+
+ return $value;
+
+ } # end trace_thing
+
+ sub ins {
+
+ my( $e, $t, $K ) = @_;
+
+ my( $index ) = $K =~ /^F(\d+)$/;
+
+ $e->delete( 0, 'end' );
+ $e->insert( 'end', $t->get( "$index.0", "$index.0 lineend" ) );
+ $t->delete( qw/ 1.0 end / );
+
+ } # end ins
+
+=head1 HISTORY
+
+ Stephen.O.Lidie@Lehigh.EDU, Lehigh University Computing Center, 2000/08/01
+ . Version 1.0, for Tk800.022.
+
+ sol0@Lehigh.EDU, Lehigh University Computing Center, 2003/09/22
+ . Version 1.1, for Tk804.025, add support for multiple traces of the same
+ type on the same variable.
+
+=head1 COPYRIGHT
+
+Copyright (C) 2000 - 2003 Stephen O. Lidie. All rights reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Tree.pm b/Master/tlpkg/tlperl/lib/Tk/Tree.pm
new file mode 100644
index 00000000000..8f4fe2640d8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Tree.pm
@@ -0,0 +1,313 @@
+package Tk::Tree;
+# Tree -- TixTree widget
+#
+# Derived from Tree.tcl in Tix 4.1
+#
+# Chris Dean <ctdean@cogit.com>
+# Changes: Renee Baecker <module@renee-baecker.de>
+
+use vars qw($VERSION);
+$VERSION = '4.72'; # $Id: Tree.pm,v 1.4 2007/11/04 09:11:31 eserte Exp $
+
+use Tk ();
+use Tk::Derived;
+use Tk::HList;
+use base qw(Tk::Derived Tk::HList);
+use strict;
+
+Construct Tk::Widget 'Tree';
+
+sub Tk::Widget::ScrlTree { shift->Scrolled('Tree' => @_) }
+
+sub Populate
+{
+ my( $w, $args ) = @_;
+
+ $w->SUPER::Populate( $args );
+
+ $w->ConfigSpecs(
+ -ignoreinvoke => ['PASSIVE', 'ignoreInvoke', 'IgnoreInvoke', 0],
+ -opencmd => ['CALLBACK', 'openCmd', 'OpenCmd', 'OpenCmd' ],
+ -indicatorcmd => ['CALLBACK', 'indicatorCmd', 'IndicatorCmd', 'IndicatorCmd'],
+ -closecmd => ['CALLBACK', 'closeCmd', 'CloseCmd', 'CloseCmd'],
+ -indicator => ['SELF', 'indicator', 'Indicator', 1],
+ -indent => ['SELF', 'indent', 'Indent', 20],
+ -width => ['SELF', 'width', 'Width', 20],
+ -itemtype => ['SELF', 'itemtype', 'Itemtype', 'imagetext'],
+ -foreground => ['SELF'],
+ );
+}
+
+sub autosetmode
+{
+ my( $w ) = @_;
+ $w->setmode();
+}
+
+sub add_pathimage
+{
+ my ($w,$path,$imgopen,$imgclose) = @_;
+ $imgopen ||= "minusarm";
+ $imgclose ||= "plusarm";
+
+ my $separator = $w->cget(-separator);
+
+ $path =~ s/([\.?()|])/\\$1/g;
+ $path =~ s/\$/\\\$/g;
+ $path =~ s/\\\$$/\$/;
+ $path =~ s/\*/[^$separator]+/g;
+
+ push(@{$w->{Images}},[$path,$imgopen,$imgclose]);
+}
+
+sub child_entries
+{
+ my ($w,$path,$depth) = @_;
+
+ my $level = 1;
+ $depth ||= 1;
+ $path ||= '';
+
+ my @children = $w->_get_childinfos($depth,$level,$path);
+
+ return wantarray ? @children : scalar(@children);
+}
+
+sub _get_childinfos
+{
+ my ($w,$maxdepth,$level,$path) = @_;
+ my @children = $w->infoChildren($path);
+ my @tmp;
+
+ if($level < $maxdepth)
+ {
+ for my $child(@children)
+ {
+ push(@tmp,$w->_get_childinfos($maxdepth,$level +1,$child));
+ }
+ }
+
+ push(@children,@tmp);
+
+ return @children;
+}
+
+sub IndicatorCmd
+{
+ my( $w, $ent, $event ) = @_;
+
+ my $mode = $w->getmode( $ent );
+
+ if ( $event eq '<Arm>' )
+ {
+ if ($mode eq 'open' )
+ {
+ #$w->_indicator_image( $ent, 'plusarm' );
+ $w->_open($ent);
+ }
+ else
+ {
+ #$w->_indicator_image( $ent, 'minusarm' );
+ $w->_close($ent);
+ }
+ }
+ elsif ( $event eq '<Disarm>' )
+ {
+ if ($mode eq 'open' )
+ {
+ #$w->_indicator_image( $ent, 'plus' );
+ $w->_open($ent);
+ }
+ else
+ {
+ #$w->_indicator_image( $ent, 'minus' );
+ $w->_close($ent);
+ }
+ }
+ elsif( $event eq '<Activate>' )
+ {
+ $w->Activate( $ent, $mode );
+ $w->Callback( -browsecmd => $ent );
+ }
+}
+
+sub close
+{
+ my( $w, $ent ) = @_;
+ my $mode = $w->getmode( $ent );
+ $w->Activate( $ent, $mode ) if( $mode eq 'close' );
+}
+
+sub open
+{
+ my( $w, $ent ) = @_;
+ my $mode = $w->getmode( $ent );
+ $w->Activate( $ent, $mode ) if( $mode eq 'open' );
+}
+
+sub getmode
+{
+ my( $w, $ent ) = @_;
+
+ return( 'none' ) unless $w->indicatorExists( $ent );
+
+ my $img = $w->_indicator_image( $ent );
+ if ($img eq "plus" || $img eq "plusarm" || grep{$img eq $_->[2]}@{$w->{Images}})
+ {
+ return( 'open' );
+ }
+ return( 'close' );
+}
+
+sub setmode
+{
+ my ($w,$ent,$mode) = @_;
+ unless (defined $mode)
+ {
+ $mode = 'none';
+ my @args;
+ push(@args,$ent) if defined $ent;
+ my @children = $w->infoChildren( @args );
+ if ( @children )
+ {
+ $mode = 'close';
+ foreach my $c (@children)
+ {
+ $mode = 'open' if $w->infoHidden( $c );
+ $w->setmode( $c );
+ }
+ }
+ }
+
+ if (defined $ent)
+ {
+ if ( $mode eq 'open' )
+ {
+ #$w->_indicator_image( $ent, 'plus' );
+ $w->_open($ent);
+ }
+ elsif ( $mode eq 'close' )
+ {
+ #$w->_indicator_image( $ent, 'minus' );
+ $w->_close($ent);
+ }
+ elsif( $mode eq 'none' )
+ {
+ $w->_indicator_image( $ent, undef );
+ }
+ }
+}
+
+sub _open
+{
+ my ($w,$ent) = @_;
+ $w->_indicator_image( $ent, "plus" );
+ for my $entry (@{$w->{Images}})
+ {
+ if($ent =~ $entry->[0])
+ {
+ $w->_indicator_image( $ent, $entry->[2] );
+ }
+ }
+}
+
+sub _close
+{
+ my ($w,$ent) = @_;
+ $w->_indicator_image( $ent, "minus" );
+ for my $entry (@{$w->{Images}})
+ {
+ if($ent =~ $entry->[0])
+ {
+ $w->_indicator_image( $ent, $entry->[1] );
+ }
+ }
+}
+
+sub Activate
+{
+ my( $w, $ent, $mode ) = @_;
+ if ( $mode eq 'open' )
+ {
+ $w->Callback( -opencmd => $ent );
+ #$w->_indicator_image( $ent, 'minus' );
+ $w->_close($ent);
+ }
+ elsif ( $mode eq 'close' )
+ {
+ $w->Callback( -closecmd => $ent );
+ #$w->_indicator_image( $ent, 'plus' );
+ $w->_open($ent);
+ }
+ else
+ {
+
+ }
+}
+
+sub OpenCmd
+{
+ my( $w, $ent ) = @_;
+ # The default action
+ foreach my $kid ($w->infoChildren( $ent ))
+ {
+ $w->show( -entry => $kid );
+ }
+}
+
+sub CloseCmd
+{
+ my( $w, $ent ) = @_;
+
+ # The default action
+ foreach my $kid ($w->infoChildren( $ent ))
+ {
+ $w->hide( -entry => $kid );
+ }
+}
+
+sub Command
+{
+ my( $w, $ent ) = @_;
+
+ return if $w->{Configure}{-ignoreInvoke};
+
+ $w->Activate( $ent, $w->getmode( $ent ) ) if $w->indicatorExists( $ent );
+}
+
+sub _indicator_image
+{
+ my( $w, $ent, $image ) = @_;
+ my $data = $w->privateData();
+ if (@_ > 2)
+ {
+ if (defined $image)
+ {
+ $w->indicatorCreate( $ent, -itemtype => 'image' )
+ unless $w->indicatorExists($ent);
+ $data->{$ent} = $image;
+ $w->indicatorConfigure( $ent, -image => $w->Getimage( $image ) );
+ }
+ else
+ {
+ $w->indicatorDelete( $ent ) if $w->indicatorExists( $ent );
+ delete $data->{$ent};
+ }
+ }
+ return $data->{$ent};
+}
+
+1;
+
+__END__
+
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distrobution are in the file
+# license.tcl.
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Tree.pod b/Master/tlpkg/tlperl/lib/Tk/Tree.pod
new file mode 100644
index 00000000000..445d2f0765b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Tree.pod
@@ -0,0 +1,274 @@
+
+=head1 NAME
+
+Tk::Tree - Create and manipulate Tree widgets
+
+=for pm Tixish/Tree.pm
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+S< >B<use Tk::Tree;>
+
+S< >I<$tree> = I<$parent>-E<gt>B<Tree>(?I<options>?);
+
+=head1 SUPER-CLASS
+
+The B<Tree> class is derived from the L<HList|Tk::HList> class and inherits all
+the methods, options and subwidgets of its super-class. A B<Tree> widget is
+not scrolled by default.
+
+=head1 STANDARD OPTIONS
+
+B<Tree> supports all the standard options of an HList widget.
+See L<Tk::options> for details on the standard options.
+
+=head1 WIDGET-SPECIFIC OPTIONS
+
+=over 4
+
+=item Name: B<browseCmd>
+
+=item Class: B<BrowseCmd>
+
+=item Switch: B<-browsecmd>
+
+Specifies a L<callback|Tk::callbacks> to call whenever the user browses on an entry
+(usually by single-clicking on the entry). The callback is called with
+one argument, the pathname of the entry.
+
+=item Name: B<closeCmd>
+
+=item Class: B<CloseCmd>
+
+=item Switch: B<-closecmd>
+
+Specifies a L<callback|Tk::callbacks> to call whenever an entry needs to be closed (See
+L<"BINDINGS"> below). This method is called with one argument,
+the pathname of the entry. This method should perform appropriate
+actions to close the specified entry. If the B<-closecmd> option
+is not specified, the default closing action is to hide all child
+entries of the specified entry.
+
+=item Name: B<command>
+
+=item Class: B<Command>
+
+=item Switch: B<-command>
+
+Specifies a L<callback|Tk::callbacks> to call whenever the user activates an entry
+(usually by double-clicking on the entry). The callback
+is called with one argument, the pathname of the entry.
+
+=item Name: B<ignoreInvoke>
+
+=item Class: B<IgnoreInvoke>
+
+=item Switch: B<-ignoreinvoke>
+
+A Boolean value that specifies when a branch should be opened or
+closed. A branch will always be opened or closed when the user presses
+the (+) and (-) indicators. However, when the user invokes a branch
+(by doublc-clicking or pressing E<lt>ReturnE<gt>), the branch will be opened
+or closed only if B<-ignoreinvoke> is set to false (the default
+setting).
+
+=item Name: B<openCmd>
+
+=item Class: B<OpenCmd>
+
+=item Switch: B<-opencmd>
+
+Specifies a L<callback|Tk::callbacks> to call whenever an entry needs to be opened (See
+L<"BINDINGS"> below). This method is called with one argument,
+the pathname of the entry. This method should perform appropriate
+actions to open the specified entry. If the B<-opencmd> option
+is not specified, the default opening action is to show all the child
+entries of the specified entry.
+
+=back
+
+=head1 DESCRIPTION
+
+The B<Tree> method creates a new window and makes it into a Tree widget
+and return a reference to it. Additional options, described above, may
+be specified on the command line or in the option database to configure
+aspects of the Tree widget such as its cursor and relief.
+
+The Tree widget can be used to display hierarchical data in a tree
+form. The user can adjust the view of the tree by opening or closing
+parts of the tree.
+
+To display a static tree structure, you can add the entries into the
+Tree widget and hide any entries as desired. Then you can call
+the B<autosetmode> method. This will set up the Tree widget so that it
+handles all the I<open> and I<close> events automatically.
+the demonstration program F<Tixish/examples/perl-tix-tree>).
+
+The above method is not applicable if you want to maintain a dynamic tree
+structure, i.e, you do not know all the entries in the tree and you need
+to add or delete entries subsequently. To do this, you should first create
+the entries in the Tree widget. Then, use the B<setmode> method to
+indicate the entries that can be opened or closed, and use the B<-opencmd>
+and B<-closecmd> options to handle the opening and closing events. (Please
+see the demonstration program F<Tixish/examples/perl-tix-dyntree>).
+
+Use either
+
+S< >I<$parent>-E<gt>B<Scrolled>(B<'Tree'>, ... );
+
+or
+
+S< >I<$parent>-E<gt>B<ScrlTree>( ... );
+
+to create a scrolled B<Tree>. See L<Tk::Scrolled> for details.
+
+=head1 WIDGET METHODS
+
+The B<Tree> method creates a widget object.
+This object supports the B<configure> and B<cget> methods
+described in L<Tk::options> which can be used to enquire and
+modify the options described above.
+The widget also inherits all the methods provided by the generic
+L<Tk::Widget|Tk::Widget> class.
+
+The following additional methods are available for Tree widgets:
+
+=over 4
+
+=item I<$tree-E<gt>>B<add_pathimage>(I<treeRegExp [, openImg, closeImg]>)
+
+This method defines images for a given path (images must be in xpm
+format). The path can be determined by a simplified regular
+expression. There are just three metasymbols:
+
+=over
+
+=item ^
+
+at the beginning of the C<treeRegExp> same as in Perl regular
+expressions
+
+=item *
+
+anything
+
+=item $
+
+at the end of the C<TreeRegExp>, the same as in Perl regular
+expressions
+
+=back
+
+Examples:
+
+ $tree->add_pathimage('^root','openfolder','folder');
+
+matches C<root>, C<root.foo>, C<root.bar>, but not C<foo.root>
+
+ $tree->add_pathimage('root.*.class','openfolder','folder');
+
+matches all paths containing C<< root.<anything>.class >>, but not
+C<< root.<anything>.<anything>.class >> C<*> is one part of the path. If
+you want to use a wildcard for two steps, you have to use C<*.*>.
+
+ $tree->add_pathimage('class$','openfolder','folder');
+
+This matches all path with C<class> at the end.
+
+=item I<$tree>-E<gt>B<autosetmode>
+
+This method calls the B<setmode> method for all the entries in
+this Tree widget: if an entry has no child entries, its mode is set to
+B<none>. Otherwise, if the entry has any hidden child entries, its
+mode is set to B<open>; otherwise its mode is set to B<close>.
+
+=item I<$tree-E<gt>>B<child_entries>([$path][,$depth])
+
+This method returns in list context an array that contains all
+pathnames of subentries within the given path. In scalar context it
+returns the number of subentries in the given path.
+
+ Example:
+ root
+ | foo
+ | bar
+ | | bar1
+ | | bar2
+
+ my @childentries = $tree->child_entries('root.bar');
+ # returns (root.bar.bar1, root.bar.bar2)
+
+ my $nr_of_subentries = $tree->child_entries('root',2);
+ # returns 4
+
+If C<$path> is omitted, all it is assumed, that the entry above
+'root' is meant. C<$depth> defines the numbers of levels.
+
+=item I<$tree>-E<gt>B<close>(I<entryPath>)
+
+Close the entry given by I<entryPath> if its I<mode> is B<close>.
+
+=item I<$tree>-E<gt>B<getmode>(I<entryPath>)
+
+Returns the current I<mode> of the entry given by I<entryPath>.
+
+=item I<$tree>-E<gt>B<open>(I<entryPath>)
+
+Open the entry given by I<entryPath> if its I<mode> is B<open>.
+
+=item I<$tree>-E<gt>B<setmode>(I<entryPath, mode>)
+
+This method is used to indicate whether the entry given by
+I<entryPath> has children entries and whether the children are
+visible. I<mode> must be one of B<open>,
+B<close> or B<none>. If I<mode> is set to B<open>, a (+)
+indicator is drawn next to the entry. If I<mode> is set to
+B<close>, a (-) indicator is drawn next to the entry. If
+I<mode> is set to B<none>, no indicators will be drawn for this
+entry. The default I<mode> is none. The B<open> mode indicates
+the entry has hidden children and this entry can be opened by the
+user. The B<close> mode indicates that all the children of the entry
+are now visible and the entry can be closed by the user.
+
+=back
+
+=head1 BINDINGS
+
+The basic mouse and keyboard bindings of the Tree widget are the same
+as the L<bindings of the HList|Tk::HList/"BINDINGS"> widget.
+In addition, the entries can be opened or closed under the following
+conditions:
+
+=over 4
+
+=item [1]
+
+If the I<mode> of the entry is B<open>, it can be opened by clicking
+on its (+) indicator.
+
+=item [2]
+
+If the I<mode> of the entry is B<close>, it can be closed by clicking
+on its (-) indicator.
+
+=back
+
+=head1 SEE ALSO
+
+L<Tk::HList|Tk::HList>
+
+=head1 AUTHOR
+
+Perl/TK version by Chris Dean <ctdean@cogit.com>. Original Tcl/Tix
+version by Ioi Kim Lam.
+
+Additions by Renee Baecker <module@renee-baecker.de>
+
+=head1 ACKNOWLEDGEMENTS
+
+Thanks to Achim Bohnet <ach@mpe.mpg.de> for all his help.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/UserGuide.pod b/Master/tlpkg/tlperl/lib/Tk/UserGuide.pod
new file mode 100644
index 00000000000..08d397d4db7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/UserGuide.pod
@@ -0,0 +1,586 @@
+=head1 NAME
+
+Perl/Tk - Writing Tk applications in Perl 5
+
+=for category Introduction
+
+=head1 DESCRIPTION
+
+This document is for beginners. It assumes you know some B<Perl>, and
+have it and Tk running. If you are I<not> currently reading this
+document courtesy of the B<widget> demonstration program, please be
+sure to run B<widget>, as it will show you the various widget types
+supported by Tk and how to use them. B<widget> should be installed in
+your default path, so type I<widget> at a command prompt.
+
+Here are links to other novice tutorials:
+
+L<http://www.lehigh.edu/~sol0/ptk/tpj1.html>
+L<http://www.lehigh.edu/~sol0/ptk/perlmonth01/pm1.html>
+
+I<Mastering Perl/Tk> is the definitive book on Perl/Tk:
+
+L<http://www.oreilly.com/catalog/mastperltk>
+
+=head1 Some Background
+
+Tk GUI programming is event-driven. (This may already be familiar to
+you.) In event-driven programs, the main GUI loop is outside of the
+user program and inside the GUI library. This loop - initiated by
+calling B<MainLoop> - watches all events of interest and activates
+the correct handler procedures to handle these events. Some of these
+handler procedures may be user-supplied; others will be part of the
+library.
+
+For a programmer, this means that you're not watching what is happening;
+instead, you are requested by the toolkit to perform actions whenever
+necessary.
+So, you're not watching for 'raise window / close window / redraw window'
+requests, but you tell the toolkit which routine will handle such cases,
+and the toolkit will call the procedures when required. These procedures
+are known as I<callbacks>, and some of them you write yourself.
+
+=head1 First Requirements
+
+B<Perl> programs that use Tk need to include C<use Tk>.
+A program should also use C<use strict> and the B<-w> switch to ensure
+the program is working without common errors.
+
+Any Perl/Tk application starts by creating the Tk B<L<MainWindow|Tk::MainWindow>>. You
+then create items inside the B<MainWindow>, and/or create new windows
+called B<L<Toplevel|Tk::Toplevel>>s that also contain child items, before starting the
+B<MainLoop>, which is the last logical statment in your program. You
+can also create more items and windows while you're running, using
+callbacks. Items are only shown on the display after they have been
+arranged by a I<geometry manager> like B<L<pack|Tk::pack>>; more information on
+this later. B<MainLoop> starts the GUI and handle all events. That's
+all there is to it! A trivial one-window example is shown below:
+
+ #!/usr/bin/perl -w
+ use Tk;
+ use strict;
+
+ my $mw = MainWindow->new;
+ $mw->Label(-text => 'Hello, world!')->pack;
+ $mw->Button(
+ -text => 'Quit',
+ -command => sub { exit },
+ )->pack;
+ MainLoop;
+
+Please run this example. It shows you two widget types, a B<L<Label|Tk::Label>>
+and a B<L<Button|Tk::Button>>, and how they are packed. When clicked, the B<Button>
+widget invokes the callback specified by the C<-command> option. Finally,
+note the typical Tk style using C<-option> =E<gt> C<value> pairs.
+
+=head1 Widget creation
+
+Tk windows and widgets are hierarchical, S<i.e. one> window includes
+one or more other windows. You create the first Tk window using
+C<MainWindow-E<gt>new>. This returns a window handle, assigned to
+C<$mw> in the example above. Keep track of the main handle, commonly
+called a I<widget reference>.
+
+You can use any Tk handle to create child widgets within the window (or
+widget). This is done by calling the Tk constructor method on the
+variable. In the example above, the C<Label> method called from
+C<$mw> creates a B<Label> widget inside the B<MainWindow>. In the
+constructor call, you can specify various options; you can later add
+or change options for any widget using the B<configure> method, which
+takes the same parameters as the constructor. The one exception to
+the hierarchical structure is the B<Toplevel> constructor, which
+creates a new outermost window.
+
+After you create any widget (other than the B<MainWindow> or
+B<Toplevel>s, you must render it by calling B<pack>. (This is not
+entirely true; more later)). If you do not need to refer to the widget
+after construction and packing, call B<pack> off the constructor
+results, as shown for the B<Label> and B<Button> in the example above. Note
+that the result of the compound call is the result of B<pack>, which
+is a valid Tk handle.
+
+Windows and widgets are deleted by calling B<destroy> on them;
+this will delete and un-draw the widget and all its children.
+
+=head1 Standard Tk widgets
+
+Here is an itemize of the standard Tk widget set.
+
+=over 4
+
+=item L<Button|Tk::Button>
+
+=item L<Canvas|Tk::Canvas>
+
+=item L<Checkbutton|Tk::Checkbutton>
+
+=item L<Entry|Tk::Entry>
+
+=item L<Frame|Tk::Frame>
+
+=item L<Label|Tk::Label>
+
+=item L<Labelframe|Tk::Labelframe>
+
+=item L<Listbox|Tk::Listbox>
+
+=item L<Menu|Tk::Menu>
+
+=item L<Menubutton|Tk::Menubutton>
+
+=item L<Message|Tk::Message>
+
+=item L<Panedwindow|Tk::Panedwindow>
+
+=item L<Radiobutton|Tk::Radiobutton>
+
+=item L<Scale|Tk::Scale>
+
+=item L<Scrollbar|Tk::Scrollbar>
+
+=item L<Spinbox|Tk::Spinbox>
+
+=item L<Text|Tk::Text>
+
+=item L<Toplevel|Tk::Toplevel>
+
+=back
+
+Perl/Tk provides an equal number of new widgets, above and beyond this
+core set.
+
+=over 4
+
+=item L<Adjuster|Tk::Adjuster>
+
+=item L<Balloon|Tk::Balloon>
+
+=item L<BrowseEntry|Tk::BrowseEntry>
+
+=item L<ColorEditor|Tk::ColorEditor>
+
+=item L<Dialog|Tk::Dialog>
+
+=item L<DialogBox|Tk::DialogBox>
+
+=item L<DirTree|Tk::DirTree>
+
+=item ErrorDialog
+
+=item L<FBox|Tk::FBox>
+
+=item L<FileSelect|Tk::FileSelect>
+
+=item L<HList|Tk::HList>
+
+=item LabEntry
+
+=item L<LabFrame|Tk::LabFrame>
+
+=item L<NoteBook|Tk::NoteBook>
+
+=item L<Optionmenu|Tk::Optionmenu>
+
+=item L<Pane|Tk::Pane>
+
+=item L<ProgressBar|Tk::ProgressBar>
+
+=item L<ROText|Tk::ROText>
+
+=item L<Table|Tk::Table>
+
+=item L<TextUndo|Tk::TextUndo>
+
+=item L<Tiler|Tk::Tiler>
+
+=item L<TList|Tk::TList>
+
+=item L<Tree|Tk::Tree>
+
+=back
+
+=head1 Variables and callback routines
+
+Most graphical interfaces are used to set up a set of values and conditions,
+and then perform the appropriate action. The Tk toolkit is different
+from your average text-based prompting or menu driven system in that you do
+not collect settings yourself, and decide on an action based on an
+input code; instead, you leave these
+values to your toolkit and only get them when the action is performed.
+
+So, where a traditional text-based system would look like this:
+
+ #!/usr/bin/perl -w
+ use strict;
+
+ print "Please type a font name\n";
+ my $font = <>; chomp $font;
+ # Validate font
+
+ print "Please type a file name\n";
+ my $filename = <>; chomp $filename;
+ # Validate filename
+
+ print "Type <1> to fax, <2> to print\n";
+ my $option = <>; chomp $option;
+ if ($option eq 1) {
+ print "Faxing $filename in font $font\n";
+ } elsif ($option eq 2) {
+ print "Now sending $filename to printer in font $font\n";
+ }
+
+The slightly larger example below shows how to do this in Tk.
+Note the use of callbacks. Note, also, that Tk handles the values, and
+the subroutine uses the method B<get> to get at the values.
+If a user changes his mind and wants to change the font again,
+the application never notices; it's all handled by Tk.
+
+ #!/usr/bin/perl -w
+ use Tk;
+ use strict;
+
+ my $mw = MainWindow->new;
+
+ $mw->Label(-text => 'File Name')->pack;
+ my $filename = $mw->Entry(-width => 20);
+ $filename->pack;
+
+ $mw->Label(-text => 'Font Name')->pack;
+ my $font = $mw->Entry(-width => 10);
+ $font->pack;
+
+ $mw->Button(
+ -text => 'Fax',
+ -command => sub{do_fax($filename, $font)}
+ )->pack;
+
+ $mw->Button(
+ -text => 'Print',
+ -command => sub{do_print($filename, $font)}
+ )->pack;
+
+ MainLoop;
+
+ sub do_fax {
+ my ($file, $font) = @_;
+ my $file_val = $file->get;
+ my $font_val = $font->get;
+ print "Now faxing $file_val in font $font_val\n";
+ }
+
+ sub do_print {
+ my ($file, $font) = @_;
+ my $file_val = $file->get;
+ my $font_val = $font->get;
+ print "Sending file $file_val to printer in font $font_val\n";
+ }
+
+=head1 The packer - grouping with Frame widgets
+
+In the examples above, you must have noticed the B<pack> calls. This
+is one of the more complicated parts of Tk. The basic idea is that
+any window or widget should be subject to a Tk geometry manager; the
+I<packer> is one of the placement managers, and B<L<grid|Tk::grid>> is another.
+
+The actions of the packer are rather simple: when applied
+to a widget, the packer positions that widget on the indicated position
+within the remaining space in its parent. By default, the position is
+on top; this means the next items will be put below. You can also
+specify the left, right, or bottom positions. Specify position
+using B<-side =E<gt> 'right'>.
+
+Additional packing parameters specify the behavior of the widget when
+there is some space left in the B<L<Frame|Tk::Frame>> or when the window size is
+increased. If widgets should maintain a fixed size, specify nothing;
+this is the default. For widgets that you want to fill up the current
+horizontal and/or vertical space, specify B<-fill =E<gt> 'x'>, B<'y'>,
+or B<'both'>; for widgets that should grow, specify B<-expand =E<gt> 1>.
+These parameters are not shown in the example below; see the B<widget>
+demonstration.
+
+If you want to group some items within a window that have a different
+packing order than others, you can include them in a Frame. This is a
+do-nothing window type that is meant for packing or filling (and to
+play games with borders and colors).
+
+The example below shows the use of pack and Frames:
+
+ #!/usr/bin/perl -w
+ use Tk;
+ use strict;
+
+ # Take top and the bottom - now implicit top is in the middle
+ my $mw = MainWindow->new;
+ $mw->title( 'The MainWindow' );
+ $mw->Label(-text => 'At the top (default)')->pack;
+ $mw->Label(-text => 'At the bottom')->pack(-side => 'bottom');
+ $mw->Label(-text => 'The middle remains')->pack;
+
+ # Since left and right are taken, bottom will not work...
+ my $top1 = $mw->Toplevel;
+ $top1->title( 'Toplevel 1' );
+ $top1->Label(-text => 'Left')->pack(-side => 'left');
+ $top1->Label(-text => 'Right')->pack(-side => 'right');
+ $top1->Label(-text => '?Bottom?')->pack(-side => 'bottom');
+
+ # But when you use Frames, things work quite alright
+ my $top2 = $mw->Toplevel;
+ $top2->title( 'Toplevel 2' );
+ my $frame = $top2->Frame;
+ $frame->pack;
+ $frame->Label(-text => 'Left2')->pack(-side => 'left');
+ $frame->Label(-text => 'Right2')->pack(-side => 'right');
+ $top2->Label(-text => 'Bottom2')->pack(-side => 'bottom');
+
+ MainLoop;
+
+=head1 More than one window
+
+Most real applications require more than one window. As you just saw,
+you can create more outermost windows by using a B<Toplevel> widget.
+Each window is independent; destroying a B<Toplevel> window does not
+affect the others as long as they are not a child of the closed
+B<Toplevel>. However, exiting the B<MainWindow> will destroy all remaining
+B<Toplevel> widgets and end the application. The
+example below shows a trivial three-window application:
+
+ #!/usr/bin/perl -w
+ use Tk;
+ use strict;
+
+ my $mw = MainWindow->new;
+ fill_window($mw, 'Main');
+ my $top1 = $mw->Toplevel;
+ fill_window($top1, 'First top-level');
+ my $top2 = $mw->Toplevel;
+ fill_window($top2, 'Second top-level');
+ MainLoop;
+
+ sub fill_window {
+ my ($window, $header) = @_;
+ $window->Label(-text => $header)->pack;
+ $window->Button(
+ -text => 'close',
+ -command => [$window => 'destroy']
+ )->pack(-side => 'left');
+ $window->Button(
+ -text => 'exit',
+ -command => [$mw => 'destroy']
+ )->pack(-side => 'right');
+ }
+
+=head1 More callbacks
+
+So far, all callback routines shown called a user procedure.
+You can also have a callback routine call another Tk routine.
+This is the way that scroll bars are implemented: scroll-bars
+can call a Tk item or a user procedure, whenever their position
+has changed. The Tk item that has a scrollbar attached calls the
+scrollbar when its size or offset has changed. In this way,
+the items are linked. You can still ask a scrollbar's position,
+or set it by hand - but the defaults will be taken care of.
+
+The example below shows a B<L<Listbox|Tk::Listbox>> with a scroll bar. Moving
+the scrollbar moves the B<Listbox>. Scanning a B<Listbox> (dragging
+an item with the left mouse button) moves the scrollbar.
+
+ #!/usr/bin/perl -w
+ use Tk;
+ use strict;
+
+ my $mw = MainWindow->new;
+ my $box = $mw->Listbox(
+ -relief => 'sunken',
+ -height => 5,
+ -setgrid => 1,
+ );
+ my @items = qw(One Two Three Four Five Six Seven
+ Eight Nine Ten Eleven Twelve);
+ foreach (@items) {
+ $box->insert('end', $_);
+ }
+ my $scroll = $mw->Scrollbar(-command => ['yview', $box]);
+ $box->configure(-yscrollcommand => ['set', $scroll]);
+ $box->pack(-side => 'left', -fill => 'both', -expand => 1);
+ $scroll->pack(-side => 'right', -fill => 'y');
+
+ MainLoop;
+
+Note that there's a convenience method B<L<Scrolled|Tk::Scrolled>>
+which helps constructing widgets with automatically managed
+scrollbars.
+
+=head1 Canvases and tags
+
+One of the most powerful widgets in Tk is the B<L<Canvas|Tk::Canvas>> window.
+In a B<Canvas> window, you can draw simple graphics and include
+other widgets. The B<Canvas> area may be larger than the visible window,
+and may then be scrolled. Any item you draw on the canvas has its own id,
+and may optionally have one or more I<tags>. You may refer to any
+item by its id, and may refer to any group of items by a common tag;
+you can move, delete, or change groups of items using these tags,
+and you can I<bind> actions to tags. For a properly designed (often
+structured) B<Canvas>, you can specify powerful actions quite simply.
+
+In the example below, actions are bound to circles (single click)
+and blue items (double-click); obviously, this can be extended to any
+tag or group of tags.
+
+ #!/usr/bin/perl -w
+ use Tk;
+ use strict;
+
+ # Create B<MainWindow> and canvas
+ my $mw = MainWindow->new;
+ my $canvas = $mw->Canvas;
+ $canvas->pack(-expand => 1, -fill => 'both');
+
+ # Create various items
+ create_item($canvas, 1, 1, 'circle', 'blue', 'Jane');
+ create_item($canvas, 4, 4, 'circle', 'red', 'Peter');
+ create_item($canvas, 4, 1, 'square', 'blue', 'James');
+ create_item($canvas, 1, 4, 'square', 'red', 'Patricia');
+
+ # Single-clicking with left on a 'circle' item invokes a procedure
+ $canvas->bind('circle', '<1>' => sub {handle_circle($canvas)});
+ # Double-clicking with left on a 'blue' item invokes a procedure
+ $canvas->bind('blue', '<Double-1>' => sub {handle_blue($canvas)});
+ MainLoop;
+
+ # Create an item; use parameters as tags (this is not a default!)
+ sub create_item {
+ my ($can, $x, $y, $form, $color, $name) = @_;
+
+ my $x2 = $x + 1;
+ my $y2 = $y + 1;
+ my $kind;
+ $kind = 'oval' if ($form eq 'circle');
+ $kind = 'rectangle' if ($form eq 'square');
+ $can->create(
+ ($kind, "$x" . 'c', "$y" . 'c',
+ "$x2" . 'c', "$y2" . 'c'),
+ -tags => [$form, $color, $name],
+ -fill => $color);
+ }
+
+ # This gets the real name (not current, blue/red, square/circle)
+ # Note: you'll want to return a list in realistic situations...
+ sub get_name {
+ my ($can) = @_;
+ my $item = $can->find('withtag', 'current');
+ my @taglist = $can->gettags($item);
+ my $name;
+ foreach (@taglist) {
+ next if ($_ eq 'current');
+ next if ($_ eq 'red' or $_ eq 'blue');
+ next if ($_ eq 'square' or $_ eq 'circle');
+ $name = $_;
+ last;
+ }
+ return $name;
+ }
+
+ sub handle_circle {
+ my ($can) = @_;
+ my $name = get_name($can);
+ print "Action on circle $name...\n";
+ }
+
+ sub handle_blue {
+ my ($can) = @_;
+ my $name = get_name($can);
+ print "Action on blue item $name...\n";
+ }
+
+=head1 Perl/Tk and Unicode
+
+Perl/Tk follows Perl's model of handling Unicode. That is, if a string
+is correctly flagged as a E<quot>characterE<quot> string in the sense
+like described in L<Encode/TERMINOLOGY>, then Perl/Tk will very
+probably display and handle this string correctly.
+
+Note that every variable which is passed somehow into a Perl/Tk method
+will be implicitely changed into an internally utf8-flagged variable.
+Semantically nothing changes, as the series of codepoints stays the
+same, but things will change when variables with high-bit iso-8859-1
+characters will be passed to the "outer" world. In this case you have
+to explicitely mark the encoding of your output stream if using IO, or
+encode the variables using L<Encode> for other style of communication.
+
+This is the theory, now some examples.
+
+If you use non-iso-8859-1 characters in the source code, then use
+either the C<use utf8;> or C<use encoding 'I<encodingname>'> pragma:
+
+ use utf8;
+ use Tk;
+ my $x = "some characters using utf8 encoding";
+ tkinit->Label(-text => $x)->pack;
+ MainLoop;
+
+For data that comes from a file you have to specify the encoding
+unless it's encoded as ascii or iso-8559-1:
+
+ use Tk;
+ open my $FH, "<:encoding(utf-8)", "filename" or die $!;
+ # or for utf-16 data: open my $FH, "<:encoding(utf-16)", "filename" or die $!;
+ my $data = <$FH>;
+ tkinit->Label(-text => $data)->pack;
+ MainLoop;
+
+Likewise, the encoding must be specified for all data which is read
+from Tk widgets and that shall be output into a file. For the output,
+the encoding should be always specified, even if it is iso-8859-1:
+
+ use Tk;
+ $mw = tkinit;
+ $mw->Entry(-textvariable => \$input)->pack;
+ $mw->Button(
+ -text => "Write to file",
+ -command => sub {
+ open my $FH, ">:encoding(iso-8859-1)", "filename" or die $!;
+ print $FH $input;
+ },
+ )->pack;
+ MainLoop;
+
+Note that Tk is Unicode-capable. So you need to be prepared that the
+user has the appropriate input methods activated to enter non-ascii
+characters. If an output encoding is used which does not cover the
+whole of Unicode codepoints then a warning will be issued when writing
+the file, like this:
+
+ "\x{20ac}" does not map to iso-8859-1 at /usr/local/lib/perl5/site_perl/5.8.8/mach/Tk.pm line 250.
+
+Also, the same hexadecimal notation will be used as replacements for
+the unhandled characters.
+
+Handling encoding in I/O is pretty simple using the C<encoding> PerlIO
+layer, as described above. In other cases, such as when dealing with
+databases, encoding the data usually has to be done manually, unless
+the database driver has some means for automatically do this for you.
+So when working with a MySQL database, one could use:
+
+ use Tk;
+ use DBI;
+ use Encode qw(encode);
+ $mw = tkinit;
+ $mw->Entry(-textvariable => \$input)->pack;
+ $mw->Button(
+ -text => "Write to database",
+ -command => sub {
+ my $dbh = DBI->connect("dbi:mysql:test", "root", "") or die;
+ my $encoded_input = encode("iso-8859-1", $input);
+ $dbh->do("INSERT INTO testtable VALUES (?)", undef, $encoded_input) or die;
+ },
+ )->pack;
+ MainLoop;
+
+Unfortunately, there are still places in Perl ignorant of Unicode. One
+of these places are filenames. Consequently, the file selectors in
+Perl/Tk do not handle encoding of filenames properly. Currently they
+suppose that filenames are in iso-8859-1 encoding, at least on Unix
+systems. As soon as Perl has a concept of filename encodings, then
+Perl/Tk will also implement such schemes.
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/Widget.pm b/Master/tlpkg/tlperl/lib/Tk/Widget.pm
new file mode 100644
index 00000000000..4d20f96066a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Widget.pm
@@ -0,0 +1,1774 @@
+# Copyright (c) 1995-2004 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Widget;
+use vars qw($VERSION @DefaultMenuLabels);
+$VERSION = '4.035'; # was: sprintf '4.%03d', q$Revision: #30 $ =~ /\D(\d+)\s*$/;
+
+require Tk;
+use AutoLoader;
+use strict;
+use Carp;
+use base qw(DynaLoader Tk);
+
+# stubs for 'autoloaded' widget classes
+sub Button;
+sub Canvas;
+sub Checkbutton;
+sub Entry;
+sub Frame;
+sub Label;
+sub Labelframe;
+sub Listbox;
+sub Menu;
+sub Menubutton;
+sub Message;
+sub Panedwindow;
+sub Radiobutton;
+sub Scale;
+sub Scrollbar;
+sub Spinbox;
+sub Text;
+sub Toplevel;
+
+sub Pixmap;
+sub Bitmap;
+sub Photo;
+
+sub ScrlListbox;
+sub Optionmenu;
+
+sub import
+{
+ my $package = shift;
+ carp 'use Tk::Widget () to pre-load widgets is deprecated' if (@_);
+ my $need;
+ foreach $need (@_)
+ {
+ unless (defined &{$need})
+ {
+ require "Tk/${need}.pm";
+ }
+ croak "Cannot locate $need" unless (defined &{$need});
+ }
+}
+
+@DefaultMenuLabels = qw[~File ~Help];
+
+# Some tidy-ness functions for winfo stuff
+
+sub True { 1 }
+sub False { 0 }
+
+use Tk::Submethods( 'grab' => [qw(current status release -global)],
+ 'focus' => [qw(-force -lastfor)],
+ 'pack' => [qw(configure forget info propagate slaves)],
+ 'grid' => [qw(bbox columnconfigure configure forget info location propagate rowconfigure size slaves)],
+ 'form' => [qw(check configure forget grid info slaves)],
+ 'event' => [qw(add delete generate info)],
+ 'place' => [qw(configure forget info slaves)],
+ 'wm' => [qw(capture release)],
+ 'font' => [qw(actual configure create delete families measure metrics names subfonts)]
+ );
+
+BEGIN {
+ # FIXME - these don't work in the compiler
+ *IsMenu = \&False;
+ *IsMenubutton = \&False;
+ *configure_self = \&Tk::configure;
+ *cget_self = \&Tk::cget;
+}
+
+
+
+Direct Tk::Submethods (
+ 'winfo' => [qw(cells class colormapfull depth exists
+ geometry height id ismapped manager name parent reqheight
+ reqwidth rootx rooty screen screencells screendepth screenheight
+ screenmmheight screenmmwidth screenvisual screenwidth visual
+ visualsavailable vrootheight viewable vrootwidth vrootx vrooty
+ width x y toplevel children pixels pointerx pointery pointerxy
+ server fpixels rgb )],
+ 'tk' => [qw(appname caret scaling useinputmethods windowingsystem)]);
+
+
+sub DESTROY
+{
+ my $w = shift;
+ $w->destroy if ($w->IsWidget);
+}
+
+sub Install
+{
+ # Dynamically loaded widgets add their core commands
+ # to the Tk base class here
+ my ($package,$mw) = @_;
+}
+
+sub ClassInit
+{
+ # Carry out class bindings (or whatever)
+ my ($package,$mw) = @_;
+ return $package;
+}
+
+sub CreateOptions
+{
+ return ();
+}
+
+sub CreateArgs
+{
+ my ($package,$parent,$args) = @_;
+ # Remove from hash %$args any configure-like
+ # options which only apply at create time (e.g. -colormap for Frame),
+ # or which may as well be applied right away
+ # return these as a list of -key => value pairs
+ # Augment same hash with default values for missing mandatory options,
+ # allthough this can be done later in InitObject.
+
+ # Honour -class => if present, we have hacked Tk_ConfigureWidget to
+ # allow -class to be passed to any widget.
+ my @result = ();
+ my $class = delete $args->{'-class'};
+ ($class) = $package =~ /([A-Z][A-Z0-9_]*)$/i unless (defined $class);
+ @result = (-class => "\u$class") if (defined $class);
+ foreach my $opt ($package->CreateOptions)
+ {
+ push(@result, $opt => delete $args->{$opt}) if exists $args->{$opt};
+ }
+ return @result;
+}
+
+sub InitObject
+{
+ my ($obj,$args) = @_;
+ # per object initialization, for example populating
+ # with sub-widgets, adding a few object bindings to augment
+ # inherited class bindings, changing binding tags.
+ # Also another chance to mess with %$args before configure...
+}
+
+sub SetBindtags
+{
+ my ($obj) = @_;
+ $obj->bindtags([ref($obj),$obj,$obj->toplevel,'all']);
+}
+
+sub new
+{
+ local $SIG{'__DIE__'} = \&Carp::croak;
+ my $package = shift;
+ my $parent = shift;
+ $package->InitClass($parent);
+ $parent->BackTrace("Odd number of args to $package->new(...)") unless ((@_ % 2) == 0);
+ my %args = @_;
+ my @args = $package->CreateArgs($parent,\%args);
+ my $cmd = $package->Tk_cmd;
+ my $pname = $parent->PathName;
+ $pname = '' if ($pname eq '.');
+ my $leaf = delete $args{'Name'};
+ if (defined $leaf)
+ {
+ $leaf =~ s/[^a-z0-9_#]+/_/ig;
+ $leaf = lcfirst($leaf);
+ }
+ else
+ {
+ ($leaf) = "\L$package" =~ /([a-z][a-z0-9_]*)$/;
+ }
+ my $lname = $pname . '.' . $leaf;
+ # create a hash indexed by leaf name to speed up
+ # creation of a lot of sub-widgets of the same type
+ # e.g. entries in Table
+ my $nhash = $parent->TkHash('_names_');
+ $nhash->{$leaf} = 0 unless (exists $nhash->{$leaf});
+ while (defined ($parent->Widget($lname)))
+ {
+ $lname = $pname . '.' . $leaf . ++$nhash->{$leaf};
+ }
+ my $obj = eval { &$cmd($parent, $lname, @args) };
+ confess $@ if $@;
+ unless (ref $obj)
+ {
+ die "No value from $cmd $lname" unless defined $obj;
+ warn "$cmd '$lname' returned '$obj'" unless $obj eq $lname;
+ $obj = $parent->Widget($lname = $obj);
+ die "$obj from $lname" unless ref $obj;
+ }
+ bless $obj,$package;
+ $obj->SetBindtags;
+ my $notice = $parent->can('NoticeChild');
+ $parent->$notice($obj,\%args) if $notice;
+ $obj->InitObject(\%args);
+# ASkludge(\%args,1);
+ $obj->configure(%args) if (%args);
+# ASkludge(\%args,0);
+ return $obj;
+}
+
+sub DelegateFor
+{
+ my ($w,$method) = @_;
+ while(exists $w->{'Delegates'})
+ {
+ my $delegate = $w->{'Delegates'};
+ my $widget = $delegate->{$method};
+ $widget = $delegate->{DEFAULT} unless (defined $widget);
+ $widget = $w->Subwidget($widget) if (defined $widget && !ref $widget);
+ last unless (defined $widget);
+ last if $widget == $w;
+ $w = $widget;
+ }
+ return $w;
+}
+
+sub Delegates
+{
+ my $cw = shift;
+ my $specs = $cw->TkHash('Delegates');
+ while (@_)
+ {
+ my $key = shift;
+ my $val = shift;
+ $specs->{$key} = $val;
+ }
+ return $specs;
+}
+
+sub Construct
+{
+ my ($base,$name) = @_;
+ my $class = (caller(0))[0];
+ no strict 'refs';
+
+ # Hack for broken ->isa in perl5.6.0
+ delete ${"$class\::"}{'::ISA::CACHE::'} if $] == 5.006;
+
+ # Pre ->isa scheme
+ *{$base.'::Is'.$name} = \&False;
+ *{$class.'::Is'.$name} = \&True;
+
+ # DelegateFor trickyness is to allow Frames and other derived things
+ # to force creation in a delegate e.g. a ScrlText with embeded windows
+ # need those windows to be children of the Text to get clipping right
+ # and not of the Frame which contains the Text and the scrollbars.
+ *{$base.'::'."$name"} = sub { $class->new(shift->DelegateFor('Construct'),@_) };
+}
+
+sub IS
+{
+ return (defined $_[1]) && $_[0] == $_[1];
+}
+
+sub _AutoloadTkWidget
+{
+ my ($self,$method) = @_;
+ my $what = "Tk::Widget::$method";
+ unless (defined &$what)
+ {
+ require "Tk/$method.pm";
+ }
+ return $what;
+}
+
+# require UNIVERSAL; don't load .pm use XS code from perl core though
+
+sub AUTOLOAD
+{
+ # Take a copy into a 'my' variable so we can recurse
+ my $what = $Tk::Widget::AUTOLOAD;
+ my $save = $@;
+ my $name;
+ # warn "AUTOLOAD $what ".(ref($_[0]) || $_[0])."\n";
+ # Braces used to preserve $1 et al.
+ {
+ my ($pkg,$func) = $what =~ /(.*)::([^:]+)$/;
+ confess("Attempt to load '$what'") unless defined($pkg) && $func =~ /^[\w:]+$/;
+ $pkg =~ s#::#/#g;
+ if (defined($name=$INC{"$pkg.pm"}))
+ {
+ $name =~ s#^(.*)$pkg\.pm$#$1auto/$pkg/$func.al#;
+ }
+ else
+ {
+ $name = "auto/$what.al";
+ $name =~ s#::#/#g;
+ }
+ }
+ # This may fail, catch error and prevent user's __DIE__ handler
+ # from triggering as well...
+ eval {local $SIG{'__DIE__'}; require $name};
+ if ($@)
+ {
+ croak $@ unless ($@ =~ /Can't locate\s+(?:file\s+)?'?\Q$name\E'?/);
+ my($package,$method) = ($what =~ /^(.*)::([^:]*)$/);
+ if (ref $_[0] && !$_[0]->can($method)
+ && $_[0]->can('Delegate')
+ && $method !~ /^(ConfigSpecs|Delegates)/ )
+ {
+ my $delegate = $_[0]->Delegates;
+ if (%$delegate || tied %$delegate)
+ {
+ my $widget = $delegate->{$method};
+ $widget = $delegate->{DEFAULT} unless (defined $widget);
+ if (defined $widget)
+ {
+ my $subwidget = (ref $widget) ? $widget : $_[0]->Subwidget($widget);
+ if (defined $subwidget)
+ {
+ no strict 'refs';
+ # print "AUTOLOAD: $what\n";
+ *{$what} = sub { shift->Delegate($method,@_) };
+ }
+ else
+ {
+ croak "No delegate subwidget '$widget' for $what";
+ }
+ }
+ }
+ }
+ if (!defined(&$what) && ref($_[0]) && $method =~ /^[A-Z]\w+$/)
+ {
+ # Use ->can as ->isa is broken in perl5.6.0
+ my $sub = UNIVERSAL::can($_[0],'_AutoloadTkWidget');
+ if ($sub)
+ {
+ carp "Assuming 'require Tk::$method;'" unless $_[0]->can($method);
+ $what = $_[0]->$sub($method)
+ }
+ }
+ }
+ $@ = $save;
+ $DB::sub = $what; # Tell debugger what is going on...
+ unless (defined &$what)
+ {
+ no strict 'refs';
+ *{$what} = sub { croak("Failed to AUTOLOAD '$what'") };
+ }
+ goto &$what;
+}
+
+sub _Destroyed
+{
+ my $w = shift;
+ my $a = delete $w->{'_Destroy_'};
+ if (ref($a))
+ {
+ while (@$a)
+ {
+ my $ent = pop(@$a);
+ if (ref $ent)
+ {
+ eval {local $SIG{'__DIE__'}; $ent->Call };
+ }
+ else
+ {
+ delete $w->{$ent};
+ }
+ }
+ }
+}
+
+sub _OnDestroy
+{
+ my $w = shift;
+ $w->{'_Destroy_'} = [] unless (exists $w->{'_Destroy_'});
+ push(@{$w->{'_Destroy_'}},@_);
+}
+
+sub OnDestroy
+{
+ my $w = shift;
+ $w->_OnDestroy(Tk::Callback->new(@_));
+}
+
+sub TkHash
+{
+ my ($w,$key) = @_;
+ return $w->{$key} if exists $w->{$key};
+ my $hash = $w->{$key} = {};
+ $w->_OnDestroy($key);
+ return $hash;
+}
+
+sub privateData
+{
+ my $w = shift;
+ my $p = shift || caller;
+ $w->{$p} ||= {};
+}
+
+my @image_types;
+my %image_method;
+
+sub ImageMethod
+{
+ shift if (@_ & 1);
+ while (@_)
+ {
+ my ($name,$method) = splice(@_,0,2);
+ push(@image_types,$name);
+ $image_method{$name} = $method;
+ }
+}
+
+sub Getimage
+{
+ my ($w, $name) = @_;
+ my $mw = $w->MainWindow;
+ croak "Usage \$widget->Getimage('name')" unless defined($name);
+ my $images = ($mw->{'__Images__'} ||= {});
+
+ return $images->{$name} if $images->{$name};
+
+ ImageMethod(xpm => 'Pixmap',
+ gif => 'Photo',
+ ppm => 'Photo',
+ xbm => 'Bitmap' ) unless @image_types;
+
+ foreach my $type (@image_types)
+ {
+ my $method = $image_method{$type};
+ my $file = Tk->findINC( "$name.$type" );
+ next unless( $file && $method );
+ my $sub = $w->can($method);
+ unless (defined &$sub)
+ {
+ require Tk::widgets;
+ Tk::widgets->import($method);
+ }
+ $images->{$name} = $w->$method( -file => $file );
+ return $images->{$name};
+ }
+
+ # Try built-in bitmaps
+ $images->{$name} = $w->Pixmap( -id => $name );
+ return $images->{$name};
+}
+
+sub SaveGrabInfo
+{
+ my $w = shift;
+ $Tk::oldGrab = $w->grabCurrent;
+ if (defined $Tk::oldGrab)
+ {
+ $Tk::grabStatus = $Tk::oldGrab->grabStatus;
+ }
+}
+
+sub grabSave
+{
+ my ($w) = @_;
+ my $grab = $w->grabCurrent;
+ return sub {} if (!defined $grab);
+ my $method = ($grab->grabStatus eq 'global') ? 'grabGlobal' : 'grab';
+ return sub { eval {local $SIG{'__DIE__'}; $grab->$method() } };
+}
+
+sub focusCurrent
+{
+ my ($w) = @_;
+ $w->Tk::focus('-displayof');
+}
+
+sub focusSave
+{
+ my ($w) = @_;
+ my $focus = $w->focusCurrent;
+ return sub {} if (!defined $focus);
+ return sub { eval {local $SIG{'__DIE__'}; $focus->focus } };
+}
+
+# This is supposed to replicate Tk::after behaviour,
+# but does auto-cancel when widget is deleted.
+require Tk::After;
+
+sub afterCancel
+{
+ my ($w,$what) = @_;
+ if (defined $what)
+ {
+ return $what->cancel if ref($what);
+ carp "dubious cancel of $what" if 0 && $^W;
+ $w->Tk::after('cancel' => $what);
+ }
+}
+
+sub afterIdle
+{
+ my $w = shift;
+ return Tk::After->new($w,'idle','once',@_);
+}
+
+sub afterInfo {
+ my ($w, $id) = @_;
+ if (defined $id) {
+ return ($id->[4], $id->[2], $id->[3]);
+ } else {
+ return sort( keys %{$w->{_After_}} );
+ }
+}
+
+sub after
+{
+ my $w = shift;
+ my $t = shift;
+ if (@_)
+ {
+ if ($t ne 'cancel')
+ {
+ require Tk::After;
+ return Tk::After->new($w,$t,'once',@_)
+ }
+ while (@_)
+ {
+ my $what = shift;
+ $w->afterCancel($what);
+ }
+ }
+ else
+ {
+ $w->Tk::after($t);
+ }
+}
+
+sub repeat
+{
+ require Tk::After;
+ my $w = shift;
+ my $t = shift;
+ return Tk::After->new($w,$t,'repeat',@_);
+}
+
+sub FindMenu
+{
+ # default FindMenu is that there is no menu.
+ return undef;
+}
+
+sub XEvent { shift->{'_XEvent_'} }
+
+sub propertyRoot
+{
+ my $w = shift;
+ return $w->property(@_,'root');
+}
+
+# atom, atomname, containing, interps, pathname
+# don't work this way - there is no window arg
+# So we pretend there was an call the C versions from Tk.xs
+
+sub atom { shift->InternAtom(@_) }
+sub atomname { shift->GetAtomName(@_) }
+sub containing { shift->Containing(@_) }
+
+# interps not done yet
+# pathname not done yet
+
+# walk and descendants adapted from Stephen's composite
+# versions as they only use core features they can go here.
+# hierachy is reversed in that descendants calls walk rather
+# than vice versa as this avoids building a list.
+# Walk should possibly be enhanced so allow early termination
+# like '-prune' of find.
+
+sub Walk
+{
+ # Traverse a widget hierarchy while executing a subroutine.
+ my($cw, $proc, @args) = @_;
+ my $subwidget;
+ foreach $subwidget ($cw->children)
+ {
+ $subwidget->Walk($proc,@args);
+ &$proc($subwidget, @args);
+ }
+} # end walk
+
+sub Descendants
+{
+ # Return a list of widgets derived from a parent widget and all its
+ # descendants of a particular class.
+ # If class is not passed returns the entire widget hierarchy.
+
+ my($widget, $class) = @_;
+ my(@widget_tree) = ();
+
+ $widget->Walk(
+ sub { my ($widget,$list,$class) = @_;
+ push(@$list, $widget) if (!defined($class) or $class eq $widget->class);
+ },
+ \@widget_tree, $class
+ );
+ return @widget_tree;
+}
+
+sub Palette
+{
+ my $w = shift->MainWindow;
+ unless (exists $w->{_Palette_})
+ {
+ my %Palette = ();
+ my $c = $w->Checkbutton();
+ my $e = $w->Entry();
+ my $s = $w->Scrollbar();
+ $Palette{'activeBackground'} = ($c->configure('-activebackground'))[3] ;
+ $Palette{'activeForeground'} = ($c->configure('-activeforeground'))[3];
+ $Palette{'background'} = ($c->configure('-background'))[3];
+ $Palette{'disabledForeground'} = ($c->configure('-disabledforeground'))[3];
+
+ $Palette{'foreground'} = ($c->configure('-foreground'))[3];
+ $Palette{'highlightBackground'} = ($c->configure('-highlightbackground'))[3];
+ $Palette{'highlightColor'} = ($c->configure('-highlightcolor'))[3];
+ $Palette{'insertBackground'} = ($e->configure('-insertbackground'))[3];
+ $Palette{'selectColor'} = ($c->configure('-selectcolor'))[3];
+ $Palette{'selectBackground'} = ($e->configure('-selectbackground'))[3];
+ $Palette{'selectForeground'} = ($e->configure('-selectforeground'))[3];
+ $Palette{'troughColor'} = ($s->configure('-troughcolor'))[3];
+ $c->destroy;
+ $e->destroy;
+ $s->destroy;
+ $w->{_Palette_} = \%Palette;
+ }
+ return $w->{_Palette_};
+}
+
+# tk_setPalette --
+# Changes the default color scheme for a Tk application by setting
+# default colors in the option database and by modifying all of the
+# color options for existing widgets that have the default value.
+#
+# Arguments:
+# The arguments consist of either a single color name, which
+# will be used as the new background color (all other colors will
+# be computed from this) or an even number of values consisting of
+# option names and values. The name for an option is the one used
+# for the option database, such as activeForeground, not -activeforeground.
+# Additional special option names are:
+# priority: set the priority for the option database entries, see Tk::option
+sub setPalette
+{
+ my $w = shift->MainWindow;
+ # Just return on monochrome displays, otherwise errors will occur
+ return if $w->depth == 1;
+ my %new = (@_ == 1) ? (background => $_[0]) : @_;
+ my $priority = delete($new{'priority'}) || 'widgetDefault';
+
+ # Create an array that has the complete new palette. If some colors
+ # aren't specified, compute them from other colors that are specified.
+
+ die 'must specify a background color' if (!exists $new{background});
+ my @bg = $w->rgb($new{'background'});
+
+ if (!exists $new{foreground})
+ {
+ # Note that the range of each value in the triple returned by
+ # [winfo rgb] is 0-65535, and your eyes are more sensitive to
+ # green than to red, and more to red than to blue.
+ my($r,$g,$b) = @bg;
+ if ($r+1.5*$g+0.5*$b > 100000)
+ {
+ $new{'foreground'} = 'black';
+ }
+ else
+ {
+ $new{'foreground'} = 'white';
+ }
+ }
+ my @fg = $w->rgb($new{'foreground'});
+ my $darkerBg = sprintf('#%02x%02x%02x',9*$bg[0]/2560,9*$bg[1]/2560,9*$bg[2]/2560);
+ foreach my $i ('activeForeground','insertBackground','selectForeground','highlightColor')
+ {
+ $new{$i} = $new{'foreground'} unless (exists $new{$i});
+ }
+ unless (exists $new{'disabledForeground'})
+ {
+ $new{'disabledForeground'} = sprintf('#%02x%02x%02x',(3*$bg[0]+$fg[0])/1024,(3*$bg[1]+$fg[1])/1024,(3*$bg[2]+$fg[2])/1024);
+ }
+ $new{'highlightBackground'} = $new{'background'} unless (exists $new{'highlightBackground'});
+
+ unless (exists $new{'activeBackground'})
+ {
+ my @light;
+ # Pick a default active background that is lighter than the
+ # normal background. To do this, round each color component
+ # up by 15% or 1/3 of the way to full white, whichever is
+ # greater.
+ foreach my $i (0, 1, 2)
+ {
+ $light[$i] = $bg[$i]/256;
+ my $inc1 = $light[$i]*15/100;
+ my $inc2 = (255-$light[$i])/3;
+ if ($inc1 > $inc2)
+ {
+ $light[$i] += $inc1
+ }
+ else
+ {
+ $light[$i] += $inc2
+ }
+ $light[$i] = 255 if ($light[$i] > 255);
+ }
+ $new{'activeBackground'} = sprintf('#%02x%02x%02x',@light);
+ }
+ $new{'selectBackground'} = $darkerBg unless (exists $new{'selectBackground'});
+ $new{'troughColor'} = $darkerBg unless (exists $new{'troughColor'});
+ $new{'selectColor'} = '#b03060' unless (exists $new{'selectColor'});
+
+ # Before doing this, make sure that the Tk::Palette variable holds
+ # the default values of all options, so that tkRecolorTree can
+ # be sure to only change options that have their default values.
+ # If the variable exists, then it is already correct (it was created
+ # the last time this procedure was invoked). If the variable
+ # doesn't exist, fill it in using the defaults from a few widgets.
+ my $Palette = $w->Palette;
+
+ # let's make one of each of the widgets so we know what the
+ # defaults are currently for this platform.
+ $Tk::___tk_set_palette = $w->Toplevel(Name => "___tk_set_palette");
+ $Tk::___tk_set_palette->withdraw;
+ foreach my $q (qw(Button Canvas Checkbutton Entry Frame Label Labelframe
+ Listbox Menubutton Menu Message Radiobutton Scale Scrollbar
+ Spinbox Text
+ ))
+ {
+ $Tk::___tk_set_palette->Component($q, $q);
+ }
+
+ # Walk the widget hierarchy, recoloring all existing windows.
+ my $res = $w->RecolorTree(\%new);
+ if ($res->{addOptionDB})
+ {
+ for (@{ $res->{addOptionDB} })
+ {
+ $w->optionAdd(@$_);
+ }
+ }
+
+ $Tk::___tk_set_palette->destroy;
+
+ # Change the option database so that future windows will get the
+ # same colors.
+ foreach my $option (keys %new)
+ {
+ $w->option('add',"*$option",$new{$option},$priority);
+ # Save the options in the global variable Tk::Palette, for use the
+ # next time we change the options.
+ $Palette->{$option} = $new{$option};
+ }
+}
+
+# tkRecolorTree --
+# This procedure changes the colors in a window and all of its
+# descendants, according to information provided by the colors
+# argument. It only modifies colors that have their default values
+# as specified by the Tk::Palette variable.
+#
+# Arguments:
+# w - The name of a window. This window and all its
+# descendants are recolored.
+# colors - The name of an array variable in the caller,
+# which contains color information. Each element
+# is named after a widget configuration option, and
+# each value is the value for that option.
+sub RecolorTree
+{
+ my ($w,$colors) = @_;
+ local ($@);
+ my @addOptionDB;
+ my $prototype = (defined $Tk::___tk_set_palette ? $Tk::___tk_set_palette->Subwidget($w->Class) || undef : undef);
+ foreach my $dbOption (keys %$colors)
+ {
+ my $option = "-\L$dbOption";
+ my $class = ucfirst($dbOption);
+ my @value;
+ eval {local $SIG{'__DIE__'}; @value = $w->configure($option) };
+ if (@value)
+ {
+ # if the option database has a preference for this
+ # dbOption, then use it, otherwise use the defaults
+ # for the widget.
+ my $defaultcolor = $w->optionGet($dbOption, $class);
+ no warnings 'uninitialized';
+ if ($defaultcolor eq '' ||
+ ($prototype && $prototype->cget($option) ne $defaultcolor))
+ {
+ $defaultcolor = $value[3];
+ }
+ if ($defaultcolor ne '')
+ {
+ $defaultcolor = join ',', $w->rgb($defaultcolor);
+ }
+ my $chosencolor = $value[4];
+ if ($chosencolor ne '')
+ {
+ $chosencolor = join ',', $w->rgb($chosencolor);
+ }
+ if ($defaultcolor eq $chosencolor)
+ {
+ # Change the option database so that future windows will get
+ # the same colors.
+ push @addOptionDB, ['*'.$w->Class.".$dbOption", $colors->{$dbOption}, 60];
+ $w->configure($option,$colors->{$dbOption});
+ }
+ }
+ }
+ foreach my $child ($w->children)
+ {
+ my $res = $child->RecolorTree($colors);
+ if ($res->{addOptionDB})
+ {
+ push @addOptionDB, @{ $res->{addOptionDB} };
+ }
+ }
+ return { addOptionDB => \@addOptionDB };
+}
+# tkDarken --
+# Given a color name, computes a new color value that darkens (or
+# brightens) the given color by a given percent.
+#
+# Arguments:
+# color - Name of starting color.
+# perecent - Integer telling how much to brighten or darken as a
+# percent: 50 means darken by 50%, 110 means brighten
+# by 10%.
+sub Darken
+{
+ my ($w,$color,$percent) = @_;
+ my @l = $w->rgb($color);
+ my $red = $l[0]/256;
+ my $green = $l[1]/256;
+ my $blue = $l[2]/256;
+ $red = int($red*$percent/100);
+ $red = 255 if ($red > 255);
+ $green = int($green*$percent/100);
+ $green = 255 if ($green > 255);
+ $blue = int($blue*$percent/100);
+ $blue = 255 if ($blue > 255);
+ sprintf('#%02x%02x%02x',$red,$green,$blue)
+}
+# tk_bisque --
+# Reset the Tk color palette to the old "bisque" colors.
+#
+# Arguments:
+# None.
+sub bisque
+{
+ shift->setPalette('activeBackground' => '#e6ceb1',
+ 'activeForeground' => 'black',
+ 'background' => '#ffe4c4',
+ 'disabledForeground' => '#b0b0b0',
+ 'foreground' => 'black',
+ 'highlightBackground' => '#ffe4c4',
+ 'highlightColor' => 'black',
+ 'insertBackground' => 'black',
+ 'selectColor' => '#b03060',
+ 'selectBackground' => '#e6ceb1',
+ 'selectForeground' => 'black',
+ 'troughColor' => '#cdb79e'
+ );
+}
+
+sub PrintConfig
+{
+ require Tk::Pretty;
+ my ($w) = (@_);
+ my $c;
+ foreach $c ($w->configure)
+ {
+ print Tk::Pretty::Pretty(@$c),"\n";
+ }
+}
+
+sub BusyRecurse
+{
+ my ($restore,$w,$cursor,$recurse,$top) = @_;
+ my $c = $w->cget('-cursor');
+ my @tags = $w->bindtags;
+ if ($top || defined($c) || $w->isa('Tk::Toplevel'))
+ {
+ push(@$restore, sub { return unless Tk::Exists($w); $w->configure(-cursor => $c); $w->bindtags(\@tags) });
+ $w->configure(-cursor => $cursor);
+ }
+ else
+ {
+ push(@$restore, sub { return unless Tk::Exists($w); $w->bindtags(\@tags) });
+ }
+ $w->bindtags(['Busy',@tags]);
+ if ($recurse)
+ {
+ foreach my $child ($w->children)
+ {
+ BusyRecurse($restore,$child,$cursor,1,0);
+ }
+ }
+ return $restore;
+}
+
+sub Busy
+{
+ my ($w,@args) = @_;
+ return unless $w->viewable;
+ my($sub, %args);
+ for(my $i=0; $i<=$#args; $i++)
+ {
+ if (ref $args[$i] eq 'CODE')
+ {
+ if (defined $sub)
+ {
+ croak "Multiple code definitions not allowed in Tk::Widget::Busy";
+ }
+ $sub = $args[$i];
+ }
+ else
+ {
+ $args{$args[$i]} = $args[$i+1]; $i++;
+ }
+ }
+ my $cursor = delete $args{'-cursor'};
+ my $recurse = delete $args{'-recurse'};
+ $cursor = 'watch' unless defined $cursor;
+ unless (exists $w->{'Busy'})
+ {
+ my @old = ($w->grabSave);
+ my $key;
+ my @config;
+ foreach $key (keys %args)
+ {
+ push(@config,$key => $w->Tk::cget($key));
+ }
+ if (@config)
+ {
+ push(@old, sub { $w->Tk::configure(@config) });
+ $w->Tk::configure(%args);
+ }
+ unless ($w->Tk::bind('Busy'))
+ {
+ $w->Tk::bind('Busy','<Any-KeyPress>',[_busy => 1]);
+ $w->Tk::bind('Busy','<Any-KeyRelease>',[_busy => 0]);
+ $w->Tk::bind('Busy','<Any-ButtonPress>',[_busy => 1]);
+ $w->Tk::bind('Busy','<Any-ButtonRelease>',[_busy => 0]);
+ $w->Tk::bind('Busy','<Any-Motion>',[_busy => 0]);
+ }
+ $w->{'Busy'} = BusyRecurse(\@old,$w,$cursor,$recurse,1);
+ }
+ my $g = $w->grabCurrent;
+ if (defined $g)
+ {
+ # warn "$g has the grab";
+ $g->grabRelease;
+ }
+ $w->update;
+ if (Tk::Exists($w))
+ {
+ eval {local $SIG{'__DIE__'}; $w->grab };
+ $w->update;
+ }
+ if ($sub && Tk::Exists($w))
+ {
+ eval { $sub->() };
+ my $err = $@;
+ $w->Unbusy(-recurse => $recurse);
+ die $err if $err;
+ }
+}
+
+sub _busy
+{
+ my ($w,$f) = @_;
+ $w->bell if $f;
+ $w->break;
+}
+
+sub Unbusy
+{
+ my ($w) = @_;
+ $w->update;
+ $w->grabRelease if Tk::Exists($w);
+ my $old = delete $w->{'Busy'};
+ if (defined $old)
+ {
+ local $SIG{'__DIE__'};
+ eval { &{pop(@$old)} } while (@$old);
+ }
+ $w->update if Tk::Exists($w);
+}
+
+sub waitVisibility
+{
+ my ($w) = shift;
+ $w->tkwait('visibility',$w);
+}
+
+sub waitVariable
+{
+ my ($w) = shift;
+ $w->tkwait('variable',@_);
+}
+
+sub waitWindow
+{
+ my ($w) = shift;
+ $w->tkwait('window',$w);
+}
+
+sub EventWidget
+{
+ my ($w) = @_;
+ return $w->{'_EventWidget_'};
+}
+
+sub Popwidget
+{
+ my ($ew,$method,$w,@args) = @_;
+ $w->{'_EventWidget_'} = $ew;
+ $w->$method(@args);
+}
+
+sub ColorOptions
+{
+ my ($w,$args) = @_;
+ my $opt;
+ $args = {} unless (defined $args);
+ foreach $opt (qw(-foreground -background -disabledforeground
+ -activebackground -activeforeground
+ ))
+ {
+ $args->{$opt} = $w->cget($opt) unless (exists $args->{$opt})
+ }
+ return (wantarray) ? %$args : $args;
+}
+
+sub XscrollBind
+{
+ my ($mw,$class) = @_;
+ $mw->bind($class,'<Left>', ['xview','scroll',-1,'units']);
+ $mw->bind($class,'<Control-Left>', ['xview','scroll',-1,'pages']);
+ $mw->bind($class,'<Control-Prior>',['xview','scroll',-1,'pages']);
+ $mw->bind($class,'<Right>', ['xview','scroll',1,'units']);
+ $mw->bind($class,'<Control-Right>',['xview','scroll',1,'pages']);
+ $mw->bind($class,'<Control-Next>', ['xview','scroll',1,'pages']);
+
+ $mw->bind($class,'<Home>', ['xview','moveto',0]);
+ $mw->bind($class,'<End>', ['xview','moveto',1]);
+ $mw->XMouseWheelBind($class);
+}
+
+sub PriorNextBind
+{
+ my ($mw,$class) = @_;
+ $mw->bind($class,'<Next>', ['yview','scroll',1,'pages']);
+ $mw->bind($class,'<Prior>', ['yview','scroll',-1,'pages']);
+}
+
+sub XMouseWheelBind
+{
+ my ($mw,$class) = @_;
+ # <4> and <5> are how mousewheel looks on X
+ # <4> and <5> are how mousewheel looks on X
+ $mw->bind($class,'<Shift-4>', ['xview','scroll',-1,'units']);
+ $mw->bind($class,'<Shift-5>', ['xview','scroll',1,'units']);
+ $mw->bind($class,'<Button-6>', ['xview','scroll',-1,'units']);
+ $mw->bind($class,'<Button-7>', ['xview','scroll',1,'units']);
+}
+
+sub YMouseWheelBind
+{
+ my ($mw,$class) = @_;
+ # <4> and <5> are how mousewheel looks on X
+ $mw->bind($class,'<4>', ['yview','scroll',-1,'units']);
+ $mw->bind($class,'<5>', ['yview','scroll',1,'units']);
+}
+
+sub YscrollBind
+{
+ my ($mw,$class) = @_;
+ $mw->PriorNextBind($class);
+ $mw->bind($class,'<Up>', ['yview','scroll',-1,'units']);
+ $mw->bind($class,'<Down>', ['yview','scroll',1,'units']);
+ $mw->YMouseWheelBind($class);
+}
+
+sub XYscrollBind
+{
+ my ($mw,$class) = @_;
+ $mw->YscrollBind($class);
+ $mw->XscrollBind($class);
+ # <4> and <5> are how mousewheel looks on X
+}
+
+sub MouseWheelBind
+{
+ my($mw,$class) = @_;
+
+ # The MouseWheel will typically only fire on Windows. However, one
+ # could use the "event generate" command to produce MouseWheel
+ # events on other platforms.
+
+ $mw->Tk::bind($class, '<MouseWheel>',
+ [ sub { $_[0]->yview('scroll',-($_[1]/120)*3,'units') }, Tk::Ev("D")]);
+
+ if ($Tk::platform eq 'unix')
+ {
+ # Support for mousewheels on Linux/Unix commonly comes through mapping
+ # the wheel to the extended buttons. If you have a mousewheel, find
+ # Linux configuration info at:
+ # http://www.inria.fr/koala/colas/mouse-wheel-scroll/
+ $mw->Tk::bind($class, '<4>',
+ sub { $_[0]->yview('scroll', -3, 'units')
+ unless $Tk::strictMotif;
+ });
+ $mw->Tk::bind($class, '<5>',
+ sub { $_[0]->yview('scroll', 3, 'units')
+ unless $Tk::strictMotif;
+ });
+ }
+}
+
+sub ScrlListbox
+{
+ my $parent = shift;
+ return $parent->Scrolled('Listbox',-scrollbars => 'w', @_);
+}
+
+sub AddBindTag
+{
+ my ($w,$tag) = @_;
+ my $t;
+ my @tags = $w->bindtags;
+ foreach $t (@tags)
+ {
+ return if $t eq $tag;
+ }
+ $w->bindtags([@tags,$tag]);
+}
+
+sub Callback
+{
+ my $w = shift;
+ my $name = shift;
+ my $cb = $w->cget($name);
+ if (defined $cb)
+ {
+ return $cb->Call(@_) if (ref $cb);
+ return $w->$cb(@_);
+ }
+ return (wantarray) ? () : undef;
+}
+
+sub packAdjust
+{
+# print 'packAdjust(',join(',',@_),")\n";
+ require Tk::Adjuster;
+ my ($w,%args) = @_;
+ my $delay = delete($args{'-delay'});
+ $delay = 1 unless (defined $delay);
+ $w->pack(%args);
+ %args = $w->packInfo;
+ my $adj = Tk::Adjuster->new($args{'-in'},
+ -widget => $w, -delay => $delay, -side => $args{'-side'});
+ $adj->packed($w,%args);
+ return $w;
+}
+
+sub gridAdjust
+{
+ require Tk::Adjuster;
+ my ($w,%args) = @_;
+ my $delay = delete($args{'-delay'});
+ $delay = 1 unless (defined $delay);
+ $w->grid(%args);
+ %args = $w->gridInfo;
+ my $adj = Tk::Adjuster->new($args{'-in'},-widget => $w, -delay => $delay);
+ $adj->gridded($w,%args);
+ return $w;
+}
+
+sub place
+{
+ local $SIG{'__DIE__'} = \&Carp::croak;
+ my $w = shift;
+ if (@_ && $_[0] =~ /^(?:configure|forget|info|slaves)$/x)
+ {
+ $w->Tk::place(@_);
+ }
+ else
+ {
+ # Two things going on here:
+ # 1. Add configure on the front so that we can drop leading '-'
+ $w->Tk::place('configure',@_);
+ # 2. Return the widget rather than nothing
+ return $w;
+ }
+}
+
+sub pack
+{
+ local $SIG{'__DIE__'} = \&Carp::croak;
+ my $w = shift;
+ if (@_ && $_[0] =~ /^(?:configure|forget|info|propagate|slaves)$/x)
+ {
+ # maybe array/scalar context issue with slaves
+ $w->Tk::pack(@_);
+ }
+ else
+ {
+ # Two things going on here:
+ # 1. Add configure on the front so that we can drop leading '-'
+ $w->Tk::pack('configure',@_);
+ # 2. Return the widget rather than nothing
+ return $w;
+ }
+}
+
+sub grid
+{
+ local $SIG{'__DIE__'} = \&Carp::croak;
+ my $w = shift;
+ if (@_ && $_[0] =~ /^(?:bbox|columnconfigure|configure|forget|info|location|propagate|rowconfigure|size|slaves)$/x)
+ {
+ my $opt = shift;
+ Tk::grid($opt,$w,@_);
+ }
+ else
+ {
+ # Two things going on here:
+ # 1. Add configure on the front so that we can drop leading '-'
+ Tk::grid('configure',$w,@_);
+ # 2. Return the widget rather than nothing
+ return $w;
+ }
+}
+
+sub form
+{
+ local $SIG{'__DIE__'} = \&Carp::croak;
+ my $w = shift;
+ if (@_ && $_[0] =~ /^(?:configure|check|forget|grid|info|slaves)$/x)
+ {
+ $w->Tk::form(@_);
+ }
+ else
+ {
+ # Two things going on here:
+ # 1. Add configure on the front so that we can drop leading '-'
+ $w->Tk::form('configure',@_);
+ # 2. Return the widget rather than nothing
+ return $w;
+ }
+}
+
+sub Scrolled
+{
+ my ($parent,$kind,%args) = @_;
+ $kind = 'Pane' if $kind eq 'Frame';
+ # Find args that are Frame create time args
+ my @args = Tk::Frame->CreateArgs($parent,\%args);
+ my $name = delete $args{'Name'};
+ push(@args,'Name' => $name) if (defined $name);
+ my $cw = $parent->Frame(@args);
+ @args = ();
+ # Now remove any args that Frame can handle
+ foreach my $k ('-scrollbars',map($_->[0],$cw->configure))
+ {
+ push(@args,$k,delete($args{$k})) if (exists $args{$k})
+ }
+ # Anything else must be for target widget - pass at widget create time
+ my $w = $cw->$kind(%args);
+ # Now re-set %args to be ones Frame can handle
+ %args = @args;
+ $cw->ConfigSpecs('-scrollbars' => ['METHOD','scrollbars','Scrollbars','se'],
+ '-background' => [$w,'background','Background'],
+ '-foreground' => [$w,'foreground','Foreground'],
+ );
+ $cw->AddScrollbars($w);
+ $cw->Default("\L$kind" => $w);
+ $cw->Delegates('bind' => $w, 'bindtags' => $w, 'menu' => $w);
+ $cw->ConfigDefault(\%args);
+ $cw->configure(%args);
+ return $cw;
+}
+
+sub Populate
+{
+ my ($cw,$args) = @_;
+}
+
+sub ForwardEvent
+{
+ my $self = shift;
+ my $to = shift;
+ $to->PassEvent($self->XEvent);
+}
+
+# Save / Return abstract event type as in Tix.
+sub EventType
+{
+ my $w = shift;
+ $w->{'_EventType_'} = $_[0] if @_;
+ return $w->{'_EventType_'};
+}
+
+sub PostPopupMenu
+{
+ my ($w, $X, $Y) = @_;
+ if (@_ < 3)
+ {
+ my $e = $w->XEvent;
+ $X = $e->X;
+ $Y = $e->Y;
+ }
+ my $menu = $w->menu;
+ $menu->Post($X,$Y) if defined $menu;
+}
+
+sub FillMenu
+{
+ my ($w,$menu,@labels) = @_;
+ foreach my $lab (@labels)
+ {
+ my $method = $lab.'MenuItems';
+ $method =~ s/~//g;
+ $method =~ s/[\s-]+/_/g;
+ if ($w->can($method))
+ {
+ $menu->Menubutton(-label => $lab, -tearoff => 0, -menuitems => $w->$method());
+ }
+ }
+ return $menu;
+}
+
+sub menu
+{
+ my ($w,$menu) = @_;
+ if (@_ > 1)
+ {
+ $w->_OnDestroy('_MENU_') unless exists $w->{'_MENU_'};
+ $w->{'_MENU_'} = $menu;
+ }
+ return unless defined wantarray;
+ unless (exists $w->{'_MENU_'})
+ {
+ $w->_OnDestroy('_MENU_');
+ $w->{'_MENU_'} = $menu = $w->Menu(-tearoff => 0);
+ $w->FillMenu($menu,$w->MenuLabels);
+ }
+ return $w->{'_MENU_'};
+}
+
+sub MenuLabels
+{
+ return @DefaultMenuLabels;
+}
+
+sub FileMenuItems
+{
+ my ($w) = @_;
+ return [ ["command"=>'E~xit', -command => [ $w, 'WmDeleteWindow']]];
+}
+
+sub WmDeleteWindow
+{
+ shift->toplevel->WmDeleteWindow
+}
+
+sub BalloonInfo
+{
+ my ($widget,$balloon,$X,$Y,@opt) = @_;
+ foreach my $opt (@opt)
+ {
+ my $info = $balloon->GetOption($opt,$widget);
+ return $info if defined $info;
+ }
+}
+
+sub ConfigSpecs {
+
+ my $w = shift;
+
+ return map { ( $_->[0], [ $w, @$_[ 1 .. 4 ] ] ) } $w->configure;
+
+}
+
+*GetSelection =
+ ($Tk::platform eq 'unix'
+ ? sub
+ {
+ my $w = shift;
+ my $sel = @_ ? shift : "PRIMARY";
+ my $txt = eval { local $SIG{__DIE__};
+ $w->SelectionGet(-selection => $sel, -type => "UTF8_STRING")
+ };
+ if ($@)
+ {
+ $txt = eval { local $SIG{__DIE__};
+ $w->SelectionGet(-selection => $sel)
+ };
+ if ($@)
+ {
+ die "could not find default selection";
+ }
+ }
+ $txt;
+ }
+ : sub
+ {
+ my $w = shift;
+ my $sel = @_ ? shift : "PRIMARY";
+ my $txt = eval { local $SIG{__DIE__};
+ $w->SelectionGet(-selection => $sel)
+ };
+ if ($@)
+ {
+ die "could not find default selection";
+ }
+ $txt;
+ }
+ );
+
+1;
+__END__
+
+sub bindDump {
+
+ # Dump lots of good binding information. This pretty-print subroutine
+ # is, essentially, the following code in disguise:
+ #
+ # print "Binding information for $w\n";
+ # foreach my $tag ($w->bindtags) {
+ # printf "\n Binding tag '$tag' has these bindings:\n";
+ # foreach my $binding ($w->Tk::bind($tag)) {
+ # printf " $binding\n";
+ # }
+ # }
+
+ my ($w) = @_;
+
+ my (@bindtags) = $w->bindtags;
+ my $digits = length( scalar @bindtags );
+ my ($spc1, $spc2) = ($digits + 33, $digits + 35);
+ my $format1 = "%${digits}d.";
+ my $format2 = ' ' x ($digits + 2);
+ my $n = 0;
+
+ my @out;
+ push @out, sprintf( "\n## Binding information for '%s', %s ##", $w->PathName, $w );
+
+ foreach my $tag (@bindtags) {
+ my (@bindings) = $w->Tk::bind($tag);
+ $n++; # count this bindtag
+
+ if ($#bindings == -1) {
+ push @out, sprintf( "\n$format1 Binding tag '$tag' has no bindings.\n", $n );
+ } else {
+ push @out, sprintf( "\n$format1 Binding tag '$tag' has these bindings:\n", $n );
+
+ foreach my $binding ( @bindings ) {
+ my $callback = $w->Tk::bind($tag, $binding);
+ push @out, sprintf( "$format2%27s : %-40s\n", $binding, $callback );
+
+ if ($callback =~ /SCALAR/) {
+ if (ref $$callback) {
+ push @out, sprintf( "%s %s\n", ' ' x $spc1, $$callback );
+ } else {
+ push @out, sprintf( "%s '%s'\n", ' ' x $spc1, $$callback );
+ }
+ } elsif ($callback =~ /ARRAY/) {
+ if (ref $callback->[0]) {
+ push @out, sprintf( "%s %s\n", ' ' x $spc1, $callback->[0], "\n" );
+ } else {
+ push @out, sprintf( "%s '%s'\n", ' ' x $spc1, $callback->[0], "\n" );
+ }
+ foreach my $arg (@$callback[1 .. $#$callback]) {
+ if (ref $arg) {
+ push @out, sprintf( "%s %-40s", ' ' x $spc2, $arg );
+ } else {
+ push @out, sprintf( "%s '%s'", ' ' x $spc2, $arg );
+ }
+
+ if (ref $arg eq 'Tk::Ev') {
+ if ($arg =~ /SCALAR/) {
+ push @out, sprintf( ": '$$arg'" );
+ } else {
+ push @out, sprintf( ": '%s'", join("' '", @$arg) );
+ }
+ }
+
+ push @out, sprintf( "\n" );
+ } # forend callback arguments
+ } # ifend callback
+
+ } # forend all bindings for one tag
+
+ } # ifend have bindings
+
+ } # forend all tags
+ push @out, sprintf( "\n" );
+ return @out;
+
+} # end bindDump
+
+
+sub ASkludge
+{
+ my ($hash,$sense) = @_;
+ foreach my $key (%$hash)
+ {
+ if ($key =~ /-.*variable/ && ref($hash->{$key}) eq 'SCALAR')
+ {
+ if ($sense)
+ {
+ my $val = ${$hash->{$key}};
+ require Tie::Scalar;
+ tie ${$hash->{$key}},'Tie::StdScalar';
+ ${$hash->{$key}} = $val;
+ }
+ else
+ {
+ untie ${$hash->{$key}};
+ }
+ }
+ }
+}
+
+
+
+# clipboardKeysyms --
+# This procedure is invoked to identify the keys that correspond to
+# the "copy", "cut", and "paste" functions for the clipboard.
+#
+# Arguments:
+# copy - Name of the key (keysym name plus modifiers, if any,
+# such as "Meta-y") used for the copy operation.
+# cut - Name of the key used for the cut operation.
+# paste - Name of the key used for the paste operation.
+#
+# This method is obsolete use clipboardOperations and abstract
+# event types instead. See Clipboard.pm and Mainwindow.pm
+
+sub clipboardKeysyms
+{
+ my @class = ();
+ my $mw = shift;
+ if (ref $mw)
+ {
+ $mw = $mw->DelegateFor('bind');
+ }
+ else
+ {
+ push(@class,$mw);
+ $mw = shift;
+ }
+ if (@_)
+ {
+ my $copy = shift;
+ $mw->Tk::bind(@class,"<$copy>",'clipboardCopy') if (defined $copy);
+ }
+ if (@_)
+ {
+ my $cut = shift;
+ $mw->Tk::bind(@class,"<$cut>",'clipboardCut') if (defined $cut);
+ }
+ if (@_)
+ {
+ my $paste = shift;
+ $mw->Tk::bind(@class,"<$paste>",'clipboardPaste') if (defined $paste);
+ }
+}
+
+sub pathname
+{
+ my ($w,$id) = @_;
+ my $x = $w->winfo('pathname',-displayof => oct($id));
+ return $x->PathName;
+}
+
+# ::tk::UnderlineAmpersand --
+# This procedure takes some text with ampersand and returns
+# text w/o ampersand and position of the ampersand.
+# Double ampersands are converted to single ones.
+# Position returned is -1 when there is no ampersand.
+#
+sub UnderlineAmpersand
+{
+ my (undef,$text) = @_;
+ if ($text =~ m{(?<!&)&(?!&)}g)
+ {
+ my $idx = pos $text;
+ $text =~ s{(?<!&)&(?!&)}{};
+ ($text, $idx);
+ }
+ else
+ {
+ ($text, -1);
+ }
+}
+
+# ::tk::SetAmpText --
+# Given widget path and text with "magic ampersands",
+# sets -text and -underline options for the widget
+#
+sub SetAmpText
+{
+ my ($w,$text) = @_;
+ my ($newtext,$under) = $w->UnderlineAmpersand($text);
+ $w->configure(-text => $newtext, -underline => $under);
+}
+
+# ::tk::AmpWidget --
+# Creates new widget, turning -text option into -text and
+# -underline options, returned by ::tk::UnderlineAmpersand.
+#
+sub AmpWidget
+{
+ my ($w,$class,%args) = @_;
+ my @options;
+ while(my($opt,$val) = each %args)
+ {
+ if ($opt eq "-text")
+ {
+ my ($newtext,$under) = $w->UnderlineAmpersand($val);
+ push @options, -text => $newtext, -underline => $under;
+ }
+ else
+ {
+ push @options, $opt, $val;
+ }
+ }
+ my $result = $w->$class(@options);
+ if ($result->can('AmpWidgetPostHook'))
+ {
+ $result->AmpWidgetPostHook;
+ }
+ return $result;
+}
+
+# ::tk::FindAltKeyTarget --
+# search recursively through the hierarchy of visible widgets
+# to find button or label which has $char as underlined character
+#
+sub FindAltKeyTarget
+{
+ my ($w,$char) = @_;
+ $char = lc $char;
+ if ($w->isa('Tk::Button') || $w->isa('Tk::Label'))
+ {
+ if ($char eq lc substr($w->cget(-text), $w->cget(-underline), 1))
+ {
+ return $w;
+ }
+ else
+ {
+ return undef;
+ }
+ }
+ else
+ {
+ for my $cw ($w->gridSlaves, $w->packSlaves, $w->placeSlaves) # Cannot handle $w->formSlaves here?
+ {
+ my $target = $cw->FindAltKeyTarget($char);
+ return $target if ($target);
+ }
+ }
+ undef;
+}
+
+# ::tk::AltKeyInDialog --
+# <Alt-Key> event handler for standard dialogs. Sends <<AltUnderlined>>
+# to button or label which has appropriate underlined character
+#
+sub AltKeyInDialog
+{
+ my ($w, $key) = @_;
+ my $target = $w->FindAltKeyTarget($key);
+ return if !$target;
+ $target->eventGenerate('<<AltUnderlined>>');
+}
+
+# ::tk::SetFocusGrab --
+# swap out current focus and grab temporarily (for dialogs)
+# Arguments:
+# grab new window to grab
+# focus window to give focus to
+# Results:
+# Returns nothing
+#
+sub SetFocusGrab
+{
+ my ($grab,$focus) = @_;
+ my $index = "$grab,$focus";
+ $Tk::FocusGrab{$index} ||= [];
+ my $data = $Tk::FocusGrab{$index};
+ push @$data, $grab->focusCurrent;
+ my $oldGrab = $grab->grabCurrent;
+ push @$data, $oldGrab;
+ if (Tk::Exists($oldGrab))
+ {
+ push @$data, $oldGrab->grabStatus;
+ }
+ # The "grab" command will fail if another application
+ # already holds the grab. So catch it.
+ Tk::catch { $grab->grab };
+ if (Tk::Exists($focus))
+ {
+ $focus->focus;
+ }
+}
+
+# ::tk::RestoreFocusGrab --
+# restore old focus and grab (for dialogs)
+# Arguments:
+# grab window that had taken grab
+# focus window that had taken focus
+# destroy destroy|withdraw - how to handle the old grabbed window
+# Results:
+# Returns nothing
+#
+sub RestoreFocusGrab
+{
+ my ($grab, $focus, $destroy) = @_;
+ $destroy = 'destroy' if !$destroy;
+ my $index = "$grab,$focus";
+ my ($oldFocus, $oldGrab, $oldStatus);
+ if (exists $Tk::FocusGrab{$index})
+ {
+ ($oldFocus, $oldGrab, $oldStatus) = $Tk::FocusGrab{$index};
+ delete $Tk::FocusGrab{$index};
+ }
+ else
+ {
+ $oldGrab = "";
+ }
+
+ Tk::catch { $oldFocus->focus };
+ if (Tk::Exists($grab))
+ {
+ $grab->grabRelease;
+ if ($destroy eq "withdraw")
+ {
+ $grab->withdraw;
+ }
+ else
+ {
+ $grab->destroy;
+ }
+ }
+ if (Tk::Exists($oldGrab) && $oldGrab->ismapped)
+ {
+ if ($oldStatus eq "global")
+ {
+ $oldGrab->grabGlobal;
+ }
+ else
+ {
+ $oldGrab->grab;
+ }
+ }
+}
+
+# See http://rt.cpan.org/Ticket/Display.html?id=30929 and
+# http://rt.cpan.org/Ticket/Display.html?id=31016
+sub MasterMenu
+ {
+ }
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Widget.pod b/Master/tlpkg/tlperl/lib/Tk/Widget.pod
new file mode 100644
index 00000000000..696bbab22b7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Widget.pod
@@ -0,0 +1,678 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Widget - Base class of all widgets
+
+=for pm Tk/Widget.pm
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+ package Tk::Whatever;
+ require Tk::Widget;
+ @ISA = qw(Tk::Widget);
+ Construct Tk::Widget 'Whatever';
+
+ sub Tk_cmd { \&Tk::whatever }
+
+S< >I<$widget>-E<gt>I<method>(?I<arg, arg, ...>?)
+
+=head1 DESCRIPTION
+
+The B<Tk::Widget> is an abstract base class for all Tk widgets.
+
+Generic methods available to all widgets include the methods based on core
+C<winfo> mechanism and are used to retrieve information about windows managed by
+Tk. They can take any of a number of different forms, depending on the I<method>.
+The legal forms are:
+
+=over 4
+
+=item I<$widget>-E<gt>B<appname>?(I<newName>)?
+
+If I<newName> isn't specified, this method returns the name
+of the application (the name that may be used in B<send>
+commands to communicate with the application).
+If I<newName> is specified, then the name of the application
+is changed to I<newName>.
+If the given name is already in use, then a suffix of the form
+``B< #2>'' or ``B< #3>'' is appended in order to make the name unique.
+The method's result is the name actually chosen.
+I<newName> should not start with a capital letter.
+This will interfere with L<option|Tk::option> processing, since names starting with
+capitals are assumed to be classes; as a result, Tk may not
+be able to find some options for the application.
+If sends have been disabled by deleting the B<send> command,
+this command will reenable them and recreate the B<send>
+command.
+
+=item I<$widget>-E<gt>B<atom>(I<name>)
+
+Returns a decimal string giving the integer identifier for the
+atom whose name is I<name>. If no atom exists with the name
+I<name> then a new one is created.
+
+=item I<$widget>-E<gt>B<atomname>(I<id>)
+
+Returns the textual name for the atom whose integer identifier is
+I<id>.
+This command is the inverse of the I<$widget>-E<gt>B<atom> command.
+It generates an error if no such atom exists.
+
+=item I<$widget>-E<gt>B<bell>( ?-nice? );
+
+This command rings the bell on the display for I<$widget> and
+returns an empty string.
+The command uses the current bell-related settings for the display, which
+may be modified with programs such as B<xset>.
+
+If I<-nice> is not specified, this command also resets the screen saver
+for the screen. Some screen savers will ignore this, but others will
+reset so that the screen becomes visible again.
+
+=item I<$widget>-E<gt>B<bindDump>
+
+This command returns a list of strings suitable for printing detailing
+binding information for a widget. It prints a widget's
+bindtags. For each binding tag it prints all the bindings, comprised
+of the event descriptor and the callback. Callback arguments are
+printed, and B<Tk::Ev> objects are expanded.
+
+=item I<$widget>-E<gt>B<Busy>?(?-recurse => 1?,I<-option> => I<value>?)?
+
+This method B<configure>s a B<-cursor> option for I<$widget> and
+(if B<-recurse => 1> is specified) all its descendants. The cursor to
+be set may be passed as S<B<-cursor> => I<cursor>> or defaults to 'watch'.
+Additional B<configure> options are applied to I<$widget> only.
+It also adds a special tag B<'Busy'> to the B<bindtags> of the widgets so
+configured so that B<KeyPress>, B<KeyRelease>, B<ButtonPress> and
+B<ButtonRelease> events are ignored (with press events generating a call to
+B<bell>). It then acquires a local B<grab> for I<$widget>.
+The state of the widgets and the grab is restored by a call to
+I<$widget>-E<gt>B<Unbusy>.
+
+=item I<$widget>-E<gt>B<caret>( ?-x => I<x>?, ?-y => I<y>?, ?-height
+=> I<height>? );
+
+Sets and queries the caret location for the display of the specified
+Tk window window. The caret is the per-display cursor location used
+for indicating global focus (e.g. to comply with Microsoft
+Accessibility guidelines), as well as for location of the
+over-the-spot XIM (X Input Methods) or Windows IME windows. If no
+options are specified, the last values used for setting the caret are
+return in option-value pair format. -x and -y represent
+window-relative coordinates, and -height is the height of the current
+cursor location, or the height of the specified window if none is
+given.
+
+=item I<$widget>-E<gt>B<cells>
+
+Returns a decimal string giving the number of cells in the
+color map for I<$widget>.
+
+=item I<$widget>-E<gt>B<children>
+
+I<$widget->>B<children>
+Returns a list containing all the children
+of $widget. The list is in stacking order, with the lowest
+window first. Top-level windows are returned as children
+of their logical parents.
+
+=item I<$widget>-E<gt>B<class>
+
+Returns the class name for I<$widget>.
+
+=item I<$widget>-E<gt>B<colormapfull>
+
+Returns 1 if the colormap for I<$widget> is known to be full, 0
+otherwise. The colormap for a window is ``known'' to be full if the last
+attempt to allocate a new color on that window failed and this
+application hasn't freed any colors in the colormap since the
+failed allocation.
+
+=item I<$widget>-E<gt>B<ConfigSpecs>
+
+Used to perform delegated option configuration for a mega-widget.
+Returns, in Tk::Derived::ConfigSpecs notation (see L<Tk::ConfigSpecs>),
+all possible options for a widget. For example,
+
+ $s = $self->Scale;
+ $self->ConfigSpecs(
+ $s->ConfigSpecs,
+ .... more ConfigSpecs specifications
+ );
+
+returns a hash of all Tk::Scale options, delegated to $s - e.g. some
+representative examples:
+
+ -bigincrement => [$s, bigIncrement, BigIncrement, 0, 0]
+ -digits => [$s, digits, Digits, 0, 0]
+ -sliderlength => [$s, sliderLength, SliderLength, 10m, 30]
+ -troughcolor => [$s, troughColor, Background, #c3c3c3, #c3c3c3]
+
+This provides an easy means of populating a mega-widget's ConfigSpecs
+with initializers.
+
+=item I<$widget>-E<gt>B<containing>(I<rootX,rootY>)
+
+Returns the window containing the point given
+by I<rootX> and I<rootY>.
+I<RootX> and I<rootY> are specified in screen units (i.e.
+any form acceptable to B<Tk_GetPixels>) in the coordinate
+system of the root window (if a virtual-root window manager is in
+use then the coordinate system of the virtual root window is used).
+If no window in this application contains the point then an empty
+string is returned.
+In selecting the containing window, children are given higher priority
+than parents and among siblings the highest one in the stacking order is
+chosen.
+
+=item I<$widget>-E<gt>B<depth>
+
+Returns a decimal string giving the depth of I<$widget> (number
+of bits per pixel).
+
+=item I<$widget>-E<gt>B<destroy>
+
+This command deletes the window related to
+I<$widget>, plus all its descendants.
+If all the B<MainWindows> are deleted then the entire application
+will be destroyed.
+
+The perl object I<$widget> continues to exist while references
+to it still exist, e.g. until variable goes out of scope.
+However any attempt to use Tk methods on the object will fail.
+B<Exists>(I<$widget>) will return false on such objects.
+
+Note however that while a window exists for I<$widget> the
+perl object is maintained (due to "references" in perl/Tk internals)
+even though original variables may have gone out of scope.
+(Normally this is intuitive.)
+
+=item B<Exists>(I<$widget>)
+
+Returns 1 if there exists a window for I<$widget>, 0 if no such
+window exists.
+
+=item I<$widget>-E<gt>B<font>(I<option>?, I<arg, arg, ...>?)
+
+Create and inspect fonts. See L<Tk::Font> for further details.
+
+=item I<$widget>-E<gt>B<fpixels>(I<number>)
+
+Returns a floating-point value giving the number of pixels
+in I<$widget> corresponding to the distance given by I<number>.
+I<Number> may be specified in any of the forms acceptable
+to B<Tk_GetScreenMM>, such as ``2.0c'' or ``1i''.
+The return value may be fractional; for an integer value, use
+I<$widget>-E<gt>B<pixels>.
+
+=item I<$widget>-E<gt>B<Getimage>(I<name>)
+
+Given I<name>, look for an image file with that base name and return
+a L<Tk::Image>. File extensions are tried in this order: F<xpm>,
+F<gif>, F<ppm>, F<xbm> until a valid iamge is found. If no image is
+found, try a builtin image with that name.
+
+=item I<$widget>-E<gt>B<geometry>
+
+Returns the geometry for I<$widget>, in the form
+I<width>B<x>I<height>B<+>I<x>B<+>I<y>. All dimensions are
+in pixels.
+
+=item I<$widget>-E<gt>B<height>
+
+Returns a decimal string giving I<$widget>'s height in pixels.
+When a window is first created its height will be 1 pixel; the
+height will eventually be changed by a geometry manager to fulfill
+the window's needs.
+If you need the true height immediately after creating a widget,
+invoke B<update> to force the geometry manager to arrange it,
+or use I<$widget>-E<gt>B<reqheight> to get the window's requested height
+instead of its actual height.
+
+=item I<$widget>-E<gt>B<id>
+
+Returns a hexadecimal string giving a low-level platform-specific
+identifier for $widget. On Unix platforms, this is the X
+window identifier. Under Windows, this is the Windows
+HWND. On the Macintosh the value has no meaning outside Tk.
+
+=item I<$widget>-E<gt>B<idletasks>
+
+One of two methods which are used to bring the application ``up to date''
+by entering the event loop repeated until all pending events
+(including idle callbacks) have been processed.
+
+If the B<idletasks> method is specified, then no new events or errors
+are processed; only idle callbacks are invoked. This causes operations
+that are normally deferred, such as display updates and window layout
+calculations, to be performed immediately.
+
+The B<idletasks> command is useful in scripts where changes have been
+made to the application's state and you want those changes to appear
+on the display immediately, rather than waiting for the script to
+complete. Most display updates are performed as idle callbacks, so
+B<idletasks> will cause them to run. However, there are some kinds of
+updates that only happen in response to events, such as those
+triggered by window size changes; these updates will not occur in
+B<idletasks>.
+
+=item I<$widget>-E<gt>B<interps>
+
+Returns a list whose members are the names of all Tcl interpreters
+(e.g. all Tk-based applications) currently registered for
+a particular display.
+The return value refers
+to the display of I<$widget>.
+
+=item I<$widget>-E<gt>B<ismapped>
+
+Returns B<1> if I<$widget> is currently mapped, B<0> otherwise.
+
+=item I<$widget->>B<lower>(?I<belowThis>?)
+
+If the I<belowThis> argument is omitted then the command lowers
+$widget so that it is below all of its siblings in the stacking
+order (it will be obscured by any siblings that overlap it and
+will not obscure any siblings).
+If I<belowThis> is specified then it must be the path name of
+a window that is either a sibling of $widget or the descendant
+of a sibling of $widget.
+In this case the B<lower> command will insert
+$widget into the stacking order just below I<belowThis>
+(or the ancestor of I<belowThis> that is a sibling of $widget);
+this could end up either raising or lowering $widget.
+
+=item I<$widget>-E<gt>B<MapWindow>
+
+Cause I<$widget> to be "mapped" i.e. made visible on the display.
+May confuse the geometry manager (pack, grid, place, ...)
+that thinks it is managing the widget.
+
+=item I<$widget>-E<gt>B<manager>
+
+Returns the name of the geometry manager currently
+responsible for I<$widget>, or an empty string if I<$widget>
+isn't managed by any geometry manager.
+The name is usually the name of the method for the geometry
+manager, such as B<pack> or B<place>.
+If the geometry manager is a widget, such as canvases or text, the
+name is the widget's class command, such as B<canvas>.
+
+=item I<$widget>-E<gt>B<name>
+
+Returns I<$widget>'s name (i.e. its name within its parent, as opposed
+to its full path name).
+The command I<$mainwin>-E<gt>B<name> will return the name of the application.
+
+=item I<$widget>-E<gt>B<OnDestroy>(I<callback>);
+
+OnDestroy accepts a standard perl/Tk I<callback>.
+When the window associated with I<$widget> is destroyed then
+the callback is invoked. Unlike I<$widget->>bind('E<lt>DestroyE<gt>',...)
+the widgets methods are still available when I<callback> is executed,
+so (for example) a B<Text> widget can save its contents to a file.
+
+OnDestroy was required for new B<after> mechanism.
+
+=item I<$widget>-E<gt>B<parent>
+
+Returns I<$widget>'s parent, or an empty string
+if I<$widget> is the main window of the application.
+
+=item I<$widget>-E<gt>B<PathName>
+
+Returns the Tk path name of I<$widget>. This is the inverse of the
+L</Widget> method. (This is an import from the C interface.)
+
+=item I<$widget>-E<gt>B<pathname>(I<id>)
+
+Returns an object whose X identifier is I<id>.
+The identifier is looked up on the display of I<$widget>.
+I<Id> must be a decimal, hexadecimal, or octal integer and must
+correspond to a window in the invoking application, or an error
+occurs which can be trapped with C<eval { }> or C<Tk::catch { }>.
+If the window belongs to the application, but is not an object
+(for example wrapper windows, HList header, etc.) then C<undef>
+is returned.
+
+=item I<$widget>-E<gt>B<pixels>(I<number>)
+
+Returns the number of pixels in I<$widget> corresponding
+to the distance given by I<number>.
+I<Number> may be specified in any of the forms acceptable
+to B<Tk_GetPixels>, such as ``2.0c'' or ``1i''.
+The result is rounded to the nearest integer value; for a
+fractional result, use I<$widget>-E<gt>B<fpixels>.
+
+=item I<$widget>-E<gt>B<pointerx>
+
+If the mouse pointer is on the same screen as I<$widget>, returns the
+pointer's x coordinate, measured in pixels in the screen's root window.
+If a virtual root window is in use on the screen, the position is
+measured in the virtual root.
+If the mouse pointer isn't on the same screen as I<$widget> then
+-1 is returned.
+
+=item I<$widget>-E<gt>B<pointerxy>
+
+If the mouse pointer is on the same screen as I<$widget>, returns a list
+with two elements, which are the pointer's x and y coordinates measured
+in pixels in the screen's root window.
+If a virtual root window is in use on the screen, the position
+is computed in the virtual root.
+If the mouse pointer isn't on the same screen as I<$widget> then
+both of the returned coordinates are -1.
+
+=item I<$widget>-E<gt>B<pointery>
+
+If the mouse pointer is on the same screen as I<$widget>, returns the
+pointer's y coordinate, measured in pixels in the screen's root window.
+If a virtual root window is in use on the screen, the position
+is computed in the virtual root.
+If the mouse pointer isn't on the same screen as I<$widget> then
+-1 is returned.
+
+=item I<$widget>-E<gt>B<raise>(?I<aboveThis>?)
+
+If the I<aboveThis> argument is omitted then the command raises
+$widget so that it is above all of its siblings in the stacking
+order (it will not be obscured by any siblings and will obscure
+any siblings that overlap it).
+If I<aboveThis> is specified then it must be the path name of
+a window that is either a sibling of $widget or the descendant
+of a sibling of $widget.
+In this case the B<raise> command will insert
+$widget into the stacking order just above I<aboveThis>
+(or the ancestor of I<aboveThis> that is a sibling of $widget);
+this could end up either raising or lowering $widget.
+
+=item I<$widget>-E<gt>B<reqheight>
+
+Returns a decimal string giving I<$widget>'s requested height,
+in pixels. This is the value used by I<$widget>'s geometry
+manager to compute its geometry.
+
+=item I<$widget>-E<gt>B<reqwidth>
+
+Returns a decimal string giving I<$widget>'s requested width,
+in pixels. This is the value used by I<$widget>'s geometry
+manager to compute its geometry.
+
+=item I<$widget>-E<gt>B<rgb>(I<color>)
+
+Returns a list containing three decimal values, which are the
+red, green, and blue intensities that correspond to I<color> in
+the window given by I<$widget>. I<Color>
+may be specified in any of the forms acceptable for a color
+option.
+
+=item I<$widget>-E<gt>B<rootx>
+
+Returns a decimal string giving the x-coordinate, in the root
+window of the screen, of the
+upper-left corner of I<$widget>'s border (or I<$widget> if it
+has no border).
+
+=item I<$widget>-E<gt>B<rooty>
+
+Returns a decimal string giving the y-coordinate, in the root
+window of the screen, of the
+upper-left corner of I<$widget>'s border (or I<$widget> if it
+has no border).
+
+=item I<$widget>-E<gt>B<scaling>?(I<number>)?
+
+Sets and queries the current scaling factor used by Tk to convert between
+physical units (for example, points, inches, or millimeters) and pixels. The
+I<number> argument is a floating point number that specifies the number of
+pixels per point on $widget's display. If the I<number> argument is
+omitted, the current value of the scaling factor is returned.
+
+A ``point'' is a unit of measurement equal to 1/72 inch. A scaling factor
+of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard
+72 dpi monitor. A scaling factor of 1.25 would mean 1.25 pixels per point,
+which is the setting for a 90 dpi monitor; setting the scaling factor to
+1.25 on a 72 dpi monitor would cause everything in the application to be
+displayed 1.25 times as large as normal. The initial value for the scaling
+factor is set when the application starts, based on properties of the
+installed monitor (as reported via the window system),
+but it can be changed at any time. Measurements made
+after the scaling factor is changed will use the new scaling factor, but it
+is undefined whether existing widgets will resize themselves dynamically to
+accomodate the new scaling factor.
+
+=item I<$widget>-E<gt>B<screen>
+
+Returns the name of the screen associated with I<$widget>, in
+the form I<displayName>.I<screenIndex>.
+
+=item I<$widget>-E<gt>B<screencells>
+
+Returns a decimal string giving the number of cells in the default
+color map for I<$widget>'s screen.
+
+=item I<$widget>-E<gt>B<screendepth>
+
+Returns a decimal string giving the depth of the root window
+of I<$widget>'s screen (number of bits per pixel).
+
+=item I<$widget>-E<gt>B<screenheight>
+
+Returns a decimal string giving the height of I<$widget>'s screen,
+in pixels.
+
+=item I<$widget>-E<gt>B<screenmmheight>
+
+Returns a decimal string giving the height of I<$widget>'s screen,
+in millimeters.
+
+=item I<$widget>-E<gt>B<screenmmwidth>
+
+Returns a decimal string giving the width of I<$widget>'s screen,
+in millimeters.
+
+=item I<$widget>-E<gt>B<screenvisual>
+
+Returns one of the following strings to indicate the default visual
+class for I<$widget>'s screen: B<directcolor>, B<grayscale>,
+B<pseudocolor>, B<staticcolor>, B<staticgray>, or
+B<truecolor>.
+
+=item I<$widget>-E<gt>B<screenwidth>
+
+Returns a decimal string giving the width of I<$widget>'s screen,
+in pixels.
+
+=item I<$widget>-E<gt>B<server>
+
+Returns a string containing information about the server for
+I<$widget>'s display. The exact format of this string may vary
+from platform to platform. For X servers the string
+has the form ``B<X>I<major>B<R>I<minor vendor vendorVersion>''
+where I<major> and I<minor> are the version and revision
+numbers provided by the server (e.g., B<X11R5>), I<vendor>
+is the name of the vendor for the server, and I<vendorRelease>
+is an integer release number provided by the server.
+
+=item I<$widget>-E<gt>B<toplevel>
+
+Returns the reference of the top-level window containing I<$widget>.
+
+=item I<$widget>-E<gt>B<Unbusy>
+
+Restores widget state after a call to I<$widget>-E<gt>B<Busy>.
+
+=item I<$widget>-E<gt>B<UnmapWindow>
+
+Cause I<$widget> to be "unmapped" i.e. removed from the display.
+This does for any widget what I<$widget>-E<gt>withdraw does for
+toplevel widgets. May confuse the geometry manager (pack, grid, place, ...)
+that thinks it is managing the widget.
+
+=item I<$widget>-E<gt>B<update>
+
+One of two methods which are used to bring the application ``up to date''
+by entering the event loop repeated until all pending events
+(including idle callbacks) have been processed.
+
+The B<update> method is useful in scripts where you are performing a
+long-running computation but you still want the application to respond
+to events such as user interactions; if you occasionally call
+B<update> then user input will be processed during the next call to
+B<update>.
+
+=item I<$widget>-E<gt>B<useinputmethods>( ?I<boolean>? )
+
+Sets and queries the state of whether Tk should use XIM (X Input
+Methods) for filtering events. The resulting state is returned.
+XIM is used in some locales (ie: Japanese, Korean), to handle
+special input devices. This feature is only significant on X.
+If XIM support is not available, this will always return 0.
+If the boolean argument is omitted, the current state is
+returned. This is turned on by default for the main display.
+
+=item I<$widget>-E<gt>B<viewable>
+
+Returns 1 if I<$widget> and all of its ancestors up through the
+nearest toplevel window are mapped. Returns 0 if any of these
+windows are not mapped.
+
+=item I<$widget>-E<gt>B<visual>
+
+Returns one of the following strings to indicate the visual
+class for I<$widget>: B<directcolor>, B<grayscale>,
+B<pseudocolor>, B<staticcolor>, B<staticgray>, or
+B<truecolor>.
+
+=item I<$widget>-E<gt>B<visualid>
+
+Returns the X identifier for the visual for $widget.
+
+=item I<$widget>-E<gt>B<visualsavailable>(?B<includeids>?)
+
+Returns a list whose elements describe the visuals available for
+I<$widget>'s screen.
+Each element consists of a visual class followed by an integer depth.
+The class has the same form as returned by I<$widget>-E<gt>B<visual>.
+The depth gives the number of bits per pixel in the visual.
+In addition, if the B<includeids> argument is provided, then the
+depth is followed by the X identifier for the visual.
+
+=item I<$widget>-E<gt>B<vrootheight>
+
+Returns the height of the virtual root window associated with I<$widget>
+if there is one; otherwise returns the height of I<$widget>'s screen.
+
+=item I<$widget>-E<gt>B<vrootwidth>
+
+Returns the width of the virtual root window associated with I<$widget>
+if there is one; otherwise returns the width of I<$widget>'s screen.
+
+=item I<$widget>-E<gt>B<vrootx>
+
+Returns the x-offset of the virtual root window associated with I<$widget>,
+relative to the root window of its screen.
+This is normally either zero or negative.
+Returns 0 if there is no virtual root window for I<$widget>.
+
+=item I<$widget>-E<gt>B<vrooty>
+
+Returns the y-offset of the virtual root window associated with I<$widget>,
+relative to the root window of its screen.
+This is normally either zero or negative.
+Returns 0 if there is no virtual root window for I<$widget>.
+
+=item I<$widget->>B<waitVariable>(\$I<name>)
+
+=item I<$widget->>B<waitVisibility>
+
+=item I<$widget->>B<waitWindow>
+
+The B<tk wait> methods wait for one of several things to happen,
+then it returns without taking any other actions.
+The return value is always an empty string.
+B<waitVariable> expects a reference to a perl
+variable and the command waits for that variable to be modified.
+This form is typically used to wait for a user to finish interacting
+with a dialog which sets the variable as part (possibly final)
+part of the interaction.
+B<waitVisibility> waits for a change in I<$widget>'s
+visibility state (as indicated by the arrival of a VisibilityNotify
+event). This form is typically used to wait for a newly-created
+window to appear on the screen before taking some action.
+B<waitWindow> waits for I<$widget> to be destroyed.
+This form is typically used to wait for a user to finish interacting
+with a dialog box before using the result of that interaction.
+Note that creating and destroying the window each time a dialog is required
+makes code modular but imposes overhead which can be avoided by B<withdrawing>
+the window instead and using B<waitVisibility>.
+
+While the B<tk wait> methods are waiting they processes events in
+the normal fashion, so the application will continue to respond
+to user interactions.
+If an event handler invokes B<tkwait> again, the nested call
+to B<tkwait> must complete before the outer call can complete.
+
+=item I<$widget>-E<gt>B<Walk>(I<proc>?, I<arg, ...>?)
+
+Traverse a widget hierarchy starting at I<$widget> while executing the
+subroutine I<proc> to every visited widget. The arguments I<arg, ...>
+are supplied to the subroutine.
+
+=item I<$widget>-E<gt>B<Widget>(I<pathname>)
+
+Returns the widget reference for the given Tk path name, or C<undef>
+if the path name does not match a Tk widget. This is the inverse of
+the L</PathName> method. (This is an import from the C interface.)
+
+=item I<$widget>-E<gt>B<width>
+
+Returns a decimal string giving I<$widget>'s width in pixels.
+When a window is first created its width will be 1 pixel; the
+width will eventually be changed by a geometry manager to fulfill
+the window's needs.
+If you need the true width immediately after creating a widget,
+invoke B<update> to force the geometry manager to arrange it,
+or use I<$widget>-E<gt>B<reqwidth> to get the window's requested width
+instead of its actual width.
+
+=item I<$widget>-E<gt>B<windowingsystem>
+
+Returns the current Tk windowing system, one of B<x11> (X11-based),
+B<win32> (MS Windows), B<classic> (Mac OS Classic), or B<aqua> (Mac OS X Aqua).
+
+=item I<$widget>-E<gt>B<x>
+
+Returns a decimal string giving the x-coordinate, in I<$widget>'s
+parent, of the upper-left corner of I<$widget>'s border (or I<$widget>
+if it has no border).
+
+=item I<$widget>-E<gt>B<y>
+
+Returns a decimal string giving the y-coordinate, in I<$widget>'s
+parent, of the
+upper-left corner of I<$widget>'s border (or I<$widget> if it
+has no border).
+
+=back
+
+=head1 CAVEATS
+
+The above documentaion on generic methods is incomplete.
+
+=head1 KEYWORDS
+
+atom, children, class, geometry, height, identifier, information, interpreters,
+mapped, parent, path name, screen, virtual root, width, window
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/WidgetDemo.pod b/Master/tlpkg/tlperl/lib/Tk/WidgetDemo.pod
new file mode 100644
index 00000000000..32c7a101dc6
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/WidgetDemo.pod
@@ -0,0 +1,59 @@
+
+=head1 NAME
+
+WidgetDemo() - create a standard widget demonstration window.
+
+=for pm demos/demos/widget_lib/WidgetDemo.pm
+
+=for category Implementation
+
+=head1 SYNOPSIS
+
+ use WidgetDemo;
+ my $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Learn how to write a widget demonstration!',
+ -title => 'WidgetDemo Demonstration',
+ -iconname => 'WidgetDemo',
+ -geometry_manager => 'grid',
+ -font => $FONT,
+ );
+
+=head1 DESCRIPTION
+
+This constructor builds a standard widget demonstration window, composed of
+three frames. The top frame contains descriptive demonstration text. The
+bottom frame contains the "Dismiss" and "See Code" buttons. The middle frame
+is demonstration container, which came be managed by either the pack or grid
+geometry manager.
+
+The -text attribute is supplied to a Label widget, which is left-adjusted
+with -wraplength set to 4 inches. If you require different specifications
+then pass an array to -text; the first element is the text string and
+the remaining array elements are standard Label widget attributes - WidgetDemo
+will rearrange things as required..
+
+ -text => ['Hello World!', qw/-wraplength 6i/],
+
+=head1 AUTHOR
+
+Steve Lidie <Stephen.O.Lidie@Lehigh.EDU>
+
+=head1 HISTORY
+
+lusol@Lehigh.EDU, LUCC, 97/02/11
+lusol@Lehigh.EDU, LUCC, 97/06/07
+Stephen.O.Lidie@Lehigh.EDU, LUCC, 97/06/07
+ . Add Delegates() call that obviates the need for Top(). Many thanks to
+ Achim Bohnet for this patch.
+ . Fix -title so that it works.
+
+=head1 COPYRIGHT
+
+Copyright (C) 1997 - 1998 Stephen O. Lidie. All rights reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Wm.pm b/Master/tlpkg/tlperl/lib/Tk/Wm.pm
new file mode 100644
index 00000000000..113bf951a15
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Wm.pm
@@ -0,0 +1,174 @@
+# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+package Tk::Wm;
+use AutoLoader;
+
+require Tk::Widget;
+*AUTOLOAD = \&Tk::Widget::AUTOLOAD;
+
+use strict qw(vars);
+
+# There are issues with this stuff now we have Tix's wm release/capture
+# as toplevel-ness is now dynamic.
+
+
+use vars qw($VERSION);
+$VERSION = '4.015'; # was: sprintf '4.%03d', q$Revision: #14 $ =~ /\D(\d+)\s*$/;
+
+use Tk::Submethods;
+
+*{Tk::Wm::wmGrid} = sub { shift->wm("grid", @_) };
+*{Tk::Wm::wmTracing} = sub { shift->wm("tracing", @_) };
+
+Direct Tk::Submethods ('wm' => [qw(aspect attributes client colormapwindows command
+ deiconify focusmodel frame geometry group
+ iconbitmap iconify iconimage iconmask iconname iconphoto
+ iconwindow maxsize minsize overrideredirect positionfrom
+ protocol resizable sizefrom stackorder state title transient
+ withdraw wrapper)]);
+
+sub SetBindtags
+{
+ my ($obj) = @_;
+ $obj->bindtags([ref($obj),$obj,'all']);
+}
+
+sub Populate
+{
+ my ($cw,$args) = @_;
+ $cw->ConfigSpecs('-overanchor' => ['PASSIVE',undef,undef,undef],
+ '-popanchor' => ['PASSIVE',undef,undef,undef],
+ '-popover' => ['PASSIVE',undef,undef,undef]
+ );
+}
+
+sub MoveResizeWindow
+{
+ my ($w,$x,$y,$width,$height) = @_;
+ $w->withdraw;
+ $w->geometry($width.'x'.$height);
+ $w->MoveToplevelWindow($x,$y);
+ $w->deiconify;
+}
+
+sub WmDeleteWindow
+{
+ my ($w) = @_;
+ my $cb = $w->protocol('WM_DELETE_WINDOW');
+ if (defined $cb)
+ {
+ $cb->Call;
+ }
+ else
+ {
+ $w->destroy;
+ }
+}
+
+
+1;
+
+__END__
+
+
+sub Post
+{
+ my ($w,$X,$Y) = @_;
+ $X = int($X);
+ $Y = int($Y);
+ $w->positionfrom('user');
+ $w->geometry("+$X+$Y");
+ # $w->MoveToplevelWindow($X,$Y);
+ $w->deiconify;
+ $w->raise;
+}
+
+sub AnchorAdjust
+{
+ my ($anchor,$X,$Y,$w,$h) = @_;
+ $anchor = 'c' unless (defined $anchor);
+ $Y += ($anchor =~ /s/) ? $h : ($anchor =~ /n/) ? 0 : $h/2;
+ $X += ($anchor =~ /e/) ? $w : ($anchor =~ /w/) ? 0 : $w/2;
+ return ($X,$Y);
+}
+
+sub Popup
+{
+ my $w = shift;
+ $w->configure(@_) if @_;
+ $w->idletasks;
+ my ($mw,$mh) = ($w->reqwidth,$w->reqheight);
+ my ($rx,$ry,$rw,$rh) = (0,0,0,0);
+ my $base = $w->cget('-popover');
+ my $outside = 0;
+ if (defined $base)
+ {
+ if ($base eq 'cursor')
+ {
+ ($rx,$ry) = $w->pointerxy;
+ }
+ else
+ {
+ $rx = $base->rootx;
+ $ry = $base->rooty;
+ $rw = $base->Width;
+ $rh = $base->Height;
+ }
+ }
+ else
+ {
+ my $sc = ($w->parent) ? $w->parent->toplevel : $w;
+ $rx = -$sc->vrootx;
+ $ry = -$sc->vrooty;
+ $rw = $w->screenwidth;
+ $rh = $w->screenheight;
+ }
+ my ($X,$Y) = AnchorAdjust($w->cget('-overanchor'),$rx,$ry,$rw,$rh);
+ ($X,$Y) = AnchorAdjust($w->cget('-popanchor'),$X,$Y,-$mw,-$mh);
+ # adjust to not cross screen borders
+ if ($X < 0) { $X = 0 }
+ if ($Y < 0) { $Y = 0 }
+ if ($mw > $w->screenwidth) { $X = 0 }
+ if ($mh > $w->screenheight) { $Y = 0 }
+ $w->Post($X,$Y);
+ $w->waitVisibility;
+}
+
+sub FullScreen
+{
+ my $w = shift;
+ my $over = (@_) ? shift : 0;
+ my $width = $w->screenwidth;
+ my $height = $w->screenheight;
+ $w->GeometryRequest($width,$height);
+ $w->overrideredirect($over & 1);
+ $w->Post(0,0);
+ $w->update;
+ if ($over & 2)
+ {
+ my $x = $w->rootx;
+ my $y = $w->rooty;
+ $width -= 2*$x;
+ $height -= $x + $y;
+ $w->GeometryRequest($width,$height);
+ $w->update;
+ }
+}
+
+sub iconposition
+{
+ my $w = shift;
+ if (@_ == 1)
+ {
+ return $w->wm('iconposition',$1,$2) if $_[0] =~ /^(\d+),(\d+)$/;
+ if ($_[0] =~ /^([+-])(\d+)([+-])(\d+)$/)
+ {
+ my $x = ($1 eq '-') ? $w->screenwidth-$2 : $2;
+ my $y = ($3 eq '-') ? $w->screenheight-$4 : $4;
+ return $w->wm('iconposition',$x,$y);
+ }
+ }
+ $w->wm('iconposition',@_);
+}
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Wm.pod b/Master/tlpkg/tlperl/lib/Tk/Wm.pod
new file mode 100644
index 00000000000..395fdf07d22
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Wm.pod
@@ -0,0 +1,667 @@
+# Copyright (c) 1991-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Wm - Communicate with window manager
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+S< >I<$toplevel>-E<gt>I<method>(?I<args>?)
+
+=head1 DESCRIPTION
+
+The B<wm> methods are used to interact with window managers in
+order to control such things as the title for a window, its geometry,
+or the increments in terms of which it may be resized.
+The B<wm> methods can take any of a number of different forms, depending on
+the particular I<method> argument.
+All of the forms expect I<$toplevel>, which must be a
+top-level window object.
+
+The legal forms for the B<wm> methods are:
+
+=over 4
+
+=item I<$toplevel>-E<gt>B<aspect>(?I<minNumer minDenom maxNumer maxDenom>?)
+
+If I<minNumer>, I<minDenom>, I<maxNumer>, and I<maxDenom>
+are all specified, then they will be passed to the window manager
+and the window manager should use them to enforce a range of
+acceptable aspect ratios for I<$toplevel>. The aspect ratio of
+I<$toplevel> (width/length) will be constrained to lie
+between I<minNumer>/I<minDenom> and I<maxNumer>/I<maxDenom>.
+If I<minNumer> etc. are all specified as empty strings, then
+any existing aspect ratio restrictions are removed.
+If I<minNumer> etc. are specified, then the method returns an
+empty string. Otherwise, it returns
+a array containing four elements, which are the current values
+of I<minNumer>, I<minDenom>, I<maxNumer>, and I<maxDenom>
+(if no aspect restrictions are in effect, then an empty string is
+returned).
+
+=item I<$widget>-E<gt>B<attributes>( I<?args?> );
+
+This subcommand returns or sets platform specific attributes
+associated with a window.
+
+=over 4
+
+=item I<$widget>-E<gt>B<attributes>;
+
+Returns a list of the platform specific flags and their values.
+
+=item I<$widget>-E<gt>B<attributes>( I<?option?> );
+
+Returns the value for the specific option.
+
+=item I<$widget>-E<gt>B<attributes>( I<?option value option value...?> );
+
+Sets one or more of the values. The values are as follows:
+
+On Windows, B<-disabled> gets or sets whether the window is in a
+disabled state. B<-toolwindow> gets or sets the style of the window
+to toolwindow (as defined in the MSDN). B<-topmost> gets or sets
+whether this is a topmost window (displays above all other windows).
+
+On Macintosh, there are currently no special attribute values.
+
+On Unix, there are currently no special attribute values.
+
+=back
+
+=item I<$toplevel>-E<gt>B<client>(?I<name>?)
+
+If I<name> is specified, this method stores I<name> (which
+should be the name of
+the host on which the application is executing) in I<$toplevel>'s
+B<WM_CLIENT_MACHINE> property for use by the window manager or
+session manager.
+The method returns an empty string in this case.
+If I<name> isn't specified, the method returns the last name
+set in a B<client> method for I<$toplevel>.
+If I<name> is specified as an empty string, the method deletes the
+B<WM_CLIENT_MACHINE> property from I<$toplevel>.
+
+=item I<$toplevel>-E<gt>B<colormapwindows>(?I<windowList>?)
+
+This method is used to manipulate the B<WM_COLORMAP_WINDOWS>
+property, which provides information to the window managers about
+windows that have private colormaps.
+If I<windowList> isn't specified, the method returns a list
+whose elements are the names of the windows in the B<WM_COLORMAP_WINDOWS>
+property.
+If I<windowList> is specified, it consists of a list of widgets;
+the method overwrites the B<WM_COLORMAP_WINDOWS>
+property with the given windows and returns an empty string.
+The B<WM_COLORMAP_WINDOWS> property should normally contain a
+list of the internal windows within I<$toplevel> whose colormaps differ
+from their parents.
+The order of the windows in the property indicates a priority order:
+the window manager will attempt to install as many colormaps as possible
+from the head of this list when I<$widget> gets the colormap focus.
+If I<$widget> is not included among the windows in I<windowList>,
+Tk implicitly adds it at the end of the B<WM_COLORMAP_WINDOWS>
+property, so that its colormap is lowest in priority.
+If I<$widget>-E<gt>colormapwindows is not invoked, Tk will automatically set
+the property for each top-level window to all the internal windows
+whose colormaps differ from their parents, followed by the top-level
+itself; the order of the internal windows is undefined.
+See the ICCCM documentation for more information on the
+B<WM_COLORMAP_WINDOWS> property.
+
+=item I<$toplevel>-E<gt>B<command>(?I<value>?)
+
+If I<value> is specified, this method stores I<value> in I<$toplevel>'s
+B<WM_COMMAND> property for use by the window manager or
+session manager and returns an empty string.
+I<Value> must have proper list structure; the elements should
+contain the words of the command used to invoke the application.
+If I<value> isn't specified then the method returns the last value
+set in a B<command> method for I<$toplevel>.
+If I<value> is specified as an empty string, the method
+deletes the B<WM_COMMAND> property from I<$toplevel>.
+
+=item I<$toplevel>-E<gt>B<deiconify>
+
+Arrange for I<$toplevel> to be displayed in normal (non-iconified) form.
+This is done by mapping the window. If the window has never been
+mapped then this method will not map the window, but it will ensure
+that when the window is first mapped it will be displayed
+in de-iconified form. Returns an empty string.
+
+=item I<$toplevel>-E<gt>B<focusmodel>(?B<active>|B<passive>?)
+
+If B<active> or B<passive> is supplied as an optional argument
+to the method, then it specifies the focus model for I<$toplevel>.
+In this case the method returns an empty string. If no additional
+argument is supplied, then the method returns the current focus
+model for I<$toplevel>.
+An B<active> focus model means that I<$toplevel> will claim the
+input focus for itself or its descendants, even at times when
+the focus is currently in some other application. B<Passive> means that
+I<$toplevel> will never claim the focus for itself: the window manager
+should give the focus to I<$toplevel> at appropriate times. However,
+once the focus has been given to I<$toplevel> or one of its descendants,
+the application may re-assign the focus among I<$toplevel>'s descendants.
+The focus model defaults to B<passive>, and Tk's B<focus> method
+assumes a passive model of focusing.
+
+=item I<$toplevel>-E<gt>B<frame>
+
+If I<$widget> has been reparented by the window manager into a
+decorative frame, the method returns the platform specific window
+identifier for the outermost frame that contains I<$toplevel> (the
+window whose parent is the root or virtual root). If I<$toplevel>
+hasn't been reparented by the window manager then the method returns
+the platform specific window identifier for I<$toplevel>.
+
+=item I<$toplevel>-E<gt>B<geometry>(?I<newGeometry>?)
+
+If I<newGeometry> is specified, then the geometry of I<$toplevel>
+is changed and an empty string is returned. Otherwise the current
+geometry for I<$toplevel> is returned (this is the most recent
+geometry specified either by manual resizing or
+in a B<geometry> method). I<NewGeometry> has
+the form B<=>I<width>B<x>I<height>B<+->I<x>B<+->I<y>, where
+any of B<=>, I<width>B<x>I<height>, or B<+->I<x>B<+->I<y>
+may be omitted. I<Width> and I<height> are positive integers
+specifying the desired dimensions of I<$toplevel>. If I<$toplevel>
+is gridded (see L<"GRIDDED GEOMETRY MANAGEMENT"> below) then the dimensions
+are specified in grid units; otherwise they are specified in pixel
+units. I<X> and I<y> specify the desired location of
+I<$toplevel> on the screen, in pixels.
+If I<x> is preceded by B<+>, it specifies
+the number of pixels between the left edge of the screen and the left
+edge of I<$toplevel>'s border; if preceded by B<-> then
+I<x> specifies the number of pixels
+between the right edge of the screen and the right edge of I<$toplevel>'s
+border. If I<y> is preceded by B<+> then it specifies the
+number of pixels between the top of the screen and the top
+of I<$toplevel>'s border; if I<y> is preceded by B<-> then
+it specifies the number of pixels between the bottom of I<$toplevel>'s
+border and the bottom of the screen.
+If I<newGeometry> is specified as an empty string then any
+existing user-specified geometry for I<$toplevel> is cancelled, and
+the window will revert to the size requested internally by its
+widgets.
+
+=item I<$toplevel>-E<gt>B<wmGrid>(?I<baseWidth,baseHeight,widthInc,heightInc>?)
+
+This method indicates that I<$toplevel> is to be managed as a
+gridded window.
+It also specifies the relationship between grid units and pixel units.
+I<BaseWidth> and I<baseHeight> specify the number of grid
+units corresponding to the pixel dimensions requested internally
+by I<$toplevel> using B<Tk_GeometryRequest>. I<WidthInc>
+and I<heightInc> specify the number of pixels in each horizontal
+and vertical grid unit.
+These four values determine a range of acceptable sizes for
+I<$toplevel>, corresponding to grid-based widths and heights
+that are non-negative integers.
+Tk will pass this information to the window manager; during
+manual resizing, the window manager will restrict the window's size
+to one of these acceptable sizes.
+Furthermore, during manual resizing the window manager will display
+the window's current size in terms of grid units rather than pixels.
+If I<baseWidth> etc. are all specified as empty strings, then
+I<$toplevel> will no longer be managed as a gridded window. If
+I<baseWidth> etc. are specified then the return value is an
+empty string.
+Otherwise the return value is a array containing
+four elements corresponding to the current I<baseWidth>,
+I<baseHeight>, I<widthInc>, and I<heightInc>; if
+I<$toplevel> is not currently gridded, then an empty string
+is returned.
+Note: this command should not be needed very often, since the
+B<Tk_SetGrid> library procedure and the B<-setgrid> option
+provide easier access to the same functionality.
+
+=item I<$toplevel>-E<gt>B<group>(?I<$widget>?)
+
+If I<$widget> is specified, it is the the leader of
+a group of related windows. The window manager may use this information,
+for example, to unmap all of the windows in a group when the group's
+leader is iconified. I<$widget> may be specified as an empty string to
+remove I<$toplevel> from any group association. If I<$widget> is
+specified then the method returns an empty string; otherwise it
+returns the I<$toplevel>'s current group leader, or an empty
+string if I<$toplevel> isn't part of any group.
+
+=item I<$toplevel>-E<gt>B<iconbitmap>(?I<bitmap>?)
+
+If I<bitmap> is specified, then it names a bitmap in the standard
+forms accepted by Tk (see the B<Tk_GetBitmap> documentation for details).
+This I<black and white> bitmap is passed to the window manager to be displayed
+in I<$toplevel>'s icon, and the method returns an empty string. If
+an empty string is specified for I<bitmap>, then any current icon
+bitmap or image is cancelled for I<$toplevel>.
+If I<bitmap> is specified then the method returns an empty string.
+Otherwise it returns the name of
+the current icon bitmap associated with I<$toplevel>, or an empty
+string if I<$toplevel> has no icon bitmap.
+
+=item I<$toplevel>-E<gt>B<iconify>
+
+Arrange for I<$toplevel> to be iconified. It I<$toplevel> hasn't
+yet been mapped for the first time, this method will arrange for
+it to appear in the iconified state when it is eventually mapped.
+
+=item I<$toplevel>-E<gt>B<iconimage>(?I<image>?)
+
+If I<image> is specified, then it names a normal Tk image.
+This image is rendered into a private I<coloured> bitmap which is passed to
+the window manager to be displayed in I<$toplevel>'s icon, and the method returns
+an empty string. If an empty string is specified for I<image>, then any current
+icon bitmap or image is cancelled for I<$toplevel>.
+If I<image> is specified then the method returns an empty string.
+Otherwise it returns the name of
+the current icon image associated with I<$toplevel>, or an empty
+string if I<$toplevel> has no icon image.
+The private pixmap is not pre-cleared so images which are partly "transparent"
+display rubbish in their transparent parts.
+
+The sizes of images that can be used as icons in this manner are platform
+dependant. On Win32 this sets the "large" icon, which should be 32x32, it
+will automatically be scaled down to 16x16 for use as a small icon.
+
+=item I<$toplevel>-E<gt>B<iconmask>(?I<bitmap>?)
+
+If I<bitmap> is specified, then it names a bitmap in the standard
+forms accepted by Tk (see the B<Tk_GetBitmap> documentation for details).
+This bitmap is passed to the window manager to be used as a mask
+in conjunction with the B<iconbitmap> option: where the mask
+has zeroes no icon will be displayed; where it has ones, the bits
+from the icon bitmap will be displayed. If
+an empty string is specified for I<bitmap> then any current icon
+mask is cancelled for I<$toplevel> (this is equivalent to specifying
+a bitmap of all ones). If I<bitmap> is specified
+then the method returns an empty string. Otherwise it
+returns the name of the current icon mask associated with
+I<$toplevel>, or an empty string if no mask is in effect.
+
+=item I<$toplevel>-E<gt>B<iconname>(?I<newName>?)
+
+If I<newName> is specified, then it is passed to the window
+manager; the window manager should display I<newName> inside
+the icon associated with I<$toplevel>. In this case an empty
+string is returned as result. If I<newName> isn't specified
+then the method returns the current icon name for I<$toplevel>,
+or an empty string if no icon name has been specified (in this
+case the window manager will normally display the window's title,
+as specified with the B<title> method).
+
+=item I<$toplevel>-E<gt>B<iconphoto>(?-default? I<image1> ?I<image2>
+...?)
+
+Sets the titlebar icon for window based on the named photo
+images. If -default is specified, this is applied to all future
+created toplevels as well. The data in the images is taken as a
+snapshot at the time of invocation. If the images are later
+changed, this is not reflected to the titlebar icons. Multiple
+images are accepted to allow different images sizes (eg, 16x16
+and 32x32) to be provided. The window manager may scale pro-
+vided icons to an appropriate size.
+
+On Windows, the images are packed into a Windows icon structure.
+This will override an ico specified to wm iconbitmap, and vice
+versa. [NOTE: This is not implemented yet!]
+
+On X, the images are arranged into the _NET_WM_ICON X property,
+which most modern window managers support. A wm iconbitmap may
+exist simultaneously. It is recommended to use not more than 2
+icons, placing the larger icon first.
+
+On Macintosh, this is currently does nothing.
+
+=item I<$toplevel>-E<gt>B<iconposition>(?I<x y>?)
+
+If I<x> and I<y> are specified, they are passed to the window
+manager as a hint about where to position the icon for I<$toplevel>.
+In this case an empty string is returned. If I<x> and I<y> are
+specified as empty strings then any existing icon position hint is cancelled.
+If neither I<x> nor I<y> is specified, then the method returns
+a array containing two values, which are the current icon position
+hints (if no hints are in effect then an empty string is returned).
+
+=item I<$toplevel>-E<gt>B<iconwindow>(?I<$widget>?)
+
+If I<$widget> is specified, it is a window to
+use as icon for I<$toplevel>: when I<$toplevel> is iconified then
+I<$widget> will be mapped to serve as icon, and when I<$toplevel>
+is de-iconified then I<$widget> will be unmapped again. If
+I<$widget> is specified as an empty string then any existing
+icon window association for I<$toplevel> will be cancelled. If
+the I<$widget> argument is specified then an empty string is
+returned. Otherwise the method returns the
+current icon window for I<$toplevel>, or an empty string if there
+is no icon window currently specified for I<$toplevel>.
+Button press events are disabled for I<$toplevel> as long as it is
+an icon window; this is needed in order to allow window managers
+to ``own'' those events.
+Note: not all window managers support the notion of an icon window.
+
+=item I<$toplevel>-E<gt>B<maxsize>(?I<width,height>?)
+
+If I<width> and I<height> are specified, they give
+the maximum permissible dimensions for I<$toplevel>.
+For gridded windows the dimensions are specified in
+grid units; otherwise they are specified in pixel units.
+The window manager will restrict the window's dimensions to be
+less than or equal to I<width> and I<height>.
+If I<width> and I<height> are
+specified, then the method returns an empty string. Otherwise
+it returns a array with two elements, which are the
+maximum width and height currently in effect.
+The maximum size defaults to the size of the screen.
+If resizing has been disabled with the B<resizable> method,
+then this method has no effect.
+See the sections on geometry management below for more information.
+
+=item I<$toplevel>-E<gt>B<minsize>(?I<width,height>?)
+
+If I<width> and I<height> are specified, they give the
+minimum permissible dimensions for I<$toplevel>.
+For gridded windows the dimensions are specified in
+grid units; otherwise they are specified in pixel units.
+The window manager will restrict the window's dimensions to be
+greater than or equal to I<width> and I<height>.
+If I<width> and I<height> are
+specified, then the method returns an empty string. Otherwise
+it returns a array with two elements, which are the
+minimum width and height currently in effect.
+The minimum size defaults to one pixel in each dimension.
+If resizing has been disabled with the B<resizable> method,
+then this method has no effect.
+See the sections on geometry management below for more information.
+
+=item I<$toplevel>-E<gt>B<overrideredirect(?>I<boolean>?)
+
+If I<boolean> is specified, it must have a proper boolean form and
+the override-redirect flag for I<$toplevel> is set to that value.
+If I<boolean> is not specified then B<1> or B<0> is
+returned to indicate whether or not the override-redirect flag
+is currently set for I<$toplevel>.
+Setting the override-redirect flag for a window causes
+it to be ignored by the window manager; among other things, this means
+that the window will not be reparented from the root window into a
+decorative frame and the user will not be able to manipulate the
+window using the normal window manager mechanisms.
+
+=item I<$toplevel>-E<gt>B<positionfrom>(?I<who>?)
+
+If I<who> is specified, it must be either B<program> or
+B<user>, or an abbreviation of one of these two. It indicates
+whether I<$toplevel>'s current position was requested by the
+program or by the user. Many window managers ignore program-requested
+initial positions and ask the user to manually position the window; if
+B<user> is specified then the window manager should position the
+window at the given place without asking the user for assistance.
+If I<who> is specified as an empty string, then the current position
+source is cancelled.
+If I<who> is specified, then the method returns an empty string.
+Otherwise it returns B<user> or $widget to indicate the
+source of the window's current position, or an empty string if
+no source has been specified yet. Most window managers interpret
+``no source'' as equivalent to B<program>.
+Tk will automatically set the position source to B<user>
+when a B<geometry> method is invoked, unless the source has
+been set explicitly to B<program>.
+
+=item I<$toplevel>-E<gt>B<protocol>(?I<name>?,?I<callback>?)
+
+This method is used to manage window manager protocols such as
+B<WM_DELETE_WINDOW>.
+I<Name> is the name of an atom corresponding to a window manager
+protocol, such as B<WM_DELETE_WINDOW> or B<WM_SAVE_YOURSELF>
+or B<WM_TAKE_FOCUS>.
+If both I<name> and I<callback> are specified, then I<callback>
+is associated with the protocol specified by I<name>.
+I<Name> will be added to I<$toplevel>'s B<WM_PROTOCOLS>
+property to tell the window manager that the application has a
+protocol handler for I<name>, and I<callback> will
+be invoked in the future whenever the window manager sends a
+message to the client for that protocol.
+In this case the method returns an empty string.
+If I<name> is specified but I<callback> isn't, then the current
+callback for I<name> is returned, or an empty string if there
+is no handler defined for I<name>.
+If I<callback> is specified as an empty string then the current
+handler for I<name> is deleted and it is removed from the
+B<WM_PROTOCOLS> property on I<$toplevel>; an empty string is
+returned.
+Lastly, if neither I<name> nor I<callback> is specified, the
+method returns a list of all the protocols for which handlers
+are currently defined for I<$toplevel>.
+
+=over 8
+
+Tk always defines a protocol handler for B<WM_DELETE_WINDOW>, even if
+you haven't asked for one with B<protocol>.
+If a B<WM_DELETE_WINDOW> message arrives when you haven't defined
+a handler, then Tk handles the message by destroying the window for
+which it was received.
+
+=back
+
+=item I<$toplevel>-E<gt>B<resizable>(?I<width,height>?)
+
+This method controls whether or not the user may interactively
+resize a top-level window. If I<width> and I<height> are
+specified, they are boolean values that determine whether the
+width and height of I<$toplevel> may be modified by the user.
+In this case the method returns an empty string.
+If I<width> and I<height> are omitted then the method
+returns a list with two 0/1 elements that indicate whether the
+width and height of I<$toplevel> are currently resizable.
+By default, windows are resizable in both dimensions.
+If resizing is disabled, then the window's size will be the size
+from the most recent interactive resize or B<geometry>
+method. If there has been no such operation then
+the window's natural size will be used.
+
+=item I<$toplevel>-E<gt>B<sizefrom>(?I<who>?)
+
+If I<who> is specified, it must be either B<program> or
+B<user>, or an abbreviation of one of these two. It indicates
+whether I<$toplevel>'s current size was requested by the
+program or by the user. Some window managers ignore program-requested
+sizes and ask the user to manually size the window; if
+B<user> is specified then the window manager should give the
+window its specified size without asking the user for assistance.
+If I<who> is specified as an empty string, then the current size
+source is cancelled.
+If I<who> is specified, then the method returns an empty string.
+Otherwise it returns B<user> or $widget to indicate the
+source of the window's current size, or an empty string if
+no source has been specified yet. Most window managers interpret
+``no source'' as equivalent to B<program>.
+
+=item I<$toplevel>-E<gt>B<stackorder>( I<?isabove|isbelow $toplevel?> );
+
+The stackorder command returns a list of toplevel windows in
+stacking order, from lowest to highest. When a single toplevel
+window is passed, the returned list recursively includes all of
+the window's children that are toplevels. Only those toplevels
+that are currently mapped to the screen are returned. The
+stackorder command can also be used to determine if one toplevel
+is positioned above or below a second toplevel. When two window
+arguments separated by either isabove or isbelow are passed, a
+boolean result indicates whether or not the first window is
+currently above or below the second window in the stacking order.
+
+
+=item I<$toplevel>-E<gt>B<state>(?I<newstate>?)
+
+If I<newstate> is specified, the window will be set to
+the new state, otherwise it returns the current state of
+I<$toplevel>: either B<normal>, B<iconic>, B<withdrawn>, B<icon>, or
+(Windows only) B<zoomed>. The
+difference between B<iconic> and B<icon> is that B<iconic> refers to a
+window that has been iconified (e.g., with the B<iconify> method)
+while B<icon> refers to a window whose only purpose is to serve as the
+icon for some other window (via the B<iconwindow> method). The
+B<icon> state cannot be set.
+
+
+=item I<$toplevel>-E<gt>B<title>(?I<string>?)
+
+If I<string> is specified, then it will be passed to the window
+manager for use as the title for I<$toplevel> (the window manager
+should display this string in I<$toplevel>'s title bar). In this
+case the method returns an empty string. If I<string> isn't
+specified then the method returns the current title for the
+I<$toplevel>. The title for a window defaults to its name.
+
+=item I<$toplevel>-E<gt>B<transient>(?I<master>?)
+
+If I<master> is specified, then the window manager is informed
+that I<$toplevel> is a transient window (e.g. pull-down menu) working
+on behalf of I<master> (where I<master> is
+a top-level window). Some window managers will use
+this information to manage I<$toplevel> specially. If I<master>
+is specified as an empty string then I<$toplevel> is marked as not
+being a transient window any more. If I<master> is specified,
+then the method returns an empty string. Otherwise the method
+returns the path name of I<$toplevel>'s current master, or an
+empty string if I<$toplevel> isn't currently a transient window.
+
+=item I<$toplevel>-E<gt>B<withdraw>
+
+Arranges for I<$toplevel> to be withdrawn from the screen. This
+causes the window to be unmapped and forgotten about by the window
+manager. If the window
+has never been mapped, then this method
+causes the window to be mapped in the withdrawn state. Not all
+window managers appear to know how to handle windows that are
+mapped in the withdrawn state.
+Note: it sometimes seems to be necessary to withdraw a
+window and then re-map it (e.g. with B<deiconify>) to get some
+window managers to pay attention to changes in window attributes
+such as group.
+
+=item I<$toplevel>-E<gt>B<wrapper>
+
+Returns the window id of the wrapper window in which Tk has placed
+I<$toplevel>. This is the id by which window manager will know
+I<$toplevel>, and so is appropriate place to add X properties.
+
+=back
+
+=head1 ICON SIZES
+
+The sizes of bitmaps/images that can be used as icons in this manner are platform
+and window manager dependant. Unix window managers are typically more tolerant
+than Win32. It is possible that coloured C<iconimage> icons may cause problems
+on some X window managers.
+
+=over 4
+
+=item * Win32
+
+C<iconimage> and C<iconbitmap> set the "large" icon, which should be
+32x32, it will automatically be scaled down to 16x16 for use as a small icon.
+Win32 ignores C<iconwin> requests.
+
+=item * KDE's "kwm"
+
+Accepts coloured C<iconimage> and black and white C<iconbitmap> but
+will scale either to a small (14x14?) icon. Kwm ignores C<iconwin>.
+
+=item * Sun's "olwm" or "olvwm"
+
+Honours C<iconwin> which will override C<iconimage> or C<iconbitmap>.
+Coloured images work.
+
+=item * Sun's CDE window manager
+
+Coloured images work. ...
+
+=back
+
+=head1 GEOMETRY MANAGEMENT
+
+By default a top-level window appears on the screen in its
+I<natural size>, which is the one determined internally by its
+widgets and geometry managers.
+If the natural size of a top-level window changes, then the window's size
+changes to match.
+A top-level window can be given a size other than its natural size in two ways.
+First, the user can resize the window manually using the facilities
+of the window manager, such as resize handles.
+Second, the application can request a particular size for a
+top-level window using the B<geometry> method.
+These two cases are handled identically by Tk; in either case,
+the requested size overrides the natural size.
+You can return the window to its natural by invoking B<geometry>
+with an empty I<geometry> string.
+
+Normally a top-level window can have any size from one pixel in each
+dimension up to the size of its screen.
+However, you can use the B<minsize> and B<maxsize> methods
+to limit the range of allowable sizes.
+The range set by B<minsize> and B<maxsize> applies to
+all forms of resizing, including the window's natural size as
+well as manual resizes and the B<geometry> method.
+You can also use the method B<resizable> to completely
+disable interactive resizing in one or both dimensions.
+
+=head1 GRIDDED GEOMETRY MANAGEMENT
+
+Gridded geometry management occurs when one of the widgets of an
+application supports a range of useful sizes.
+This occurs, for example, in a text editor where the scrollbars,
+menus, and other adornments are fixed in size but the edit widget
+can support any number of lines of text or characters per line.
+In this case, it is usually desirable to let the user specify the
+number of lines or characters-per-line, either with the
+B<geometry> method or by interactively resizing the window.
+In the case of text, and in other interesting cases also, only
+discrete sizes of the window make sense, such as integral numbers
+of lines and characters-per-line; arbitrary pixel sizes are not useful.
+
+Gridded geometry management provides support for this kind of
+application.
+Tk (and the window manager) assume that there is a grid of some
+sort within the application and that the application should be
+resized in terms of I<grid units> rather than pixels.
+Gridded geometry management is typically invoked by turning on
+the B<setGrid> option for a widget; it can also be invoked
+with the B<wmGrid> method or by calling B<Tk_SetGrid>.
+In each of these approaches the particular widget (or sometimes
+code in the application as a whole) specifies the relationship between
+integral grid sizes for the window and pixel sizes.
+To return to non-gridded geometry management, invoke
+B<grid> with empty argument strings.
+
+When gridded geometry management is enabled then all the dimensions specified
+in B<minsize>, B<maxsize>, and B<geometry> methods
+are treated as grid units rather than pixel units.
+Interactive resizing is also carried out in even numbers of grid units
+rather than pixels.
+
+=head1 BUGS
+
+Most existing window managers appear to have bugs that affect the
+operation of the B<wm> methods. For example, some changes won't
+take effect if the window is already active: the window will have
+to be withdrawn and de-iconified in order to make the change happen.
+
+=head1 SEE ALSO
+
+L<Tk::Widget|Tk::Widget>
+L<Tk::tixWm|Tk::tixWm>
+L<Tk::Mwm|Tk::Mwm>
+
+=head1 KEYWORDS
+
+aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/X.pm b/Master/tlpkg/tlperl/lib/Tk/X.pm
new file mode 100644
index 00000000000..f32ca93d325
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X.pm
@@ -0,0 +1,391 @@
+package Tk::X;
+
+use strict;
+use Carp;
+use vars qw($VERSION @EXPORT $AUTOLOAD);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/Xlib/X/X.pm#4 $
+use Tk qw($XS_VERSION);
+
+require Exporter;
+require DynaLoader;
+require AutoLoader;
+
+
+use base qw(Exporter DynaLoader);
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+@EXPORT = qw(
+ Above
+ AllTemporary
+ AllocAll
+ AllocNone
+ AllowExposures
+ AlreadyGrabbed
+ Always
+ AnyButton
+ AnyKey
+ AnyModifier
+ AnyPropertyType
+ ArcChord
+ ArcPieSlice
+ AsyncBoth
+ AsyncKeyboard
+ AsyncPointer
+ AutoRepeatModeDefault
+ AutoRepeatModeOff
+ AutoRepeatModeOn
+ BadAccess
+ BadAlloc
+ BadAtom
+ BadColor
+ BadCursor
+ BadDrawable
+ BadFont
+ BadGC
+ BadIDChoice
+ BadImplementation
+ BadLength
+ BadMatch
+ BadName
+ BadPixmap
+ BadRequest
+ BadValue
+ BadWindow
+ Below
+ BottomIf
+ Button1
+ Button1Mask
+ Button1MotionMask
+ Button2
+ Button2Mask
+ Button2MotionMask
+ Button3
+ Button3Mask
+ Button3MotionMask
+ Button4
+ Button4Mask
+ Button4MotionMask
+ Button5
+ Button5Mask
+ Button5MotionMask
+ ButtonMotionMask
+ ButtonPress
+ ButtonPressMask
+ ButtonRelease
+ ButtonReleaseMask
+ CWBackPixel
+ CWBackPixmap
+ CWBackingPixel
+ CWBackingPlanes
+ CWBackingStore
+ CWBitGravity
+ CWBorderPixel
+ CWBorderPixmap
+ CWBorderWidth
+ CWColormap
+ CWCursor
+ CWDontPropagate
+ CWEventMask
+ CWHeight
+ CWOverrideRedirect
+ CWSaveUnder
+ CWSibling
+ CWStackMode
+ CWWidth
+ CWWinGravity
+ CWX
+ CWY
+ CapButt
+ CapNotLast
+ CapProjecting
+ CapRound
+ CenterGravity
+ CirculateNotify
+ CirculateRequest
+ ClientMessage
+ ClipByChildren
+ ColormapChangeMask
+ ColormapInstalled
+ ColormapNotify
+ ColormapUninstalled
+ Complex
+ ConfigureNotify
+ ConfigureRequest
+ ControlMapIndex
+ ControlMask
+ Convex
+ CoordModeOrigin
+ CoordModePrevious
+ CopyFromParent
+ CreateNotify
+ CurrentTime
+ CursorShape
+ DefaultBlanking
+ DefaultExposures
+ DestroyAll
+ DestroyNotify
+ DirectColor
+ DisableAccess
+ DisableScreenInterval
+ DisableScreenSaver
+ DoBlue
+ DoGreen
+ DoRed
+ DontAllowExposures
+ DontPreferBlanking
+ EastGravity
+ EnableAccess
+ EnterNotify
+ EnterWindowMask
+ EvenOddRule
+ Expose
+ ExposureMask
+ FamilyChaos
+ FamilyDECnet
+ FamilyInternet
+ FillOpaqueStippled
+ FillSolid
+ FillStippled
+ FillTiled
+ FirstExtensionError
+ FocusChangeMask
+ FocusIn
+ FocusOut
+ FontChange
+ FontLeftToRight
+ FontRightToLeft
+ ForgetGravity
+ GCArcMode
+ GCBackground
+ GCCapStyle
+ GCClipMask
+ GCClipXOrigin
+ GCClipYOrigin
+ GCDashList
+ GCDashOffset
+ GCFillRule
+ GCFillStyle
+ GCFont
+ GCForeground
+ GCFunction
+ GCGraphicsExposures
+ GCJoinStyle
+ GCLastBit
+ GCLineStyle
+ GCLineWidth
+ GCPlaneMask
+ GCStipple
+ GCSubwindowMode
+ GCTile
+ GCTileStipXOrigin
+ GCTileStipYOrigin
+ GXand
+ GXandInverted
+ GXandReverse
+ GXclear
+ GXcopy
+ GXcopyInverted
+ GXequiv
+ GXinvert
+ GXnand
+ GXnoop
+ GXnor
+ GXor
+ GXorInverted
+ GXorReverse
+ GXset
+ GXxor
+ GrabFrozen
+ GrabInvalidTime
+ GrabModeAsync
+ GrabModeSync
+ GrabNotViewable
+ GrabSuccess
+ GraphicsExpose
+ GravityNotify
+ GrayScale
+ HostDelete
+ HostInsert
+ IncludeInferiors
+ InputFocus
+ InputOnly
+ InputOutput
+ IsUnmapped
+ IsUnviewable
+ IsViewable
+ JoinBevel
+ JoinMiter
+ JoinRound
+ KBAutoRepeatMode
+ KBBellDuration
+ KBBellPercent
+ KBBellPitch
+ KBKey
+ KBKeyClickPercent
+ KBLed
+ KBLedMode
+ KeyPress
+ KeyPressMask
+ KeyRelease
+ KeyReleaseMask
+ KeymapNotify
+ KeymapStateMask
+ LASTEvent
+ LSBFirst
+ LastExtensionError
+ LeaveNotify
+ LeaveWindowMask
+ LedModeOff
+ LedModeOn
+ LineDoubleDash
+ LineOnOffDash
+ LineSolid
+ LockMapIndex
+ LockMask
+ LowerHighest
+ MSBFirst
+ MapNotify
+ MapRequest
+ MappingBusy
+ MappingFailed
+ MappingKeyboard
+ MappingModifier
+ MappingNotify
+ MappingPointer
+ MappingSuccess
+ Mod1MapIndex
+ Mod1Mask
+ Mod2MapIndex
+ Mod2Mask
+ Mod3MapIndex
+ Mod3Mask
+ Mod4MapIndex
+ Mod4Mask
+ Mod5MapIndex
+ Mod5Mask
+ MotionNotify
+ NoEventMask
+ NoExpose
+ NoSymbol
+ Nonconvex
+ None
+ NorthEastGravity
+ NorthGravity
+ NorthWestGravity
+ NotUseful
+ NotifyAncestor
+ NotifyDetailNone
+ NotifyGrab
+ NotifyHint
+ NotifyInferior
+ NotifyNonlinear
+ NotifyNonlinearVirtual
+ NotifyNormal
+ NotifyPointer
+ NotifyPointerRoot
+ NotifyUngrab
+ NotifyVirtual
+ NotifyWhileGrabbed
+ Opposite
+ OwnerGrabButtonMask
+ ParentRelative
+ PlaceOnBottom
+ PlaceOnTop
+ PointerMotionHintMask
+ PointerMotionMask
+ PointerRoot
+ PointerWindow
+ PreferBlanking
+ PropModeAppend
+ PropModePrepend
+ PropModeReplace
+ PropertyChangeMask
+ PropertyDelete
+ PropertyNewValue
+ PropertyNotify
+ PseudoColor
+ RaiseLowest
+ ReparentNotify
+ ReplayKeyboard
+ ReplayPointer
+ ResizeRedirectMask
+ ResizeRequest
+ RetainPermanent
+ RetainTemporary
+ RevertToNone
+ RevertToParent
+ RevertToPointerRoot
+ ScreenSaverActive
+ ScreenSaverReset
+ SelectionClear
+ SelectionNotify
+ SelectionRequest
+ SetModeDelete
+ SetModeInsert
+ ShiftMapIndex
+ ShiftMask
+ SouthEastGravity
+ SouthGravity
+ SouthWestGravity
+ StaticColor
+ StaticGravity
+ StaticGray
+ StippleShape
+ StructureNotifyMask
+ SubstructureNotifyMask
+ SubstructureRedirectMask
+ Success
+ SyncBoth
+ SyncKeyboard
+ SyncPointer
+ TileShape
+ TopIf
+ TrueColor
+ UnmapGravity
+ UnmapNotify
+ Unsorted
+ VisibilityChangeMask
+ VisibilityFullyObscured
+ VisibilityNotify
+ VisibilityPartiallyObscured
+ VisibilityUnobscured
+ WestGravity
+ WhenMapped
+ WindingRule
+ XYBitmap
+ XYPixmap
+ X_H
+ X_PROTOCOL
+ X_PROTOCOL_REVISION
+ YSorted
+ YXBanded
+ YXSorted
+ ZPixmap
+);
+
+sub AUTOLOAD {
+ # This AUTOLOAD is used to 'autoload' constants from the constant()
+ # XS function. If a constant is not found then control is passed
+ # to the AUTOLOAD in AutoLoader.
+
+ my $constname;
+ ($constname = $AUTOLOAD) =~ s/.*:://;
+ my $val = constant($constname, @_ ? $_[0] : 0);
+ if ($! != 0) {
+ if ($! =~ /Invalid/) {
+ $AutoLoader::AUTOLOAD = $AUTOLOAD;
+ goto &AutoLoader::AUTOLOAD;
+ }
+ else {
+ croak "Your vendor has not defined X macro $constname";
+ }
+ }
+ eval "sub $AUTOLOAD { $val }";
+ goto &$AUTOLOAD;
+}
+
+bootstrap Tk::X;
+
+1;
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/X.pod b/Master/tlpkg/tlperl/lib/Tk/X.pod
new file mode 100644
index 00000000000..e6c7614a72c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X.pod
@@ -0,0 +1,373 @@
+
+=head1 NAME
+
+Tk::X - Perl extension for Xlib constants.
+
+=for pm Xlib/X/X.pm
+
+=for category Other Modules and Languages
+
+=head1 SYNOPSIS
+
+ use Tk::X;
+
+=head1 DESCRIPTION
+
+A module generated by h2xs. It exists to export Xlib #define type
+constants for possible use with Tk::Xlib.
+
+=head1 Exported constants
+
+ Above
+ AllTemporary
+ AllocAll
+ AllocNone
+ AllowExposures
+ AlreadyGrabbed
+ Always
+ AnyButton
+ AnyKey
+ AnyModifier
+ AnyPropertyType
+ ArcChord
+ ArcPieSlice
+ AsyncBoth
+ AsyncKeyboard
+ AsyncPointer
+ AutoRepeatModeDefault
+ AutoRepeatModeOff
+ AutoRepeatModeOn
+ BadAccess
+ BadAlloc
+ BadAtom
+ BadColor
+ BadCursor
+ BadDrawable
+ BadFont
+ BadGC
+ BadIDChoice
+ BadImplementation
+ BadLength
+ BadMatch
+ BadName
+ BadPixmap
+ BadRequest
+ BadValue
+ BadWindow
+ Below
+ BottomIf
+ Button1
+ Button1Mask
+ Button1MotionMask
+ Button2
+ Button2Mask
+ Button2MotionMask
+ Button3
+ Button3Mask
+ Button3MotionMask
+ Button4
+ Button4Mask
+ Button4MotionMask
+ Button5
+ Button5Mask
+ Button5MotionMask
+ ButtonMotionMask
+ ButtonPress
+ ButtonPressMask
+ ButtonRelease
+ ButtonReleaseMask
+ CWBackPixel
+ CWBackPixmap
+ CWBackingPixel
+ CWBackingPlanes
+ CWBackingStore
+ CWBitGravity
+ CWBorderPixel
+ CWBorderPixmap
+ CWBorderWidth
+ CWColormap
+ CWCursor
+ CWDontPropagate
+ CWEventMask
+ CWHeight
+ CWOverrideRedirect
+ CWSaveUnder
+ CWSibling
+ CWStackMode
+ CWWidth
+ CWWinGravity
+ CWX
+ CWY
+ CapButt
+ CapNotLast
+ CapProjecting
+ CapRound
+ CenterGravity
+ CirculateNotify
+ CirculateRequest
+ ClientMessage
+ ClipByChildren
+ ColormapChangeMask
+ ColormapInstalled
+ ColormapNotify
+ ColormapUninstalled
+ Complex
+ ConfigureNotify
+ ConfigureRequest
+ ControlMapIndex
+ ControlMask
+ Convex
+ CoordModeOrigin
+ CoordModePrevious
+ CopyFromParent
+ CreateNotify
+ CurrentTime
+ CursorShape
+ DefaultBlanking
+ DefaultExposures
+ DestroyAll
+ DestroyNotify
+ DirectColor
+ DisableAccess
+ DisableScreenInterval
+ DisableScreenSaver
+ DoBlue
+ DoGreen
+ DoRed
+ DontAllowExposures
+ DontPreferBlanking
+ EastGravity
+ EnableAccess
+ EnterNotify
+ EnterWindowMask
+ EvenOddRule
+ Expose
+ ExposureMask
+ FamilyChaos
+ FamilyDECnet
+ FamilyInternet
+ FillOpaqueStippled
+ FillSolid
+ FillStippled
+ FillTiled
+ FirstExtensionError
+ FocusChangeMask
+ FocusIn
+ FocusOut
+ FontChange
+ FontLeftToRight
+ FontRightToLeft
+ ForgetGravity
+ GCArcMode
+ GCBackground
+ GCCapStyle
+ GCClipMask
+ GCClipXOrigin
+ GCClipYOrigin
+ GCDashList
+ GCDashOffset
+ GCFillRule
+ GCFillStyle
+ GCFont
+ GCForeground
+ GCFunction
+ GCGraphicsExposures
+ GCJoinStyle
+ GCLastBit
+ GCLineStyle
+ GCLineWidth
+ GCPlaneMask
+ GCStipple
+ GCSubwindowMode
+ GCTile
+ GCTileStipXOrigin
+ GCTileStipYOrigin
+ GXand
+ GXandInverted
+ GXandReverse
+ GXclear
+ GXcopy
+ GXcopyInverted
+ GXequiv
+ GXinvert
+ GXnand
+ GXnoop
+ GXnor
+ GXor
+ GXorInverted
+ GXorReverse
+ GXset
+ GXxor
+ GrabFrozen
+ GrabInvalidTime
+ GrabModeAsync
+ GrabModeSync
+ GrabNotViewable
+ GrabSuccess
+ GraphicsExpose
+ GravityNotify
+ GrayScale
+ HostDelete
+ HostInsert
+ IncludeInferiors
+ InputFocus
+ InputOnly
+ InputOutput
+ IsUnmapped
+ IsUnviewable
+ IsViewable
+ JoinBevel
+ JoinMiter
+ JoinRound
+ KBAutoRepeatMode
+ KBBellDuration
+ KBBellPercent
+ KBBellPitch
+ KBKey
+ KBKeyClickPercent
+ KBLed
+ KBLedMode
+ KeyPress
+ KeyPressMask
+ KeyRelease
+ KeyReleaseMask
+ KeymapNotify
+ KeymapStateMask
+ LASTEvent
+ LSBFirst
+ LastExtensionError
+ LeaveNotify
+ LeaveWindowMask
+ LedModeOff
+ LedModeOn
+ LineDoubleDash
+ LineOnOffDash
+ LineSolid
+ LockMapIndex
+ LockMask
+ LowerHighest
+ MSBFirst
+ MapNotify
+ MapRequest
+ MappingBusy
+ MappingFailed
+ MappingKeyboard
+ MappingModifier
+ MappingNotify
+ MappingPointer
+ MappingSuccess
+ Mod1MapIndex
+ Mod1Mask
+ Mod2MapIndex
+ Mod2Mask
+ Mod3MapIndex
+ Mod3Mask
+ Mod4MapIndex
+ Mod4Mask
+ Mod5MapIndex
+ Mod5Mask
+ MotionNotify
+ NoEventMask
+ NoExpose
+ NoSymbol
+ Nonconvex
+ None
+ NorthEastGravity
+ NorthGravity
+ NorthWestGravity
+ NotUseful
+ NotifyAncestor
+ NotifyDetailNone
+ NotifyGrab
+ NotifyHint
+ NotifyInferior
+ NotifyNonlinear
+ NotifyNonlinearVirtual
+ NotifyNormal
+ NotifyPointer
+ NotifyPointerRoot
+ NotifyUngrab
+ NotifyVirtual
+ NotifyWhileGrabbed
+ Opposite
+ OwnerGrabButtonMask
+ ParentRelative
+ PlaceOnBottom
+ PlaceOnTop
+ PointerMotionHintMask
+ PointerMotionMask
+ PointerRoot
+ PointerWindow
+ PreferBlanking
+ PropModeAppend
+ PropModePrepend
+ PropModeReplace
+ PropertyChangeMask
+ PropertyDelete
+ PropertyNewValue
+ PropertyNotify
+ PseudoColor
+ RaiseLowest
+ ReparentNotify
+ ReplayKeyboard
+ ReplayPointer
+ ResizeRedirectMask
+ ResizeRequest
+ RetainPermanent
+ RetainTemporary
+ RevertToNone
+ RevertToParent
+ RevertToPointerRoot
+ ScreenSaverActive
+ ScreenSaverReset
+ SelectionClear
+ SelectionNotify
+ SelectionRequest
+ SetModeDelete
+ SetModeInsert
+ ShiftMapIndex
+ ShiftMask
+ SouthEastGravity
+ SouthGravity
+ SouthWestGravity
+ StaticColor
+ StaticGravity
+ StaticGray
+ StippleShape
+ StructureNotifyMask
+ SubstructureNotifyMask
+ SubstructureRedirectMask
+ Success
+ SyncBoth
+ SyncKeyboard
+ SyncPointer
+ TileShape
+ TopIf
+ TrueColor
+ UnmapGravity
+ UnmapNotify
+ Unsorted
+ VisibilityChangeMask
+ VisibilityFullyObscured
+ VisibilityNotify
+ VisibilityPartiallyObscured
+ VisibilityUnobscured
+ WestGravity
+ WhenMapped
+ WindingRule
+ XYBitmap
+ XYPixmap
+ X_H
+ X_PROTOCOL
+ X_PROTOCOL_REVISION
+ YSorted
+ YXBanded
+ YXSorted
+ ZPixmap
+
+=head1 AUTHOR
+
+Nick Ing-Simmons ran h2xs ...
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/X.h b/Master/tlpkg/tlperl/lib/Tk/X11/X.h
new file mode 100644
index 00000000000..95db07f903f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/X.h
@@ -0,0 +1,677 @@
+/*
+ * $XConsortium: X.h,v 1.66 88/09/06 15:55:56 jim Exp $
+ */
+
+/* Definitions for the X window system likely to be used by applications */
+
+#ifndef X_H
+#define X_H
+
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+#define X_PROTOCOL 11 /* current protocol version */
+#define X_PROTOCOL_REVISION 0 /* current minor version */
+
+#if defined(MAC_TCL) || defined(MAC_OSX_TK)
+# define Cursor XCursor
+# define Region XRegion
+#endif
+
+/* Resources */
+
+#ifdef _WIN64
+typedef __int64 XID;
+#else
+typedef unsigned long XID;
+#endif
+
+typedef XID Window;
+typedef XID Drawable;
+typedef XID Font;
+typedef XID Pixmap;
+typedef XID Cursor;
+typedef XID Colormap;
+typedef XID GContext;
+typedef XID KeySym;
+
+typedef unsigned long Mask;
+
+typedef unsigned long Atom;
+
+typedef unsigned long VisualID;
+
+typedef unsigned long Time;
+
+typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs
+ * to pack 3 bytes into the keyCode field in
+ * the XEvent. In the real X.h, a KeyCode is
+ * defined as a short, which wouldn't be big
+ * enough. */
+
+/*****************************************************************
+ * RESERVED RESOURCE AND CONSTANT DEFINITIONS
+ *****************************************************************/
+
+#define None 0L /* universal null resource or null atom */
+
+#define ParentRelative 1L /* background pixmap in CreateWindow
+ and ChangeWindowAttributes */
+
+#define CopyFromParent 0L /* border pixmap in CreateWindow
+ and ChangeWindowAttributes
+ special VisualID and special window
+ class passed to CreateWindow */
+
+#define PointerWindow 0L /* destination window in SendEvent */
+#define InputFocus 1L /* destination window in SendEvent */
+
+#define PointerRoot 1L /* focus window in SetInputFocus */
+
+#define AnyPropertyType 0L /* special Atom, passed to GetProperty */
+
+#define AnyKey 0L /* special Key Code, passed to GrabKey */
+
+#define AnyButton 0L /* special Button Code, passed to GrabButton */
+
+#define AllTemporary 0L /* special Resource ID passed to KillClient */
+
+#define CurrentTime 0L /* special Time */
+
+#define NoSymbol 0L /* special KeySym */
+
+/*****************************************************************
+ * EVENT DEFINITIONS
+ *****************************************************************/
+
+/* Input Event Masks. Used as event-mask window attribute and as arguments
+ to Grab requests. Not to be confused with event names. */
+
+#define NoEventMask 0L
+#define KeyPressMask (1L<<0)
+#define KeyReleaseMask (1L<<1)
+#define ButtonPressMask (1L<<2)
+#define ButtonReleaseMask (1L<<3)
+#define EnterWindowMask (1L<<4)
+#define LeaveWindowMask (1L<<5)
+#define PointerMotionMask (1L<<6)
+#define PointerMotionHintMask (1L<<7)
+#define Button1MotionMask (1L<<8)
+#define Button2MotionMask (1L<<9)
+#define Button3MotionMask (1L<<10)
+#define Button4MotionMask (1L<<11)
+#define Button5MotionMask (1L<<12)
+#define ButtonMotionMask (1L<<13)
+#define KeymapStateMask (1L<<14)
+#define ExposureMask (1L<<15)
+#define VisibilityChangeMask (1L<<16)
+#define StructureNotifyMask (1L<<17)
+#define ResizeRedirectMask (1L<<18)
+#define SubstructureNotifyMask (1L<<19)
+#define SubstructureRedirectMask (1L<<20)
+#define FocusChangeMask (1L<<21)
+#define PropertyChangeMask (1L<<22)
+#define ColormapChangeMask (1L<<23)
+#define OwnerGrabButtonMask (1L<<24)
+
+/* Event names. Used in "type" field in XEvent structures. Not to be
+confused with event masks above. They start from 2 because 0 and 1
+are reserved in the protocol for errors and replies. */
+
+#define KeyPress 2
+#define KeyRelease 3
+#define ButtonPress 4
+#define ButtonRelease 5
+#define MotionNotify 6
+#define EnterNotify 7
+#define LeaveNotify 8
+#define FocusIn 9
+#define FocusOut 10
+#define KeymapNotify 11
+#define Expose 12
+#define GraphicsExpose 13
+#define NoExpose 14
+#define VisibilityNotify 15
+#define CreateNotify 16
+#define DestroyNotify 17
+#define UnmapNotify 18
+#define MapNotify 19
+#define MapRequest 20
+#define ReparentNotify 21
+#define ConfigureNotify 22
+#define ConfigureRequest 23
+#define GravityNotify 24
+#define ResizeRequest 25
+#define CirculateNotify 26
+#define CirculateRequest 27
+#define PropertyNotify 28
+#define SelectionClear 29
+#define SelectionRequest 30
+#define SelectionNotify 31
+#define ColormapNotify 32
+#define ClientMessage 33
+#define MappingNotify 34
+#define LASTEvent 35 /* must be bigger than any event # */
+
+
+/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
+ state in various key-, mouse-, and button-related events. */
+
+#define ShiftMask (1<<0)
+#define LockMask (1<<1)
+#define ControlMask (1<<2)
+#define Mod1Mask (1<<3)
+#define Mod2Mask (1<<4)
+#define Mod3Mask (1<<5)
+#define Mod4Mask (1<<6)
+#define Mod5Mask (1<<7)
+
+/* modifier names. Used to build a SetModifierMapping request or
+ to read a GetModifierMapping request. These correspond to the
+ masks defined above. */
+#define ShiftMapIndex 0
+#define LockMapIndex 1
+#define ControlMapIndex 2
+#define Mod1MapIndex 3
+#define Mod2MapIndex 4
+#define Mod3MapIndex 5
+#define Mod4MapIndex 6
+#define Mod5MapIndex 7
+
+
+/* button masks. Used in same manner as Key masks above. Not to be confused
+ with button names below. */
+
+#define Button1Mask (1<<8)
+#define Button2Mask (1<<9)
+#define Button3Mask (1<<10)
+#define Button4Mask (1<<11)
+#define Button5Mask (1<<12)
+
+#define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
+
+
+/* button names. Used as arguments to GrabButton and as detail in ButtonPress
+ and ButtonRelease events. Not to be confused with button masks above.
+ Note that 0 is already defined above as "AnyButton". */
+
+#define Button1 1
+#define Button2 2
+#define Button3 3
+#define Button4 4
+#define Button5 5
+
+/* Notify modes */
+
+#define NotifyNormal 0
+#define NotifyGrab 1
+#define NotifyUngrab 2
+#define NotifyWhileGrabbed 3
+
+#define NotifyHint 1 /* for MotionNotify events */
+
+/* Notify detail */
+
+#define NotifyAncestor 0
+#define NotifyVirtual 1
+#define NotifyInferior 2
+#define NotifyNonlinear 3
+#define NotifyNonlinearVirtual 4
+#define NotifyPointer 5
+#define NotifyPointerRoot 6
+#define NotifyDetailNone 7
+
+/* Visibility notify */
+
+#define VisibilityUnobscured 0
+#define VisibilityPartiallyObscured 1
+#define VisibilityFullyObscured 2
+
+/* Circulation request */
+
+#define PlaceOnTop 0
+#define PlaceOnBottom 1
+
+/* protocol families */
+
+#define FamilyInternet 0
+#define FamilyDECnet 1
+#define FamilyChaos 2
+
+/* Property notification */
+
+#define PropertyNewValue 0
+#define PropertyDelete 1
+
+/* Color Map notification */
+
+#define ColormapUninstalled 0
+#define ColormapInstalled 1
+
+/* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
+
+#define GrabModeSync 0
+#define GrabModeAsync 1
+
+/* GrabPointer, GrabKeyboard reply status */
+
+#define GrabSuccess 0
+#define AlreadyGrabbed 1
+#define GrabInvalidTime 2
+#define GrabNotViewable 3
+#define GrabFrozen 4
+
+/* AllowEvents modes */
+
+#define AsyncPointer 0
+#define SyncPointer 1
+#define ReplayPointer 2
+#define AsyncKeyboard 3
+#define SyncKeyboard 4
+#define ReplayKeyboard 5
+#define AsyncBoth 6
+#define SyncBoth 7
+
+/* Used in SetInputFocus, GetInputFocus */
+
+#define RevertToNone (int)None
+#define RevertToPointerRoot (int)PointerRoot
+#define RevertToParent 2
+
+/*****************************************************************
+ * ERROR CODES
+ *****************************************************************/
+
+#define Success 0 /* everything's okay */
+#define BadRequest 1 /* bad request code */
+#define BadValue 2 /* int parameter out of range */
+#define BadWindow 3 /* parameter not a Window */
+#define BadPixmap 4 /* parameter not a Pixmap */
+#define BadAtom 5 /* parameter not an Atom */
+#define BadCursor 6 /* parameter not a Cursor */
+#define BadFont 7 /* parameter not a Font */
+#define BadMatch 8 /* parameter mismatch */
+#define BadDrawable 9 /* parameter not a Pixmap or Window */
+#define BadAccess 10 /* depending on context:
+ - key/button already grabbed
+ - attempt to free an illegal
+ cmap entry
+ - attempt to store into a read-only
+ color map entry.
+ - attempt to modify the access control
+ list from other than the local host.
+ */
+#define BadAlloc 11 /* insufficient resources */
+#define BadColor 12 /* no such colormap */
+#define BadGC 13 /* parameter not a GC */
+#define BadIDChoice 14 /* choice not in range or already used */
+#define BadName 15 /* font or color name doesn't exist */
+#define BadLength 16 /* Request length incorrect */
+#define BadImplementation 17 /* server is defective */
+
+#define FirstExtensionError 128
+#define LastExtensionError 255
+
+/*****************************************************************
+ * WINDOW DEFINITIONS
+ *****************************************************************/
+
+/* Window classes used by CreateWindow */
+/* Note that CopyFromParent is already defined as 0 above */
+
+#define InputOutput 1
+#define InputOnly 2
+
+/* Window attributes for CreateWindow and ChangeWindowAttributes */
+
+#define CWBackPixmap (1L<<0)
+#define CWBackPixel (1L<<1)
+#define CWBorderPixmap (1L<<2)
+#define CWBorderPixel (1L<<3)
+#define CWBitGravity (1L<<4)
+#define CWWinGravity (1L<<5)
+#define CWBackingStore (1L<<6)
+#define CWBackingPlanes (1L<<7)
+#define CWBackingPixel (1L<<8)
+#define CWOverrideRedirect (1L<<9)
+#define CWSaveUnder (1L<<10)
+#define CWEventMask (1L<<11)
+#define CWDontPropagate (1L<<12)
+#define CWColormap (1L<<13)
+#define CWCursor (1L<<14)
+
+/* ConfigureWindow structure */
+
+#define CWX (1<<0)
+#define CWY (1<<1)
+#define CWWidth (1<<2)
+#define CWHeight (1<<3)
+#define CWBorderWidth (1<<4)
+#define CWSibling (1<<5)
+#define CWStackMode (1<<6)
+
+
+/* Bit Gravity */
+
+#define ForgetGravity 0
+#define NorthWestGravity 1
+#define NorthGravity 2
+#define NorthEastGravity 3
+#define WestGravity 4
+#define CenterGravity 5
+#define EastGravity 6
+#define SouthWestGravity 7
+#define SouthGravity 8
+#define SouthEastGravity 9
+#define StaticGravity 10
+
+/* Window gravity + bit gravity above */
+
+#define UnmapGravity 0
+
+/* Used in CreateWindow for backing-store hint */
+
+#define NotUseful 0
+#define WhenMapped 1
+#define Always 2
+
+/* Used in GetWindowAttributes reply */
+
+#define IsUnmapped 0
+#define IsUnviewable 1
+#define IsViewable 2
+
+/* Used in ChangeSaveSet */
+
+#define SetModeInsert 0
+#define SetModeDelete 1
+
+/* Used in ChangeCloseDownMode */
+
+#define DestroyAll 0
+#define RetainPermanent 1
+#define RetainTemporary 2
+
+/* Window stacking method (in configureWindow) */
+
+#define Above 0
+#define Below 1
+#define TopIf 2
+#define BottomIf 3
+#define Opposite 4
+
+/* Circulation direction */
+
+#define RaiseLowest 0
+#define LowerHighest 1
+
+/* Property modes */
+
+#define PropModeReplace 0
+#define PropModePrepend 1
+#define PropModeAppend 2
+
+/*****************************************************************
+ * GRAPHICS DEFINITIONS
+ *****************************************************************/
+
+/* graphics functions, as in GC.alu */
+
+#define GXclear 0x0 /* 0 */
+#define GXand 0x1 /* src AND dst */
+#define GXandReverse 0x2 /* src AND NOT dst */
+#define GXcopy 0x3 /* src */
+#define GXandInverted 0x4 /* NOT src AND dst */
+#define GXnoop 0x5 /* dst */
+#define GXxor 0x6 /* src XOR dst */
+#define GXor 0x7 /* src OR dst */
+#define GXnor 0x8 /* NOT src AND NOT dst */
+#define GXequiv 0x9 /* NOT src XOR dst */
+#define GXinvert 0xa /* NOT dst */
+#define GXorReverse 0xb /* src OR NOT dst */
+#define GXcopyInverted 0xc /* NOT src */
+#define GXorInverted 0xd /* NOT src OR dst */
+#define GXnand 0xe /* NOT src OR NOT dst */
+#define GXset 0xf /* 1 */
+
+/* LineStyle */
+
+#define LineSolid 0
+#define LineOnOffDash 1
+#define LineDoubleDash 2
+
+/* capStyle */
+
+#define CapNotLast 0
+#define CapButt 1
+#define CapRound 2
+#define CapProjecting 3
+
+/* joinStyle */
+
+#define JoinMiter 0
+#define JoinRound 1
+#define JoinBevel 2
+
+/* fillStyle */
+
+#define FillSolid 0
+#define FillTiled 1
+#define FillStippled 2
+#define FillOpaqueStippled 3
+
+/* fillRule */
+
+#define EvenOddRule 0
+#define WindingRule 1
+
+/* subwindow mode */
+
+#define ClipByChildren 0
+#define IncludeInferiors 1
+
+/* SetClipRectangles ordering */
+
+#define Unsorted 0
+#define YSorted 1
+#define YXSorted 2
+#define YXBanded 3
+
+/* CoordinateMode for drawing routines */
+
+#define CoordModeOrigin 0 /* relative to the origin */
+#define CoordModePrevious 1 /* relative to previous point */
+
+/* Polygon shapes */
+
+#define Complex 0 /* paths may intersect */
+#define Nonconvex 1 /* no paths intersect, but not convex */
+#define Convex 2 /* wholly convex */
+
+/* Arc modes for PolyFillArc */
+
+#define ArcChord 0 /* join endpoints of arc */
+#define ArcPieSlice 1 /* join endpoints to center of arc */
+
+/* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
+ GC.stateChanges */
+
+#define GCFunction (1L<<0)
+#define GCPlaneMask (1L<<1)
+#define GCForeground (1L<<2)
+#define GCBackground (1L<<3)
+#define GCLineWidth (1L<<4)
+#define GCLineStyle (1L<<5)
+#define GCCapStyle (1L<<6)
+#define GCJoinStyle (1L<<7)
+#define GCFillStyle (1L<<8)
+#define GCFillRule (1L<<9)
+#define GCTile (1L<<10)
+#define GCStipple (1L<<11)
+#define GCTileStipXOrigin (1L<<12)
+#define GCTileStipYOrigin (1L<<13)
+#define GCFont (1L<<14)
+#define GCSubwindowMode (1L<<15)
+#define GCGraphicsExposures (1L<<16)
+#define GCClipXOrigin (1L<<17)
+#define GCClipYOrigin (1L<<18)
+#define GCClipMask (1L<<19)
+#define GCDashOffset (1L<<20)
+#define GCDashList (1L<<21)
+#define GCArcMode (1L<<22)
+
+#define GCLastBit 22
+/*****************************************************************
+ * FONTS
+ *****************************************************************/
+
+/* used in QueryFont -- draw direction */
+
+#define FontLeftToRight 0
+#define FontRightToLeft 1
+
+#define FontChange 255
+
+/*****************************************************************
+ * IMAGING
+ *****************************************************************/
+
+/* ImageFormat -- PutImage, GetImage */
+
+#define XYBitmap 0 /* depth 1, XYFormat */
+#define XYPixmap 1 /* depth == drawable depth */
+#define ZPixmap 2 /* depth == drawable depth */
+
+/*****************************************************************
+ * COLOR MAP STUFF
+ *****************************************************************/
+
+/* For CreateColormap */
+
+#define AllocNone 0 /* create map with no entries */
+#define AllocAll 1 /* allocate entire map writeable */
+
+
+/* Flags used in StoreNamedColor, StoreColors */
+
+#define DoRed (1<<0)
+#define DoGreen (1<<1)
+#define DoBlue (1<<2)
+
+/*****************************************************************
+ * CURSOR STUFF
+ *****************************************************************/
+
+/* QueryBestSize Class */
+
+#define CursorShape 0 /* largest size that can be displayed */
+#define TileShape 1 /* size tiled fastest */
+#define StippleShape 2 /* size stippled fastest */
+
+/*****************************************************************
+ * KEYBOARD/POINTER STUFF
+ *****************************************************************/
+
+#define AutoRepeatModeOff 0
+#define AutoRepeatModeOn 1
+#define AutoRepeatModeDefault 2
+
+#define LedModeOff 0
+#define LedModeOn 1
+
+/* masks for ChangeKeyboardControl */
+
+#define KBKeyClickPercent (1L<<0)
+#define KBBellPercent (1L<<1)
+#define KBBellPitch (1L<<2)
+#define KBBellDuration (1L<<3)
+#define KBLed (1L<<4)
+#define KBLedMode (1L<<5)
+#define KBKey (1L<<6)
+#define KBAutoRepeatMode (1L<<7)
+
+#define MappingSuccess 0
+#define MappingBusy 1
+#define MappingFailed 2
+
+#define MappingModifier 0
+#define MappingKeyboard 1
+#define MappingPointer 2
+
+/*****************************************************************
+ * SCREEN SAVER STUFF
+ *****************************************************************/
+
+#define DontPreferBlanking 0
+#define PreferBlanking 1
+#define DefaultBlanking 2
+
+#define DisableScreenSaver 0
+#define DisableScreenInterval 0
+
+#define DontAllowExposures 0
+#define AllowExposures 1
+#define DefaultExposures 2
+
+/* for ForceScreenSaver */
+
+#define ScreenSaverReset 0
+#define ScreenSaverActive 1
+
+/*****************************************************************
+ * HOSTS AND CONNECTIONS
+ *****************************************************************/
+
+/* for ChangeHosts */
+
+#define HostInsert 0
+#define HostDelete 1
+
+/* for ChangeAccessControl */
+
+#define EnableAccess 1
+#define DisableAccess 0
+
+/* Display classes used in opening the connection
+ * Note that the statically allocated ones are even numbered and the
+ * dynamically changeable ones are odd numbered */
+
+#define StaticGray 0
+#define GrayScale 1
+#define StaticColor 2
+#define PseudoColor 3
+#define TrueColor 4
+#define DirectColor 5
+
+
+/* Byte order used in imageByteOrder and bitmapBitOrder */
+
+#define LSBFirst 0
+#define MSBFirst 1
+
+#if defined(MAC_TCL) || defined(MAC_OSX_TK)
+# undef Cursor
+# undef Region
+#endif
+
+#endif /* X_H */
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/Xatom.h b/Master/tlpkg/tlperl/lib/Tk/X11/Xatom.h
new file mode 100644
index 00000000000..485a4236db8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/Xatom.h
@@ -0,0 +1,79 @@
+#ifndef XATOM_H
+#define XATOM_H 1
+
+/* THIS IS A GENERATED FILE
+ *
+ * Do not change! Changing this file implies a protocol change!
+ */
+
+#define XA_PRIMARY ((Atom) 1)
+#define XA_SECONDARY ((Atom) 2)
+#define XA_ARC ((Atom) 3)
+#define XA_ATOM ((Atom) 4)
+#define XA_BITMAP ((Atom) 5)
+#define XA_CARDINAL ((Atom) 6)
+#define XA_COLORMAP ((Atom) 7)
+#define XA_CURSOR ((Atom) 8)
+#define XA_CUT_BUFFER0 ((Atom) 9)
+#define XA_CUT_BUFFER1 ((Atom) 10)
+#define XA_CUT_BUFFER2 ((Atom) 11)
+#define XA_CUT_BUFFER3 ((Atom) 12)
+#define XA_CUT_BUFFER4 ((Atom) 13)
+#define XA_CUT_BUFFER5 ((Atom) 14)
+#define XA_CUT_BUFFER6 ((Atom) 15)
+#define XA_CUT_BUFFER7 ((Atom) 16)
+#define XA_DRAWABLE ((Atom) 17)
+#define XA_FONT ((Atom) 18)
+#define XA_INTEGER ((Atom) 19)
+#define XA_PIXMAP ((Atom) 20)
+#define XA_POINT ((Atom) 21)
+#define XA_RECTANGLE ((Atom) 22)
+#define XA_RESOURCE_MANAGER ((Atom) 23)
+#define XA_RGB_COLOR_MAP ((Atom) 24)
+#define XA_RGB_BEST_MAP ((Atom) 25)
+#define XA_RGB_BLUE_MAP ((Atom) 26)
+#define XA_RGB_DEFAULT_MAP ((Atom) 27)
+#define XA_RGB_GRAY_MAP ((Atom) 28)
+#define XA_RGB_GREEN_MAP ((Atom) 29)
+#define XA_RGB_RED_MAP ((Atom) 30)
+#define XA_STRING ((Atom) 31)
+#define XA_VISUALID ((Atom) 32)
+#define XA_WINDOW ((Atom) 33)
+#define XA_WM_COMMAND ((Atom) 34)
+#define XA_WM_HINTS ((Atom) 35)
+#define XA_WM_CLIENT_MACHINE ((Atom) 36)
+#define XA_WM_ICON_NAME ((Atom) 37)
+#define XA_WM_ICON_SIZE ((Atom) 38)
+#define XA_WM_NAME ((Atom) 39)
+#define XA_WM_NORMAL_HINTS ((Atom) 40)
+#define XA_WM_SIZE_HINTS ((Atom) 41)
+#define XA_WM_ZOOM_HINTS ((Atom) 42)
+#define XA_MIN_SPACE ((Atom) 43)
+#define XA_NORM_SPACE ((Atom) 44)
+#define XA_MAX_SPACE ((Atom) 45)
+#define XA_END_SPACE ((Atom) 46)
+#define XA_SUPERSCRIPT_X ((Atom) 47)
+#define XA_SUPERSCRIPT_Y ((Atom) 48)
+#define XA_SUBSCRIPT_X ((Atom) 49)
+#define XA_SUBSCRIPT_Y ((Atom) 50)
+#define XA_UNDERLINE_POSITION ((Atom) 51)
+#define XA_UNDERLINE_THICKNESS ((Atom) 52)
+#define XA_STRIKEOUT_ASCENT ((Atom) 53)
+#define XA_STRIKEOUT_DESCENT ((Atom) 54)
+#define XA_ITALIC_ANGLE ((Atom) 55)
+#define XA_X_HEIGHT ((Atom) 56)
+#define XA_QUAD_WIDTH ((Atom) 57)
+#define XA_WEIGHT ((Atom) 58)
+#define XA_POINT_SIZE ((Atom) 59)
+#define XA_RESOLUTION ((Atom) 60)
+#define XA_COPYRIGHT ((Atom) 61)
+#define XA_NOTICE ((Atom) 62)
+#define XA_FONT_NAME ((Atom) 63)
+#define XA_FAMILY_NAME ((Atom) 64)
+#define XA_FULL_NAME ((Atom) 65)
+#define XA_CAP_HEIGHT ((Atom) 66)
+#define XA_WM_CLASS ((Atom) 67)
+#define XA_WM_TRANSIENT_FOR ((Atom) 68)
+
+#define XA_LAST_PREDEFINED ((Atom) 68)
+#endif /* XATOM_H */
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/Xfuncproto.h b/Master/tlpkg/tlperl/lib/Tk/X11/Xfuncproto.h
new file mode 100644
index 00000000000..a59379b3b65
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/Xfuncproto.h
@@ -0,0 +1,60 @@
+/* $XConsortium: Xfuncproto.h,v 1.7 91/05/13 20:49:21 rws Exp $ */
+/*
+ * Copyright 1989, 1991 by the Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of M.I.T. not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. M.I.T. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ */
+
+/* Definitions to make function prototypes manageable */
+
+#ifndef _XFUNCPROTO_H_
+#define _XFUNCPROTO_H_
+
+#ifndef NeedFunctionPrototypes
+#define NeedFunctionPrototypes 1
+#endif /* NeedFunctionPrototypes */
+
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes 0
+#endif /* NeedVarargsPrototypes */
+
+#if NeedFunctionPrototypes
+
+#ifndef NeedNestedPrototypes
+#define NeedNestedPrototypes 1
+#endif /* NeedNestedPrototypes */
+
+#ifndef _Xconst
+#define _Xconst const
+#endif /* _Xconst */
+
+#ifndef NeedWidePrototypes
+#ifdef NARROWPROTO
+#define NeedWidePrototypes 0
+#else
+#define NeedWidePrototypes 1 /* default to make interropt. easier */
+#endif
+#endif /* NeedWidePrototypes */
+
+#endif /* NeedFunctionPrototypes */
+
+#ifdef __cplusplus
+#define _XFUNCPROTOBEGIN extern "C" {
+#define _XFUNCPROTOEND }
+#endif
+
+#ifndef _XFUNCPROTOBEGIN
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#endif /* _XFUNCPROTOBEGIN */
+
+#endif /* _XFUNCPROTO_H_ */
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/Xlib.h b/Master/tlpkg/tlperl/lib/Tk/X11/Xlib.h
new file mode 100644
index 00000000000..660ec128833
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/Xlib.h
@@ -0,0 +1,1214 @@
+/* $XConsortium: Xlib.h,v 11.221 93/07/02 14:13:28 gildea Exp $ */
+/*
+ * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of M.I.T. not be used in advertising
+ * or publicity pertaining to distribution of the software without specific,
+ * written prior permission. M.I.T. makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * X Window System is a Trademark of MIT.
+ *
+ */
+
+
+/*
+ * Xlib.h - Header definition and support file for the C subroutine
+ * interface library (Xlib) to the X Window System Protocol (V11).
+ * Structures and symbols starting with "_" are private to the library.
+ */
+#ifndef _XLIB_H_
+#define _XLIB_H_
+
+#define XlibSpecificationRelease 5
+
+#if !defined(MAC_TCL) && !defined(MAC_OSX_TK)
+# include <X11/X.h>
+#endif
+#ifdef MAC_TCL
+# include <X.h>
+# define Cursor XCursor
+# define Region XRegion
+#endif
+#ifdef MAC_OSX_TK
+# include <X11/X.h>
+# define Cursor XCursor
+# define Region XRegion
+#endif
+
+/* applications should not depend on these two headers being included! */
+#ifdef MAC_TCL
+#include <Xfuncproto.h>
+#else
+#include <X11/Xfuncproto.h>
+#endif
+
+#ifndef X_WCHAR
+#ifdef X_NOT_STDC_ENV
+#define X_WCHAR
+#endif
+#endif
+
+#ifndef X_WCHAR
+#include <stddef.h>
+#else
+/* replace this with #include or typedef appropriate for your system */
+typedef unsigned long wchar_t;
+#endif
+
+typedef char *XPointer;
+
+#define Bool int
+#if defined(MAC_TCL) || defined(MAC_OSX_TK)
+/* Use define rather than typedef, since may need to undefine this later */
+#define Status int
+#else
+typedef int Status;
+#endif
+#define True 1
+#define False 0
+
+#define QueuedAlready 0
+#define QueuedAfterReading 1
+#define QueuedAfterFlush 2
+
+#define ConnectionNumber(dpy) ((dpy)->fd)
+#define RootWindow(dpy, scr) (((dpy)->screens[(scr)]).root)
+#define DefaultScreen(dpy) ((dpy)->default_screen)
+#define DefaultRootWindow(dpy) (((dpy)->screens[(dpy)->default_screen]).root)
+#define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
+#define DefaultGC(dpy, scr) (((dpy)->screens[(scr)]).default_gc)
+#define BlackPixel(dpy, scr) (((dpy)->screens[(scr)]).black_pixel)
+#define WhitePixel(dpy, scr) (((dpy)->screens[(scr)]).white_pixel)
+#define AllPlanes ((unsigned long)~0L)
+#define QLength(dpy) ((dpy)->qlen)
+#define DisplayWidth(dpy, scr) (((dpy)->screens[(scr)]).width)
+#define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
+#define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
+#define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
+#define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
+#define DisplayCells(dpy, scr) (DefaultVisual((dpy), (scr))->map_entries)
+#define ScreenCount(dpy) ((dpy)->nscreens)
+#define ServerVendor(dpy) ((dpy)->vendor)
+#define ProtocolVersion(dpy) ((dpy)->proto_major_version)
+#define ProtocolRevision(dpy) ((dpy)->proto_minor_version)
+#define VendorRelease(dpy) ((dpy)->release)
+#define DisplayString(dpy) ((dpy)->display_name)
+#define DefaultDepth(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
+#define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
+#define BitmapUnit(dpy) ((dpy)->bitmap_unit)
+#define BitmapBitOrder(dpy) ((dpy)->bitmap_bit_order)
+#define BitmapPad(dpy) ((dpy)->bitmap_pad)
+#define ImageByteOrder(dpy) ((dpy)->byte_order)
+#define NextRequest(dpy) ((dpy)->request + 1)
+#define LastKnownRequestProcessed(dpy) ((dpy)->last_request_read)
+
+/* macros for screen oriented applications (toolkit) */
+#define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
+#define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
+#define DisplayOfScreen(s) ((s)->display)
+#define RootWindowOfScreen(s) ((s)->root)
+#define BlackPixelOfScreen(s) ((s)->black_pixel)
+#define WhitePixelOfScreen(s) ((s)->white_pixel)
+#define DefaultColormapOfScreen(s)((s)->cmap)
+#define DefaultDepthOfScreen(s) ((s)->root_depth)
+#define DefaultGCOfScreen(s) ((s)->default_gc)
+#define DefaultVisualOfScreen(s)((s)->root_visual)
+#define WidthOfScreen(s) ((s)->width)
+#define HeightOfScreen(s) ((s)->height)
+#define WidthMMOfScreen(s) ((s)->mwidth)
+#define HeightMMOfScreen(s) ((s)->mheight)
+#define PlanesOfScreen(s) ((s)->root_depth)
+#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
+#define MinCmapsOfScreen(s) ((s)->min_maps)
+#define MaxCmapsOfScreen(s) ((s)->max_maps)
+#define DoesSaveUnders(s) ((s)->save_unders)
+#define DoesBackingStore(s) ((s)->backing_store)
+#define EventMaskOfScreen(s) ((s)->root_input_mask)
+
+/*
+ * Extensions need a way to hang private data on some structures.
+ */
+typedef struct _XExtData {
+ int number; /* number returned by XRegisterExtension */
+ struct _XExtData *next; /* next item on list of data for structure */
+ int (*free_private)(); /* called to free private storage */
+ XPointer private_data; /* data private to this extension. */
+} XExtData;
+
+/*
+ * This file contains structures used by the extension mechanism.
+ */
+typedef struct { /* public to extension, cannot be changed */
+ int extension; /* extension number */
+ int major_opcode; /* major op-code assigned by server */
+ int first_event; /* first event number for the extension */
+ int first_error; /* first error number for the extension */
+} XExtCodes;
+
+/*
+ * Data structure for retrieving info about pixmap formats.
+ */
+
+typedef struct {
+ int depth;
+ int bits_per_pixel;
+ int scanline_pad;
+} XPixmapFormatValues;
+
+
+/*
+ * Data structure for setting graphics context.
+ */
+typedef struct {
+ int function; /* logical operation */
+ unsigned long plane_mask;/* plane mask */
+ unsigned long foreground;/* foreground pixel */
+ unsigned long background;/* background pixel */
+ int line_width; /* line width */
+ int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
+ int cap_style; /* CapNotLast, CapButt,
+ CapRound, CapProjecting */
+ int join_style; /* JoinMiter, JoinRound, JoinBevel */
+ int fill_style; /* FillSolid, FillTiled,
+ FillStippled, FillOpaeueStippled */
+ int fill_rule; /* EvenOddRule, WindingRule */
+ int arc_mode; /* ArcChord, ArcPieSlice */
+ Pixmap tile; /* tile pixmap for tiling operations */
+ Pixmap stipple; /* stipple 1 plane pixmap for stipping */
+ int ts_x_origin; /* offset for tile or stipple operations */
+ int ts_y_origin;
+ Font font; /* default text font for text operations */
+ int subwindow_mode; /* ClipByChildren, IncludeInferiors */
+ Bool graphics_exposures;/* boolean, should exposures be generated */
+ int clip_x_origin; /* origin for clipping */
+ int clip_y_origin;
+ Pixmap clip_mask; /* bitmap clipping; other calls for rects */
+ int dash_offset; /* patterned/dashed line information */
+ char dashes;
+} XGCValues;
+
+/*
+ * Graphics context. The contents of this structure are implementation
+ * dependent. A GC should be treated as opaque by application code.
+ */
+
+typedef XGCValues *GC;
+
+/*
+ * Visual structure; contains information about colormapping possible.
+ */
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ VisualID visualid; /* visual id of this visual */
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ class of screen (monochrome, etc.) */
+#else
+ int class; /* class of screen (monochrome, etc.) */
+#endif
+ unsigned long red_mask, green_mask, blue_mask; /* mask values */
+ int bits_per_rgb; /* log base 2 of distinct color values */
+ int map_entries; /* color map entries */
+} Visual;
+
+/*
+ * Depth structure; contains information for each possible depth.
+ */
+typedef struct {
+ int depth; /* this depth (Z) of the depth */
+ int nvisuals; /* number of Visual types at this depth */
+ Visual *visuals; /* list of visuals possible at this depth */
+} Depth;
+
+/*
+ * Information about the screen. The contents of this structure are
+ * implementation dependent. A Screen should be treated as opaque
+ * by application code.
+ */
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XDisplay *display;/* back pointer to display structure */
+ Window root; /* Root window id. */
+ int width, height; /* width and height of screen */
+ int mwidth, mheight; /* width and height of in millimeters */
+ int ndepths; /* number of depths possible */
+ Depth *depths; /* list of allowable depths on the screen */
+ int root_depth; /* bits per pixel */
+ Visual *root_visual; /* root visual */
+ GC default_gc; /* GC for the root root visual */
+ Colormap cmap; /* default color map */
+ unsigned long white_pixel;
+ unsigned long black_pixel; /* White and Black pixel values */
+ int max_maps, min_maps; /* max and min color maps */
+ int backing_store; /* Never, WhenMapped, Always */
+ Bool save_unders;
+ long root_input_mask; /* initial root input mask */
+} Screen;
+
+/*
+ * Format structure; describes ZFormat data the screen will understand.
+ */
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ int depth; /* depth of this image format */
+ int bits_per_pixel; /* bits/pixel at this depth */
+ int scanline_pad; /* scanline must padded to this multiple */
+} ScreenFormat;
+
+/*
+ * Data structure for setting window attributes.
+ */
+typedef struct {
+ Pixmap background_pixmap; /* background or None or ParentRelative */
+ unsigned long background_pixel; /* background pixel */
+ Pixmap border_pixmap; /* border of the window */
+ unsigned long border_pixel; /* border pixel value */
+ int bit_gravity; /* one of bit gravity values */
+ int win_gravity; /* one of the window gravity values */
+ int backing_store; /* NotUseful, WhenMapped, Always */
+ unsigned long backing_planes;/* planes to be preseved if possible */
+ unsigned long backing_pixel;/* value to use in restoring planes */
+ Bool save_under; /* should bits under be saved? (popups) */
+ long event_mask; /* set of events that should be saved */
+ long do_not_propagate_mask; /* set of events that should not propagate */
+ Bool override_redirect; /* boolean value for override-redirect */
+ Colormap colormap; /* color map to be associated with window */
+ Cursor cursor; /* cursor to be displayed (or None) */
+} XSetWindowAttributes;
+
+typedef struct {
+ int x, y; /* location of window */
+ int width, height; /* width and height of window */
+ int border_width; /* border width of window */
+ int depth; /* depth of window */
+ Visual *visual; /* the associated visual structure */
+ Window root; /* root of screen containing window */
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ InputOutput, InputOnly*/
+#else
+ int class; /* InputOutput, InputOnly*/
+#endif
+ int bit_gravity; /* one of bit gravity values */
+ int win_gravity; /* one of the window gravity values */
+ int backing_store; /* NotUseful, WhenMapped, Always */
+ unsigned long backing_planes;/* planes to be preserved if possible */
+ unsigned long backing_pixel;/* value to be used when restoring planes */
+ Bool save_under; /* boolean, should bits under be saved? */
+ Colormap colormap; /* color map to be associated with window */
+ Bool map_installed; /* boolean, is color map currently installed*/
+ int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
+ long all_event_masks; /* set of events all people have interest in*/
+ long your_event_mask; /* my event mask */
+ long do_not_propagate_mask; /* set of events that should not propagate */
+ Bool override_redirect; /* boolean value for override-redirect */
+ Screen *screen; /* back pointer to correct screen */
+} XWindowAttributes;
+
+/*
+ * Data structure for host setting; getting routines.
+ *
+ */
+
+typedef struct {
+ int family; /* for example FamilyInternet */
+ int length; /* length of address, in bytes */
+ char *address; /* pointer to where to find the bytes */
+} XHostAddress;
+
+/*
+ * Data structure for "image" data, used by image manipulation routines.
+ */
+typedef struct _XImage {
+ int width, height; /* size of image */
+ int xoffset; /* number of pixels offset in X direction */
+ int format; /* XYBitmap, XYPixmap, ZPixmap */
+ char *data; /* pointer to image data */
+ int byte_order; /* data byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* quant. of scanline 8, 16, 32 */
+ int bitmap_bit_order; /* LSBFirst, MSBFirst */
+ int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
+ int depth; /* depth of image */
+ int bytes_per_line; /* accelarator to next line */
+ int bits_per_pixel; /* bits per pixel (ZPixmap) */
+ unsigned long red_mask; /* bits in z arrangment */
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ XPointer obdata; /* hook for the object routines to hang on */
+ struct funcs { /* image manipulation routines */
+ struct _XImage *(*create_image)();
+#if NeedFunctionPrototypes
+ int (*destroy_image) (struct _XImage *);
+ unsigned long (*get_pixel) (struct _XImage *, int, int);
+ int (*put_pixel) (struct _XImage *, int, int, unsigned long);
+ struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
+ int (*add_pixel) (struct _XImage *, long);
+#else
+ int (*destroy_image)();
+ unsigned long (*get_pixel)();
+ int (*put_pixel)();
+ struct _XImage *(*sub_image)();
+ int (*add_pixel)();
+#endif
+ } f;
+} XImage;
+
+/*
+ * Data structure for XReconfigureWindow
+ */
+typedef struct {
+ int x, y;
+ int width, height;
+ int border_width;
+ Window sibling;
+ int stack_mode;
+} XWindowChanges;
+
+/*
+ * Data structure used by color operations
+ */
+typedef struct {
+ unsigned long pixel;
+ unsigned short red, green, blue;
+ char flags; /* do_red, do_green, do_blue */
+ char pad;
+} XColor;
+
+/*
+ * Data structures for graphics operations. On most machines, these are
+ * congruent with the wire protocol structures, so reformatting the data
+ * can be avoided on these architectures.
+ */
+typedef struct {
+ short x1, y1, x2, y2;
+} XSegment;
+
+typedef struct {
+ short x, y;
+} XPoint;
+
+typedef struct {
+ short x, y;
+ unsigned short width, height;
+} XRectangle;
+
+typedef struct {
+ short x, y;
+ unsigned short width, height;
+ short angle1, angle2;
+} XArc;
+
+
+/* Data structure for XChangeKeyboardControl */
+
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ int bell_pitch;
+ int bell_duration;
+ int led;
+ int led_mode;
+ int key;
+ int auto_repeat_mode; /* On, Off, Default */
+} XKeyboardControl;
+
+/* Data structure for XGetKeyboardControl */
+
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ unsigned int bell_pitch, bell_duration;
+ unsigned long led_mask;
+ int global_auto_repeat;
+ char auto_repeats[32];
+} XKeyboardState;
+
+/* Data structure for XGetMotionEvents. */
+
+typedef struct {
+ Time time;
+ short x, y;
+} XTimeCoord;
+
+/* Data structure for X{Set,Get}ModifierMapping */
+
+typedef struct {
+ int max_keypermod; /* The server's max # of keys per modifier */
+ KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
+} XModifierKeymap;
+
+
+/*
+ * Display datatype maintaining display specific data.
+ * The contents of this structure are implementation dependent.
+ * A Display should be treated as opaque by application code.
+ */
+typedef struct _XDisplay {
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XFreeFuncs *free_funcs; /* internal free functions */
+ int fd; /* Network socket. */
+ int conn_checker; /* ugly thing used by _XEventsQueued */
+ int proto_major_version;/* maj. version of server's X protocol */
+ int proto_minor_version;/* minor version of servers X protocol */
+ char *vendor; /* vendor of the server hardware */
+ XID resource_base; /* resource ID base */
+ XID resource_mask; /* resource ID mask bits */
+ XID resource_id; /* allocator current ID */
+ int resource_shift; /* allocator shift to correct bits */
+ XID (*resource_alloc)(); /* allocator function */
+ int byte_order; /* screen byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* padding and data requirements */
+ int bitmap_pad; /* padding requirements on bitmaps */
+ int bitmap_bit_order; /* LeastSignificant or MostSignificant */
+ int nformats; /* number of pixmap formats in list */
+ ScreenFormat *pixmap_format; /* pixmap format list */
+ int vnumber; /* Xlib's X protocol version number. */
+ int release; /* release of the server */
+ struct _XSQEvent *head, *tail; /* Input event queue. */
+ int qlen; /* Length of input event queue */
+ unsigned long last_request_read; /* seq number of last event read */
+ unsigned long request; /* sequence number of last request. */
+ char *last_req; /* beginning of last request, or dummy */
+ char *buffer; /* Output buffer starting address. */
+ char *bufptr; /* Output buffer index pointer. */
+ char *bufmax; /* Output buffer maximum+1 address. */
+ unsigned max_request_size; /* maximum number 32 bit words in request*/
+ struct _XrmHashBucketRec *db;
+ int (*synchandler)(); /* Synchronization handler */
+ char *display_name; /* "host:display" string used on this connect*/
+ int default_screen; /* default screen for operations */
+ int nscreens; /* number of screens on this server*/
+ Screen *screens; /* pointer to list of screens */
+ unsigned long motion_buffer; /* size of motion buffer */
+ unsigned long flags; /* internal connection flags */
+ int min_keycode; /* minimum defined keycode */
+ int max_keycode; /* maximum defined keycode */
+ KeySym *keysyms; /* This server's keysyms */
+ XModifierKeymap *modifiermap; /* This server's modifier keymap */
+ int keysyms_per_keycode;/* number of rows */
+ char *xdefaults; /* contents of defaults from server */
+ char *scratch_buffer; /* place to hang scratch buffer */
+ unsigned long scratch_length; /* length of scratch buffer */
+ int ext_number; /* extension number on this display */
+ struct _XExten *ext_procs; /* extensions initialized on this display */
+ /*
+ * the following can be fixed size, as the protocol defines how
+ * much address space is available.
+ * While this could be done using the extension vector, there
+ * may be MANY events processed, so a search through the extension
+ * list to find the right procedure for each event might be
+ * expensive if many extensions are being used.
+ */
+ Bool (*event_vec[128])(); /* vector for wire to event */
+ int (*wire_vec[128])(); /* vector for event to wire */
+ KeySym lock_meaning; /* for XLookupString */
+ struct _XLockInfo *lock; /* multi-thread state, display lock */
+ struct _XInternalAsync *async_handlers; /* for internal async */
+ unsigned long bigreq_size; /* max size of big requests */
+ struct _XLockPtrs *lock_fns; /* pointers to threads functions */
+ /* things above this line should not move, for binary compatibility */
+ struct _XKeytrans *key_bindings; /* for XLookupString */
+ Font cursor_font; /* for XCreateFontCursor */
+ struct _XDisplayAtoms *atoms; /* for XInternAtom */
+ unsigned int mode_switch; /* keyboard group modifiers */
+ struct _XContextDB *context_db; /* context database */
+ Bool (**error_vec)(); /* vector for wire to error */
+ /*
+ * Xcms information
+ */
+ struct {
+ XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */
+ XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */
+ XPointer perVisualIntensityMaps;
+ /* linked list of XcmsIntensityMap */
+ } cms;
+ struct _XIMFilter *im_filters;
+ struct _XSQEvent *qfree; /* unallocated event queue elements */
+ unsigned long next_event_serial_num; /* inserted into next queue elt */
+ int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
+} Display;
+
+#if NeedFunctionPrototypes /* prototypes require event type definitions */
+#undef _XEVENT_
+#endif
+#ifndef _XEVENT_
+
+#define XMaxTransChars 4
+
+/*
+ * Definitions of specific events.
+ */
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window it is reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int keycode; /* detail */
+ Bool same_screen; /* same screen flag */
+ char trans_chars[XMaxTransChars];
+ /* translated characters */
+ int nbytes;
+} XKeyEvent;
+typedef XKeyEvent XKeyPressedEvent;
+typedef XKeyEvent XKeyReleasedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window it is reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int button; /* detail */
+ Bool same_screen; /* same screen flag */
+} XButtonEvent;
+typedef XButtonEvent XButtonPressedEvent;
+typedef XButtonEvent XButtonReleasedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ char is_hint; /* detail */
+ Bool same_screen; /* same screen flag */
+} XMotionEvent;
+typedef XMotionEvent XPointerMovedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* "event" window reported relative to */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
+ int detail;
+ /*
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyNonlinear,NotifyNonlinearVirtual
+ */
+ Bool same_screen; /* same screen flag */
+ Bool focus; /* boolean focus */
+ unsigned int state; /* key or button mask */
+} XCrossingEvent;
+typedef XCrossingEvent XEnterWindowEvent;
+typedef XCrossingEvent XLeaveWindowEvent;
+
+typedef struct {
+ int type; /* FocusIn or FocusOut */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window of event */
+ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
+ int detail;
+ /*
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
+ * NotifyPointerRoot, NotifyDetailNone
+ */
+} XFocusChangeEvent;
+typedef XFocusChangeEvent XFocusInEvent;
+typedef XFocusChangeEvent XFocusOutEvent;
+
+/* generated on EnterWindow and FocusIn when KeyMapState selected */
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ char key_vector[32];
+} XKeymapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int x, y;
+ int width, height;
+ int count; /* if non-zero, at least this many more */
+} XExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable;
+ int x, y;
+ int width, height;
+ int count; /* if non-zero, at least this many more */
+ int major_code; /* core is CopyArea or CopyPlane */
+ int minor_code; /* not defined in the core */
+} XGraphicsExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable;
+ int major_code; /* core is CopyArea or CopyPlane */
+ int minor_code; /* not defined in the core */
+} XNoExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int state; /* Visibility state */
+} XVisibilityEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent; /* parent of the window */
+ Window window; /* window id of window created */
+ int x, y; /* window location */
+ int width, height; /* size of window */
+ int border_width; /* border width */
+ Bool override_redirect; /* creation should be overridden */
+} XCreateWindowEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+} XDestroyWindowEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Bool from_configure;
+} XUnmapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Bool override_redirect; /* boolean, is override set... */
+} XMapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+} XMapRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Window parent;
+ int x, y;
+ Bool override_redirect;
+} XReparentEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int x, y;
+ int width, height;
+ int border_width;
+ Window above;
+ Bool override_redirect;
+} XConfigureEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int x, y;
+} XGravityEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int width, height;
+} XResizeRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+ int x, y;
+ int width, height;
+ int border_width;
+ Window above;
+ int detail; /* Above, Below, TopIf, BottomIf, Opposite */
+ unsigned long value_mask;
+} XConfigureRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int place; /* PlaceOnTop, PlaceOnBottom */
+} XCirculateEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+ int place; /* PlaceOnTop, PlaceOnBottom */
+} XCirculateRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom atom;
+ Time time;
+ int state; /* NewValue, Deleted */
+} XPropertyEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom selection;
+ Time time;
+} XSelectionClearEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window owner;
+ Window requestor;
+ Atom selection;
+ Atom target;
+ Atom property;
+ Time time;
+} XSelectionRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window requestor;
+ Atom selection;
+ Atom target;
+ Atom property; /* ATOM or None */
+ Time time;
+} XSelectionEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Colormap colormap; /* COLORMAP or None */
+#if defined(__cplusplus) || defined(c_plusplus)
+ Bool c_new; /* C++ */
+#else
+ Bool new;
+#endif
+ int state; /* ColormapInstalled, ColormapUninstalled */
+} XColormapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom message_type;
+ int format;
+ union {
+ char b[20];
+ short s[10];
+ long l[5];
+ } data;
+} XClientMessageEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* unused */
+ int request; /* one of MappingModifier, MappingKeyboard,
+ MappingPointer */
+ int first_keycode; /* first keycode */
+ int count; /* defines range of change w. first_keycode*/
+} XMappingEvent;
+
+typedef struct {
+ int type;
+ Display *display; /* Display the event was read from */
+ XID resourceid; /* resource id */
+ unsigned long serial; /* serial number of failed request */
+ unsigned char error_code; /* error code of failed request */
+ unsigned char request_code; /* Major op-code of failed request */
+ unsigned char minor_code; /* Minor op-code of failed request */
+} XErrorEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display;/* Display the event was read from */
+ Window window; /* window on which event was requested in event mask */
+} XAnyEvent;
+
+/*
+ * this union is defined so Xlib can always use the same sized
+ * event structure internally, to avoid memory fragmentation.
+ */
+typedef union _XEvent {
+ int type; /* must not be changed; first element */
+ XAnyEvent xany;
+ XKeyEvent xkey;
+ XButtonEvent xbutton;
+ XMotionEvent xmotion;
+ XCrossingEvent xcrossing;
+ XFocusChangeEvent xfocus;
+ XExposeEvent xexpose;
+ XGraphicsExposeEvent xgraphicsexpose;
+ XNoExposeEvent xnoexpose;
+ XVisibilityEvent xvisibility;
+ XCreateWindowEvent xcreatewindow;
+ XDestroyWindowEvent xdestroywindow;
+ XUnmapEvent xunmap;
+ XMapEvent xmap;
+ XMapRequestEvent xmaprequest;
+ XReparentEvent xreparent;
+ XConfigureEvent xconfigure;
+ XGravityEvent xgravity;
+ XResizeRequestEvent xresizerequest;
+ XConfigureRequestEvent xconfigurerequest;
+ XCirculateEvent xcirculate;
+ XCirculateRequestEvent xcirculaterequest;
+ XPropertyEvent xproperty;
+ XSelectionClearEvent xselectionclear;
+ XSelectionRequestEvent xselectionrequest;
+ XSelectionEvent xselection;
+ XColormapEvent xcolormap;
+ XClientMessageEvent xclient;
+ XMappingEvent xmapping;
+ XErrorEvent xerror;
+ XKeymapEvent xkeymap;
+ long pad[24];
+} XEvent;
+#endif
+
+#define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
+
+/*
+ * per character font metric information.
+ */
+typedef struct {
+ short lbearing; /* origin to left edge of raster */
+ short rbearing; /* origin to right edge of raster */
+ short width; /* advance to next char's origin */
+ short ascent; /* baseline to top edge of raster */
+ short descent; /* baseline to bottom edge of raster */
+ unsigned short attributes; /* per char flags (not predefined) */
+} XCharStruct;
+
+/*
+ * To allow arbitrary information with fonts, there are additional properties
+ * returned.
+ */
+typedef struct {
+ Atom name;
+ unsigned long card32;
+} XFontProp;
+
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ Font fid; /* Font id for this font */
+ unsigned direction; /* hint about direction the font is painted */
+ unsigned min_char_or_byte2;/* first character */
+ unsigned max_char_or_byte2;/* last character */
+ unsigned min_byte1; /* first row that exists */
+ unsigned max_byte1; /* last row that exists */
+ Bool all_chars_exist;/* flag if all characters have non-zero size*/
+ unsigned default_char; /* char to print for undefined character */
+ int n_properties; /* how many properties there are */
+ XFontProp *properties; /* pointer to array of additional properties*/
+ XCharStruct min_bounds; /* minimum bounds over all existing char*/
+ XCharStruct max_bounds; /* maximum bounds over all existing char*/
+ XCharStruct *per_char; /* first_char to last_char information */
+ int ascent; /* log. extent above baseline for spacing */
+ int descent; /* log. descent below baseline for spacing */
+} XFontStruct;
+
+/*
+ * PolyText routines take these as arguments.
+ */
+typedef struct {
+ char *chars; /* pointer to string */
+ int nchars; /* number of characters */
+ int delta; /* delta between strings */
+ Font font; /* font to print it in, None don't change */
+} XTextItem;
+
+typedef struct { /* normal 16 bit characters are two bytes */
+ unsigned char byte1;
+ unsigned char byte2;
+} XChar2b;
+
+typedef struct {
+ XChar2b *chars; /* two byte characters */
+ int nchars; /* number of characters */
+ int delta; /* delta between strings */
+ Font font; /* font to print it in, None don't change */
+} XTextItem16;
+
+
+typedef union { Display *display;
+ GC gc;
+ Visual *visual;
+ Screen *screen;
+ ScreenFormat *pixmap_format;
+ XFontStruct *font; } XEDataObject;
+
+typedef struct {
+ XRectangle max_ink_extent;
+ XRectangle max_logical_extent;
+} XFontSetExtents;
+
+typedef struct _XFontSet *XFontSet;
+
+typedef struct {
+ char *chars;
+ int nchars;
+ int delta;
+ XFontSet font_set;
+} XmbTextItem;
+
+typedef struct {
+ wchar_t *chars;
+ int nchars;
+ int delta;
+ XFontSet font_set;
+} XwcTextItem;
+
+typedef void (*XIMProc)();
+
+typedef struct _XIM *XIM;
+typedef struct _XIC *XIC;
+
+typedef unsigned long XIMStyle;
+
+typedef struct {
+ unsigned short count_styles;
+ XIMStyle *supported_styles;
+} XIMStyles;
+
+#define XIMPreeditArea 0x0001L
+#define XIMPreeditCallbacks 0x0002L
+#define XIMPreeditPosition 0x0004L
+#define XIMPreeditNothing 0x0008L
+#define XIMPreeditNone 0x0010L
+#define XIMStatusArea 0x0100L
+#define XIMStatusCallbacks 0x0200L
+#define XIMStatusNothing 0x0400L
+#define XIMStatusNone 0x0800L
+
+#define XNVaNestedList "XNVaNestedList"
+#define XNClientWindow "clientWindow"
+#define XNInputStyle "inputStyle"
+#define XNFocusWindow "focusWindow"
+#define XNResourceName "resourceName"
+#define XNResourceClass "resourceClass"
+#define XNGeometryCallback "geometryCallback"
+#define XNFilterEvents "filterEvents"
+#define XNPreeditStartCallback "preeditStartCallback"
+#define XNPreeditDoneCallback "preeditDoneCallback"
+#define XNPreeditDrawCallback "preeditDrawCallback"
+#define XNPreeditCaretCallback "preeditCaretCallback"
+#define XNPreeditAttributes "preeditAttributes"
+#define XNStatusStartCallback "statusStartCallback"
+#define XNStatusDoneCallback "statusDoneCallback"
+#define XNStatusDrawCallback "statusDrawCallback"
+#define XNStatusAttributes "statusAttributes"
+#define XNArea "area"
+#define XNAreaNeeded "areaNeeded"
+#define XNSpotLocation "spotLocation"
+#define XNColormap "colorMap"
+#define XNStdColormap "stdColorMap"
+#define XNForeground "foreground"
+#define XNBackground "background"
+#define XNBackgroundPixmap "backgroundPixmap"
+#define XNFontSet "fontSet"
+#define XNLineSpace "lineSpace"
+#define XNCursor "cursor"
+
+#define XBufferOverflow -1
+#define XLookupNone 1
+#define XLookupChars 2
+#define XLookupKeySym 3
+#define XLookupBoth 4
+
+#if NeedFunctionPrototypes
+typedef void *XVaNestedList;
+#else
+typedef XPointer XVaNestedList;
+#endif
+
+typedef struct {
+ XPointer client_data;
+ XIMProc callback;
+} XIMCallback;
+
+typedef unsigned long XIMFeedback;
+
+#define XIMReverse 1
+#define XIMUnderline (1<<1)
+#define XIMHighlight (1<<2)
+#define XIMPrimary (1<<5)
+#define XIMSecondary (1<<6)
+#define XIMTertiary (1<<7)
+
+typedef struct _XIMText {
+ unsigned short length;
+ XIMFeedback *feedback;
+ Bool encoding_is_wchar;
+ union {
+ char *multi_byte;
+ wchar_t *wide_char;
+ } string;
+} XIMText;
+
+typedef struct _XIMPreeditDrawCallbackStruct {
+ int caret; /* Cursor offset within pre-edit string */
+ int chg_first; /* Starting change position */
+ int chg_length; /* Length of the change in character count */
+ XIMText *text;
+} XIMPreeditDrawCallbackStruct;
+
+typedef enum {
+ XIMForwardChar, XIMBackwardChar,
+ XIMForwardWord, XIMBackwardWord,
+ XIMCaretUp, XIMCaretDown,
+ XIMNextLine, XIMPreviousLine,
+ XIMLineStart, XIMLineEnd,
+ XIMAbsolutePosition,
+ XIMDontChange
+} XIMCaretDirection;
+
+typedef enum {
+ XIMIsInvisible, /* Disable caret feedback */
+ XIMIsPrimary, /* UI defined caret feedback */
+ XIMIsSecondary /* UI defined caret feedback */
+} XIMCaretStyle;
+
+typedef struct _XIMPreeditCaretCallbackStruct {
+ int position; /* Caret offset within pre-edit string */
+ XIMCaretDirection direction; /* Caret moves direction */
+ XIMCaretStyle style; /* Feedback of the caret */
+} XIMPreeditCaretCallbackStruct;
+
+typedef enum {
+ XIMTextType,
+ XIMBitmapType
+} XIMStatusDataType;
+
+typedef struct _XIMStatusDrawCallbackStruct {
+ XIMStatusDataType type;
+ union {
+ XIMText *text;
+ Pixmap bitmap;
+ } data;
+} XIMStatusDrawCallbackStruct;
+
+typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XErrorEvent* /* error_event */
+#endif
+);
+
+_XFUNCPROTOBEGIN
+
+
+
+#include "pTk/tkIntXlibDecls.h"
+
+_XFUNCPROTOEND
+
+#if defined(MAC_TCL) || defined(MAC_OSX_TK)
+# undef Cursor
+#endif
+
+#endif /* _XLIB_H_ */
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/Xutil.h b/Master/tlpkg/tlperl/lib/Tk/X11/Xutil.h
new file mode 100644
index 00000000000..af44e0e9c2e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/Xutil.h
@@ -0,0 +1,855 @@
+/* $XConsortium: Xutil.h,v 11.73 91/07/30 16:21:37 rws Exp $ */
+
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef _XUTIL_H_
+#define _XUTIL_H_
+
+/* You must include <X11/Xlib.h> before including this file */
+
+#if defined(MAC_TCL) || defined(MAC_OSX_TK)
+# define Region XRegion
+#endif
+
+/*
+ * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
+ * value (x, y, width, height) was found in the parsed string.
+ */
+#define NoValue 0x0000
+#define XValue 0x0001
+#define YValue 0x0002
+#define WidthValue 0x0004
+#define HeightValue 0x0008
+#define AllValues 0x000F
+#define XNegative 0x0010
+#define YNegative 0x0020
+
+/*
+ * new version containing base_width, base_height, and win_gravity fields;
+ * used with WM_NORMAL_HINTS.
+ */
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ int x, y; /* obsolete for new window mgrs, but clients */
+ int width, height; /* should set so old wm's don't mess up */
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+ struct {
+ int x; /* numerator */
+ int y; /* denominator */
+ } min_aspect, max_aspect;
+ int base_width, base_height; /* added by ICCCM version 1 */
+ int win_gravity; /* added by ICCCM version 1 */
+} XSizeHints;
+
+/*
+ * The next block of definitions are for window manager properties that
+ * clients and applications use for communication.
+ */
+
+/* flags argument in size hints */
+#define USPosition (1L << 0) /* user specified x, y */
+#define USSize (1L << 1) /* user specified width, height */
+
+#define PPosition (1L << 2) /* program specified position */
+#define PSize (1L << 3) /* program specified size */
+#define PMinSize (1L << 4) /* program specified minimum size */
+#define PMaxSize (1L << 5) /* program specified maximum size */
+#define PResizeInc (1L << 6) /* program specified resize increments */
+#define PAspect (1L << 7) /* program specified min and max aspect ratios */
+#define PBaseSize (1L << 8) /* program specified base for incrementing */
+#define PWinGravity (1L << 9) /* program specified window gravity */
+
+/* obsolete */
+#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
+
+
+
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ Bool input; /* does this application rely on the window manager to
+ get keyboard input? */
+ int initial_state; /* see below */
+ Pixmap icon_pixmap; /* pixmap to be used as icon */
+ Window icon_window; /* window to be used as icon */
+ int icon_x, icon_y; /* initial position of icon */
+ Pixmap icon_mask; /* icon mask bitmap */
+ XID window_group; /* id of related window group */
+ /* this structure may be extended in the future */
+} XWMHints;
+
+/* definition for flags of XWMHints */
+
+#define InputHint (1L << 0)
+#define StateHint (1L << 1)
+#define IconPixmapHint (1L << 2)
+#define IconWindowHint (1L << 3)
+#define IconPositionHint (1L << 4)
+#define IconMaskHint (1L << 5)
+#define WindowGroupHint (1L << 6)
+#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
+IconPositionHint|IconMaskHint|WindowGroupHint)
+
+/* definitions for initial window state */
+#define WithdrawnState 0 /* for windows that are not mapped */
+#define NormalState 1 /* most applications want to start this way */
+#define IconicState 3 /* application wants to start as an icon */
+
+/*
+ * Obsolete states no longer defined by ICCCM
+ */
+#define DontCareState 0 /* don't know or care */
+#define ZoomState 2 /* application wants to start zoomed */
+#define InactiveState 4 /* application believes it is seldom used; */
+ /* some wm's may put it on inactive menu */
+
+
+/*
+ * new structure for manipulating TEXT properties; used with WM_NAME,
+ * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
+ */
+typedef struct {
+ unsigned char *value; /* same as Property routines */
+ Atom encoding; /* prop type */
+ int format; /* prop data format: 8, 16, or 32 */
+ unsigned long nitems; /* number of data items in value */
+} XTextProperty;
+
+#define XNoMemory -1
+#define XLocaleNotSupported -2
+#define XConverterNotFound -3
+
+typedef enum {
+ XStringStyle, /* STRING */
+ XCompoundTextStyle, /* COMPOUND_TEXT */
+ XTextStyle, /* text in owner's encoding (current locale)*/
+ XStdICCTextStyle /* STRING, else COMPOUND_TEXT */
+} XICCEncodingStyle;
+
+typedef struct {
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+} XIconSize;
+
+typedef struct {
+ char *res_name;
+ char *res_class;
+} XClassHint;
+
+/*
+ * These macros are used to give some sugar to the image routines so that
+ * naive people are more comfortable with them.
+ */
+#define XDestroyImage(ximage) \
+ ((*((ximage)->f.destroy_image))((ximage)))
+#define XGetPixel(ximage, x, y) \
+ ((*((ximage)->f.get_pixel))((ximage), (x), (y)))
+#define XPutPixel(ximage, x, y, pixel) \
+ ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
+#define XSubImage(ximage, x, y, width, height) \
+ ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
+#define XAddPixel(ximage, value) \
+ ((*((ximage)->f.add_pixel))((ximage), (value)))
+
+/*
+ * Compose sequence status structure, used in calling XLookupString.
+ */
+typedef struct _XComposeStatus {
+ XPointer compose_ptr; /* state table pointer */
+ int chars_matched; /* match state */
+} XComposeStatus;
+
+/*
+ * Keysym macros, used on Keysyms to test for classes of symbols
+ */
+#define IsKeypadKey(keysym) \
+ (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal))
+
+#define IsCursorKey(keysym) \
+ (((unsigned)(keysym) >= XK_Home) && ((unsigned)(keysym) < XK_Select))
+
+#define IsPFKey(keysym) \
+ (((unsigned)(keysym) >= XK_KP_F1) && ((unsigned)(keysym) <= XK_KP_F4))
+
+#define IsFunctionKey(keysym) \
+ (((unsigned)(keysym) >= XK_F1) && ((unsigned)(keysym) <= XK_F35))
+
+#define IsMiscFunctionKey(keysym) \
+ (((unsigned)(keysym) >= XK_Select) && ((unsigned)(keysym) <= XK_Break))
+
+#define IsModifierKey(keysym) \
+ ((((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R)) \
+ || ((unsigned)(keysym) == XK_Mode_switch) \
+ || ((unsigned)(keysym) == XK_Num_Lock))
+/*
+ * opaque reference to Region data type
+ */
+typedef struct _XRegion *Region;
+
+/* Return values from XRectInRegion() */
+
+#define RectangleOut 0
+#define RectangleIn 1
+#define RectanglePart 2
+
+
+/*
+ * Information used by the visual utility routines to find desired visual
+ * type from the many visuals a display may support.
+ */
+
+typedef struct {
+ Visual *visual;
+ VisualID visualid;
+ int screen;
+ int depth;
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ */
+#else
+ int class;
+#endif
+ unsigned long red_mask;
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ int colormap_size;
+ int bits_per_rgb;
+} XVisualInfo;
+
+#define VisualNoMask 0x0
+#define VisualIDMask 0x1
+#define VisualScreenMask 0x2
+#define VisualDepthMask 0x4
+#define VisualClassMask 0x8
+#define VisualRedMaskMask 0x10
+#define VisualGreenMaskMask 0x20
+#define VisualBlueMaskMask 0x40
+#define VisualColormapSizeMask 0x80
+#define VisualBitsPerRGBMask 0x100
+#define VisualAllMask 0x1FF
+
+/*
+ * This defines a window manager property that clients may use to
+ * share standard color maps of type RGB_COLOR_MAP:
+ */
+typedef struct {
+ Colormap colormap;
+ unsigned long red_max;
+ unsigned long red_mult;
+ unsigned long green_max;
+ unsigned long green_mult;
+ unsigned long blue_max;
+ unsigned long blue_mult;
+ unsigned long base_pixel;
+ VisualID visualid; /* added by ICCCM version 1 */
+ XID killid; /* added by ICCCM version 1 */
+} XStandardColormap;
+
+#define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */
+
+
+/*
+ * return codes for XReadBitmapFile and XWriteBitmapFile
+ */
+#define BitmapSuccess 0
+#define BitmapOpenFailed 1
+#define BitmapFileInvalid 2
+#define BitmapNoMemory 3
+
+/****************************************************************
+ *
+ * Context Management
+ *
+ ****************************************************************/
+
+
+/* Associative lookup table return codes */
+
+#define XCSUCCESS 0 /* No error. */
+#define XCNOMEM 1 /* Out of memory */
+#define XCNOENT 2 /* No entry in table */
+
+typedef int XContext;
+
+#define XUniqueContext() ((XContext) XrmUniqueQuark())
+#define XStringToContext(string) ((XContext) XrmStringToQuark(string))
+
+_XFUNCPROTOBEGIN
+
+/* The following declarations are alphabetized. */
+
+extern XClassHint *XAllocClassHint (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XIconSize *XAllocIconSize (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XSizeHints *XAllocSizeHints (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XStandardColormap *XAllocStandardColormap (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern XWMHints *XAllocWMHints (
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern void XClipBox(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ XRectangle* /* rect_return */
+#endif
+);
+
+extern Region XCreateRegion(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern char *XDefaultString(
+#if NeedFunctionPrototypes
+ void
+#endif
+);
+
+extern int XDeleteContext(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */
+#endif
+);
+
+extern void XDestroyRegion(
+#if NeedFunctionPrototypes
+ Region /* r */
+#endif
+);
+
+extern void XEmptyRegion(
+#if NeedFunctionPrototypes
+ Region /* r */
+#endif
+);
+
+extern void XEqualRegion(
+#if NeedFunctionPrototypes
+ Region /* r1 */,
+ Region /* r2 */
+#endif
+);
+
+extern int XFindContext(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */,
+ XPointer* /* data_return */
+#endif
+);
+
+extern int XGetClassHint(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XClassHint* /* class_hints_return */
+#endif
+);
+
+extern int XGetIconSizes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XIconSize** /* size_list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern int XGetNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */
+#endif
+);
+
+extern int XGetRGBColormaps(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap** /* stdcmap_return */,
+ int* /* count_return */,
+ Atom /* property */
+#endif
+);
+
+extern int XGetSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ Atom /* property */
+#endif
+);
+
+extern int XGetStandardColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* colormap_return */,
+ Atom /* property */
+#endif
+);
+
+extern int XGetTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* window */,
+ XTextProperty* /* text_prop_return */,
+ Atom /* property */
+#endif
+);
+
+
+extern int XGetWMClientMachine(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern XWMHints *XGetWMHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */
+#endif
+);
+
+extern int XGetWMIconName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern int XGetWMName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern int XGetWMNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ long* /* supplied_return */
+#endif
+);
+
+extern int XGetWMSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ long* /* supplied_return */,
+ Atom /* property */
+#endif
+);
+
+extern int XGetZoomHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* zhints_return */
+#endif
+);
+
+extern void XIntersectRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+extern int XLookupString(
+#if NeedFunctionPrototypes
+ XKeyEvent* /* event_struct */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ XComposeStatus* /* status_in_out */
+#endif
+);
+
+extern int XMatchVisualInfo(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen */,
+ int /* depth */,
+ int /* class */,
+ XVisualInfo* /* vinfo_return */
+#endif
+);
+
+extern void XOffsetRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* dx */,
+ int /* dy */
+#endif
+);
+
+extern Bool XPointInRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* x */,
+ int /* y */
+#endif
+);
+
+extern Region XPolygonRegion(
+#if NeedFunctionPrototypes
+ XPoint* /* points */,
+ int /* n */,
+ int /* fill_rule */
+#endif
+);
+
+extern int XRectInRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+#endif
+);
+
+extern int XSaveContext(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */,
+ _Xconst char* /* data */
+#endif
+);
+
+extern void XSetClassHint(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XClassHint* /* class_hints */
+#endif
+);
+
+extern void XSetIconSizes(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XIconSize* /* size_list */,
+ int /* count */
+#endif
+);
+
+extern void XSetNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */
+#endif
+);
+
+extern void XSetRGBColormaps(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* stdcmaps */,
+ int /* count */,
+ Atom /* property */
+#endif
+);
+
+extern void XSetSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */,
+ Atom /* property */
+#endif
+);
+
+extern void XSetStandardProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ Pixmap /* icon_pixmap */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* hints */
+#endif
+);
+
+extern void XSetTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */,
+ Atom /* property */
+#endif
+);
+
+extern void XSetWMHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XWMHints* /* wm_hints */
+#endif
+);
+
+extern void XSetWMIconName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+#endif
+);
+
+extern void XSetWMName(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+#endif
+);
+
+extern void XSetWMNormalHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */
+#endif
+);
+
+extern void XSetWMProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* window_name */,
+ XTextProperty* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
+#endif
+);
+
+extern void XmbSetWMProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
+#endif
+);
+
+extern void XSetWMSizeHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */,
+ Atom /* property */
+#endif
+);
+
+extern void XSetRegion(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ Region /* r */
+#endif
+);
+
+extern void XSetStandardColormap(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* colormap */,
+ Atom /* property */
+#endif
+);
+
+extern void XSetZoomHints(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* zhints */
+#endif
+);
+
+extern void XShrinkRegion(
+#if NeedFunctionPrototypes
+ Region /* r */,
+ int /* dx */,
+ int /* dy */
+#endif
+);
+
+extern void XSubtractRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+extern int XmbTextListToTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ char** /* list */,
+ int /* count */,
+ XICCEncodingStyle /* style */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern int XwcTextListToTextProperty(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ wchar_t** /* list */,
+ int /* count */,
+ XICCEncodingStyle /* style */,
+ XTextProperty* /* text_prop_return */
+#endif
+);
+
+extern void XwcFreeStringList(
+#if NeedFunctionPrototypes
+ wchar_t** /* list */
+#endif
+);
+
+extern int XTextPropertyToStringList(
+#if NeedFunctionPrototypes
+ XTextProperty* /* text_prop */,
+ char*** /* list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern int XmbTextPropertyToTextList(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XTextProperty* /* text_prop */,
+ char*** /* list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern int XwcTextPropertyToTextList(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XTextProperty* /* text_prop */,
+ wchar_t*** /* list_return */,
+ int* /* count_return */
+#endif
+);
+
+extern void XUnionRectWithRegion(
+#if NeedFunctionPrototypes
+ XRectangle* /* rectangle */,
+ Region /* src_region */,
+ Region /* dest_region_return */
+#endif
+);
+
+extern void XUnionRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+extern int XWMGeometry(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* screen_number */,
+ _Xconst char* /* user_geometry */,
+ _Xconst char* /* default_geometry */,
+ unsigned int /* border_width */,
+ XSizeHints* /* hints */,
+ int* /* x_return */,
+ int* /* y_return */,
+ int* /* width_return */,
+ int* /* height_return */,
+ int* /* gravity_return */
+#endif
+);
+
+extern void XXorRegion(
+#if NeedFunctionPrototypes
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+#endif
+);
+
+_XFUNCPROTOEND
+
+#if defined(MAC_TCL) || defined(MAC_OSX_TK)
+# undef Region
+#endif
+
+#endif /* _XUTIL_H_ */
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/cursorfont.h b/Master/tlpkg/tlperl/lib/Tk/X11/cursorfont.h
new file mode 100644
index 00000000000..617274fa806
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/cursorfont.h
@@ -0,0 +1,79 @@
+/* $XConsortium: cursorfont.h,v 1.2 88/09/06 16:44:27 jim Exp $ */
+#define XC_num_glyphs 154
+#define XC_X_cursor 0
+#define XC_arrow 2
+#define XC_based_arrow_down 4
+#define XC_based_arrow_up 6
+#define XC_boat 8
+#define XC_bogosity 10
+#define XC_bottom_left_corner 12
+#define XC_bottom_right_corner 14
+#define XC_bottom_side 16
+#define XC_bottom_tee 18
+#define XC_box_spiral 20
+#define XC_center_ptr 22
+#define XC_circle 24
+#define XC_clock 26
+#define XC_coffee_mug 28
+#define XC_cross 30
+#define XC_cross_reverse 32
+#define XC_crosshair 34
+#define XC_diamond_cross 36
+#define XC_dot 38
+#define XC_dotbox 40
+#define XC_double_arrow 42
+#define XC_draft_large 44
+#define XC_draft_small 46
+#define XC_draped_box 48
+#define XC_exchange 50
+#define XC_fleur 52
+#define XC_gobbler 54
+#define XC_gumby 56
+#define XC_hand1 58
+#define XC_hand2 60
+#define XC_heart 62
+#define XC_icon 64
+#define XC_iron_cross 66
+#define XC_left_ptr 68
+#define XC_left_side 70
+#define XC_left_tee 72
+#define XC_leftbutton 74
+#define XC_ll_angle 76
+#define XC_lr_angle 78
+#define XC_man 80
+#define XC_middlebutton 82
+#define XC_mouse 84
+#define XC_pencil 86
+#define XC_pirate 88
+#define XC_plus 90
+#define XC_question_arrow 92
+#define XC_right_ptr 94
+#define XC_right_side 96
+#define XC_right_tee 98
+#define XC_rightbutton 100
+#define XC_rtl_logo 102
+#define XC_sailboat 104
+#define XC_sb_down_arrow 106
+#define XC_sb_h_double_arrow 108
+#define XC_sb_left_arrow 110
+#define XC_sb_right_arrow 112
+#define XC_sb_up_arrow 114
+#define XC_sb_v_double_arrow 116
+#define XC_shuttle 118
+#define XC_sizing 120
+#define XC_spider 122
+#define XC_spraycan 124
+#define XC_star 126
+#define XC_target 128
+#define XC_tcross 130
+#define XC_top_left_arrow 132
+#define XC_top_left_corner 134
+#define XC_top_right_corner 136
+#define XC_top_side 138
+#define XC_top_tee 140
+#define XC_trek 142
+#define XC_ul_angle 144
+#define XC_umbrella 146
+#define XC_ur_angle 148
+#define XC_watch 150
+#define XC_xterm 152
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/keysym.h b/Master/tlpkg/tlperl/lib/Tk/X11/keysym.h
new file mode 100644
index 00000000000..027afe08d5f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/keysym.h
@@ -0,0 +1,39 @@
+/* $XConsortium: keysym.h,v 1.13 91/03/13 20:09:49 rws Exp $ */
+
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/* default keysyms */
+#define XK_MISCELLANY
+#define XK_LATIN1
+#define XK_LATIN2
+#define XK_LATIN3
+#define XK_LATIN4
+#define XK_GREEK
+
+#ifdef MAC_TCL
+#include <keysymdef.h>
+#else
+#include <X11/keysymdef.h>
+#endif
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/keysymdef.h b/Master/tlpkg/tlperl/lib/Tk/X11/keysymdef.h
new file mode 100644
index 00000000000..b22d41b3385
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/keysymdef.h
@@ -0,0 +1,1169 @@
+/* $XConsortium: keysymdef.h,v 1.15 93/04/02 10:57:36 rws Exp $ */
+
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#define XK_VoidSymbol 0xFFFFFF /* void symbol */
+
+#ifdef XK_MISCELLANY
+/*
+ * TTY Functions, cleverly chosen to map to ascii, for convenience of
+ * programming, but could have been arbitrary (at the cost of lookup
+ * tables in client code.
+ */
+
+#define XK_BackSpace 0xFF08 /* back space, back char */
+#define XK_Tab 0xFF09
+#define XK_Linefeed 0xFF0A /* Linefeed, LF */
+#define XK_Clear 0xFF0B
+#define XK_Return 0xFF0D /* Return, enter */
+#define XK_Pause 0xFF13 /* Pause, hold */
+#define XK_Scroll_Lock 0xFF14
+#define XK_Sys_Req 0xFF15
+#define XK_Escape 0xFF1B
+#define XK_Delete 0xFFFF /* Delete, rubout */
+
+
+
+/* International & multi-key character composition */
+
+#define XK_Multi_key 0xFF20 /* Multi-key character compose */
+
+/* Japanese keyboard support */
+
+#define XK_Kanji 0xFF21 /* Kanji, Kanji convert */
+#define XK_Muhenkan 0xFF22 /* Cancel Conversion */
+#define XK_Henkan_Mode 0xFF23 /* Start/Stop Conversion */
+#define XK_Henkan 0xFF23 /* Alias for Henkan_Mode */
+#define XK_Romaji 0xFF24 /* to Romaji */
+#define XK_Hiragana 0xFF25 /* to Hiragana */
+#define XK_Katakana 0xFF26 /* to Katakana */
+#define XK_Hiragana_Katakana 0xFF27 /* Hiragana/Katakana toggle */
+#define XK_Zenkaku 0xFF28 /* to Zenkaku */
+#define XK_Hankaku 0xFF29 /* to Hankaku */
+#define XK_Zenkaku_Hankaku 0xFF2A /* Zenkaku/Hankaku toggle */
+#define XK_Touroku 0xFF2B /* Add to Dictionary */
+#define XK_Massyo 0xFF2C /* Delete from Dictionary */
+#define XK_Kana_Lock 0xFF2D /* Kana Lock */
+#define XK_Kana_Shift 0xFF2E /* Kana Shift */
+#define XK_Eisu_Shift 0xFF2F /* Alphanumeric Shift */
+#define XK_Eisu_toggle 0xFF30 /* Alphanumeric toggle */
+
+/* Cursor control & motion */
+
+#define XK_Home 0xFF50
+#define XK_Left 0xFF51 /* Move left, left arrow */
+#define XK_Up 0xFF52 /* Move up, up arrow */
+#define XK_Right 0xFF53 /* Move right, right arrow */
+#define XK_Down 0xFF54 /* Move down, down arrow */
+#define XK_Prior 0xFF55 /* Prior, previous */
+#define XK_Page_Up 0xFF55
+#define XK_Next 0xFF56 /* Next */
+#define XK_Page_Down 0xFF56
+#define XK_End 0xFF57 /* EOL */
+#define XK_Begin 0xFF58 /* BOL */
+
+/* Special Windows keyboard keys */
+
+#define XK_Win_L 0xFF5B /* Left-hand Windows */
+#define XK_Win_R 0xFF5C /* Right-hand Windows */
+#define XK_App 0xFF5D /* Menu key */
+
+/* Misc Functions */
+
+#define XK_Select 0xFF60 /* Select, mark */
+#define XK_Print 0xFF61
+#define XK_Execute 0xFF62 /* Execute, run, do */
+#define XK_Insert 0xFF63 /* Insert, insert here */
+#define XK_Undo 0xFF65 /* Undo, oops */
+#define XK_Redo 0xFF66 /* redo, again */
+#define XK_Menu 0xFF67
+#define XK_Find 0xFF68 /* Find, search */
+#define XK_Cancel 0xFF69 /* Cancel, stop, abort, exit */
+#define XK_Help 0xFF6A /* Help, ? */
+#define XK_Break 0xFF6B
+#define XK_Mode_switch 0xFF7E /* Character set switch */
+#define XK_script_switch 0xFF7E /* Alias for mode_switch */
+#define XK_Num_Lock 0xFF7F
+
+/* Keypad Functions, keypad numbers cleverly chosen to map to ascii */
+
+#define XK_KP_Space 0xFF80 /* space */
+#define XK_KP_Tab 0xFF89
+#define XK_KP_Enter 0xFF8D /* enter */
+#define XK_KP_F1 0xFF91 /* PF1, KP_A, ... */
+#define XK_KP_F2 0xFF92
+#define XK_KP_F3 0xFF93
+#define XK_KP_F4 0xFF94
+#define XK_KP_Home 0xFF95
+#define XK_KP_Left 0xFF96
+#define XK_KP_Up 0xFF97
+#define XK_KP_Right 0xFF98
+#define XK_KP_Down 0xFF99
+#define XK_KP_Prior 0xFF9A
+#define XK_KP_Page_Up 0xFF9A
+#define XK_KP_Next 0xFF9B
+#define XK_KP_Page_Down 0xFF9B
+#define XK_KP_End 0xFF9C
+#define XK_KP_Begin 0xFF9D
+#define XK_KP_Insert 0xFF9E
+#define XK_KP_Delete 0xFF9F
+#define XK_KP_Equal 0xFFBD /* equals */
+#define XK_KP_Multiply 0xFFAA
+#define XK_KP_Add 0xFFAB
+#define XK_KP_Separator 0xFFAC /* separator, often comma */
+#define XK_KP_Subtract 0xFFAD
+#define XK_KP_Decimal 0xFFAE
+#define XK_KP_Divide 0xFFAF
+
+#define XK_KP_0 0xFFB0
+#define XK_KP_1 0xFFB1
+#define XK_KP_2 0xFFB2
+#define XK_KP_3 0xFFB3
+#define XK_KP_4 0xFFB4
+#define XK_KP_5 0xFFB5
+#define XK_KP_6 0xFFB6
+#define XK_KP_7 0xFFB7
+#define XK_KP_8 0xFFB8
+#define XK_KP_9 0xFFB9
+
+
+
+/*
+ * Auxilliary Functions; note the duplicate definitions for left and right
+ * function keys; Sun keyboards and a few other manufactures have such
+ * function key groups on the left and/or right sides of the keyboard.
+ * We've not found a keyboard with more than 35 function keys total.
+ */
+
+#define XK_F1 0xFFBE
+#define XK_F2 0xFFBF
+#define XK_F3 0xFFC0
+#define XK_F4 0xFFC1
+#define XK_F5 0xFFC2
+#define XK_F6 0xFFC3
+#define XK_F7 0xFFC4
+#define XK_F8 0xFFC5
+#define XK_F9 0xFFC6
+#define XK_F10 0xFFC7
+#define XK_F11 0xFFC8
+#define XK_L1 0xFFC8
+#define XK_F12 0xFFC9
+#define XK_L2 0xFFC9
+#define XK_F13 0xFFCA
+#define XK_L3 0xFFCA
+#define XK_F14 0xFFCB
+#define XK_L4 0xFFCB
+#define XK_F15 0xFFCC
+#define XK_L5 0xFFCC
+#define XK_F16 0xFFCD
+#define XK_L6 0xFFCD
+#define XK_F17 0xFFCE
+#define XK_L7 0xFFCE
+#define XK_F18 0xFFCF
+#define XK_L8 0xFFCF
+#define XK_F19 0xFFD0
+#define XK_L9 0xFFD0
+#define XK_F20 0xFFD1
+#define XK_L10 0xFFD1
+#define XK_F21 0xFFD2
+#define XK_R1 0xFFD2
+#define XK_F22 0xFFD3
+#define XK_R2 0xFFD3
+#define XK_F23 0xFFD4
+#define XK_R3 0xFFD4
+#define XK_F24 0xFFD5
+#define XK_R4 0xFFD5
+#define XK_F25 0xFFD6
+#define XK_R5 0xFFD6
+#define XK_F26 0xFFD7
+#define XK_R6 0xFFD7
+#define XK_F27 0xFFD8
+#define XK_R7 0xFFD8
+#define XK_F28 0xFFD9
+#define XK_R8 0xFFD9
+#define XK_F29 0xFFDA
+#define XK_R9 0xFFDA
+#define XK_F30 0xFFDB
+#define XK_R10 0xFFDB
+#define XK_F31 0xFFDC
+#define XK_R11 0xFFDC
+#define XK_F32 0xFFDD
+#define XK_R12 0xFFDD
+#define XK_F33 0xFFDE
+#define XK_R13 0xFFDE
+#define XK_F34 0xFFDF
+#define XK_R14 0xFFDF
+#define XK_F35 0xFFE0
+#define XK_R15 0xFFE0
+
+/* Modifiers */
+
+#define XK_Shift_L 0xFFE1 /* Left shift */
+#define XK_Shift_R 0xFFE2 /* Right shift */
+#define XK_Control_L 0xFFE3 /* Left control */
+#define XK_Control_R 0xFFE4 /* Right control */
+#define XK_Caps_Lock 0xFFE5 /* Caps lock */
+#define XK_Shift_Lock 0xFFE6 /* Shift lock */
+
+#define XK_Meta_L 0xFFE7 /* Left meta */
+#define XK_Meta_R 0xFFE8 /* Right meta */
+#define XK_Alt_L 0xFFE9 /* Left alt */
+#define XK_Alt_R 0xFFEA /* Right alt */
+#define XK_Super_L 0xFFEB /* Left super */
+#define XK_Super_R 0xFFEC /* Right super */
+#define XK_Hyper_L 0xFFED /* Left hyper */
+#define XK_Hyper_R 0xFFEE /* Right hyper */
+#endif /* XK_MISCELLANY */
+
+/*
+ * Latin 1
+ * Byte 3 = 0
+ */
+#ifdef XK_LATIN1
+#define XK_space 0x020
+#define XK_exclam 0x021
+#define XK_quotedbl 0x022
+#define XK_numbersign 0x023
+#define XK_dollar 0x024
+#define XK_percent 0x025
+#define XK_ampersand 0x026
+#define XK_apostrophe 0x027
+#define XK_quoteright 0x027 /* deprecated */
+#define XK_parenleft 0x028
+#define XK_parenright 0x029
+#define XK_asterisk 0x02a
+#define XK_plus 0x02b
+#define XK_comma 0x02c
+#define XK_minus 0x02d
+#define XK_period 0x02e
+#define XK_slash 0x02f
+#define XK_0 0x030
+#define XK_1 0x031
+#define XK_2 0x032
+#define XK_3 0x033
+#define XK_4 0x034
+#define XK_5 0x035
+#define XK_6 0x036
+#define XK_7 0x037
+#define XK_8 0x038
+#define XK_9 0x039
+#define XK_colon 0x03a
+#define XK_semicolon 0x03b
+#define XK_less 0x03c
+#define XK_equal 0x03d
+#define XK_greater 0x03e
+#define XK_question 0x03f
+#define XK_at 0x040
+#define XK_A 0x041
+#define XK_B 0x042
+#define XK_C 0x043
+#define XK_D 0x044
+#define XK_E 0x045
+#define XK_F 0x046
+#define XK_G 0x047
+#define XK_H 0x048
+#define XK_I 0x049
+#define XK_J 0x04a
+#define XK_K 0x04b
+#define XK_L 0x04c
+#define XK_M 0x04d
+#define XK_N 0x04e
+#define XK_O 0x04f
+#define XK_P 0x050
+#define XK_Q 0x051
+#define XK_R 0x052
+#define XK_S 0x053
+#define XK_T 0x054
+#define XK_U 0x055
+#define XK_V 0x056
+#define XK_W 0x057
+#define XK_X 0x058
+#define XK_Y 0x059
+#define XK_Z 0x05a
+#define XK_bracketleft 0x05b
+#define XK_backslash 0x05c
+#define XK_bracketright 0x05d
+#define XK_asciicircum 0x05e
+#define XK_underscore 0x05f
+#define XK_grave 0x060
+#define XK_quoteleft 0x060 /* deprecated */
+#define XK_a 0x061
+#define XK_b 0x062
+#define XK_c 0x063
+#define XK_d 0x064
+#define XK_e 0x065
+#define XK_f 0x066
+#define XK_g 0x067
+#define XK_h 0x068
+#define XK_i 0x069
+#define XK_j 0x06a
+#define XK_k 0x06b
+#define XK_l 0x06c
+#define XK_m 0x06d
+#define XK_n 0x06e
+#define XK_o 0x06f
+#define XK_p 0x070
+#define XK_q 0x071
+#define XK_r 0x072
+#define XK_s 0x073
+#define XK_t 0x074
+#define XK_u 0x075
+#define XK_v 0x076
+#define XK_w 0x077
+#define XK_x 0x078
+#define XK_y 0x079
+#define XK_z 0x07a
+#define XK_braceleft 0x07b
+#define XK_bar 0x07c
+#define XK_braceright 0x07d
+#define XK_asciitilde 0x07e
+
+#define XK_nobreakspace 0x0a0
+#define XK_exclamdown 0x0a1
+#define XK_cent 0x0a2
+#define XK_sterling 0x0a3
+#define XK_currency 0x0a4
+#define XK_yen 0x0a5
+#define XK_brokenbar 0x0a6
+#define XK_section 0x0a7
+#define XK_diaeresis 0x0a8
+#define XK_copyright 0x0a9
+#define XK_ordfeminine 0x0aa
+#define XK_guillemotleft 0x0ab /* left angle quotation mark */
+#define XK_notsign 0x0ac
+#define XK_hyphen 0x0ad
+#define XK_registered 0x0ae
+#define XK_macron 0x0af
+#define XK_degree 0x0b0
+#define XK_plusminus 0x0b1
+#define XK_twosuperior 0x0b2
+#define XK_threesuperior 0x0b3
+#define XK_acute 0x0b4
+#define XK_mu 0x0b5
+#define XK_paragraph 0x0b6
+#define XK_periodcentered 0x0b7
+#define XK_cedilla 0x0b8
+#define XK_onesuperior 0x0b9
+#define XK_masculine 0x0ba
+#define XK_guillemotright 0x0bb /* right angle quotation mark */
+#define XK_onequarter 0x0bc
+#define XK_onehalf 0x0bd
+#define XK_threequarters 0x0be
+#define XK_questiondown 0x0bf
+#define XK_Agrave 0x0c0
+#define XK_Aacute 0x0c1
+#define XK_Acircumflex 0x0c2
+#define XK_Atilde 0x0c3
+#define XK_Adiaeresis 0x0c4
+#define XK_Aring 0x0c5
+#define XK_AE 0x0c6
+#define XK_Ccedilla 0x0c7
+#define XK_Egrave 0x0c8
+#define XK_Eacute 0x0c9
+#define XK_Ecircumflex 0x0ca
+#define XK_Ediaeresis 0x0cb
+#define XK_Igrave 0x0cc
+#define XK_Iacute 0x0cd
+#define XK_Icircumflex 0x0ce
+#define XK_Idiaeresis 0x0cf
+#define XK_ETH 0x0d0
+#define XK_Eth 0x0d0 /* deprecated */
+#define XK_Ntilde 0x0d1
+#define XK_Ograve 0x0d2
+#define XK_Oacute 0x0d3
+#define XK_Ocircumflex 0x0d4
+#define XK_Otilde 0x0d5
+#define XK_Odiaeresis 0x0d6
+#define XK_multiply 0x0d7
+#define XK_Ooblique 0x0d8
+#define XK_Ugrave 0x0d9
+#define XK_Uacute 0x0da
+#define XK_Ucircumflex 0x0db
+#define XK_Udiaeresis 0x0dc
+#define XK_Yacute 0x0dd
+#define XK_THORN 0x0de
+#define XK_Thorn 0x0de /* deprecated */
+#define XK_ssharp 0x0df
+#define XK_agrave 0x0e0
+#define XK_aacute 0x0e1
+#define XK_acircumflex 0x0e2
+#define XK_atilde 0x0e3
+#define XK_adiaeresis 0x0e4
+#define XK_aring 0x0e5
+#define XK_ae 0x0e6
+#define XK_ccedilla 0x0e7
+#define XK_egrave 0x0e8
+#define XK_eacute 0x0e9
+#define XK_ecircumflex 0x0ea
+#define XK_ediaeresis 0x0eb
+#define XK_igrave 0x0ec
+#define XK_iacute 0x0ed
+#define XK_icircumflex 0x0ee
+#define XK_idiaeresis 0x0ef
+#define XK_eth 0x0f0
+#define XK_ntilde 0x0f1
+#define XK_ograve 0x0f2
+#define XK_oacute 0x0f3
+#define XK_ocircumflex 0x0f4
+#define XK_otilde 0x0f5
+#define XK_odiaeresis 0x0f6
+#define XK_division 0x0f7
+#define XK_oslash 0x0f8
+#define XK_ugrave 0x0f9
+#define XK_uacute 0x0fa
+#define XK_ucircumflex 0x0fb
+#define XK_udiaeresis 0x0fc
+#define XK_yacute 0x0fd
+#define XK_thorn 0x0fe
+#define XK_ydiaeresis 0x0ff
+#endif /* XK_LATIN1 */
+
+/*
+ * Latin 2
+ * Byte 3 = 1
+ */
+
+#ifdef XK_LATIN2
+#define XK_Aogonek 0x1a1
+#define XK_breve 0x1a2
+#define XK_Lstroke 0x1a3
+#define XK_Lcaron 0x1a5
+#define XK_Sacute 0x1a6
+#define XK_Scaron 0x1a9
+#define XK_Scedilla 0x1aa
+#define XK_Tcaron 0x1ab
+#define XK_Zacute 0x1ac
+#define XK_Zcaron 0x1ae
+#define XK_Zabovedot 0x1af
+#define XK_aogonek 0x1b1
+#define XK_ogonek 0x1b2
+#define XK_lstroke 0x1b3
+#define XK_lcaron 0x1b5
+#define XK_sacute 0x1b6
+#define XK_caron 0x1b7
+#define XK_scaron 0x1b9
+#define XK_scedilla 0x1ba
+#define XK_tcaron 0x1bb
+#define XK_zacute 0x1bc
+#define XK_doubleacute 0x1bd
+#define XK_zcaron 0x1be
+#define XK_zabovedot 0x1bf
+#define XK_Racute 0x1c0
+#define XK_Abreve 0x1c3
+#define XK_Lacute 0x1c5
+#define XK_Cacute 0x1c6
+#define XK_Ccaron 0x1c8
+#define XK_Eogonek 0x1ca
+#define XK_Ecaron 0x1cc
+#define XK_Dcaron 0x1cf
+#define XK_Dstroke 0x1d0
+#define XK_Nacute 0x1d1
+#define XK_Ncaron 0x1d2
+#define XK_Odoubleacute 0x1d5
+#define XK_Rcaron 0x1d8
+#define XK_Uring 0x1d9
+#define XK_Udoubleacute 0x1db
+#define XK_Tcedilla 0x1de
+#define XK_racute 0x1e0
+#define XK_abreve 0x1e3
+#define XK_lacute 0x1e5
+#define XK_cacute 0x1e6
+#define XK_ccaron 0x1e8
+#define XK_eogonek 0x1ea
+#define XK_ecaron 0x1ec
+#define XK_dcaron 0x1ef
+#define XK_dstroke 0x1f0
+#define XK_nacute 0x1f1
+#define XK_ncaron 0x1f2
+#define XK_odoubleacute 0x1f5
+#define XK_udoubleacute 0x1fb
+#define XK_rcaron 0x1f8
+#define XK_uring 0x1f9
+#define XK_tcedilla 0x1fe
+#define XK_abovedot 0x1ff
+#endif /* XK_LATIN2 */
+
+/*
+ * Latin 3
+ * Byte 3 = 2
+ */
+
+#ifdef XK_LATIN3
+#define XK_Hstroke 0x2a1
+#define XK_Hcircumflex 0x2a6
+#define XK_Iabovedot 0x2a9
+#define XK_Gbreve 0x2ab
+#define XK_Jcircumflex 0x2ac
+#define XK_hstroke 0x2b1
+#define XK_hcircumflex 0x2b6
+#define XK_idotless 0x2b9
+#define XK_gbreve 0x2bb
+#define XK_jcircumflex 0x2bc
+#define XK_Cabovedot 0x2c5
+#define XK_Ccircumflex 0x2c6
+#define XK_Gabovedot 0x2d5
+#define XK_Gcircumflex 0x2d8
+#define XK_Ubreve 0x2dd
+#define XK_Scircumflex 0x2de
+#define XK_cabovedot 0x2e5
+#define XK_ccircumflex 0x2e6
+#define XK_gabovedot 0x2f5
+#define XK_gcircumflex 0x2f8
+#define XK_ubreve 0x2fd
+#define XK_scircumflex 0x2fe
+#endif /* XK_LATIN3 */
+
+
+/*
+ * Latin 4
+ * Byte 3 = 3
+ */
+
+#ifdef XK_LATIN4
+#define XK_kra 0x3a2
+#define XK_kappa 0x3a2 /* deprecated */
+#define XK_Rcedilla 0x3a3
+#define XK_Itilde 0x3a5
+#define XK_Lcedilla 0x3a6
+#define XK_Emacron 0x3aa
+#define XK_Gcedilla 0x3ab
+#define XK_Tslash 0x3ac
+#define XK_rcedilla 0x3b3
+#define XK_itilde 0x3b5
+#define XK_lcedilla 0x3b6
+#define XK_emacron 0x3ba
+#define XK_gcedilla 0x3bb
+#define XK_tslash 0x3bc
+#define XK_ENG 0x3bd
+#define XK_eng 0x3bf
+#define XK_Amacron 0x3c0
+#define XK_Iogonek 0x3c7
+#define XK_Eabovedot 0x3cc
+#define XK_Imacron 0x3cf
+#define XK_Ncedilla 0x3d1
+#define XK_Omacron 0x3d2
+#define XK_Kcedilla 0x3d3
+#define XK_Uogonek 0x3d9
+#define XK_Utilde 0x3dd
+#define XK_Umacron 0x3de
+#define XK_amacron 0x3e0
+#define XK_iogonek 0x3e7
+#define XK_eabovedot 0x3ec
+#define XK_imacron 0x3ef
+#define XK_ncedilla 0x3f1
+#define XK_omacron 0x3f2
+#define XK_kcedilla 0x3f3
+#define XK_uogonek 0x3f9
+#define XK_utilde 0x3fd
+#define XK_umacron 0x3fe
+#endif /* XK_LATIN4 */
+
+/*
+ * Katakana
+ * Byte 3 = 4
+ */
+
+#ifdef XK_KATAKANA
+#define XK_overline 0x47e
+#define XK_kana_fullstop 0x4a1
+#define XK_kana_openingbracket 0x4a2
+#define XK_kana_closingbracket 0x4a3
+#define XK_kana_comma 0x4a4
+#define XK_kana_conjunctive 0x4a5
+#define XK_kana_middledot 0x4a5 /* deprecated */
+#define XK_kana_WO 0x4a6
+#define XK_kana_a 0x4a7
+#define XK_kana_i 0x4a8
+#define XK_kana_u 0x4a9
+#define XK_kana_e 0x4aa
+#define XK_kana_o 0x4ab
+#define XK_kana_ya 0x4ac
+#define XK_kana_yu 0x4ad
+#define XK_kana_yo 0x4ae
+#define XK_kana_tsu 0x4af
+#define XK_kana_tu 0x4af /* deprecated */
+#define XK_prolongedsound 0x4b0
+#define XK_kana_A 0x4b1
+#define XK_kana_I 0x4b2
+#define XK_kana_U 0x4b3
+#define XK_kana_E 0x4b4
+#define XK_kana_O 0x4b5
+#define XK_kana_KA 0x4b6
+#define XK_kana_KI 0x4b7
+#define XK_kana_KU 0x4b8
+#define XK_kana_KE 0x4b9
+#define XK_kana_KO 0x4ba
+#define XK_kana_SA 0x4bb
+#define XK_kana_SHI 0x4bc
+#define XK_kana_SU 0x4bd
+#define XK_kana_SE 0x4be
+#define XK_kana_SO 0x4bf
+#define XK_kana_TA 0x4c0
+#define XK_kana_CHI 0x4c1
+#define XK_kana_TI 0x4c1 /* deprecated */
+#define XK_kana_TSU 0x4c2
+#define XK_kana_TU 0x4c2 /* deprecated */
+#define XK_kana_TE 0x4c3
+#define XK_kana_TO 0x4c4
+#define XK_kana_NA 0x4c5
+#define XK_kana_NI 0x4c6
+#define XK_kana_NU 0x4c7
+#define XK_kana_NE 0x4c8
+#define XK_kana_NO 0x4c9
+#define XK_kana_HA 0x4ca
+#define XK_kana_HI 0x4cb
+#define XK_kana_FU 0x4cc
+#define XK_kana_HU 0x4cc /* deprecated */
+#define XK_kana_HE 0x4cd
+#define XK_kana_HO 0x4ce
+#define XK_kana_MA 0x4cf
+#define XK_kana_MI 0x4d0
+#define XK_kana_MU 0x4d1
+#define XK_kana_ME 0x4d2
+#define XK_kana_MO 0x4d3
+#define XK_kana_YA 0x4d4
+#define XK_kana_YU 0x4d5
+#define XK_kana_YO 0x4d6
+#define XK_kana_RA 0x4d7
+#define XK_kana_RI 0x4d8
+#define XK_kana_RU 0x4d9
+#define XK_kana_RE 0x4da
+#define XK_kana_RO 0x4db
+#define XK_kana_WA 0x4dc
+#define XK_kana_N 0x4dd
+#define XK_voicedsound 0x4de
+#define XK_semivoicedsound 0x4df
+#define XK_kana_switch 0xFF7E /* Alias for mode_switch */
+#endif /* XK_KATAKANA */
+
+/*
+ * Arabic
+ * Byte 3 = 5
+ */
+
+#ifdef XK_ARABIC
+#define XK_Arabic_comma 0x5ac
+#define XK_Arabic_semicolon 0x5bb
+#define XK_Arabic_question_mark 0x5bf
+#define XK_Arabic_hamza 0x5c1
+#define XK_Arabic_maddaonalef 0x5c2
+#define XK_Arabic_hamzaonalef 0x5c3
+#define XK_Arabic_hamzaonwaw 0x5c4
+#define XK_Arabic_hamzaunderalef 0x5c5
+#define XK_Arabic_hamzaonyeh 0x5c6
+#define XK_Arabic_alef 0x5c7
+#define XK_Arabic_beh 0x5c8
+#define XK_Arabic_tehmarbuta 0x5c9
+#define XK_Arabic_teh 0x5ca
+#define XK_Arabic_theh 0x5cb
+#define XK_Arabic_jeem 0x5cc
+#define XK_Arabic_hah 0x5cd
+#define XK_Arabic_khah 0x5ce
+#define XK_Arabic_dal 0x5cf
+#define XK_Arabic_thal 0x5d0
+#define XK_Arabic_ra 0x5d1
+#define XK_Arabic_zain 0x5d2
+#define XK_Arabic_seen 0x5d3
+#define XK_Arabic_sheen 0x5d4
+#define XK_Arabic_sad 0x5d5
+#define XK_Arabic_dad 0x5d6
+#define XK_Arabic_tah 0x5d7
+#define XK_Arabic_zah 0x5d8
+#define XK_Arabic_ain 0x5d9
+#define XK_Arabic_ghain 0x5da
+#define XK_Arabic_tatweel 0x5e0
+#define XK_Arabic_feh 0x5e1
+#define XK_Arabic_qaf 0x5e2
+#define XK_Arabic_kaf 0x5e3
+#define XK_Arabic_lam 0x5e4
+#define XK_Arabic_meem 0x5e5
+#define XK_Arabic_noon 0x5e6
+#define XK_Arabic_ha 0x5e7
+#define XK_Arabic_heh 0x5e7 /* deprecated */
+#define XK_Arabic_waw 0x5e8
+#define XK_Arabic_alefmaksura 0x5e9
+#define XK_Arabic_yeh 0x5ea
+#define XK_Arabic_fathatan 0x5eb
+#define XK_Arabic_dammatan 0x5ec
+#define XK_Arabic_kasratan 0x5ed
+#define XK_Arabic_fatha 0x5ee
+#define XK_Arabic_damma 0x5ef
+#define XK_Arabic_kasra 0x5f0
+#define XK_Arabic_shadda 0x5f1
+#define XK_Arabic_sukun 0x5f2
+#define XK_Arabic_switch 0xFF7E /* Alias for mode_switch */
+#endif /* XK_ARABIC */
+
+/*
+ * Cyrillic
+ * Byte 3 = 6
+ */
+#ifdef XK_CYRILLIC
+#define XK_Serbian_dje 0x6a1
+#define XK_Macedonia_gje 0x6a2
+#define XK_Cyrillic_io 0x6a3
+#define XK_Ukrainian_ie 0x6a4
+#define XK_Ukranian_je 0x6a4 /* deprecated */
+#define XK_Macedonia_dse 0x6a5
+#define XK_Ukrainian_i 0x6a6
+#define XK_Ukranian_i 0x6a6 /* deprecated */
+#define XK_Ukrainian_yi 0x6a7
+#define XK_Ukranian_yi 0x6a7 /* deprecated */
+#define XK_Cyrillic_je 0x6a8
+#define XK_Serbian_je 0x6a8 /* deprecated */
+#define XK_Cyrillic_lje 0x6a9
+#define XK_Serbian_lje 0x6a9 /* deprecated */
+#define XK_Cyrillic_nje 0x6aa
+#define XK_Serbian_nje 0x6aa /* deprecated */
+#define XK_Serbian_tshe 0x6ab
+#define XK_Macedonia_kje 0x6ac
+#define XK_Byelorussian_shortu 0x6ae
+#define XK_Cyrillic_dzhe 0x6af
+#define XK_Serbian_dze 0x6af /* deprecated */
+#define XK_numerosign 0x6b0
+#define XK_Serbian_DJE 0x6b1
+#define XK_Macedonia_GJE 0x6b2
+#define XK_Cyrillic_IO 0x6b3
+#define XK_Ukrainian_IE 0x6b4
+#define XK_Ukranian_JE 0x6b4 /* deprecated */
+#define XK_Macedonia_DSE 0x6b5
+#define XK_Ukrainian_I 0x6b6
+#define XK_Ukranian_I 0x6b6 /* deprecated */
+#define XK_Ukrainian_YI 0x6b7
+#define XK_Ukranian_YI 0x6b7 /* deprecated */
+#define XK_Cyrillic_JE 0x6b8
+#define XK_Serbian_JE 0x6b8 /* deprecated */
+#define XK_Cyrillic_LJE 0x6b9
+#define XK_Serbian_LJE 0x6b9 /* deprecated */
+#define XK_Cyrillic_NJE 0x6ba
+#define XK_Serbian_NJE 0x6ba /* deprecated */
+#define XK_Serbian_TSHE 0x6bb
+#define XK_Macedonia_KJE 0x6bc
+#define XK_Byelorussian_SHORTU 0x6be
+#define XK_Cyrillic_DZHE 0x6bf
+#define XK_Serbian_DZE 0x6bf /* deprecated */
+#define XK_Cyrillic_yu 0x6c0
+#define XK_Cyrillic_a 0x6c1
+#define XK_Cyrillic_be 0x6c2
+#define XK_Cyrillic_tse 0x6c3
+#define XK_Cyrillic_de 0x6c4
+#define XK_Cyrillic_ie 0x6c5
+#define XK_Cyrillic_ef 0x6c6
+#define XK_Cyrillic_ghe 0x6c7
+#define XK_Cyrillic_ha 0x6c8
+#define XK_Cyrillic_i 0x6c9
+#define XK_Cyrillic_shorti 0x6ca
+#define XK_Cyrillic_ka 0x6cb
+#define XK_Cyrillic_el 0x6cc
+#define XK_Cyrillic_em 0x6cd
+#define XK_Cyrillic_en 0x6ce
+#define XK_Cyrillic_o 0x6cf
+#define XK_Cyrillic_pe 0x6d0
+#define XK_Cyrillic_ya 0x6d1
+#define XK_Cyrillic_er 0x6d2
+#define XK_Cyrillic_es 0x6d3
+#define XK_Cyrillic_te 0x6d4
+#define XK_Cyrillic_u 0x6d5
+#define XK_Cyrillic_zhe 0x6d6
+#define XK_Cyrillic_ve 0x6d7
+#define XK_Cyrillic_softsign 0x6d8
+#define XK_Cyrillic_yeru 0x6d9
+#define XK_Cyrillic_ze 0x6da
+#define XK_Cyrillic_sha 0x6db
+#define XK_Cyrillic_e 0x6dc
+#define XK_Cyrillic_shcha 0x6dd
+#define XK_Cyrillic_che 0x6de
+#define XK_Cyrillic_hardsign 0x6df
+#define XK_Cyrillic_YU 0x6e0
+#define XK_Cyrillic_A 0x6e1
+#define XK_Cyrillic_BE 0x6e2
+#define XK_Cyrillic_TSE 0x6e3
+#define XK_Cyrillic_DE 0x6e4
+#define XK_Cyrillic_IE 0x6e5
+#define XK_Cyrillic_EF 0x6e6
+#define XK_Cyrillic_GHE 0x6e7
+#define XK_Cyrillic_HA 0x6e8
+#define XK_Cyrillic_I 0x6e9
+#define XK_Cyrillic_SHORTI 0x6ea
+#define XK_Cyrillic_KA 0x6eb
+#define XK_Cyrillic_EL 0x6ec
+#define XK_Cyrillic_EM 0x6ed
+#define XK_Cyrillic_EN 0x6ee
+#define XK_Cyrillic_O 0x6ef
+#define XK_Cyrillic_PE 0x6f0
+#define XK_Cyrillic_YA 0x6f1
+#define XK_Cyrillic_ER 0x6f2
+#define XK_Cyrillic_ES 0x6f3
+#define XK_Cyrillic_TE 0x6f4
+#define XK_Cyrillic_U 0x6f5
+#define XK_Cyrillic_ZHE 0x6f6
+#define XK_Cyrillic_VE 0x6f7
+#define XK_Cyrillic_SOFTSIGN 0x6f8
+#define XK_Cyrillic_YERU 0x6f9
+#define XK_Cyrillic_ZE 0x6fa
+#define XK_Cyrillic_SHA 0x6fb
+#define XK_Cyrillic_E 0x6fc
+#define XK_Cyrillic_SHCHA 0x6fd
+#define XK_Cyrillic_CHE 0x6fe
+#define XK_Cyrillic_HARDSIGN 0x6ff
+#endif /* XK_CYRILLIC */
+
+/*
+ * Greek
+ * Byte 3 = 7
+ */
+
+#ifdef XK_GREEK
+#define XK_Greek_ALPHAaccent 0x7a1
+#define XK_Greek_EPSILONaccent 0x7a2
+#define XK_Greek_ETAaccent 0x7a3
+#define XK_Greek_IOTAaccent 0x7a4
+#define XK_Greek_IOTAdiaeresis 0x7a5
+#define XK_Greek_OMICRONaccent 0x7a7
+#define XK_Greek_UPSILONaccent 0x7a8
+#define XK_Greek_UPSILONdieresis 0x7a9
+#define XK_Greek_OMEGAaccent 0x7ab
+#define XK_Greek_accentdieresis 0x7ae
+#define XK_Greek_horizbar 0x7af
+#define XK_Greek_alphaaccent 0x7b1
+#define XK_Greek_epsilonaccent 0x7b2
+#define XK_Greek_etaaccent 0x7b3
+#define XK_Greek_iotaaccent 0x7b4
+#define XK_Greek_iotadieresis 0x7b5
+#define XK_Greek_iotaaccentdieresis 0x7b6
+#define XK_Greek_omicronaccent 0x7b7
+#define XK_Greek_upsilonaccent 0x7b8
+#define XK_Greek_upsilondieresis 0x7b9
+#define XK_Greek_upsilonaccentdieresis 0x7ba
+#define XK_Greek_omegaaccent 0x7bb
+#define XK_Greek_ALPHA 0x7c1
+#define XK_Greek_BETA 0x7c2
+#define XK_Greek_GAMMA 0x7c3
+#define XK_Greek_DELTA 0x7c4
+#define XK_Greek_EPSILON 0x7c5
+#define XK_Greek_ZETA 0x7c6
+#define XK_Greek_ETA 0x7c7
+#define XK_Greek_THETA 0x7c8
+#define XK_Greek_IOTA 0x7c9
+#define XK_Greek_KAPPA 0x7ca
+#define XK_Greek_LAMDA 0x7cb
+#define XK_Greek_LAMBDA 0x7cb
+#define XK_Greek_MU 0x7cc
+#define XK_Greek_NU 0x7cd
+#define XK_Greek_XI 0x7ce
+#define XK_Greek_OMICRON 0x7cf
+#define XK_Greek_PI 0x7d0
+#define XK_Greek_RHO 0x7d1
+#define XK_Greek_SIGMA 0x7d2
+#define XK_Greek_TAU 0x7d4
+#define XK_Greek_UPSILON 0x7d5
+#define XK_Greek_PHI 0x7d6
+#define XK_Greek_CHI 0x7d7
+#define XK_Greek_PSI 0x7d8
+#define XK_Greek_OMEGA 0x7d9
+#define XK_Greek_alpha 0x7e1
+#define XK_Greek_beta 0x7e2
+#define XK_Greek_gamma 0x7e3
+#define XK_Greek_delta 0x7e4
+#define XK_Greek_epsilon 0x7e5
+#define XK_Greek_zeta 0x7e6
+#define XK_Greek_eta 0x7e7
+#define XK_Greek_theta 0x7e8
+#define XK_Greek_iota 0x7e9
+#define XK_Greek_kappa 0x7ea
+#define XK_Greek_lamda 0x7eb
+#define XK_Greek_lambda 0x7eb
+#define XK_Greek_mu 0x7ec
+#define XK_Greek_nu 0x7ed
+#define XK_Greek_xi 0x7ee
+#define XK_Greek_omicron 0x7ef
+#define XK_Greek_pi 0x7f0
+#define XK_Greek_rho 0x7f1
+#define XK_Greek_sigma 0x7f2
+#define XK_Greek_finalsmallsigma 0x7f3
+#define XK_Greek_tau 0x7f4
+#define XK_Greek_upsilon 0x7f5
+#define XK_Greek_phi 0x7f6
+#define XK_Greek_chi 0x7f7
+#define XK_Greek_psi 0x7f8
+#define XK_Greek_omega 0x7f9
+#define XK_Greek_switch 0xFF7E /* Alias for mode_switch */
+#endif /* XK_GREEK */
+
+/*
+ * Technical
+ * Byte 3 = 8
+ */
+
+#ifdef XK_TECHNICAL
+#define XK_leftradical 0x8a1
+#define XK_topleftradical 0x8a2
+#define XK_horizconnector 0x8a3
+#define XK_topintegral 0x8a4
+#define XK_botintegral 0x8a5
+#define XK_vertconnector 0x8a6
+#define XK_topleftsqbracket 0x8a7
+#define XK_botleftsqbracket 0x8a8
+#define XK_toprightsqbracket 0x8a9
+#define XK_botrightsqbracket 0x8aa
+#define XK_topleftparens 0x8ab
+#define XK_botleftparens 0x8ac
+#define XK_toprightparens 0x8ad
+#define XK_botrightparens 0x8ae
+#define XK_leftmiddlecurlybrace 0x8af
+#define XK_rightmiddlecurlybrace 0x8b0
+#define XK_topleftsummation 0x8b1
+#define XK_botleftsummation 0x8b2
+#define XK_topvertsummationconnector 0x8b3
+#define XK_botvertsummationconnector 0x8b4
+#define XK_toprightsummation 0x8b5
+#define XK_botrightsummation 0x8b6
+#define XK_rightmiddlesummation 0x8b7
+#define XK_lessthanequal 0x8bc
+#define XK_notequal 0x8bd
+#define XK_greaterthanequal 0x8be
+#define XK_integral 0x8bf
+#define XK_therefore 0x8c0
+#define XK_variation 0x8c1
+#define XK_infinity 0x8c2
+#define XK_nabla 0x8c5
+#define XK_approximate 0x8c8
+#define XK_similarequal 0x8c9
+#define XK_ifonlyif 0x8cd
+#define XK_implies 0x8ce
+#define XK_identical 0x8cf
+#define XK_radical 0x8d6
+#define XK_includedin 0x8da
+#define XK_includes 0x8db
+#define XK_intersection 0x8dc
+#define XK_union 0x8dd
+#define XK_logicaland 0x8de
+#define XK_logicalor 0x8df
+#define XK_partialderivative 0x8ef
+#define XK_function 0x8f6
+#define XK_leftarrow 0x8fb
+#define XK_uparrow 0x8fc
+#define XK_rightarrow 0x8fd
+#define XK_downarrow 0x8fe
+#endif /* XK_TECHNICAL */
+
+/*
+ * Special
+ * Byte 3 = 9
+ */
+
+#ifdef XK_SPECIAL
+#define XK_blank 0x9df
+#define XK_soliddiamond 0x9e0
+#define XK_checkerboard 0x9e1
+#define XK_ht 0x9e2
+#define XK_ff 0x9e3
+#define XK_cr 0x9e4
+#define XK_lf 0x9e5
+#define XK_nl 0x9e8
+#define XK_vt 0x9e9
+#define XK_lowrightcorner 0x9ea
+#define XK_uprightcorner 0x9eb
+#define XK_upleftcorner 0x9ec
+#define XK_lowleftcorner 0x9ed
+#define XK_crossinglines 0x9ee
+#define XK_horizlinescan1 0x9ef
+#define XK_horizlinescan3 0x9f0
+#define XK_horizlinescan5 0x9f1
+#define XK_horizlinescan7 0x9f2
+#define XK_horizlinescan9 0x9f3
+#define XK_leftt 0x9f4
+#define XK_rightt 0x9f5
+#define XK_bott 0x9f6
+#define XK_topt 0x9f7
+#define XK_vertbar 0x9f8
+#endif /* XK_SPECIAL */
+
+/*
+ * Publishing
+ * Byte 3 = a
+ */
+
+#ifdef XK_PUBLISHING
+#define XK_emspace 0xaa1
+#define XK_enspace 0xaa2
+#define XK_em3space 0xaa3
+#define XK_em4space 0xaa4
+#define XK_digitspace 0xaa5
+#define XK_punctspace 0xaa6
+#define XK_thinspace 0xaa7
+#define XK_hairspace 0xaa8
+#define XK_emdash 0xaa9
+#define XK_endash 0xaaa
+#define XK_signifblank 0xaac
+#define XK_ellipsis 0xaae
+#define XK_doubbaselinedot 0xaaf
+#define XK_onethird 0xab0
+#define XK_twothirds 0xab1
+#define XK_onefifth 0xab2
+#define XK_twofifths 0xab3
+#define XK_threefifths 0xab4
+#define XK_fourfifths 0xab5
+#define XK_onesixth 0xab6
+#define XK_fivesixths 0xab7
+#define XK_careof 0xab8
+#define XK_figdash 0xabb
+#define XK_leftanglebracket 0xabc
+#define XK_decimalpoint 0xabd
+#define XK_rightanglebracket 0xabe
+#define XK_marker 0xabf
+#define XK_oneeighth 0xac3
+#define XK_threeeighths 0xac4
+#define XK_fiveeighths 0xac5
+#define XK_seveneighths 0xac6
+#define XK_trademark 0xac9
+#define XK_signaturemark 0xaca
+#define XK_trademarkincircle 0xacb
+#define XK_leftopentriangle 0xacc
+#define XK_rightopentriangle 0xacd
+#define XK_emopencircle 0xace
+#define XK_emopenrectangle 0xacf
+#define XK_leftsinglequotemark 0xad0
+#define XK_rightsinglequotemark 0xad1
+#define XK_leftdoublequotemark 0xad2
+#define XK_rightdoublequotemark 0xad3
+#define XK_prescription 0xad4
+#define XK_minutes 0xad6
+#define XK_seconds 0xad7
+#define XK_latincross 0xad9
+#define XK_hexagram 0xada
+#define XK_filledrectbullet 0xadb
+#define XK_filledlefttribullet 0xadc
+#define XK_filledrighttribullet 0xadd
+#define XK_emfilledcircle 0xade
+#define XK_emfilledrect 0xadf
+#define XK_enopencircbullet 0xae0
+#define XK_enopensquarebullet 0xae1
+#define XK_openrectbullet 0xae2
+#define XK_opentribulletup 0xae3
+#define XK_opentribulletdown 0xae4
+#define XK_openstar 0xae5
+#define XK_enfilledcircbullet 0xae6
+#define XK_enfilledsqbullet 0xae7
+#define XK_filledtribulletup 0xae8
+#define XK_filledtribulletdown 0xae9
+#define XK_leftpointer 0xaea
+#define XK_rightpointer 0xaeb
+#define XK_club 0xaec
+#define XK_diamond 0xaed
+#define XK_heart 0xaee
+#define XK_maltesecross 0xaf0
+#define XK_dagger 0xaf1
+#define XK_doubledagger 0xaf2
+#define XK_checkmark 0xaf3
+#define XK_ballotcross 0xaf4
+#define XK_musicalsharp 0xaf5
+#define XK_musicalflat 0xaf6
+#define XK_malesymbol 0xaf7
+#define XK_femalesymbol 0xaf8
+#define XK_telephone 0xaf9
+#define XK_telephonerecorder 0xafa
+#define XK_phonographcopyright 0xafb
+#define XK_caret 0xafc
+#define XK_singlelowquotemark 0xafd
+#define XK_doublelowquotemark 0xafe
+#define XK_cursor 0xaff
+#endif /* XK_PUBLISHING */
+
+/*
+ * APL
+ * Byte 3 = b
+ */
+
+#ifdef XK_APL
+#define XK_leftcaret 0xba3
+#define XK_rightcaret 0xba6
+#define XK_downcaret 0xba8
+#define XK_upcaret 0xba9
+#define XK_overbar 0xbc0
+#define XK_downtack 0xbc2
+#define XK_upshoe 0xbc3
+#define XK_downstile 0xbc4
+#define XK_underbar 0xbc6
+#define XK_jot 0xbca
+#define XK_quad 0xbcc
+#define XK_uptack 0xbce
+#define XK_circle 0xbcf
+#define XK_upstile 0xbd3
+#define XK_downshoe 0xbd6
+#define XK_rightshoe 0xbd8
+#define XK_leftshoe 0xbda
+#define XK_lefttack 0xbdc
+#define XK_righttack 0xbfc
+#endif /* XK_APL */
+
+/*
+ * Hebrew
+ * Byte 3 = c
+ */
+
+#ifdef XK_HEBREW
+#define XK_hebrew_doublelowline 0xcdf
+#define XK_hebrew_aleph 0xce0
+#define XK_hebrew_bet 0xce1
+#define XK_hebrew_beth 0xce1 /* deprecated */
+#define XK_hebrew_gimel 0xce2
+#define XK_hebrew_gimmel 0xce2 /* deprecated */
+#define XK_hebrew_dalet 0xce3
+#define XK_hebrew_daleth 0xce3 /* deprecated */
+#define XK_hebrew_he 0xce4
+#define XK_hebrew_waw 0xce5
+#define XK_hebrew_zain 0xce6
+#define XK_hebrew_zayin 0xce6 /* deprecated */
+#define XK_hebrew_chet 0xce7
+#define XK_hebrew_het 0xce7 /* deprecated */
+#define XK_hebrew_tet 0xce8
+#define XK_hebrew_teth 0xce8 /* deprecated */
+#define XK_hebrew_yod 0xce9
+#define XK_hebrew_finalkaph 0xcea
+#define XK_hebrew_kaph 0xceb
+#define XK_hebrew_lamed 0xcec
+#define XK_hebrew_finalmem 0xced
+#define XK_hebrew_mem 0xcee
+#define XK_hebrew_finalnun 0xcef
+#define XK_hebrew_nun 0xcf0
+#define XK_hebrew_samech 0xcf1
+#define XK_hebrew_samekh 0xcf1 /* deprecated */
+#define XK_hebrew_ayin 0xcf2
+#define XK_hebrew_finalpe 0xcf3
+#define XK_hebrew_pe 0xcf4
+#define XK_hebrew_finalzade 0xcf5
+#define XK_hebrew_finalzadi 0xcf5 /* deprecated */
+#define XK_hebrew_zade 0xcf6
+#define XK_hebrew_zadi 0xcf6 /* deprecated */
+#define XK_hebrew_qoph 0xcf7
+#define XK_hebrew_kuf 0xcf7 /* deprecated */
+#define XK_hebrew_resh 0xcf8
+#define XK_hebrew_shin 0xcf9
+#define XK_hebrew_taw 0xcfa
+#define XK_hebrew_taf 0xcfa /* deprecated */
+#define XK_Hebrew_switch 0xFF7E /* Alias for mode_switch */
+#endif /* XK_HEBREW */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11/license.terms b/Master/tlpkg/tlperl/lib/Tk/X11/license.terms
new file mode 100644
index 00000000000..03ca6fcb319
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11/license.terms
@@ -0,0 +1,39 @@
+This software is copyrighted by the Regents of the University of
+California, Sun Microsystems, Inc., and other parties. The following
+terms apply to all files associated with the software unless explicitly
+disclaimed in individual files.
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
+IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
+
+GOVERNMENT USE: If you are acquiring this software on behalf of the
+U.S. government, the Government shall have only "Restricted Rights"
+in the software and related documentation as defined in the Federal
+Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
+are acquiring the software on behalf of the Department of Defense, the
+software shall be classified as "Commercial Computer Software" and the
+Government shall have only "Restricted Rights" as defined in Clause
+252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
+authors grant the U.S. Government and others acting in its behalf
+permission to use and distribute the software in accordance with the
+terms specified in this license.
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11Font.pm b/Master/tlpkg/tlperl/lib/Tk/X11Font.pm
new file mode 100644
index 00000000000..870dfd4b7dc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11Font.pm
@@ -0,0 +1,184 @@
+package Tk::X11Font;
+use vars qw($VERSION);
+$VERSION = '4.007'; # $Id: //depot/Tkutf8/Tk/X11Font.pm#7 $
+
+require Tk::Widget;
+require Tk::Xlib;
+use strict;
+
+Construct Tk::Widget 'X11Font';
+
+my @field = qw(foundry family weight slant swidth adstyle pixel
+ point xres yres space avgwidth registry encoding);
+
+map { eval "sub \u$_ { shift->elem('$_', \@_) }" } @field;
+
+use overload '""' => 'as_string';
+
+sub new
+{
+ my $pkg = shift;
+ my $w = shift;
+
+ my %me = ();
+ my $d = $w->Display;
+
+ local $_;
+
+ if(scalar(@_) == 1)
+ {
+ my $pattern = shift;
+
+ if($pattern =~ /\A(-[^-]*){14}\Z/)
+ {
+ @me{@field} = split(/-/, substr($pattern,1));
+ }
+ else
+ {
+ $me{Name} = $pattern;
+
+ if($pattern =~ /^[^-]?-([^-]*-){2,}/)
+ {
+ my $f = $d->XListFonts($pattern,1);
+
+ if($f && $f =~ /\A(-[^-]*){14}/)
+ {
+ my @f = split(/-/, substr($f,1));
+ my @n = split(/-/, $pattern);
+ my %f = ();
+ my $i = 0;
+
+ shift @n if($pattern =~ /\A-/);
+
+ while(@n && @f)
+ {
+ if($n[0] eq '*')
+ {
+ shift @n;
+ }
+ elsif($n[0] eq $f[0])
+ {
+ $f{$field[$i]} = shift @n;
+ }
+ $i++;
+ shift @f;
+ }
+
+ %me = %f
+ unless(@n);
+ }
+ }
+ }
+ }
+ else
+ {
+ %me = @_;
+ }
+
+ map { $me{$_} ||= '*' } @field;
+
+ $me{Display} = $d;
+ $me{MainWin} = $w->MainWindow;
+
+ bless \%me, $pkg;
+}
+
+sub Pattern
+{
+ my $me = shift;
+ return join('-', '',@{$me}{@field});
+}
+
+sub Name
+{
+ my $me = shift;
+ my $max = wantarray ? shift || 128 : 1;
+
+ if ($^O eq 'MSWin32' or ($^O eq 'cygwin' and $Tk::platform eq 'MSWin32'))
+ {
+ my $name = $me->{Name};
+ if (!defined $name)
+ {
+ my $fm = $me->{'family'} || 'system';
+ my $sz = -int($me->{'point'}/10) || -($me->{'pixel'}) || 12;
+ my @opt = (-family => $fm, -size => $sz );
+ my $wt = $me->{'weight'};
+ if (defined $wt)
+ {
+ $wt = 'normal' unless $wt =~ /bold/i;
+ push(@opt,-weight => lc($wt));
+ }
+ my $sl = $me->{'slant'};
+ if (defined $sl)
+ {
+ $sl = ($sl =~ /^[io]/) ? 'italic' : 'roman';
+ push(@opt,-slant => $sl);
+ }
+ $name = join(' ',@opt);
+ }
+ return $name;
+ }
+ else
+ {
+ my $name = $me->{Name} ||
+ join('-', '',@{$me}{@field});
+ return $me->{Display}->XListFonts($name,$max);
+ }
+}
+
+sub as_string
+{
+ return shift->Name;
+}
+
+sub elem
+{
+ my $me = shift;
+ my $elem = shift;
+
+ return undef
+ if(exists $me->{'Name'});
+
+ my $old = $me->{$elem};
+
+ $me->{$elem} = shift
+ if(@_);
+
+ $old;
+}
+
+sub Clone
+{
+ my $me = shift;
+
+ $me = bless { %$me }, ref($me);
+
+ unless(exists $me->{'Name'})
+ {
+ while(@_)
+ {
+ my $k = shift;
+ my $v = shift || $me->{MainWin}->BackTrace('Tk::Font->Clone( key => value, ... )');
+ $me->{$k} = $v;
+ }
+ }
+
+ $me;
+}
+
+sub ascent
+{
+ my $me = shift;
+ my $name = $me->Name;
+ $me->{MainWin}->fontMetrics($name, '-ascent');
+}
+
+sub descent
+{
+ my $me = shift;
+ my $name = $me->Name;
+ $me->{MainWin}->fontMetrics($name, '-descent');
+}
+
+1;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/X11Font.pod b/Master/tlpkg/tlperl/lib/Tk/X11Font.pod
new file mode 100644
index 00000000000..bd5b353abe0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/X11Font.pod
@@ -0,0 +1,88 @@
+
+=head1 NAME
+
+Tk::Font - a class for finding X Fonts
+
+=for pm Tk/X11Font.pm
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+ use Tk::X11Font;
+
+ $font = $widget->X11Font(foundry => 'adobe',
+ family => 'times',
+ point => 120
+ );
+
+ $font = $widget->X11Font('*-courier-medium-r-normal-*-*');
+
+=head1 DESCRIPTION
+
+ This module can be use to interrogate the X server what fonts are
+ avaliable.
+
+=head1 METHODS
+
+=head2 Foundry( [ $val ] )
+
+=head2 Family( [ $val ] )
+
+=head2 Weight( [ $val ] )
+
+=head2 Slant( [ $val ] )
+
+=head2 Swidth( [ $val ] )
+
+=head2 Adstyle( [ $val ] )
+
+=head2 Pixel( [ $val ] )
+
+=head2 Point( [ $val ] )
+
+=head2 Xres( [ $val ] )
+
+=head2 Yres( [ $val ] )
+
+=head2 Space( [ $val ] )
+
+=head2 Avgwidth( [ $val ] )
+
+=head2 Registry( [ $val ] )
+
+=head2 Encoding( [ $val ] )
+
+Set the given field in the font name to C<$val> if given and return the current
+or previous value
+
+=head2 Name( [ $max ] )
+
+In a list context it returns a list of all font names that match the
+fields given. It will return a maximum of C<$max> names, or 128 if
+$max is not given.
+
+In a scalar contex it returns the first matching name or undef
+
+=head2 Clone( [ key => value, [ ...]] )
+
+Create a duplicate of the curent font object and modify the given fields
+
+=head1 AUTHOR
+
+Graham Barr <Graham.Barr@tiuk.ti.com>
+
+=head1 HISTORY
+
+11-Jan-96 Initial version
+
+08-Nov-98 Renamed for Tk800.012
+
+=head1 COPYRIGHT
+
+Copyright (c) 1995-1996 Graham Barr. All rights reserved. This program is free
+software; you can redistribute it and/or modify it under the same terms
+as Perl itself.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Xcamel.gif b/Master/tlpkg/tlperl/lib/Tk/Xcamel.gif
new file mode 100644
index 00000000000..cb88bc0afd8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Xcamel.gif
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/Xlib.pm b/Master/tlpkg/tlperl/lib/Tk/Xlib.pm
new file mode 100644
index 00000000000..1432361dc18
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Xlib.pm
@@ -0,0 +1,15 @@
+package Tk::Xlib;
+require DynaLoader;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Xlib/Xlib.pm#4 $
+
+use Tk qw($XS_VERSION);
+use Exporter;
+
+use base qw(DynaLoader Exporter);
+@EXPORT_OK = qw(XDrawString XLoadFont XDrawRectangle);
+
+bootstrap Tk::Xlib;
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/Xrm.pm b/Master/tlpkg/tlperl/lib/Tk/Xrm.pm
new file mode 100644
index 00000000000..88f0d76a8c2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Xrm.pm
@@ -0,0 +1,9 @@
+package Tk::Xrm;
+
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/Tk/Xrm.pm#4 $
+
+use Tk ();
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/Xrm.pod b/Master/tlpkg/tlperl/lib/Tk/Xrm.pod
new file mode 100644
index 00000000000..55f885bc849
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Xrm.pod
@@ -0,0 +1,45 @@
+
+=head1 NAME
+
+Tk::Xrm - X Resource/Defaults/Options routines that obey the rules.
+
+=for pm Tk/Xrm.pm
+
+=for category Creating and Configuring Widgets
+
+=head1 SYNOPSIS
+
+ use Tk;
+ use Tk::Xrm;
+
+=head1 DESCRIPTION
+
+Using this modules causes Tk's Option code to be replaced by versions
+which use routines from <X11/Xresource.h> - i.e. same ones every other
+X toolkit uses.
+
+Result is that "matching" of name/Class with the options database follows
+the same rules as other X toolkits. This makes it more predictable,
+and makes it easier to have a single ~/.Xdefaults file which gives sensible
+results for both Tk and (say) Motif applications.
+
+=head1 BUGS
+
+Currently B<optionAdd>(I<key> =E<gt> I<value>?, I<priority>?) ignores optional
+priority completely and just does XrmPutStringResource().
+Perhaps it should be more subtle and do XrmMergeDatabases() or
+XrmCombineDatabase().
+
+This version is a little slower than Tk's re-invention but there is
+more optimization that can be done.
+
+=head1 SEE ALSO
+
+L<Tk::option|Tk::option>
+
+=head1 KEYWORDS
+
+database, option, priority, retrieve
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/act_folder.xbm b/Master/tlpkg/tlperl/lib/Tk/act_folder.xbm
new file mode 100644
index 00000000000..fc82949945b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/act_folder.xbm
@@ -0,0 +1,5 @@
+#define act_folder_width 16
+#define act_folder_height 10
+static unsigned char act_folder_bits[] = {
+ 0xfc, 0x00, 0xaa, 0x0f, 0x55, 0x15, 0xeb, 0xff, 0x15, 0x80, 0x0b, 0x40,
+ 0x05, 0x20, 0x03, 0x10, 0x01, 0x08, 0xff, 0x07};
diff --git a/Master/tlpkg/tlperl/lib/Tk/act_folder.xpm b/Master/tlpkg/tlperl/lib/Tk/act_folder.xpm
new file mode 100644
index 00000000000..0e7d682713a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/act_folder.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static char * act_folder_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"16 12 4 1",
+/* colors */
+" s None c None",
+". c black",
+"X c yellow",
+"o c #5B5B57574646",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".oXoXoXoXoXo. ",
+".XoX............",
+".oX.XXXXXXXXXXX.",
+".Xo.XXXXXXXXXX. ",
+".o.XXXXXXXXXXX. ",
+".X.XXXXXXXXXXX. ",
+"..XXXXXXXXXX.. ",
+"............. "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/after.pod b/Master/tlpkg/tlperl/lib/Tk/after.pod
new file mode 100644
index 00000000000..97c61ba380b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/after.pod
@@ -0,0 +1,168 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::after - Execute a command after a time delay
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<after>(I<ms>)
+
+S< >I<$id> = I<$widget>-E<gt>B<after>(I<ms>?,I<callback>?)
+
+S< >I<$id> = I<$widget>-E<gt>B<repeat>(I<ms>?,I<callback>?)
+
+S< >I<$widget>-E<gt>B<afterCancel>(I<$id>)
+
+S< >I<$id> = I<$widget>-E<gt>B<afterIdle>(I<callback>)
+
+S< >I<$widget>-E<gt>B<afterInfo>?(I<$id>)?
+
+S< >I<$id>-E<gt>B<time>(?I<delay>?)
+
+=head1 DESCRIPTION
+
+This method is used to delay execution of the program or to execute
+a callback in background sometime in the future.
+
+In perl/Tk I<$widget>-E<gt>B<after> is implemented via the class C<Tk::After>,
+and callbacks are associated with I<$widget>, and are automatically cancelled
+when the widget is destroyed. An almost identical interface, but without
+automatic cancel, and without repeat is provided via Tk::after method.
+
+=head2 Internal Details
+
+The internal Tk::After class has the following synopsis:
+
+ $id = Tk::After->new($widget, tid, $time, 'once', callback);
+ $id = Tk::After->new($widget, tid, $time, 'repeat', callback);
+ $id->cancel;
+ $id->time(?delay?);
+
+$id is a Tk::After object, an array of 5 elements:
+
+I<$widget> is the parent widget reference.
+
+I<tid> is the internal timer id, a unique string.
+
+I<$time> is the string 'idle', representing an idle queue timer, or a
+integer millisecond value.
+
+I<once> or I<repeat> specifies whether the timer is a one-time B<after>
+event, or a repeating B<repeat> event.
+
+I<callback> specifies a Perl/Tk Tk::Callback object.
+
+=head1 Changing a B<repeat> timer interval
+
+It's posible to change a B<repeat> timer's delay value, or even cancel
+any timer, using the B<time> method. If I<delay> is specified and
+non-zero, a new timer delay is established. If I<delay> is zero the
+timer event is canceled just as if I<$id>-E<gt>B<cancel> were invoked.
+In all cases the current millisecond timer delay is returned.
+
+Note: the new timer delay will take effect on the I<subsequent> timer
+event - this command will not cancel the pending timer event and
+re-issue it with the new delay time.
+
+=head1 The after() method has several forms as follows:
+
+=over 4
+
+=item I<$widget>-E<gt>B<after>(I<ms>)
+
+The value I<ms> must be an integer giving a time in milliseconds.
+The command sleeps for I<ms> milliseconds and then returns.
+While the command is sleeping the application does not respond to
+events.
+
+=item I<$widget>-E<gt>B<after>(I<ms>,I<callback>)
+
+In this form the command returns immediately, but it arranges
+for I<callback> be executed I<ms> milliseconds later as an
+event handler.
+The callback will be executed exactly once, at the given time.
+The command will be executed in context of I<$widget>.
+If an error occurs while executing the delayed command then the
+L<Tk::Error|Tk::Error> mechanism is used to report the error.
+The B<after> command returns an identifier (an object in the perl/Tk
+case) that can be used to cancel the delayed command using B<afterCancel>.
+
+=item I<$widget>-E<gt>B<repeat>(I<ms>,I<callback>)
+
+In this form the command returns immediately, but it arranges
+for I<callback> be executed I<ms> milliseconds later as an
+event handler. After I<callback> has executed it is re-scheduled,
+to be executed in a futher I<ms>, and so on until it is cancelled.
+
+=item I<$widget>-E<gt>B<afterCancel>(I<$id>)
+
+=item I<$id>-E<gt>B<cancel>
+
+Cancels the execution of a delayed command that
+was previously scheduled.
+I<$id> indicates which command should be canceled; it must have
+been the return value from a previous B<after> command.
+If the command given by I<$id> has already been executed (and
+is not scheduled to be executed again) then B<afterCancel>
+has no effect.
+
+=item I<$widget>-E<gt>B<afterCancel>(I<callback>)
+
+I<This form is not robust in perl/Tk - its use is deprecated.>
+This command should also cancel the execution of a delayed command.
+The I<callback> argument is compared with pending callbacks,
+if a match is found, that callback is
+cancelled and will never be executed; if no such callback is
+currently pending then the B<afterCancel> has no effect.
+
+=item I<$widget>-E<gt>B<afterIdle>(I<callback>)
+
+Arranges for I<callback> to be evaluated later as an idle callback.
+The script will be run exactly once, the next time the event
+loop is entered and there are no events to process.
+The command returns an identifier that can be used
+to cancel the delayed command using B<afterCancel>.
+If an error occurs while executing the script then the
+L<Tk::Error|Tk::Error> mechanism is used to report the error.
+
+=item I<$widget>-E<gt>B<afterInfo>?(I<$id>)?
+
+This command returns information about existing event handlers. If no
+I<$id> argument is supplied, the command returns a list of the
+identifiers for all existing event handlers created by the B<after>
+and B<repeat> commands for I<$widget>. If I<$id> is supplied, it
+specifies an existing handler; I<$id> must have been the return value
+from some previous call to B<after> or B<repeat> and it must not have
+triggered yet or been cancelled. In this case the command returns a
+list with three elements. The first element of the list is the
+callback associated with I<$id>, the second element is either B<idle>
+or the I<integer> timer millisecond value to indicate what kind of
+event handler it is, and the third is a string I<once> or I<repeat> to
+differentiate an B<after> from a B<repeat> event.
+
+=back
+
+The B<after>(I<ms>) and B<afterIdle> forms of the command
+assume that the application is event driven: the delayed commands
+will not be executed unless the application enters the event loop.
+In applications that are not normally event-driven,
+the event loop can be entered with the B<vwait> and B<update> commands.
+
+=head1 SEE ALSO
+
+L<Tk::Error|Tk::Error>
+L<Tk::callbacks|Tk::callbacks>
+
+=head1 KEYWORDS
+
+cancel, delay, idle callback, sleep, time
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/anim.gif b/Master/tlpkg/tlperl/lib/Tk/anim.gif
new file mode 100644
index 00000000000..96a50b701be
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/anim.gif
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/arrowdownwin.xbm b/Master/tlpkg/tlperl/lib/Tk/arrowdownwin.xbm
new file mode 100644
index 00000000000..ea43fc75e7a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/arrowdownwin.xbm
@@ -0,0 +1,5 @@
+#define arrowdownwin2_width 9
+#define arrowdownwin2_height 13
+static char arrowdownwin2_bits[] = {
+ 0x00,0xfe,0x00,0xfe,0x00,0xfe,0x00,0xfe,0x00,0xfe,0x7c,0xfe,0x38,0xfe,0x10,
+ 0xfe,0x00,0xfe,0x00,0xfe,0x00,0xfe,0x00,0xfe,0x00,0xfe};
diff --git a/Master/tlpkg/tlperl/lib/Tk/balArrow.xbm b/Master/tlpkg/tlperl/lib/Tk/balArrow.xbm
new file mode 100644
index 00000000000..ee0664a4727
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/balArrow.xbm
@@ -0,0 +1,4 @@
+#define balArrow_width 6
+#define balArrow_height 6
+static char balArrow_bits[] = {
+ 0x1f, 0x07, 0x07, 0x09, 0x11, 0x20};
diff --git a/Master/tlpkg/tlperl/lib/Tk/bind.pod b/Master/tlpkg/tlperl/lib/Tk/bind.pod
new file mode 100644
index 00000000000..f595a48e318
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/bind.pod
@@ -0,0 +1,583 @@
+# Copyright (c) 1990 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::bind - Arrange for X events to invoke callbacks
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+Retrieve bindings:
+
+S< >I<$widget>-E<gt>B<bind>
+
+S< >I<$widget>-E<gt>B<bind>(I<tag>)
+
+S< >I<$widget>-E<gt>B<bind>(I<sequence>)
+
+S< >I<$widget>-E<gt>B<bind>(I<tag>,I<sequence>)
+
+Associate and destroy bindings:
+
+S< >I<$widget>-E<gt>B<bind>(I<sequence>,I<callback>)
+
+S< >I<$widget>-E<gt>B<bind>(I<tag>,I<sequence>,I<callback>)
+
+=head1 DESCRIPTION
+
+The B<bind> method associates callbacks with X events.
+If I<callback> is specified, B<bind> will
+arrange for I<callback> to be evaluated whenever
+the event(s) given by I<sequence> occur in the window(s)
+identified by I<$widget> or I<tag>.
+If I<callback> is an empty string then the current binding for
+I<sequence> is destroyed, leaving I<sequence> unbound.
+In all of the cases where a I<callback> argument is provided,
+B<bind> returns an empty string.
+
+If I<sequence> is specified without a I<callback>, then the
+callback currently bound to I<sequence> is returned, or
+B<undef> is returned if there is no binding for I<sequence>.
+If neither I<sequence> nor I<callback> is specified, then the
+return value is a list whose elements are all the sequences
+for which there exist bindings for I<tag>.
+
+If no I<tag> is specified then the B<bind> refers to I<$widget>.
+If I<tag> is specified then it is typically a class name and the B<bind>
+refers to all instances of the class on the B<MainWindow> associated
+with I<$widget>. (It is possible for I<tag> to be another "widget object"
+but this practice is deprecated.) Perl's B<ref>(I<$object>) can be used
+to get the class name of any object.
+Each window has an associated list of tags, and a binding applies
+to a particular window if its tag is among those specified for
+the window.
+Although the B<bindtags> method may be used to assign an
+arbitrary set of binding tags to a window, the default binding
+tags provide the following behavior:
+
+If a tag is the name of an internal window the binding applies
+to that window.
+
+If the tag is the name of a toplevel window the binding applies
+to the toplevel window and all its internal windows.
+
+If the tag is the name of a class of widgets, such as B<Tk::Button>,
+the binding applies to all widgets in that class;
+
+If I<tag> has the value B<all>,
+the binding applies to all windows descended from the MainWindow
+of the application.
+
+=head1 EVENT PATTERNS
+
+The I<sequence> argument specifies a sequence of one or more event
+patterns, with optional white space between the patterns. Each event
+pat may take one of three forms. In the simplest case it is a single
+printing ASCII character, such as B<a> or B<[>. The character may not
+be a space character or the character <. This form of pattern matches
+a B<KeyPress> event for the particular character. The second form of
+pattern is longer but more general. It has the following syntax:
+
+S< >'<modifier-modifier-type-detail>'
+
+The entire event pattern is surrounded by angle brackets, and normally
+needs to be quoted, as angle brackets are special to perl.
+Inside the angle brackets are zero or more modifiers, an event
+type, and an extra piece of information (I<detail>) identifying
+a particular button or keysym. Any of the fields may be omitted,
+as long as at least one of I<type> and I<detail> is present.
+The fields must be separated by white space or dashes.
+
+The third form of pattern is used to specify a user-defined, named virtual
+event; see L<Tk::event> for details. It has the following syntax:
+
+S< >'<<name>>'
+
+The entire virtual event pattern is surrounded by double angle brackets.
+Inside the angle brackets is the user-defined name of the virtual event.
+Modifiers, such as B<Shift> or B<Control>, may not be combined with a
+virtual event to modify it. Bindings on a virtual event may be created
+before the virtual event is defined, and if the definition of a virtual
+event changes dynamically, all windows bound to that virtual event will
+respond immediately to the new definition.
+
+=head1 MODIFIERS
+
+Modifiers consist of any of the following values:
+
+ Control Mod2, M2
+ Shift Mod3, M3
+ Lock Mod4, M4
+ Button1, B1 Mod5, M5
+ Button2, B2 Meta, M
+ Button3, B3 Alt
+ Button4, B4 Double
+ Button5, B5 Triple
+ Mod1, M1 Quadruple
+
+Where more than one value is listed, separated by commas, the values
+are equivalent.
+Most of the modifiers have the obvious X meanings.
+For example, B<Button1> requires that
+button 1 be depressed when the event occurs.
+For a binding to match a given event, the modifiers in the event
+must include all of those specified in the event pattern.
+An event may also contain additional modifiers not specified in
+the binding.
+For example, if button 1 is pressed while the shift and control keys
+are down, the pattern B<E<lt>Control-Button-1E<gt>> will match
+the event, but B<E<lt>Mod1-Button-1E<gt>> will not.
+If no modifiers are specified, then any combination of modifiers may
+be present in the event.
+
+B<Meta> and B<M> refer to whichever of the
+B<M1> through B<M5> modifiers is associated with the meta
+key(s) on the keyboard (keysyms B<Meta_R> and B<Meta_L>).
+If there are no meta keys, or if they are not associated with any
+modifiers, then B<Meta> and B<M> will not match any events.
+Similarly, the B<Alt> modifier refers to whichever modifier
+is associated with the alt key(s) on the keyboard (keysyms
+B<Alt_L> and B<Alt_R>).
+
+The B<Double>, B<Triple> and B<Quadruple> modifiers are a convenience
+for specifying double mouse clicks and other repeated events. They
+cause a particular event pattern to be repeated 2, 3 or 4 times, and
+also place a time and space requirement on the sequence: for a
+sequence of events to match a B<Double>, B<Triple> or B<Quadruple>
+pattern, all of the events must occur close together in time and
+without substantial mouse motion in between. For example,
+B<E<lt>Double-Button-1E<gt>> is equivalent to
+B<E<lt>Button-1E<gt>E<lt>Button-1E<gt>> with the extra time and space
+requirement.
+
+=head1 EVENT TYPES
+
+The I<type> field may be any of the standard X event types, with a
+few extra abbreviations. Below is a list of all the valid types;
+where two names appear together, they are synonyms.
+
+
+ Activate Destroy Map
+ ButtonPress, Button Enter MapRequest
+ ButtonRelease Expose Motion
+ Circulate FocusIn MouseWheel
+ CirculateRequest FocusOut Property
+ Colormap Gravity Reparent
+ Configure KeyPress, Key ResizeRequest
+ ConfigureRequest KeyRelease Unmap
+ Create Leave Visibility
+ Deactivate
+
+Most of the above events have the same fields and behaviors as events
+in the X Windowing system. You can find more detailed descriptions of
+these events in any X window programming book. A couple of the events
+are extensions to the X event system to support features unique to the
+Macintosh and Windows platforms. We provide a little more detail on
+these events here. These include:
+
+ Activate
+ Deactivate
+
+These two events are sent to every sub-window of a toplevel when they
+change state. In addition to the focus Window, the Macintosh platform
+and Windows platforms have a notion of an active window (which often
+has but is not required to have the focus). On the Macintosh, widgets
+in the active window have a different appearance than widgets in
+deactive windows. The Activate event is sent to all the sub-windows
+in a toplevel when it changes from being deactive to active.
+Likewise, the Deactive event is sent when the window's state changes
+from active to deactive. There are no use- ful percent substitutions
+you would make when binding to these events.
+
+ MouseWheel
+
+Some mice on the Windows platform support a mouse wheel which is
+used for scrolling documents without using the scrollbars. By
+rolling the wheel, the system will generate MouseWheel events that
+the application can use to scroll. Like Key events the event is
+always routed to the window that currently has focus. When the
+event is received you can use the %D substitution to get the delta
+field for the event which is a integer value of motion that the
+mouse wheel has moved. The smallest value for which the system
+will report is defined by the OS. On Windows 95 & 98 machines
+this value is at least 120 before it is reported. However, higher
+resolution devices may be available in the future. The sign of
+the value determines which direction your widget should scroll.
+Positive values should scroll up and negative values should scroll
+down.
+
+The last part of a long event specification is I<detail>. In the
+case of a B<ButtonPress> or B<ButtonRelease> event, it is the
+number of a button (1-5). If a button number is given, then only an
+event on that particular button will match; if no button number is
+given, then an event on any button will match. Note: giving a
+specific button number is different than specifying a button modifier;
+in the first case, it refers to a button being pressed or released,
+while in the second it refers to some other button that is already
+depressed when the matching event occurs. If a button
+number is given then I<type> may be omitted: if will default
+to B<ButtonPress>. For example, the specifier B<E<lt>1E<gt>>
+is equivalent to B<E<lt>ButtonPress-1E<gt>>.
+
+If the event type is B<KeyPress> or B<KeyRelease>, then
+I<detail> may be specified in the form of an X keysym. Keysyms
+are textual specifications for particular keys on the keyboard;
+they include all the alphanumeric ASCII characters (e.g. ``a'' is
+the keysym for the ASCII character ``a''), plus descriptions for
+non-alphanumeric characters (``comma'' is the keysym for the comma
+character), plus descriptions for all the non-ASCII keys on the
+keyboard (``Shift_L'' is the keysm for the left shift key, and
+``F1'' is the keysym for the F1 function key, if it exists). The
+complete list of keysyms is not presented here; it is
+available in other X documentation and may vary from system to
+system.
+If necessary, you can use the B<'K'> notation described below
+to print out the keysym name for a particular key.
+If a keysym I<detail> is given, then the
+I<type> field may be omitted; it will default to B<KeyPress>.
+For example, B<E<lt>Control-commaE<gt>> is equivalent to
+B<E<lt>Control-KeyPress-commaE<gt>>.
+
+=head1 BINDING CALLBACKS AND SUBSTITUTIONS
+
+The I<callback> argument to B<bind> is a perl/Tk callback.
+which will be executed whenever the given event sequence occurs.
+(See L<Tk::callbacks> for description of the possible forms.)
+I<Callback> will be associated with the same B<MainWindow>
+that is associated with the I<$widget> that was used to invoke
+the B<bind> method, and it will run as though called from B<MainLoop>.
+If I<callback> contains
+any B<Ev>(I<%>) calls, then each "nested" B<Ev>(I<%>)
+"callback" will be evaluated when the event occurs to form arguments
+to be passed to the main I<callback>.
+The replacement
+depends on the character I<%>, as defined in the
+list below. Unless otherwise indicated, the
+replacement string is the numeric (decimal) value of the given field from
+the current event. Perl/Tk has enhanced this mechanism slightly compared
+to the comparable Tcl/Tk mechanism. The enhancements are not yet all
+reflected in the list below.
+Some of the substitutions are only valid for
+certain types of events; if they are used for other types of events
+the value substituted is undefined (not the same as B<undef>!).
+
+=over 4
+
+=item B<'#'>
+
+The number of the last client request processed by the server
+(the I<serial> field from the event). Valid for all event
+types.
+
+=item B<'a'>
+
+The I<above> field from the event,
+formatted as a hexadecimal number.
+Valid only for B<Configure> events.
+
+=item B<'b'>
+
+The number of the button that was pressed or released. Valid only
+for B<ButtonPress> and B<ButtonRelease> events.
+
+=item B<'c'>
+
+The I<count> field from the event. Valid only for B<Expose> events.
+
+=item B<'d'>
+
+The I<detail> field from the event. The B<'d'> is replaced by
+a string identifying the detail. For B<Enter>,
+B<Leave>, B<FocusIn>, and B<FocusOut> events,
+the string will be one of the following:
+
+ NotifyAncestor NotifyNonlinearVirtual
+ NotifyDetailNone NotifyPointer
+ NotifyInferior NotifyPointerRoot
+ NotifyNonlinear NotifyVirtual
+
+For B<ConfigureRequest> events, the string will be one of:
+
+ Above Opposite
+ Below None
+ BottomIf TopIf
+
+For events other than these, the substituted string is undefined.
+(Note that this is I<not> the same as Detail part of sequence
+use to specify the event.)
+
+=item B<'f'>
+
+The I<focus> field from the event (B<0> or B<1>). Valid only
+for B<Enter> and B<Leave> events.
+
+=item B<'h'>
+
+The I<height> field from the event. Valid only for B<Configure>,
+B<ConfigureRequest>, B<Create>, B<Expose>, and B<ResizeRequest> events.
+
+=item B<'i'>
+
+The window field from the event, represented as a hexadecimal integer.
+
+=item B<'k'>
+
+The I<keycode> field from the event. Valid only for B<KeyPress>
+and B<KeyRelease> events.
+
+=item B<'m'>
+
+The I<mode> field from the event. The substituted string is one of
+B<NotifyNormal>, B<NotifyGrab>, B<NotifyUngrab>, or
+B<NotifyWhileGrabbed>. Valid only for B<Enter>,
+B<FocusIn>, B<FocusOut>, and B<Leave> events.
+
+=item B<'o'>
+
+The I<override_redirect> field from the event. Valid only for
+B<Map>, B<Reparent>, and B<Configure> events.
+
+=item B<'p'>
+
+The I<place> field from the event, substituted as one of the
+strings B<PlaceOnTop> or B<PlaceOnBottom>. Valid only
+for B<Circulate> and B<CirculateRequest> events.
+
+=item B<'s'>
+
+The I<state> field from the event. For B<ButtonPress>,
+B<ButtonRelease>, B<Enter>, B<KeyPress>, B<KeyRelease>,
+B<Leave>, and B<Motion> events, a decimal string
+is substituted. For B<Visibility>, one of the strings
+B<VisibilityUnobscured>, B<VisibilityPartiallyObscured>,
+and B<VisibilityFullyObscured> is substituted.
+
+=item B<'t'>
+
+The I<time> field from the event. Valid only for events that
+contain a I<time> field.
+
+=item B<'w'>
+
+The I<width> field from the event. Valid only for B<Configure>,
+B<ConfigueRequest>, B<Create>, B<Expose>, and B<ResizeREquest> events.
+
+=item B<'x'>
+
+The I<x> field from the event. Valid only for events containing
+an I<x> field.
+
+=item B<'y'>
+
+The I<y> field from the event. Valid only for events containing
+a I<y> field.
+
+=item B<'@'>
+
+The string "@I<x,y>" where I<x> and I<y> are as above.
+Valid only for events containing I<x> and I<y> fields.
+This format is used my methods of B<Tk::Text> and similar widgets.
+
+=item B<'A'>
+
+Substitutes the UNICODE character corresponding to the event, or
+the empty string if the event doesn't correspond to a UNICODE character
+(e.g. the shift key was pressed). B<XmbLookupString> does all the
+work of translating from the event to a UNICODE character.
+Valid only for B<KeyPress> and B<KeyRelease> events.
+
+=item B<'B'>
+
+The I<border_width> field from the event. Valid only for
+B<Configure>, B<ConfigureRequest> and B<Create> events.
+
+=item B<'D'>
+
+This reports the delta value of a B<MouseWheel> event. The delta
+value represents the rotation units the mouse wheel has been
+moved. On Windows 95 & 98 systems the smallest value for the
+delta is 120. Future systems may support higher resolution values
+for the delta. The sign of the value represents the direction the
+mouse wheel was scrolled.
+
+=item B<'E'>
+
+The I<send_event> field from the event. Valid for all event types.
+
+=item B<'K'>
+
+The keysym corresponding to the event, substituted as a textual
+string. Valid only for B<KeyPress> and B<KeyRelease> events.
+
+=item B<'N'>
+
+The keysym corresponding to the event, substituted as
+a decimal
+number. Valid only for B<KeyPress> and B<KeyRelease> events.
+
+=item B<'R'>
+
+The I<root> window identifier from the event. Valid only for
+events containing a I<root> field.
+
+=item B<'S'>
+
+The I<subwindow> window identifier from the event,
+as an object if it is one otherwise as a hexadecimal number.
+Valid only for events containing a I<subwindow> field.
+
+=item B<'T'>
+
+The I<type> field from the event. Valid for all event types.
+
+=item B<'W'>
+
+The window to which the event was reported (the
+$widget field from the event) - as an perl/Tk object.
+Valid for all event types.
+
+=item B<'X'>
+
+The I<x_root> field from the event.
+If a virtual-root window manager is being used then the substituted
+value is the corresponding x-coordinate in the virtual root.
+Valid only for
+B<ButtonPress>, B<ButtonRelease>, B<KeyPress>, B<KeyRelease>,
+and B<Motion> events.
+
+=item B<'Y'>
+
+The I<y_root> field from the event.
+If a virtual-root window manager is being used then the substituted
+value is the corresponding y-coordinate in the virtual root.
+Valid only for
+B<ButtonPress>, B<ButtonRelease>, B<KeyPress>, B<KeyRelease>,
+and B<Motion> events.
+
+=back
+
+=head1 MULTIPLE MATCHES
+
+It is possible for several bindings to match a given X event.
+If the bindings are associated with different I<tag>'s,
+then each of the bindings will be executed, in order.
+By default, a class binding will be executed first, followed
+by a binding for the widget, a binding for its toplevel, and
+an B<all> binding.
+The B<bindtags> method may be used to change this order for
+a particular window or to associate additional binding tags with
+the window.
+
+B<return> and B<Tk-E<gt>break> may be used inside a
+callback to control the processing of matching callbacks.
+If B<return> is invoked, then the current callback
+is terminated but Tk will continue processing callbacks
+associated with other I<tag>'s.
+If B<Tk-E<gt>break> is invoked within a callback,
+then that callback terminates and no other callbacks will be invoked
+for the event.
+(B<Tk-E<gt>break> is implemented via perl's B<die> with a special value
+which is "caught" by the perl/Tk "glue" code.)
+
+If more than one binding matches a particular event and they
+have the same I<tag>, then the most specific binding
+is chosen and its callback is evaluated.
+The following tests are applied, in order, to determine which of
+several matching sequences is more specific:
+(a) an event pattern that specifies a specific button or key is more specific
+than one that doesn't;
+(b) a longer sequence (in terms of number
+of events matched) is more specific than a shorter sequence;
+(c) if the modifiers specified in one pattern are a subset of the
+modifiers in another pattern, then the pattern with more modifiers
+is more specific.
+(d) a virtual event whose physical pattern matches the sequence is less
+specific than the same physical pattern that is not associated with a
+virtual event.
+(e) given a sequence that matches two or more virtual events, one
+of the virtual events will be chosen, but the order is undefined.
+
+If the matching sequences contain more than one event, then tests
+(c)-(e) are applied in order from the most recent event to the least recent
+event in the sequences. If these tests fail to determine a winner, then the
+most recently registered sequence is the winner.
+
+If there are two (or more) virtual events that are both triggered by the
+same sequence, and both of those virtual events are bound to the same window
+tag, then only one of the virtual events will be triggered, and it will
+be picked at random:
+
+ $widget->eventAdd('<<Paste>>' => '<Control-y>');
+ $widget->eventAdd('<<Paste>>' => '<Button-2>');
+ $widget->eventAdd <<Scroll>>' => '<Button-2>');
+ $widget->bind('Tk::Entry','<<Paste>>',sub { print 'Paste'});
+ $widget->bind('Tk::Entry','<<Scroll>>', sub {print 'Scroll'});
+
+If the user types Control-y, the B<E<lt>E<lt>PasteE<gt>E<gt>> binding
+will be invoked, but if the user presses button 2 then one of
+either the B<E<lt>E<lt>PasteE<gt>E<gt>> or the B<E<lt>E<lt>ScrollE<gt>E<gt>> bindings will
+be invoked, but exactly which one gets invoked is undefined.
+
+If an X event does not match any of the existing bindings, then the
+event is ignored.
+An unbound event is not considered to be an error.
+
+=head1 MULTI-EVENT SEQUENCES AND IGNORED EVENTS
+
+When a I<sequence> specified in a B<bind> method contains
+more than one event pattern, then its callback is executed whenever
+the recent events (leading up to and including the current event)
+match the given sequence. This means, for example, that if button 1 is
+clicked repeatedly the sequence B<E<lt>Double-ButtonPress-1E<gt>> will match
+each button press but the first.
+If extraneous events that would prevent a match occur in the middle
+of an event sequence then the extraneous events are
+ignored unless they are B<KeyPress> or B<ButtonPress> events.
+For example, B<E<lt>Double-ButtonPress-1E<gt>> will match a sequence of
+presses of button 1, even though there will be B<ButtonRelease>
+events (and possibly B<Motion> events) between the
+B<ButtonPress> events.
+Furthermore, a B<KeyPress> event may be preceded by any number
+of other B<KeyPress> events for modifier keys without the
+modifier keys preventing a match.
+For example, the event sequence B<aB> will match a press of the
+B<a> key, a release of the B<a> key, a press of the B<Shift>
+key, and a press of the B<b> key: the press of B<Shift> is
+ignored because it is a modifier key.
+Finally, if several B<Motion> events occur in a row, only
+the last one is used for purposes of matching binding sequences.
+
+=head1 ERRORS
+
+If an error occurs in executing the callback for a binding then the
+B<Tk::Error> mechanism is used to report the error.
+The B<Tk::Error> mechanism will be executed at same call level,
+and associated with the same B<MainWindow> as
+as the callback was invoked.
+
+=head1 CAVEATS
+
+Note that for the B<Canvas> widget, the call to B<bind> has to be
+fully qualified. This is because there is already a bind method for
+the B<Canvas> widget, which binds individual canvas tags.
+
+S< >I<$canvas>-E<gt>B<Tk::bind>
+
+=head1 SEE ALSO
+
+L<Tk::Error|Tk::Error>
+L<Tk::callbacks|Tk::callbacks>
+L<Tk::bindtags|Tk::bindtags>
+
+=head1 KEYWORDS
+
+Event, binding
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/bindtags.pod b/Master/tlpkg/tlperl/lib/Tk/bindtags.pod
new file mode 100644
index 00000000000..3ee6ddb9473
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/bindtags.pod
@@ -0,0 +1,107 @@
+# Copyright (c) 1990 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::bindtags - Determine which bindings apply to a window, and order of evaluation
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<bindtags>([I<tagList>]);
+
+I<@tags> = I<$widget>-E<gt>B<bindtags>;
+
+=head1 DESCRIPTION
+
+When a binding is created with the B<bind> command, it is
+associated either with a particular window such as I<$widget>,
+a class name such as B<Tk::Button>, the keyword B<all>, or any
+other string.
+All of these forms are called I<binding tags>.
+Each window has a list of binding tags that determine how
+events are processed for the window.
+When an event occurs in a window, it is applied to each of the
+window's tags in order: for each tag, the most specific binding
+that matches the given tag and event is executed.
+See the L<Tk::bind> documentation for more information on the matching
+process.
+
+By default, each window has four binding tags consisting of the
+the window's class name, name of the window, the name of the window's
+nearest toplevel ancestor, and B<all>, in that order.
+Toplevel windows have only three tags by default, since the toplevel
+name is the same as that of the window.
+
+Note that this order is I<different> from order used by Tcl/Tk.
+Tcl/Tk has the window ahead of the class name in the binding order.
+This is because Tcl is procedural rather than object oriented and
+the normal way for Tcl/Tk applications to override class bindings
+is with an instance binding. However, with perl/Tk the normal way
+to override a class binding is to derive a class. The perl/Tk order
+causes instance bindings to execute after the class binding, and
+so instance bind callbacks can make use of state changes (e.g. changes
+to the selection) than the class bindings have made.
+
+The B<bindtags> command allows the binding tags for a window to be
+read and modified.
+
+If I<$widget>-E<gt>B<bindtags> is invoked without an argument, then the
+current set of binding tags for $widget is returned as a list.
+If the I<tagList> argument is specified to B<bindtags>,
+then it must be a reference to and array; the tags for $widget are changed
+to the elements of the array. (A reference to an anonymous array can
+be created by enclosin the elements in B<[ ]>.)
+The elements of I<tagList> may be arbitrary strings or widget objects,
+if no window exists for an object at the time an event is processed,
+then the tag is ignored for that event.
+The order of the elements in I<tagList> determines the order in
+which binding callbacks are executed in response to events.
+For example, the command
+
+ $b->bindtags([$b,ref($b),$b->toplevel,'all'])
+
+applies the Tcl/Tk binding order which binding callbacks will be
+evaluated for a button (say) B<$b> so that B<$b>'s instance bindings
+are invoked first, following by bindings for B<$b>'s class, followed by
+bindings for B<$b>'s toplevel, followed by 'B<all>' bindings.
+
+If I<tagList> is an empty list i.e. B<[]>, then the binding
+tags for $widget are returned to the perl/Tk default state described above.
+
+The B<bindtags> command may be used to introduce arbitrary
+additional binding tags for a window, or to remove standard tags.
+For example, the command
+
+ $b->bindtags(['TrickyButton',$b->toplevel,'all'])
+
+replaces the (say) B<Tk::Button> tag for B<$b> with B<TrickyButton>.
+This means that the default widget bindings for buttons, which are
+associated with the B<Tk::Button> tag, will no longer apply to B<$b>,
+but any bindings associated with B<TrickyButton> (perhaps some
+new button behavior) will apply.
+
+=head1 BUGS
+
+The current mapping of the 'native' Tk behaviour of this method
+i.e. returning a list but only accepting a reference to an array is
+counter intuitive. The perl/Tk interface may be tidied up, returning
+a list is sensible so, most likely fix will be to allow a list to be
+passed to I<set> the bindtags.
+
+=head1 SEE ALSO
+
+L<Tk::bind|Tk::bind>
+L<Tk::callbacks|Tk::callbacks>
+
+=head1 KEYWORDS
+
+binding, event, tag
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/callbacks.pod b/Master/tlpkg/tlperl/lib/Tk/callbacks.pod
new file mode 100644
index 00000000000..5b62cb7c12c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/callbacks.pod
@@ -0,0 +1,104 @@
+# $Id: callbacks.pod 1.3 Thu, 27 Nov 1997 00:26:00 +0100 ach $
+
+=head1 NAME
+
+Tk::callbacks - Specifying code for Tk to call.
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+One can specify a callback in one of the following ways:
+
+Without arguments:
+
+ ... => \&subname, ...
+ ... => sub { ... }, ...
+ ... => 'methodname', ...
+
+or with arguments:
+
+ ... => [ \&subname, args ... ], ...
+ ... => [ sub { ... }, args... ], ...
+ ... => [ 'methodname', args... ], ...
+
+=head1 DESCRIPTION
+
+Perl/Tk has a callback, where Tcl/Tk has a command string (i.e. a fragment of
+Tcl to be executed). A perl/Tk callback can take one of the following
+basic forms:
+
+=over 4
+
+=item * Reference to a subroutine C<\E<amp>subname>
+
+=item * Anonymous subroutine (closure) C<sub { ... }>
+
+=item * A method name C<'methodname'>
+
+=back
+
+Any of these can be provided with arguments by enclosing them and the
+arguments in B<[]>. Here are some examples:
+
+I<$mw>->B<bind>(I<$class,> B<"E<lt>DeleteE<gt>" =E<gt> 'Delete'>);
+
+This will call I<$widget>->B<Delete>, the I<$widget> being provided (by bind) as
+the one where the Delete key was pressed.
+
+While having bind provide a widget object for you is ideal in many cases
+it can be irritating in others. Using the list form this behaviour
+can be modified:
+
+I<$a>-E<gt>B<bind>(B<"E<lt>DeleteE<gt>">,[I<$b> =E<gt> 'Delete']);
+
+because the first element I<$b> is an object bind
+will call I<$b>-E<gt>B<Delete>.
+
+Note that method/object ordering only matters for C<bind> callbacks,
+the auto-quoting in perl5.001 makes the first of these a little more readable:
+
+ $w->configure(-yscrollcommand => [ set => $ysb]);
+ $w->configure(-yscrollcommand => [ $ysb => 'set' ]);
+
+but both will call C<$ysb>-E<gt>set(args provided by Tk)
+
+Another use of arguments allows you to write generalized methods which are
+easier to re-use:
+
+ $a->bind("<Next>",['Next','Page']);
+ $a->bind("<Down>",['Next','Line']);
+
+This will call C<$a>-E<gt>I<Next>('Page') or C<$a>-E<gt>I<Next>('Line') respectively.
+
+Note that the contents of the C<[]> are evaluated by perl when the
+callback is created. It is often desirable for the arguments provided
+to the callback to depend on the details of the event which caused
+it to be executed. To allow for this callbacks can be nested using the
+C<Ev(...)> "constructor".
+C<Ev(...)> inserts callback objects into the
+argument list. When perl/Tk glue code is preparing the argument list for
+the callback it is about to call it spots these special objects and
+recursively applies the callback process to them.
+
+=head1 EXAMPLES
+
+ $entry->bind('<Return>' => [$w , 'validate', Ev(['get'])]);
+
+ $toplevel->bind('all', '<Visibility>', [\&unobscure, Ev('s')]);
+
+ $mw->bind($class, '<Down>', ['SetCursor', Ev('UpDownLine',1)]);
+
+=head1 SEE ALSO
+
+L<Tk::bind|Tk::bind>
+L<Tk::after|Tk::after>
+L<Tk::options|Tk::options>
+L<Tk::fileevent|Tk::fileevent>
+
+=head1 KEYWORDS
+
+callback, closure, anonymous subroutine, bind
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/cbxarrow.xbm b/Master/tlpkg/tlperl/lib/Tk/cbxarrow.xbm
new file mode 100644
index 00000000000..ae4054488b9
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/cbxarrow.xbm
@@ -0,0 +1,6 @@
+#define cbxarrow_width 11
+#define cbxarrow_height 14
+static char cbxarrow_bits[] = {
+ 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00,
+ 0xfe, 0x03, 0xfc, 0x01, 0xf8, 0x00, 0x70, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0xfe, 0x03, 0xfe, 0x03};
diff --git a/Master/tlpkg/tlperl/lib/Tk/chooseColor.pod b/Master/tlpkg/tlperl/lib/Tk/chooseColor.pod
new file mode 100644
index 00000000000..dbb8f158efa
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/chooseColor.pod
@@ -0,0 +1,64 @@
+# Copyright (c) 1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+chooseColor - pops up a dialog box for the user to select a color.
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+S< >I<$color> = I<$widget>-E<gt>B<chooseColor>?(I<-option>=E<gt>I<value>, ...)?;
+
+=head1 DESCRIPTION
+
+The method B<chooseColor> is implemented as a perl wrapper
+on the core tk "command" B<tk_chooseColor>, and I<$widget>
+is passed as the argument to the hidden B<-parent> option.
+The implementation of internal B<tk_chooseColor> is platform
+specific, on Win32 it is a native dialog, and on UNIX/X11 it is implemented
+in terms of L<Tk::ColorEditor|Tk::ColorEditor>.
+
+The B<chooseColor> method pops up a dialog box for the
+user to select a color. The following I<option-value> pairs are
+possible as command line arguments:
+
+=over 4
+
+=item B<-initialcolor>=E<gt>I<color>
+
+Specifies the color to display in the color dialog when it pops
+up. I<color> must be in a form acceptable to the B<Tk_GetColor>
+function.
+
+=item B<-parent>=E<gt>$widget
+
+Makes $widget the logical parent of the color dialog. The color
+dialog is displayed on top of its parent window.
+
+=item B<-title>=E<gt>I<titleString>
+
+Specifies a string to display as the title of the dialog box. If this
+option is not specified, then a default title will be displayed.
+
+=back
+
+If the user selects a color, B<tk_chooseColor> will return the
+name of the color in a form acceptable to B<Tk_GetColor>. If the
+user cancels the operation, the command will return B<undef>.
+
+=head1 EXAMPLE
+
+ $widget->configure(-fg => $parent->chooseColor(-initialcolor => 'gray',
+ -title => "Choose color"));
+
+=head1 KEYWORDS
+
+color selection dialog
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/chooseDirectory.pod b/Master/tlpkg/tlperl/lib/Tk/chooseDirectory.pod
new file mode 100644
index 00000000000..8a2edc9d672
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/chooseDirectory.pod
@@ -0,0 +1,95 @@
+# Copyright (c) 1998-2000 by Scriptics Corporation.
+# All rights reserved.
+#
+# RCS: @(#) $Id: chooseDirectory.n,v 1.1 2000/01/27 00:23:10 ericm Exp $
+#
+
+=head1 NAME
+
+chooseDirectory - pops up a dialog box for the user to select a directory.
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<chooseDirectory>( ?I<option value ...>? );
+
+=head1 DESCRIPTION
+
+The method B<chooseDirectory> is implemented as a perl wrapper on the
+core tk "command" B<tk_chooseDirectory>, and I<$widget> is passed as
+the argument to the hidden B<-parent> option.
+
+The B<chooseDirectory>
+method pops up a dialog box for the user to select a directory. The
+following I<option-value> pairs are possible as command line
+arguments:
+
+=over 4
+
+=item B<-initialdir> I<dirname>
+
+Specifies that the directories in I<directory> should be displayed
+when the dialog pops up. If this parameter is not specified, then
+the directories in the current working directory are displayed. If the
+parameter specifies a relative path, the return value will convert the
+relative path to an absolute path. This option may not always work on
+the Macintosh. This is not a bug. Rather, the I<General Controls>
+control panel on the Mac allows the end user to override the
+application default directory.
+
+=item B<-parent> $widget
+
+Makes $widget the logical parent of the dialog. The dialog
+is displayed on top of its parent window.
+
+=item B<-title> I<titleString>
+
+Specifies a string to display as the title of the dialog box. If this
+option is not specified, then a default title will be displayed.
+
+=item B<-mustexist> I<boolean>
+
+Specifies whether the user may specify non-existant directories. If
+this parameter is true, then the user may only select directories that
+already exist. The default value is I<false>.
+
+=back
+
+=head1 CAVEATS
+
+Perl does not have a concept of encoded filesystems yet. This means
+that operations on filenames like C<opendir> and C<open> still use
+byte semantics. Tk however uses character semantics internally, which
+means that you can get filenames with the UTF-8 flag set in functions
+like C<chooseDirectory>, C<getOpenFile> and similar. It's the user's
+responsibility to determine the encoding of the underlying filesystem
+and convert the result into bytes, e.g.
+
+ use Encode;
+ ...
+ my $dir = $mw->chooseDirectory;
+ $dir = encode("windows-1252", $dir);
+ opendir DIR, $dir or die $!;
+ ...
+
+See also L<perlunicode/When Unicode Does Not Happen> and
+L<perltodo/Unicode in Filenames>.
+
+=head1 EXAMPLE
+
+ my $dir = $mw->chooseDirectory(-initialdir => '~',
+ -title => 'Choose a directory');
+ if (!defined $dir) {
+ warn 'No directory selected';
+ } else {
+ warn "Selected $dir";
+ }
+
+=head1 SEE ALSO
+
+L<Tk::getOpenFile>, L<Tk::getOpenFile>
+
+=head1 KEYWORDS
+
+directory selection dialog
diff --git a/Master/tlpkg/tlperl/lib/Tk/composite.pod b/Master/tlpkg/tlperl/lib/Tk/composite.pod
new file mode 100644
index 00000000000..a493b5ee1f2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/composite.pod
@@ -0,0 +1,171 @@
+# $Id: composite.pod 1.2 Wed, 12 Nov 1997 00:30:45 +0100 ach $
+
+=head1 NAME
+
+Tk::composite - Defining a new composite widget class
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+ package Tk::MyNewWidget;
+
+ use Tk:widgets qw/ list of Tk widgets /;
+ use base qw/ Tk::Frame /; # or Tk::Toplevel
+
+ Construct Tk::Widget 'MyNewWidget';
+
+ sub ClassInit {
+ my( $class, $mw ) = @_;
+ #... e.g., class bindings here ...
+ $class->SUPER::ClassInit( $mw );
+ }
+
+ sub Populate {
+ my( $self, $args ) = @_;
+
+ my $flag = delete $args->{-flag};
+ if( defined $flag ) {
+ # handle -flag => xxx which can only be done at create
+ # time the delete above ensures that new() does not try
+ # and do $self->configure( -flag => xxx );
+ }
+
+ $self->SUPER::Populate( $args );
+
+ $self = $self->Component( ... );
+
+ $self->Delegates( ... );
+
+ $self->ConfigSpecs(
+ '-cursor' => [ SELF, 'cursor', 'Cursor', undef ],
+ '-something' => [ METHOD, dbName, dbClass, default ],
+ '-text' => [ $label, dbName, dbClass, default ],
+ '-heading' => [ {-text => $head},
+ heading, Heading, 'My Heading' ],
+ );
+ }
+
+ sub something {
+ my( $self, $value) = @_;
+ if ( @_ > 1 ) {
+ # set it
+ }
+ return # current value
+ }
+
+ 1;
+
+ __END__
+
+
+ =head1 NAME
+
+ Tk::Whatever - a whatever widget
+
+ =head1 SYNOPSIS
+
+ use Tk::Whatever;
+
+ $widget = $parent->Whatever(...);
+
+ =head1 DESCRIPTION
+
+ ...
+
+=head1 DESCRIPTION
+
+The intention behind a composite is to create a higher-level widget,
+sometimes called a "super-widget" or "mega-widget". Most often,
+a composite will be
+built upon other widgets by B<using> them, as opposed to specializing on them.
+For example, the supplied composite widget B<LabEntry> is I<made of> an
+B<Entry> and a B<Label>; it is neither a I<kind-of> B<Label>
+nor is it a I<kind-of> B<Entry>.
+
+Most of the work of a composite widget consistd in creating subwidgets,
+arranging to dispatch configure options to the proper subwidgets and manage
+composite-specific configure options.
+
+=head1 GLORY DETAILS
+
+Depending on your Perl/Tk knowledge this section may be enlighting
+or confusing.
+
+=head2 Composite Widget
+
+Since Perl/Tk is heavilly using an object-oriented approach, it is no
+suprise that creating a composite goes through a B<new()> method.
+However, the composite does not normally define a B<new()> method
+itself: it is usually sufficient to simply inherit it from
+B<Tk::Widget>.
+
+This is what happens when the composite uses
+
+ use base qw/ Tk::Frame /; # or Tk::Toplevel
+
+to specify its inheritance chain. To complete the initialisation of the
+widget, it must call the B<Construct> method from class B<Widget>. That
+method accepts the name of the new class to create, i.e. the package name
+of your composite widget:
+
+ Construct Tk::Widget 'MyNewWidget';
+
+Here, B<MyNewWidget> is the package name (aka the widget's B<class>). This
+will define a constructor method for B<MyNewWidget>, normally named after the
+widget's class. Instanciating that composite in client code would
+the look like:
+
+ $mw = MainWindow->new; # creates a top-level MainWindow
+
+ $self = $mw->MyNewWidget(); # creates an instance of the
+ # composite widget MyNewWidget
+
+Whenever a composite is instanciated in client code,
+C<Tk::Widget::new()> will be invoked via the widget's class
+constructor. That B<new> method will call
+
+ $self->Populate(\%args);
+
+where I<%args> is the arguments passed to the widget's constructor. Note
+that B<Populate> receives a B<reference> to the hash array
+containing all arguments.
+
+B<Populate> is typically defined in the composite class (package),
+which creates the characteristic subwidgets of the class.
+
+=head2 Creating Subwidgets
+
+Subwidget creation happens usually in B<Populate()>.
+The composite usually calls the
+subwidget's constructor method either directly, for "private" subwidgets,
+or indirectly through the B<Component> method for subwidgets that should
+be advertised to clients.
+
+B<Populate> may call B<Delegates> to direct calls to methods
+of chosen subwidgets. For simple composites, typically most if not all
+methods are directed
+to a single subwidget - e.g. B<ScrListbox> directs all methods to the core
+B<Listbox> so that I<$composite>-E<gt>B<get>(...) calls
+I<$listbox>-E<gt>B<get>(...).
+
+=head2 Defining mega-widget options
+
+B<Populate> should also call B<ConfigSpecs()> to specify the
+way that configure-like options should be handled in the composite.
+Once B<Populate> returns, method B<Tk::Frame::ConfigDefault>
+walks through the B<ConfigSpecs> entries and populates
+%$args hash with defaults for options from X resources (F<.Xdefaults>, etc).
+
+When B<Populate> returns to B<Tk::Widget::new()>,
+a call to B<$self>-E<gt>I<configure>(%$args) is made which sets *all*
+the options.
+
+=head1 SEE ALSO
+
+L<Tk::ConfigSpecs|Tk::ConfigSpecs>
+L<Tk::mega|Tk::mega>
+L<Tk::Derived|Tk::Derived>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/LabEnLabRad.pm b/Master/tlpkg/tlperl/lib/Tk/demos/LabEnLabRad.pm
new file mode 100644
index 00000000000..c49ef0b1881
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/LabEnLabRad.pm
@@ -0,0 +1,41 @@
+package Tk::LabeledEntryLabeledRadiobutton;
+require Tk::Frame;
+
+use vars qw($VERSION);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/demos/demos/LabEnLabRad.pm#4 $
+
+use base qw(Tk::Frame);
+
+require Tk::LabEntry;
+require Tk::LabRadio;
+
+Construct Tk::Widget 'LabeledEntryLabeledRadiobutton';
+
+sub Populate
+{
+
+ # LabeledEntryLabeledRadiobutton(s) constructor.
+ #
+ # Advertised subwidgets: labeled_entry, labeled_radiobutton.
+
+ my($cw, $args) = @_;
+
+ my $e = $cw->Component(LabEntry => 'labeled_entry');
+ $e->pack(-side => 'left', -expand => 1, -fill => 'both');
+
+ my $r = $cw->Component(LabRadiobutton => 'labeled_radiobutton',
+ -radiobuttons => delete $args->{'-radiobuttons'}
+ );
+ $r->pack(-side => 'left', -expand => 1, -fill => 'both');
+ $cw->ConfigSpecs(-entry_label => [ Tk::Configure->new($e,'-label'), undef, undef, 'Entry' ],
+ -radio_label => [ Tk::Configure->new($r,'-label'), undef, undef, Choose ],
+ -entry_variable => [ Tk::Configure->new($e,'-textvariable'), undef, undef, \$cw->{Config}{-text} ],
+ -radio_variable => [ Tk::Configure->new($r,'-variable'), undef, undef, undef ],
+ -indicatoron => [ 'labeled_radiobutton' , undef, undef, undef ],
+ DEFAULT => [ ['labeled_entry','labeled_radiobutton']],
+ );
+ $cw->Delegates(DEFAULT => 'labeled_entry');
+
+} # end LabeledEntryLabeledRadiobutton(s) constructor
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPB.xpm b/Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPB.xpm
new file mode 100644
index 00000000000..54f69c505d2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPB.xpm
@@ -0,0 +1,48 @@
+/* XPM */
+static char * QuitPB_xpm[] = {
+"64 40 5 1",
+" c none",
+". c #000000000000",
+"X c #00000000FFFF",
+"o c #FFFFFFFFFFFF",
+"O c #820782078207",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ............. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXXX. ",
+" .XXXXXXXXXXX. .. . ",
+" .XXXXXXX..XX. . . . . ",
+" .XXXXXX.o .X. . . . ",
+" .XXXXXX. .X. . . . . . .... ",
+" .XXXXXXX..XX. . . . . . . ",
+" .XXXXXXXXXXX. . . . . . . ",
+" .XXXXXXXXXXX. . . . . . . ",
+" .XXXXXXXXXXX. . . . . . . . ",
+" .XXXXXXXXXXX. . .. . . . . ",
+" .XXXXXXXXXXX. . .. .. .. . . ",
+" .......XXXXXXXXXXX........ .. . .. . . .. ",
+" OOOOOO.XXXXXXXXXXX.OOOOOOO ",
+" .......................... ........ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPBa.xpm b/Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPBa.xpm
new file mode 100644
index 00000000000..6f00b62c1a5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/QuitPBa.xpm
@@ -0,0 +1,48 @@
+/* XPM */
+static char * QuitPBa_xpm[] = {
+"64 40 5 1",
+" c none",
+". c #820782078207",
+"X c #000000000000",
+"o c #000082070000",
+"O c #00000000FFFF",
+" ",
+" ",
+" . ",
+" . ",
+" . .X ",
+" . ... ",
+" XXXXXXXXXXXXX . X.oo ",
+" XX X .Xooo ",
+" XX X oX.ooo . ",
+" XOX . X ooo.oo . ",
+" XOX . X . .. oooo . ",
+" XOOX . X . . oo . ",
+" XOOX XX . . ",
+" XOOX XXXX ",
+" XOOX XXX XX XX X ",
+" XOOX XX XXX XX X X X X ",
+" XOOX XXX XX X X X X ",
+" XOXX . XXXXXX X X X X X XXXX ",
+" XX X .. XXXX X X X X X X ",
+" XX X . . XXX X X X X X X ",
+" XOXX .. XXXXX X X X X X X ",
+" XOOX . . XX X XXX X X X X X X X ",
+" XXXXXXXOOX . XXXXXXXXX X XX X X X X ",
+" ......XOOX . XX....XXX X XX XX XX X X ",
+" XXXXXXXOOX . . XXXXXXXXX XX X XX X X XX ",
+" XOX . XXXX X ",
+" XOX . XXX XXXXXXXX ",
+" XX . ",
+" XX . ",
+" . ",
+" . ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/c.icon b/Master/tlpkg/tlperl/lib/Tk/demos/images/c.icon
new file mode 100644
index 00000000000..6ae6638097c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/c.icon
@@ -0,0 +1,16 @@
+#define c.icon_width 32
+#define c.icon_height 32
+#define c.icon_x_hot 16
+#define c.icon_y_hot 16
+static char c.icon_bits[] = {
+ 0xfc, 0xff, 0xff, 0x00, 0x04, 0x00, 0x80, 0x01, 0x04, 0x00, 0x80, 0x02,
+ 0x04, 0x00, 0x80, 0x04, 0x04, 0x00, 0x80, 0x08, 0x04, 0x00, 0x80, 0x10,
+ 0x04, 0x00, 0x80, 0x20, 0x04, 0x00, 0x80, 0x7f, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0xe0, 0x37, 0x60,
+ 0x04, 0xf8, 0x3f, 0x60, 0x04, 0x38, 0x3c, 0x60, 0x04, 0x1c, 0x38, 0x60,
+ 0x04, 0x0c, 0x30, 0x60, 0x04, 0x0c, 0x00, 0x60, 0x04, 0x0c, 0x00, 0x60,
+ 0x04, 0x1c, 0x00, 0x60, 0x04, 0x38, 0x70, 0x60, 0x64, 0xf8, 0x7f, 0x60,
+ 0x64, 0xe0, 0x1f, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0xfc, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0x7f};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.cur b/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.cur
new file mode 100644
index 00000000000..c74a85ff8ff
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.cur
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.mask b/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.mask
new file mode 100644
index 00000000000..2548715dd01
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.mask
@@ -0,0 +1,6 @@
+#define cursor_mask_width 17
+#define cursor_mask_height 12
+static char cursor_mask_bits[] = {
+ 0x20, 0x00, 0x00, 0x90, 0x20, 0x00, 0x40, 0x40, 0x00, 0x0c, 0x40, 0x00,
+ 0x1c, 0x8f, 0x00, 0x9c, 0xbf, 0x00, 0xfc, 0x3f, 0x01, 0xfc, 0x7f, 0x01,
+ 0xfe, 0x7f, 0x01, 0xfe, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x7f, 0x00};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.xbm b/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.xbm
new file mode 100644
index 00000000000..2646ea7aa77
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/cursor.xbm
@@ -0,0 +1,8 @@
+#define cursor_width 17
+#define cursor_height 12
+#define cursor_x_hot 8
+#define cursor_y_hot 7
+static char cursor_bits[] = {
+ 0x20, 0x00, 0x00, 0x90, 0x20, 0x00, 0x40, 0x40, 0x00, 0x0c, 0x40, 0x00,
+ 0x14, 0x8f, 0x00, 0x94, 0xb0, 0x00, 0x7c, 0x20, 0x01, 0x0c, 0x4c, 0x01,
+ 0x0a, 0x42, 0x01, 0x42, 0x82, 0x00, 0x3b, 0x87, 0x00, 0xff, 0x7f, 0x00};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/dir.icon b/Master/tlpkg/tlperl/lib/Tk/demos/images/dir.icon
new file mode 100644
index 00000000000..af2dc3e4fa1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/dir.icon
@@ -0,0 +1,16 @@
+#define nfm_dir.icon_width 32
+#define nfm_dir.icon_height 32
+#define nfm_dir.icon_x_hot 16
+#define nfm_dir.icon_y_hot 16
+static char nfm_dir.icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x08, 0x20,
+ 0xfe, 0xff, 0x07, 0x40, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0,
+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/dir.mask b/Master/tlpkg/tlperl/lib/Tk/demos/images/dir.mask
new file mode 100644
index 00000000000..1cd406b5802
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/dir.mask
@@ -0,0 +1,16 @@
+#define nfm_dir.mask_width 32
+#define nfm_dir.mask_height 32
+#define nfm_dir.mask_x_hot 16
+#define nfm_dir.mask_y_hot 16
+static char nfm_dir.mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x3f,
+ 0xfe, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/earth.gif b/Master/tlpkg/tlperl/lib/Tk/demos/images/earth.gif
new file mode 100644
index 00000000000..2f603849780
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/earth.gif
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/earthris.gif b/Master/tlpkg/tlperl/lib/Tk/demos/images/earthris.gif
new file mode 100644
index 00000000000..c4ee4737279
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/earthris.gif
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/face b/Master/tlpkg/tlperl/lib/Tk/demos/images/face
new file mode 100644
index 00000000000..03d829f4d1f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/face
@@ -0,0 +1,173 @@
+#define face_width 108
+#define face_height 144
+#define face_x_hot 48
+#define face_y_hot 80
+static char face_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x09,
+ 0x20, 0x80, 0x24, 0x05, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x88,
+ 0x24, 0x20, 0x80, 0x24, 0x00, 0x00, 0x00, 0x10, 0x80, 0x04, 0x00, 0x01,
+ 0x00, 0x01, 0x40, 0x0a, 0x09, 0x00, 0x92, 0x04, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x40, 0x12, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x84,
+ 0x24, 0x40, 0x22, 0xa8, 0x02, 0x14, 0x84, 0x92, 0x40, 0x42, 0x12, 0x04,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x52, 0x00, 0x52, 0x11, 0x00, 0x12, 0x00,
+ 0x40, 0x02, 0x00, 0x20, 0x00, 0x08, 0x00, 0xaa, 0x02, 0x54, 0x85, 0x24,
+ 0x00, 0x10, 0x12, 0x00, 0x00, 0x81, 0x44, 0x00, 0x90, 0x5a, 0x00, 0xea,
+ 0x1b, 0x00, 0x80, 0x40, 0x40, 0x02, 0x00, 0x08, 0x00, 0x20, 0xa2, 0x05,
+ 0x8a, 0xb4, 0x6e, 0x45, 0x12, 0x04, 0x08, 0x00, 0x00, 0x00, 0x10, 0x02,
+ 0xa8, 0x92, 0x00, 0xda, 0x5f, 0x10, 0x00, 0x10, 0xa1, 0x04, 0x20, 0x41,
+ 0x02, 0x00, 0x5a, 0x25, 0xa0, 0xff, 0xfb, 0x05, 0x41, 0x02, 0x04, 0x00,
+ 0x00, 0x08, 0x40, 0x80, 0xec, 0x9b, 0xec, 0xfe, 0x7f, 0x01, 0x04, 0x20,
+ 0x90, 0x02, 0x04, 0x00, 0x08, 0x20, 0xfb, 0x2e, 0xf5, 0xff, 0xff, 0x57,
+ 0x00, 0x04, 0x02, 0x00, 0x00, 0x20, 0x01, 0xc1, 0x6e, 0xab, 0xfa, 0xff,
+ 0xff, 0x05, 0x90, 0x20, 0x48, 0x02, 0x00, 0x04, 0x20, 0xa8, 0xdf, 0xb5,
+ 0xfe, 0xff, 0xff, 0x0b, 0x01, 0x00, 0x01, 0x00, 0x80, 0x80, 0x04, 0xe0,
+ 0xbb, 0xef, 0xff, 0xff, 0x7f, 0x01, 0x00, 0x04, 0x48, 0x02, 0x00, 0x20,
+ 0x80, 0xf4, 0x6f, 0xfb, 0xff, 0xff, 0xff, 0x20, 0x90, 0x40, 0x02, 0x00,
+ 0x00, 0x04, 0x08, 0xb8, 0xf6, 0xff, 0xff, 0xdf, 0xbe, 0x12, 0x45, 0x10,
+ 0x90, 0x04, 0x90, 0x00, 0x22, 0xfa, 0xff, 0xff, 0xff, 0xbb, 0xd7, 0xe9,
+ 0x3a, 0x02, 0x02, 0x00, 0x04, 0x90, 0x80, 0xfe, 0xdf, 0xf6, 0xb7, 0xef,
+ 0xbe, 0x56, 0x57, 0x40, 0x48, 0x09, 0x00, 0x04, 0x00, 0xfa, 0xf5, 0xdf,
+ 0xed, 0x5a, 0xd5, 0xea, 0xbd, 0x09, 0x00, 0x00, 0x40, 0x00, 0x92, 0xfe,
+ 0xbf, 0x7d, 0xb7, 0x6a, 0x55, 0xbf, 0xf7, 0x02, 0x11, 0x01, 0x00, 0x91,
+ 0x00, 0xff, 0xff, 0xaf, 0x55, 0x55, 0x5b, 0xeb, 0xef, 0x22, 0x04, 0x04,
+ 0x04, 0x00, 0xa4, 0xff, 0xf7, 0xad, 0xaa, 0xaa, 0xaa, 0xbe, 0xfe, 0x03,
+ 0x20, 0x00, 0x10, 0x44, 0x80, 0xff, 0x7f, 0x55, 0x12, 0x91, 0x2a, 0xeb,
+ 0xbf, 0x0b, 0x82, 0x02, 0x00, 0x00, 0xd1, 0x7f, 0xdf, 0xa2, 0xa4, 0x54,
+ 0x55, 0xfd, 0xfd, 0x47, 0x08, 0x08, 0x00, 0x21, 0xe4, 0xff, 0x37, 0x11,
+ 0x09, 0xa5, 0xaa, 0xb6, 0xff, 0x0d, 0x80, 0x00, 0x00, 0x04, 0xd0, 0xff,
+ 0x4f, 0x44, 0x20, 0x48, 0x55, 0xfb, 0xff, 0x27, 0x11, 0x02, 0x40, 0x40,
+ 0xe2, 0xfb, 0x15, 0x11, 0x4a, 0x55, 0x4a, 0x7d, 0xf7, 0x0f, 0x00, 0x00,
+ 0x04, 0x08, 0xf8, 0xdf, 0x52, 0x44, 0x01, 0x52, 0xb5, 0xfa, 0xff, 0x0f,
+ 0x49, 0x02, 0x00, 0x02, 0xe9, 0xf6, 0x0a, 0x11, 0xa4, 0x88, 0x4a, 0x6d,
+ 0xff, 0x5f, 0x00, 0x00, 0x10, 0x20, 0xf0, 0x2f, 0x21, 0x44, 0x10, 0x52,
+ 0xb5, 0xfa, 0xff, 0x0f, 0x44, 0x04, 0x80, 0x08, 0xf8, 0xab, 0x8a, 0x00,
+ 0x81, 0xa4, 0xd4, 0xd6, 0xfe, 0x2f, 0x00, 0x00, 0x04, 0x40, 0xb5, 0x2d,
+ 0x21, 0x08, 0x04, 0x90, 0xaa, 0xfa, 0xff, 0x1f, 0x11, 0x01, 0x00, 0x04,
+ 0xf0, 0x57, 0x0a, 0x22, 0x40, 0x4a, 0xda, 0x5e, 0xfb, 0x1f, 0x40, 0x00,
+ 0x40, 0x20, 0xba, 0x95, 0x90, 0x00, 0x01, 0xa0, 0xaa, 0xea, 0xff, 0x5f,
+ 0x02, 0x02, 0x00, 0x01, 0xe8, 0x57, 0x05, 0x00, 0x00, 0x12, 0xd5, 0xfe,
+ 0xfd, 0x1f, 0x48, 0x00, 0x04, 0x48, 0x7a, 0x95, 0x08, 0x02, 0x10, 0x40,
+ 0xaa, 0x55, 0xf7, 0x1f, 0x00, 0x09, 0x20, 0x00, 0xf8, 0x57, 0x22, 0x10,
+ 0x00, 0x28, 0xa9, 0xfa, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x49, 0xdd, 0x29,
+ 0x01, 0x00, 0x80, 0x80, 0xaa, 0xd7, 0xff, 0x0f, 0x10, 0x00, 0x08, 0x00,
+ 0xf8, 0x96, 0x08, 0x00, 0x00, 0x20, 0x54, 0xfa, 0xee, 0x3f, 0x81, 0x04,
+ 0x40, 0x24, 0xfe, 0x55, 0x82, 0x00, 0x00, 0x82, 0xd2, 0xad, 0xff, 0x0f,
+ 0x08, 0x00, 0x04, 0x80, 0x6c, 0x97, 0x00, 0x00, 0x02, 0x20, 0xa9, 0xf6,
+ 0xdf, 0x5f, 0x00, 0x02, 0x20, 0x09, 0xfa, 0x49, 0x12, 0x00, 0x20, 0x84,
+ 0x54, 0xdb, 0xfe, 0x1f, 0x91, 0x00, 0x00, 0x00, 0xf8, 0x2b, 0x00, 0x20,
+ 0x00, 0x40, 0xa4, 0xf6, 0xbb, 0x1f, 0x04, 0x00, 0x44, 0x92, 0x7e, 0x95,
+ 0x02, 0x00, 0x00, 0x89, 0xaa, 0xdd, 0xff, 0x1f, 0x20, 0x09, 0x10, 0x00,
+ 0xf4, 0x57, 0x20, 0x01, 0x08, 0x20, 0xa9, 0x76, 0xff, 0x5f, 0x02, 0x00,
+ 0x00, 0x21, 0xfc, 0x4a, 0x05, 0x00, 0x01, 0x80, 0x54, 0xdb, 0xff, 0x1e,
+ 0x08, 0x02, 0x04, 0x08, 0xf9, 0x2b, 0x00, 0x00, 0x40, 0x28, 0xd2, 0xf6,
+ 0xff, 0xbf, 0x80, 0x00, 0x90, 0x00, 0xbc, 0x92, 0x08, 0x10, 0x00, 0x82,
+ 0x54, 0xdb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x44, 0xf9, 0x55, 0x02, 0x01,
+ 0x00, 0x20, 0xaa, 0xbd, 0xfd, 0x3f, 0x08, 0x04, 0x04, 0x10, 0xf4, 0x2a,
+ 0x01, 0x00, 0x22, 0x80, 0xd4, 0xf6, 0xff, 0x5f, 0x82, 0x00, 0x40, 0x02,
+ 0xf8, 0x55, 0x20, 0x00, 0x00, 0x50, 0x6a, 0xdf, 0xfe, 0x3f, 0x00, 0x00,
+ 0x00, 0x48, 0xe9, 0x4a, 0x05, 0x08, 0x00, 0xa5, 0xd5, 0xf5, 0xff, 0x3f,
+ 0x10, 0x01, 0x10, 0x01, 0xb0, 0xab, 0x92, 0x02, 0x40, 0xf8, 0xbf, 0xde,
+ 0xfe, 0x5f, 0x02, 0x04, 0x04, 0x48, 0xfa, 0xd4, 0x6f, 0x20, 0x84, 0xef,
+ 0xff, 0xfb, 0xff, 0x1f, 0x20, 0x00, 0x00, 0x00, 0xe0, 0xed, 0xbf, 0x0b,
+ 0xa1, 0x7e, 0xff, 0xbf, 0xfd, 0x5f, 0x04, 0x01, 0x20, 0x49, 0xd2, 0xfb,
+ 0xfe, 0x55, 0xd4, 0xff, 0xff, 0xf6, 0xff, 0x07, 0x00, 0x04, 0x00, 0x00,
+ 0xc0, 0xaa, 0xfb, 0x2b, 0xa2, 0xfe, 0xff, 0xdf, 0xee, 0x1f, 0x91, 0x00,
+ 0x82, 0xa4, 0xa4, 0xf5, 0xff, 0x57, 0xd5, 0xff, 0xbf, 0xfd, 0xff, 0x4d,
+ 0x00, 0x00, 0x20, 0x00, 0x88, 0x5b, 0xff, 0x2f, 0x69, 0xff, 0xff, 0xdb,
+ 0xfe, 0x1f, 0x24, 0x02, 0x00, 0x49, 0xa2, 0xd6, 0xff, 0x5f, 0xea, 0xff,
+ 0x7f, 0x7f, 0x7f, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x40, 0xab, 0xf7, 0xbb,
+ 0xf0, 0xdf, 0xff, 0xd5, 0xff, 0xbf, 0x82, 0x04, 0x42, 0x24, 0x91, 0xd5,
+ 0xaa, 0xae, 0xd4, 0xaa, 0x52, 0x7b, 0xff, 0x15, 0x08, 0x00, 0x00, 0x01,
+ 0x04, 0x55, 0xd5, 0x55, 0x70, 0x5b, 0x75, 0xdd, 0xdf, 0x1f, 0x40, 0x00,
+ 0x08, 0x48, 0xa0, 0x4a, 0xa9, 0x56, 0xea, 0x56, 0xad, 0x6a, 0x7d, 0x9b,
+ 0x04, 0x01, 0x00, 0x02, 0x42, 0x2a, 0xd5, 0xaa, 0xa8, 0xaa, 0xaa, 0xfa,
+ 0xdf, 0x2f, 0x10, 0x04, 0x22, 0x48, 0x08, 0x45, 0x2a, 0x15, 0x68, 0x55,
+ 0x55, 0xd7, 0x76, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x40, 0x2a, 0x80, 0xa0,
+ 0xb2, 0x09, 0x48, 0xb9, 0xdf, 0x17, 0x22, 0x01, 0x00, 0x24, 0x45, 0x8a,
+ 0x24, 0x4a, 0x54, 0x51, 0x91, 0xf6, 0x6e, 0x4b, 0x00, 0x04, 0x90, 0x00,
+ 0x80, 0x52, 0x00, 0x20, 0x69, 0x05, 0xa4, 0xaa, 0xff, 0x1e, 0x48, 0x00,
+ 0x02, 0x92, 0x08, 0x05, 0x81, 0x94, 0xd4, 0x92, 0x40, 0xfd, 0xb6, 0x8b,
+ 0x00, 0x01, 0x40, 0x00, 0x82, 0x54, 0x00, 0x48, 0x68, 0x05, 0x90, 0xa4,
+ 0xef, 0x06, 0x24, 0x00, 0x08, 0x12, 0x10, 0x05, 0x00, 0x10, 0xb5, 0x01,
+ 0x42, 0xfb, 0xbf, 0x43, 0x00, 0x09, 0x00, 0x40, 0x81, 0xa8, 0x08, 0x4a,
+ 0xaa, 0x96, 0x90, 0xac, 0x6d, 0x15, 0x22, 0x00, 0x20, 0x09, 0x04, 0x15,
+ 0x80, 0x28, 0xdc, 0x01, 0x24, 0xfb, 0xbf, 0x01, 0x80, 0x04, 0x09, 0x00,
+ 0x40, 0x48, 0x02, 0x45, 0xb2, 0x2e, 0x41, 0x6d, 0xef, 0x05, 0x11, 0x00,
+ 0x40, 0x52, 0x02, 0x15, 0x29, 0x2a, 0xac, 0x42, 0x54, 0xfb, 0x3b, 0x51,
+ 0x84, 0x00, 0x08, 0x00, 0x20, 0x54, 0x80, 0x05, 0xb5, 0x3d, 0xa2, 0xb6,
+ 0xdf, 0x00, 0x20, 0x04, 0x20, 0x49, 0x89, 0xa8, 0x6a, 0x29, 0xac, 0xd6,
+ 0x54, 0xff, 0x3f, 0x84, 0x00, 0x01, 0x04, 0x10, 0x00, 0x94, 0xa8, 0x56,
+ 0xda, 0x5f, 0xab, 0xd5, 0x1e, 0x10, 0x48, 0x00, 0x90, 0x82, 0x48, 0xa8,
+ 0xb2, 0xac, 0xfd, 0x55, 0xd5, 0xfe, 0x9f, 0x80, 0x00, 0x0a, 0x02, 0x08,
+ 0x02, 0x55, 0x5a, 0x75, 0xff, 0xaf, 0xb6, 0xf7, 0x2d, 0x12, 0x92, 0x00,
+ 0x10, 0x20, 0x10, 0xa8, 0x54, 0xd5, 0xbf, 0x5d, 0xad, 0xdd, 0x0f, 0x00,
+ 0x00, 0x04, 0x40, 0x09, 0x84, 0xa8, 0xaa, 0x5a, 0xed, 0xeb, 0x6a, 0xff,
+ 0x9f, 0xa4, 0x24, 0x01, 0x02, 0xa0, 0x20, 0x50, 0x55, 0xd5, 0xbe, 0xae,
+ 0xad, 0xfd, 0x16, 0x00, 0x10, 0x04, 0x20, 0x0a, 0x08, 0xb4, 0xaa, 0x95,
+ 0xaa, 0x7b, 0xb7, 0xdb, 0x5f, 0x92, 0x04, 0x01, 0x84, 0x20, 0x21, 0x51,
+ 0xd5, 0x2a, 0xa9, 0xee, 0xd5, 0xfe, 0x0d, 0x00, 0x20, 0x04, 0x10, 0x00,
+ 0x08, 0x50, 0xe9, 0xd7, 0xd4, 0xfb, 0xb5, 0xff, 0x9f, 0x24, 0x09, 0x01,
+ 0x42, 0x4a, 0xa2, 0x64, 0xd5, 0x55, 0x7b, 0x7f, 0xda, 0x7d, 0x4f, 0x00,
+ 0x20, 0x04, 0x00, 0x80, 0x00, 0xa0, 0x2a, 0x13, 0x84, 0x6a, 0x55, 0xff,
+ 0x1d, 0x48, 0x8a, 0x00, 0x94, 0x24, 0x8a, 0xc8, 0xaa, 0x42, 0x20, 0x5d,
+ 0xf5, 0xff, 0x5f, 0x01, 0x00, 0x02, 0x01, 0x00, 0x20, 0xa2, 0x4a, 0x1a,
+ 0x82, 0x56, 0xda, 0xbd, 0x3f, 0x92, 0x92, 0x00, 0x90, 0x92, 0x00, 0x40,
+ 0x95, 0x6a, 0xf4, 0x55, 0x6d, 0xff, 0xd6, 0x00, 0x00, 0x0a, 0x04, 0x20,
+ 0x14, 0x49, 0x4b, 0xaa, 0xaa, 0x56, 0xf5, 0xff, 0xbf, 0xab, 0xa4, 0x00,
+ 0x20, 0x89, 0x40, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0xde, 0xbf, 0xeb, 0x03,
+ 0x00, 0x02, 0x04, 0x02, 0x0a, 0x10, 0x2b, 0x2a, 0x55, 0x5b, 0xf5, 0xff,
+ 0xd7, 0x2f, 0x92, 0x00, 0x10, 0x28, 0x21, 0x01, 0x56, 0x95, 0xa0, 0x56,
+ 0xdf, 0xef, 0xea, 0x87, 0x40, 0x0a, 0x42, 0x41, 0x00, 0x90, 0xaa, 0x52,
+ 0xb6, 0xad, 0xfa, 0xff, 0xd5, 0x2f, 0x14, 0x00, 0x00, 0x04, 0x95, 0x04,
+ 0xaa, 0xac, 0x55, 0x6b, 0xff, 0xb7, 0xea, 0x9f, 0x40, 0x02, 0x28, 0x51,
+ 0x00, 0x40, 0x58, 0xd5, 0xda, 0xd6, 0x6e, 0x7f, 0xf9, 0x3f, 0x12, 0x04,
+ 0x02, 0x04, 0x49, 0x25, 0x55, 0xaa, 0x77, 0xab, 0xff, 0x2b, 0xfd, 0x3f,
+ 0x48, 0x01, 0x20, 0x41, 0x00, 0x00, 0x58, 0xa9, 0xda, 0xea, 0xfd, 0xaf,
+ 0xfa, 0xff, 0x02, 0x04, 0x08, 0x14, 0x29, 0x49, 0x52, 0x55, 0x55, 0x55,
+ 0xff, 0x8d, 0xfe, 0x3f, 0xa8, 0x00, 0x02, 0x41, 0x00, 0x02, 0xa0, 0xa2,
+ 0xaa, 0xea, 0xff, 0x53, 0xfd, 0xff, 0x02, 0x04, 0x50, 0x04, 0x25, 0xa8,
+ 0x54, 0x49, 0x52, 0xb5, 0xbf, 0x8a, 0xfe, 0xff, 0xa9, 0x08, 0x04, 0x50,
+ 0x80, 0x02, 0xa1, 0x2a, 0x95, 0xea, 0xff, 0xa1, 0xff, 0xff, 0x03, 0x02,
+ 0x90, 0x02, 0x09, 0x08, 0x44, 0x49, 0x52, 0xbd, 0x7f, 0xca, 0xff, 0xff,
+ 0x2b, 0x09, 0x04, 0x48, 0x40, 0x82, 0x90, 0x56, 0xa9, 0xf6, 0xbf, 0xd0,
+ 0xff, 0xff, 0x47, 0x00, 0x50, 0x02, 0x15, 0x11, 0x40, 0x95, 0xaa, 0xfd,
+ 0x2f, 0xe9, 0xff, 0xff, 0x8f, 0x0a, 0x84, 0x50, 0x40, 0x84, 0x14, 0xaa,
+ 0x6a, 0xff, 0x5f, 0xf2, 0xff, 0xff, 0x7f, 0x00, 0x10, 0x02, 0x09, 0x10,
+ 0x40, 0x7d, 0xf7, 0xff, 0x0b, 0xfc, 0xff, 0xff, 0xaf, 0x02, 0x84, 0x50,
+ 0x42, 0x85, 0x12, 0xd0, 0xdd, 0xff, 0xa7, 0xf2, 0xff, 0xff, 0xff, 0x04,
+ 0x00, 0x0a, 0x08, 0x10, 0x48, 0xf8, 0xff, 0xff, 0x0a, 0xfe, 0xff, 0xff,
+ 0x7f, 0x03, 0xa4, 0x80, 0xa2, 0x8a, 0x02, 0x68, 0xff, 0xff, 0x52, 0xfd,
+ 0xff, 0xff, 0xff, 0x07, 0x00, 0x2a, 0x08, 0x20, 0x28, 0xdc, 0xff, 0x5f,
+ 0x05, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x92, 0x40, 0x22, 0x09, 0x02, 0xea,
+ 0xfb, 0xaf, 0x48, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x12, 0x81, 0xa0,
+ 0x48, 0x9c, 0x6e, 0x93, 0xa2, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa8, 0x40,
+ 0x28, 0x0a, 0x02, 0x74, 0xb5, 0x45, 0x81, 0xff, 0xff, 0xff, 0xff, 0x0f,
+ 0x02, 0x0a, 0x81, 0x20, 0x08, 0xae, 0xaa, 0x90, 0xe8, 0xff, 0xff, 0xff,
+ 0xff, 0x0f, 0x90, 0x40, 0x28, 0x88, 0x12, 0x58, 0x15, 0x50, 0xd0, 0xff,
+ 0xff, 0xff, 0xff, 0x0f, 0x44, 0x0a, 0x41, 0x21, 0x08, 0xae, 0x04, 0x14,
+ 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40, 0x14, 0x88, 0x04, 0xba,
+ 0x02, 0x28, 0xe8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x42, 0x15, 0x41, 0x21,
+ 0x05, 0xad, 0x00, 0x05, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x40,
+ 0x24, 0x8a, 0x0e, 0x36, 0x00, 0x0a, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x0f,
+ 0x42, 0x25, 0x90, 0xd0, 0x8b, 0xc2, 0x41, 0x05, 0xfc, 0xff, 0xff, 0xff,
+ 0xff, 0x0f, 0x10, 0x08, 0x05, 0xe8, 0x8e, 0x58, 0x80, 0x02, 0xfa, 0xff,
+ 0xff, 0xff, 0xff, 0x0f, 0x4a, 0x20, 0xa8, 0xba, 0x0b, 0x2b, 0x51, 0x01,
+ 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x8a, 0x02, 0xe8, 0xaf, 0x84,
+ 0x90, 0x04, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x52, 0x21, 0x54, 0xbf,
+ 0x1f, 0x15, 0xa5, 0x02, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x08,
+ 0x01, 0xfa, 0xb6, 0xa4, 0x52, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+ 0x4a, 0xa2, 0x54, 0xef, 0x5f, 0x4b, 0xa4, 0x80, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x0f, 0x80, 0x10, 0x82, 0xfe, 0xbf, 0x92, 0x52, 0x42, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x0f, 0x12, 0x42, 0xa8, 0xbf, 0x1f, 0x24, 0x80, 0xa0,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28, 0x8a, 0xf7, 0x37, 0x80,
+ 0x52, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x10, 0x82, 0xe0, 0xff,
+ 0x1f, 0x00, 0x20, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x84, 0x28,
+ 0xca, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+ 0x10, 0x42, 0xf0, 0xfd, 0x1b, 0x00, 0x50, 0xf0, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x0f, 0xa4, 0x10, 0xc5, 0xff, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x0f, 0x00, 0x22, 0xf8, 0xff, 0x0e, 0x00, 0x00, 0xf0,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xaa, 0x88, 0xe2, 0xff, 0x0f, 0x10,
+ 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x25, 0xfa, 0xff,
+ 0x0f, 0x01, 0x11, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xfb,
+ 0xfb, 0xff, 0x7f, 0x5d, 0xd5, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/flagdown b/Master/tlpkg/tlperl/lib/Tk/demos/images/flagdown
new file mode 100644
index 00000000000..55abc51825b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/flagdown
@@ -0,0 +1,27 @@
+#define flagdown_width 48
+#define flagdown_height 48
+static char flagdown_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe1, 0x00, 0x00,
+ 0x00, 0x00, 0x70, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04,
+ 0x00, 0x00, 0x03, 0x00, 0x06, 0x06, 0x00, 0x80, 0x01, 0x00, 0x06, 0x07,
+ 0x00, 0xc0, 0x1f, 0x00, 0x87, 0x07, 0x00, 0xe0, 0x7f, 0x80, 0xc7, 0x07,
+ 0x00, 0x70, 0xe0, 0xc0, 0xe5, 0x07, 0x00, 0x38, 0x80, 0xe1, 0x74, 0x07,
+ 0x00, 0x18, 0x80, 0x71, 0x3c, 0x07, 0x00, 0x0c, 0x00, 0x3b, 0x1e, 0x03,
+ 0x00, 0x0c, 0x00, 0x1f, 0x0f, 0x00, 0x00, 0x86, 0x1f, 0x8e, 0x07, 0x00,
+ 0x00, 0x06, 0x06, 0xc6, 0x05, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x05, 0x00,
+ 0x00, 0x06, 0x00, 0xc6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00,
+ 0x7f, 0x06, 0x00, 0x06, 0xe4, 0xff, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00,
+ 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00,
+ 0x00, 0x06, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00,
+ 0x00, 0x06, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x66, 0x00, 0x00,
+ 0x00, 0x06, 0x00, 0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x3e, 0x00, 0x00,
+ 0x00, 0xfe, 0xff, 0x2f, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x27, 0x00, 0x00,
+ 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x88, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x20, 0x00, 0x00,
+ 0xf7, 0xbf, 0x8e, 0xfc, 0xdf, 0xf8, 0x9d, 0xeb, 0x9b, 0x76, 0xd2, 0x7a,
+ 0x46, 0x30, 0xe2, 0x0f, 0xe1, 0x47, 0x55, 0x84, 0x48, 0x11, 0x84, 0x19};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/flagup b/Master/tlpkg/tlperl/lib/Tk/demos/images/flagup
new file mode 100644
index 00000000000..6eb0d846a32
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/flagup
@@ -0,0 +1,27 @@
+#define flagup_width 48
+#define flagup_height 48
+static char flagup_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00,
+ 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xef, 0x6a, 0x00,
+ 0x00, 0x00, 0xc0, 0x7b, 0x75, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x6a, 0x00,
+ 0x00, 0x00, 0x30, 0x60, 0x75, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x7f, 0x00,
+ 0x00, 0x00, 0x0c, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x04, 0x00,
+ 0x00, 0x00, 0x03, 0xe0, 0x04, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x06, 0x00,
+ 0x00, 0xc0, 0x1f, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x7f, 0xe0, 0x07, 0x00,
+ 0x00, 0x70, 0xe0, 0xe0, 0x05, 0x00, 0x00, 0x38, 0x80, 0xe1, 0x04, 0x00,
+ 0x00, 0x18, 0x80, 0xf1, 0x04, 0x00, 0x00, 0x0c, 0x00, 0xfb, 0x04, 0x00,
+ 0x00, 0x0c, 0x00, 0xff, 0x04, 0x00, 0x00, 0x86, 0x1f, 0xee, 0x04, 0x00,
+ 0x00, 0x06, 0x06, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00,
+ 0x00, 0x06, 0x00, 0xe6, 0x04, 0x00, 0x00, 0x06, 0x00, 0x66, 0x04, 0x00,
+ 0x7f, 0x56, 0x52, 0x06, 0xe4, 0xff, 0x00, 0x76, 0x55, 0x06, 0x04, 0x00,
+ 0x00, 0x56, 0x57, 0x06, 0x04, 0x00, 0x00, 0x56, 0x55, 0x06, 0x06, 0x00,
+ 0x00, 0x56, 0xd5, 0x06, 0x03, 0x00, 0x00, 0x06, 0x00, 0x86, 0x01, 0x00,
+ 0x54, 0x06, 0x00, 0xc6, 0x54, 0x55, 0xaa, 0x06, 0x00, 0x66, 0xaa, 0x2a,
+ 0x54, 0x06, 0x00, 0x36, 0x55, 0x55, 0xaa, 0x06, 0x00, 0xbe, 0xaa, 0x2a,
+ 0x54, 0xfe, 0xff, 0x6f, 0x55, 0x55, 0xaa, 0xfc, 0xff, 0xa7, 0xaa, 0x2a,
+ 0x54, 0x01, 0x88, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
+ 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
+ 0x54, 0x55, 0x8d, 0x60, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa0, 0xaa, 0x2a,
+ 0x54, 0x55, 0x8d, 0x50, 0x55, 0x55, 0xaa, 0xaa, 0x8a, 0xa8, 0xaa, 0x2a,
+ 0x54, 0x55, 0x95, 0x54, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x2a,
+ 0x54, 0x55, 0x55, 0x55, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/grey.25 b/Master/tlpkg/tlperl/lib/Tk/demos/images/grey.25
new file mode 100644
index 00000000000..b234b3cb0be
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/grey.25
@@ -0,0 +1,6 @@
+#define grey_width 16
+#define grey_height 16
+static char grey_bits[] = {
+ 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
+ 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
+ 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/grey.5 b/Master/tlpkg/tlperl/lib/Tk/demos/images/grey.5
new file mode 100644
index 00000000000..37688893f08
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/grey.5
@@ -0,0 +1,6 @@
+#define grey_width 16
+#define grey_height 16
+static char grey_bits[] = {
+ 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
+ 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
+ 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/letters b/Master/tlpkg/tlperl/lib/Tk/demos/images/letters
new file mode 100644
index 00000000000..0f12568d1a0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/letters
@@ -0,0 +1,27 @@
+#define letters_width 48
+#define letters_height 48
+static char letters_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20,
+ 0x00, 0xfa, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a,
+ 0x00, 0x3a, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2e,
+ 0xe0, 0xff, 0xff, 0xff, 0xff, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x21,
+ 0xa0, 0x03, 0x00, 0x00, 0x70, 0x21, 0x20, 0x00, 0x00, 0x00, 0x50, 0x21,
+ 0xa0, 0x1f, 0x00, 0x00, 0x50, 0x21, 0x20, 0x00, 0x00, 0x00, 0x70, 0x21,
+ 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21,
+ 0xfa, 0x01, 0x00, 0x80, 0x0b, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0a, 0x21,
+ 0xba, 0x01, 0x00, 0x80, 0x0a, 0x21, 0x02, 0x00, 0x00, 0x80, 0x0b, 0x21,
+ 0x3a, 0x00, 0x00, 0x00, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x21,
+ 0x02, 0xc0, 0xfb, 0x03, 0x08, 0x21, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3f,
+ 0x02, 0xc0, 0xbd, 0x0f, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01,
+ 0x02, 0xc0, 0x7f, 0x7b, 0x08, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01,
+ 0x02, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00,
+ 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/mickey.gif b/Master/tlpkg/tlperl/lib/Tk/demos/images/mickey.gif
new file mode 100644
index 00000000000..91baba9795f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/mickey.gif
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/ned.xpm b/Master/tlpkg/tlperl/lib/Tk/demos/images/ned.xpm
new file mode 100644
index 00000000000..88fe4bf098c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/ned.xpm
@@ -0,0 +1,69 @@
+! XPM2
+64 64 3 1
+ c None s None
+. c #000000000000
+X c #FFFFFFFFFFFF
+
+
+
+
+
+
+
+
+
+ .........
+ ...............XXXXXXXXX..
+ .............XXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ X.XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXX.......
+ .XXXXXXXXXX.XXXXXXXXXXXXX..........X.
+ .XXXXXXXXX.XXXX..........XXXXXXXXXXX.
+ .XXXXXXX......XXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXX...XX....X........X......XXXXX.
+ .XXXXX..XXX..XXX..XXX..XX..XX..XXXX.
+ .XXXXX...XX..XXX..XXX..XX..XXX..XXX.
+ .XXXXX...XX..XXX..X.XXXXX..XXX..XXX.
+ .XXXXX..X.X..XXX....XXXXX..XXX..XXX.
+ .XXXXX..X.X..XXX..X.XXXXX..XXX..XXX.
+ .XXXXX..XX...XXX..XXX..XX..XXX..XXX.
+ .XXXXX..XX...XXX..XXX..XX..XX..XXXX.
+ .XXX....XX..XX........X......XXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ....
+ .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....XXXX.
+ .XXXXXXXXXXXXXX................XXXXXXXXX.
+ .XXXXXX.........XXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
+ .XXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXX.......
+ .XXXXXX.XXXXXXXXXXXXXX..........
+ .XXXX..XXXX..........
+ ...........
+
+
+
+
+
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/noletters b/Master/tlpkg/tlperl/lib/Tk/demos/images/noletters
new file mode 100644
index 00000000000..5774124efe9
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/noletters
@@ -0,0 +1,27 @@
+#define noletters_width 48
+#define noletters_height 48
+static char noletters_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00,
+ 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00,
+ 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01,
+ 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0xe0, 0x07,
+ 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x78, 0x0e,
+ 0xf0, 0x00, 0x00, 0x00, 0x3c, 0x1e, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x1c,
+ 0x38, 0x00, 0x00, 0x00, 0x0f, 0x38, 0x38, 0x00, 0x00, 0x80, 0x07, 0x38,
+ 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x1c, 0x04, 0x00, 0xe0, 0x41, 0x70,
+ 0x1c, 0x04, 0x00, 0xf0, 0x40, 0x70, 0x1c, 0x74, 0x00, 0x78, 0x4e, 0x70,
+ 0x0e, 0x04, 0x00, 0x3c, 0x4a, 0xe0, 0x0e, 0x74, 0x03, 0x1e, 0x4a, 0xe0,
+ 0x0e, 0x04, 0x00, 0x0f, 0x4e, 0xe0, 0x0e, 0x04, 0x80, 0x07, 0x40, 0xe0,
+ 0x0e, 0x04, 0xf8, 0x0f, 0x40, 0xe0, 0x0e, 0x04, 0xe0, 0x01, 0x40, 0xe0,
+ 0x0e, 0x04, 0xf8, 0x00, 0x40, 0xe0, 0x0e, 0x04, 0x78, 0x00, 0x40, 0xe0,
+ 0x0e, 0x04, 0xfc, 0xf3, 0x40, 0xe0, 0x1c, 0x04, 0x1e, 0x00, 0x40, 0x70,
+ 0x1c, 0x04, 0x0f, 0x00, 0x40, 0x70, 0x1c, 0x84, 0x07, 0x00, 0x40, 0x70,
+ 0x3c, 0xfc, 0xff, 0xff, 0x7f, 0x78, 0x38, 0xe0, 0x01, 0x00, 0x00, 0x38,
+ 0x38, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x70, 0x78, 0x00, 0x00, 0x00, 0x1c,
+ 0xf0, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0xe0, 0x1e, 0x00, 0x00, 0x00, 0x0e,
+ 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x07,
+ 0x80, 0x07, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x1f, 0x00, 0x00, 0xf0, 0x01,
+ 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00,
+ 0x00, 0xf0, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x07, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/page.icon b/Master/tlpkg/tlperl/lib/Tk/demos/images/page.icon
new file mode 100644
index 00000000000..c065c48f9b2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/page.icon
@@ -0,0 +1,16 @@
+#define page.icon_width 32
+#define page.icon_height 32
+#define page.icon_x_hot 16
+#define page.icon_y_hot 16
+static char page.icon_bits[] = {
+ 0xfc, 0xff, 0xff, 0x00, 0x04, 0x00, 0x80, 0x01, 0x04, 0x00, 0x80, 0x02,
+ 0x04, 0x00, 0x80, 0x04, 0x04, 0x00, 0x80, 0x08, 0x04, 0x00, 0x80, 0x10,
+ 0x04, 0x00, 0x80, 0x20, 0x04, 0x00, 0x80, 0x7f, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x60,
+ 0xfc, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0x7f};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/page.mask b/Master/tlpkg/tlperl/lib/Tk/demos/images/page.mask
new file mode 100644
index 00000000000..f4b5226598c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/page.mask
@@ -0,0 +1,16 @@
+#define page.mask_width 32
+#define page.mask_height 32
+#define page.mask_x_hot 16
+#define page.mask_y_hot 16
+static char page.mask_bits[] = {
+ 0xfc, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0x03,
+ 0xfc, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0xff, 0x1f,
+ 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0x7f};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/pattern b/Master/tlpkg/tlperl/lib/Tk/demos/images/pattern
new file mode 100644
index 00000000000..df31baf7895
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/pattern
@@ -0,0 +1,6 @@
+#define foo_width 16
+#define foo_height 16
+static char foo_bits[] = {
+ 0x60, 0x06, 0x90, 0x09, 0x90, 0x09, 0xb0, 0x0d, 0x4e, 0x72, 0x49, 0x92,
+ 0x71, 0x8e, 0x8e, 0x71, 0x8e, 0x71, 0x71, 0x8e, 0x49, 0x92, 0x4e, 0x72,
+ 0xb0, 0x0d, 0x90, 0x09, 0x90, 0x09, 0x60, 0x06};
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/images/teapot.ppm b/Master/tlpkg/tlperl/lib/Tk/demos/images/teapot.ppm
new file mode 100644
index 00000000000..b8ab85f3a5d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/images/teapot.ppm
@@ -0,0 +1,31 @@
+P6
+256 256
+255
+\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À[7 eOLjQLmSMoTMnSMlRMhPL_9 \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀnSMtVMzYN~[N~[N\N\O€\O€]O€]O€]O€]O€\O€\O}[NyYNtVM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-wXN}[N€]O„^O†_O†`O‡`Oˆ`Oˆ`OˆaO‰aO‰aO‰aO‰aO‰aO‰aOˆaOˆ`O†_Oƒ^O\N \À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀaMLyYN…_O‰aP‹bPcPŽcPŽdPŽdPdPdPdPdPdPdPdPeP‘eP’eP’eP‘ePdPcP…_OpUM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀwXN…_OdP“fP•gQ–hQ˜hQ˜iQ™iQ™iQšiQšiQšjQ›jQ›jQœjQœjQœjQœjQœjQ›jQœjQ™iQ“fP‡`O\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJiQL‹bP—hQkQ¡mR¤nR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¦pR¨pS©qSªqS«rS¬rS«rS©qS¤oRœjQ€]O\KK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀfOLrUMcPŸlR©qS¯tS²uTµwT·xT¸xT¹yTºyT»zT»zU¼zU¼zU¼zU»zUºyT¸xT¶wT¯tS¡mR‰aOhPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\Àa0 cNLqUM€\O”fQ¦pS²wVºzV¿|VÂ}VÄVÆVÇ€VÉ‚WÌ…[Õeæ w÷³‹êª…Ĉg§qT“fQ{ZNYIK9\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀO1{G#‘JkRMqUMtVN–iS¨v\·€d¹bµzZ±vU°uT®sSªqS¤nRœjQ’eP„^OrUMHh>!T4\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀG-V5wE"~I#†M%U+¥e7²l:°g2®b*­a(­`(©^(¥])¡^-›]1ŠS,qC$`9 R3G-\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À@)J/i>!pA"tD"wF$yH&xH&tE$wE#yG%}M+ƒT4S5mE*Z7!K/B*;'\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À‰aO¦oR½{UÇ€VÏ…X<(F-a: e<!h>!j@#k@$h>"d<!c=$hD-fF2[<)K0@);'5$Ë‚VÇ€V¿|U_LKYIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À…_O·xTÉ‚Wó«€ûµ‹Ö’k¼|X×>µf-¨^(¡Z'šW&–T&œN>)F-J/b; g>#nD(jB&c<!b=%jH2_A/I0!<(8&5$”J¥Y’S%8&;'?)E,<:HA=HE?IJAISFJYIKXIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À£nRÁ}UܘqÊŠe±vU²e,™V&¥V†C €@ |> y< u: r9 o7 l6
+j5
+h4
+g3
+5$D,K/b; h>"wM1tK.e="a<#cA,U8&E-<(9&.!a0 b1 c1    
+
++3#@)46G<:HMCIXHK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀU*´vT¿~X¸{YÃk+›W&‰N$|> u: p8 k5
+f3
+a0 _/ ]. [- I¡\*ª_(‘LkRMmSMmSMnSMnSMD,R3W5mA"|O0|P1j?"c<!a=%Y7"N1F,;'NCJNCJNDJODJODJODJh>!a: X/K%
+g3
+a0 Z- \/ T*Q(ŠHµm8kRMmSMnTMoTMpTMpUM15G15G05G04G04GpUMpTM5^9 d<!yF#O+€N,rC#qB"pB#k?"a: Z7 6ODJPDJPEJQEJQEJREJREJREJRFJSFJSFJSFJSFJe<!X/
+^/ V+Q(L&I$r9  TlRMnSM46G47G47G46G46G46G46G46G36G36G25G25G15G04G/4F.3F
+
+X&pUMuWMwXNxXN<:H<:H<:H<:H<;H<;H<;H<;H=;H=;H=;H=;H>;H>;H?<H@<HA=HC>HG@ILBIREJ[JKcNLjQL§pR±uTºzUÃ~VÈWË‚XÖŽcäsÒŽe¼{V²vT¨pSžkR•gQŒbP†_O‚^O]O€\O€\O€\O€\O€]O]O]O]O]O]O]O]O]O]O]O€\O€\O~\N}[N|ZNxXN•T%H$
+›W&rVMvWNyYNzYN|ZN}[N}[N><H?<H?<H?<H?<H?<H@<H@<H@<HA=HA=HB=HC>HE?IG@IIAIKBIODJSFJWHK—hQŸlR§pR°b(¾i*Én+Ù|7Û|6Ïr,Íq+Êp-Ãl+»g)±b(®sS§pS lRšiQ•gQePcPŠaPˆaO‡`O‡`O†_O†_O…_O…_O…_O…_O…_O…_O…_O„_O„^O„^Oƒ^Oƒ^O‚]O]O€\O~[N{ZN•T%
+
+ 
+@%<-$G?@…pfdNLuWM\NdNL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀTFJvWN‰aP./01„E}[N]O…_Oˆ`O‰aP‹bPŒbPcPcPŽcPdPdPdPeP‘eP’eP’eP“fP“fQ”fQ•gQ•gQ–gQ–hQ—hQ˜hQ™iQšiQ›jQœjQkQkRžlRŸlRžY&¤\'¨^'µ^½bÀcÃeÇi ÄgÀc½b¼a¹`µ^´]¯X¢[' Z'žY&¢mR¡mR¡mR lRŸlRŸlRžkRkQœkQœjQ›jQšjQšiQ™iQ™iQ˜iQ˜hQ—hQ—hQ—hQ–gQ–gQ•gQ•gQ•gQ”fQ”fQ“fQ“fP’eP‘ePdPcP‰aP—O
+ B\À\À\À\À\À\À\À\À\À\À%7!!C*F#P) {dYœze»p€\OgPL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ`LKvWNŠaPm6
+ 
+$5 ¬`(¶e)£nRœjQƒ^OJAI\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀXIK^KKdNLhPLuWM‚]OŒbP”fQeP m6
+†`OŽcP“fQ—hQ˜hQ™iQšiQšjQ›jQ›jQ›jQœjQœjQœjQœkQkQkQkRžkRžkRžkRžlRŸlRŸlRŸlR lR lR lR¡mR¡mR¡mR¡mRºg)³c(²c(±b(­V¿cÂeÅi!Åi!Àd¼bº`¹`·_·_¶^¢Q§]'ª_(­`(¹f)£nR£nR£nR£nR£nR£nR£nR¢nR¢nR¢nR¢nR¢nR¢nR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢mR¢nR¢mR¢mR£nR¢mR¢mR¡mR mRkR—hQˆGa0 ŠbP mRœjQ“fQ‰aP}[NrUMmSM…L$\À\À\À\À\À\À\À\À B B #C, 8&H.Z7 §pR›jQ{ZN\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀQEJ[JK`LKdNLhQLqUM{ZN…_OŽcP–gQ—hQ
+‹bP‘eP–hQšiQ›jQœjQkQkQkRžkRžkRžlRžlRŸlRŸlRŸlRŸlRŸlR lR lR lR mR¡mR¡mR¡mR¡mR¡mR¢mR¢mR¢mR¢nR£nRÀj*ºg)·e)¶d)Âd°XÅgÅhÂe¿c½b½b¾bªU­`(®a(¯a(³c(¾i*¤oR¤oR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤nR¤oR¤oR¥oR¥oR¥oR¥oR¥oR¥oR¦oR¦oR¥oR¥oR¤nR¡mR›jQŽQ%Z- œjQ£nRŸlR—hQŽdP…_OuWMpTMnSMkRLa: \À\À\À\À\À\À\À B B&D2 @*S6#G@IPDJ˜hQmSM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ]KKbMLeOLiQLlRMvWN\OˆaO‘eP—hQœjQ•gQ
+!C+E'0F.4F7%8%U/lG.SFJZIK]KKZIKB=H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀREJZJK`LKdNLgPLjQLlRMnSMpTMqUMtWMxXN{ZN~[N]O„^O†`O‰aO‹bPdP•gQ™iQœkQ lR¤nR§pSªrS­sS¯tT²uT´vT¶wT·xT¹yT¹yTºyTºyT¹yT¶xT´vT¬rS¢nR—hQ¿|U¿|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ|UÀ}UÀ}UÁ}UÁ}UÁ}UÁ}UÂ}UÂ~UÃ~UÃ~VÃ~VÄVÅ€WÆX®a(ŸlRªrS´vT¸yT¼zU¾|UÁ~VÃXÆ‚[Ɇ_΋dÓ‘jÔ“mÔ“nБlÊŒhĆd½_¶{[°vWªsU¦pS¢nRžkRšiQ˜hQ•gQ“fQ‘ePdPŒbP‰aO†_Oƒ^O€\O|ZNxXNsVMpTMnTMmSMjQL€C B)D&/F-3F47G6%>" Y7 kA$YIK]KK^KKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀVGJ\KKbMLeOLhPLkRLmSMnTMpTMrUMuWNyYN|ZN\N‚]O„_O‡`OŠaPŒbPŽcPeP“fP—hQ›jQžlR¢nR¥oS©qT¬sT¯uU²vU´wV¶xV¸yV¹yUºzU»zU¼{U½{U¾{U¾|U¿|U¿|U¿|U¿|U¾{U½{U¼{U¼zU»zTºyT¹yT¸xTµwT³vT´vT´vT´vT´wT´wTµwT·xT¹yTºzT¼zU½{U¾{U¿|UÀ|UÂ}UÄVÅ€WÇ‚YÉ„\͈_ÑŒdÙ”láuç£|쩂ſt명æ¦ÞŸ{Õ—sËŽl†d¹^³yZ­uW¨qU¤oSŸlRžkRœjQšiQ˜hQ–gQ”fQ‘ePdPcPŠaP‡`O„^O]O}[NyYNuWMpTMoTMmSMkRLgPL&D#.E,3F46G;'<(D"iB(VGJ]KK`LK[JKB>H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^LKcNLfOLiQLkRMmSMoTMqUMsVMvXNzYN}[N€\O‚^O…_Oˆ`OŠaPŒcPdP‘eP“fQ•gQ—hQ™iQkR mS¤oT¨rU¬tW°wY´zZ¸}\»]¾€^À^Á‚^‚^Â\Á€ZÁYÁXÁ~WÁ~WÂ~VÂ~VÂ~VÃ~VÃ~UÃ~UÄ~UÄ~UÄUÄUÅVÅVÅVÅVÆVÆ€VÆ€VÇ€WÇWÈ‚XɃZË…[͇^ЊaÓdØ’iÜ—nâtè£zî©ó¯‡ø´û¸‘üº“û¹“÷¶ñ±Œé©…à¡~Ö˜vËmÇf»€`´z[®vX©rU¥pT£oS¢nS lRžkRœkRšjQ˜iQ–hQ”fQ’ePdPcP‹bPˆ`O…_O‚]O~[NzYNvWNpTMoTMnSMkRMhQLo7 ,2F36G99HC+@ ]8 nA"\JK`ML_LKSFJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMpTMqUMtVMwXNzZN}[N€]Oƒ^O†_OˆaO‹bPcPdP‘eP“fQ•gQ—hQ™iQ›jRžlR mS£oU§rW¬vZ²{]¹€a¿…fÅŠjËnГqÓ•sÕ–sÕ–rÕ–qÕ”oÓ’mÑjÏgÍŠcˈaɆ^È„\Ç‚[ÆYÅ€XÅ€WÅWÅWÅVÅVÅWÅ€WÆ€WÇXÈ‚YɃ[Ê…\͇_ÏŠaÒeÕ‘hÙ•mÝ™qávä¡zç¤}꧀멃몄騃奀ߠ|Ù›wÓ•rÌmƉh¿„c¸~^²yZ®vX¬tWªsV¨qU¦pT¤oS¢nS mRžlRœkR›jQ™iQ—hQ•gQ“fPePŽcP‹bPˆaO…_O‚^O\N{ZNwXNsVMoTMnSMlRMiQL~I#26G99G?<HA*E$ i@$ZIKaMLbML[JK;:H\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀWHJ]KKbMLeOLhPLjRLlSMnTMpTMrUMuWMxXN{ZN~\N]O„^O†`O‰aO‹bPŽcPdP’eP”fQ–gQ˜hQšiQœkRžlS mT£oU¦rWªuZ¯y]´~aºƒfŠlË’sÔšzÜ¡€ã§†è«‰ë®‹í¯Œí®‹ë¬ˆè¨„ã£~ßžyÚ™tÖ•oÒjÎŒfˈbÈ…_ƃ\ÅZÄ€YÃXÂWÂ~WÂ~WÂ~WÃXÀXÄ€YÅZƃ\Ç…^Ɇ`ˈbÌŠdÍ‹fÎgÎŽiÎŽjÎŽjÍŽjËŒiljgÆd¿ƒaº^¸}]¶|\´{[²yZ°xY®vX¬tWªsV¨qU¦pT¤oS¢nS mRžlRkR›jQ™iQ—hQ•gQ“fP‘ePŽdPŒbP‰aO†_Oƒ^O€\O|ZNxXNtVMpTMnSMmSMjQLgPL99G?<HG-E&b;!YIK`MLdOM`LKNCJ\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀŸlRºyTÄ~UÊ‚XʃYÄXº{W­tUšW'¢[(—hQ lRcP€\OhQL\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀNCJYIK^LKcNLfOLiQLkRLmSMoTMqUMrVMvWNyYN|ZN\N‚]O„_O‡`O‰aPŒbPŽcPdP’fP”gQ–hQ˜iQšjRœkRžlS¡nT¤pU§sW«vZ°z]µb»„gŠlÉ‘sИyØžÞ¤…ã©Šè­ì±ï³‘ﳑ뭊穅⣀ݞzؘtÒ“nÎiɉdÆ…`Â]Á€[¿~Y¾}X½|W½|V¼{V¼{V¼{V¼{V¼{V¼|W¼|W½}X½}Y½~Z½~Z¼~Z»}[º}[º}[º~\º~\º~]º~]¹~]¸~]·}]¶|\´z[²yZ°wY®vX¬tWªsV¨rU¦pT¤oS¢nS mRŸlRkR›jQšiQ˜hQ–gQ“fQ‘ePdPŒcPŠaP‡`O„^O]O}[NyYNuWNpTMnTMmSMkRLhPL|H$D>IQ2P+XHK_LLfQOcNLXIK\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À©qSºyTÃ~VΈ`遲ޜv¾€]ªqS–LŽG|> g3
+S)?*%.—hQ—hQ‘eP‡`OuWM\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\ÀSFJ[JK`LKdNLgPLjQLlRMnSMoTMqUMsVMwXNzYN}[N€\O‚^O…_O‡`OŠaPŒbPŽdP‘eP“fP•gQ—hQ˜iQšjRœkRŸlS¡nT¤pV§sX«vZ°z^¶b¼…gËmÊ’sјzØŸ€Þ¤…ã©Šè­ê¯ë°ê¯Žè¬‹å¨‡à¤‚Ûž|Ö™wÑ“qÌŽlljgÃ…bÀ‚_½\»}Zº{X¹zW¸yV·yU·xU·xU·xT·xT·xU·xU·xU·yV·yV·yW¸zW¸{X¹{Y¹|Zº}[º}[º}\º~\¹~]¹~]¸}]·|\µ{\´z[²yZ°wY®vX¬tWªsV¨rU¦pT¤oS¢nS¡mRŸlRkRœjQšiQ˜hQ–gQ”fQ’ePdPcPŠbP‡`O…_O‚]O~[NzZNvWNrUMoTMmSMlRMiQLeOLJAIJ(h>!]KKfQOgQN_LKD>I\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À\À™iQ°tS¸yT¼{UÂYÎŒeï­ˆô´Õ—u¶|\ Z'™LˆD |>
+
+ &3#.$-% .% .& /&!,#,#@70A71XNHXNHWNHWNHZRLYQLYQLXQLWQLWPLUOLSNLQMKOLJMJJ0//.-.,,-&(+"(!'
+ %' %$#" ! !$ 
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Ball.pm b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Ball.pm
new file mode 100644
index 00000000000..c05605e4aaa
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Ball.pm
@@ -0,0 +1,143 @@
+
+package Ball;
+
+# Ball.pm, a class module that allows concurrent simulation (canvas) instances.
+#
+# This is simply a class module, nothing fancy like a derived widget or
+# composite widget. It has two virtual methods, new() and move_one_ball().
+# There are two static methods, get_canvas_hash() and move_all_balls().
+#
+# Essentially, move_all_balls() is invoked to move all of the balls in a
+# simulation's @BALLS list once - from their current to their new postion.
+# After moving one ball a call to DoOneEvent() is made to handle pending
+# XEvents. The *user* of this module, in this case bounce.pl, has their
+# own main loop which also calls DoOneEvent() and move_all_balls() to keep
+# the simulation active.
+#
+# Gurusamy Sarathy (gsar@engin.umich.edu)
+# Tidied up by SOL.
+
+use vars qw/$VERSION/;
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/demos/demos/widget_lib/Ball.pm#4 $
+
+use Tk::Canvas;
+use Tk::Widget;
+use Tk qw/DoOneEvent DONT_WAIT/;
+Construct Tk::Canvas 'Ball';
+use strict;
+
+# Class Ball global variables.
+
+my %BALLS = (); # hold @BALLS list on a per canvas basis
+my (%DEFAULTS) = ( # Ball constructor option defaults
+ -color => 'blue',
+ -size => 20.0,
+ -position => [12.0,12.0],
+ -velocity => [6.0, 9.0],
+ );
+
+sub new { # Ball object constructor
+
+ # Create a new Ball object, which just happens to be a Canvas item.
+ # Fill-in values for defaulted parameters, create the oval item, and
+ # store object-specific information in the ball's hash.
+ #
+ # Finally, update the class global %BALLS hash, indexed by a hashed canvas
+ # reference, with the new ball. Note the special Tk::bind statement that
+ # removes a canvas from the %BALLS hash when the canvas is destroyed, thus
+ # keeping %BALLS trimmed and preventing a very slow memory leak.
+
+ my($class, $canvas, %args) = @_;
+
+ my @missing_args = grep ! defined $args{$_}, keys %DEFAULTS;
+ @args{@missing_args} = @DEFAULTS{@missing_args};
+ my($color, $size, $pos, $vel) = @args{-color, -size, -position, -velocity};
+
+ my $ball = $canvas->create('oval',
+ ($pos->[0] - ($size/2.0)), ($pos->[1] - ($size/2.0)),
+ ($pos->[0] + ($size/2.0)), ($pos->[1] + ($size/2.0)),
+ -fill => $color,
+ );
+ $canvas->Tk::bind(
+ '<Destroy>' => sub {delete $BALLS{Ball->get_canvas_hash($canvas)}}
+ );
+
+ my $ball_obj = {'canvas_ID' => $ball,
+ 'canvas' => $canvas,
+ 'color' => $color,
+ 'size' => $size,
+ 'pos' => [@$pos],
+ 'vel' => [@$vel],
+ };
+
+ push @{$BALLS{Ball->get_canvas_hash($canvas)}->{'BALLS'}}, $ball_obj;
+ return bless $ball_obj, $class;
+
+} # end new, Ball constructor
+
+sub get_canvas_hash {
+
+ # Hash a canvas reference to a key for indexing into the %BALLS hash.
+ # For now, just use the string-ified widget reference. If this trick
+ # were ever to fail in the future then only this code needs to be fixed
+ # and the Ball class would be up and running in short oder.
+
+ my($class, $canvas) = @_;
+
+ return $canvas
+
+} # end get_canvas_hash
+
+sub move_one_ball {
+
+ # Move one ball, belonging to one simulation, one clock tick.
+
+ my ($ball_obj, $speed_ratio) = @_;
+
+ my($ball, $canv, $minx, $miny, $maxx, $maxy);
+ my($ballx, $bally, $deltax, $deltay);
+
+ $speed_ratio = 1.0 unless defined $speed_ratio;
+ $ball = $ball_obj->{'canvas_ID'};
+ $canv = $ball_obj->{'canvas'};
+ $ballx = $ball_obj->{'pos'}[0];
+ $bally = $ball_obj->{'pos'}[1];
+
+ $minx = $ball_obj->{'size'} / 2.0;
+ $maxx = $ball_obj->{'canvas'}->cget(-width) - $minx;
+
+ $miny = $ball_obj->{'size'} / 2.0;
+ $maxy = $ball_obj->{'canvas'}->cget(-height) - $miny;
+
+ if ($ballx > $maxx || $ballx < $minx) {
+ $ball_obj->{'vel'}[0] = -1.0 * $ball_obj->{'vel'}[0];
+ }
+ if ($bally > $maxy || $bally < $miny) {
+ $ball_obj->{'vel'}[1] = -1.0 * $ball_obj->{'vel'}[1];
+ }
+
+ $deltax = $ball_obj->{'vel'}[0] * $speed_ratio;
+ $deltay = $ball_obj->{'vel'}[1] * $speed_ratio;
+
+ $canv->move($ball, $deltax, $deltay);
+ $ball_obj->{'pos'}[0] = $ballx + $deltax;
+ $ball_obj->{'pos'}[1] = $bally + $deltay;
+
+ return $ball_obj;
+
+} # end move_one_ball
+
+sub move_all_balls {
+
+ # Move all the balls belong to one simulation instance one clock tick.
+
+ my($class, $canvas, $speed_ratio) = @_;
+
+ foreach (@{$BALLS{Ball->get_canvas_hash($canvas)}->{'BALLS'}}) {
+ $_->move_one_ball($speed_ratio);
+ DoOneEvent(DONT_WAIT); # be kind and process XEvents if they arise
+ }
+
+} # end move_all_balls
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList.pl
new file mode 100644
index 00000000000..62d683b2dbb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList.pl
@@ -0,0 +1,65 @@
+# HList, a hierarchial listbox widget.
+
+use Tk::HList;
+use Cwd;
+use subs qw/show_dir/;
+use vars qw/$TOP $FILEIMG $FOLDIMG/;
+
+sub HList {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'HList - A hierarchial listbox widget.',
+ -geometry_manager => 'grid',
+ );
+
+ my $h = $TOP->Scrolled(qw\HList -separator / -selectmode extended -width 30
+ -height 20 -indent 35 -scrollbars se
+ -itemtype imagetext \
+ )->grid(qw/-sticky nsew/);
+ $h->configure(-command => sub {
+ print "Double click $_[0], size=", $h->info('data', $_[0]) ,".\n";
+ });
+
+ $FILEIMG = $TOP->Bitmap(-file => Tk->findINC('file.xbm'));
+ $FOLDIMG = $TOP->Bitmap(-file => Tk->findINC('folder.xbm'));
+
+ my $root = Tk->findINC('demos');
+ my $olddir = cwd;
+ chdir $root;
+ show_dir '.', $root, $h;
+ chdir $olddir;
+ my $b = $TOP->Button(-text => 'Select All', -command => [\&select_all, $h]);
+ Tk::grid($b);
+}
+
+sub select_all
+{
+ my $h = shift;
+ my @list = $h->infoChildren(@_);
+ if (@list)
+ {
+ $h->selectionSet($list[0],$list[-1]);
+ foreach my $e (@list)
+ {
+ select_all($h,$e);
+ }
+ }
+}
+
+sub show_dir {
+ my($entry_path, $text, $h) = @_;
+ opendir H, $entry_path;
+ my(@dirent) = grep ! /^\.\.?$/, sort(readdir H);
+ closedir H;
+ $h->add($entry_path, -text => $text, -image => $FOLDIMG, -data => 'DIR');
+ while ($_ = shift @dirent) {
+ my $file = "$entry_path/$_";
+ if (-d $file) {
+ show_dir $file, $_, $h;
+ } else {
+ my $size = -s $file;
+ $h->add($file, -text => $_, -image => $FILEIMG, -data => $size);
+ }
+ }
+} # end show_dir
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList2.pl
new file mode 100644
index 00000000000..10ada400a65
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/HList2.pl
@@ -0,0 +1,124 @@
+# HList and ItemStyle, multicolumn listbox with individual cell styles.
+# -*- perl -*-
+
+#
+# $Id: $
+# Author: Slaven Rezic
+#
+# Copyright (C) 1999 Slaven Rezic. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+# Mail: eserte@cs.tu-berlin.de
+# WWW: http://user.cs.tu-berlin.de/~eserte/
+#
+
+use Tk::HList;
+use Tk::ItemStyle;
+
+sub HList2 {
+ my($demo) = @_;
+ my $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'HList and ItemStyle, multicolumn listbox with individual cell styles.',
+ -geometry_manager => 'grid',
+ );
+
+ my $h = $TOP->Scrolled
+ (qw/HList
+ -header 1
+ -columns 4
+ -width 50
+ -height 20/
+ )->grid(qw/-sticky nsew/);
+
+ for (0 .. 3) {
+ $h->header('create', $_, -text => 'Column ' . $_);
+ }
+
+ my @img;
+ foreach ('Xcamel.gif', 'anim.gif', 'icon.gif', 'Camel.xpm') {
+ push @img, $TOP->Photo(-file => Tk->findINC($_)),
+ }
+
+ my(@fonts) = ('-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*',
+ '-*-Courier-Medium-R-Normal--*-180-*-*-*-*-*-*',
+ '-*-times-medium-r-normal--*-240-*-*-*-*-*-*',
+ '-Adobe-Courier-Bold-O-Normal--*-120-*-*-*-*-*-*',
+ 'fixed',
+ );
+
+ my(@colors) = qw(red green blue yellow red cyan black);
+
+ my $rnd_font = sub {
+ $fonts[rand($#fonts+1)];
+ };
+ my $rnd_color = sub {
+ $colors[rand($#colors+1)];
+ };
+ my $rnd_image = sub {
+ my $yn = int(rand(2));
+ if ($yn) {
+ $img[rand($#img+1)];
+ } else {
+ undef;
+ }
+ };
+ my $rnd_window = sub {
+ my $yn = int(rand(10));
+ if ($yn == 3) {
+ ('Button', 'Entry')[rand(2)];
+ } else {
+ undef;
+ }
+ };
+
+ for my $y (0 .. 20) {
+ my $e = $h->addchild("");
+ for my $col (0 .. 3) {
+ my $window = $rnd_window->();
+ my $image = $rnd_image->();
+ my $fg = $rnd_color->();
+ my $bg = $rnd_color->();
+ if ($bg eq $fg) { $fg = 'white' }
+
+ my $style_type = ($window ? 'window' :
+ ($image ? 'imagetext' : 'text'));
+ my $btn;
+ my $style = $h->ItemStyle($style_type);
+ if ($style_type eq 'window') {
+ $style->configure(-pady => 0, -padx => 0, -anchor => "nw");
+ if ($window eq 'Button') {
+ $btn = $h->Button
+ (-text => 'Click me!',
+ -command => sub {
+ $btn->configure(-activeforeground => $rnd_color->());
+ },
+ );
+ } else {
+ $btn = $h->Entry;
+ }
+ } else {
+ $style->configure(-foreground => $fg,
+ -background => $bg,
+ -font => $rnd_font->(),
+ );
+ }
+ $h->itemCreate
+ ($e, $col,
+ -itemtype => $style_type,
+ -style => $style,
+ ($style_type eq 'imagetext'
+ ? (-image => $image) : ()
+ ),
+ ($style_type eq 'window'
+ ? (-widget => $btn) : (-text => 'Cell ' . $y . '/' . $col)
+ ),
+ );
+ }
+ }
+}
+
+1;
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Plot.pm b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Plot.pm
new file mode 100644
index 00000000000..c5416b0e535
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/Plot.pm
@@ -0,0 +1,198 @@
+
+package Plot;
+
+# Class "Plot": constructor, methods, destructor, global class data,
+# etcetera.
+#
+# Because a Plot object is a composite widget all the Composite base
+# class methods and advertised widgets are available to you.
+#
+# Advertised Plot widgets: canvas, entry, PostScript_button, view_button.
+
+require 5.005_03;
+
+use vars qw/$VERSION @ISA/;
+$VERSION = '4.008'; # sprintf '4.%03d', q$Revision: #7 $ =~ /\D(\d+)\s*$/;
+
+use Tk::Frame;
+use base qw/Tk::Frame/;
+Construct Tk::Widget 'Plot';
+use strict;
+
+sub Populate {
+
+ # Plot composite widget constructor.
+
+ my($cw, $args) = @_;
+
+ $cw->SUPER::Populate($args);
+ my($tc, $ih, $ah) = (
+ delete $args->{-title_color},
+ delete $args->{-inactive_highlight},
+ delete $args->{-active_highlight},
+ );
+
+ my %pinfo; # plot information hash
+ $pinfo{'lastX'} = 0;
+ $pinfo{'lastY'} = 0;
+ $pinfo{'areaX2'} = -1;
+ $pinfo{'prcmd'} = 'lpr';
+
+ my $plot_font = '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*';
+
+ my $c = $cw->Canvas(
+ -relief => 'raised',
+ -width => '450',
+ -height => '300',
+ -cursor => 'top_left_arrow',
+ );
+ $cw->Advertise('canvas' => $c);
+ $c->pack(-side => 'top', -fill => 'x');
+
+ $c->createLine(100, 250, 400, 250, -width => 2);
+ $c->createLine(100, 250, 100, 50, -width => 2);
+ $c->createText(225, 20, -text => 'A Simple Plot', -font => $plot_font,
+ -fill => $tc);
+
+ my($i, $x, $y, $point, $item);
+ for($i = 0; $i <= 10; $i++) {
+ $x = 100 + ($i * 30);
+ $c->createLine($x, 250, $x, 245, -width => 2);
+ $c->createText($x, 254, -text => 10 * $i, -anchor => 'n',
+ -font => $plot_font);
+ } # forend
+ for ($i = 0; $i <= 5; $i++) {
+ $y = 250 - ($i * 40);
+ $c->createLine(100, $y, 105, $y, -width => 2);
+ $c->createText(96, $y, -text => $i * 50.0, -anchor => 'e',
+ -font => $plot_font);
+ } # forend
+
+ foreach $point ([12, 56], [20, 94], [33, 98], [32, 120], [61, 180],
+ [75, 160], [98, 223]) {
+ $x = 100 + (3 * ${$point}[0]);
+ $y = 250 - (4 * ${$point}[1]) / 5;
+ $item = $c->createOval($x-6, $y-6, $x+6, $y+6, -width => 1,
+ -outline => 'black', -fill => $ih);
+ $c->addtag('point', 'withtag', $item);
+ }
+
+ $c->bind('point', '<Any-Enter>' => [sub{shift->itemconfigure(@_)},
+ 'current', -fill => $ah]);
+ $c->bind('point', '<Any-Leave>' => [sub{shift->itemconfigure(@_)},
+ 'current', -fill => $ih]);
+ $c->bind('point', '<1>' => [sub {plot_down(@_)}, \%pinfo]);
+ $c->bind('point', '<ButtonRelease-1>' => sub {shift->dtag('selected')});
+ $c->CanvasBind('<B1-Motion>' => [sub {plot_move(@_)}, \%pinfo]);
+ $c->CanvasBind('<2>' => [sub {area_down(@_)}, \%pinfo]);
+ $c->CanvasBind('<B2-Motion>' => [sub {area_move(@_)}, \%pinfo]);
+
+ my $w_prcmd = $cw->Entry(
+ -textvariable => \$pinfo{'prcmd'},
+ );
+ $cw->Advertise('entry' => $w_prcmd);
+ $w_prcmd->pack;
+
+ my $w_print = $cw->Button(
+ -text => 'Print in PostScript Format',
+ -command => [\&area_save, $c, \%pinfo],
+ );
+ $cw->Advertise('PostScript_button' => $w_print);
+ $w_print->pack;
+ $w_prcmd->bind('<Return>' => [$w_print => 'invoke']);
+
+ my $w_view = $cw->Button(
+ -text => 'View Composite Plot Widget',
+ -command => [\&::view_widget,
+ Tk->findINC('demos/widget_lib/Plot.pm'),
+ ],
+ );
+ $cw->Advertise('view_button' => $w_view);
+ $w_view->pack;
+
+ return $cw;
+
+} # end Populate, Plot constructor
+
+# Private methods.
+
+sub area_down {
+
+ my($w, $pinfo) = @_;
+
+ my $e = $w->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ $pinfo->{'areaX1'} = $x;
+ $pinfo->{'areaY1'} = $y;
+ $pinfo->{'areaX2'} = -1;
+ $pinfo->{'areaY2'} = -1;
+ eval {local $SIG{'__DIE__'}; $w->delete('area');};
+
+} # end area_down
+
+sub area_move {
+
+ my($w, $pinfo) = @_;
+
+ my $e = $w->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ if($x != $pinfo->{'areaX1'} && $y != $pinfo->{'areaY1'}) {
+ eval {local $SIG{'__DIE__'}; $w->delete('area');};
+ $w->addtag('area','withtag',$w->createRectangle($pinfo->{'areaX1'},
+ $pinfo->{'areaY1'},$x,$y));
+ $pinfo->{'areaX2'} = $x;
+ $pinfo->{'areaY2'} = $y;
+ }
+} # end area_move
+
+sub area_save {
+
+ my($w, $pinfo) = @_;
+
+ my($x1, $x2, $y1, $y2, $a);
+
+ if($pinfo->{'areaX2'} != -1) {
+ ($x1, $x2, $y1, $y2) =
+ @$pinfo{'areaX1', 'areaX2', 'areaY1', 'areaY2'}; # slice !
+ ($x1, $x2) = @$pinfo{'areaX2', 'areaX1'} if $x2 <= $x1;
+ ($y1, $y2) = @$pinfo{'areaY2', 'areaY1'} if $y2 <= $y1;
+ $a = $w->postscript('-x' => $x1, '-y' => $y1,
+ -width => $x2 - $x1, -height => $y2 - $y1);
+ } else {
+ $a = $w->postscript;
+ }
+
+ $SIG{'PIPE'} = sub {};
+ open(LPR, "| $pinfo->{'prcmd'}");
+ print LPR $a;
+ close(LPR);
+
+} # end area_save
+
+sub plot_down {
+
+ my($w, $pinfo) = @_;
+
+ my $e = $w->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ $w->dtag('selected');
+ $w->addtag('selected', 'withtag', 'current');
+ $w->raise('current');
+ $pinfo->{'lastX'} = $x;
+ $pinfo->{'lastY'} = $y;
+
+} # end plot_down
+
+sub plot_move {
+
+ my($w, $pinfo) = @_;
+
+ my $e = $w->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ $w->move('selected', $x-$pinfo->{'lastX'}, $y-$pinfo->{'lastY'});
+ $pinfo->{'lastX'} = $x;
+ $pinfo->{'lastY'} = $y;
+
+} # end plot_move
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/WidgetDemo.pm b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/WidgetDemo.pm
new file mode 100644
index 00000000000..a05d1ace927
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/WidgetDemo.pm
@@ -0,0 +1,130 @@
+package WidgetDemo;
+
+use 5.005_03;
+
+use vars qw($VERSION);
+$VERSION = '4.012'; # sprintf '4.%03d', q$Revision: #11 $ =~ /\D(\d+)\s*$/;
+
+use Tk 800.000;
+use Carp;
+
+use Tk;
+use Tk::Toplevel;
+use strict;
+use base 'Tk::Toplevel';
+Construct Tk::Widget 'WidgetDemo';
+
+# %WIDGDEMO is a class global that tracks all WidgetDemo composite widgets,
+# providing a means of destroying a previous instance of a demonstration.
+
+my %WIDGDEMO; # class hash of active widget demonstrations
+
+sub Populate {
+ my($self, $args) = @_;
+
+ my (%arg_defaults) = (
+ -name => 'Unknown Demo Name',
+ -font => 'Helvetica 12',
+ -text => 'Unknown Demo Text',
+ -geometry_manager => 'pack',
+ );
+ my $name = $arg_defaults{-name};
+ $arg_defaults{-title} = "$name Demonstration",
+ $arg_defaults{-iconname} = $name;
+
+ my(@margs, %ahsh, @args);
+ @margs = grep ! defined $args->{$_}, keys %arg_defaults;
+ %ahsh = %$args;
+ @ahsh{@margs} = @arg_defaults{@margs};
+ my($demo, $font, $text, $title, $iconname, $gm) =
+ @ahsh{-name, -font, -text, -title, -iconname, -geometry_manager};
+ delete $args->{-name};
+ delete $args->{-font};
+ delete $args->{-iconname};
+ delete $args->{-geometry_manager};
+
+ $WIDGDEMO{$demo}->destroy if Exists($WIDGDEMO{$demo});
+ $WIDGDEMO{$demo} = $self;
+
+ $self->SUPER::Populate($args);
+ $self->iconname($iconname);
+
+ my(@label_attributes) = ();
+ if (ref($text) eq 'ARRAY') {
+ @label_attributes = @$text[1 .. $#{$text}];
+ $text = $text->[0];
+ }
+ my $msg = $self->Label(
+ -font => $font,
+ -wraplength => '4i',
+ -justify => 'left',
+ -text => $text,
+ @label_attributes,
+ );
+
+ my $demo_frame = $self->Frame;
+ $self->Advertise('WidgetDemo' => $demo_frame); # deprecated
+
+ my $buttons = $self->Frame;
+ my $dismiss = $buttons->Button(
+ -text => 'Dismiss',
+ -command => [$self => 'destroy'],
+ );
+ my $see = $buttons->Button(-text => 'See Code',
+ -command => [\&main::see_code, $demo]);
+
+ if ($gm eq 'pack') {
+ $buttons->pack(qw/-side bottom -fill x -pady 2m/);
+ $dismiss->pack(qw/-side left -expand 1/);
+ $see->pack(qw/-side left -expand 1/);
+ $msg->pack;
+ $demo_frame->pack(qw/-fill both -expand 1 -anchor n/);
+ } elsif ($gm eq 'grid') {
+ $msg->grid;
+ $demo_frame->grid(-sticky => "news");
+ $demo_frame->gridColumnconfigure(0,-weight=>1);
+ $demo_frame->gridRowconfigure(0,-weight=>1);
+ $self->gridColumnconfigure(qw/0 -weight 1/);
+ $self->gridRowconfigure(qw/1 -weight 1/);
+ $buttons->grid(qw/-pady 2m -sticky ew/);
+ $buttons->gridColumnconfigure(qw/0 -weight 1/);
+ $buttons->gridColumnconfigure(qw/1 -weight 1/);
+ $dismiss->grid(qw/-row 0 -column 0/);
+ $see->grid(qw/-row 0 -column 1/);
+ } else {
+ croak "Only pack or grid geometry management supported.";
+ }
+
+ $self->Delegates('Construct' => $demo_frame);
+
+ $self->ConfigSpecs(
+ -text => [qw/METHOD text Text NoText/],
+ );
+
+ $self->{msg} = $msg;
+
+ return $self;
+
+} # end Populate
+
+sub Top {return $_[0]->Subwidget('WidgetDemo')} # deprecated
+*top = *top = \&Top; # peacify -w
+
+sub text {
+
+ my ($self, $text) = @_;
+
+ my(@label_attributes) = ();
+ if (ref($text) eq 'ARRAY') {
+ @label_attributes = @$text[1 .. $#{$text}];
+ $text = $text->[0];
+ }
+
+ $self->{msg}->configure(
+ -text => $text,
+ @label_attributes,
+ );
+
+} # end text
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/arrows.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/arrows.pl
new file mode 100644
index 00000000000..de4973071b9
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/arrows.pl
@@ -0,0 +1,242 @@
+# arrows.pl
+
+use subs qw/arrow_err arrow_move1 arrow_move2 arrow_move3 arrow_setup/;
+use vars qw/$TOP/;
+
+sub arrows {
+
+ # Create a top-level window containing a canvas demonstration that
+ # allows the user to experiment with arrow shapes.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['This widget allows you to experiment with different widths and arrowhead shapes for lines in canvases. To change the line width or the shape of the arrowhead, drag any of the three boxes attached to the oversized arrow. The arrows on the right give examples at normal scale. The text at the bottom shows the configuration options as you\'d enter them for a canvas line item.', qw/-wraplength 5i/],
+ -title => 'Arrowhead Editor Demonstration',
+ -iconname => 'arrows',
+ );
+
+ my $c = $TOP->Canvas(
+ -width => '500',
+ -height => '350',
+ -relief => 'sunken',
+ -borderwidth => 2,
+ )->pack(qw/-expand yes -fill both/);
+
+ my %ainfo; # arrow information hash
+ $ainfo{a} = 8;
+ $ainfo{b} = 10;
+ $ainfo{c} = 3;
+ $ainfo{width} = 2;
+ $ainfo{move_sub} = undef;
+ $ainfo{x1} = 40;
+ $ainfo{x2} = 350;
+ $ainfo{'y'} = 150;
+ $ainfo{smallTips} = [5, 5, 2];
+ $ainfo{count} = 0;
+
+ if ($TOP->depth > 1) {
+ $ainfo{bigLineStyle} = [qw/-fill SkyBlue1/];
+ $ainfo{boxStyle} = [-fill => undef, qw/-outline black -width 1/];
+ $ainfo{activeStyle} = [qw/-fill red -outline black -width 1/];
+ } else {
+ $ainfo{bigLineStyle} = [
+ -fill => 'black',
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ ];
+ $ainfo{boxStyle} = [-fill => undef, qw/-outline black -width 1/];
+ $ainfo{activeStyle} = [qw/-fill black -outline black -width 1/];
+ }
+ arrow_setup $c, \%ainfo;
+
+ # Bindings to highlight the 3 tiny resize boxes.
+
+ foreach ([qw/<Enter> activeStyle/], [qw/<Leave> boxStyle/]) {
+ $c->bind('box', $_->[0] =>[
+ sub {
+ my($c, $style) = @_;
+ $c->itemconfigure('current', @{$ainfo{$style}})
+ }, $_->[1]],
+ );
+ }
+ $c->bind(qw/box <B1-Enter>/ => 'NoOp');
+ $c->bind(qw/box <B1-Leave>/ => 'NoOp');
+
+ # Bindings that select one of the 3 tiny resize boxes' "move code".
+
+ my $n;
+ for $n (1,2,3) {
+ $c->bind("box${n}", '<1>' =>
+ sub {$ainfo{move_sub} = \&{"arrow_move${n}"}}
+ );
+ }
+
+ # Bindings to move a resize box and redraw the arrow.
+
+ $c->bind('box', '<B1-Motion>' =>
+ sub {&{$ainfo{move_sub}}($c, \%ainfo)}
+ );
+ $c->Tk::bind('<Any-ButtonRelease-1>' => [\&arrow_setup, \%ainfo]);
+
+} # end arrows
+
+sub arrow_err {
+
+ my($c) = @_;
+
+ my $i = $c->createText(qw/.6i .1i -anchor n -text/ => "Range error!");
+ $c->after(4000, sub { $c->delete($i) });
+
+} # end errow_err
+
+sub arrow_move1 {
+
+ my($c, $v) = @_;
+ my $e = $c->XEvent;
+
+ my($x, $y, $err) = ($e->x, $e->y, 0);
+ my $newA = int(($v->{x2} + 5 - int($c->canvasx($x))) / 10);
+ $newA = 0, $err = 1 if $newA < 0;
+ $newA = 25, $err = 1 if $newA > 25;
+ if ($newA != $v->{a}) {
+ $c->move('box1', 10 * ($v->{a} - $newA), 0);
+ $v->{a} = $newA;
+ }
+ arrow_err($c) if $err;
+
+} # end arrow_move1
+
+sub arrow_move2 {
+
+ my($c, $v) = @_;
+ my $e = $c->XEvent;
+
+ my($x, $y, $errx, $erry) = ($e->x, $e->y, 0, 0);
+ my $newB = int(($v->{x2} + 5 - int($c->canvasx($x))) / 10);
+ $newB = 0, $errx = 1 if $newB < 0;
+ $newB = 25, $errx = 1 if $newB > 25;
+ my $newC = int(($v->{'y'} + 5 - int($c->canvasy($y)) - 5 * $v->{width})
+ / 10);
+ $newC = 0, $erry = 1 if $newC < 0;
+ $newC = 12, $erry = 1 if $newC > 12;
+ if (($newB != $v->{b}) or ($newC != $v->{c})) {
+ $c->move('box2', 10*($v->{b}-$newB), 10*($v->{c}-$newC));
+ $v->{b} = $newB;
+ $v->{c} = $newC;
+ }
+ arrow_err($c) if $errx or $erry;
+
+} # end arrow_move2
+
+sub arrow_move3 {
+
+ my($c, $v) = @_;
+ my $e = $c->XEvent;
+
+ my($x, $y, $err) = ($e->x, $e->y, 0);
+ my $newWidth = int(($v->{'y'} + 2 - int($c->canvasy($y))) / 5);
+ $newWidth = 0, $err = 1 if $newWidth < 0;
+ $newWidth = 20, $err = 1 if $newWidth > 20;
+ if ($newWidth != $v->{width}) {
+ $c->move('box3', 0, 5*($v->{width}-$newWidth));
+ $v->{width} = $newWidth;
+ }
+ arrow_err($c) if $err;
+
+} # end arrow_move3
+
+sub arrow_setup {
+
+ # The procedure below completely regenerates all the text and graphics in
+ # the canvas window. It's called when the canvas is initially created,
+ # and also whenever any of the parameters of the arrow head are changed
+ # interactively. The argument is the name of the canvas widget to be
+ # regenerated, and also the name of a global variable containing the
+ # parameters for the display.
+
+ my($c, $v) = @_;
+
+ # Remember the current box, if there is one.
+
+ my(@tags) = $c->gettags('current');
+ my $cur = defined $tags[0] ? $tags[lsearch('box?', @tags)] : '';
+
+ # Create the arrow and outline.
+
+ $c->delete('all');
+ $c->createLine($v->{x1}, $v->{'y'}, $v->{x2}, $v->{'y'},
+ -width => 10*$v->{width},
+ -arrowshape => [10*$v->{a}, 10*$v->{b}, 10*$v->{c}],
+ -arrow => 'last', @{$v->{bigLineStyle}});
+ my $xtip = $v->{x2}-10*$v->{b};
+ my $deltaY = 10*$v->{c}+5*$v->{width};
+ $c->createLine($v->{x2}, $v->{'y'}, $xtip, $v->{'y'}+$deltaY,
+ $v->{x2}-10*$v->{a}, $v->{'y'}, $xtip, $v->{'y'}-$deltaY,
+ $v->{x2}, $v->{'y'}, -width => 2, -capstyle => 'round',
+ -joinstyle => 'round');
+
+ # Create the boxes for reshaping the line and arrowhead.
+
+ $c->createRectangle($v->{x2}-10*$v->{a}-5, $v->{'y'}-5,
+ $v->{x2}-10*$v->{a}+5, $v->{'y'}+5, @{$v->{boxStyle}},
+ -tags => ['box1', 'box']);
+ $c->createRectangle($xtip-5, $v->{'y'}-$deltaY-5, $xtip+5,
+ $v->{'y'}-$deltaY+5, @{$v->{boxStyle}},
+ -tags => ['box2', 'box']);
+ $c->createRectangle($v->{x1}-5, $v->{'y'}-5*$v->{width}-5,
+ $v->{x1}+5, $v->{'y'}-5*$v->{width}+5, @{$v->{boxStyle}},
+ -tags => ['box3', 'box']);
+
+ # Create three arrows in actual size with the same parameters
+
+ $c->createLine($v->{x2}+50, 0, $v->{x2}+50, 1000, -width => 2);
+ my $tmp = $v->{x2}+100;
+ $c->createLine($tmp, $v->{'y'}-125, $tmp, $v->{'y'}-75,
+ -width => $v->{width}, -arrow => 'both',
+ -arrowshape => [$v->{a}, $v->{b}, $v->{c}]);
+ $c->createLine($tmp-25, $v->{'y'}, $tmp+25, $v->{'y'},
+ -width => $v->{width}, -arrow => 'both',
+ -arrowshape =>[$v->{a}, $v->{b}, $v->{c}]);
+ $c->createLine($tmp-25, $v->{'y'}+75, $tmp+25, $v->{'y'}+125,
+ -width => $v->{width}, -arrow => 'both',
+ -arrowshape => [$v->{a}, $v->{b}, $v->{c}]);
+ $c->itemconfigure($cur, @{$v->{activeStyle}}) if $cur =~ /box?/;
+
+ # Create a bunch of other arrows and text items showing the current
+ # dimensions.
+
+ $tmp = $v->{x2}+10;
+ $c->createLine($tmp, $v->{'y'}-5*$v->{width}, $tmp, $v->{'y'}-$deltaY,
+ -arrow => 'both', -arrowshape => $v->{smallTips});
+ $c->createText($v->{x2}+15, $v->{'y'}-$deltaY+5*$v->{c},
+ -text => $v->{c}, -anchor => 'w');
+ $tmp = $v->{x1}-10;
+ $c->createLine($tmp, $v->{'y'}-5*$v->{width}, $tmp,
+ $v->{'y'}+5*$v->{width}, -arrow => 'both',
+ -arrowshape => $v->{smallTips});
+ $c->createText($v->{x1}-15, $v->{'y'}, -text => $v->{width},
+ -anchor => 'e');
+ $tmp = $v->{'y'}+5*$v->{width}+10*$v->{c}+10;
+ $c->createLine($v->{x2}-10*$v->{a}, $tmp, $v->{x2}, $tmp,
+ -arrow => 'both', -arrowshape => $v->{smallTips});
+ $c->createText($v->{x2}-5*$v->{a}, $tmp+5, -text => $v->{a},
+ -anchor => 'n');
+ $tmp = $tmp+25;
+ $c->createLine($v->{x2}-10*$v->{b}, $tmp, $v->{x2}, $tmp,
+ -arrow => 'both', -arrowshape => $v->{smallTips});
+ $c->createText($v->{x2}-5*$v->{b}, $tmp+5, -text => $v->{b},
+ -anchor => 'n');
+
+ $c->createText($v->{x1}, 310, -text => "-width => $v->{width}",
+ -anchor => 'w',
+ -font => '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*');
+ $c->createText($v->{x1}, 330,
+ -text => "-arrowshape => [$v->{a}, $v->{b}, $v->{c}]",
+ -anchor => 'w',
+ -font => '-*-Helvetica-Medium-R-Normal--*-180-*-*-*-*-*-*');
+
+ $v->{count}++;
+
+} # end arrow_setup
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/balloon.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/balloon.pl
new file mode 100644
index 00000000000..630ac957950
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/balloon.pl
@@ -0,0 +1,168 @@
+# Balloon, pop up help window when mouse lingers over widget.
+
+use Tk;
+use English;
+use Carp;
+
+use Tk::Frame;
+use Tk::Balloon;
+
+my $lmsg = "";
+
+my $top = MainWindow->new;
+my $f = $top->Frame;
+
+# status bar widget
+my $status = $top->Label(-width => 60, -relief => "sunken", -bd => 1, -anchor => 'w');
+$status->pack(-side => "bottom", -fill => "y", -padx => 2, -pady => 1);
+
+# create the widgets to be explained
+my $mb = $top->Menubutton(-relief => 'raised',
+ -text => 'Menu button');
+my $xxx = 0;
+$mb->checkbutton(-label => 'checkbutton',
+ -variable => \$xxx);
+$mb->cascade(-label => 'cascade entry');
+my $menu = $mb->cget(-menu);
+my $cm = $menu->Menu(-tearoff => 0);
+$mb->entryconfigure('cascade entry', -menu => $cm);
+$cm->command(-label => 'first');
+$cm->command(-label => 'second');
+$mb->separator;
+$mb->command(-label => 'Close',
+ -command => sub {$top->destroy;});
+
+my $tm = $top->Menu(-title => "Balloon menu");
+$tm->cascade(-label => "Toplevel menu", -menu => $menu);
+$top->configure(-menu => $tm);
+
+my $b1 = $top->Button(-text => "Something Unexpected",
+ -command => sub {$top->destroy;});
+my $b2 = $top->Button(-text => "Something Else Unexpected");
+$b2->configure(-command => sub {$b2->destroy;});
+
+# Pack the created widgets:
+$mb->pack(-side => "top", -expand => 1);
+$b1->pack(-side => "top", -expand => 1);
+$b2->pack(-side => "top", -expand => 1);
+
+my $t = $top->Text(-height => 10, -cursor => 'top_left_arrow')->pack;
+$t->insert('end',<<END);
+
+Move the mouse cursor over the buttons above and let it linger.
+A message will be displayed in status box below and a descriptive
+balloon will appear. The top button is a menu button which has
+different messages set for each menu entry. This text widget has
+a balloon attached to it which will change depending on which word
+the mouse is over.
+
+END
+
+my $clbf = $top->Frame->pack;
+my $cf = $clbf->Frame->pack(-side => "left");
+
+my $c1 = $cf->Canvas(-height => 100, -width => 300, -bg => 'white')->pack(-padx => 8, -pady => 8);
+my $c2 = $cf->Canvas(-height => 100, -width => 300, -bg => 'white')->pack(-padx => 8, -pady => 8);
+my $id = $c1->create('text', 10, 10,
+ -anchor => 'nw',
+ -text => "This is a canvas. You can also attach\nballoons to specific items in a canvas");
+$c1->create('rectangle', 40, 60, 80, 80,
+ -fill => 'red',
+ -tags => 'rectangle',);
+$c1->create('oval', 100, 50, 140, 90,
+ -fill => 'blue',
+ -tags => 'circle',);
+$c2->create('text', 10, 10,
+ -anchor => 'nw',
+ -text => "Or you can attach the balloon\nto the canvas as a whole.");
+
+my $lb = $clbf->Listbox->pack(-side => "left");
+$lb->insert(qw/end one two three four/);
+
+# create the balloon widget
+my $b = $top->Balloon(-statusbar => $status);
+
+$b->attach($mb,
+ -msg => 'Press and hold this button to see the menu.');
+$b->attach($menu,
+ #-state => 'status',
+ -balloonposition => 'mouse',
+ -msg => ['Use this to tear off the menu.',
+ 'This is a checkbox entry.',
+ 'cascade', # Cascade entry (ignored by Balloon)
+ 'separator', # Separator: never active so no message will be displayed for this entry.
+ 'This is a command entry - it will close this window.',
+ ],
+ );
+$b->attach($cm,
+ -msg => 'This balloon is attached to the cascade menu, not it\'s entries',
+ #-statusmsg => 'msg cm',
+ #-balloonmsg => 'cm msg.',
+ );
+$b->attach($b1,
+ -balloonmsg => "Close Window",
+ -statusmsg => "Press this button to close this window");
+$b->attach($b2,
+ -balloonmsg => "Self-destruct\nButton",
+ -statusmsg => "Press this button and it will get rid of itself");
+
+my $msg = '';
+my @word = ('', ''); # Indicies surrounding the current word.
+my @last = ('', ''); # Same for last word.
+$b->attach($t, -msg => \$msg,
+ -balloonposition => 'mouse', # Not really used since the postcommand returns the real position.
+ -postcommand => sub { if ($word[0] eq $word[1]) {
+ # No word under mouse - don't post the balloon.
+ 0;
+ } else {
+ # Have a word under mouse - change the message:
+ my $word = $t->get($word[0], $word[1]);
+ # Skip it if it contains non-word chars:
+ return 0 if $word =~ /\W/;
+ $msg = "The word under the mouse is: $word";
+ $t->tag('add', 'sel', $word[0] => $word[1]);
+ # Find a good place to put the balloon (right below the last char in the word):
+ my $i = $t->index("$word[1] - 1 chars");
+ my @p = $t->bbox($i);
+ my $x = $t->rootx + $p[0] + $p[2] - 4;
+ my $y = $t->rooty + $p[1] + $p[3] + 2;
+ "$x,$y";
+ }
+ },
+ -motioncommand => sub { my $x = $t->pointerx - $t->rootx;
+ my $y = $t->pointery - $t->rooty;
+ @word = ($t->index("\@$x,$y wordstart"), $t->index("\@$x,$y wordend"));
+ if ($word[0] eq $last[0] and $word[1] eq $last[1]) {
+ # Same word - don't cancel the balloon.
+ 0;
+ } else {
+ # New word under mouse - cancel it so a new balloon will be posted.
+ $t->SelectionClear;
+ @last = @word;
+ 1;
+ }
+ },
+ );
+$b->attach($c1,
+ -balloonposition => 'mouse',
+ -msg => {'rectangle' => 'You are over the red rectangle right now.',
+ $id => 'You are over the text right now.',
+ 'circle' => 'You are over the blue circle right now.',
+ });
+$b->attach($c2,
+ -msg => 'This balloon is attached to the canvas itself.',
+ );
+
+$b->attach($lb,
+ -balloonposition => 'mouse',
+ -msg => [qw/1 2 3 4/],
+ );
+
+# As $b is a child of $top it is destroyed when $top is destroyed.
+# Balloon.pm now registers a handler for that, and so
+# this hackery is no longer required (and did not actually work
+# before).
+# $top->OnDestroy(sub { $b->destroy; });
+
+MainLoop;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bind.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bind.pl
new file mode 100644
index 00000000000..65579183a91
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bind.pl
@@ -0,0 +1,65 @@
+# bind.pl
+
+use vars qw/$TOP/;
+
+sub bind {
+
+ # Create a top-level window that illustrates how you can bind Perl
+ # commands to regions of text in a text widget.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text =>'',
+ -title => 'Text Demonstration - Tag Bindings',
+ -iconname => 'bind',
+ );
+
+ my $t = $TOP->Scrolled(qw/Text -setgrid true -width 60 -height 24
+ -scrollbars e -wrap word/, -font => $FONT);
+ $t->pack(qw/-expand yes -fill both/);
+
+ # Set up display styles
+
+ my(@bold, @normal, $tag);
+ if ($TOP->depth > 1) {
+ @bold = (-background => '#43ce80', qw/-relief raised -borderwidth 1/);
+ @normal = (-background => undef, qw/-relief flat/);
+ } else {
+ @bold = (qw/-foreground white -background black/);
+ @normal = (-foreground => undef, -background => undef);
+ }
+
+ $t->insert('0.0', "The same tag mechanism that controls display styles in text widgets can also be used to associate Perl commands with regions of text, so that mouse or keyboard actions on the text cause particular Perl commands to be invoked. For example, in the text below the descriptions of the canvas demonstrations have been tagged. When you move the mouse over a demo description the description lights up, and when you press button 1 over a description then that particular demonstration is invoked.\n\n");
+ $t->insert('end','1. Samples of all the different types of items that can be created in canvas widgets.', 'd1');
+ $t->insert('end', "\n\n");
+ $t->insert('end', '2. A simple two-dimensional plot that allows you to adjust the positions of the data points.', 'd2');
+ $t->insert('end', "\n\n");
+ $t->insert('end', '3. Anchoring and justification modes for text items.', 'd3');
+ $t->insert('end', "\n\n");
+ $t->insert('end', '4. An editor for arrow-head shapes for line items.', 'd4');
+ $t->insert('end', "\n\n");
+ $t->insert('end', '5. A ruler with facilities for editing tab stops.', 'd5');
+ $t->insert('end', "\n\n");
+ $t->insert('end', '6. A grid that demonstrates how canvases can be scrolled.', 'd6');
+
+ foreach $tag (qw(d1 d2 d3 d4 d5 d6)) {
+ $t->tagBind($tag, '<Any-Enter>' =>
+ sub {shift->tagConfigure($tag, @bold)}
+ );
+ $t->tagBind($tag, '<Any-Leave>' =>
+ sub {shift->tagConfigure($tag, @normal)}
+ );
+ }
+ $t->tagBind(qw/d1 <1>/ => sub {&items('items')});
+ $t->tagBind(qw/d2 <1>/ => sub {&plot('plot')});
+ $t->tagBind(qw/d3 <1>/ => sub {&ctext('ctext')});
+ $t->tagBind(qw/d4 <1>/ => sub {&arrows('arrows')});
+ $t->tagBind(qw/d5 <1>/ => sub {&ruler('ruler')});
+ $t->tagBind(qw/d6 <1>/ => sub {&cscroll('cscroll')});
+
+ $t->mark(qw/set insert 0.0/);
+
+} # end bind
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bitmaps.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bitmaps.pl
new file mode 100644
index 00000000000..8001e884b2d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bitmaps.pl
@@ -0,0 +1,44 @@
+# bitmaps.pl
+
+use subs qw/bitmaps_row/;
+use vars qw/$TOP/;
+
+sub bitmaps {
+
+ # Create a top-level window that displays all of Tk's built-in bitmaps.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This window displays all of Tk\'s built-in bitmaps, along with the names you can use for them in Perl scripts.',
+ -title => 'Bitmap Demonstration',
+ -iconname => 'bitmaps',
+ );
+
+ my $frame = $TOP->Frame;
+ $frame->pack(qw/-side top -expand yes -fill both/);
+ bitmaps_row $frame, qw/error gray12 gray25 gray50 gray75 hourglass/;
+ bitmaps_row $frame, qw/info questhead question Tk transparent warning/;
+
+} # end bitmaps
+
+sub bitmaps_row {
+
+ # The procedure below creates a new row of bitmaps in a window.
+
+ my($w, @names) = @_;
+
+ my $row = $w->Frame->pack(qw/-side top -fill both/);
+
+ foreach my $bitmap_name (@names) {
+ my $bit = $row->Frame;
+ $bit->pack(qw/-side left -fill both -pady .25c -padx .25c/);
+ my $label = $bit->Label(-text => $bitmap_name, -width => 9);
+ $label->pack(qw/-side bottom/);
+ my $bitmap = $bit->Label('-bitmap' => $bitmap_name);
+ $bitmap->pack(qw/-side bottom/);
+ }
+
+} # end bitmaps_row
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bounce.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bounce.pl
new file mode 100644
index 00000000000..a6012fb818b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/bounce.pl
@@ -0,0 +1,274 @@
+# bounce.pl
+
+use Ball;
+use Tk qw/:eventtypes/;
+use subs qw/ClearMsg DoSingleStep NotDone ShowMsg SimStart SimStop mkmb/;
+use vars qw/$TOP/;
+
+my(@menu_button_list, $quit_flag, $quit_code,
+ $bounce_status, $bounce_speed, $bounce_running, $bounce_counter);
+
+sub bounce {
+
+ # This began as a borrowed idea from Python distribution examples, ended up
+ # with a Ball module of its own. It illustrates how one can run something
+ # without blocking XEvent processing in a simple-minded sorta way.
+ #
+ # Handles resizes to the main window
+ #
+ # Gurusamy Sarathy (gsar@engin.umich.edu)
+ # Tidied up by SOL.
+ #
+ # 97/06/10 This demo is sufficiently bizarre enough that we don't use
+ # WidgetDemo! (-: Plus, you get to see Exists() in action.
+
+ my($demo) = @_;
+
+ $TOP->destroy if Exists($TOP);
+ $TOP = $MW->Toplevel;
+ $TOP->title('Bouncing Ball Simulator');
+ $TOP->iconname('bounce');
+
+ @menu_button_list = ();
+ $quit_flag = 0;
+ $quit_code = sub {$quit_flag = 1};
+ $TOP->protocol('WM_DELETE_WINDOW' => $quit_code);
+
+ my $menubar = $TOP->Frame(qw/-relief raised -background DarkGreen -bd 2/);
+ $menubar->pack(-side => 'top', -fill => 'x');
+
+ mkmb($menubar, 'File', 0, 'File related stuff',
+ [
+ ['Open', \&NotDone, 0],
+ ['New', \&NotDone, 0],
+ ['Print', \&NotDone, 0],
+ ['Exit', sub{$TOP->bell}, 0],
+ ]);
+
+ mkmb($menubar, 'Simulate', 0, 'Simulator control',
+ [
+ ['Start', \&SimStart, 2],
+ ['Stop', \&SimStop, 2],
+ ]);
+
+ mkmb($menubar, 'Display', 0, 'Display settings',
+ [
+ ['Redraw', \&NotDone, 2],
+ ['Clear', \&NotDone, 2],
+ ]);
+
+ mkmb($menubar, 'Options', 0, 'Various preferences',
+ [
+ ['Steptime', \&NotDone, 0],
+ ['Colors', \&NotDone, 0],
+ ['Display', \&NotDone, 0],
+ ]);
+
+ mkmb($menubar, 'Help', 0, 'There when you need it',
+ [
+ ['About..', \&NotDone, 0],
+ ['Intro', \&NotDone, 0],
+ ['Contents', \&NotDone, 0],
+ ]);
+ $menu_button_list[$#menu_button_list]->pack(-side => 'right');
+
+ my $feedback = $TOP->Frame();
+ $feedback->pack(-side => 'bottom', -fill => 'x');
+ $bounce_status = $feedback->Text(
+ -relief => 'sunken',
+ -height => 1,
+ -background => 'gray',
+ -borderwidth => 2,
+ );
+ $bounce_status->pack(-side => 'left', -fill => 'x', -expand => 1);
+
+ my $drawarea = $TOP->Frame();
+ $drawarea->pack(-side => 'top', -fill => 'both', -expand => 1);
+
+ my $canvas = $drawarea->Canvas(
+ -relief => 'ridge',
+ -height => 400,
+ -width => 600,
+ -borderwidth => 2,
+ );
+ $canvas->pack(-side => 'left', -fill => 'both', -expand => 1);
+
+ $bounce_speed = $drawarea->Scale(
+ -orient => 'vert',
+ -showvalue => 0,
+ -width => 10,
+ -from => 100,
+ -to => 0,
+ -borderwidth => 1,
+ );
+ $bounce_speed->pack(-side => 'left', -fill => 'y');
+ $bounce_speed->bind('<Enter>' => sub {
+ ClearMsg; ShowMsg('Adjust slider for ball speed');
+ });
+ $bounce_speed->bind('<Leave>' => \&ClearMsg);
+ $bounce_speed->set(50);
+
+ my $w_buttons = $TOP->Frame;
+ $w_buttons->pack(qw(-side bottom -expand y -fill x -pady 2m));
+ my $w_dismiss = $w_buttons->Button(
+ -text => 'Dismiss',
+ -command => $quit_code,
+ );
+ $w_dismiss->pack(qw(-side left -expand 1));
+ my $w_see = $w_buttons->Button(
+ -text => 'See Code',
+ -command => [\&see_code, $demo],
+ );
+ $w_see->pack(qw(-side left -expand 1));
+ my $w_ball = $w_buttons->Button(
+ -text => 'View Ball Class Module',
+ -command => [\&view_widget,
+ Tk->findINC('demos/widget_lib') . '/Ball.pm'],
+ );
+ $w_ball->pack(qw(-side left -expand 1));
+
+ $bounce_running = 0;
+ $menu_button_list[1]->cget(-menu)->entryconfigure(1, -state => 'disabled');
+
+ $canvas->Ball;
+ $canvas->Ball(-color => 'red', -size => 30, -position => [200, 75]);
+ $canvas->Ball(
+ -color => 'green',
+ -size => 60,
+ -position => [490, 275],
+ -velocity => [8.0, 12.0],
+ );
+ $canvas->Ball(
+ -color => 'yellow',
+ -size => 100,
+ -position => [360, 60],
+ -velocity => [8.0, 12.0],
+ );
+
+ $bounce_counter = 0;
+ $TOP->repeat(1000 => sub {
+ return unless $bounce_running;
+ ClearMsg;
+ ShowMsg(sprintf("%6d interations/second", $bounce_counter));
+ $bounce_counter = 0
+ });
+
+
+ # This runs the Tk mainloop. Note that the simulation itself has a main
+ # loop which must be processed. DoSingleStep runs a bit of the simulation
+ # during every iteration. Also note that, with a flag of 0,
+ # Tk::DoOneEvent will suspend the process until an X-event arrives,
+ # effectively blocking the while loop.
+ #
+ # My original idea was to run the simulation mainloop as an asynchronous
+ # proc handler that runs when Tk is idle, but the necessary Async(3) calls
+ # from Tcl haven't made it into nTk yet.
+
+ while (1) {
+ if ($quit_flag) {
+ $TOP->destroy;
+ return;
+ }
+ DoOneEvent($bounce_running ? DONT_WAIT : ALL_EVENTS);
+ DoSingleStep($canvas) if $bounce_running;
+ }
+
+} # end bounce
+
+sub mkmb {
+
+ # (Ripped from nTk examples)
+ # Make a Menubutton widget; note that the menu is automatically created.
+ # We maintain a list of the Menubutton references since some callers
+ # need to refer to the Menubutton, as well as to suppress stray name
+ # warnings with Perl -w.
+
+ my($mb0, $mb_label, $mb_label_underline, $mb_msg, $mb_list_ref) = @_;
+ my $mb = $mb0->Menubutton(
+ -text => $mb_label,
+ -underline => $mb_label_underline,
+ -background => 'DarkGreen',
+ -foreground => 'Yellow',
+ );
+ my($menu) = $mb->Menu(-tearoff => 0);
+ $mb->configure(-menu => $menu);
+
+ my $mb_list;
+ foreach $mb_list (@{$mb_list_ref}) {
+ $mb->command(
+ -label => $mb_list->[0],
+ -command => $mb_list->[1] ,
+ -underline => $mb_list->[2],
+ -background => 'DarkGreen',
+ -foreground => 'White',
+ );
+ }
+ $mb->pack(-side => 'left');
+ $TOP->bind($mb, '<Enter>' => sub {ClearMsg; ShowMsg($mb_msg)});
+ $TOP->bind($mb, '<Leave>' => \&ClearMsg);
+
+ push @menu_button_list, $mb;
+ return $mb;
+
+} # end mkmb
+
+sub SimStart {
+
+ if (not $bounce_running) {
+ $bounce_running = 1;
+ $menu_button_list[1]->cget(-menu)->entryconfigure(0,
+ -state => 'disabled',
+ );
+ $menu_button_list[1]->cget(-menu)->entryconfigure(1,
+ -state => 'normal',
+ );
+ }
+
+} # end SimStart
+
+sub SimStop {
+
+ if ($bounce_running) {
+ $bounce_running = 0;
+ $menu_button_list[1]->cget(-menu)->entryconfigure(0,
+ -state => 'normal',
+ );
+ $menu_button_list[1]->cget(-menu)->entryconfigure(1,
+ -state => 'disabled',
+ );
+ }
+
+} # end SimStop
+
+sub NotDone {
+
+ print "Not yet implemented.\n";
+
+} # end NotDone
+
+sub ShowMsg {
+
+ my($msg) = shift;
+ $bounce_status->insert('1.0', $msg);
+
+} # end ShowMsg
+
+sub ClearMsg {
+
+ $bounce_status->delete('1.0', 'end');
+
+} # end ClearMsg
+
+sub DoSingleStep {
+
+ # The simulation handler.
+ #
+ # Note that this handler must be cooperative and return after a short
+ # period, so that other X events may be processed by the mainloop below.
+
+ my($canvas) = @_;
+
+ $bounce_counter++;
+ Ball->move_all_balls($canvas, $bounce_speed->get() / 100.0);
+
+} # end DoSingle Step
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl
new file mode 100644
index 00000000000..ce32f13934b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry.pl
@@ -0,0 +1,34 @@
+# BrowseEntry, entry with listbox to select list values.
+
+use Tk::BrowseEntry;
+
+my $month = "January";
+
+outer:
+{
+ my $top = MainWindow->new;
+ my $f = $top->Frame;
+ my $c = $f->BrowseEntry(-label => "Month:", -variable => \$month);
+ $c->pack;
+ $c->insert("end", "January");
+ $c->insert("end", "February");
+ $c->insert("end", "March");
+ $c->insert("end", "April");
+ $c->insert("end", "May");
+ $c->insert("end", "June");
+ $c->insert("end", "July");
+ $c->insert("end", "August");
+ $c->insert("end", "September");
+ $c->insert("end", "October");
+ $c->insert("end", "November");
+ $c->insert("end", "December");
+ my $bf = $f->Frame;
+ $bf->Button(-text => "Print value",
+ -command => sub {
+ print "The month is $month\n";
+ }, -relief => "raised")->pack;
+
+ $bf->pack;
+ $f->pack;
+ MainLoop;
+}
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry2.pl
new file mode 100644
index 00000000000..5c8f9919847
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/browseentry2.pl
@@ -0,0 +1,39 @@
+# BrowseEntry, another example.
+#
+# Chris Dean <ctdean@cogit.com>
+
+use strict;
+use Tk;
+use Tk::BrowseEntry;
+
+my $top = new MainWindow( -title => "BrowseEntry 2" );
+main( $top );
+MainLoop();
+
+sub main {
+ my( $top ) = @_;
+
+ my @countries = qw( America Belize Canada Denmark Egypt Fruitopia );
+ my @states = qw( normal readonly disabled );
+ foreach my $i (0..$#states) {
+ my $state = $states[$i];
+ my $var = $countries[$i];
+ my $f = $top->Frame->pack( qw/-side left/ );
+ my $be = $f->BrowseEntry( -variable => \$var,
+ -choices => \@countries,
+ -state => $state )->pack;
+ if( $state eq "disabled" ) {
+ $be->configure( -arrowimage => $f->Getimage( "balArrow" ) )
+ }
+ foreach my $s (@states) {
+ $f->Radiobutton( -text => $s,
+ -value => $s,
+ -variable => \$state,
+ -command => sub {
+ $be->configure( -state => $state ); }
+ )->pack( qw/-anchor w/ );
+ }
+ $f->Button( -text => "Print value", -command => sub {
+ print "$var\n" } )->pack;
+ }
+}
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/button.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/button.pl
new file mode 100644
index 00000000000..4cc1b581678
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/button.pl
@@ -0,0 +1,28 @@
+# button.pl
+
+use vars qw/$TOP/;
+
+sub button {
+
+ # Create a top-level window that displays a bunch of buttons.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'If you click on any of the four buttons below, the background of the button area will change to the color indicated in the button. You can press Tab to move among the buttons, then press Space to invoke the current button.',
+ -title => 'Button Demonstration',
+ -iconname => 'button',
+ );
+
+ foreach my $color (qw/PeachPuff1 LightBlue1 SeaGreen2 Yellow1/) {
+ my $b = $TOP->Button(
+ -text => $color,
+ -width => 10,
+ -command => sub {$TOP->configure(-background => lc($color))},
+ );
+ $b->pack(qw/-side top -expand yes -pady 2/);
+ }
+
+} # end button
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/check.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/check.pl
new file mode 100644
index 00000000000..a5f9a10c093
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/check.pl
@@ -0,0 +1,44 @@
+# check.pl
+
+use vars qw/$TOP/;
+
+sub check {
+
+ # Create a top-level window that displays a bunch of check buttons.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Three checkbuttons are displayed below. If you click on a button, it will toggle the button\'s selection state and set a Perl variable to a value indicating the state of the checkbutton. Click the "See Variables" button to see the current values of the variables.',
+ -title => 'Checkbutton Demonstration',
+ -iconname => 'check',
+ );
+
+ my $var = $TOP->Button(
+ -text => 'See Variables',
+ -command => [\&see_vars, $TOP, [
+ ['wipers', \$WIPERS],
+ ['brakes', \$BRAKES],
+ ['sober', \$SOBER],
+ ],
+ ],
+ );
+ $var->pack(qw/-side bottom -expand 1/);
+
+ my(@pl) = qw/-side top -pady 2 -anchor w/;
+ my $b1 = $TOP->Checkbutton(
+ -text => 'Wipers OK',
+ -variable => \$WIPERS,
+ -relief => 'flat')->pack(@pl);
+ my $b2 = $TOP->Checkbutton(
+ -text => 'Brakes OK',
+ -variable => \$BRAKES,
+ -relief => 'flat')->pack(@pl);
+ my $b3 = $TOP->Checkbutton(
+ -text => 'Driver Sober',
+ -variable => \$SOBER,
+ -relief => 'flat')->pack(@pl);
+
+} # end check
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/choosedir.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/choosedir.pl
new file mode 100644
index 00000000000..5062afa0fad
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/choosedir.pl
@@ -0,0 +1,39 @@
+# This demonstration script prompts the user to select a directory.
+
+use vars qw/$TOP/;
+
+sub choosedir {
+ my $demo = shift;
+
+ $TOP = $MW->WidgetDemo
+ (
+ -name => $demo,
+ -text => "Enter a directory name in the entry box or click on the \"Browse\" buttons to select a directory name using the directory selection dialog.",
+ -title => 'Choose Directory Demonstration',
+ -iconname => 'choosedir',
+ );
+ {
+ my $f = $TOP->Frame;
+ my $lab = $f->Label(-text => "Select a directory to open: ",
+ -anchor => 'e');
+ my $ent = $f->Entry(-width => 20);
+ my $but = $f->Button(-text => "Browse ...",
+ -command => sub { dirDialog($TOP, $ent)});
+ $lab->pack(-side => 'left');
+ $ent->pack(-side => 'left',-expand => 'yes', -fill => 'x');
+ $but->pack(-side => 'left');
+ $f->pack(-fill => 'x', -padx => '1c', -pady => 3);
+ }
+}
+
+sub dirDialog {
+ my $w = shift;
+ my $ent = shift;
+ my $dir;
+ $dir = $w->chooseDirectory;
+ if (defined $dir and $dir ne '') {
+ $ent->delete(0, 'end');
+ $ent->insert(0, $dir);
+ $ent->xview('end');
+ }
+}
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/clrpick.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/clrpick.pl
new file mode 100644
index 00000000000..df9d3a72cd7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/clrpick.pl
@@ -0,0 +1,45 @@
+# clrpick.pl
+
+use Tk qw/catch/;
+use subs qw/setColor setColor_helper/;
+use vars qw/$TOP/;
+
+sub clrpick {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Press the buttons below to choose the foreground and background colors for the widgets in this window.',
+ -title => 'chooseColor Demo',
+ -iconname => 'chooseColor',
+ );
+
+ my(@pl) = qw/-side top -anchor c -pady 2m/;
+ my($back, $front);
+ $back = $TOP->Button(-text => 'Set background color ...')->pack(@pl);
+ $back->configure(-command => [\&setColor => $TOP, $back, '-background',
+ [-background, -highlightbackground]]);
+ $front = $TOP->Button(-text => 'Set foreground color ...')->pack(@pl);
+ $front->configure(-command => [\&setColor => $TOP, $front, '-foreground',
+ [-foreground]]);
+}
+
+sub setColor {
+ my($top, $button, $name, $options) = @_;
+ my $initialColor = $button->cget($name);
+ my $color = $button->chooseColor(-title => "Choose a $name color",
+ -initialcolor => $initialColor);
+ setColor_helper $top, $options, $color if defined $color;
+}
+
+sub setColor_helper {
+ my($widget, $options, $color) = @_;
+ foreach my $option (@$options) {
+ catch {
+ $widget->configure($option => $color);
+ }
+ }
+ foreach my $child ($widget->children) {
+ setColor_helper $child, $options, $color;
+ }
+}
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/colors.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/colors.pl
new file mode 100644
index 00000000000..922225107c1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/colors.pl
@@ -0,0 +1,85 @@
+# colors.pl
+
+use vars qw/$TOP/;
+
+sub colors {
+
+ # Create a top-level window containing a listbox showing a bunch of
+ # colors from the X color database.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'A listbox containing several color names is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by dragging in the listbox window with button 2 pressed. If you double-click button 1 on a color, then the application\'s color palette will be set to match that color.',
+ -title => 'Listbox Demonstration (colors)',
+ -iconname => 'colors',
+ );
+
+ my $list = $TOP->Scrolled(qw/Listbox -width 20 -height 16 -setgrid 1
+ -scrollbars e/);
+ $list->pack(qw/-side left -fill y/);
+ $list->focus;
+
+ $list->bind('<Double-1>' =>
+ sub {
+ $_[0]->setPalette($_[0]->get('active'));
+ },
+ );
+
+ $list->insert(0, qw/gray60 gray70 gray80 gray85 gray90
+gray95 snow1 snow2 snow3 snow4 seashell1 seashell2 seashell3 seashell4
+AntiqueWhite1 AntiqueWhite2 AntiqueWhite3 AntiqueWhite4 bisque1
+bisque2 bisque3 bisque4 PeachPuff1 PeachPuff2 PeachPuff3 PeachPuff4
+NavajoWhite1 NavajoWhite2 NavajoWhite3 NavajoWhite4 LemonChiffon1
+LemonChiffon2 LemonChiffon3 LemonChiffon4 cornsilk1 cornsilk2
+cornsilk3 cornsilk4 ivory1 ivory2 ivory3 ivory4 honeydew1 honeydew2
+honeydew3 honeydew4 LavenderBlush1 LavenderBlush2 LavenderBlush3
+LavenderBlush4 MistyRose1 MistyRose2 MistyRose3 MistyRose4 azure1
+azure2 azure3 azure4 SlateBlue1 SlateBlue2 SlateBlue3 SlateBlue4
+RoyalBlue1 RoyalBlue2 RoyalBlue3 RoyalBlue4 blue1 blue2 blue3 blue4
+DodgerBlue1 DodgerBlue2 DodgerBlue3 DodgerBlue4 SteelBlue1 SteelBlue2
+SteelBlue3 SteelBlue4 DeepSkyBlue1 DeepSkyBlue2 DeepSkyBlue3
+DeepSkyBlue4 SkyBlue1 SkyBlue2 SkyBlue3 SkyBlue4 LightSkyBlue1
+LightSkyBlue2 LightSkyBlue3 LightSkyBlue4 SlateGray1 SlateGray2
+SlateGray3 SlateGray4 LightSteelBlue1 LightSteelBlue2 LightSteelBlue3
+LightSteelBlue4 LightBlue1 LightBlue2 LightBlue3 LightBlue4 LightCyan1
+LightCyan2 LightCyan3 LightCyan4 PaleTurquoise1 PaleTurquoise2
+PaleTurquoise3 PaleTurquoise4 CadetBlue1 CadetBlue2 CadetBlue3
+CadetBlue4 turquoise1 turquoise2 turquoise3 turquoise4 cyan1 cyan2
+cyan3 cyan4 DarkSlateGray1 DarkSlateGray2 DarkSlateGray3
+DarkSlateGray4 aquamarine1 aquamarine2 aquamarine3 aquamarine4
+DarkSeaGreen1 DarkSeaGreen2 DarkSeaGreen3 DarkSeaGreen4 SeaGreen1
+SeaGreen2 SeaGreen3 SeaGreen4 PaleGreen1 PaleGreen2 PaleGreen3
+PaleGreen4 SpringGreen1 SpringGreen2 SpringGreen3 SpringGreen4 green1
+green2 green3 green4 chartreuse1 chartreuse2 chartreuse3 chartreuse4
+OliveDrab1 OliveDrab2 OliveDrab3 OliveDrab4 DarkOliveGreen1
+DarkOliveGreen2 DarkOliveGreen3 DarkOliveGreen4 khaki1 khaki2 khaki3
+khaki4 LightGoldenrod1 LightGoldenrod2 LightGoldenrod3 LightGoldenrod4
+LightYellow1 LightYellow2 LightYellow3 LightYellow4 yellow1 yellow2
+yellow3 yellow4 gold1 gold2 gold3 gold4 goldenrod1 goldenrod2
+goldenrod3 goldenrod4 DarkGoldenrod1 DarkGoldenrod2 DarkGoldenrod3
+DarkGoldenrod4 RosyBrown1 RosyBrown2 RosyBrown3 RosyBrown4 IndianRed1
+IndianRed2 IndianRed3 IndianRed4 sienna1 sienna2 sienna3 sienna4
+burlywood1 burlywood2 burlywood3 burlywood4 wheat1 wheat2 wheat3
+wheat4 tan1 tan2 tan3 tan4 chocolate1 chocolate2 chocolate3 chocolate4
+firebrick1 firebrick2 firebrick3 firebrick4 brown1 brown2 brown3
+brown4 salmon1 salmon2 salmon3 salmon4 LightSalmon1 LightSalmon2
+LightSalmon3 LightSalmon4 orange1 orange2 orange3 orange4 DarkOrange1
+DarkOrange2 DarkOrange3 DarkOrange4 coral1 coral2 coral3 coral4
+tomato1 tomato2 tomato3 tomato4 OrangeRed1 OrangeRed2 OrangeRed3
+OrangeRed4 red1 red2 red3 red4 DeepPink1 DeepPink2 DeepPink3 DeepPink4
+HotPink1 HotPink2 HotPink3 HotPink4 pink1 pink2 pink3 pink4 LightPink1
+LightPink2 LightPink3 LightPink4 PaleVioletRed1 PaleVioletRed2
+PaleVioletRed3 PaleVioletRed4 maroon1 maroon2 maroon3 maroon4
+VioletRed1 VioletRed2 VioletRed3 VioletRed4 magenta1 magenta2 magenta3
+magenta4 orchid1 orchid2 orchid3 orchid4 plum1 plum2 plum3 plum4
+MediumOrchid1 MediumOrchid2 MediumOrchid3 MediumOrchid4 DarkOrchid1
+DarkOrchid2 DarkOrchid3 DarkOrchid4 purple1 purple2 purple3 purple4
+MediumPurple1 MediumPurple2 MediumPurple3 MediumPurple4 thistle1
+thistle2 thistle3 thistle4/);
+
+ $list->activate(0);
+
+} # end colors
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/cscroll.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/cscroll.pl
new file mode 100644
index 00000000000..e39e9caac56
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/cscroll.pl
@@ -0,0 +1,86 @@
+# cscroll.pl
+
+use subs qw/cscroll_button cscroll_enter cscroll_leave/;
+use vars qw/$TOP/;
+
+sub cscroll {
+
+ # Create a top-level window containing a simple canvas that can be
+ # scrolled in two dimensions.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This window displays a canvas widget that can be scrolled either using the scrollbars or by dragging with button 2 in the canvas. If you click button 1 on one of the rectangles, its indices will be printed on stdout.',
+ -title => 'Scrollable Canvas Demonstration',
+ -iconname => 'cscroll',
+ );
+
+ my $c = $TOP->Scrolled(qw/Canvas -relief sunken -borderwidth 2
+ -scrollbars se -scrollregion/ => ['-10c', '-10c', '50c', '20c']);
+ $c->pack(qw/-expand yes -fill both/);
+
+ my($bg, $i, $j, $x, $y) = ($c->configure(-background))[4];
+ for ($i = 0; $i < 20; $i++) {
+ $x = -10 + 3 * $i;
+ $j = 0;
+ $y = -10;
+ while ($j < 10) {
+ $c->createRectangle("${x}c", "${y}c",
+ ($x+2).'c', ($y+2).'c',
+ -outline => 'black', -fill => $bg, -tags => 'rect');
+ $c->createText(($x+1).'c', ($y+1).'c',
+ -text => "$i,$j", -anchor => 'center', -tags => 'text');
+ $j++;
+ $y += 3;
+ } # whilend
+ } # forend
+
+ my $old_fill = '';
+ $c->bind('all', '<Any-Enter>' => [\&cscroll_enter, \$old_fill]);
+ $c->bind('all', '<Any-Leave>' => [\&cscroll_leave, \$old_fill]);
+ $c->bind('all', '<1>' => \&cscroll_button);
+
+ $c->CanvasBind('<2>' => [ scanMark => Ev('x'), Ev('y') ]);
+ $c->CanvasBind('<B2-Motion>' => [ scanDragto => Ev('x'), Ev('y') ]);
+
+} # end cscroll
+
+sub cscroll_button {
+
+ my($c) = @_;
+
+ my ($id) = $c->find(qw/withtag current/);
+ $id++ if ($c->gettags('current'))[0] ne 'text';
+ print STDOUT 'You buttoned at ', ($c->itemconfigure($id, -text))[4], "\n";
+
+} # end cscroll_button
+
+sub cscroll_enter {
+
+ my($c, $old_fill) = @_;
+
+ my ($id) = $c->find(qw/withtag current/);
+ $id-- if ($c->gettags('current'))[0] eq 'text';
+ $$old_fill = ($c->itemconfigure($id, -fill))[4];
+ if ($c->depth > 1) {
+ $c->itemconfigure($id, -fill => 'SeaGreen1');
+ } else {
+ $c->itemconfigure($id, -fill => 'black');
+ $c->itemconfigure($id+1, -fill => 'white');
+ }
+
+} # end cscroll_enter
+
+sub cscroll_leave {
+
+ my($c, $old_fill) = @_;
+
+ my ($id) = $c->find(qw/withtag current/);
+ $id-- if ($c->gettags('current'))[0] eq 'text';
+ $c->itemconfigure($id, -fill => $$old_fill);
+ $c->itemconfigure($id+1, -fill => 'black');
+
+} # end cscroll_leave
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ctext.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ctext.pl
new file mode 100644
index 00000000000..9c2ca476379
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ctext.pl
@@ -0,0 +1,170 @@
+# ctext.pl
+
+use subs qw/ctext_bs ctext_configure ctext_enter ctext_move ctext_press/;
+use vars qw/$TOP/;
+
+sub ctext {
+
+ # Create a window containing a canvas displaying a text string and
+ # allowing the string to be edited and re-anchored.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['This window displays a string of text to demonstrate the text facilities of canvas widgets. You can click in the boxes to adijust the position of the text relative to its positioning point or change its justification. The text also supports the following simple bindings for editing:
+ 1. You can point, click, and type.
+ 2. You can also select with button 1.
+ 3. You can copy the selection to the mouse position with button 2.
+ 4. Backspace and Control+h delete the selection if there is one;
+ otherwise they delete the character just before the insertion cursor.
+ 5. Delete deletes the selection if there is one; otherwise it deletes
+ the character just after the insertion cursor.', qw/-wraplength 5i/],
+ -title => 'Canvas Text Demonstration',
+ -iconname => 'ctext',
+ );
+
+ my $c = $TOP->Canvas(qw/-relief flat -bd 0 -width 500 -height 350/);
+ $c->pack(qw/-side top -expand yes -fill both/);
+
+ $c->create(qw/rectangle 245 195 255 205 -outline black -fill red/);
+
+ # First, create the text item and give it bindings so it can be edited.
+
+ $c->addtag(qw/text withtag/,
+ $c->create('text', 250, 200,
+ -text => 'This is just a string of text to demonstrate the text facilities of canvas widgets. Bindings have been been defined to support editing (see above)."',
+ qw/-width 440 -anchor n -justify left
+ -font -*-Helvetica-Medium-R-Normal--*-240-*-*-*-*-*-*/
+ ),
+ );
+ $c->bind(qw/text <1>/ => \&ctext_press);
+ $c->bind(qw/text <B1-Motion>/ => \&ctext_move);
+ $c->bind(qw/text <Shift-1>/ => sub {
+ my($c) = @_;
+ my $e = $c->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ $c->select(qw/adjust current/, "\@$x,$y");
+ });
+ $c->bind(qw/text <Shift-B1-Motion>/ => \&ctext_move);
+ $c->bind(qw/text <KeyPress>/ => sub {
+ my($c) = @_;
+ my $e = $c->XEvent;
+ my $A = $e->A;
+ $c->insert(qw/text insert/, "$A");
+ });
+ $c->bind(qw/text <Return>/ => sub {
+ my($c) = @_;
+ $c->insert(qw/text insert/, "\\n");
+ });
+ $c->bind(qw/text <Control-h>/ => \&ctext_bs);
+ $c->bind(qw/text <BackSpace>/ => \&ctext_bs);
+ $c->bind(qw/text <Delete>/ => sub {
+ my($c) = @_;
+ eval {local $SIG{__DIE__}; $c->dchars(qw/text sel.first sel.last/)};
+ $c->dchars('text', 'insert');
+ });
+ $c->bind(qw/text <2>/ => sub {
+ my($c) = @_;
+ my $e = $c->XEvent;
+ $c->insert('text', $e->xy, $MW->SelectionGet);
+ });
+
+ # Next, create some items that allow the text's anchor position to
+ # be edited.
+
+ my($x, $y, $color) = (50, 50, 'LightSkyBlue1');
+ ctext_configure $c, $x, $y, -anchor => 'se', $color;
+ ctext_configure $c, $x+30, $y, -anchor => 's', $color;
+ ctext_configure $c, $x+60, $y, -anchor => 'sw', $color;
+ ctext_configure $c, $x, $y+30, -anchor => 'e', $color;
+ ctext_configure $c, $x+30, $y+30, -anchor => 'center', $color;
+ ctext_configure $c, $x+60, $y+30, -anchor => 'w', $color;
+ ctext_configure $c, $x, $y+60, -anchor => 'ne', $color;
+ ctext_configure $c, $x+30, $y+60, -anchor => 'n', $color;
+ ctext_configure $c, $x+60, $y+60, -anchor => 'nw', $color;
+ my $item = $c->create('rectangle', $x+40, $y+40, $x+50, $y+50,
+ qw/-outline black -fill red/);
+ $c->bind($item, '<1>' => sub {
+ shift->itemconfigure(qw/text -anchor center/);
+ });
+ $c->create('text', $x+45, $y-5, -text => 'Text Position', qw/-anchor s
+ -font -*-times-medium-r-normal--*-240-*-*-*-*-*-*
+ -fill brown/);
+
+ # Lastly, create some items that allow the text's justification
+ # to be changed.
+
+ $x = 350; $y = 50; $color = 'SeaGreen2';
+ ctext_configure $c, $x, $y, -justify => 'left', $color;
+ ctext_configure $c, $x+30, $y, -justify => 'center', $color;
+ ctext_configure $c, $x+60, $y, -justify => 'right', $color;
+ $c->create('text', $x+45, $y-5, qw/-text Justification -anchor s
+ -font -*-times-medium-r-normal--*-240-*-*-*-*-*-*
+ -fill brown/);
+
+ my $config_fill = '';
+ $c->bind(qw/config <Enter>/ => [\&ctext_enter, \$config_fill]);
+ $c->bind(qw/config <Leave>/ =>
+ sub {$c->itemconfigure('current', -fill => $config_fill)}
+ );
+
+} # end ctext
+
+sub ctext_bs {
+
+ my($c) = @_;
+
+ eval {local $SIG{__DIE__}; $c->dchars(qw/text sel.first sel.last/)};
+ my $char = $c->index(qw/text insert/) - 1;
+ $c->dchars('text', $char) if $char >= 0;
+
+} # end ctext_bs
+
+sub ctext_configure {
+
+ my($w, $x, $y, $option, $value, $color) = @_;
+
+ my $item = $w->create('rectangle', $x, $y, $x+30, $y+30,
+ -outline => 'black', -fill => $color, -width => 1);
+ $w->bind($item, '<1>',
+ sub {$w->itemconfigure('text', $option => $value)}
+ );
+ $w->addtag(qw/config withtag/, $item);
+
+} # end ctext_configure
+
+sub ctext_enter {
+
+ my($w, $config_fill) = @_;
+
+ $$config_fill = ($w->itemconfigure('current', -fill))[4];
+ $w->itemconfigure(qw/current -fill black/);
+
+} # end ctext_enter
+
+sub ctext_move {
+
+ my($w) = @_;
+ my $e = $w->XEvent;
+
+ my($x, $y) = ($e->x, $e->y);
+ $w->select(qw/to current/, "\@$x,$y");
+
+} # end ctext_move
+
+sub ctext_press {
+
+ my($w) = @_;
+ my $e = $w->XEvent;
+
+ my($x, $y) = ($e->x, $e->y);
+ $w->icursor('current', "\@$x,$y");
+ $w->focus('current');
+ $w->CanvasFocus;
+ $w->select(qw/from current/, "\@$x,$y");
+
+} # end ctext_press
+
+1;
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog1.pl
new file mode 100644
index 00000000000..9c98bdfca22
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog1.pl
@@ -0,0 +1,33 @@
+# dialog1.pl
+
+use subs qw/see_code/;
+use vars qw/$DIALOG1/;
+
+sub dialog1 {
+
+ my($demo) = @_;
+
+ my($ok, $can, $see) = ('OK', 'Cancel', 'See Code');
+ if (not Exists($DIALOG1)) {
+ $DIALOG1 = $MW->Dialog(
+ -title => 'Dialog with local grab',
+ -text => '',
+ -bitmap => 'info',
+ -default_button => $ok,
+ -buttons => [$ok, $can, $see],
+ );
+ $DIALOG1->configure(
+ -wraplength => '4i',
+ -text => 'This is a modal dialog box. It uses Tk\'s "grab" command to create a "local grab" on the dialog box. The grab prevents any pointer-related events from getting to any other windows in the application until you have answered the dialog by invoking one of the buttons below. However, you can still interact with other applications.',
+ );
+ }
+
+ my $button = $DIALOG1->Show;
+
+ print "You pressed OK\n" if $button eq $ok;
+ print "You pressed Cancel\n" if $button eq $can;
+ see_code 'dialog1' if $button eq $see;
+
+} # end dialog1
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog2.pl
new file mode 100644
index 00000000000..15b2102edcd
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dialog2.pl
@@ -0,0 +1,33 @@
+# dialog2.pl
+
+use subs qw/see_code/;
+use vars qw/$DIALOG2/;
+
+sub dialog2 {
+
+ my($demo) = @_;
+
+ my($ok, $can, $see) = ('OK', 'Cancel', 'See Code');
+ if (not Exists($DIALOG2)) {
+ $DIALOG2 = $MW->Dialog(
+ -title => 'Dialog with global grab',
+ -text => '',
+ -bitmap => 'info',
+ -default_button => $ok,
+ -buttons => [$ok, $can, $see],
+ );
+ $DIALOG2->configure(
+ -wraplength => '4i',
+ -text => 'This dialog box uses a global grab, so it prevents you from interacting with anything on your display until you invoke one of the buttons below. Global grabs are almost always a bad idea; don\'t use them unless you\'re truly desperate.',
+ );
+ }
+
+ my $button = $DIALOG2->Show('-global');
+
+ print "You pressed OK\n" if $button eq $ok;
+ print "You pressed Cancel\n" if $button eq $can;
+ see_code 'dialog2' if $button eq $see;
+
+} # end dialog2
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dirtree.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dirtree.pl
new file mode 100644
index 00000000000..0cf91417a56
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/dirtree.pl
@@ -0,0 +1,7 @@
+# DirTree, display directory tree.
+
+use Tk;
+use Tk::DirTree;
+my $top = MainWindow->new;
+my $dl = $top->Scrolled('DirTree')->pack(-expand => 1 , -fill => 'both');
+MainLoop;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry1.pl
new file mode 100644
index 00000000000..6250df5f4d5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry1.pl
@@ -0,0 +1,28 @@
+# entry1.pl
+
+use vars qw/$TOP/;
+
+sub entry1 {
+
+ # Create a top-level window that displays a bunch of entries.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['Three different entries are displayed below. You can add characters by pointing, clicking and typing. The normal Motif editing characters are supported, along with many Emacs bindings. For example, Backspace and Control-h delete the character to the left of the insertion cursor and Delete and Control-d delete the chararacter to the right of the insertion cursor. For entries that are too large to fit in the window all at once, you can scan through the entries by dragging with mouse button2 pressed.', qw/-wraplength 5i/],
+ -title => 'Entry Demonstration (no scrollbars)',
+ -iconname => 'entry1',
+ );
+
+ my(@relief) = qw/-relief sunken/;
+ my(@pl) = qw/-side top -padx 10 -pady 5 -fill x/;
+ my $e1 = $TOP->Entry(@relief)->pack(@pl);
+ my $e2 = $TOP->Entry(@relief)->pack(@pl);
+ my $e3 = $TOP->Entry(@relief)->pack(@pl);
+
+ $e1->insert(0, 'Initial value');
+ $e2->insert('end', 'This entry contains a long value, much too long to fit in the window at one time, so long in fact that you\'ll have to scan or scroll to see the end.');
+
+} # end entry1
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry2.pl
new file mode 100644
index 00000000000..4f3c85e3454
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry2.pl
@@ -0,0 +1,33 @@
+# entry2.pl
+
+use vars qw/$TOP/;
+
+sub entry2 {
+
+ # Create a top-level window that displays a bunch of entries with
+ # scrollbars.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['Three different entries are displayed below, with a scrollbar for each entry. You can add characters by pointing, clicking and typing. The normal Motif editing characters are supported, along with many Emacs bindings. For example, Backspace and Control-h delete the character to the left of the insertion cursor and Delete and Control-d delete the chararacter to the right of the insertion cursor. For entries that are too large to fit in the window all at once, you can scan through the entries by dragging with mouse button2 pressed.', -wraplength => '5i'],
+ -title => 'Entry Demonstration (with scrollbars)',
+ -iconname => 'entry2',
+ );
+
+ my(@pl) = qw/-side top -fill x/;
+ my(@scrolled_attributes) = qw/Entry -relief sunken -scrollbars s/;
+ my(@spacer_attributes) = qw/-width 20 -height 10/;
+
+ my $e1 = $TOP->Scrolled(@scrolled_attributes)->pack(@pl);
+ my $spacer1 = $TOP->Frame(@spacer_attributes)->pack(@pl);
+ my $e2 = $TOP->Scrolled(@scrolled_attributes)->pack(@pl);
+ my $spacer2 = $TOP->Frame(@spacer_attributes)->pack(@pl);
+ my $e3 = $TOP->Scrolled(@scrolled_attributes)->pack(@pl);
+
+ $e1->insert(0, 'Initial value');
+ $e2->insert('end', 'This entry contains a long value, much too long to fit in the window at one time, so long in fact that you\'ll have to scan or scroll to see the end.');
+
+} # end entry2
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry3.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry3.pl
new file mode 100644
index 00000000000..b296fbb0353
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/entry3.pl
@@ -0,0 +1,199 @@
+# entry3.pl
+
+use vars qw/$TOP/;
+
+sub entry3 {
+
+ # This demonstration script creates several entry widgets whose
+ # permitted input is constrained in some way. It also shows off a
+ # password entry.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Four different entries are displayed below. You can add characters by pointing, clicking and typing, though each is constrained in what it will accept. The first only accepts integers or the empty string (checking when focus leaves it) and will flash to indicate any problem. The second only accepts strings with fewer than ten characters and sounds the bell when an attempt to go over the limit is made. The third accepts US phone numbers, mapping letters to their digit equivalent and sounding the bell on encountering an illegal character or if trying to type over a character that is not a digit. The fourth is a password field that accepts up to eight characters (silently ignoring further ones), and displaying them as asterisk characters.',
+ -title => 'Constrained Entry Demonstration',
+ -iconname => 'entry3',
+ );
+
+
+ my $lf1 = $TOP->Labelframe(-text => 'Integer Entry');
+ my $e1;
+ $e1 = $lf1->Entry(
+ -validate => 'focus',
+ -validatecommand => sub {
+ my ($proposed, $changes, $current, $index, $type) = @_;
+ return not $proposed =~ m/[^\d]/g;
+ },
+ );
+ $e1->configure(
+ -invalidcommand =>
+ [\&entry3_flash, $e1, $e1->cget(-fg), $e1->cget(-bg)],
+ );
+ $e1->pack(qw/-fill x -expand 1 -padx 1m -pady 1m/);
+
+ my $lf2 = $TOP->Labelframe(-text => 'Length-Constrained Entry');
+ my $e2 = $lf2->Entry(
+ -validate => 'key',
+ -invalidcommand => sub {$TOP->bell},
+ -validatecommand => sub {
+ my ($proposed, $changes, $current, $index, $type) = @_;
+ return length($proposed) < 10 ? 1 : 0;
+ },
+ );
+ $e2->pack(qw/-fill x -expand 1 -padx 1m -pady 1m/);
+
+ # phone number entry
+ #
+ # Note that the source to this is quite a bit longer as the behaviour
+ # demonstrated is a lot more ambitious than with the others.
+ #
+ # Mapping from alphabetic characters to numbers. This is probably
+ # wrong, but it is the only mapping I have; the UK doesn't really go
+ # for associating letters with digits for some reason.
+
+ my %phone_letters = qw/abc 2 def 3 ghi 4 jkl 5 mno 6 pqrs 7 tuv 8 wxyz 9/;
+ my %l2n; # letter to number mapping hash
+
+ while (my ($k, $v) = each %phone_letters) {
+ map {$l2n{$_} = $v} split '', $k;
+ }
+
+ my $lf3 = $TOP->Labelframe(-text => 'US Phone-Number Entry');
+ my $e3_var = '1-(000)-000-0000';
+ my $e3;
+ $e3 = $lf3->Entry(
+ -validate => 'key',
+ -invalidcommand => sub {$TOP->bell},
+ -textvariable => \$e3_var,
+ );
+ $e3->configure(
+ -validatecommand => [\&entry3_validate_phone, $e3, \%l2n],
+ );
+ $e3->pack(qw/-fill x -expand 1 -padx 1m -pady 1m/);
+ # Click to focus goes to the first editable character...
+ $e3->bind('<FocusIn>' => sub {
+ my $e = shift;
+ if ($Tk::event->d ne "NotifyAncestor") {
+ $e->icursor(3);
+ $e->afterIdle(sub {$e->selectionClear});
+ }
+ });
+ $e3->bind('<Left>' => \&entry3_phone_left);
+ $e3->bind('<Right>' => \&entry3_phone_right);
+
+ my $lf4 = $TOP->Labelframe(-text => 'Password Entry');
+ my $e4 = $lf4->Entry(
+ -validate => 'key',
+ -show => '*',
+ -validatecommand => sub {
+ my ($proposed, $changes, $current, $index, $type) = @_;
+ return length($proposed) <= 8 ? 1 : 0;
+ },
+ );
+ $e4->pack(qw/-fill x -expand 1 -padx 1m -pady 1m/);
+
+ my $f = $TOP->Frame;
+ $f->lower;
+ $lf1->grid($lf2, -in => $f, qw/-padx 3m -pady 1m -sticky ew/);
+ $lf3->grid($lf4, -in => $f, qw/-padx 3m -pady 1m -sticky ew/);
+ $f->gridColumnconfigure([0, 1], -uniform => 1);
+ $f->pack(qw/-fill both -expand 1/);
+
+} # end entry3
+
+sub entry3_flash {
+ my ($w, $fg, $bg) = @_;
+ $w->focusForce;
+ $w->{count} = 9 unless defined $w->{count};
+ if ($w->{count} < 1) {
+ $w->configure(-foreground => $fg, -background => $bg);
+ $w->{count} = 9;
+ } else {
+ if ($w->{count} % 2) {
+ $w->configure(-foreground => $bg, -background => $fg);
+ } else {
+ $w->configure(-foreground => $fg, -background => $bg);
+ }
+ $w->{count}--;
+ $w->after(200 => [\&entry3_flash, $w, $fg, $bg]);
+ }
+} # end entry3_flash
+
+sub entry3_phone_left {
+
+ # Skip over fixed characters in a phone-number string when moving left.
+
+ my $e = shift;
+ my $index = $e->index('insert');
+ if ($index == 8) {
+ # Skip back two extra characters
+ $index -= 2;
+ $e->icursor($index);
+ } elsif ($index == 7 or $index == 12) {
+ # Skip back one extra character
+ $index -= 1;
+ $e->icursor($index);
+ } elsif ($index <= 3) {
+ # Can't move any further
+ $e->bell;
+ #return -code break
+ $e->break;
+ }
+
+} # end entry3_phone_left
+
+sub entry3_phone_right {
+
+ # Skip over fixed characters in a phone-number string when moving right.
+
+ my ($e, $add) = @_;
+
+ $add = 0 unless defined $add;
+ my $index = $e->index('insert');
+ if ($index + $add == 5) {
+ # Skip forward two extra characters
+ $index += 2;
+ $e->icursor($index);
+ } elsif ($index + $add == 6 or $index + $add == 10) {
+ # Skip forward one extra character
+ $index++;
+ $e->icursor($index);
+ } elsif ($index + $add == 15 and not $add) {
+ # Can't move any further
+ $e->bell;
+ #return -code break
+ $e->break;
+ }
+
+} # end entry3_phone_right
+
+sub entry3_validate_phone {
+
+ # Checks that the replacement (mapped to a digit) of the given
+ # character in an entry widget at the given position will leave a
+ # valid phone number in the widget.
+
+ my ($w, $l2n_ref, $proposed, $changes, $current, $index, $type) = @_;
+
+ return 1 if $index == -1;
+ my $val = $w->cget(-validate);
+ $w->afterIdle(sub {
+ $w->configure(
+ -validate => $val,
+ -invalidcommand => sub {$w->bell},
+ );
+ });
+ if (not ($index < 3 or $index == 6 or $index == 7 or $index == 11 or
+ $index > 15) and $changes =~ m/[0-9A-Z]/i) {
+ $w->delete($index);
+ $changes =~ s/$_/$l2n_ref->{$_}/ig foreach (keys %$l2n_ref);
+ $w->insert($index, $changes);
+ $w->afterIdle([\&entry3_phone_right, $w, -1]);
+ return 1;
+ }
+ return 0;
+
+} # end entry3_validate_phone;
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/filebox.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/filebox.pl
new file mode 100644
index 00000000000..0d1b9737c01
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/filebox.pl
@@ -0,0 +1,106 @@
+# filebox.tcl --
+#
+# This demonstration script prompts the user to select a file.
+#
+# SCCS: @(#) filebox.tcl 1.3 97/03/02 16:22:36
+
+use vars qw/$TOP/;
+
+sub filebox {
+ my $demo = shift;
+
+ $TOP = $MW->WidgetDemo
+ (
+ -name => $demo,
+ -text => "Enter a file name in the entry box or click on the \"Browse\" buttons to select a file name using the file selection dialog.",
+ -title => 'File box Demonstration',
+ -iconname => 'filebox',
+ );
+ foreach my $i (qw(open save)) {
+ my $f = $TOP->Frame;
+ my $lab = $f->Label(-text => "Select a file to $i: ",
+ -anchor => 'e');
+ my $ent = $f->Entry(-width => 20);
+ my $but = $f->Button(-text => "Browse ...",
+ -command => sub { fileDialog($TOP, $ent, $i)});
+ $lab->pack(-side => 'left');
+ $ent->pack(-side => 'left',-expand => 'yes', -fill => 'x');
+ $but->pack(-side => 'left');
+ $f->pack(-fill => 'x', -padx => '1c', -pady => 3);
+ }
+
+ my $cbf = $TOP->Frame->pack(-fill => 'x', -padx => '1c', -pady => 3);
+ my $fd;
+ $cbf->Radiobutton
+ (-text => 'FileSelect',
+ -variable => \$fd,
+ -value => 'FileSelect',
+ -command => sub { local($^W) = 0;
+ require Tk::FileSelect;
+ Tk::FileSelect->import('as_default');
+ _removeCachedFileDialogs();
+ })->pack(-side => 'left');
+ my $fdb = $cbf->Radiobutton
+ (-text => 'FBox',
+ -variable => \$fd,
+ -value => 'FBox',
+ -command => sub { local($^W) = 0;
+ require Tk::FBox;
+ Tk::FBox->import('as_default');
+ _removeCachedFileDialogs();
+ })->pack(-side => 'left');
+ $fdb->invoke;
+
+# XXX Motif style file box not implemented
+# unless (compare($tcl_platform{'platform'},'unix'))
+# {
+# $w->{'.strict'} = $w->Checkbutton('Name','strict','-text',"Use Motif Style Dialog",'-variable','tk_strictMotif','-onvalue',1,'-offvalue',0);
+# $w->{'.strict'}->pack('-anchor','c');
+# }
+}
+
+sub fileDialog {
+ my $w = shift;
+ my $ent = shift;
+ my $operation = shift;
+ my $types;
+ my $file;
+ # Type names Extension(s) Mac File Type(s)
+ #
+ #---------------------------------------------------------
+ @types =
+ (["Text files", [qw/.txt .doc/]],
+ ["Text files", '', 'TEXT'],
+ ["Perl Scripts", '.pl', 'TEXT'],
+ ["C Source Files", ['.c', '.h']],
+ ["All Source Files", [qw/.tcl .c .h/]],
+ ["Image Files", '.gif'],
+ ["Image Files", ['.jpeg', '.jpg']],
+ ["Image Files", '', [qw/GIFF JPEG/]],
+ ["All files", '*']
+ );
+ if ($operation eq 'open') {
+ $file = $w->getOpenFile(-filetypes => \@types);
+ } else {
+ $file = $w->getSaveFile(-filetypes => \@types,
+ -initialfile => 'Untitled',
+ -defaultextension => '.txt');
+ }
+ if (defined $file and $file ne '') {
+ $ent->delete(0, 'end');
+ $ent->insert(0, $file);
+ $ent->xview('end');
+ }
+}
+
+sub _removeCachedFileDialogs {
+ my $mw = $TOP->MainWindow;
+ my $remove = sub {
+ my $t = shift;
+ return if (!UNIVERSAL::isa($t, "Tk::Toplevel"));
+ delete $t->{'tk_getOpenFile'};
+ delete $t->{'tk_getSaveFile'};
+ };
+ $remove->($mw);
+ $mw->Walk($remove);
+}
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/floor.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/floor.pl
new file mode 100644
index 00000000000..5fa5be1ead2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/floor.pl
@@ -0,0 +1,1324 @@
+# floor.pl
+
+use Tk::Trace;
+use subs qw/floor_bg1 floor_bg2 floor_bg3 floor_display floor_fg1 floor_fg2
+ floor_fg3 floor_room_changed/;
+use vars qw/$TOP/;
+
+sub floor {
+
+ # Create a top-level window containing a Canvas that displays the
+ # floorplan for DEC's Western Research Laboratory.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['This window contains a canvas widget showing the floorplan of Digital Equipment Corporation\'s Western Research Laboratory. It has three levels. At any given time one of the levels is active, meaning that you can see its room structure. To activate a level, click the left mouse button anywhere on it. As the mouse moves over the active level, the room under the mouse lights up and its room number appears in the "Room:" entry. You can also type a room number in the entry and the room will light up.', qw/-wraplength 8i/],
+ -title => 'Floorplan Canvas Demonstration',
+ -iconname => 'floor',
+ );
+
+ my $c = $TOP->Scrolled(qw/Canvas -width 900 -height 500 -relief sunken
+ -borderwidth 2 -scrollbars se/);
+ $c->pack(qw/-expand yes -fill both/);
+
+ # Create an Entry for displaying and typing in current room.
+
+ $floor::current_room = '';
+ my $c_entry = $c->Entry(qw/-width 10 -relief sunken -borderwidth 2
+ -textvariable/ => \$floor::current_room);
+
+ # Choose colors, then fill in the floorplan.
+
+ my %cinfo; # color information hash
+ if ($TOP->depth > 1) {
+ $cinfo{'floor_bg1'} = '#a9c1da';
+ $cinfo{outline1} = '#77889a';
+ $cinfo{'floor_bg2'} = '#9ab0c6';
+ $cinfo{outline2} = '#687786';
+ $cinfo{'floor_bg3'} = '#8ba0b3';
+ $cinfo{outline3} = '#596673';
+ $cinfo{offices} = 'Black';
+ $cinfo{active} = '#c4d1df';
+ } else {
+ $cinfo{'floor_bg1'} = 'white';
+ $cinfo{outline1} = 'black';
+ $cinfo{'floor_bg2'} = 'white';
+ $cinfo{outline2} = 'black';
+ $cinfo{'floor_bg3'} = 'white';
+ $cinfo{outline3} = 'black';
+ $cinfo{offices} = 'Black';
+ $cinfo{active} = 'black';
+ }
+
+ my %floor_labels = ();
+ my %floor_items = ();
+ my $active_floor = 0;
+ floor_display $c->Subwidget('canvas'), 3, \%floor_labels, \%floor_items,
+ \%cinfo, \$active_floor, $c_entry;
+
+ # Set up event bindings for the Canvas.
+
+ my $floor_number;
+ for $floor_number (1..3) {
+ $c->bind("floor${floor_number}", '<1>' =>
+ [\&floor_display, $floor_number, \%floor_labels, \%floor_items,
+ \%cinfo, \$active_floor, $c_entry],
+ );
+ }
+ $c->bind('room', '<Enter>' => sub {
+ my($c) = @_;
+ my $id = $c->find('withtag' => 'current');
+ $id = $id->[0] if ref($id) eq 'ARRAY';
+ $floor::current_room = $floor_labels{$id} if defined $id;
+ $c->idletasks;
+ });
+ $c->bind('room', '<Leave>' => sub {$floor::current_room = ''});
+ $c->CanvasBind('<2>' => sub {
+ my($c) = @_;
+ my $e = $c->XEvent;
+ $c->scanMark($e->x, $e->y);
+ });
+ $c->CanvasBind('<B2-Motion>' => sub {
+ my($c) = @_;
+ my $e = $c->XEvent;
+ $c->scanDragto($e->x, $e->y);
+ });
+ $c->CanvasBind('<Enter>', => [sub {shift; shift->focus}, $c_entry]);
+
+ $c->traceVariable(\$floor::current_room, 'w' =>
+ [sub {
+ my($index, $value, $op, $floor_items, $cinfo) = @_;
+ return if $op eq 'u';
+ $floor_current_room = $value;
+ &floor_room_changed($c->Subwidget('canvas'), $floor_items, $cinfo);
+ $value; # always return variable's new value
+ }, \%floor_items, \%cinfo],
+ );
+
+} # floor
+
+sub floor_display {
+
+ # The following procedure recreates the floorplan display in the
+ # Canvas given by "w". The floor given by "active" (1, 2, or 3) is
+ # displayed on top, with office structure visible. (Used as a callback
+ # and a normal function.)
+
+ my($c, $active, $floor_labels, $floor_items, $cinfo, $active_floor,
+ $c_entry) = @_;
+
+ return if $$active_floor eq $active;
+
+ $c->delete('all');
+ $$active_floor = $active;
+
+ # First go through the three floors, displaying the backgrounds for
+ # each floor.
+
+ floor_bg1 $c, $cinfo->{'floor_bg1'}, $cinfo->{outline1};
+ floor_bg2 $c, $cinfo->{'floor_bg2'}, $cinfo->{outline2};
+ floor_bg3 $c, $cinfo->{'floor_bg3'}, $cinfo->{outline3};
+
+ # Raise the background for the active floor so that it's on top.
+
+ $c->raise("floor${active}");
+
+ # Create a dummy item just to mark this point in the display list, so
+ # we can insert highlights here.
+
+ $c->create('rectangle', 0, 100, 1, 101, -fill => undef, -outline => undef,
+ -tags => 'marker');
+
+ # Add the walls and labels for the active floor, along with transparent
+ # polygons that define the rooms on the floor. Make sure that the room
+ # polygons are on top.
+
+ my $cmd = "floor_fg${active}";
+ {
+ no strict qw(refs);
+ &$cmd($c, $cinfo->{offices}, $floor_labels, $floor_items);
+ }
+ $c->raise('room');
+
+ # Offset the floors diagonally from each other.
+
+ $c->move(qw(floor1 2c 2c));
+ $c->move(qw(floor2 1c 1c));
+
+ # Create items for the room entry and its label.
+
+ $c->create('window', 600, 100, -anchor => 'w', -window => $c_entry);
+ $c->create('text', 600, 100, -anchor => 'e', -text => 'Room: ');
+ $c->configure(-scrollregion => [$c->bbox('all')]);
+
+} # end floor_display
+
+
+sub floor_room_changed {
+
+ # Whenever the current_room variable changes, this procedure highlights
+ # the current room and unhighlights any previous room.
+
+ my($w, $floor_items, $cinfo) = @_;
+
+ $w->delete('highlight');
+ my $item = $floor_items->{$floor::current_room};
+ return if not defined $item;
+ my(@c) = $w->coords($item);
+ if ($c[0]) {
+ $w->raise(
+ $w->create('polygon', @c,
+ -fill => $cinfo->{active},
+ -tags => 'highlight',
+ ),
+ 'marker');
+ } # ifend we have coordinates
+
+} # end floor_room_changed
+
+# The following procedures are invoked to instantiate various portions of
+# the building floorplan. The bodies of these procedures were generated
+# automatically from database files describing the building.
+
+
+sub floor_bg1 {
+
+ my ($w, $fill, $outline) = @_;
+
+ $w->create('poly', qw(347 80 349 82 351 84 353 85 363 92 375 99 386 104 386 129 398 129 398 162 484 162 484 129 559 129 559
+ 133 725 133 725 129 802 129 802 389 644 389 644 391 559 391 559 327 508 327 508 311 484 311 484 278 395 278 395 288 400
+ 288 404 288 409 290 413 292 418 297 421 302 422 309 421 318 417 325 411 330 405 332 397 333 344 333 340 334 336 336 335
+ 338 332 342 331 347 332 351 334 354 336 357 341 359 340 360 335 363 331 365 326 366 304 366 304 355 258 355 258 387 60
+ 387 60 391 0 391 0 337 3 337 3 114 8 114 8 25 30 25 30 5 93 5 98 5 104 7 110 10 116 16 119 20 122 28 123 32 123 68 220
+ 68 220 34 221 22 223 17 227 13 231 8 236 4 242 2 246 0 260 0 283 1 300 5 321 14 335 22 348 25 365 29 363 39 358 48 352
+ 56 337 70 344 76 347 80), -tags => ['floor1', 'bg'], -fill => $fill);
+
+ $w->create('line', qw(386 129 398 129), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(258 355 258 387), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(60 387 60 391), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(0 337 0 391), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(60 391 0 391), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(3 114 3 337), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(258 387 60 387), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(484 162 398 162), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(398 162 398 129), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(484 278 484 311), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(484 311 508 311), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(508 327 508 311), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(559 327 508 327), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(644 391 559 391), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(644 389 644 391), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(559 129 484 129), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(484 162 484 129), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(725 133 559 133), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(559 129 559 133), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(725 129 802 129), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(802 389 802 129), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(3 337 0 337), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(559 391 559 327), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(802 389 644 389), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(725 133 725 129), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(8 25 8 114), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(8 114 3 114), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(30 25 8 25), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(484 278 395 278), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(30 25 30 5), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(93 5 30 5), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(98 5 93 5), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(104 7 98 5), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(110 10 104 7), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(116 16 110 10), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(119 20 116 16), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(122 28 119 20), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(123 32 122 28), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(123 68 123 32), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(220 68 123 68), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(386 129 386 104), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(386 104 375 99), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(375 99 363 92), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(353 85 363 92), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(220 68 220 34), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(337 70 352 56), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(352 56 358 48), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(358 48 363 39), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(363 39 365 29), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(365 29 348 25), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(348 25 335 22), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(335 22 321 14), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(321 14 300 5), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(300 5 283 1), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(283 1 260 0), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(260 0 246 0), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(246 0 242 2), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(242 2 236 4), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(236 4 231 8), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(231 8 227 13), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(223 17 227 13), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(221 22 223 17), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(220 34 221 22), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(340 360 335 363), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(335 363 331 365), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(331 365 326 366), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(326 366 304 366), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(304 355 304 366), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(395 288 400 288), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(404 288 400 288), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(409 290 404 288), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(413 292 409 290), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(418 297 413 292), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(421 302 418 297), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(422 309 421 302), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(421 318 422 309), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(421 318 417 325), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(417 325 411 330), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(411 330 405 332), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(405 332 397 333), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(397 333 344 333), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(344 333 340 334), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(340 334 336 336), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(336 336 335 338), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(335 338 332 342), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(331 347 332 342), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(332 351 331 347), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(334 354 332 351), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(336 357 334 354), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(341 359 336 357), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(341 359 340 360), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(395 288 395 278), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(304 355 258 355), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(347 80 344 76), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(344 76 337 70), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(349 82 347 80), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(351 84 349 82), -fill => $outline, -tags => ['floor1', 'bg']);
+ $w->create('line', qw(353 85 351 84), -fill => $outline, -tags => ['floor1', 'bg']);
+
+} # end floor_bg1
+
+sub floor_bg2 {
+
+ my ($w, $fill, $outline) = @_;
+
+ $w->create('poly', qw(559 129 484 129 484 162 398 162 398 129 315 129 315 133 176 133 176 129 96 129 96 133 3 133 3 339 0
+ 339 0 391 60 391 60 387 258 387 258 329 350 329 350 311 395 311 395 280 484 280 484 311 508 311 508 327 558 327 558 391
+ 644 391 644 367 802 367 802 129 725 129 725 133 559 133 559 129), -tags => ['floor2', 'bg'], -fill => $fill);
+ $w->create('line', qw(350 311 350 329), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(398 129 398 162), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(802 367 802 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(802 129 725 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(725 133 725 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(559 129 559 133), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(559 133 725 133), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(484 162 484 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(559 129 484 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(802 367 644 367), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(644 367 644 391), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(644 391 558 391), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(558 327 558 391), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(558 327 508 327), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(508 327 508 311), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(484 311 508 311), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(484 280 484 311), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(398 162 484 162), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(484 280 395 280), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(395 280 395 311), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(258 387 60 387), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(3 133 3 339), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(3 339 0 339), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(60 391 0 391), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(0 339 0 391), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(60 387 60 391), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(258 329 258 387), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(350 329 258 329), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(395 311 350 311), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(398 129 315 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(176 133 315 133), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(176 129 96 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(3 133 96 133), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(315 133 315 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(176 133 176 129), -fill => $outline, -tags => ['floor2', 'bg']);
+ $w->create('line', qw(96 133 96 129), -fill => $outline, -tags => ['floor2', 'bg']);
+
+} # end floor_bg2
+
+sub floor_bg3 {
+
+ my ($w, $fill, $outline) = @_;
+
+ $w->create('poly', qw(159 300 107 300 107 248 159 248 159 129 96 129 96 133 21 133 21 331 0 331 0 391 60 391 60 370 159 370
+ 159 300), -tags => ['floor3', 'bg'], -fill => $fill);
+ $w->create('poly', qw(258 370 258 329 350 329 350 311 399 311 399 129 315 129 315 133 176 133 176 129 159 129 159 370 258
+ 370), -tags =>['floor3', 'bg'], -fill => $fill);
+ $w->create('line', qw(96 133 96 129), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(176 129 96 129), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(176 129 176 133), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(315 133 176 133), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(315 133 315 129), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(399 129 315 129), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(399 311 399 129), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(399 311 350 311), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(350 329 350 311), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(350 329 258 329), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(258 370 258 329), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(60 370 258 370), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(60 370 60 391), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(60 391 0 391), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(0 391 0 331), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(21 331 0 331), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(21 331 21 133), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(96 133 21 133), -fill => $outline, -tags => ['floor3', 'bg']);
+ $w->create('line', qw(107 300 159 300 159 248 107 248 107 300), -fill => $outline, -tags => ['floor3', 'bg']);
+
+} # end floor_bg3
+
+sub floor_fg1 {
+
+ my($w, $color, $fl, $fi) = @_;
+
+ my($i);
+ $i = $w->create('polygon', qw(375 246 375 172 341 172 341 246), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 101;
+ $fi->{101} = $i;
+ $w->create('text', qw(358 209), -text => '101', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(307 240 339 240 339 206 307 206), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'Pub Lift1';
+ $fi->{'Pub Lift1'} = $i;
+ $w->create('text', qw(323 223), -text => 'Pub Lift1', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(339 205 307 205 307 171 339 171), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'Priv Lift1';
+ $fi->{'Priv Lift1'} = $i;
+ $w->create('text', qw(323 188), -text => 'Priv Lift1', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(42 389 42 337 1 337 1 389), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 110;
+ $fi->{110} = $i;
+ $w->create('text', qw(21.5 363), -text => '110', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(59 389 59 385 90 385 90 337 44 337 44 389), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 109;
+ $fi->{109} = $i;
+ $w->create('text', qw(67 363), -text => '109', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(51 300 51 253 6 253 6 300), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 111;
+ $fi->{111} = $i;
+ $w->create('text', qw(28.5 276.5), -text => '111', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(98 248 98 309 79 309 79 248), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = '117B';
+ $fi->{'117B'} = $i;
+ $w->create('text', qw(88.5 278.5), -text => '117B', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(51 251 51 204 6 204 6 251), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 112;
+ $fi->{112} = $i;
+ $w->create('text', qw(28.5 227.5), -text => '112', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(6 156 51 156 51 203 6 203), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 113;
+ $fi->{113} = $i;
+ $w->create('text', qw(28.5 179.5), -text => '113', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(85 169 79 169 79 192 85 192), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = '117A';
+ $fi->{'117A'} = $i;
+ $w->create('text', qw(82 180.5), -text => '117A', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(77 302 77 168 53 168 53 302), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 117;
+ $fi->{117} = $i;
+ $w->create('text', qw(65 235), -text => '117', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(51 155 51 115 6 115 6 155), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 114;
+ $fi->{114} = $i;
+ $w->create('text', qw(28.5 135), -text => '114', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(95 115 53 115 53 168 95 168), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 115;
+ $fi->{115} = $i;
+ $w->create('text', qw(74 141.5), -text => '115', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(87 113 87 27 10 27 10 113), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 116;
+ $fi->{116} = $i;
+ $w->create('text', qw(48.5 70), -text => '116', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(89 91 128 91 128 113 89 113), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 118;
+ $fi->{118} = $i;
+ $w->create('text', qw(108.5 102), -text => '118', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(178 128 178 132 216 132 216 91 163 91 163 112 149 112 149 128), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 120;
+ $fi->{120} = $i;
+ $w->create('text', qw(189.5 111.5), -text => '120', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(79 193 87 193 87 169 136 169 136 192 156 192 156 169 175 169 175 246 79 246), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 122;
+ $fi->{122} = $i;
+ $w->create('text', qw(131 207.5), -text => '122', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(138 169 154 169 154 191 138 191), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 121;
+ $fi->{121} = $i;
+ $w->create('text', qw(146 180), -text => '121', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(99 300 126 300 126 309 99 309), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = '106A';
+ $fi->{'106A'} = $i;
+ $w->create('text', qw(112.5 304.5), -text => '106A', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(128 299 128 309 150 309 150 248 99 248 99 299), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 105;
+ $fi->{105} = $i;
+ $w->create('text', qw(124.5 278.5), -text => '105', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(174 309 174 300 152 300 152 309), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = '106B';
+ $fi->{'106B'} = $i;
+ $w->create('text', qw(163 304.5), -text => '106B', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(176 299 176 309 216 309 216 248 152 248 152 299), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 104;
+ $fi->{104} = $i;
+ $w->create('text', qw(184 278.5), -text => '104', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(138 385 138 337 91 337 91 385), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 108;
+ $fi->{108} = $i;
+ $w->create('text', qw(114.5 361), -text => '108', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(256 337 140 337 140 385 256 385), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 107;
+ $fi->{107} = $i;
+ $w->create('text', qw(198 361), -text => '107', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(300 353 300 329 260 329 260 353), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'Smoking';
+ $fi->{Smoking} = $i;
+ $w->create('text', qw(280 341), -text => 'Smoking', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(314 135 314 170 306 170 306 246 177 246 177 135), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 123;
+ $fi->{123} = $i;
+ $w->create('text', qw(245.5 190.5), -text => '123', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(217 248 301 248 301 326 257 326 257 310 217 310), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 103;
+ $fi->{103} = $i;
+ $w->create('text', qw(259 287), -text => '103', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(396 188 377 188 377 169 316 169 316 131 396 131), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 124;
+ $fi->{124} = $i;
+ $w->create('text', qw(356 150), -text => '124', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(397 226 407 226 407 189 377 189 377 246 397 246), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 125;
+ $fi->{125} = $i;
+ $w->create('text', qw(392 217.5), -text => '125', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(399 187 409 187 409 207 474 207 474 164 399 164), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 126;
+ $fi->{126} = $i;
+ $w->create('text', qw(436.5 185.5), -text => '126', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(409 209 409 229 399 229 399 253 486 253 486 239 474 239 474 209), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 127;
+ $fi->{127} = $i;
+ $w->create('text', qw(436.5 231), -text => '127', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(501 164 501 174 495 174 495 188 490 188 490 204 476 204 476 164), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'MShower';
+ $fi->{MShower} = $i;
+ $w->create('text', qw(488.5 184), -text => 'MShower', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(497 176 513 176 513 204 492 204 492 190 497 190), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'Closet';
+ $fi->{Closet} = $i;
+ $w->create('text', qw(502.5 190), -text => 'Closet', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(476 237 476 206 513 206 513 254 488 254 488 237), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'WShower';
+ $fi->{WShower} = $i;
+ $w->create('text', qw(494.5 230), -text => 'WShower', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(486 131 558 131 558 135 724 135 724 166 697 166 697 275 553 275 531 254 515 254 515 174 503 174 503 161 486 161), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 130;
+ $fi->{130} = $i;
+ $w->create('text', qw(638.5 205), -text => '130', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(308 242 339 242 339 248 342 248 342 246 397 246 397 276 393 276 393 309 300 309 300 248 308 248), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 102;
+ $fi->{102} = $i;
+ $w->create('text', qw(367.5 278.5), -text => '102', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(397 255 486 255 486 276 397 276), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 128;
+ $fi->{128} = $i;
+ $w->create('text', qw(441.5 265.5), -text => '128', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(510 309 486 309 486 255 530 255 552 277 561 277 561 325 510 325), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 129;
+ $fi->{129} = $i;
+ $w->create('text', qw(535.5 293), -text => '129', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(696 281 740 281 740 387 642 387 642 389 561 389 561 277 696 277), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 133;
+ $fi->{133} = $i;
+ $w->create('text', qw(628.5 335), -text => '133', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(742 387 742 281 800 281 800 387), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 132;
+ $fi->{132} = $i;
+ $w->create('text', qw(771 334), -text => '132', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(800 168 800 280 699 280 699 168), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 134;
+ $fi->{134} = $i;
+ $w->create('text', qw(749.5 224), -text => '134', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(726 131 726 166 800 166 800 131), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 135;
+ $fi->{135} = $i;
+ $w->create('text', qw(763 148.5), -text => '135', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(340 360 335 363 331 365 326 366 304 366 304 312 396 312 396 288 400 288 404 288 409 290 413 292 418 297 421 302 422 309 421 318 417 325 411 330 405 332 397 333 344 333 340 334 336 336 335 338 332 342 331 347 332 351 334 354 336 357 341 359), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'Ramona Stair';
+ $fi->{'Ramona Stair'} = $i;
+ $w->create('text', qw(368 323), -text => 'Ramona Stair', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(30 23 30 5 93 5 98 5 104 7 110 10 116 16 119 20 122 28 123 32 123 68 220 68 220 87 90 87 90 23), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'University Stair';
+ $fi->{'University Stair'} = $i;
+ $w->create('text', qw(155 77.5), -text => 'University Stair', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(282 37 295 40 312 49 323 56 337 70 352 56 358 48 363 39 365 29 348 25 335 22 321 14 300 5 283 1 260 0 246 0 242 2 236 4 231 8 227 13 223 17 221 22 220 34 260 34), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'Plaza Stair';
+ $fi->{'Plaza Stair'} = $i;
+ $w->create('text', qw(317.5 28.5), -text => 'Plaza Stair', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(220 34 260 34 282 37 295 40 312 49 323 56 337 70 350 83 365 94 377 100 386 104 386 128 220 128), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 'Plaza Deck';
+ $fi->{'Plaza Deck'} = $i;
+ $w->create('text', qw(303 81), -text => 'Plaza Deck', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(257 336 77 336 6 336 6 301 77 301 77 310 257 310), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 106;
+ $fi->{106} = $i;
+ $w->create('text', qw(131.5 318.5), -text => '106', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $i = $w->create('polygon', qw(146 110 162 110 162 91 130 91 130 115 95 115 95 128 114 128 114 151 157 151 157 153 112 153 112 130 97 130 97 168 175 168 175 131 146 131), -fill => undef, -tags => ['floor1', 'room']);
+ $fl->{$i} = 119;
+ $fi->{119} = $i;
+ $w->create('text', qw(143.5 133), -text => '119', -fill => $color, -anchor => 'c', -tags => ['floor1', 'label']);
+ $w->create('line', qw(155 191 155 189), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(155 177 155 169), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(96 129 96 169), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(78 169 176 169), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(176 247 176 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(340 206 307 206), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(340 187 340 170), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(340 210 340 201), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(340 247 340 224), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(340 241 307 241), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(376 246 376 170), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(307 247 307 170), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(376 170 307 170), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(315 129 315 170), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(147 129 176 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(202 133 176 133), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(398 129 315 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(258 352 258 387), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(60 387 60 391), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(0 337 0 391), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(60 391 0 391), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(3 114 3 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(258 387 60 387), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 237 52 273), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 189 52 225), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 140 52 177), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(395 306 395 311), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(531 254 398 254), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(475 178 475 238), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(502 162 398 162), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(398 129 398 188), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(383 188 376 188), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(408 188 408 194), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(398 227 398 254), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(408 227 398 227), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(408 222 408 227), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(408 206 408 210), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(408 208 475 208), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(484 278 484 311), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(484 311 508 311), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(508 327 508 311), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(559 327 508 327), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(644 391 559 391), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(644 389 644 391), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(514 205 475 205), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(496 189 496 187), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(559 129 484 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(484 162 484 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(725 133 559 133), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(559 129 559 133), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(725 149 725 167), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(725 129 802 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(802 389 802 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(739 167 802 167), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(396 188 408 188), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(0 337 9 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(58 337 21 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(43 391 43 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(105 337 75 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(91 387 91 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(154 337 117 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(139 387 139 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(227 337 166 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(258 337 251 337), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(258 328 302 328), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(302 355 302 311), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(395 311 302 311), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(484 278 395 278), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(395 294 395 278), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(473 278 473 275), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(473 256 473 254), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(533 257 531 254), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(553 276 551 274), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(698 276 553 276), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(559 391 559 327), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(802 389 644 389), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(741 314 741 389), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(698 280 698 167), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(707 280 698 280), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(802 280 731 280), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(741 280 741 302), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(698 167 727 167), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(725 137 725 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(514 254 514 175), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(496 175 514 175), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(502 175 502 162), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(475 166 475 162), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(496 176 496 175), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(491 189 496 189), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(491 205 491 189), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(487 238 475 238), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(487 240 487 238), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(487 252 487 254), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(315 133 304 133), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(256 133 280 133), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(78 247 270 247), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(307 247 294 247), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(214 133 232 133), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(217 247 217 266), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(217 309 217 291), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(217 309 172 309), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(154 309 148 309), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(175 300 175 309), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(151 300 175 300), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(151 247 151 309), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(78 237 78 265), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(78 286 78 309), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(106 309 78 309), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(130 309 125 309), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(99 309 99 247), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(127 299 99 299), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(127 309 127 299), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(155 191 137 191), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(137 169 137 191), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(78 171 78 169), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(78 190 78 218), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(86 192 86 169), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(86 192 78 192), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 301 3 301), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 286 52 301), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 252 3 252), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 203 3 203), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(3 156 52 156), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(8 25 8 114), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(63 114 3 114), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(75 114 97 114), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(108 114 129 114), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(129 114 129 89), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(52 114 52 128), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(132 89 88 89), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(88 25 88 89), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(88 114 88 89), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(218 89 144 89), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(147 111 147 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(162 111 147 111), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(162 109 162 111), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(162 96 162 89), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(218 89 218 94), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(218 89 218 119), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(8 25 88 25), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(258 337 258 328), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(113 129 96 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(302 355 258 355), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(386 104 386 129), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(377 100 386 104), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(365 94 377 100), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(350 83 365 94), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(337 70 350 83), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(337 70 323 56), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(312 49 323 56), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(295 40 312 49), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(282 37 295 40), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(260 34 282 37), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(253 34 260 34), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(386 128 386 104), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(113 152 156 152), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(113 152 156 152), -fill => $color, -tags => ['floor1', 'wall']);
+ $w->create('line', qw(113 152 113 129), -fill => $color, -tags => ['floor1', 'wall']);
+
+} # end floor_fg1;
+
+sub floor_fg2 {;
+
+ my($w, $color, $fl, $fi) = @_;
+
+ my($i);
+ $i = $w->create('polygon', qw(748 188 755 188 755 205 758 205 758 222 800 222 800 168 748 168), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 238;
+ $fi->{238} = $i;
+ $w->create('text', qw(774 195), -text => '238', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(726 188 746 188 746 166 800 166 800 131 726 131), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 237;
+ $fi->{237} = $i;
+ $w->create('text', qw(763 148.5), -text => '237', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(497 187 497 204 559 204 559 324 641 324 643 324 643 291 641 291 641 205 696 205 696 291 694 291 694 314 715 314 715 291 715 205 755 205 755 190 724 190 724 187), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 246;
+ $fi->{246} = $i;
+ $w->create('text', qw(600 264), -text => '246', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(694 279 643 279 643 314 694 314), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 247;
+ $fi->{247} = $i;
+ $w->create('text', qw(668.5 296.5), -text => '247', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(232 250 308 250 308 242 339 242 339 246 397 246 397 255 476 255 476 250 482 250 559 250 559 274 482 274 482 278 396 278 396 274 232 274), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 202;
+ $fi->{202} = $i;
+ $w->create('text', qw(285.5 260), -text => '202', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(53 228 53 338 176 338 233 338 233 196 306 196 306 180 175 180 175 169 156 169 156 196 176 196 176 228), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 206;
+ $fi->{206} = $i;
+ $w->create('text', qw(143 267), -text => '206', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(51 277 6 277 6 338 51 338), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 212;
+ $fi->{212} = $i;
+ $w->create('text', qw(28.5 307.5), -text => '212', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(557 276 486 276 486 309 510 309 510 325 557 325), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 245;
+ $fi->{245} = $i;
+ $w->create('text', qw(521.5 300.5), -text => '245', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(560 389 599 389 599 326 560 326), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 244;
+ $fi->{244} = $i;
+ $w->create('text', qw(579.5 357.5), -text => '244', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(601 389 601 326 643 326 643 389), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 243;
+ $fi->{243} = $i;
+ $w->create('text', qw(622 357.5), -text => '243', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(688 316 645 316 645 365 688 365), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 242;
+ $fi->{242} = $i;
+ $w->create('text', qw(666.5 340.5), -text => '242', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(802 367 759 367 759 226 802 226), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 'Barbecue Deck';
+ $fi->{'Barbecue Deck'} = $i;
+ $w->create('text', qw(780.5 296.5), -text => 'Barbecue Deck', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(755 262 755 314 717 314 717 262), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 240;
+ $fi->{240} = $i;
+ $w->create('text', qw(736 288), -text => '240', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(755 316 689 316 689 365 755 365), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 241;
+ $fi->{241} = $i;
+ $w->create('text', qw(722 340.5), -text => '241', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(755 206 717 206 717 261 755 261), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 239;
+ $fi->{239} = $i;
+ $w->create('text', qw(736 233.5), -text => '239', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(695 277 643 277 643 206 695 206), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 248;
+ $fi->{248} = $i;
+ $w->create('text', qw(669 241.5), -text => '248', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(676 135 676 185 724 185 724 135), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 236;
+ $fi->{236} = $i;
+ $w->create('text', qw(700 160), -text => '236', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(675 135 635 135 635 145 628 145 628 185 675 185), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 235;
+ $fi->{235} = $i;
+ $w->create('text', qw(651.5 160), -text => '235', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(626 143 633 143 633 135 572 135 572 143 579 143 579 185 626 185), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 234;
+ $fi->{234} = $i;
+ $w->create('text', qw(606 160), -text => '234', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(557 135 571 135 571 145 578 145 578 185 527 185 527 131 557 131), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 233;
+ $fi->{233} = $i;
+ $w->create('text', qw(552.5 158), -text => '233', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(476 249 557 249 557 205 476 205), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 230;
+ $fi->{230} = $i;
+ $w->create('text', qw(516.5 227), -text => '230', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(476 164 486 164 486 131 525 131 525 185 476 185), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 232;
+ $fi->{232} = $i;
+ $w->create('text', qw(500.5 158), -text => '232', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(476 186 495 186 495 204 476 204), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 229;
+ $fi->{229} = $i;
+ $w->create('text', qw(485.5 195), -text => '229', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(474 207 409 207 409 187 399 187 399 164 474 164), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 227;
+ $fi->{227} = $i;
+ $w->create('text', qw(436.5 185.5), -text => '227', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(399 228 399 253 474 253 474 209 409 209 409 228), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 228;
+ $fi->{228} = $i;
+ $w->create('text', qw(436.5 231), -text => '228', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(397 246 397 226 407 226 407 189 377 189 377 246), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 226;
+ $fi->{226} = $i;
+ $w->create('text', qw(392 217.5), -text => '226', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(377 169 316 169 316 131 397 131 397 188 377 188), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 225;
+ $fi->{225} = $i;
+ $w->create('text', qw(356.5 150), -text => '225', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(234 198 306 198 306 249 234 249), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 224;
+ $fi->{224} = $i;
+ $w->create('text', qw(270 223.5), -text => '224', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(270 179 306 179 306 170 314 170 314 135 270 135), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 223;
+ $fi->{223} = $i;
+ $w->create('text', qw(292 157), -text => '223', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(268 179 221 179 221 135 268 135), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 222;
+ $fi->{222} = $i;
+ $w->create('text', qw(244.5 157), -text => '222', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(177 179 219 179 219 135 177 135), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 221;
+ $fi->{221} = $i;
+ $w->create('text', qw(198 157), -text => '221', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(299 327 349 327 349 284 341 284 341 276 299 276), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 204;
+ $fi->{204} = $i;
+ $w->create('text', qw(324 301.5), -text => '204', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(234 276 297 276 297 327 257 327 257 338 234 338), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 205;
+ $fi->{205} = $i;
+ $w->create('text', qw(265.5 307), -text => '205', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(256 385 256 340 212 340 212 385), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 207;
+ $fi->{207} = $i;
+ $w->create('text', qw(234 362.5), -text => '207', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(210 340 164 340 164 385 210 385), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 208;
+ $fi->{208} = $i;
+ $w->create('text', qw(187 362.5), -text => '208', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(115 340 162 340 162 385 115 385), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 209;
+ $fi->{209} = $i;
+ $w->create('text', qw(138.5 362.5), -text => '209', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(89 228 89 156 53 156 53 228), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 217;
+ $fi->{217} = $i;
+ $w->create('text', qw(71 192), -text => '217', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(89 169 97 169 97 190 89 190), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = '217A';
+ $fi->{'217A'} = $i;
+ $w->create('text', qw(93 179.5), -text => '217A', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(89 156 89 168 95 168 95 135 53 135 53 156), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 216;
+ $fi->{216} = $i;
+ $w->create('text', qw(71 145.5), -text => '216', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(51 179 51 135 6 135 6 179), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 215;
+ $fi->{215} = $i;
+ $w->create('text', qw(28.5 157), -text => '215', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(51 227 6 227 6 180 51 180), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 214;
+ $fi->{214} = $i;
+ $w->create('text', qw(28.5 203.5), -text => '214', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(51 275 6 275 6 229 51 229), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 213;
+ $fi->{213} = $i;
+ $w->create('text', qw(28.5 252), -text => '213', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(114 340 67 340 67 385 114 385), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 210;
+ $fi->{210} = $i;
+ $w->create('text', qw(90.5 362.5), -text => '210', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(59 389 59 385 65 385 65 340 1 340 1 389), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 211;
+ $fi->{211} = $i;
+ $w->create('text', qw(33 364.5), -text => '211', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(393 309 350 309 350 282 342 282 342 276 393 276), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 203;
+ $fi->{203} = $i;
+ $w->create('text', qw(367.5 292.5), -text => '203', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(99 191 91 191 91 226 174 226 174 198 154 198 154 192 109 192 109 169 99 169), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 220;
+ $fi->{220} = $i;
+ $w->create('text', qw(132.5 208.5), -text => '220', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(339 205 307 205 307 171 339 171), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 'Priv Lift2';
+ $fi->{'Priv Lift2'} = $i;
+ $w->create('text', qw(323 188), -text => 'Priv Lift2', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(307 240 339 240 339 206 307 206), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 'Pub Lift2';
+ $fi->{'Pub Lift2'} = $i;
+ $w->create('text', qw(323 223), -text => 'Pub Lift2', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(175 168 97 168 97 131 175 131), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 218;
+ $fi->{218} = $i;
+ $w->create('text', qw(136 149.5), -text => '218', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(154 191 111 191 111 169 154 169), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 219;
+ $fi->{219} = $i;
+ $w->create('text', qw(132.5 180), -text => '219', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $i = $w->create('polygon', qw(375 246 375 172 341 172 341 246), -fill => undef, -tags => ['floor2', 'room']);
+ $fl->{$i} = 201;
+ $fi->{201} = $i;
+ $w->create('text', qw(358 209), -text => '201', -fill => $color, -anchor => 'c', -tags => ['floor2', 'label']);
+ $w->create('line', qw(641 186 678 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 350 757 367), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(634 133 634 144), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(634 144 627 144), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(572 133 572 144), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(572 144 579 144), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(398 129 398 162), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(174 197 175 197), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(175 197 175 227), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 206 757 221), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(396 188 408 188), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(727 189 725 189), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(747 167 802 167), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(747 167 747 189), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(755 189 739 189), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(769 224 757 224), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(802 224 802 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(802 129 725 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(725 189 725 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(725 186 690 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(676 133 676 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(627 144 627 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(629 186 593 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(579 144 579 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(559 129 559 133), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(725 133 559 133), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(484 162 484 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(559 129 484 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(526 129 526 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(540 186 581 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(528 186 523 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(511 186 475 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(496 190 496 186), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(496 205 496 202), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(475 205 527 205), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(558 205 539 205), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(558 205 558 249), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(558 249 475 249), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(662 206 642 206), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(695 206 675 206), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(695 278 642 278), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(642 291 642 206), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(695 291 695 206), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(716 208 716 206), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 206 716 206), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 221 757 224), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(793 224 802 224), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 262 716 262), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(716 220 716 264), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(716 315 716 276), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 315 703 315), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 325 757 224), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(757 367 644 367), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(689 367 689 315), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(647 315 644 315), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(659 315 691 315), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(600 325 600 391), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(627 325 644 325), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(644 391 644 315), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(615 325 575 325), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(644 391 558 391), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(563 325 558 325), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(558 391 558 314), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(558 327 508 327), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(558 275 484 275), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(558 302 558 275), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(508 327 508 311), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(484 311 508 311), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(484 275 484 311), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(475 208 408 208), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(408 206 408 210), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(408 222 408 227), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(408 227 398 227), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(398 227 398 254), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(408 188 408 194), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(383 188 376 188), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(398 188 398 162), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(398 162 484 162), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(475 162 475 254), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(398 254 475 254), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(484 280 395 280), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(395 311 395 275), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(307 197 293 197), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(278 197 233 197), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(233 197 233 249), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(307 179 284 179), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(233 249 278 249), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(269 179 269 133), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(220 179 220 133), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(155 191 110 191), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(90 190 98 190), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(98 169 98 190), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(52 133 52 165), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(52 214 52 177), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(52 226 52 262), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(52 274 52 276), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(234 275 234 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(226 339 258 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(211 387 211 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(214 339 177 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(258 387 60 387), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(3 133 3 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(165 339 129 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(117 339 80 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(68 339 59 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(0 339 46 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(60 391 0 391), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(0 339 0 391), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(60 387 60 391), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(258 329 258 387), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(350 329 258 329), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(395 311 350 311), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(398 129 315 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(176 133 315 133), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(176 129 96 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(3 133 96 133), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(66 387 66 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(115 387 115 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(163 387 163 339), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(234 275 276 275), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(288 275 309 275), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(298 275 298 329), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(341 283 350 283), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(321 275 341 275), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(375 275 395 275), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(315 129 315 170), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(376 170 307 170), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(307 250 307 170), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(376 245 376 170), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(340 241 307 241), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(340 245 340 224), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(340 210 340 201), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(340 187 340 170), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(340 206 307 206), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(293 250 307 250), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(271 179 238 179), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(226 179 195 179), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(176 129 176 179), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(182 179 176 179), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(174 169 176 169), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(162 169 90 169), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(96 169 96 129), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(175 227 90 227), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(90 190 90 227), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(52 179 3 179), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(52 228 3 228), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(52 276 3 276), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(155 177 155 169), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(110 191 110 169), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(155 189 155 197), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(350 283 350 329), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(162 197 155 197), -fill => $color, -tags => ['floor2', 'wall']);
+ $w->create('line', qw(341 275 341 283), -fill => $color, -tags => ['floor2', 'wall']);
+
+} # end floor_fg2;
+
+sub floor_fg3 {;
+
+ my($w, $color, $fl, $fi) = @_;
+
+ my($i);
+ $i = $w->create('polygon', qw(89 228 89 180 70 180 70 228), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 316;
+ $fi->{316} = $i;
+ $w->create('text', qw(79.5 204), -text => '316', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(115 368 162 368 162 323 115 323), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 309;
+ $fi->{309} = $i;
+ $w->create('text', qw(138.5 345.5), -text => '309', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(164 323 164 368 211 368 211 323), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 308;
+ $fi->{308} = $i;
+ $w->create('text', qw(187.5 345.5), -text => '308', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(256 368 212 368 212 323 256 323), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 307;
+ $fi->{307} = $i;
+ $w->create('text', qw(234 345.5), -text => '307', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(244 276 297 276 297 327 260 327 260 321 244 321), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 305;
+ $fi->{305} = $i;
+ $w->create('text', qw(270.5 301.5), -text => '305', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(251 219 251 203 244 203 244 219), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = '324B';
+ $fi->{'324B'} = $i;
+ $w->create('text', qw(247.5 211), -text => '324B', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(251 249 244 249 244 232 251 232), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = '324A';
+ $fi->{'324A'} = $i;
+ $w->create('text', qw(247.5 240.5), -text => '324A', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(223 135 223 179 177 179 177 135), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 320;
+ $fi->{320} = $i;
+ $w->create('text', qw(200 157), -text => '320', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(114 368 114 323 67 323 67 368), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 310;
+ $fi->{310} = $i;
+ $w->create('text', qw(90.5 345.5), -text => '310', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(23 277 23 321 68 321 68 277), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 312;
+ $fi->{312} = $i;
+ $w->create('text', qw(45.5 299), -text => '312', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(23 229 68 229 68 275 23 275), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 313;
+ $fi->{313} = $i;
+ $w->create('text', qw(45.5 252), -text => '313', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(68 227 23 227 23 180 68 180), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 314;
+ $fi->{314} = $i;
+ $w->create('text', qw(45.5 203.5), -text => '314', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(95 179 95 135 23 135 23 179), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 315;
+ $fi->{315} = $i;
+ $w->create('text', qw(59 157), -text => '315', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(99 226 99 204 91 204 91 226), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = '316B';
+ $fi->{'316B'} = $i;
+ $w->create('text', qw(95 215), -text => '316B', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(91 202 99 202 99 180 91 180), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = '316A';
+ $fi->{'316A'} = $i;
+ $w->create('text', qw(95 191), -text => '316A', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(97 169 109 169 109 192 154 192 154 198 174 198 174 226 101 226 101 179 97 179), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 319;
+ $fi->{319} = $i;
+ $w->create('text', qw(141.5 209), -text => '319', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(65 368 58 368 58 389 1 389 1 333 23 333 23 323 65 323), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 311;
+ $fi->{311} = $i;
+ $w->create('text', qw(29.5 361), -text => '311', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(154 191 111 191 111 169 154 169), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 318;
+ $fi->{318} = $i;
+ $w->create('text', qw(132.5 180), -text => '318', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(175 168 97 168 97 131 175 131), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 317;
+ $fi->{317} = $i;
+ $w->create('text', qw(136 149.5), -text => '317', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(274 194 274 221 306 221 306 194), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 323;
+ $fi->{323} = $i;
+ $w->create('text', qw(290 207.5), -text => '323', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(306 222 274 222 274 249 306 249), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 325;
+ $fi->{325} = $i;
+ $w->create('text', qw(290 235.5), -text => '325', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(263 179 224 179 224 135 263 135), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 321;
+ $fi->{321} = $i;
+ $w->create('text', qw(243.5 157), -text => '321', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(314 169 306 169 306 192 273 192 264 181 264 135 314 135), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 322;
+ $fi->{322} = $i;
+ $w->create('text', qw(293.5 163.5), -text => '322', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(307 240 339 240 339 206 307 206), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 'Pub Lift3';
+ $fi->{'Pub Lift3'} = $i;
+ $w->create('text', qw(323 223), -text => 'Pub Lift3', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(339 205 307 205 307 171 339 171), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 'Priv Lift3';
+ $fi->{'Priv Lift3'} = $i;
+ $w->create('text', qw(323 188), -text => 'Priv Lift3', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(350 284 376 284 376 276 397 276 397 309 350 309), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 303;
+ $fi->{303} = $i;
+ $w->create('text', qw(373.5 292.5), -text => '303', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(272 203 272 249 252 249 252 230 244 230 244 221 252 221 252 203), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 324;
+ $fi->{324} = $i;
+ $w->create('text', qw(262 226), -text => '324', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(299 276 299 327 349 327 349 284 341 284 341 276), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 304;
+ $fi->{304} = $i;
+ $w->create('text', qw(324 301.5), -text => '304', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(375 246 375 172 341 172 341 246), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 301;
+ $fi->{301} = $i;
+ $w->create('text', qw(358 209), -text => '301', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(397 246 377 246 377 185 397 185), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 327;
+ $fi->{327} = $i;
+ $w->create('text', qw(387 215.5), -text => '327', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(316 131 316 169 377 169 377 185 397 185 397 131), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 326;
+ $fi->{326} = $i;
+ $w->create('text', qw(356.5 150), -text => '326', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(308 251 242 251 242 274 342 274 342 282 375 282 375 274 397 274 397 248 339 248 339 242 308 242), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 302;
+ $fi->{302} = $i;
+ $w->create('text', qw(319.5 261), -text => '302', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $i = $w->create('polygon', qw(70 321 242 321 242 200 259 200 259 203 272 203 272 193 263 180 242 180 175 180 175 169 156 169 156 196 177 196 177 228 107 228 70 228 70 275 107 275 107 248 160 248 160 301 107 301 107 275 70 275), -fill => undef, -tags => ['floor3', 'room']);
+ $fl->{$i} = 306;
+ $fi->{306} = $i;
+ $w->create('text', qw(200.5 284.5), -text => '306', -fill => $color, -anchor => 'c', -tags => ['floor3', 'label']);
+ $w->create('line', qw(341 275 341 283), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(162 197 155 197), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(396 247 399 247), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(399 129 399 311), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(258 202 243 202), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(350 283 350 329), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(251 231 243 231), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(243 220 251 220), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(243 250 243 202), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(155 197 155 190), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(110 192 110 169), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(155 192 110 192), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(155 177 155 169), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(176 197 176 227), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(69 280 69 274), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(21 276 69 276), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(69 262 69 226), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(21 228 69 228), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(21 179 75 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(69 179 69 214), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(90 220 90 227), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(90 204 90 202), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(90 203 100 203), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(90 187 90 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(90 227 176 227), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(100 179 100 227), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(100 179 87 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(96 179 96 129), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(162 169 96 169), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(173 169 176 169), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(182 179 176 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(176 129 176 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(195 179 226 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(224 133 224 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(264 179 264 133), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(238 179 264 179), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(273 207 273 193), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(273 235 273 250), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(273 224 273 219), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(273 193 307 193), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(273 222 307 222), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(273 250 307 250), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(384 247 376 247), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(340 206 307 206), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(340 187 340 170), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(340 210 340 201), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(340 247 340 224), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(340 241 307 241), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(376 247 376 170), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(307 250 307 170), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(376 170 307 170), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(315 129 315 170), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(376 283 366 283), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(376 283 376 275), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(399 275 376 275), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(341 275 320 275), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(341 283 350 283), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(298 275 298 329), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(308 275 298 275), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(243 322 243 275), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(243 275 284 275), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(258 322 226 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(212 370 212 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(214 322 177 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(163 370 163 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(165 322 129 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(84 322 117 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(71 322 64 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(115 322 115 370), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(66 322 66 370), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(52 322 21 322), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(21 331 0 331), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(21 331 21 133), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(96 133 21 133), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(176 129 96 129), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(315 133 176 133), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(315 129 399 129), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(399 311 350 311), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(350 329 258 329), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(258 322 258 370), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(60 370 258 370), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(60 370 60 391), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(0 391 0 331), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(60 391 0 391), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(307 250 307 242), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(273 250 307 250), -fill => $color, -tags => ['floor3', 'wall']);
+ $w->create('line', qw(258 250 243 250), -fill => $color, -tags => ['floor3', 'wall']);
+
+} # end floor_fg3;
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form.pl
new file mode 100644
index 00000000000..bd60ef91475
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form.pl
@@ -0,0 +1,31 @@
+# form.pl
+
+use vars qw/$TOP/;
+
+sub form {
+
+ # Create a top-level window that displays a bunch of entries with
+ # tabs set up to move between them.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This window contains a simple form where you can type in the various entries and use tabs to move circularly between the entries.',
+ -title => 'Form Demonstration',
+ -iconname => 'form',
+ );
+ my $f = $TOP->Frame->pack(-fill => 'both');
+ my $row = 0;
+ foreach ('Name:', 'Address:', '', '', 'Phone:') {
+ my $e = $f->Entry(qw/-relief sunken -width 40/);
+ my $l = $f->Label(-text => $_, -anchor => 'e', -justify => 'right');
+ $l->grid(-row => $row, -column => 0, -sticky => 'e');
+ $e->grid(-row => $row++, -column => 1,-sticky => 'ew');
+ $f->gridRowconfigure(1,-weight => 1);
+ $e->focus if $_ eq 'Name:';
+ }
+ $TOP->bind('<Return>' => [$TOP => 'destroy']);
+
+} # end form
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form_mgr.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form_mgr.pl
new file mode 100644
index 00000000000..1a328f94c53
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/form_mgr.pl
@@ -0,0 +1,21 @@
+# Form, window management by Tix->form.
+
+use Tk;
+
+my $Main = MainWindow->new();
+
+my $box4 = $Main->Label(-text => 'box4', -borderwidth => 1, -relief => "raised");
+my $box1 = $Main->Label(-text => 'box1',-borderwidth => 1, -relief => "raised");
+my $box2 = $Main->Label(-text => 'box2',-borderwidth => 1, -relief => "raised");
+my $box3 = $Main->Label(-text => 'box3',-borderwidth => 1, -relief => "raised");
+
+$box1->form(-top => '%0', -left => '%0', -right => '%100');
+$box2->form(-top => $box1, -left => '%0', -right => '%50', -bottom =>
+$box4);
+$box3->form(-top => $box1, -left => $box2, -right => '%100', -bottom =>
+$box4);
+$box4->form(-left => '%0', -right => '%100', -bottom => '%100');
+
+MainLoop;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hello.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hello.pl
new file mode 100644
index 00000000000..08b1a8b52ec
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hello.pl
@@ -0,0 +1,51 @@
+# hello.pl
+
+use Config;
+use Tk::widgets qw/ ROText /;
+use vars qw/ $TOP /;
+use strict;
+
+sub hello {
+
+ my( $demo ) = @_;
+
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => [ "This demonstration describes the basics of Perl/Tk programming. Besides this small user guide, there are various FAQs and other resources and tutorials available on the web, such as:
+
+http://phaseit.net/claird/comp.lang.perl.tk/ptkFAQ.html
+http://www.perltk.org
+http://user.cs.tu-berlin.de/~eserte
+http://www.lehigh.edu/sol0/ptk
+", -wraplength => '7i' ],
+ -title => 'Perl/Tk User Guide',
+ -iconname => 'hello',
+ );
+
+ # Pipe perldoc help output via fileevent() into a Scrolled ROText widget.
+
+ my $t = $TOP->Scrolled(
+ qw/ ROText -width 80 -height 25 -wrap none -scrollbars osoe/,
+ );
+ $t->focus;
+ my $cmd = $Config{installbin} . '/perldoc -t Tk::UserGuide';
+ $t->pack( qw/ -expand 1 -fill both / );
+
+ open( H, "$cmd|" ) or die "Cannot get pTk user guide: $!";
+ $TOP->fileevent( \*H, 'readable' => [ \&hello_fill, $t ] );
+
+} # end hello
+
+sub hello_fill {
+
+ my( $t ) = @_;
+
+ my $stat = sysread H, my $data, 4096;
+ die "sysread error: $!" unless defined $stat;
+ if( $stat == 0 ) { # EOF
+ $TOP->fileevent( \*H, 'readable' => '' );
+ return;
+ }
+ $t->insert( 'end', $data );
+
+} # end hello_fill
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hscale.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hscale.pl
new file mode 100644
index 00000000000..dcfd1437139
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/hscale.pl
@@ -0,0 +1,48 @@
+# hscale.pl
+
+use subs qw /hscale_width/;
+use vars qw/$TOP/;
+
+sub hscale {
+
+ # Create a top-level window that displays a horizontal scale.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'An arrow and a horizontal scale are displayed below. If you click or drag mouse button 1 in the scale, you can change the size of the arrow.',
+ -title => 'Horizontal Scale Demonstration',
+ -iconname => 'hscale',
+ );
+
+ my $frame = $TOP->Frame(-borderwidth => 10)->pack(qw/-side top -fill x/);
+
+ my $canvas = $frame->Canvas(
+ qw/width 50 -height 50 -bd 0 -highlightthickness 0/);
+ $canvas->createPolygon(qw/0 0 1 1 2 2 -fill DeepSkyBlue3 -tags poly/);
+ $canvas->createLine (qw/0 0 1 1 2 2 0 0 -fill black -tags line/);
+
+ my $scale = $frame->Scale(qw/-orient horizontal -length 284 -from 0
+ -to 250 -tickinterval 50 -command/ => [\&hscale_width, $canvas]);
+ $scale->set(75);
+
+ $canvas->pack(qw/-side top -expand yes -anchor w -fill x/);
+ $scale->pack(qw/-side bottom -expand yes -anchor w/);
+
+} # end hscale
+
+sub hscale_width {
+
+ my($w, $width) = @_;
+
+ $width += 21;
+ my $x2 = $width - 30;
+ $x2 = 21 if $x2 < 21;
+ $w->coords('poly', 20, 15, 20, 35, $x2, 35, $x2, 45, $width, 25, $x2, 5,
+ $x2, 15, 20, 15);
+ $w->coords('line', 20, 15, 20, 35, $x2, 35, $x2, 45, $width, 25, $x2, 5,
+ $x2, 15, 20, 15);
+
+} # end hscale_width
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/icon.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/icon.pl
new file mode 100644
index 00000000000..876f1181baa
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/icon.pl
@@ -0,0 +1,64 @@
+# icon.pl
+
+use vars qw/$TOP/;
+
+sub icon {
+
+ # Create a top-level window that displays a bunch of iconic buttons.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['This window shows three ways of using bitmaps or images in radiobuttons and checkbuttons. On the left are two radiobuttons, each of which displays a bitmap and an indicator. In the middle is a checkbutton that displays a different image depending on whether it is selected or not. On the right is a checkbutton that displays a single bitmap but changes its background color to indicate whether or not it is selected.', qw/-wraplength 5i/],
+ -title => 'Iconic Button Demonstration',
+ -iconname => 'icon',
+ );
+
+ $TOP->Bitmap('flagup',
+ -file => Tk->findINC('demos/images/flagup'),
+ -maskfile => Tk->findINC('demos/images/flagup'),
+ );
+ $TOP->Bitmap('flagdown',
+ -file => Tk->findINC('demos/images/flagdown'),
+ -maskfile => Tk->findINC('demos/images/flagdown'),
+ );
+
+ my $frame = $TOP->Frame(qw/-borderwidth 10/);
+ $frame->pack(qw/-side top/);
+
+ my(@pl) = qw/-side left -expand yes -padx 5m/;
+ my $frame_left = $frame->Frame;
+ $frame_left->pack(@pl);
+
+ my $frame_b1 = $frame->Checkbutton(
+ -image => 'flagdown',
+ -selectimage => 'flagup',
+ -indicatoron => 0,
+ );
+ $frame_b1->pack(@pl);
+ $frame_b1->configure(-selectcolor => $frame_b1->cget(-background));
+ my $frame_b2 = $frame->Checkbutton(
+ -bitmap => '@' . Tk->findINC('demos/images/letters'),
+ -indicatoron => 0,
+ -selectcolor => 'SeaGreen1',
+ );
+ $frame_b2->pack(@pl);
+
+ my $letters = '';
+ @pl = qw/-side top -expand yes/;
+ my $frame_left_b3 = $frame_left->Radiobutton(
+ -bitmap => '@' . Tk->findINC('demos/images/letters'),
+ -variable => \$letters,
+ -value => 'full',
+ );
+ $frame_left_b3->pack(@pl);
+ my $frame_left_b4 = $frame_left->Radiobutton(
+ -bitmap => '@' . Tk->findINC('demos/images/noletters'),
+ -variable => \$letters,
+ -value => 'empty',
+ );
+ $frame_left_b4->pack(@pl);
+
+} # end icon
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl
new file mode 100644
index 00000000000..61e6ec61b77
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image1.pl
@@ -0,0 +1,28 @@
+# image1.pl
+
+use vars qw/$TOP/;
+
+sub image1 {
+
+ # This demonstration script displays two image widgets.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This demonstration displays two images, each in a separate label widget.',
+ -title => 'Image Demonstration #1',
+ -iconname => 'image1',
+ );
+
+ my(@pl) = qw/-side top -padx .5m -pady .5m/;
+ $TOP->Photo('image1a', -file => Tk->findINC('demos/images/earth.gif'));
+ $TOP->Label(-image => 'image1a')->pack(@pl);
+
+ $TOP->Photo('image1b', -file => Tk->findINC('demos/images/earthris.gif'));
+ $TOP->Label(-image => 'image1b')->pack(@pl);
+
+} # end image1
+
+1;
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image2.pl
new file mode 100644
index 00000000000..fd318895254
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/image2.pl
@@ -0,0 +1,104 @@
+# image2.pl
+
+use File::Basename;
+use subs qw/image2_load_dir image2_load_image/;
+use vars qw/$TOP/;
+
+sub image2 {
+
+ # This demonstration script creates a simple collection of widgets
+ # that allow you to select and view images in a Tk label.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This demonstration allows you to view images using a Tk "photo" image. First type a directory name in the listbox, then type Return to load the directory into the listbox. Then double-click on a file name in the listbox to see that image.',
+ -title => 'Image Demonstration #2',
+ -iconname => 'image2',
+ );
+
+ my $dir_label = $TOP->Label(-text => 'Directory:');
+ my $demo_img = Tk->findINC('demos/images');
+ my $dir_name = $TOP->Entry(-width => 30, -textvariable => \$demo_img);
+ my $frog0 = $TOP->Frame;
+ my $frog = $frog0->Frame;
+ my $file_label = $frog->Label(-text => 'File:');
+ my $f = $frog->Frame;
+ my(@pl) = qw/-side top -anchor w/;
+ $dir_label->pack(@pl);
+ $dir_name->pack(@pl);
+
+ # All these "frog" and "toad" frames are just to repackage the listbox
+ # and image side by side so they fit within an SVGA screen.
+
+ $frog0->pack;
+ $frog->pack(qw/-side left/);
+ my $toad = $frog0->Frame;
+ $toad->pack(qw/-side right/);
+ $file_label->pack(@pl);
+ $f->pack(@pl);
+
+ my $f_list = $f->Listbox(-width => 20, -height => 10);
+ $dir_name->bind('<Return>' => [\&image2_load_dir, $f_list, \$demo_img]);
+ my $f_scroll = $f->Scrollbar(-command => [$f_list => 'yview']);
+ $f_list->configure(-yscrollcommand => [$f_scroll => 'set']);
+ @pl = qw/-side left -fill y -expand 1/;
+ $f_list->pack(@pl);
+ $f_scroll->pack(@pl);
+ $f_list->insert(0, qw(earth.gif earthris.gif mickey.gif teapot.ppm));
+
+ my $image2a = $TOP->Photo;
+ $f_list->bind('<Double-1>' => [\&image2_load_image, $image2a, \$demo_img]);
+ my $image_label = $toad->Label(-text => 'Image:');
+ my $image = $toad->Label(-image => $image2a);
+ @pl = qw/-side top -anchor w/;
+ $image_label->pack(@pl);
+ $image->pack(@pl);
+
+} # end image2
+
+sub image2_load_dir {
+
+ # This procedure reloads the directory listbox from the directory
+ # named in the demo's entry.
+ #
+ # Arguments:
+ # e - Reference to entry widget.
+ # l - Reference to listbox widget.
+ # dir_name - Directory name reference.
+
+ my($e, $l, $dir_name) = @_;
+
+ $l->delete(0, 'end');
+ my $i;
+ local *DIR;
+ opendir DIR, $$dir_name;
+ foreach $i (sort readdir DIR) {
+ $l->insert('end', $i);
+ }
+ closedir DIR;
+
+} # end image2_load_dir
+
+sub image2_load_image {
+
+ # Given the name of the toplevel window of the demo and the mouse
+ # position, extracts the directory entry under the mouse and loads
+ # that file into a photo image for display.
+ #
+ # Arguments:
+ # l - Reference to listbox widget.
+ # i - Reference to image object.
+ # dir_name - Directory name reference.
+
+ my($l, $i, $dir_name) = @_;
+
+ my $e = $l->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ $i->configure(-file => "$$dir_name/" . $l->get("\@$x,$y"));
+
+ # NOTE: $l->get('active') works just as well.
+
+} # end image2_load_image
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/items.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/items.pl
new file mode 100644
index 00000000000..c720821babb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/items.pl
@@ -0,0 +1,358 @@
+# items.pl
+
+use subs qw/items_button_press items_drag items_enter items_leave items_mark
+ items_start_drag items_stroke items_under_area/;
+use vars qw/$TOP/;
+
+sub items {
+
+ # Create a top-level window containing a canvas that displays the various
+ # item types and allows them to be selected and moved.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ["This window contains a canvas widget with examples of the various kinds of items supported by canvases. The following operations are supported:\n Button-1 drag:\tmoves item under pointer.\n Button-2 drag:\trepositions view.\n Button-3 drag:\tstrokes out area.\n Ctrl+f:\t\tdisplays items under area.", qw/-wraplength 5i/],
+ -title => 'Canvas Item Demonstration',
+ -iconname => 'items',
+ );
+
+ my $c = $TOP->Scrolled(qw/Canvas -width 15c -height 10c -relief sunken
+ -borderwidth 2 -scrollbars se -scrollregion/ =>
+ [qw/0c 0c 30c 24c/]);
+ $c->pack(qw/-expand yes -fill both/);
+
+ my %iinfo = (); # item information hash
+ $iinfo{areaX1} = 0;
+ $iinfo{areaY1} = 0;
+ $iinfo{areaX2} = 0;
+ $iinfo{areaY2} = 0;
+ $iinfo{restore_cmd} = '';
+
+
+ if ($Tk::VERSION cmp '800.015') {
+ # Display a 3x3 rectangular grid (800.016 or greater).
+ $c->createGrid(qw/0c 0c 10c 8c -width 2 -lines 1/);
+ $c->createGrid(qw/0c 0c 5c 4c -lines 1 -dash ./);
+ $c->createGrid(qw/0c 0c 10m 8m -width 1/);
+ } else {
+ # Display a 3x3 rectangular grid.
+ $c->createRectangle(qw/ 0c 0c 30c 24c -width 2/);
+ $c->createLine (qw/ 0c 8c 30c 8c -width 2/);
+ $c->createLine (qw/ 0c 16c 30c 16c -width 2/);
+ $c->createLine (qw/10c 0c 10c 24c -width 2/);
+ $c->createLine (qw/20c 0c 20c 24c -width 2/);
+ }
+
+ my $font1 = '-*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*';
+ my $font2 = '-*-Helvetica-Bold-R-Normal--*-240-*-*-*-*-*-*';
+ my($blue, $red, $bisque, $green);
+ if ($TOP->depth > 1) {
+ $blue = 'DeepSkyBlue3';
+ $red = 'red';
+ $bisque = 'bisque3';
+ $green = 'SeaGreen3';
+ } else {
+ $blue = 'black';
+ $red = 'black';
+ $bisque = 'black';
+ $green = 'black';
+ }
+
+ # Set up demos within each of the areas of the grid.
+
+ $c->createText(qw/5c .2c -text Lines -anchor n/);
+ $c->createLine(qw/1c 1c 3c 1c 1c 4c 3c 4c -width 2m/, -fill => $blue,
+ qw/-cap butt -join miter -tags item/);
+ $c->createLine(qw/4.67c 1c 4.67c 4c -arrow last -activedash - -tags item/);
+ $c->createLine(qw/6.33c 1c 6.33c 4c -arrow both -activedash . -tags item/);
+ $c->createLine(qw/5c 6c 9c 6c 9c 1c 8c 1c 8c 4.8c 8.8c 4.8c 8.8c 1.2c
+ 8.2c 1.2c 8.2c 4.6c 8.6c 4.6c 8.6c 1.4c 8.4c 1.4c
+ 8.4c 4.4c -width 3 -tags item -fill/ => $red);
+ $c->createLine(qw/1c 5c 7c 5c 7c 7c 9c 7c -width .5c/,
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ qw/-arrow both -tags item -arrowshape/ => [15, 15, 7]);
+ $c->createLine(qw/1c 7c 1.75c 5.8c 2.5c 7c 3.25c 5.8c 4c 7c -width .5c
+ -cap round -join round -tags item/);
+
+ $c->createText(qw/15c .2c -anchor n -text/ => 'Curves (smoothed lines)');
+ $c->createLine(qw/11c 4c 11.5c 1c 13.5c 1c 14c 4c -smooth on/,
+ -fill =>$blue, qw/-tags item/);
+ $c->createLine(qw/15.5c 1c 19.5c 1.5c 15.5c 4.5c 19.5c 4c -smooth on
+ -arrow both -width 3 -tags item/);
+ $c->createLine(qw/12c 6c 13.5c 4.5c 16.5c 7.5c 18c 6c 16.5c 4.5c 13.5c
+ 7.5c 12c 6c -smooth on -width 3m -cap round -tags item/,
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ -fill => $red);
+
+ $c->createText(qw/25c .2c -text Polygons -anchor n/);
+ $c->createPolygon(qw/21c 1.0c 22.5c 1.75c 24c 1.0c 23.25c 2.5c 24c 4.0c
+ 22.5c 3.25c 21c 4.0c 21.75c 2.5c -tags item/,
+ -fill => $green);
+ $c->createPolygon(qw/25c 4c 25c 4c 25c 1c 26c 1c 27c 4c 28c 1c 29c 1c
+ 29c 4c 29c 4c -smooth on -tags item/, -fill => $red);
+ $c->createPolygon(qw/22c 4.5c 25c 4.5c 25c 6.75c 28c 6.75c 28c 5.25c 24c
+ 5.25c 24c 6.0c 26c 6c 26c 7.5c 22c 7.5c -tags item/,
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'));
+
+ $c->createText(qw/5c 8.2c -text Rectangles -anchor n/);
+ $c->createRectangle(qw/1c 9.5c 4c 12.5c/, -outline => $red,
+ qw/-width 3m -tags item/);
+ $c->createRectangle(qw/0.5c 13.5c 4.5c 15.5c/, -fill => $green,
+ qw/-tags item/);
+ $c->createRectangle(qw/6c 10c 9c 15c -tags item/, -outline => undef,
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ -fill => $blue);
+
+ $c->createText(qw/15c 8.2c -text Ovals -anchor n/);
+ $c->createOval(qw/11c 9.5c 14c 12.5c/, -outline => $red,
+ qw/-width 3m -tags item/);
+ $c->createOval(qw/10.5c 13.5c 14.5c 15.5c/, -fill => $green,
+ qw/-tags item/);
+ $c->createOval(qw/16c 10c 19c 15c -tags item/, -outline => undef,
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ -fill => $blue);
+
+ $c->createText(qw/25c 8.2c -text Text -anchor n/);
+ $c->createRectangle(qw/22.4c 8.9c 22.6c 9.1c/);
+ $c->createText(qw/22.5c 9c -anchor n -width 4c/, -font => $font1,
+ -text => 'A short string of text, word-wrapped, justified left, and anchored north (at the top). The rectangles show the anchor points for each piece of text.', qw/-tags item/);
+ $c->createRectangle(qw/25.4c 10.9c 25.6c 11.1c/);
+ $c->createText(qw/25.5c 11c -anchor w/, -font => $font1, -fill => $blue,
+ -text => "Several lines,\n each centered\n" .
+ "individually,\nand all anchored\nat the left edge.",
+ qw/-justify center -tags item/);
+ $c->createRectangle(qw/24.9c 13.9c 25.1c 14.1c/);
+ $c->createText(qw/25c 14c -anchor c/, -font => $font2, -fill => $red,
+ -stipple => 'gray50',
+ -text => 'Stippled characters', qw/-tags item/);
+
+ $c->createText(qw/5c 16.2c -text Arcs -anchor n/);
+ $c->createArc(qw/0.5c 17c 7c 20c/, -fill => $green, qw/-outline black/,
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ qw/-start 45 -extent 270 -style pieslice -tags item/);
+ $c->createArc(qw/6.5c 17c 9.5c 20c -width 4m -style arc/, -fill => $blue,
+ qw/-start -135 -extent 270 -tags item/);
+ $c->createArc(qw/0.5c 20c 9.5c 24c -width 4m -style pieslice/,
+ -fill => undef, -outline => $red,
+ qw/-start 225 -extent -90 -tags item/);
+ $c->createArc(qw/5.5c 20.5c 9.5c 23.5c -width 4m -style chord/,
+ -fill => $blue, -outline => undef,
+ qw/-start 45 -extent 270 -tags item/);
+
+ $c->createText(qw/15c 16.2c -text Bitmaps -anchor n/);
+ $c->createBitmap(qw/13c 20c -bitmap/ =>
+ '@'.Tk->findINC('demos/images/face'), qw/-tags item/);
+ $c->createBitmap(qw/17c 18.5c/,
+ -bitmap => '@'.Tk->findINC('demos/images/noletters'),
+ qw/-tags item/);
+ $c->createBitmap(qw/17c 21.5c/,
+ -bitmap => '@'.Tk->findINC('demos/images/letters'),
+ qw/-tags item/);
+
+ $c->createText(qw/25c 16.2c -text Windows -anchor n/);
+ my $c_button = $c->Button(-text => 'Press Me',
+ -command => [\&items_button_press, $c, $red],
+ );
+ $c->createWindow(qw/21c 18c/, -window => $c_button,
+ qw/-anchor nw -tags item/);
+ my $c_entry = $c->Entry(-width => '20', -relief => 'sunken',
+ -validate => 'all',
+ -validatecommand => sub {$n++ ? 1 : 0},
+ -invalidcommand => sub {$TOP->bell});
+ $c_entry->insert('end' => 'Edit this text');
+ $c->createWindow(qw/21c 21c/, -window => $c_entry,
+ qw/-anchor nw -tags item/);
+ my $c_scale = $c->Scale(qw/-from 0 -to 100 -length 6c -sliderlength .4c
+ -width .5c -tickinterval 0/);
+ $c->createWindow(qw/28.5c 17.5c/, -window => $c_scale,
+ qw/-anchor n -tags item/);
+ $c->createText(qw/21c 17.9c -text Button: -anchor sw/);
+ $c->createText(qw/21c 20.9c -text Entry: -anchor sw/);
+ $c->createText(qw/28.5c 17.4c -text Scale: -anchor s/);
+
+ # Set up event bindings for canvas.
+
+ $c->bind('item', '<Any-Enter>' => [\&items_enter, \%iinfo]);
+ $c->bind('item', '<Any-Leave>' => [\&items_leave, \%iinfo]);
+
+ # Get real canvas widget reference to apply bind() commands to: the
+ # Canvas widget is a subwidget of the Scrolled composite widget. To
+ # reference the X event structure, either use the XEvent() method or
+ # read the specially localized variable $Tk::event. We'll use XEvent
+ # first, and the variable from then on.
+
+ $c->CanvasBind('<<Copy>>',sub { print "Do Copy\n" });
+
+ $c->CanvasBind('<1>' => sub {
+ my($c) = @_;
+ my $e = $c->XEvent;
+ items_start_drag $c, $e->x, $e->y, \%iinfo;
+ });
+ $c->CanvasBind('<B1-Motion>' =>
+ sub {items_drag shift, $Tk::event->x, $Tk::event->y, \%iinfo});
+ $c->CanvasBind('<2>' =>
+ sub {shift->scan('mark', $Tk::event->x, $Tk::event->y)});
+ $c->CanvasBind('<B2-Motion>' =>
+ sub {shift->scan('dragto', $Tk::event->x, $Tk::event->y)});
+ $c->CanvasBind('<3>' =>
+ sub {items_mark shift, $Tk::event->x, $Tk::event->y, \%iinfo});
+ $c->CanvasBind('<B3-Motion>' =>
+ sub {items_stroke shift, $Tk::event->x, $Tk::event->y, \%iinfo});
+ $c->CanvasBind('<Control-f>' => [sub {
+ my($c, $iinfo) = @_;
+ my $e = $c->XEvent;
+ items_under_area $c, $iinfo;
+ }, \%iinfo]);
+ $c->CanvasBind('<Any-Enter>' => sub {$_[0]->CanvasFocus});
+
+} # end items
+
+# Utility procedures for highlighting the item under the pointer:
+
+sub items_button_press {
+
+ # Procedure that's invoked when the button embedded in the canvas
+ # is invoked.
+
+ my($w, $color) = @_;
+
+ my $i = $w->createText(qw/25c 18.1c -anchor n/, -text => 'Ouch!!',
+ -fill => $color);
+ $w->after(500, sub { $w->delete($i) });
+
+} # end items_button_press
+
+sub items_drag {
+
+ my($c, $x, $y, $iinfo) = @_;
+
+ $x = $c->canvasx($x);
+ $y = $c->canvasy($y);
+ $c->move('current', $x-$iinfo->{lastX}, $y-$iinfo->{lastY});
+ $iinfo->{lastX} = $x;
+ $iinfo->{lastY} = $y;
+
+} # end items_drag
+
+sub items_enter {
+
+ my($c, $iinfo) = @_;
+
+ $iinfo->{restore_cmd} = '';
+
+ if ($TOP->depth == 1) {
+ $iinfo->{restore_cmd} = '';
+ return;
+ }
+ my $type = $c->type('current');
+ if ($type eq 'window') {
+ $iinfo->{restore_cmd} = '';
+ return;
+ }
+
+ if ($type eq 'bitmap') {
+ my $bg = ($c->itemconfigure(qw/current -background/))[4];
+ if (defined $bg) {
+ $iinfo->{restore_cmd} = "\$c->itemconfigure('current',
+ -background => '$bg');";
+ } else {
+ $iinfo->{restore_cmd} = "\$c->itemconfigure('current',
+ -background => undef);";
+ }
+ $c->itemconfigure(qw/current -background SteelBlue2/);
+ return;
+ }
+ my $fill = ($c->itemconfigure(qw/current -fill/))[4];
+ my $stipple = ($c->itemconfigure(qw/current -stipple/))[4];
+ if (defined $stipple) {
+ $iinfo->{restore_cmd} = "\$c->itemconfigure('current',
+ -stipple => '$stipple')";
+ $c->itemconfigure(qw/current -stipple /,'');
+ } elsif (($type eq 'rectangle' or $type eq 'oval' or $type eq 'arc')
+ and not defined $fill) {
+ my $outline = ($c->itemconfigure(qw/current -outline/))[4];
+ $iinfo->{restore_cmd} = "\$c->itemconfigure('current',
+ -outline => '$outline')";
+ $c->itemconfigure(qw/current -outline SteelBlue2/);
+ } else {
+ $iinfo->{restore_cmd} = "\$c->itemconfigure('current',
+ -fill => '$fill')";
+ $c->itemconfigure(qw/current -fill SteelBlue2/);
+ }
+
+} # end items_enter
+
+sub items_leave {
+
+ my($c, $iinfo) = @_;
+
+ eval $iinfo->{restore_cmd};
+
+} # end items_leave
+
+sub items_mark {
+
+ my($c, $x, $y, $iinfo) = @_;
+
+ $iinfo->{areaX1} = $c->canvasx($x);
+ $iinfo->{areaY1} = $c->canvasy($y);
+ $c->delete('area');
+
+} # end items_mark
+
+sub items_start_drag {
+
+ my($c, $x, $y, $iinfo) = @_;
+
+ $iinfo->{lastX} = $c->canvasx($x);
+ $iinfo->{lastY} = $c->canvasy($y);
+
+} # end items_start_drag
+
+sub items_stroke {
+
+ my($c, $x, $y, $iinfo) = @_;
+
+ $x = $c->canvasx($x);
+ $y = $c->canvasy($y);
+ if (($iinfo->{areaX1} != $x) and ($iinfo->{areaY1} != $y)) {
+ $c->delete('area');
+ $c->addtag('area', 'withtag', $c->create('rectangle',
+ $iinfo->{areaX1}, $iinfo->{areaY1}, $x, $y, -outline => 'black'));
+ $iinfo->{areaX2} = $x;
+ $iinfo->{areaY2} = $y;
+ }
+
+} # end items_stroke
+
+sub items_under_area {
+
+ my($c, $iinfo) = @_;
+
+ my $area = $c->find('withtag', 'area');
+ my @items = ();
+ my $i;
+ foreach $i ($c->find('enclosed', $iinfo->{areaX1},
+ $iinfo->{areaY1}, $iinfo->{areaX2}, $iinfo->{areaY2})) {
+ my @tags = $c->gettags($i);
+ if (defined($tags[0]) and grep $_ eq 'item', @tags) {
+ push @items, $i;
+ }
+ }
+ @items = 'None' unless @items;
+ print STDOUT 'Items enclosed by area: ', join(' ', @items), ".\n";
+ @items = ();
+ foreach $i ($c->find('overlapping', $iinfo->{areaX1}, $iinfo->{areaY1},
+ $iinfo->{areaX2}, $iinfo->{areaY2})) {
+ my @tags = $c->gettags($i);
+ if (defined($tags[0]) and grep $_ eq 'item', @tags) {
+ push @items, $i;
+ }
+ }
+ @items = 'None' unless @items;
+ print STDOUT 'Items overlapping area: ', join(' ', @items), ".\n";
+
+} # end items_under_area
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/keysyms.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/keysyms.pl
new file mode 100644
index 00000000000..17f594d7061
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/keysyms.pl
@@ -0,0 +1,20 @@
+use strict;
+
+sub keysyms {
+
+ my( $demo ) = @_;
+
+ my $mw = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This demonstration displays the keysym for any keyboard character.',
+ -title => 'Display Keysyms',
+ -iconname => 'keysyms',
+ );
+
+ $mw->Label( qw/ -relief solid -width 20 /, -textvariable => \my $k )->pack;
+
+ $mw->bind( '<KeyPress>' => sub {
+ $k = sprintf( "%s", $Tk::event->K );
+ });
+
+} # end keysyms
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl
new file mode 100644
index 00000000000..17d191a7c9b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labelframe.pl
@@ -0,0 +1,74 @@
+# labelframe.pl
+
+use vars qw/$TOP/;
+
+sub labelframe {
+
+ # Create a top-level window that displays several Labelframe widgets.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -geometry_manager => 'grid',
+ -name => $demo,
+ -text => 'Labelframes are used to group related widgets together. The label maybe either plain text or another widget.',
+ -title => 'Labelframe Demonstration',
+ -iconname => 'labelframe',
+ );
+
+ # A group of radiobuttons in a labelframe
+
+ my $lf1 = $TOP->Labelframe(qw/-text Value -padx 2 -pady 2/);
+ $lf1->grid(qw/-row 0 -column 0 -pady 2m -padx 2m/);
+
+ my $lfdummy;
+ foreach my $value (1 .. 4) {
+ $lf1->Radiobutton(
+ -text => "This is value $value" ,
+ -variable => \$lfdummy,
+ -value => $value,
+ )->pack(qw/-side top -fill x -pady 2/);
+ }
+
+ # A label window controlling a group of options.
+
+ my $lf2 = $TOP->Labelframe(qw/-pady 2 -padx 2/);
+ $lf2->grid(qw/-row 0 -column 1 -pady 2m -padx 2m/);
+ my $lfdummy2;
+ my $cb;
+ $cb = $lf2->Checkbutton(
+ -text => 'Use this option',
+ -variable => \$lfdummy2,
+ -command => sub {&labelframe_buttons($lf2, $cb, \$lfdummy2)},
+ -padx => 0,
+ );
+ $lf2->configure(-labelwidget => $cb);
+
+ foreach my $str (qw/Option1 Option2 Option3/) {
+ $lf2->Checkbutton(-text => $str)->pack(qw/-side top -fill x -pady 2/);
+ }
+
+ &labelframe_buttons($lf2, $cb, \$lfdummy2);
+
+ $TOP->gridColumnconfigure([0, 1], -weight => 1);
+
+} # end labelframe
+
+sub labelframe_buttons {
+
+ # The state of the sub-Checkbuttons is dependent upon the state of
+ # the master -labelwidget Checkbutton.
+
+ my ($lf, $cb, $var_ref) = @_;
+
+ foreach my $child ($lf->children) {
+ next if $child == $cb;
+ if ($$var_ref) {
+ $child->configure(qw/-state normal/);
+ } else {
+ $child->configure(qw/-state disabled/);
+ }
+ }
+
+} # end labelframe_buttons
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labels.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labels.pl
new file mode 100644
index 00000000000..4650ffdfd50
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labels.pl
@@ -0,0 +1,43 @@
+# labels.pl
+
+use vars qw/$TOP/;
+
+sub labels {
+
+ # Create a top-level window that displays a bunch of labels. @pl is the
+ # "packing list" variable which specifies the list of packer attributes.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Five labels are displayed below: three textual ones on the left, and an image label and a text label on the right. Labels are pretty boring because you can\'t do anything with them.',
+ -title => 'Label Demonstration',
+ -iconname => 'label',
+ );
+
+ my(@pl) = qw/-side left -expand yes -padx 10 -pady 10 -fill both/;
+ my $left = $TOP->Frame->pack(@pl);
+ my $right = $TOP->Frame->pack(@pl);
+
+ @pl = qw/-side top -expand yes -pady 2 -anchor w/;
+ my $left_l1 = $left->Label(-text => 'First label')->pack(@pl);
+ my $left_l2 = $left->Label(
+ -text => 'Second label, raised just for fun',
+ -relief => 'raised',
+ )->pack(@pl);
+ my $left_l3 = $left->Label(
+ -text => 'Third label, sunken',
+ -relief => 'sunken',
+ )->pack(@pl);
+
+ @pl = qw/-side top/;
+ my $right_bitmap = $right->Label(
+ -image => $TOP->Photo(-file => Tk->findINC('Xcamel.gif')),
+ -borderwidth => 2,
+ -relief => 'sunken',
+ )->pack(@pl);
+ my $right_caption = $right->Label(-text => 'Perl/Tk')->pack(@pl);
+
+} # end labels
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labframe.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labframe.pl
new file mode 100644
index 00000000000..c5f09f88bca
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/labframe.pl
@@ -0,0 +1,13 @@
+# LabFrame, frame with embedded label.
+
+use Tk;
+use Tk::LabFrame;
+use Tk::LabEntry;
+
+my $test = 'Test this';
+
+my $top = MainWindow->new;
+my $f = $top->LabFrame(-label => "This is a label", -labelside => "acrosstop");
+$f->LabEntry(-label => "Testing", -textvariable => \$test)->pack;
+$f->pack;
+MainLoop;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/mega.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/mega.pl
new file mode 100644
index 00000000000..cbd1b6cbd4c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/mega.pl
@@ -0,0 +1,135 @@
+# mega.pl
+
+use vars qw / $TOP /;
+use strict;
+
+sub mega {
+
+ my( $demo ) = @_;
+
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => [ "Perl/Tk provides a powerful framework for creating custom widgets. There are two types of these mega-widgets: composite and derived. Subsequent demonstrations detail a complete mega-widget of each type. Regardless of the type of mega-widget, they share a common programming structure. The key that differentiates the various types of mega-widget is the definition of the new widget's base class(es).", -wraplength => '7i' ],
+ -title => 'Introduction to writing pure Perl mega-widgets ',
+ -iconname => 'mega',
+ );
+
+ my $t = $TOP->Scrolled( qw/ ROText -wrap word -scrollbars oe/ );
+ $t->focus;
+ $t->pack( qw/ -fill both -expand 1 / );
+ $t->insert( 'end', <<'end-of-instructions' );
+
+Here, briefly, is the Perl/Tk mega-widget implementation for pure Perl mega-widgets. As much of the work as possible has been abstracted and incorporated into the pTk core. This mimimizes the code the mega-widget author has to write, increasing consistency.
+
+There are two varieties of mega-widgets in Perl/Tk: composite and derived. A composite is Toplevel or Frame-based, having other, more elemental, widgets packed (or gridded) inside. A derived widget has a ISA-like relationship, generally adding (but sometimes subtracting) options/methods to/from a single, existing, widget. Of course, that single widget may itself be a composite widget.
+
+To create a Perl/Tk mega-widget one:
+
+. chooses a namespace (class name)
+. defines a subroutine to initialize the class (optional)
+. defines an instance constructor (subroutine) that (optional):
+ . builds the new widget
+ . defines options (configuration specifications, analagous to C widgets)
+ . defines delegates for widget methods
+. defines private and instance methods (optional)
+
+As with core widgets, methods like configure() and cget() are automatically provided by the mega-widget framework and are "just there", and option database operations "just work".
+
+Here is a minimal Perl/Tk Toplevel-based composite mega-widget:
+
+ package Tk::Nil;
+ use base qw/Tk::Toplevel/;
+ Construct Tk::Widget 'Nil';
+
+Unless overridden, options and methods are inherited from the mega-widget's base class(es).
+
+You create a Nil just like any other Perl/Tk widget:
+
+ my $nil = $mw->Nil;
+
+And an empty Nil window appears that functions just like a Toplevel! But other than that, the Nil widget doesn't do anything more since no additonal subwidgets or behavior have been defined. The purpose of that example was to demonstrate how much the Perl/Tk mega-widget mechanism did for the mega-widget author - a fully functional composite mega-widget in three lines of code.
+
+There's a second container-like mega-widget in Perl/Tk, based on a Frame. But other than the logical container, the two mega-widget types are more-or-less equivalent. The third and final mega-widget type we call a derived mega-widget, because it adds or subtracts behavior to/from an existing widget.
+
+Functional mega-widgets look more like this:
+
+ package Tk::MyNewWidget;
+
+ # Declare base class.
+ use base qw/ Tk::Frame /; # Frame-based composite
+or
+ use base qw/ Tk::Toplevel /; # Toplevel-based composite
+or
+ use Tk:SomeWidget;
+ use base qw/ Tk::Derived Tk::SomeWidget /; # derived from SomeWidget
+
+ Construct Tk::Widget 'MyNewWidget'; # install MyNewWidget in pTk namespace
+
+ sub ClassInit{ # called once to initialize new class
+ my($class, $mw) = @_;
+ $class->SUPER::ClassInit($mw);
+ }
+
+ sub Populate { # called to build each widget instance
+ my($self, $args) = @_;
+ $self->SUPER::Populate($args);
+ $self->Advertise(); # advertise subwidgets
+ $self->Callback(); # invoke -command callbacks
+ $self->Component(); # define a subwidget component
+ $self->ConfigSpecs(); # define cget() / configure() options
+ $self->Delegates(); # how methods are delegated to subwidgets
+ $self->Subwidget(); # map a subwidget name to subwidget reference
+ }
+
+ # Private methods.
+
+ # Public methods.
+
+ 1; # end class MyNewWidget
+
+ # Don't forget POD documentation here!
+
+Here's an excerpt from a Text dervived mega-widget called TraceText; you can examine the complete code in another demonstration. This widget defines its content using a new -textvariable option.
+
+ package Tk::TraceText;
+ use base qw/Tk::Derived Tk::Text/;
+ Construct Tk::Widget 'TraceText';
+
+ sub Populate {
+
+ my( $self, $args ) = @_;
+
+ $self->ConfigSpecs(
+ -textvariable => 'METHOD', 'textVariable', 'TextVariable', undef,
+ );
+
+ } # end Populate
+
+ # Private methods.
+
+ sub textvariable {
+
+ my ( $self, $vref ) = @_;
+
+ $self->traceVariable( $vref, 'w', [ \&tracew => $self, $vref ] );
+ $self->{_vref} = $vref; # store watchpoint in an instance variable
+
+ } # end textvariable
+
+If you compare the preamble (the first three lines) with that of the Nil mega-widget, you'll note that they are virtually identical - the important difference is the addition of the Tk::Derived class that provides additional methods specifically for derived mega-widgets.
+
+At that point, with three lines of code, we have a completely functional mega-widget called TraceText that is identical to the standard Text widget in every way, and the key to all this is the Construct() call, which, among other duties, installs the new widget name in the symbol table.
+
+Construct() also arranges for the TraceText "instantiator" to call-out to the well-known method Populate() - this is how the mega-widget author adds behavior to the new widget. Similarly, the mega-widget author can provide a ClassInit() method that is called once per MainWindow to initialize class bindings, variables, images, etcetera.
+
+Tk::TraceText::Populate defines the -textvariable option and provides a private method to establish the watchpoint. In Perl/Tk, all mega-widget options are specified via a ConfigSpecs() call, named after the C structure.
+
+Briefly, ConfigSpecs() names options and tells Perl/Tk what to do when one is specified on a configure() or cget() call. It also specifies the option's database name, class name and default value for option DB lookups. For our -textvariable option, the Perl/Tk framework invokes a METHOD (subroutine) by the same name as the option, minus the dash, of course. Other choices include CHILDREN, DECENDENTS, a name (or list of names) of a subwidget, etcetera.
+
+More details on mega-widget construction can be found in these man pages:
+
+Tk::ConfigSpecs, Tk::Derived, Tk::composite, Tk::mega
+
+end-of-instructions
+
+} # end mega
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menbut.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menbut.pl
new file mode 100644
index 00000000000..9fd624bdc22
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menbut.pl
@@ -0,0 +1,122 @@
+# menbut.pl
+
+use vars qw/$TOP/;
+
+sub menbut {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => '',
+ -title => 'Menubutton Demo',
+ -iconname => 'Menubutton',
+ );
+
+ my @menubuttons;
+ foreach (qw/below right left above/) {
+ my $pos = ucfirst;
+ my $menubutton = $TOP->Menubutton(qw/-underline 0 -relief raised/,
+ -text => $pos, -direction => $_);
+ push @menubuttons, $menubutton;
+ my $menu = $menubutton->menu(qw/-tearoff 0/);
+ $menubutton->configure(-menu => $menu);
+ $menubutton->command(-label => "$pos menu: first item", -command =>
+ sub {print "You selected the first item from the $pos menu.\n"});
+ $menubutton->command(-label => "$pos menu: second item", -command =>
+ sub {print "You selected the second item from the $pos menu.\n"});
+ }
+ $menubuttons[0]->grid(qw/-row 0 -column 1 -sticky n/);
+ $menubuttons[3]->grid(qw/-row 2 -column 1 -sticky n/);
+ $menubuttons[1]->grid(qw/-row 1 -column 0 -sticky w/);
+ $menubuttons[2]->grid(qw/-row 1 -column 2 -sticky e/);
+
+ my $body = $TOP->Frame;
+ $body->grid(qw/-row 1 -column 1 -sticky news/);
+ $body->Label(qw/-wraplength 300 -justify left/, -font => 'Helvetica 14',
+ -text => 'This is a demonstration of menubuttons. The "Below" menubutton pops its menu below the button; the "Right" button pops to the right, etc. There are two option menus directly below this text; one is just a standard menu and the other is a 16-color palette.')->pack(qw/-side top -padx 25
+ -pady 25/);
+ $bbutt = $body->Frame->pack(qw/-padx 25 -pady 25/);
+ $bbutt->Optionmenu(-options => [qw/one two three/])->pack(qw/-side left
+ -padx 25 -pady 25/);
+
+ my $palette;
+ my(@colors) = qw/Black red4 DarkGreen NavyBlue gray75 Red Green Blue
+ gray50 Yellow Cyan Magenta White Brown DarkSeaGreen DarkViolet/;
+
+ my $colors = native_optionmenu(
+ $bbutt,
+ \$palette,
+ [sub {print "args=@_.\n"}, 'First'],
+ @colors,
+ );
+ $colors->pack(qw/-side left -padx 25 -pady 25/);
+
+ my $menu = $colors->cget(-menu);
+ my $topborder = 'gray50';
+ my $bottomborder = 'gray75';
+
+ foreach my $i (0 .. $#colors) {
+
+ # Create a 16 pixel x 16 pixel solid color swatch.
+ # Add a black ring around the currently selected item.
+
+ my $color = $menu->entrycget($i, -label);
+ my $p = $TOP->Photo(qw/-width 16 -height 16/);
+ $p->put($topborder, qw/-to 0 0 16 1/);
+ $p->put($topborder, qw/-to 0 1 1 16/);
+ $p->put($bottomborder, qw/-to 1 15 16 16/);
+ $p->put($bottomborder, qw/-to 15 1 16 15/);
+ $p->put($color, qw/-to 1 1 15 15/);
+
+ my $r = $TOP->Photo(qw/-width 16 -height 16/);
+ $r->put(qw/black -to 0 0 16 2/);
+ $r->put(qw/black -to 0 2 2 16/);
+ $r->put(qw/black -to 2 14 16 16/);
+ $r->put(qw/black -to 14 2 16 14/);
+ $r->put($color , qw/-to 2 2 14 14/);
+
+ $menu->entryconfigure($i, -columnbreak => 1) unless $i % 4;
+ $menu->entryconfigure($i,
+ -image => $p,
+ -hidemargin => 1,
+ -selectimage => $r,
+ );
+
+ } # forend all colors
+
+ $menu->configure(-tearoff => 1);
+
+} # end menbut
+
+sub native_optionmenu {
+
+ my($parent, $varref, $command, @optionvals) = @_;
+
+ $$varref = $optionvals[0];
+
+ my $mb = $parent->Menubutton(
+ -textvariable => $varref,
+ -indicatoron => 1,
+ -relief => 'raised',
+ -borderwidth => 2,
+ -highlightthickness => 2,
+ -anchor => 'c',
+ -direction => 'flush',
+ );
+ my $menu = $mb->Menu(-tearoff => 0);
+ $mb->configure(-menu => $menu);
+
+ my $callback = ref($command) =~ /CODE/ ? [$command] : $command;
+
+ foreach (@optionvals) {
+ $menu->radiobutton(
+ -label => $_,
+ -variable => $varref,
+ -command => [@$callback, $_],
+ );
+ }
+
+ $mb;
+
+} # end native_optionmenu
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus.pl
new file mode 100644
index 00000000000..10fa7bfac89
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus.pl
@@ -0,0 +1,196 @@
+# menus.pl
+
+use subs qw/menus_error/;
+use vars qw/$TOP/;
+
+sub menus {
+
+ # This demonstration script creates a window with a bunch of menus
+ # and cascaded menus using a menubar. A <<MenuSelect>> virtual event
+ # tracks the active menu item.
+
+ my ($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['', -wraplength => '5i'],
+ -title => 'Menu Demonstration',
+ -iconname => 'menus',
+ );
+
+ my $ws = $TOP->windowingsystem;
+
+ my $text = ($ws eq 'classic' or $ws eq 'aqua') ?
+ 'This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where "x" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse.' :
+ 'This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where "x" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu.';
+
+ $TOP->configure(-text => $text);
+
+ my $toplevel = $TOP->toplevel; # get $TOP's Toplevel widget reference
+ my $menubar = $toplevel->Menu(-type => 'menubar');
+ $toplevel->configure(-menu => $menubar);
+
+ my $modifier;
+ if ( $ws eq 'classic' or $ws eq 'aqua') {
+ $modifier = 'Command';
+ } elsif ($Tk::platform eq 'windows') {
+ $modifier = 'Control';
+ } else {
+ $modifier = 'Meta';
+ }
+
+ my $f = $menubar->cascade(-label => '~File', -tearoff => 0);
+ $f->command(-label => 'Open ...', -command => [\&menus_error, 'Open'],
+ -image => $toplevel->Getimage("openfile"), -compound => "left");
+ $f->command(-label => 'New', -command => [\&menus_error, 'New'],
+ -image => $toplevel->Getimage("file"), -compound => "left");
+ $f->command(-label => 'Save', -command => [\&menus_error, 'Save']);
+ $f->command(-label => 'Save As ...', -command => [\&menus_error, 'Save As']);
+ $f->separator;
+ $f->command(-label => 'Setup ...', -command => [\&menus_error, 'Setup']);
+ $f->command(-label => 'Print ...', -command => [\&menus_error, 'Print']);
+ $f->separator;
+ $f->command(-label => 'Quit', -command => [$TOP => 'bell']);
+
+ my $b = $menubar->cascade(-label => '~Basic', -tearoff => 0);
+ $b->command(-label => 'Long entry that does nothing');
+ my $label;
+ foreach $label (qw/A B C D E F/) {
+ $b->command(
+ -label => "Print letter \"$label\"",
+ -underline => 14,
+ -accelerator => "$modifier+$label",
+ -command => sub {print "$label\n"},
+ );
+ $TOP->bind("<$modifier-${label}>" => sub {print "$label\n"});
+ }
+ my $c = $menubar->cascade(-label => '~Cascades', -tearoff => 0);
+ $c->command(
+ -label => 'Print hello',
+ -command => sub {print "Hello\n"},
+ -accelerator => "$modifier+H",
+ -underline => 6,
+ );
+ $TOP->bind("<$modifier-h>" => sub {print "Hello\n"});
+ $c->command(
+ -label => 'Print goodbye',
+ -command => sub {print "Goodbye\n"},
+ -accelerator => "$modifier+G",
+ -underline => 6,
+ );
+ $TOP->bind("<$modifier-g>" => sub {print "Goodbye\n"});
+ my $cc = $c->cascade(-label => '~Check buttons', -tearoff => 0);
+
+ $cc->checkbutton(-label => 'Oil checked', -variable => \$OIL);
+ $cc->checkbutton(-label => 'Transmission checked', -variable => \$TRANS);
+ $cc->checkbutton(-label => 'Brakes checked', -variable => \$BRAKES);
+ $cc->checkbutton(-label => 'Lights checked', -variable => \$LIGHTS);
+ $cc->separator;
+ $cc->command(
+ -label => 'See current values',
+ -command => [\&see_vars, $MW, [
+ ['oil', \$OIL],
+ ['trans', \$TRANS],
+ ['brakes', \$BRAKES],
+ ['lights', \$LIGHTS],
+ ],
+ ],
+ );
+ my $cc_menu = $cc->cget(-menu);
+ $cc_menu->invoke(1);
+ $cc_menu->invoke(3);
+
+ my $rc = $c->cascade(-label => '~Radio buttons', -tearoff => 0);
+
+ foreach $label (qw/10 14 18 24 32/) {
+ $rc->radiobutton(
+ -label => "$label point",
+ -variable => \$POINT_SIZE,
+ -value => $label,
+ );
+ }
+ $rc->separator;
+ foreach $label (qw/Roman Bold Italic/) {
+ $rc->radiobutton(
+ -label => $label,
+ -variable => \$FONT_STYLE,
+ -value => $label,
+ );
+ }
+ $rc->separator;
+ $rc->command(
+ -label => 'See current values',
+ -command => [\&see_vars, $MW, [
+ ['point size', \$POINT_SIZE],
+ ['font style', \$FONT_STYLE],
+ ],
+ ],
+ );
+ my $rc_menu = $rc->cget(-menu);
+ $rc_menu->invoke(1);
+ $rc_menu->invoke(7);
+
+ my $i = $menubar->cascade(-label => '~Icons', -tearoff => 0);
+ $i->command(
+ -bitmap => '@'.Tk->findINC('demos/images/pattern'),
+ -command => sub {
+ $TOP->messageBox(
+ -title => 'Bitmap Menu Entry',
+ -message => 'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
+ -type => 'ok'),
+ },
+ -hidemargin => 1,
+ );
+ foreach $label (qw/info questhead error/) {
+ $i->command(
+ -bitmap => $label,
+ -command => sub {print "You invoked the \"$label\" bitmap\n"},
+ -hidemargin => 1,
+ );
+ }
+ $i->cget(-menu)->entryconfigure(2, -columnbreak => 1);
+
+ my $m = $menubar->cascade(-label => '~More', -tearoff => 0);
+ foreach $label ('An entry', 'Another entry', 'Does nothing',
+ 'Does almost nothing', 'Make life meaningful') {
+ $m->command(
+ -label => $label,
+ -command => sub {print "You invoked \"$label\"\n"},
+ );
+ }
+
+ my $k = $menubar->cascade(-label => 'C~olors');
+ foreach $label (qw/red orange yellow green blue/) {
+ $k->command(
+ -label => $label,
+ -background => $label,
+ -command => sub {print "You invoked \"$label\"\n"},
+ );
+ }
+
+ my $status_bar;
+ $TOP->Label(
+ qw/-relief sunken -borderwidth 1 -anchor w/,
+ -font => 'Helvetica 10', -textvariable => \$status_bar)->
+ pack(qw/-padx 2 -pady 2 -expand yes -fill both/);
+ $menubar->bind('<<MenuSelect>>' => sub {
+ $status_bar = undef;
+ $status_bar = $_[0]->entrycget('active', -label);
+ $TOP->idletasks;
+ });
+
+} # end menus
+
+sub menus_error {
+
+ # Generate a background error, which may even be displayed in a window if
+ # using ErrorDialog.
+
+ my($msg) = @_;
+
+ $msg = "This is just a demo: no action has been defined for \"$msg\".";
+ $TOP->BackTrace($msg);
+
+} # end menus_error
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus2.pl
new file mode 100644
index 00000000000..632b786b524
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/menus2.pl
@@ -0,0 +1,216 @@
+# menus2.pl
+
+use subs qw/menus_error2/;
+use vars qw/$TOP/;
+
+sub menus2 {
+
+ # This demonstration script creates a window with a bunch of menus
+ # and cascaded menus, but uses the unique Perl/Tk -menuitems way.
+ # A <<MenuSelect>> virtual event tracks the active menu item.
+
+ my ($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['', -wraplength => '5i'],
+ -title => 'Menuitems Demonstration',
+ -iconname => 'menus2',
+ );
+
+ my $ws = $TOP->windowingsystem;
+
+ my $text = ($ws eq 'classic' or $ws eq 'aqua') ?
+ 'This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where "x" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse.' :
+ 'This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where "x" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu.';
+
+ $TOP->configure(-text => $text);
+
+ my $toplevel = $TOP->toplevel; # get $TOP's Toplevel widget reference
+ my $menubar = $toplevel->Menu(-type => 'menubar');
+ $toplevel->configure(-menu => $menubar);
+
+ my $modifier;
+ if ( $ws eq 'classic' or $ws eq 'aqua') {
+ $modifier = 'Command';
+ } elsif ($Tk::platform eq 'windows') {
+ $modifier = 'Control';
+ } else {
+ $modifier = 'Meta';
+ }
+
+ my $f = $menubar->Cascade(qw/-label ~File -tearoff 0 -menuitems/ =>
+ [
+ [Button => 'Open ...', -command => [\&menus_error2, 'Open'],
+ -image => $toplevel->Getimage("openfile"),
+ -compound=> "left",
+ ],
+ [Button => 'New', -command => [\&menus_error2, 'New'],
+ -image => $toplevel->Getimage("file"),
+ -compound=> "left",
+ ],
+ [Button => 'Save', -command => [\&menus_error2, 'Save']],
+ [Button => 'Save As ...', -command => [\&menus_error2, 'Save As']],
+ [Separator => ''],
+ [Button => 'Setup ...', -command => [\&menus_error2, 'Setup']],
+ [Button => 'Print ...', -command => [\&menus_error2, 'Print']],
+ [Separator => ''],
+ [Button => 'Quit', -command => [$TOP => 'bell']],
+ ],
+ );
+
+ my $b = $menubar->Cascade(qw/-label ~Basic -tearoff 0 -menuitems/ =>
+ [
+ [Button => 'Long entry that does nothing'],
+ map (
+ [Button => "Print letter \"~$_\"",
+ -command => [sub {print "$_[0]\n"}, $_],
+ -accelerator => "Meta+$_" ],
+ ('a' .. 'g')
+ ),
+ ],
+ );
+
+ my $menu_cb = '~Check buttons';
+ my $menu_rb = '~Radio buttons';
+
+ my $c = $menubar->Cascade(qw/-label ~Cascades -tearoff 0 -menuitems/ =>
+ [
+ [Button => 'Print ~hello', -command => sub {print "Hello\n"},
+ -accelerator => 'Control+a'],
+ [Button => 'Print ~goodbye', -command => sub {print "Goodbye\n"},
+ -accelerator => 'Control+b'],
+ [Cascade => $menu_cb, -tearoff => 0, -menuitems =>
+ [
+ [Checkbutton => 'Oil checked', -variable => \$OIL],
+ [Checkbutton => 'Transmission checked', -variable => \$TRANS],
+ [Checkbutton => 'Brakes checked', -variable => \$BRAKES],
+ [Checkbutton => 'Lights checked', -variable => \$LIGHTS],
+ [Separator => ''],
+ [Button => 'See current values', -command =>
+ [\&see_vars, $TOP, [
+ ['oil', \$OIL],
+ ['trans', \$TRANS],
+ ['brakes', \$BRAKES],
+ ['lights', \$LIGHTS],
+ ],
+ ], # end see_vars
+ ], # end button
+ ], # end checkbutton menuitems
+ ], # end checkbuttons cascade
+ [Cascade => $menu_rb, -tearoff => 0, -menuitems =>
+ [
+ map (
+ [Radiobutton => "$_ point", -variable => \$POINT_SIZE,
+ -value => $_,
+ ],
+ (qw/10 14 18 24 32/),
+ ),
+ [Separator => ''],
+ map (
+ [Radiobutton => "$_", -variable => \$FONT_STYLE,
+ -value => $_,
+ ],
+ (qw/Roman Bold Italic/),
+ ),
+ [Separator => ''],
+ [Button => 'See current values', -command =>
+ [\&see_vars, $TOP, [
+ ['point size', \$POINT_SIZE],
+ ['font style', \$FONT_STYLE],
+ ],
+ ], # end see_vars
+ ], # end button
+ ], # end radiobutton menuitems
+ ], # end radiobuttons cascade
+ ],
+ );
+
+ $TOP->bind('<Control-a>' => sub {print "Hello\n"});
+ $TOP->bind('<Control-b>' => sub {print "Goodbye\n"});
+
+ # Fetch the Cascades menu, and from that get the checkbutton and
+ # radiobutton cascade menus and invoke a few menu items.
+
+ my $cm = $c->cget(-menu);
+ $menu_cb = substr $menu_cb, 1;
+ my $cc = $cm->entrycget($menu_cb, -menu);
+ $cc->invoke(1);
+ $cc->invoke(3);
+ $menu_rb = substr $menu_rb, 1;
+ my $cr = $cm->entrycget($menu_rb, -menu);
+ $cr->invoke(1);
+ $cr->invoke(7);
+
+ my $i = $menubar->Cascade(qw/-label ~Icons -tearoff 0 -menuitems/ =>
+ [
+ [Button => '', -bitmap => '@'.Tk->findINC('demos/images/pattern'),
+ -command => sub {
+ $TOP->messageBox(
+ -title => 'Bitmap Menu Entry',
+ -message => 'The menu entry you invoked displays a bitmap rather than a text string. Other than this, it is just like any other menu entry.',
+ -type => 'ok'),
+ },
+ ],
+ map (
+ [Button => '', -bitmap => $_,
+ -command =>
+ [sub {print "You invoked the \"$_[0]\" bitmap\n"}, $_]],
+ (qw/info questhead error/),
+ ),
+ ],
+ );
+ my $im = $i->cget(-menu);
+ $im->entryconfigure(2, -columnbreak => 1);
+
+ my $m = $menubar->Cascade(qw/-label ~More -tearoff 0 -menuitems/ =>
+ [
+ map (
+ [Button => $_,
+ -command =>
+ [sub {print "You invoked \"$_[0]\"\n"}, $_]],
+ ('An entry', 'Another entry', 'Does nothing',
+ 'Does almost nothing', 'Make life meaningful'),
+ ),
+ ],
+ );
+
+ my $k = $menubar->cascade(qw/-label C~olors -tearoff 1 -menuitems/ =>
+ [
+ map (
+ [Button => $_,
+ -background => $_,
+ -command =>
+ [sub {print "You invoked \"$_[0]\"\n"}, $_]],
+ (qw/red orange yellow green blue/),
+ ),
+ ],
+ );
+
+ my $status_bar;
+ $TOP->Label(
+ qw/-relief sunken -borderwidth 1 -anchor w/,
+ -font => 'Helvetica 10', -textvariable => \$status_bar)->
+ pack(qw/-padx 2 -pady 2 -expand yes -fill both/);
+ $menubar->bind('<<MenuSelect>>' => sub {
+ $status_bar = undef;
+ $status_bar = $_[0]->entrycget('active', -label);
+ $TOP->idletasks;
+ });
+
+} # end menus2
+
+sub menus_error2 {
+
+
+ # Generate a background error, which may even be displayed in a window if
+ # using ErrorDialog.
+
+ my($msg) = @_;
+
+ $msg = "This is just a demo: no action has been defined for \"$msg\".";
+ $TOP->BackTrace($msg);
+
+} # end menus_error
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/msgBox.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/msgBox.pl
new file mode 100644
index 00000000000..4ac739519e8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/msgBox.pl
@@ -0,0 +1,82 @@
+# msgBox.pl
+
+use vars qw/$TOP/;
+
+sub msgBox {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Choose the icon and type option of the message box. Then press the "Message Box" button to see the message box.',
+ -title => 'messageBox Demo',
+ -iconname => 'messageBox',
+ );
+
+ my $upper = $TOP->Frame->pack;
+ my $left = $upper->Frame;
+ my $right = $upper->Frame;
+ $left->pack(qw/-side left -expand yes -fill y -pady .5c -padx .5c/);
+ $right->pack(qw/-side left -expand yes -fill y -pady .5c -padx .5c/);
+
+ my $icon = $left->Label(qw/-text Icon/);
+ my $lsep = $left->Frame(qw/-relief ridge -bd 1 -height 2/);
+ $icon->pack(qw/-side top/);
+ $lsep->pack(qw/-side top -fill x -expand no/);
+
+ my $iconvar = 'info';
+ foreach my $i (qw/error info question warning/) {
+ $left->Radiobutton(-text => $i, -variable => \$iconvar, -value => $i,
+ qw/-width 16 -anchor w -relief flat/)->pack(
+ qw/-side top -pady 2 -anchor w -fill x/);
+ }
+
+
+ my $rl = $right->Label(qw/-text Type/);
+ my $rsep = $right->Frame(qw/-relief ridge -bd 1 -height 2/);
+ $rl->pack(qw/-side top/);
+ $rsep->pack(qw/-side top -fill x -expand no/);
+
+ my $typevar = 'OK';
+ foreach my $t (qw/AbortRetryIgnore OK OKCancel RetryCancel YesNo YesNoCancel/) {
+ $right->Radiobutton(-text => $t, -variable => \$typevar, -value => $t,
+ qw/-relief flat -width 16 -anchor w/)->pack(
+ qw/-side top -pady 2 -anchor w -fill x/);
+ }
+
+ {
+ my $cbf = $TOP->Frame->pack(-fill => 'x', -padx => '.5c', -pady => 3);
+ my $fd;
+ my $fdb = $cbf->Radiobutton
+ (-text => 'Tk::DialogBox',
+ -variable => \$fd,
+ -value => 'DialogBox',
+ -command => sub { local($^W) = 0;
+ *Tk::tk_messageBox = sub{ Tk::MessageBox('tk_messageBox', @_) };
+ })->pack(-side => 'left');
+ $cbf->Radiobutton
+ (-text => 'Tk::MsgBox',
+ -variable => \$fd,
+ -value => 'MsgBox',
+ -command => sub { local($^W) = 0;
+ require Tk::MsgBox;
+ Tk::MsgBox->import('as_default');
+ })->pack(-side => 'left');
+ $fdb->invoke;
+ }
+
+ my $show = $TOP->Button(-text => "Message Box",
+ -command => [\&show_messageBox, \$iconvar, \$typevar]);
+ $show->pack;
+
+} # end msgBox
+
+sub show_messageBox {
+ my($iconvar, $typevar) = @_;
+
+ my $button = $TOP->messageBox('-icon' => $$iconvar, -type => $$typevar,
+ -title => 'Message',
+ -message => "This is a \"$$typevar\" type messagebox with the \"$$iconvar\" icon");
+
+ $TOP->messageBox(qw/-icon info -type OK -message/ => "You have selected \"$button\"");
+
+} # end show_messageBox
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/notebook.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/notebook.pl
new file mode 100644
index 00000000000..ed45ef83190
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/notebook.pl
@@ -0,0 +1,59 @@
+# Notebook, selectable pages.
+
+use Tk;
+use Tk::DialogBox;
+use Tk::NoteBook;
+use Tk::LabEntry;
+
+my $name = "Rajappa Iyer";
+my $email = "rsi\@netcom.com";
+my $os = "Linux";
+
+use vars qw($top);
+
+$top = MainWindow->new;
+my $pb = $top->Button(-text => "Notebook", -command => \&donotebook);
+$pb->pack;
+MainLoop;
+
+
+my $f;
+
+sub donotebook {
+ if (not defined $f) {
+ # The current example uses a DialogBox, but you could just
+ # as easily not use one... replace the following by
+ # $n = $top->NoteBook(-ipadx => 6, -ipady => 6);
+ # Of course, then you'd have to take care of the OK and Cancel
+ # buttons yourself. :-)
+ $f = $top->DialogBox(-title => "Personal Profile",
+ -buttons => ["OK", "Cancel"]);
+ my $n = $f->add('NoteBook', -ipadx => 6, -ipady => 6);
+
+ my $address_p = $n->add("address", -label => "Address", -underline => 0);
+ my $pref_p = $n->add("pref", -label => "Preferences", -underline => 0);
+
+ $address_p->LabEntry(-label => "Name: ",
+ -labelPack => [-side => "left", -anchor => "w"],
+ -width => 20,
+ -textvariable => \$name)->pack(-side => "top", -anchor => "nw");
+ $address_p->LabEntry(-label => "Email Address:",
+ -labelPack => [-side => "left", -anchor => "w"],
+ -width => 50,
+ -textvariable => \$email)->pack(-side => "top", -anchor => "nw");
+ $pref_p->LabEntry(-label => "Operating System:",
+ -labelPack => [-side => "left"],
+ -width => 15,
+ -textvariable => \$os)->pack(-side => "top", -anchor => "nw");
+ $n->pack(-expand => "yes",
+ -fill => "both",
+ -padx => 5, -pady => 5,
+ -side => "top");
+
+ }
+ my $result = $f->Show;
+ if ($result =~ /OK/) {
+ print "name = $name, email = $email, os = $os\n";
+ }
+}
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned1.pl
new file mode 100644
index 00000000000..4a988ddd6da
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned1.pl
@@ -0,0 +1,26 @@
+# paned1.pl
+
+use vars qw/$TOP/;
+
+sub paned1 {
+
+ # This demonstration script creates a toplevel window containing
+ # a paned window that separates two windows horizontally.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'The sash between the two coloured windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)',
+ -title => 'Horizontal Paned Window Demonstration',
+ -iconname => 'paned1',
+ );
+
+ my $pw = $TOP->Panedwindow;
+ $pw->pack(qw/-side top -expand yes -fill both -pady 2 -padx 2m/);
+
+ my $l1 = $pw->Label(-text => "This is the\nleft side", -background => 'yellow');
+ my $l2 = $pw->Label(-text => "This is the\nright side", -background =>'cyan');
+
+ $pw->add($l1, $l2);
+
+} # end paned1
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned2.pl
new file mode 100644
index 00000000000..28ccf0ba4bf
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/paned2.pl
@@ -0,0 +1,65 @@
+# paned2.pl
+
+use vars qw/$TOP/;
+
+sub paned2 {
+
+ # This demonstration script creates a toplevel window containing
+ # a paned window that separates two windows vertically.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'The sash between the two scrolled windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)',
+ -title => 'Vertical Paned Window Demonstration',
+ -iconname => 'paned2',
+ );
+
+ my $pw = $TOP->Panedwindow(qw/-orient vertical/);
+ $pw->pack(qw/-side top -expand yes -fill both -pady 2 -padx 2m/);
+
+ my $paneList = [
+ 'List of Tk Widgets', qw/
+ button
+ canvas
+ checkbutton
+ entry
+ frame
+ label
+ labelframe
+ listbox
+ menu
+ menubutton
+ message
+ panedwindow
+ radiobutton
+ scale
+ scrollbar
+ spinbox
+ text
+ toplevel
+ /,
+ ];
+
+ my $f1 = $pw->Frame;
+ my $lb = $f1->Listbox(-listvariable => $paneList);
+ $lb->pack(qw/-fill both -expand 1/);
+ my ($fg, $bg) = ($lb->cget(-foreground), $lb->cget(-background));
+ $lb->itemconfigure(0,
+ -background => $fg,
+ -foreground => $bg,
+ );
+
+ my $f2 = $pw->Frame;
+ my $t = $f2->Text(qw/-width 30 -wrap none/);
+
+ $t->grid(qw/-sticky nsew/);
+ $f2->gridColumnconfigure(qw/0 -weight 1/);
+ $f2->gridRowconfigure(qw/0 -weight 1/);
+ $t->insert('1.0', 'This is just a normal text widget');
+
+ $pw->add($f1, $f2);
+
+} # end paned2
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo1.pl
new file mode 100644
index 00000000000..aed66103bb2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo1.pl
@@ -0,0 +1,30 @@
+# photo1.pl
+
+use vars qw/$TOP/;
+
+sub photo1 {
+
+ my($demo) = @_;
+
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This demonstration displays, for two seconds, a picture of a teapot over a green background, then proceeeds to render transparent a 50 x 50 pixel area of the teapot so that the green background shows through.',
+ -title => 'Transparent Pixels',
+ -iconname => 'photo1',
+ );
+
+ my $l = $TOP->Label( qw/ -background green -width 300 -height 300 / )->pack;
+
+ my $f1 = $TOP->Photo( -file => Tk->findINC( 'demos/images/teapot.ppm' ) );
+ $l->configure( -image => $f1 );
+ $TOP->idletasks;
+ $TOP->after(2000);
+
+ foreach my $x ( 50 .. 100 ) {
+ foreach my $y ( 50 .. 100 ) {
+ $f1->transparencySet( $x, $y, 1 );
+ $f1->update;
+ }
+ }
+
+} # end photo1
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo2.pl
new file mode 100644
index 00000000000..d55d8210423
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/photo2.pl
@@ -0,0 +1,156 @@
+# photo2.pl
+
+use vars qw/ $TOP $photo2_use_bg /;
+use strict;
+
+sub photo2 {
+
+ my( $demo ) = @_;
+
+ my $alpha; # transparency
+ my( $dx, $dy ) = ( 0, 0 ); # delta offsets
+ my $svar = 100; # Scale variable
+ $photo2_use_bg = 0; # nz IFF a green background
+
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => [ "This demonstration illustrates compositing. Commonly, each pixel of a color image is represented by three color components, red, green and blue, each specifiying a relative percentage of the color \"white\", such that, when the components are combined, they produce a visible color. Here are a few samples of 8-bit RGB triplets and the visible colors they produce:\n
+(255, 255, 255) = white (000, 000, 000) = black\n(255, 000, 000) = red (000, 255, 000) = green (000, 000, 255) = blue\n\nAn additional transparency factor can be supplied that describes the importance of each pixel's RGB components when composited over another image. This transparency channel is called the Alpha channel. Although the Alpha channel is said to contain transparency information, in fact, it actually contains opacity information.\n\nIt is still possible to think in terms of transparency, although in this case the transparency is applied to the background image over which the current image is composited. The composited color is computed as:\n\n (image_RGB_component * alpha) + (background_RGB_component * (1.0 - alpha))", -wraplength => 640 ],
+ -title => 'Alpha Channel Compositing',
+ -iconname => 'photo2',
+ );
+
+ my $mw = $TOP;
+ my $i1 = $mw->Photo( -file => Tk->findINC( 'demos/images/earth.gif' ) );
+ my $i2 = $mw->Photo( -file => Tk->findINC( 'demos/images/earthris.gif' ) );
+ my $i3 = $mw->Photo( qw/ -format png -width 320 -height 200 / );
+
+ my $tf = $mw->Frame;
+ $tf->Label( -image => $i2 )->pack( qw/ -side left / );
+ $tf->Label( -image => $i1 )->pack( qw/ -side left / );
+
+ my $bf = $mw->Frame;
+ my $controls = $bf->Frame;
+ my $results = $bf->Frame;
+
+ $controls->pack( qw/ -side left -fill both -expand 1/ ) ;
+ $results->pack( qw/ -side right/ );
+
+ $controls->Label(
+ -font => '9x15',
+ -foreground => 'blue',
+ -text => 'Left Image Options',
+ )->pack;
+ my $s = $controls->Scale(
+ qw/
+ -from 100.0
+ -resolution 10.0
+ -tickinterval 10.0
+ -to 0.0
+ /,
+ -label => '% Opacity',
+ -variable => \$svar,
+ );
+ $svar = 80;
+
+ my $spacer = $controls->Frame( qw/ -borderwidth 2 -relief solid -width 5/ );
+
+ my $rt = $controls->Label( -text => 'Background' );
+ my $r = $controls->Frame;
+ my $r1 = $r->Radiobutton(
+ -anchor => 'w',
+ -text => 'Right Image',
+ -value => 0,
+ -variable => \$photo2_use_bg,
+ -width => 20,
+ );
+ my $r2 = $r->Radiobutton(
+ -anchor => 'w',
+ -text => 'The Color Green',
+ -value => 1,
+ -variable => \$photo2_use_bg,
+ -width => 20,
+ );
+ $r2->pack( qw/ -side bottom/ );
+ $r1->pack( qw/ -side bottom/ );
+
+ my $b = $controls->Button(
+ -command => [ \&photo2_blend, $i1, $i2, $i3, $dx, $dy, \$svar ],
+ -text => 'Composite ==>>',
+ );
+
+ my $l = $results->Label( -image => $i3 );
+
+ $tf->pack;
+ $bf->pack( qw/-fill both -expand 1/ ) ;
+ $b->pack( qw/ -side bottom -fill x/ );
+ $s->pack( qw/ -side left -fill both -expand 1 / );
+ $spacer->pack( qw/ -side left -fill y -expand 1 / );
+ $rt->pack( qw/ -side top / );
+ $r->pack( qw/ -side right / );
+ $l->pack( qw/ -side right / );
+
+} # end photo2
+
+sub photo2_blend {
+
+ my( $img1, $img2, $img3, $dx, $dy, $svar_ref ) = @_;
+
+ my $a2 = $$svar_ref / 100.0;
+ my $a1 = 1.0 - $a2;
+
+ my $width1 = $img1->width;
+ my $height1 = $img1->height;
+ my $width2 = $img2->width;
+ my $height2 = $img2->height;
+
+ $img3->blank;
+
+ my $x1 = $dx;
+ my $x2 = 0;
+
+ for ( my $i = 0; $i < $width1; $i++ ) {
+ last if $i > $width2;
+ my $y1 = $dy;
+ my $y2 = 0;
+
+ for ( my $j = 0; $j < $height1; $j++ ) {
+ last if $j > $height2;
+
+ # Skip if no pixel at this coordinate or if transparent. Else,
+ # combine the proper percentage of each color component and
+ # put the pixel into the third image.
+
+ Tk::catch {
+ if ( not $img2->transparencyGet( $x2, $y2 ) ) {
+
+ my ( @c1 ) = $img1->get( $x1, $y1 );
+ my ( @c2 ) = $img2->get( $x2, $y2 );
+
+ # You can use a colored background rather than another
+ # image to test alpha channels. Uncomment this line to
+ # ignore the first image and force a green backround.
+ @c1 = ( 0, 255, 0 ) if $photo2_use_bg;
+
+ foreach my $c ( 0 .. 2 ) {
+ $c1[$c] = $c1[$c] * $a1 + $c2[$c] * $a2;
+ }
+
+ my $color = sprintf( "#%02x%02x%02x", @c1[0 .. 2] );
+ $img3->put( $color, -to => $x1, $y1 );
+
+ } # ifend
+ }; # catchend
+
+ $y1++;
+ $y2++;
+
+ } # forend $j
+
+ $img3->update;
+ $x1++;
+ $x2++;
+
+ } # forend $i
+
+} # end photo2_blend
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl
new file mode 100644
index 00000000000..1f7d3d03904
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/plot.pl
@@ -0,0 +1,28 @@
+# plot.pl
+
+use Plot;
+use vars qw/$TOP/;
+
+sub plot {
+
+ # Create a top-level window containing a canvas displaying a simple
+ # graph with data points that can be dragged with the pointing device.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => "This window displays a canvas widget containing a simple 2-dimensional plot. You can doctor the data by dragging any of the points with mouse button 1.\n\nYou can also select a printable area with the mouse button 2.",
+ -title => 'Plot Demonstration',
+ -iconname => 'plot',
+ );
+
+ my $c = $TOP->Plot(
+ -title_color => 'Brown',
+ -inactive_highlight => 'Skyblue2',
+ -active_highlight => 'red',
+ );
+ $c->pack(qw/-fill x/);
+
+} # end plot
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/progress.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/progress.pl
new file mode 100644
index 00000000000..5875ba1d2b8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/progress.pl
@@ -0,0 +1,46 @@
+# ProgressBar - display various progress bars.
+
+use strict;
+use Tk;
+use Tk::ProgressBar;
+use Tk::Scale;
+
+my $mw = MainWindow->new;
+
+my $status_var = 0;
+
+my($fromv,$tov) = (0,100);
+foreach my $loop (0..1) {
+ my $res = 0;
+ my $blks = 10;
+ my @p = qw(top bottom left right);
+ foreach my $dir (qw(n s w e)) {
+ $mw->ProgressBar(
+ -borderwidth => 2,
+ -relief => 'sunken',
+ -width => 20,
+ -padx => 2,
+ -pady => 2,
+ -variable => \$status_var,
+ -colors => [0 => 'green', 50 => 'yellow' , 80 => 'red'],
+ -resolution => $res,
+ -blocks => $blks,
+ -anchor => $dir,
+ -from => $fromv,
+ -to => $tov
+ )->pack(
+ -padx => 10,
+ -pady => 10,
+ -side => pop(@p),
+ -fill => 'both',
+ -expand => 1
+ );
+ $blks = abs($blks - ($res * 2));
+ $res = abs(5 - $res);
+ }
+ ($fromv,$tov) = ($tov,$fromv);
+}
+
+$mw->Scale(-from => 0, -to => 100, -variable => \$status_var)->pack;
+
+MainLoop;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/puzzle.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/puzzle.pl
new file mode 100644
index 00000000000..43910eca7e2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/puzzle.pl
@@ -0,0 +1,86 @@
+# puzzle.pl
+
+use subs qw/puzzle_switch/;
+use vars qw/$TOP/;
+
+sub puzzle {
+
+ # Create a top-level window containing a 15-puzzle game.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'A 15-puzzle appears below as a collection of buttons. Click on any of the pieces next to the space, and that piece will slide over the space. Continue this until the pieces are arranged in numerical order from upper-left to lower-right.',
+ -title => '15-Puzzle Demonstration',
+ -iconname => 'puzzle',
+ );
+
+ # Special trick: select a darker color for the space by creating a
+ # scrollbar widget and using its trough color.
+
+ my $s = $TOP->Scrollbar;
+ my $frame = $TOP->Frame(
+ -width => 120,
+ -height => 120,
+ -borderwidth => '2',
+ -relief => 'sunken',
+ -background => $s->cget(-troughcolor),
+ );
+ $frame->pack(qw/-side top -padx 1c -pady 1c/);
+ $s->destroy;
+
+ my(@order) = (3, 1, 6, 2, 5, 7, 15, 13, 4, 11, 8, 9, 14, 10, 12);
+ my %xpos = ();
+ my %ypos = ();
+
+ my($i, $num, $frame_num);
+ for ($i=0; $i<15; $i++) {
+ $num = $order[$i];
+ $xpos{$num} = ($i%4) * 0.25;
+ $ypos{$num} = (int($i/4)) * 0.25;
+ $frame_num = $frame->Button(
+ -relief => 'raised',
+ -text => $num,
+ -highlightthickness => 0,
+ );
+ $frame_num->configure(
+ -command => [\&puzzle_switch, $frame_num, $num, \%xpos, \%ypos],
+ );
+ $frame_num->place(
+ -relx => $xpos{$num},
+ -rely => $ypos{$num},
+ -relwidth => 0.25,
+ -relheight => 0.25,
+ );
+ } # forend all puzzle numbers
+ $xpos{'space'} = 0.75;
+ $ypos{'space'} = 0.75;
+
+} # end puzzle
+
+sub puzzle_switch {
+
+ # Procedure invoked by buttons in the puzzle to resize the puzzle entries.
+
+ my($w, $num, $xpos, $ypos) = @_;
+
+ if ( (($ypos->{$num} >= ($ypos->{'space'} - 0.01)) &&
+ ($ypos->{$num} <= ($ypos->{'space'} + 0.01))
+ && ($xpos->{$num} >= ($xpos->{'space'} - 0.26)) &&
+ ($xpos->{$num} <= ($xpos->{'space'} + 0.26)))
+ || (($xpos->{$num} >= ($xpos->{'space'} - 0.01)) &&
+ ($xpos->{$num} <= ($xpos->{'space'} + 0.01))
+ && ($ypos->{$num} >= ($ypos->{'space'} - 0.26)) &&
+ ($ypos->{$num} <= ($ypos->{'space'} + 0.26))) ) {
+ my $tmp = $xpos->{'space'};
+ $xpos->{'space'} = $xpos->{$num};
+ $xpos->{$num} = $tmp;
+ $tmp = $ypos->{'space'};
+ $ypos->{'space'} = $ypos->{$num};
+ $ypos->{$num} = $tmp;
+ $w->place(-relx => $xpos->{$num}, -rely => $ypos->{$num});
+ }
+
+} # end puzzle_switch
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/radio.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/radio.pl
new file mode 100644
index 00000000000..bae8c9daf3e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/radio.pl
@@ -0,0 +1,78 @@
+# radio.pl
+
+use Tk::widgets qw/LabFrame/;
+use vars qw/$TOP/;
+
+sub radio {
+
+ # Create a top-level window that displays a bunch of radio buttons.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['Two groups of radiobuttons are displayed below. If you click on a button then the button will become selected exclusively among all the buttons in its group. A Perl variable is associated with each group to indicate which of the group\'s buttons is selected. Click the "See Variables" button to see the current values of the variables.', qw/-wraplength 5i/],
+ -title => 'Radiobutton Demonstration',
+ -iconname => 'radio',
+ );
+
+ my $var = $TOP->Button(
+ -text => 'See Variables',
+ -command => [\&see_vars, $TOP, [
+ ['point size', \$POINT_SIZE],
+ ['color', \$COLOR],
+ ['alignment', \$ALIGN],
+ ]
+ ],
+ );
+ $var->pack(qw/-side bottom -expand 1/);
+
+ my @pl = qw/-side left -expand 1 -padx .5c -pady .5c/;
+ my $left = $TOP->LabFrame(-label => 'Point Size')->pack(@pl);
+ my $mid = $TOP->LabFrame(-label => 'Color')->pack(@pl);
+ my $right = $TOP->LabFrame(-label => 'Alignment')->pack(@pl);
+
+ @pl = qw/-side top -pady 2 -anchor w/;
+ foreach my $p (10, 12, 18, 24) {
+ $left->Radiobutton(
+ -text => "Point Size $p",
+ -variable => \$POINT_SIZE,
+ -relief => 'flat',
+ -value => $p,
+ )->pack(@pl);
+ }
+
+ foreach my $c (qw/Red Green Blue Yellow Orange Purple/) {
+ $mid->Radiobutton(
+ -text => $c,
+ -variable => \$COLOR,
+ -relief => 'flat',
+ -value => lc($c),
+ -command => sub {$mid->configure(-foreground => $c)},
+ )->pack(@pl);
+ }
+
+ my $l = $right->Label(qw/-text Label -bitmap questhead -compound left/);
+ $l->configure(-width => $l->reqwidth, -compound => 'top');
+ $l->configure(-height => $l->reqheight);
+ my %w;
+ foreach my $a (qw/Top Left Right Bottom/) {
+ my $lower = lc $a;
+ $w{$lower} = $right->Radiobutton(
+ -text => $a,
+ -variable => \$ALIGN,
+ -relief => 'flat',
+ -value => $lower,
+ -indicatoron => 0,
+ -width => 7,
+ -command => sub {
+ $l->configure(-compound => $ALIGN);
+ },
+ );
+ }
+ Tk::grid('x', $w{'top'});
+ $w{'left'}->grid($l, $w{'right'});
+ Tk::grid('x', $w{'bottom'});
+
+} # end radio
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ruler.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ruler.pl
new file mode 100644
index 00000000000..83e946f06e5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/ruler.pl
@@ -0,0 +1,146 @@
+# ruler.pl
+
+use subs qw/ruler_make_tab ruler_move_tab ruler_new_tab ruler_release_tab
+ ruler_select_tab/;
+use vars qw/$TOP/;
+
+sub ruler {
+
+ # Create a canvas demonstration consisting of a ruler displays a ruler
+ # with tab stops that can be set individually.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['This canvas widget shows a mock-up of a ruler. You can create tab stops by dragging them out of the well to the right of the ruler. You can also drag existing tab stops. If you drag a tab stop far enough up or down so that it turns dim, it will be deleted when you release the mouse button.', qw/-wraplength 5i/],
+ -title => 'Ruler Demonstration',
+ -iconname => 'ruler',
+ );
+
+ my $c = $TOP->Canvas(qw/-width 14.8c -height 2.5c/);
+ $c->pack(qw/-side top -fill x/);
+
+ my %rinfo; # ruler information hash
+ $rinfo{grid} = '.25c';
+ $rinfo{left} = $c->fpixels('1c');
+ $rinfo{right} = $c->fpixels('13c');
+ $rinfo{top} = $c->fpixels('1c');
+ $rinfo{bottom} = $c->fpixels('1.5c');
+ $rinfo{size} = $c->fpixels('.2c');
+ $rinfo{normalStyle} = [qw/-fill black/];
+ if ($TOP->depth > 1) {
+ $rinfo{activeStyle} = [qw/-fill red -stipple/ => undef];
+ $rinfo{deleteStyle} = [
+ -fill => 'red',
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ ];
+ } else {
+ $rinfo{activeStyle} = [qw/-fill black -stipple/ => undef];
+ $rinfo{deleteStyle} = [
+ -fill => 'black',
+ -stipple => '@'.Tk->findINC('demos/images/grey.25'),
+ ];
+ }
+
+ $c->create(qw/line 1c 0.5c 1c 1c 13c 1c 13c 0.5c -width 1/);
+ my $i;
+ for ($i = 0; $i < 12; $i++) {
+ my $x = $i+1;
+ $c->create('line', "$x.c", '1c', "$x.c", '0.6c', -width => 1);
+ $c->create('line', "$x.25c", '1c', "$x.25c", '0.8c', -width => 1);
+ $c->create('line', "$x.5c", '1c', "$x.5c", '0.7c', -width => 1);
+ $c->create('line', "$x.75c", '1c', "$x.75c", '0.8c', -width => 1);
+ $c->create('text', "$x.15c", '.75c',-text => $i, -anchor => 'sw');
+ }
+ $c->addtag('well', 'withtag', $c->create(qw/rect 13.2c 1c 13.8c 0.5c
+ -outline black -fill/, ($c->configure(-bg))[4]));
+ $c->addtag('well', 'withtag', ruler_make_tab($c, $c->pixels('13.5c'),
+ $c->pixels('.65c'), \%rinfo));
+
+ $c->bind('well', '<1>' => [\&ruler_new_tab, \%rinfo]);
+ $c->bind('tab', '<1>' => [\&ruler_select_tab, \%rinfo]);
+ $c->Tk::bind('<B1-Motion>' => [\&ruler_move_tab, \%rinfo]);
+ $c->Tk::bind('<Any-ButtonRelease-1>', [\&ruler_release_tab, \%rinfo]);
+
+} # end ruler
+
+sub ruler_make_tab {
+
+ my($c, $x, $y, $rinfo) = @_;
+
+ return $c->create('polygon', $x, $y, $x+$rinfo->{size}, $y+$rinfo->{size},
+ $x-$rinfo->{size}, $y+$rinfo->{size});
+
+} # end ruler_make_tab
+
+sub ruler_move_tab {
+
+ my($c, $rinfo) = @_;
+
+ return if not defined $c->find('withtag', 'active');
+ my $e = $c->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ my $cx = $c->canvasx($x, $rinfo->{grid});
+ my $cy = $c->canvasy($y);
+ if ($cx < $rinfo->{left}) {
+ $cx = $rinfo->{left};
+ }
+ if ($cx > $rinfo->{right}) {
+ $cx = $rinfo->{right};
+ }
+ if (($cy >= $rinfo->{top}) and ($cy <= $rinfo->{bottom})) {
+ $cy = $rinfo->{top} + 2;
+ $c->itemconfigure('active', @{$rinfo->{activeStyle}});
+ } else {
+ $cy = $cy - $rinfo->{size} - 2;
+ $c->itemconfigure('active', @{$rinfo->{deleteStyle}});
+ }
+ $c->move('active', $cx-$rinfo->{'x'}, $cy-$rinfo->{'y'});
+ $rinfo->{'x'} = $cx;
+ $rinfo->{'y'} = $cy;
+
+} # end ruler_move_tab
+
+sub ruler_new_tab {
+
+ my($c, $rinfo) = @_;
+
+ my $e = $c->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ $c->addtag('active', 'withtag', ruler_make_tab($c, $x, $y, $rinfo));
+ $c->addtag('tab', 'withtag', 'active');
+ $rinfo->{'x'} = $x;
+ $rinfo->{'y'} = $y;
+ ruler_move_tab($c, $rinfo);
+
+} # end ruler_new_tab
+
+sub ruler_release_tab {
+
+ my($c, $rinfo) = @_;
+
+ return if not defined $c->find('withtag', 'active');
+ if ($rinfo->{'y'} != $rinfo->{top} + 2) {
+ $c->delete('active');
+ } else {
+ $c->itemconfigure('active', @{$rinfo->{normalStyle}});
+ $c->dtag('active');
+ }
+
+} # end ruler_release_tab
+
+sub ruler_select_tab {
+
+ my($c, $rinfo) = @_;
+
+ my $e = $c->XEvent;
+ my($x, $y) = ($e->x, $e->y);
+ $rinfo->{'x'} = $c->canvasx($x, $rinfo->{grid});
+ $rinfo->{'y'} = $rinfo->{top} + 2;
+ $c->addtag('active', 'withtag', 'current');
+ $c->itemconfigure('active', @{$rinfo->{activeStyle}});
+ $c->raise('active');
+
+} # end ruler_select_tab
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/sayings.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/sayings.pl
new file mode 100644
index 00000000000..cd9ec5bd898
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/sayings.pl
@@ -0,0 +1,48 @@
+# sayings.pl
+
+use vars qw/$TOP/;
+
+sub sayings {
+
+ # Create a top-level window containing a listbox with a bunch of
+ # well-known sayings. The listbox can be scrolled or scanned in
+ # two dimensions.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'The listbox below contains a collection of well-known sayings. You can scan the list using either of the scrollbars or by dragging in the listbox window with button 2 pressed.',
+ -title => 'Listbox Demonstration (well-known sayings)',
+ -iconname => 'sayings',
+ );
+
+ my $list = $TOP->Scrolled(qw/Listbox -width 20 -height 10 -setgrid 1
+ -scrollbars se/);
+ $list->pack(qw/-expand yes -fill y/);
+ $list->focus;
+
+ $list->insert(0,
+ 'Waste not, want not',
+ 'Early to bed and early to rise makes a man healthy, wealthy, and wise',
+ 'Ask not what your country can do for you, ask what you can do for your country',
+ 'I shall return',
+ 'NOT',
+ 'A picture is worth a thousand words',
+ 'User interfaces are hard to build',
+ 'Thou shalt not steal',
+ 'A penny for your thoughts',
+ 'Fool me once, shame on you; fool me twice, shame on me',
+ 'Every cloud has a silver lining',
+ 'Where there\'s smoke there\'s fire',
+ 'It takes one to know one',
+ 'Take this job and shove it',
+ 'Up a creek without a paddle',
+ 'I\'m mad as hell and I\'m not going to take it any more',
+ 'An apple a day keeps the doctor away',
+ 'Don\'t look a gift horse in the mouth');
+
+ $list->activate(0);
+
+} # end sayings
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/search.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/search.pl
new file mode 100644
index 00000000000..ddc42213a0f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/search.pl
@@ -0,0 +1,177 @@
+# search.pl
+
+use Tk::LabEntry;
+use subs qw/search_flash_matches search_load_file search_text/;
+use vars qw/$TOP/;
+
+sub search {
+
+ # Create a top-level window with a text widget that allows you to load a
+ # file and highlight all instances of a given string. A LabEntry widget
+ # is used to collect the file name and search string.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text =>'',
+ -title => 'Text Demonstration - Search and Highlight',
+ -iconname => 'search',
+ );
+
+ my $file_name = '';
+ my $file = $TOP->Frame;
+ my $fn = $file->LabEntry(-label => 'File Name: ', -width => 40,
+ -labelPack => [qw/-side left -anchor w/],
+ -textvariable => \$file_name)->pack(qw/-side left/);
+ $fn->Subwidget('entry')->focus;
+ my $fn_button = $file->Button(-text => 'Load File');
+ $fn_button->pack(qw/-side left -pady 5 -padx 10/);
+
+ my $search_string = '';
+ my $kind = 'exact';
+ my $string = $TOP->Frame;
+ my $ss = $string->LabEntry(-label => 'Search string:', -width => 40,
+ -labelPack => [qw/-side left -anchor w/],
+ -textvariable => \$search_string)->pack(qw/-side left/);
+ my $ss_button = $string->Button(-text => 'Highlight');
+ $ss_button->pack(qw/-side left -pady 5 -padx 10/);
+
+ my $text = $TOP->Scrolled(qw/Text -setgrid true -scrollbars e/);
+
+ my $subframe = $TOP->Frame;
+ my $exact = $subframe->Radiobutton(-text => 'Exact match',
+ -variable => \$kind,
+ -value => 'exact');
+ my $regexp = $subframe->Radiobutton(-text => 'Regular expression',
+ -variable => \$kind,
+ -value => 'regexp');
+ $exact->pack(qw/-side left/, -fill => 'x');
+ $regexp->pack(qw/-side right/, -fill => 'x');
+
+ $file->pack(qw/-side top -fill x/);
+ $string->pack(qw/-side top -fill x/);
+ $subframe->pack(qw/-side top -fill x/);
+ $text->pack(qw/-expand yes -fill both/);
+
+ my $command = sub {search_load_file $text, \$file_name, $ss};
+ $fn_button->configure(-command => $command);
+ $fn->bind('<Return>' => $command);
+
+ $command = sub {search_text $text, \$search_string, 'search', $kind};
+ $ss_button->configure(-command => $command);
+ $ss->bind('<Return>' => $command);
+
+ # Set up display styles for text highlighting.
+
+ if ($TOP->depth > 1) {
+ search_flash_matches $text,
+ ['configure', 'search',
+ -background => '#ce5555', -foreground => 'white'], 800,
+ ['configure', 'search',
+ -background => undef, -foreground => undef], 200;
+ } else {
+ search_flash_matches $text,
+ ['configure', 'search',
+ -background => 'black', -foreground => 'white'], 800,
+ ['configure', 'search',
+ -background => undef, -foreground => undef], 200;
+ }
+
+ $text->insert('0.0', 'This window demonstrates how to use the tagging facilities in text
+widgets to implement a searching mechanism. First, type a file name
+in the top entry, then type <Return> or click on "Load File". Then
+type a string in the lower entry and type <Return> or click on
+"Highlight". This will cause all of the instances of the string to
+be tagged with the tag "search", and it will arrange for the tag\'s
+display attributes to change to make all of the strings blink.');
+
+ $text->mark(qw/set insert 0.0/);
+
+} # end search
+
+sub search_flash_matches {
+
+ # The procedure below is invoked repeatedly to invoke two commands at
+ # periodic intervals. It normally reschedules itself after each execution
+ # but if an error occurs (e.g. because the window was deleted) then it
+ # doesn't reschedule itself.
+ # Arguments:
+ #
+ # w - Text widget reference.
+ # cmd1 - Reference to a list of tag options.
+ # sleep1 - Ms to sleep after executing cmd1 before executing cmd2.
+ # cmd2 - Reference to a list of tag options.
+ # sleep2 - Ms to sleep after executing cmd2 before executing cmd1 again.
+
+ my($w, $cmd1, $sleep1, $cmd2, $sleep2) = @_;
+
+ $w->tag(@{$cmd1});
+ $w->after($sleep1,
+ [\&search_flash_matches, $w, $cmd2, $sleep2, $cmd1, $sleep1]);
+
+} # end search_flash_matches
+
+sub search_load_file {
+
+ # The utility procedure below loads a file into a text widget, discarding
+ # the previous contents of the widget. Tags for the old widget are not
+ # affected, however.
+ # Arguments:
+ #
+ # w - The window into which to load the file. Must be a text widget.
+ # file - Reference to the name of the file to load. Must be readable.
+ # e - Entry widget to get next focus.
+
+ my ($w, $file, $e) = @_;
+
+ my ($buf, $bytes) = ('', 0);
+
+ if (not open(F, "<$$file")) {
+ $MW->Dialog(
+ -title => 'File Not Found',
+ -text => "$!: '$$file'",
+ -bitmap => 'error',
+ )->Show;
+ return;
+ }
+ $w->delete(qw/1.0 end/);
+ $bytes = read F, $buf, 10_000; # after all, it IS just an example
+ $w->insert('end', $buf);
+ if ($bytes == 10000) {
+ $w->insert('end', "\n\n**************** File truncated at 10,000 bytes! ****************\n");
+ }
+ close F;
+
+ $e->Subwidget('entry')->focus;
+
+} # end search_load_file
+
+sub search_text {
+
+ # The utility procedure below searches for all instances of a given
+ # string in a text widget and applies a given tag to each instance found.
+ # Arguments:
+ #
+ # w - The window in which to search. Must be a text widget.
+ # string - Reference to the string to search for. The search is done
+ # using exact matching only; no special characters.
+ # tag - Tag to apply to each instance of a matching string.
+
+ my($w, $string, $tag, $kind) = @_;
+
+ return unless ref($string) && length($$string);
+
+ $w->tagRemove($tag, qw/0.0 end/);
+ my($current, $length) = ('1.0', 0);
+
+ while (1) {
+ $current = $w->search(-count => \$length, "-$kind", $$string, $current, 'end');
+ last if not $current;
+ warn "Posn=$current count=$length\n",
+ $w->tagAdd($tag, $current, "$current + $length char");
+ $current = $w->index("$current + $length char");
+ }
+
+} # end search_text
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/showVars.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/showVars.pl
new file mode 100644
index 00000000000..0130ccd153b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/showVars.pl
@@ -0,0 +1,37 @@
+
+
+sub showVars {
+
+ # Create a top-level window that displays a bunch of global variable values
+ # and keeps the display up-to-date even when the variables change value.
+ #
+ # Arguments:
+ # w - Perl widget reference of parent.
+ # vars - Name of variable(s) to monitor.
+
+ $showVars->destroy if Exists($showVars);
+ $showVars = shift->Toplevel();
+ my $w = $showVars;
+ dpos($w);
+ $w->title('Variable values');
+ $w->iconname('Variables');
+
+ my $w_title = $w->Label(-text => 'Variable values:', -width => 20, -anchor, 'center',
+ -font => '-Adobe-helvetica-medium-r-normal--*-180-*-*-*-*-*-*');
+ $w_title->pack(-fill => 'x');
+ my $i;
+ foreach $i (@_) {
+ my $w_i = $w->Frame();
+ my $w_i_name = $w_i->Label(-text => "$i: ");
+ my $w_i_value = $w_i->Label(-textvariable => \${$i});
+ $w_i_name->pack(-side => 'left');
+ $w_i_value->pack(-side => 'left');
+ $w_i->pack(-side => 'top', -anchor => 'w');
+ }
+ $w->Button(-text => 'OK', -command => [$w => 'destroy'])->
+ pack(-side => 'bottom', -pady => 2);
+
+} # end showVars
+
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/slide.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/slide.pl
new file mode 100644
index 00000000000..7bd31a0b369
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/slide.pl
@@ -0,0 +1,178 @@
+# slide.pl
+
+$Tk::SlideSwitch::VERSION = '1.1';
+
+package Tk::SlideSwitch;
+
+use Tk;
+use Tk::widgets qw/Label Scale/;
+use base qw/Tk::Frame/;
+use strict;
+
+Construct Tk::Widget 'SlideSwitch';
+
+sub Populate {
+
+ my($self, $args) = @_;
+
+ $self->SUPER::Populate($args);
+
+ my $ll = $self->Label->pack(-side => 'left');
+ my $sl = $self->Scale->pack(-side => 'left');
+ my $rl = $self->Label->pack(-side => 'left');
+
+ $self->ConfigSpecs(
+ -command => [$sl, qw/command Command /],
+ -from => [$sl, qw/from From 0/],
+ -highlightthickness => [$sl,
+ qw/highlightThickness HighlightThickness 0/],
+ -length => [$sl, qw/length Length 30/],
+ -llabel => [qw/METHOD llabel Llabel /],
+ -orient => [$sl, qw/orient Orient horizontal/],
+ -rlabel => [qw/METHOD rlabel Rlabel /],
+ -showvalue => [$sl, qw/showValue ShowValue 0/],
+ -sliderlength => [$sl, qw/sliderLength SliderLength 15/],
+ -sliderrelief => [$sl, qw/sliderRelief SliderRelief raised/],
+ -to => [$sl, qw/to To 1/],
+ -troughcolor => [$sl, qw/troughColor TroughColor /],
+ -width => [$sl, qw/width Width 8/],
+ -variable => [$sl, qw/variable Variable /],
+ 'DEFAULT' => [$ll, $rl],
+ );
+
+ $self->{ll} = $ll;
+ $self->{sl} = $sl;
+ $self->{rl} = $rl;
+
+ $self->bind('<Configure>' => sub {
+ my ($self) = @_;
+ my $orient = $self->cget(-orient);
+ return if $orient eq 'horizontal';
+ my ($ll, $sl, $rl) = ($self->{ll}, $self->{sl}, $self->{rl});
+ $ll->packForget;
+ $sl->packForget;
+ $rl->packForget;
+ $ll->pack;
+ $sl->pack;
+ $rl->pack;
+ });
+
+} # end Populate
+
+# Private methods and subroutines.
+
+sub llabel {
+ my ($self, $args) = @_;
+ $self->{ll}->configure(@$args);
+} # end llabel
+
+sub rlabel {
+ my ($self, $args) = @_;
+ $self->{rl}->configure(@$args);
+} # end rlabel
+
+1;
+
+package main;
+
+use vars qw / $TOP /;
+use strict;
+
+sub slide {
+
+ my( $demo ) = @_;
+
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => "This demonstration creates a new composite SlideSwitch widget that can be either on or off. The widget is really a customized Scale widget.",
+ -title => 'A binary sliding switch',
+ -iconname => 'slide',
+ );
+
+ my $mw = $TOP;
+
+ my $sl = $mw->SlideSwitch(
+ -bg => 'gray',
+ -orient => 'horizontal',
+ -command => sub {print "Switch value is @_\n"},
+ -llabel => [-text => 'OFF', -foreground => 'blue'],
+ -rlabel => [-text => 'ON', -foreground => 'blue'],
+ -troughcolor => 'tan',
+ )->pack(qw/-side left -expand 1/);
+
+} # end slide
+
+__END__
+
+=head1 NAME
+
+Tk::SlideSwitch - a 2 position horizontal or vertical switch.
+
+=head1 SYNOPSIS
+
+ use Tk::SlideSwitch;
+
+ my $sl = $frame1->SlideSwitch(
+ -bg => 'gray',
+ -orient => 'horizontal',
+ -command => [$self => 'on'],
+ -llabel => [-text => 'OFF', -foreground => 'blue'],
+ -rlabel => [-text => 'ON', -foreground => 'blue'],
+ -troughcolor => 'tan',
+ )->pack(qw/-side left -expand 1/);
+
+=head1 DESCRIPTION
+
+Tk::SlideSwitch is a Frame based composite mega-widget featuring a binary Scale
+widget surrounded by two Label widgets. The Scale's value can be either 0 or
+1. The Labels are positioned to the left and right of the Scale if its
+orientation is horizontal, else on the top and bottom of the Scale.
+
+=head1 OPTIONS
+
+In addition to all Scale options, the following option/value pairs are
+also supported:
+
+=over 4
+
+=item B<-llabel>
+
+A reference to an array of left (or top) Label configuration options.
+
+=item B<-rlabel>
+
+A reference to an array of right (or bottom) Label configuration options.
+
+=back
+
+=head1 METHODS
+
+There are no special methods.
+
+=head1 ADVERTISED WIDGETS
+
+Component subwidgets can be accessed via the B<Subwidget> method.
+This mega widget has no advertised subwidgets.
+
+=head1 EXAMPLE
+
+See Synopsis.
+
+=head1 BUGS
+
+This widget uses only the pack geometry manager.
+
+=head1 AUTHOR
+
+sol0@Lehigh.EDU
+
+Copyright (C) 2002 - 2003, Steve Lidie. All rights reserved.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=head1 KEYWORDS
+
+SlideSwitch, Scale
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/spin.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/spin.pl
new file mode 100644
index 00000000000..f9b8c05a891
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/spin.pl
@@ -0,0 +1,36 @@
+# spin.pl
+
+use vars qw/$TOP/;
+
+sub spin {
+
+ # This demonstration script creates several spinbox widgets.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['Three different spin-boxes are displayed below. You can add characters by pointing, clicking and typing. The normal Motif editing characters are supported, along with many Emacs bindings. For example, Backspace and Control-h delete the character to the left of the insertion cursor and Delete and Control-d delete the chararacter to the right of the insertion cursor. For values that are too large to fit in the window all at once, you can scan through the value by dragging with mouse button2 pressed. Note that the first spin-box will only permit you to type in integers, and the third selects from a list of Australian cities.',
+ -wraplength => '5i'],
+ -title => 'Spinbox Demonstration',
+ -iconname => 'spin',
+ );
+
+ my $s1 = $TOP->Spinbox(
+ qw/-from 1 -to 10 -width 10 -validate key/,
+ -validatecommand => sub {
+ my ($proposed, $changes, $current, $index, $type) = @_;
+ return not $proposed =~ m/[^\d]/g;
+ },
+ );
+ my $s2 = $TOP->Spinbox(
+ qw/-from 0 -to 3 -increment .5 -format %05.2f -width 10/,
+ );
+ my $s3 = $TOP->Spinbox(
+ -values => [qw/Canberra Sydney Melbourne Perth Adelaide Brisbane Hobart
+ Darwin/, 'Alice Springs'],
+ -width => 10,
+ );
+
+ $s1->pack($s2, $s3, qw/-side top -pady 5 -padx 10/);
+
+} # end spin.pl
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/states.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/states.pl
new file mode 100644
index 00000000000..b9b350df952
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/states.pl
@@ -0,0 +1,28 @@
+# states.pl
+
+use vars qw/$TOP/;
+
+sub states {
+
+ # Create a top-level window that displays a listbox with the names of the
+ # 50 states.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'A listbox containing the 50 states is displayed below, along with a scrollbar. You can scan the list either using the scrollbar or by scanning. To scan, press button 2 in the widget and drag up or down.',
+ -title => 'Listbox Demonstration (50 states)',
+ -iconname => 'states',
+ );
+
+ my $list = $TOP->Scrolled(qw/Listbox -setgrid 1 -height 12 -scrollbars e/);
+ $list->pack(qw/-side left -expand yes -fill both/);
+ $list->focus;
+
+ $list->insert(0, qw/Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada/, 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', qw/Ohio Oklahoma Oregon Pennsylvania/, 'Rhode Island', 'South Carolina', 'South Dakota', qw/Tennessee Texas Utah Vermont Virginia Washington/, 'West Virginia', 'Wisconsin', 'Wyoming');
+
+ $list->activate(0);
+
+} # end states
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/style.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/style.pl
new file mode 100644
index 00000000000..d7fd82112ea
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/style.pl
@@ -0,0 +1,154 @@
+# style.pl
+
+use vars qw/$TOP/;
+
+sub style {
+
+ # Create a top-level window with a text widget that demonstrates
+ # the various display styles that are available in texts.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text =>'',
+ -title => 'Text Demonstration - Display Styles',
+ -iconname => 'style',
+ );
+
+ eval { # eval, in case fonts already exist
+ $TOP->fontCreate(qw/C_small -family courier -size 10/);
+ $TOP->fontCreate(qw/C_big -family courier -size 14 -weight bold/);
+ $TOP->fontCreate(qw/C_vbig -family helvetica -size 24 -weight bold/);
+ $TOP->fontCreate(qw/C_bold -family courier -size 12 -weight bold
+ -slant italic/);
+ };
+
+ my $t = $TOP->Scrolled(qw/Text -setgrid true -width 70 -height 32
+ -font normal -wrap word -scrollbars e/);
+ $t->pack(qw/-expand yes -fill both/);
+
+ # Set up display styles.
+
+ $t->tag(qw/configure bold -font C_bold/);
+ $t->tag(qw/configure big -font C_big/);
+ $t->tag(qw/configure verybig -font C_vbig/);
+ if ($TOP->depth > 1) {
+ $t->tag(qw/configure color1 -background/ => '#a0b7ce');
+ $t->tag(qw/configure color2 -foreground red/);
+ $t->tag(qw/configure raised -relief raised -borderwidth 1/);
+ $t->tag(qw/configure sunken -relief sunken -borderwidth 1/);
+ } else {
+ $t->tag(qw/configure color1 -background black -foreground white/);
+ $t->tag(qw/configure color2 -background black -foreground white/);
+ $t->tag(qw/configure raised -background white -relief raised -bd 1/);
+ $t->tag(qw/configure sunken -background white -relief sunken -bd 1/);
+ }
+ $t->tag(qw/configure bgstipple -background black -borderwidth 0
+ -bgstipple gray12/);
+ $t->tag(qw/configure fgstipple -fgstipple gray50/);
+ $t->tag(qw/configure underline -underline on/);
+ $t->tag(qw/configure overstrike -overstrike on/);
+ $t->tag(qw/configure right -justify right/);
+ $t->tag(qw/configure center -justify center/);
+ $t->tag(qw/configure super -offset 4p -font C_small/);
+ $t->tag(qw/configure sub -offset -2p -font C_small/);
+ $t->tag(qw/configure margins -lmargin1 12m -lmargin2 6m -rmargin 10m/);
+ $t->tag(qw/configure spacing -spacing1 10p -spacing2 2p
+ -lmargin1 12m -lmargin2 6m -rmargin 10m/);
+
+ $t->insert('0.0', 'Text widgets like this one allow you to display ' .
+ 'information in a variety of styles. Display styles are ' .
+ 'controlled using a mechanism called ');
+ $t->insert('insert', 'tags', 'bold');
+ $t->insert('insert', '. Tags are just textual names that you can apply ' .
+ 'to one or more ranges of characters within a text widget. ' .
+ 'You can configure tags with various display styles. If ' .
+ 'you do this, then the tagged characters will be displayed ' .
+ 'with the styles you chose. The available display styles ' .
+ 'are: ');
+ $t->insert('insert', "\n\n1. Font.", 'big');
+ $t->insert('insert', ' You can choose any X font, ');
+ $t->insert('insert', 'large', 'verybig');
+ $t->insert('insert', ' or small.');
+ $t->insert('insert', "\n\n2. Color.", 'big');
+ $t->insert('insert', ' You can change either the ');
+ $t->insert('insert', 'background', 'color1');
+ $t->insert('insert', ' or ');
+ $t->insert('insert', 'foreground', 'color2');
+ $t->insert('insert', "\ncolor, or ");
+ $t->insert('insert', 'both', ['color1', 'color2']);
+ $t->insert('insert', '.');
+ $t->insert('insert', "\n\n3. Stippling.", 'big');
+ $t->insert('insert', ' You can cause either the ');
+ $t->insert('insert', 'background', 'bgstipple');
+ $t->insert('insert', ' or ');
+ $t->insert('insert', 'foreground', 'fgstipple');
+ $t->insert('insert', "\ninformation to be drawn with a stipple fill instead of a solid fill.");
+ $t->insert('insert', "\n\n4. Underlining.", 'big');
+ $t->insert('insert', ' You can ');
+ $t->insert('insert', 'underline', 'underline');
+ $t->insert('insert', ' ranges of text.');
+ $t->insert('insert', "\n\n5. Overstrikes.", 'big');
+ $t->insert('insert', " You can ");
+ $t->insert('insert', "draw lines through", 'overstrike');
+ $t->insert('insert', " ranges of text.");
+ $t->insert('insert', "\n\n6. 3-D effects.", ' big');
+ $t->insert('insert', " You can arrange for the background to be drawn ");
+ $t->insert('insert', 'with a border that makes characters appear either ');
+ $t->insert('insert', 'raised', 'raised');
+ $t->insert('insert', ' or ');
+ $t->insert('insert', 'sunken', 'sunken');
+ $t->insert('insert', '.');
+ $t->insert('insert', "\n\n7. Justification.", 'big');
+ $t->insert('insert', " You can arrange for lines to be displayed\n");
+ $t->insert('insert', "left-justified,\n");
+ $t->insert('insert', "right-justified, or\n", 'right');
+ $t->insert('insert', "centered.", 'center');
+ $t->insert('insert', "\n\n8. Superscripts and subscripts." , 'big');
+ $t->insert('insert', " You can control the vertical ");
+ $t->insert('insert', "position of text to generate superscript effects " .
+ "like 10");
+ $t->insert('insert', "n", 'super');
+ $t->insert('insert', " or subscript effects like X");
+ $t->insert('insert', "i", 'sub');
+ $t->insert('insert', ".");
+ $t->insert('insert', "\n\n9. Margins.", 'big');
+ $t->insert('insert', " You can control the amount of extra space left");
+ $t->insert('insert', " on\neach side of the text:\n");
+ $t->insert('insert', "This paragraph is an example of the use of ", 'margins');
+ $t->insert('insert', "margins. It consists of a single line of text ", 'margins');
+ $t->insert('insert', "that wraps around on the screen. There are two ", 'margins');
+ $t->insert('insert', "separate left margin values, one for the first ", 'margins');
+ $t->insert('insert', "display line associated with the text line, ", 'margins');
+ $t->insert('insert', "and one for the subsequent display lines, which ", 'margins');
+ $t->insert('insert', "occur because of wrapping. There is also a ", 'margins');
+ $t->insert('insert', "separate specification for the right margin, ", 'margins');
+ $t->insert('insert', "which is used to choose wrap points for lines.", 'margins');
+
+ $t->insert('insert', "\n\n10. Spacing.", 'big');
+ $t->insert('insert', " You can control the spacing of lines with three ");
+ $t->insert('insert', "separate parameters. \"Spacing1\" tells how much ");
+ $t->insert('insert', "extra space to leave\nabove a line, \"spacing3\" ");
+ $t->insert('insert', "tells how much space to leave below a line,\nand ");
+ $t->insert('insert', "if a text line wraps, \"spacing2\" tells how much ");
+ $t->insert('insert', "space to leave\nbetween the display lines that ");
+ $t->insert('insert', "make up the text line.\n");
+ $t->insert('insert', "These indented paragraphs illustrate how spacing ", 'spacing');
+ $t->insert('insert', "can be used. Each paragraph is actually a ", 'spacing');
+ $t->insert('insert', "single line in the text widget, which is ", 'spacing');
+ $t->insert('insert', "word-wrapped by the widget.\n", 'spacing');
+ $t->insert('insert', "Spacing1 is set to 10 points for this text, ", 'spacing');
+ $t->insert('insert', "which results in relatively large gaps between ", 'spacing');
+ $t->insert('insert', "the paragraphs. Spacing2 is set to 2 points, ", 'spacing');
+ $t->insert('insert', "which results in just a bit of extra space ", 'spacing');
+ $t->insert('insert', "within a pararaph. Spacing3 isn't used ", 'spacing');
+ $t->insert('insert', "in this example.\n", 'spacing');
+ $t->insert('insert', "To see where the space is, select ranges of ", 'spacing');
+ $t->insert('insert', "text within these paragraphs. The selection ", 'spacing');
+ $t->insert('insert', "highlight will cover the extra space.", 'spacing');
+
+ $t->mark(qw/set insert 0.0/);
+
+} # end style
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/texts.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/texts.pl
new file mode 100644
index 00000000000..3a2dc0115d8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/texts.pl
@@ -0,0 +1,71 @@
+# texts.pl
+
+use vars qw/$TOP/;
+
+sub texts {
+
+ # Create a top-level window that displays a basic text widget.
+
+ my ($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => '',
+ -title => 'Text Demonstration - Basic Facilities',
+ -iconname => 'texts',
+ );
+
+ my $t = $TOP->Scrolled(qw/Text -relief sunken -borderwidth 2 -setgrid true
+ -height 30 -scrollbars e/);
+ $t->pack(qw/-expand yes -fill both/);
+
+ $t->insert('0.0', 'This window is a text widget. It displays one or more lines of text
+and allows you to edit the text. Here is a summary of the things you
+can do to a text widget:
+
+1. Scrolling. Use the scrollbar to adjust the view in the text window.
+
+2. Scanning. Press mouse button 2 in the text window and drag up or down.
+This will drag the text at high speed to allow you to scan its contents.
+
+3. Insert text. Press mouse button 1 to set the insertion cursor, then
+type text. What you type will be added to the widget.
+
+4. Select. Press mouse button 1 and drag to select a range of characters.
+Once you\'ve released the button, you can adjust the selection by pressing
+button 1 with the shift key down. This will reset the end of the
+selection nearest the mouse cursor and you can drag that end of the
+selection by dragging the mouse before releasing the mouse button.
+You can double-click to select whole words or triple-click to select
+whole lines.
+
+5. Delete and replace. To delete text, select the characters you\'d like
+to delete and type Backspace or Delete. Alternatively, you can type new
+text, in which case it will replace the selected text.
+
+6. Copy the selection. To copy the selection into this window, select
+what you want to copy (either here or in another application), then
+click button 2 to copy the selection to the point of the mouse cursor.
+
+7. Edit. Text widgets support the standard Motif editing characters
+plus many Emacs editing characters. Backspace and Control-h erase the
+character to the left of the insertion cursor. Delete and Control-d
+erase the character to the right of the insertion cursor. Meta-backspace
+deletes the word to the left of the insertion cursor, and Meta-d deletes
+the word to the right of the insertion cursor. Control-k deletes from
+the insertion cursor to the end of the line, or it deletes the newline
+character if that is the only thing left on the line. Control-o opens
+a new line by inserting a newline character to the right of the insertion
+cursor. Control-t transposes the two characters on either side of the
+insertion cursor.
+
+7. Resize the window. This widget has been configured with the "setGrid"
+option on, so that if you resize the window it will always resize to an
+even number of characters high and wide. Also, if you make the window
+narrow you can see that long lines automatically wrap around onto
+additional lines so that all the information is always visible.');
+
+ $t->mark(qw/set insert 0.0/);
+
+} # end texts
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace1.pl
new file mode 100644
index 00000000000..eba655c7ba0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace1.pl
@@ -0,0 +1,49 @@
+# trace1.pl
+
+use Tk::widgets qw/ Trace /;
+use vars qw/ $TOP /;
+use strict;
+
+sub trace1 {
+
+ my( $demo ) = @_;
+
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => "This demonstration animates an analog display as you move the Scale's slider.",
+ -title => 'Move a meter tied to a variable',
+ -iconname => 'trace1',
+ );
+
+ my $mw = $TOP;
+ my $v; # variable to trace
+
+ my $c = $mw->Canvas(qw/-width 200 -height 110 -bd 2 -relief sunken/)->grid;
+ $c->createLine(qw/ 100 100 10 100 -tag meter -arrow last -width 5/);
+ my $s = $mw->Scale(qw/-orient h -from 0 -to 100 -variable/ => \$v)->grid;
+ $mw->Label(-text => 'Slide Me')->grid;
+
+ # Trace $v when written. The callback is supplied three explicit arguments:
+ # the index if an array or hash, else undef, the proposed new value, and the
+ # trace operation (rwu) for read, write, undef, respectively. Additionally,
+ # we pass the Canvas and Scale widget references.
+
+ $mw->traceVariable(\$v, 'w' => [\&trace1_update_meter, $c, $s]);
+
+} # end trace1
+
+sub trace1_update_meter {
+
+ my( $index, $value, $op, $c, $s ) = @_;
+
+ return if $op eq 'u';
+
+ my($min, $max) = ($s->cget(-from), $s->cget(-to));
+ my $pos = $value / abs($max - $min);
+ my $pi = 3.1415926;
+ my $x = 100.0 - 90.0 * (cos( $pos * $pi ));
+ my $y = 100.0 - 90.0 * (sin( $pos * $pi ));
+ $c->coords(qw/meter 100 100/, $x, $y);
+ return $value;
+
+ } # end trace1_update_meter
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace2.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace2.pl
new file mode 100644
index 00000000000..9d7c38806d5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/trace2.pl
@@ -0,0 +1,188 @@
+# trace2.pl
+
+$Tk::TraceText::VERSION = '1.0';
+
+package Tk::TraceText;
+
+use Tk::widgets qw/ Trace /;
+use base qw/ Tk::Derived Tk::Text /;
+use strict;
+
+Construct Tk::Widget 'TraceText';
+
+sub Populate {
+
+ my( $self, $args ) = @_;
+
+ $self->SUPER::Populate( $args );
+
+ $self->ConfigSpecs(
+ -textvariable => [ 'METHOD', 'textVariable', 'TextVariable', undef ],
+ );
+
+ $self->OnDestroy( sub {
+ my $vref = $self->{_vref};
+ $self->traceVdelete ( $vref ) if defined $vref;
+ } );
+
+} # end Populate
+
+# Private methods.
+
+sub insdel {
+
+ my( $self, $sub, @args ) = @_;
+
+ $self->{_busy} = 1;
+ $self->$sub( @args );
+ my $vref = $self->{_vref};
+ $$vref = $self->get( qw/1.0 end/ );
+ $self->{_busy} = 0;
+
+} # end insedel
+
+sub textvariable {
+
+ my ( $self, $vref ) = @_;
+
+ $self->traceVariable( $vref, 'w', [ \&tracew => $self, $vref ] );
+ $self->{_vref} = $vref;
+
+} # end textvariable
+
+sub tracew {
+
+ my ( $index, $value, $op, $self, $vref ) = @_;
+
+ return unless defined $self; # if app is being destroyed
+ return if $self->{_busy};
+
+ if ( $op eq 'w' ) {
+ $self->delete( qw/1.0 end/ );
+ $self->insert( '1.0', $value );
+ } elsif ( $op eq 'r' ) {
+ } elsif ( $op eq 'u' ) {
+ $self->traceVdelete ( $vref );
+ }
+
+} # end tracew
+
+# Overridden methods.
+
+sub delete {
+
+ my ( $self, @args ) = @_;
+
+ $self->insdel( 'SUPER::delete', @args )
+
+} # end delete
+
+sub insert {
+
+ my ( $self, @args ) = @_;
+
+ $self->insdel( 'SUPER::insert', @args );
+
+} # end insert
+
+1;
+
+package main;
+
+use Tk::widgets qw/ Trace /;
+use vars qw / $TOP /;
+use strict;
+
+sub trace2 {
+
+ my( $demo ) = @_;
+
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => "This demonstration derives a new Text widget whose contents are modified using a normal Perl variable.",
+ -title => 'Contents of a Text widget tied to a variable',
+ -iconname => 'trace2',
+ );
+
+ my $mw = $TOP;
+ my $tt = $mw->Scrolled( 'TraceText', -textvariable => \my $frog )->grid;
+ $tt->focus;
+
+ $mw->traceVariable( \$frog, 'wu', [ \&trace2_tracefrog, $mw, \$frog ] );
+
+ $frog = "Frogs lacking lipophores are blue.";
+
+} # end trace2
+
+sub trace2_tracefrog {
+
+ my( $index, $value, $op ) = @_;
+
+ print "Final " if $op eq 'u';
+ print "User trace: $value";
+ return $value;
+
+}
+
+__END__
+
+=head1 NAME
+
+Tk::TraceText - Text contents defined by a traced variable.
+
+=for pm Tk/TraceText.pm
+
+=for category Text
+
+=head1 SYNOPSIS
+
+ $tt = $parent->TraceText(-option => value, ... );
+
+=head1 DESCRIPTION
+
+Create a new B<TraceText> widget that is derived from the standard B<Text>
+widget. Because it inherits all the base options and methods it behaves
+just like a B<Text> widget. Additionally, B<TraceText> adds a -textvariable
+option, which is a reference to a Perl scalar that defines the contents of
+the widget.
+
+Based on the Tcl/Tk TracedText "overridden widget" by Kevin Kenny.
+
+=over 4
+
+=item B<-textvariable>
+
+A scalar reference. The value of the variable defines the contents of the
+TraceText widget. Using the keyboard to insert or delete text changes the
+value of the variable, and changing the variable alters the contents of the
+TraceText widget.
+
+=back
+
+=head1 METHODS
+
+Standard Text widget methods.
+
+=head1 ADVERTISED SUBWIDGETS
+
+None.
+
+=head1 EXAMPLE
+
+ my $tt = $mw->TraceText( -textvariable => \$scalar );
+
+=head1 AUTHOR
+
+Stephen.O.Lidie@Lehigh.EDU
+
+Copyright (C) 2003 - 2004, Steve Lidie. All rights reserved.
+
+This program is free software; you can redistribute it
+and/or modify it under the same terms as Perl itself.
+
+=head1 KEYWORDS
+
+text, trace
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/transtile.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/transtile.pl
new file mode 100644
index 00000000000..55e7130a1af
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/transtile.pl
@@ -0,0 +1,113 @@
+# transtile.pl
+
+use vars qw/$TOP/;
+
+sub transtile {
+
+ # Create a top-level window that demonstrates tiles
+ # and transparent stuff.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => ['This window demonstrates tiles and transparent images. The Canvas has a yellow background, which displays for one second before it\'s overlayed with a tile of tiny camels. On top of the tile layer are three non-transparent images that obscure the tile. Canvas items such as ovals, rectangles and polygons cannot react to bound events unless they are filled with a color - move the cursor over the blue circle and note that it reacts to <Motion> events. The transparent circle outlined in red to the left of the blue circle does not react to <Motion> events in its interior because it\'s transparent, or unfilled. If you need a transparent item that also reacts to events then add a transparent stipple. The bottom red circle is both transparent and aware of events. Finally, a blue lattice (a transparent GIF that\'s been Base64 encoded so it can be embedded in the source) is overlayed on top of everything, anchored to the southeast corner of the Canvas.', -wraplength => '8i'],
+ -title => 'Tile and Transparent Demonstration',
+ -iconname => 'transtile',
+ );
+
+ my $tile = $TOP->Photo(-file =>Tk->findINC('Camel.xpm'));
+
+ # A tiled Canvas - the tile overlays the background color.
+
+ my $c = $TOP->Canvas(
+ -background => 'yellow',
+ -width => 300,
+ -height => 250,
+ -relief => 'raised',
+ -borderwidth => 3,
+ )->grid;
+ $c->update;
+ $c->after(1000);
+ $c->configure(-tile => $tile);
+
+ # These images are not transparent, thus they obscure the tile
+ # or background.
+
+ my($x, $y) = (30, 30);
+ foreach (qw/Xcamel.gif anim.gif icon.gif/) {
+ $c->createImage($x, $y, -image => $TOP->Photo(-file => Tk->findINC($_)));
+ $x += 50;
+ $y += 50;
+ }
+
+ # Transparent Canvas items do not generate events.
+
+ my $cb = sub {
+ print "Over circle, args = @_!\n";
+ };
+
+ # Not filled (transparent), no events.
+
+ my $o1 = $c->createOval(25, 25, 100, 100,
+ -outline => 'red',
+ );
+ $c->bind($o1, '<Motion>' => $cb);
+
+ # Filled (non-transparent), but with events.
+
+ my $o2 = $c->createOval(155, 25, 225, 100,
+ -outline => 'red',
+ -fill => 'blue',
+ );
+ $c->bind($o2, '<Motion>' => $cb);
+
+ # Transparently filled, with events.
+
+ my $o3 = $c->createOval(25, 120, 100, 195,
+ -outline => 'red',
+ -fill => 'blue',
+ -stipple => 'transparent',
+ );
+ $c->bind($o3, '<Motion>' => $cb);
+
+ # A transparent GIF overlaying everything.
+
+ $c->createImage(300, 300,
+ -image => $TOP->Photo(-data => &encoded_gif, -format => 'gif'),
+ -anchor => 'se',
+ );
+
+} # end transtile
+
+sub encoded_gif {
+
+ # A Base64 encoded transparent GIF.
+
+ my $gif = <<'END_OF_GIF';
+R0lGODlhyADIAIAAAB0A/////yH+Dk1hZGUgd2l0aCBHSU1QACH5BAEKAAEALAAAAADIAMgAAAL+
+jI+py+0Po5y02ouz3rz7D4biSJbmiabqCgJuC7DZK9Ly5+Zdrt8Sb+MAYzDUkKgZ+n5AXNOjLB03
+R6TQmpxeo9seSTsDZ3ldctk7fo7EGC5VnQ6+zWd5CB6mx9Ft/N6p92WXBejXt4Z1trTI4MboM/i4
+6ChZabkUeam5ydnp+QkaKjpKWmp6ipqqusoKldjqWvOqSQmbx3ebSTiH+yZrZHhR+9c3bGFcgcwb
+KMy2PBtR5cpc3DsdTCF9Tc3Efez8rUysWOgNId6NPaGNaJ6t3uweDV2t+y5/9SuLf4M+z2/rXSh7
+zQIaPIgwocKFDBs6fAgxosSJjehRHGhxB7z+ZBm/6StSrmMukec2piN4kuQDfyUBhjPZ0tpLlP9k
+cnTZgN0dcDdhOtBZz2ZKmj95asRZkWVOo+uYDlW5FOk9oU2lLlBa1KoCrFGp5gu5DWpXoit9zmNF
+lslHJxfbun0LN67cuXTr2r2LN6/evbvspj2oVcbfnoP7iR17uGK7xCl37iy81WxWxkm9xpM8GexR
+ygi4ToZc1vNVzJVBJzDdmXRmKapHBz5tGVNsgSZEV3aMsRXq0Xx7+/4NPLjw4cSLGz+OPLmK3b5f
+p3COinlN6QGo21bsCfp05tqrt3bNGfZm6ojDe+/e/fzs1eNqXz/wXjwM6PHTh17fdZT2+N7+BeMv
+Wop1/ykHCnkEHohgggouyGCDDj4oCITRDQiYeYyYx598oti3wnfqkcfhPhRqeIJTMT02Im+a8fJc
+fRamll6MKRqQ4WcGFjLfjKmFBYyHJb5Io4+s3QgekAHq6J5gcBEpYZNOPglllFJO2R+V2SFpZY5M
+NvlijVXqZ+SWMHKHpXq45Yjjj0J+OV6XZfLnZZFijsRjnc+oGeI1K26WpntrRojmmbG0WOaRehmZ
+ZaKKLspoo44+CmmkksyZZIJ54kkmoAX+2aGQHF5qJylAzQRknCIKuthrXsYJYpiFRkbfq/aBSo4g
++yEaJIqUBgXMW6YGCiGtGj25q6TGHov+bLLKLstss2ziOWhc0gn7YXif4morhpyWxtmqrz57Z7hD
+flcjq1jC+S2sM8rI7rnuLucporNyWuypmy7mbK/57stvv/7+C3DAAvd1r4S/9gnSXAe3ieKG2MJn
+Im21MvwJqKPeoqeWpbpp8Z8Z3thuqCJOuy0iGmf8o70UlfswvL6m22+9A89Mc80231yXzKLKiyvJ
+OieMMp/AtjcsphZ+7LGP3oqJ9K3oxSvgpRdfNrTQRe+p67uoRlsxzEFSm9ycC+/7M85mn4122mqv
+zfZXbSOWM89rUez2hE4j2bTS3zK9Zt5kvmcuk1NP5dzghFlLb8lf6+2i39q2KnXfks8fCzTCIx89
+ude56Vv51W9/Dnrooo9Oeummn4566g4UAAA7
+END_OF_GIF
+
+ return $gif;
+
+} # end encoded_gif
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/twind.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/twind.pl
new file mode 100644
index 00000000000..5b67fa1d60a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/twind.pl
@@ -0,0 +1,186 @@
+# twind.pl
+
+use Plot;
+use subs qw/twind_create_plot twind_delete_plot twind_restore_bg/;
+use vars qw/$TOP/;
+
+sub twind {
+
+ # Create a top-level window with a text widget that demonstrates the
+ # use of embedded windows in Text widgets.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => '',
+ -title => 'Text Demonstration - Embedded Windows',
+ -iconname => 'twind',
+ );
+
+ # By default, when you create a Scrolled instance of a Perl/Tk widget
+ # the scrollbars are always displayed; that is, they are required. But
+ # you can have optional scrollbars as well, specified via the -scrollbars
+ # specifier. So, assume scrollbars can be postioned 'nsew' (north, south
+ # east or west), or 'se' for southeast, etcetera. You specify 'required'
+ # or 'optional' using an 'r' or 'o' character, respectively, preceeding
+ # the scrollbar position. So the following Scrolled widget has an
+ # optional scrollbar at the bottom of the text widget and a required
+ # scrollbar positioned to the right.
+ #
+ # Optional scrollbars are only displayed if they are required, so, the
+ # the southern scrollbar is displayed IFF -wrap => none.
+
+ my $t = $TOP->Scrolled(qw/Text -setgrid true -width 70 -height 35
+ -wrap word -highlightthickness 0 -borderwidth 0 -scrollbars osre
+ -font/ => $FONT)->pack;
+
+ $t->tag(qw/configure center -justify center -spacing1 5m -spacing3 5m/);
+ $t->tag(qw/configure buttons -lmargin1 1c -lmargin2 1c -rmargin 1c
+ -spacing1 3m -spacing2 0 -spacing3 0/);
+
+ my $t_on = $t->Button(
+ -text => 'Turn On',
+ -command => [$t => qw/configure -wrap none/],
+ -cursor => 'top_left_arrow',
+ );
+ my $t_off = $t->Button(
+ -text => 'Turn Off',
+ -command => [$t => qw/configure -wrap word/],
+ -cursor => 'top_left_arrow',
+ );
+
+ my $t_click = $t->Button(
+ -text => 'Click Here',
+ -command => [\&twind_create_plot, $t],
+ -cursor => 'top_left_arrow',
+ );
+ my $t_delete = $t->Button(
+ -text => 'Delete',
+ -command => [\&twind_delete_plot, $t],
+ -cursor => 'top_left_arrow',
+ );
+
+ $t->insert('end', "A text widget can contain other widgets embedded ");
+ $t->insert('end', "in it. These are called ");
+ $t->insert('end', "\"embedded windows\"");
+ $t->insert('end', ", and they can consist of arbitrary widgets. ");
+ $t->insert('end', "For example, here are two embedded button ");
+ $t->insert('end', "widgets. You can click on the first button to ");
+ $t->window('create', 'end', -window => $t_on);
+ $t->insert('end', " horizontal scrolling, which also turns off ");
+ $t->insert('end', "word wrapping. Or, you can click on the second ");
+ $t->insert('end', "button to\n");
+ $t->window('create', 'end', -window => $t_off);
+ $t->insert('end', " horizontal scrolling and turn back on word ");
+ $t->insert('end', "wrapping.\n\n");
+
+ $t->insert('end', "Or, here is another example. If you ");
+ $t->window('create', 'end', -window => $t_click);
+ $t->insert('end', " a canvas displaying an x-y plot will appear ");
+ $t->insert('end', "right here.");
+ $t->mark('set', 'plot', 'insert');
+ $t->mark('gravity', 'plot', 'left');
+ $t->insert('end', " You can drag the data points around with the ");
+ $t->insert('end', "mouse, or you can click here to ");
+ $t->window('create', 'end', -window => $t_delete);
+ $t->insert('end', " the plot again.\n\n");
+
+ $t->insert('end', "You may also find it useful to put embedded windows");
+ $t->insert('end', " in a text without any actual text. In this case ");
+ $t->insert('end', "the text widget acts like a geometry manager. For ");
+ $t->insert('end', "example, here is a collection of buttons laid out ");
+ $t->insert('end', "neatly into rows by the text widget. These buttons");
+ $t->insert('end', " can be used to change the background color of the ");
+ $t->insert('end', "text widget (\"Default\" restores the color to ");
+ $t->insert('end', "its default). If you click on the button labeled ");
+ $t->insert('end', "\"Short\", it changes to a longer string so that ");
+ $t->insert('end', "you can see how the text widget automatically ");
+ $t->insert('end', "changes the layout. Click on the button again ");
+ $t->insert('end', "to restore the short string.\n");
+
+ my $t_default = $t->Button(
+ -text => 'Default',
+ -command => [\&twind_restore_bg, $t],
+ -cursor => 'top_left_arrow',
+ );
+ $t->window('create', 'end', -window => $t_default, -padx => 3);
+ my $embToggle = 'Short';
+ my $t_toggle = $t->Checkbutton(
+ -textvariable => \$embToggle,
+ -indicatoron => 0,
+ -variable => \$embToggle,
+ -onvalue => 'A much longer string',
+ -offvalue => 'Short',
+ -cursor => 'top_left_arrow',
+ );
+ $t->window('create', 'end', -window => $t_toggle,
+ -padx => 3, -pady => 2);
+ my($i, $color) = (1, '');
+ foreach $color (qw(AntiqueWhite3 Bisque1 Bisque2 Bisque3 Bisque4
+ SlateBlue3 RoyalBlue1 SteelBlue2 DeepSkyBlue3
+ LightBlue1 DarkSlateGray1 Aquamarine2 DarkSeaGreen2
+ SeaGreen1 Yellow1 IndianRed1 IndianRed2 Tan1 Tan4)) {
+ my $col = $t->Button(
+ -text => "$color",
+ -cursor => 'top_left_arrow',
+ );
+ $col->configure(-command => sub {
+ $t->configure(-background => $color);
+ });
+ $t->window('create', 'end', -window => $col,
+ -padx => 3, -pady => 2);
+ $i++;
+ }
+ $t->tag('add', 'buttons', $t_default, 'end');
+
+} # end twind
+
+sub twind_create_plot {
+
+ # We are required to create a new Plot object everytime since embedded
+ # widgets are destroyed when their tag is deleted. (Too bad.)
+
+ my($text) = @_;
+
+ if (not Exists($twind::plot)) {
+ $twind::plot = $text->Plot(
+ -title_color => 'Brown',
+ -inactive_highlight => 'Skyblue2',
+ -active_highlight => 'red',
+ );
+
+ while ($text->get('plot') =~ / |\t|\n/) {
+ $text->delete('plot');
+ }
+ $text->insert('plot', "\n");
+ $text->window('create', 'plot', -window => $twind::plot);
+ $text->tag('add', 'center', 'plot');
+ $text->insert('plot', "\n");
+ } # ifend
+
+} # end twind_create_plot
+
+sub twind_delete_plot {
+
+ my($text) = @_;
+
+ if (Exists($twind::plot)) {
+ $text->delete($twind::plot);
+ while ($text->get('plot') =~ / |\t|\n/) {
+ $text->delete('plot');
+ }
+ $text->insert('plot', ' ');
+ }
+
+} # end twind_delete_plot
+
+sub twind_restore_bg {
+
+ my($text) = @_;
+
+ $text->configure(-background =>
+ ($text->Subwidget('text')->configure(-background))[3]);
+
+} # end twind_restore_bg
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/unicodeout.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/unicodeout.pl
new file mode 100644
index 00000000000..b898810fd6d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/unicodeout.pl
@@ -0,0 +1,64 @@
+# unicodeout.pl
+
+use vars qw/$TOP/;
+use subs qw/unicodeadd/;
+
+sub unicodeout {
+
+ # This demonstration script shows how you can produce output (in label
+ # widgets) using many different alphabets.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'This is a sample of Perl/Tk\'s support for languages that use non-Western character sets. However, what you will actually seebelow depends largely on what character sets you have installed, and what you see for characters that are not present varies greatly between platforms as well. The strings are written in Perl Unicode characters using the \\x{XXXX} escape sequence so as to do so in a portable fashion.',
+ -title => 'Unicode Label Demonstration',
+ -iconname => 'unicodeout',
+ );
+
+ my $unicode_wait = $TOP->Label(
+ -text => 'Please wait while loading fonts...',
+ -font => 'Helvetica 12 italic',
+ )->pack;
+ $TOP->update;
+
+ # Processing when some characters are missing might take a while, so make
+ # sure we're displaying something in the meantime.
+
+ $TOP->Busy;
+
+ unicodeadd $TOP, 'Arabic',
+ "\x{FE94}\x{FEF4}\x{FE91}\x{FEAE}\x{FECC}\x{FEDF}\x{FE8D}\x{FE94}\x{FEE4}\x{FEE0}\x{FEDC}\x{FEDF}\x{FE8D}";
+ unicodeadd $TOP, "Trad. Chinese", "\x{4E2D}\x{570B}\x{7684}\x{6F22}\x{5B57}";
+ unicodeadd $TOP, "Simpl. Chinese", "\x{6C49}\x{8BED}";
+ unicodeadd $TOP, 'Greek',
+ "\x{0395}\x{03BB}\x{03BB}\x{03B7}\x{03BD}\x{03B9}\x{03BA}\x{03AE}\x{03B3}\x{03BB}\x{03CE}\x{03C3}\x{03C3}\x{03B1}";
+ unicodeadd $TOP, 'Hebrew',
+ "\x{05DD}\x{05D9}\x{05DC}\x{05E9}\x{05D5}\x{05E8}\x{05D9}\x{05DC}\x{05D9}\x{05D0}\x{05E8}\x{05E9}\x{05D9}";
+ unicodeadd $TOP, 'Japanese',
+ "\x{65E5}\x{672C}\x{8A9E}\x{306E}\x{3072}\x{3089}\x{304C}\x{306A}\x{6F22}\x{5B57}\x{3068}\x{30AB}\x{30BF}\x{30AB}\x{30CA}";
+ unicodeadd $TOP, 'Korean',
+ "\x{B300}\x{D55C}\x{BBFC}\x{AD6D}\x{C758}\x{D55C}\x{AE00}";
+ unicodeadd $TOP, 'Russian',
+ "\x{0420}\x{0443}\x{0441}\x{0441}\x{043A}\x{0438}\x{0439}\x{044F}\x{0437}\x{044B}\x{043A}";
+
+ # We're done processing, so change things back to normal running.
+
+ $unicode_wait->destroy;
+ $TOP->Unbusy;
+
+} # end unicodeout
+
+sub unicodeadd {
+
+ my ($w, $language, @args) = @_;
+
+ my $sample = join('', @args);
+ my $l1 = $w->Label(-text => "$language: ", qw/-anchor nw -pady 0/);
+ my $l2 = $w->Label(-text => $sample, qw/-anchor nw -width 30 -pady 0/);
+ $l1->grid($l1, $l2, qw/-sticky ew -pady 0/);
+ $l1->gridConfigure(qw/-padx 1m/);
+
+} # end unicodeadd
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/virtevents1.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/virtevents1.pl
new file mode 100644
index 00000000000..8e2e85106f8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/virtevents1.pl
@@ -0,0 +1,59 @@
+use strict;
+
+sub virtevents1 {
+
+ my( $demo ) = @_;
+
+ my $mw = $MW->WidgetDemo(
+ -name => $demo,
+ -text => [ "This demonstration shows how you can use keysyms (keyboard symbols) to programmatically synthesize events that simulate a person typing on the keyboard. To learn about keyboard keysyms, run to previous demonstration, \"Show keyboard symbols\".
+
+A virtual event named <<pTkRules>> is defined that is activated by pressing the \"caps lock\" key (go ahead, press \"caps lock\"). A callback is bound to that virtual event - the callback synthesizes physicals events that \"type\" into the Entry widget displayed below. Pressing the \"Synthesize\" Button calls eventGenerate(), which synthesizes the virtual event <<pTkRules>> directly.
+
+Warning: it's easy to make this demonstration recurse indefinitely because synthesized physical events behave just like the real thing. So, it's possible for the <<pTkRules>> callback to eventGenerate() the keysym that activates the <<pTkRules>> virtual event, which invokes the <<pTkRules>> callback to eventGenerate() the keysym that activates the <<pTkRules>> virtual event, which ...", -wraplength => '6i' ],
+ -title => 'Simulate KeyPress events.',
+ -iconname => 'vevents1',
+ );
+
+ # Define a virtual event - <<pTkRules>> - that is activated when
+ # the physical event - pressing the "caps lock" key - occurs.
+
+ $mw->eventAdd( qw/ <<pTkRules>> <Caps_Lock> / );
+
+ # Alphabetics are their own keysyms. The %keysyms hash maps other
+ # characters to their keysym string. To see the keysyms associated
+ # with keyboard characters run the previous widget demonstration.
+
+ my %keysyms = (' ' => 'space', '/' => 'slash', '!' => 'exclam' );
+
+ # Create an Entry widget for a person or this program to type into.
+ # The Button explicitly generates the virtual event.
+
+ my $e = $mw->Entry->pack;
+ my $b = $mw->Button(
+ -command => sub { $mw->eventGenerate( '<<pTkRules>>' ) },
+ -text => 'Synthesize <<pTkRules>>',
+ )->pack;
+
+ # Now bind the virtual event to a callback that "types" for us.
+
+ $mw->bind( qw/ <<pTkRules>> / => sub {
+
+ # This subroutine is invoked whenever the "caps lock" key is
+ # pressed or the virtual event <<pTkRules>> is programatically
+ # generated via eventGenerate.
+
+ $e->focus;
+ $mw->update;
+ my $string_to_type = 'Perl/Tk rules!';
+
+ foreach ( split '', $string_to_type ) {
+ $_ = $keysyms{$_} if exists $keysyms{$_};
+ $e->eventGenerate( '<KeyPress>', -keysym => $_ );
+ $mw->idletasks;
+ $mw->after( 100 );
+
+ } # end sub type characters
+ } );
+
+} # end virtevents1
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/vscale.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/vscale.pl
new file mode 100644
index 00000000000..1f7d076e93d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widget_lib/vscale.pl
@@ -0,0 +1,48 @@
+# vscale.pl
+
+use subs qw/vscale_height/;
+use vars qw/$TOP/;
+
+sub vscale {
+
+ # Create a top-level window that displays a vertical scale.
+
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'An arrow and a vertical scale are displayed below. If you click or drag mouse button 1 in the scale, you can change the size of the arrow.',
+ -title => 'Vertical Scale Demonstration',
+ -iconname => 'vscale',
+ );
+
+ my $frame = $TOP->Frame(-borderwidth => 10)->pack;
+
+ my $canvas = $frame->Canvas(
+ qw/-width 50 -height 50 -borderwidth 0 -highlightthickness 0/);
+ $canvas->createPolygon(qw/0 0 1 1 2 2 -fill SeaGreen3 -tags poly/);
+ $canvas->createLine(qw/0 0 1 1 2 2 0 0 -fill black -tags line/);
+
+ my $scale = $frame->Scale(qw/-orient vertical -length 284 -from 0
+ -to 250 -tickinterval 50 -command/ => [\&vscale_height, $canvas]);
+ $scale->set(75);
+
+ $scale->pack(qw/-side left -anchor ne/);
+ $canvas->pack(qw/-side left -anchor nw -fill y/)
+
+} # end vscale
+
+sub vscale_height {
+
+ my($w, $height) = @_;
+
+ $height += 21;
+ my $y2 = $height - 30;
+ $y2 = 21 if $y2 < 21;
+ $w->coords('poly', 15, 20, 35, 20, 35, $y2, 45, $y2, 25, $height, 5, $y2,
+ 15, $y2, 15, 20);
+ $w->coords('line', 15, 20, 35, 20, 35, $y2, 45, $y2, 25, $height, 5, $y2,
+ 15, $y2, 15, 20);
+
+} # end vscale_height
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Gedi.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Gedi.pl
new file mode 100644
index 00000000000..ff847000e05
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Gedi.pl
@@ -0,0 +1,429 @@
+# Gedi master advanced text editor.
+
+use Tk::TextEdit;
+
+use vars qw/$TOP/;
+
+my $TOP;
+my $text_frame;
+my $counter_frame;
+my $textwindow;
+my $current_line_label;
+my $total_line_label;
+my $current_column_label;
+my $insert_overstrike_mode_label;
+my $about_pop_up_reference;
+my $menu;
+my $help_menu;
+
+sub about_pop_up
+{
+ my $name = ref($about_pop_up_reference);
+ if (defined($about_pop_up_reference))
+ {
+ $about_pop_up_reference->raise;
+ $about_pop_up_reference->focus;
+ }
+ else
+ {
+ my $pop = $TOP->Toplevel();
+ $pop->title("About");
+
+ $pop->Label(-text=>"Gedi (Gregs EDItor)")->pack();
+ $pop->Label(-text=>"Ver. 1.0")->pack();
+ $pop->Label(-text=>"Copyright 1999")->pack();
+ $pop->Label(-text=>"Greg London")->pack();
+ $pop->Label(-text=>"All Rights Reserved.")->pack();
+ $pop->Label(-text=>"This program is free software.")->pack();
+ $pop->Label(-text=>"You can redistribute it and/or")->pack();
+ $pop->Label(-text=>"modify it under the same terms")->pack();
+ $pop->Label(-text=>"as Perl itself.")->pack();
+ $pop->Label(-text=>"Special Thanks to")->pack();
+ $pop->Label(-text=>"Nick Ing-Simmons.")->pack();
+
+ my $button_ok = $pop->Button(-text=>'OK',
+ -command => sub {$pop->destroy();
+ $about_pop_up_reference = undef;
+ } )
+ ->pack();
+ $pop->resizable('no','no');
+ $about_pop_up_reference = $pop;
+ }
+}
+
+
+sub update_indicators
+{
+ my ($line,$column)= split(/\./,$textwindow->index('insert'));
+ $current_line_label->configure (-text=> "line: $line");
+ $current_column_label->configure (-text=> "column: $column");
+
+ my ($last_line,$last_col) = split(/\./,$textwindow->index('end'));
+ $total_line_label->configure (-text=> "total lines: $last_line");
+
+ my $mode = $textwindow->OverstrikeMode;
+ my $overstrke_insert='Insert Mode';
+ if ($mode)
+ {$overstrke_insert='Overstrike Mode';}
+ $insert_overstrike_mode_label->configure
+ (-text=> "$overstrke_insert");
+
+ my $filename = $textwindow->FileName;
+ $filename = 'NoName' unless(defined($filename));
+ my $edit_flag='';
+ if($textwindow->numberChanges)
+ {$edit_flag='edited';}
+ $TOP->configure(-title => "Gedi $edit_flag $filename");
+ $textwindow->idletasks;
+
+}
+
+
+
+
+
+
+sub Gedi {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Gedi master advanced text editor ',
+ -geometry_manager => 'grid',
+ -title => 'GEDI Text Editor',
+ -iconname => 'GEDI',
+ );
+
+$TOP->withdraw;
+
+$text_frame = $TOP->Frame->pack
+ (-anchor=>'nw', -expand=>'yes', -fill => 'both'); # autosizing
+$counter_frame = $TOP->Frame->pack(-anchor=>'nw');
+
+$textwindow = $text_frame->Scrolled(
+ 'TextEdit',
+ exportselection => 'true', # 'sel' tag is associated with selections
+ # initial height, if it isnt 1, then autosizing fails
+ # once window shrinks below height
+ # and the line counters go off the screen.
+ # seems to be a problem with the Tk::pack command;
+# height => 40,
+ -background => 'white',
+ -wrap=> 'none',
+ -setgrid => 'true', # use this for autosizing
+ -scrollbars =>'se')
+ -> pack(-expand => 'yes' , -fill => 'both'); # autosizing
+
+$TOP->protocol('WM_DELETE_WINDOW'=>
+ sub{$textwindow->ConfirmExit;}
+ );
+
+$SIG{INT} = sub {$textwindow->ConfirmExit;};
+
+$current_line_label = $counter_frame
+ -> Label(-text=>'line: 1')
+ -> grid(-row=>1,-column=>1, -sticky=>'nw' );
+
+$total_line_label = $counter_frame
+ -> Label(-text=>'total lines: 1')
+ -> grid(-row=>2,-column=>1, -sticky=>'nw' );
+
+$current_column_label = $counter_frame
+ -> Label(-text=>'column: 0')
+ -> grid(-row=>3,-column=>1, -sticky=>'nw' );
+
+$insert_overstrike_mode_label = $counter_frame
+ -> Label(-text=>' ')
+ -> grid(-row=>5,-column=>1, -sticky=>'nw' );
+
+$textwindow->SetGUICallbacks (
+ [
+ \&update_indicators,
+ sub{$textwindow->HighlightAllPairsBracketingCursor}
+ ]
+);
+
+$menu = $textwindow->menu;
+
+$TOP->configure(-menu => $menu);
+
+$help_menu = $menu->cascade(-label=>'~Help', -tearoff => 0, -menuitems => [
+ [Command => 'A~bout', -command => \&about_pop_up]
+ ]);
+
+
+#$TOP->minsize(30,1);
+#$TOP->geometry("80x24");
+
+while(<DATA>)
+ {$textwindow->insert('insert',$_);}
+$textwindow->ResetUndo;
+
+$textwindow->CallNextGUICallback;
+
+# adjust height
+$TOP->update;
+my $menuheight = ($TOP->wrapper)[1];
+my $TOPheight = 30 + $TOP->reqheight + $menuheight;
+if ($TOP->screenheight < $TOPheight) {
+ $textwindow->GeometryRequest($textwindow->reqwidth, $textwindow->reqheight - ($TOPheight - $TOP->screenheight));
+}
+$TOP->deiconify;
+
+}
+
+
+__DATA__
+
+Tk800.015 contains many modifications to the
+text based modules, as well as new text modules
+and an application that uses them all.
+Text.pm, TextUndo.pm, TextEdit.pm, and gedi
+have all been updated since the release prior
+to Tk800.015.
+
+This demo contains a rundown of all the features
+of the text modules, and
+
+What is available in the text modules?
+================================================
+
+Text.pm
+========
+
+Text.pm is the base text editing module.
+Beyond the core functionality of typing text,
+Text.pm has built in menu support for basic
+editing features such as Find/Replace text,
+Copy/Cut/Paste, Goto Line Number, and What
+Line Number queries.
+
+These functions are available simply by right
+clicking the mouse over the text area. Doing
+so will cause a pop-up menu to appear which will
+contain cascading menus to give access to all of
+these new functions.
+
+Many of these functions will create their own
+pop-up windows. Find/Replace will create a pop-up
+window which contains an entry for text to
+find, an entry for replace text, a number of
+radio buttons to control options such as
+case sensitivity, and several command buttons to
+perform functions such as Find, Find All,
+Replace, Replace All.
+
+All of these features have corresponding methods
+built into the Text widget. This allows the basic
+functions to be built into the widget, and also
+allows added features to be built on the lower
+level methods as needed. No one should have to
+reinvent the wheel when it comes to text editing
+features.
+
+Insert and Overstrike modes are also supported
+in the Text.pm module. Pressing the <Insert>
+key will toggle modes back and forth.
+
+Column based copy/cut/paste features are also
+available in the Text.pm module. They are bound
+to the following keys:
+
+<F1> clipboardColumnCopy
+<F2> clipboardColumnCut
+<F3> clipboardColumnPaste
+
+Currently, column based operations are beta versions.
+They compensate for tabs, but they will not behave
+properly unless the text is all the same font, and
+is the same width per character.
+
+Hopefully some future version of Text.pm will correct
+for this deficiency.
+
+Column paste should work with overstrike mode.
+
+
+TextUndo.pm
+=============
+
+TextUndo.pm is the second level module, being
+derived from the Text.pm module. As it's name
+implies, TextUndo supports "UNDO" capability.
+It now also supports "REDO" capability.
+
+Undo/redo works on user typed commands and
+also programmatically, so that any application
+that causes text to be inserted or deleted
+can be undone/redone, whether it was directly
+typed by the user or indirectly through another
+method.
+
+The undo/redo functions support tags, so that
+if you delete text with tags, undo will re-insert
+the text and re-tag it as well. This will eventually
+allow the text modules to support more sophisticated
+word processing type features. Such functionality
+should be available in a future release of the
+text modules.
+
+The TextUndo.pm module also has several added
+features to support file based operations.
+File based methods include ->Save, ->Load, and
+->Include. All methods take a filename as a
+parameter. These methods will create a progress
+widget to indicate the progress of the operation.
+
+The other feature of the TextUndo.pm module
+is the ConfirmDiscard method. This method checks to
+see if the text has been modified since it was
+last saved. If it has been modified, and the
+it will create a pop-up menu asking the user
+if they want to save the text to a file before
+exiting. This method can easily be tied into
+the exit routines, and signal handlers, to provide
+a consistent "save before exit?" feel.
+
+TextEdit.pm
+=============
+
+The TextEdit.pm is a new module in prototype version
+which adds further features to the text modules.
+TextEdit is based off of the TextUndo module,
+and so has all of the features of TextUndo and
+Text.
+
+Features of the TextEdit.pm module include
+parenthesis matching. The module looks at the
+current cursor position and then tries to find
+the parenthesis that bracket the cursor.
+Character pairs that are searched for are:
+() {} [] "" ''
+
+It also checks the position of the pairs to
+try to highlight bad positions. The module
+assumes that if the pairs are not on the same
+line or not on the same column, then there
+might be a missing parenthesis somewhere.
+Characters that appear to not align are
+highlighted in red.
+
+(quotations must start and end on the same line)
+
+
+PARENTHISIS MATCHING DEMO:
+move the cursor to the x between the quotes
+on the line below:
+
+
+{
+ ( )
+ ( { }
+ [
+ ' ">> x <<" '
+ [] ]
+ )
+
+}
+
+PARENTHESIS MISMATCHING DEMO:
+move the cursor to the x between the quotes
+on the line below:
+
+
+{
+ ( )
+ ( <<RED possible error { }
+ [
+ ' ">> x <<" '
+ [] ]
+ ) <<RED possible error
+
+}
+
+
+
+Another feature of the TextEdit module is support
+for application level indicators which reflect
+the status of certain internals. The line and
+column position of the cursor, the total length
+of the file, whether the widget is in insert or
+overstrike mode. Anytime anything occurs that could
+affect these values, a user supplied callback
+is invoked. This callback is supplied by the
+application so that the application can update
+whatever indicators it uses, however it implements
+them.
+
+One other feature of the TextEdit.pm module is
+block level text indention and block level text
+commenting. If a block of text is selected,
+that text can be indented or unindented wiht
+a single keystroke. It can also be commented
+out or uncommented as well. The keystroke bindings
+that support this are:
+
+<F5> IndentSelectedLines
+<F6> UnindentSelectedLines
+
+<F7> CommentSelectedLines
+<F8> UncommentSelectedLines
+
+These bindings only operate on the currently
+selected text. The indent string and the comment
+string can be programmed to be anything, but
+defaults to "\t" (tab) for indent and "#" for
+comments.
+
+(currently the widget hash is used to store these values.
+$w->{'INDENT_STRING'} and $w->{'LINE_COMMENT_STRING'}
+At some point in the future, this will be changed to
+use configure options to set these values.
+any application that changes these values should do
+so in such a way that when the TextEdit module changes,
+the application can be easily changed to handle this)
+
+
+
+gedi application
+=====================
+gedi is short for Greg's EDItor.
+The "g" is soft, pronounced like a "j".
+
+The gedi application uses all of the features of
+the text modules, Text, TextUndo, and TextEdit.
+It supplies TextEdit with a callback to update
+the indicator displays. This information includes
+the current cursor position, insert/overstrike
+mode, length of the file, filename, and whether
+the file has been edited or not.
+
+The bottom of this display contains
+line number
+column number
+total lines
+insert/overstrike mode.
+
+The title bar contains
+filename
+and if the file has been edited, the word "edited".
+
+Where gedi is installed depends on your system,
+but it is part of the tarkit for Tk800.015 and above.
+
+gedi was created to be put a perl editor in with the
+perl tar kit.
+
+NOTE: THIS IS NOT THE ACTUAL GEDI APPLICATION, BUT
+A DEMO SET UP TO BE SIMILAR IN NATURE TO THE GEDI
+APPLICATION. THE ACTUAL GEDI APPLICATION IS PART OF
+THE TK800.015 TARKIT. WHERE IT IS LOCATED ON YOUR
+SYSTEM WILL VARY DEPENDING ON YOUR SYSTEM. ONCE
+YOU LOCATE THE GEDI APPLICATION, PUT IT IN YOUR
+EXECUTABLE PATH, AND YOU WILL BE ABLE TO USE IT AS
+A TEXT EDITOR.
+
+
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/TEMPLATE.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/TEMPLATE.pl
new file mode 100644
index 00000000000..f0415ea9cae
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/TEMPLATE.pl
@@ -0,0 +1,92 @@
+# Learn how to write your own widget demonstration.
+
+use vars qw/$TOP/;
+
+sub TEMPLATE {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => 'Learn how to write a widget demonstration!',
+ -geometry_manager => 'grid',
+ -title => 'WidgetDemo Example',
+ -iconname => 'WidgetDemo',
+ );
+ $TOP->Label(-text => 'Click "See Code".')->grid;
+}
+__END__
+
+The template code above specifies how user contributed widget demonstrations
+can be written.
+
+widget looks in the directory specified on the command line to load user
+contributed demonstrations. If no directory name is specified when widget is
+invoked and the environment variable WIDTRIB is defined then demonstrations
+are loaded from the WIDTRIB directory. If WIDTRIB is undefined then widget
+defaults to the released user contributed directory.
+
+The first line of the file is the DDD (Demonstration Description Data), which
+briefly describes the purpose of the demonstration. The widget program reads
+this line and uses it when building its interface.
+
+Demonstrations must have a unique subroutine which is the same as the filename
+with .pl stripped off. When widget calls your subroutine it's passed one
+argument, the demonstration name. So file TEMPLATE.pl contains subroutine
+TEMPLATE(). But a demo can actually be an entire program - read on!
+
+For consistency your demonstration should use the WidgetDemo widget. This is
+a toplevel widget with three frames. The top frame contains descriptive
+demonstration text. The bottom frame contains the "Dismiss" and "See Code"
+buttons. The middle frame is the demonstration container, which can be
+managed by either the pack or grid geometry manager.
+
+Since your subroutine can "see" all of widget's global variables, you
+use $MW (the main window reference) to create the WidgetDemo toplevel; be sure
+to pass at least the -name and -text parameters. -geometry_manager defaults
+to "pack". The call to WidgetDemo() returns a reference to the containing
+frame for your demonstration, so treat it as if it were the MainWindow, the
+top-most window of your widget hierarchy.
+
+Alternatively the .pl file may contain typical Perl/Tk code of the form:
+
+ # Demonstration Description Data
+
+ use Tk;
+ my $top = MainWindow->new;
+ $top->Label(-text => 'Whatever');
+ MainLoop;
+ __END__
+
+widget has re-defined normal MainWindow to actually create a WidgetDemo
+on your code's behalf. MainLoop is optional in a demo (it will immediately
+return as MainLoop is already active).
+
+Other consideration:
+
+ . widget global variables are all uppercase, like $MW - be careful not
+ to stomp on them!
+
+ . Demo files should really be run in private packages to avoid those
+ problems.
+
+ . Don't subvert the inheritance mechanism by calling Tk::MainWindow
+ in your demo code.
+
+ . The description should really be extracted from POD documentation
+ in the .pl file rather than a magic comment.
+
+ . If your demonstration has a Quit button change it to ring the bell
+ and use the builtin Dismiss instead. In particular destroying a
+ MainWindow is acceptable, but exit will shut down widget itself!
+
+ . Be sure $TOP is declared in a "use vars" statement and not as a
+ lexical my() in the subroutine (see below).
+
+ . If you're wrapping an existing main program in a subroutine be very
+ alert for closure bugs. Lexicals inside a subroutine become closed
+ so you may run into initialization problems on the second and
+ subsequent invokations of the demonstration. The npuz and plop
+ demonstrations show how to work around this. Essentially, remove
+ all "global" my() variables and place them within a "use vars".
+ This practice is prone to subtle bugs and is not recommended!
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Tiler.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Tiler.pl
new file mode 100644
index 00000000000..c9a44b8c0b1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/Tiler.pl
@@ -0,0 +1,15 @@
+# Tiler, arrange widgets in rows.
+
+use strict;
+use Tk;
+use Tk::Tiler;
+
+my $mw = MainWindow->new();
+my $tiler = $mw->Scrolled('Tiler');
+my $num = $tiler->cget('-rows') * $tiler->cget('-columns');
+$mw->Label(-text => "Tiler with $num widgets")->pack;
+foreach (1 .. $num) {
+ $tiler->Manage( $tiler->Label(-text => "**$_**") );
+}
+$tiler->pack(qw/-expand yes -fill both/);
+MainLoop;
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/all.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/all.pl
new file mode 100644
index 00000000000..2152465c462
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/all.pl
@@ -0,0 +1,315 @@
+# All widgets at a glance.
+# -*- perl -*-
+
+#
+# $Id: $
+# Author: Slaven Rezic
+#
+# Copyright (C) 2007 Slaven Rezic. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+# Mail: slaven@rezic.de
+# WWW: http://www.rezic.de/eserte/
+#
+
+use strict;
+use Tk::Pane;
+
+use vars qw/$TOP $MW $DEMO_FILE/;
+
+sub all {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => <<"EOF",
+All Tk widgets at a glance in one Toplevel.
+
+The left column contains the class name, the middle column a sample representation of this widget, and the right column a button to the widget's Pod (requires Tk::Pod from CPAN).
+
+There are two sections: core Tk modules which come with stock Tk $Tk::VERSION and a sample of non-standard Tk modules from CPAN. The non-standard modules are only displayed if installed, otherwise they are skipped.
+EOF
+ -geometry_manager => 'pack',
+ -title => 'All widgets',
+ -iconname => 'All widgets',
+ );
+
+ my($px_w, $px_h) = (400, 200);
+ my($txt_w, $txt_h) = (40, 6);
+ my @px_geom = (-width => $px_w, -height => $px_h);
+ my @txt_geom = (-height => $txt_h, -width => $txt_w);
+ my $insert_txt = sub {
+ my $w = shift;
+ if ($w->can("Subwidget") && $w->Subwidget("scrolled")) {
+ $w = $w->Subwidget("scrolled");
+ }
+ $w->insert("end", "This is some sample text for the widget class " . $w->Class);
+ };
+ my $insert_lb = sub {
+ shift->insert("end", sort grep { !m{^/} } keys %INC);
+ };
+
+ my $f = $TOP->Scrolled('Pane',
+ qw(-width 900 -height 500), # XXX check for screensize!
+ -gridded => 'xy',
+ -scrollbars => 'osoe',
+ -sticky => 'news',
+ )->pack(qw(-expand 1 -fill both));
+ $f = $f->Subwidget("scrolled");
+ my @w_def = (
+ {separator => 'Core Tk modules'},
+
+ 'Adjuster',
+ # XXX 'Balloon',
+ {class => 'BrowseEntry', action => $insert_lb},
+ {class => 'Button', w_args => [-text => 'This is a button']},
+ {class => 'Canvas', w_args => [@px_geom],
+ action => sub {
+ my($w) = @_;
+ my @colors = qw(red green blue orange black white);
+ for (1..50) {
+ $w->createLine(rand($px_w),rand($px_h),
+ rand($px_w),rand($px_h),
+ -fill => $colors[rand @colors],
+ -width => rand(4)+1,
+ );
+ }
+ },
+ },
+ {class => 'Checkbutton', w_args => [-text => 'This is a checkbutton']},
+ {class => 'ColorEditor', dialog => 1},
+ {class => 'Dialog', dialog => 1},
+ {class => 'DialogBox', dialog => 1},
+ {class => 'DirTree', scrolled => 'oe'},
+ {class => 'Dirlist', scrolled => 'oe'},
+ {class => 'Entry', w_args => [-width => 20], action => $insert_txt},
+ {class => 'FBox', dialog => 1},
+ {class => 'FileDialog', dialog => 1},
+ {class => 'FileSelect', dialog => 1},
+ {class => 'Frame', w_args => [@px_geom, -bg => 'red']},
+ {class => 'Label', w_args => [-text => 'This is a label']},
+ {class => 'Labelframe', w_args => [@px_geom, -bg => 'red', -text => 'Title of frame']},
+ {class => 'Listbox', action => $insert_lb, scrolled => 'oe'},
+ # XXX Menubar?
+ {class => 'Menubutton', w_args => [-text => 'Menu button']},#XXX menuitems
+ {class => 'Message', w_args => [-text => 'This is a message widget']},
+ {class => 'MsgBox', dialog => 1},
+ {class => 'NoteBook', action => sub {
+ my $w = shift;
+ for (1..5) {
+ my $p = $w->add("page$_", -label => "Page $_");
+ $p->Label(-text => "A label in the page $_")->pack;
+ }
+ },
+ },
+ # XXX Pane
+ {class => 'Radiobutton', w_args => [-text => 'This is a radiobutton']},
+ {class => 'ROText', w_args => [@txt_geom], action => $insert_txt, scrolled => 'oe'},
+ {class => 'Scale', w_args => [-orient => 'horiz', -from => 0, -showvalue => 1, -to => 100]},
+ {class => 'Scrollbar', w_args => [-orient => 'horiz']},
+ {class => 'Spinbox', w_args => [-from => 0, -to => 100]},
+ {class => 'Text', w_args => [@txt_geom], action => $insert_txt, scrolled => 'oe'},
+ # disabled because of warning loop, line 189 ... {class => 'TextEdit', w_args => [@txt_geom], action => $insert_txt, scrolled => 'oe'},
+ {class => 'TextList', w_args => [@txt_geom], action => $insert_lb, scrolled => 'oe'},
+ {class => 'TextUndo', w_args => [@txt_geom], action => $insert_txt, scrolled => 'oe'},
+ # XXX Toplevel
+ qw(FloatEntry HList IconList InputO
+ LabEntry LabFrame LabRadio NBFrame Optionmenu
+ Panedwindow ProgressBar TList Table
+ Tiler TixGrid Tree
+ ),
+
+ {separator => 'Installed non-core Tk modules'},
+
+ qw(Date DateEntry NumEntry NumEntryPlain
+ PathEntry
+ ),
+ {class => 'FireButton', action => sub {
+ my $w = shift;
+ my $text = 'This is a firebutton 0';
+ $w->configure(-textvariable => \$text,
+ -command => sub {
+ $text =~ s{(\d+)}{$1+1}e;
+ },
+ );
+ },
+ },
+ {class => 'TFrame', w_args => [@px_geom, -bg => 'red',
+ -label => [ -text => 'Title' ],
+ -borderwidth => 2,
+ -relief => 'groove',
+ ],
+ },
+ {class => 'ToolBar', w_args => [qw/-movable 1 -side top
+ -indicatorcolor blue/],
+ action => sub {
+ my $tb = shift;
+ $tb->ToolButton (-text => 'Button',
+ -tip => 'tool tip',
+ -command => sub { print "hi\n" });
+ $tb->ToolLabel (-text => 'A Label');
+ $tb->Label (-text => 'Another Label');
+ $tb->ToolLabEntry(-label => 'A LabEntry',
+ -labelPack => [-side => "left",
+ -anchor => "w"]);
+ },
+ },
+ {class => 'HistEntry', action => sub {
+ my $w = shift;
+ $w->bind("<Return>" => sub {
+ # do something with value, and then:
+ $w->historyAdd;
+ $w->delete('0', 'end');
+ });
+ },
+ },
+ {class => 'MListbox', w_args => [-columns=>[[-text=>'Heading1',
+ -sortable=>0],
+ [-text=>'Heading2']]],
+ action => sub {
+ my $w = shift;
+ $w->insert("end", [qw(Cell11 Cell12)], [qw(Cell21 Cell22)]);
+ },
+ },
+ {class => 'Cloth', w_args => [@px_geom],
+ action => sub {
+ my($w) = @_;
+ my @colors = qw(red green blue orange black white);
+ for (1..50) {
+ $w->Line(-coords => [rand($px_w),rand($px_h),
+ rand($px_w),rand($px_h)],
+ -fill => $colors[rand @colors],
+ -width => rand(4)+1,
+ );
+ }
+ },
+ },
+ {class => 'DirSelect', dialog => 1},
+ {class => 'ExecuteCommand', w_args => [@txt_geom]},
+ {class => 'FontDialog', dialog => 1},
+ {class => 'JBrowseEntry', action => $insert_lb},
+ {class => 'JFileDialog', dialog => 1},
+ {class => 'More', w_args => [@txt_geom], action => sub {
+ shift->Load($DEMO_FILE),
+ }, scrolled => 'oe'},
+ {class => 'ObjEditor', w_args => [@txt_geom, -caller => { dummy => 'object'}]},
+ {class => 'ObjScanner', w_args => [@txt_geom, -caller => $TOP]},
+ {class => 'PodText', require => 'Tk::Pod::Text',
+ w_args => [@txt_geom, -file => 'Tk']},
+ {class => 'XMLViewer', w_args => [@txt_geom], action => sub {
+ shift->insertXML(-text => "<?xml version='1.0' ?><a><bla /><foo>bar</foo></a>");
+ }, scrolled => 'oe'},
+ {class => 'Zinc', w_args => [@px_geom],
+ action => sub {
+ my($w) = @_;
+ my @colors = qw(red green blue orange black white);
+ for (1..20) {
+ $w->add('curve', 1, [map { (rand($px_w),rand($px_h)) } (1..5)],
+ -relief => 'roundgroove',
+ -filled => 1,
+ -fillcolor => $colors[rand @colors],
+ );
+ }
+ },
+ },
+ );
+ $f->grid('columnconfigure', $_, -pad => 3, -weight => 1) for (0 .. 1);
+ $f->grid('rowconfigure', $_, -pad => 3, -weight => 1) for (0 .. $#w_def);
+ my $row = -1;
+ for my $w_def (@w_def) {
+ my($separator, $text, $class, @w_args, $action, $scrolled, $dialog, $dialog_action);
+ if (UNIVERSAL::isa($w_def, "HASH")) {
+ $separator = $w_def->{separator};
+ if (!$separator) {
+ $class = $w_def->{class};
+ $text = $w_def->{text} || $class;
+ @w_args = @{ $w_def->{w_args} || [] };
+ $action = $w_def->{action};
+ $scrolled = $w_def->{scrolled};
+ $dialog = $w_def->{dialog};
+ $dialog_action = $w_def->{dialog_action};
+ if ($dialog && !$dialog_action) {
+ $dialog_action = sub { shift->Show };
+ }
+ if ($w_def->{require}) {
+ eval 'require ' . $w_def->{require};
+ if ($@) {
+ warn $@;
+ next;
+ }
+ }
+ }
+ } else {
+ ($text, $class) = ($w_def, $w_def);
+ }
+
+ $row++;
+
+ if ($separator) {
+ $f->Label(-text => $separator,
+ -font => 'Helvetica 18',
+ -pady => 5,
+ )->grid(-row => $row,
+ -column => 0,
+ -columnspan => 3,
+ );
+ next;
+ }
+
+ my $bgcolor = $row%2==0 ? '#c0c0c0' : '#a0a0a0';
+ my $ff = $f->Frame(-background => $bgcolor,
+ )->grid(-row => $row,
+ -column => 1,
+ -sticky => 'news',
+ );
+ my $cw = eval {
+ if ($dialog) {
+ $ff->$class(@w_args)->destroy; # just load it...
+ $ff->Button(-text => 'Open ' . $class,
+ -command => sub {
+ # There are some buggy dialogs which display
+ # already without calling a Show method (e.g. Tk::FBox),
+ # so create here
+ my $d = $ff->$class(@w_args);
+ $dialog_action->($d) if $dialog_action;
+ })->pack;
+ } else {
+ if ($scrolled) {
+ $ff->Scrolled($class, @w_args, -scrollbars => $scrolled)->pack;
+ } else {
+ $ff->$class(@w_args)->pack;
+ }
+ }
+ };
+ if ($@ || !$cw) {
+ warn $@;
+ $row--;
+ $ff->destroy;
+ next;
+ }
+
+ $action->($cw) if $action && !$dialog;
+
+ $f->Label(-text => $text,
+ -background => $bgcolor,
+ -anchor => 'w',
+ )->grid(-row => $row,
+ -column => 0,
+ -sticky => "news",
+ );
+
+ $f->Button(-text => 'Pod',
+ -background => $bgcolor,
+ -command => sub {
+ require Tk::Pod;
+ $TOP->Pod(-file => 'Tk::' . $class);
+ },
+ )->grid(-row => $row,
+ -column => 2,
+ -sticky => 'news',
+ );
+ }
+ # $TOP->WidgetDump;
+}
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/cursor.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/cursor.pl
new file mode 100644
index 00000000000..645f1433d54
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/cursor.pl
@@ -0,0 +1,65 @@
+# Predefined cursors.
+# -*- perl -*-
+
+#
+# $Id: $
+# Author: Slaven Rezic
+#
+# Copyright (C) 2006,2008 Slaven Rezic. All rights reserved.
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+#
+# Mail: slaven@rezic.de
+# WWW: http://www.rezic.de/eserte/
+#
+
+use vars qw/$TOP/;
+
+sub cursor {
+ my($demo) = @_;
+ $TOP = $MW->WidgetDemo(
+ -name => $demo,
+ -text => <<'EOF',
+This window displays the names of Tk's built-in
+resp. predefined X11 cursors. Click or move on
+the names to see the cursor shape.
+EOF
+ -geometry_manager => 'grid',
+ -title => 'Predefined cursors',
+ -iconname => 'Predefined cursors',
+ );
+
+ my $fh;
+ TRY_CURSORFONTH: {
+ for my $cursorfonth (Tk->findINC("X11/cursorfont.h"),
+ "/usr/X11R6/include/X11/cursorfont.h",
+ "/usr/include/X11/cursorfont.h",
+ ) {
+ last TRY_CURSORFONTH if (open $fh, $cursorfonth);
+ }
+ $TOP->Label(-text => "Sorry. I can't find X11/cursorfont.h on this system.")->grid;
+ return;
+ }
+
+ while(<$fh>) {
+ chomp;
+ if (/XC_(\S+)/) {
+ my $cursorname = $1;
+ next if $cursorname eq 'num_glyphs';
+ push @cursors, $cursorname;
+ }
+ }
+
+ $lb = $TOP->Scrolled("Listbox", -scrollbars => "ose", -selectmode => "browse")->grid(-sticky => "ns");
+ $lb->insert("end", @cursors);
+ $lb->bind("<Motion>", sub {
+ my($inx) = $lb->nearest($lb->Subwidget("scrolled")->XEvent->y);
+ $lb->configure(-cursor => $cursors[$inx]);
+ });
+ $lb->bind("<<ListboxSelect>>", sub {
+ my($inx) = $lb->curselection;
+ $lb->configure(-cursor => $cursors[$inx]);
+ });
+}
+
+__END__
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/lib/npuz/Xcamel.npuz b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/lib/npuz/Xcamel.npuz
new file mode 100644
index 00000000000..c5c8318d145
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/lib/npuz/Xcamel.npuz
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/npuz.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/npuz.pl
new file mode 100644
index 00000000000..3a6ba17f937
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/npuz.pl
@@ -0,0 +1,226 @@
+# A N-puzzle implemented via the Grid geometry manager.
+#
+# This program is described in the Perl/Tk column from Volume 1, Issue 4 of
+# The Perl Journal (http://tpj.com/tpj), and is included in the Perl/Tk
+# distribution with permission. It has been modified slightly to conform
+# to the widget demo standard.
+
+#!/usr/local/bin/perl -w
+#
+# puz - demonstrate the Grid geometry manager by implementing an n-puzzle.
+#
+# Stephen O. Lidie, Lehigh University Computing Center, lusol@Lehigh.EDU
+# 96/08/11.
+#
+# Copyright (C) 1996 - 1998 Stephen O. Lidie. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself.
+
+require 5.002;
+use Tk;
+use Tk::Dialog;
+use strict;
+use subs qw(beep create_puz create_ui puz_fini move_piece new_puz randomly xy);
+
+my $CAMEL; # Perl/Tk Xcamel.gif Photo image
+my $CAMEL_HEIGHT; # Xcamel height
+my $CAMEL_WIDTH; # Xcamel width
+my (@LEVELS) = (9, 16, 36, 64); # possible puzzle piece counts
+my $MW = MainWindow->new; # program's main window
+my @ORDER; # random puzzle piece ordinals
+my $PIECES = $LEVELS[1]; # total puzzle piece count
+my $OLD_PIECES = -1; # previous puzzle piece count
+my $PF; # puzzle Frame
+my @PUZ; # puzzle piece information
+my $SIDE; # pieces per side of puzzle
+my $SPACE; # shortcut to puzzle space piece
+my $SPACE_IMAGE; # space piece image
+
+create_ui;
+create_puz;
+
+sub beep {$MW->bell}
+
+sub create_puz {
+
+ return if $PIECES == $OLD_PIECES;
+
+ # Create all the puzzle pieces - buttons with images - and arrange them
+ # in a rectangular grid. @PUZ is a list of button widget references which
+ # represent the puzzle pieces.
+ #
+ # The actual ordering is controlled by @ORDER, a list of list of two:
+ #
+ # $ORDER[$i]->[0] = puzzle piece ordinal
+ # $ORDER[$i]->[1] = random number used to shuffle the puzzle ordinals
+ #
+ # If the puzzle frame $PF exists, we've been here before, which means that
+ # all images and widgets associated with the previous puzzle need
+ # destroying, plugging a potential memory leak. It's important to note
+ # that an image must be explicity deleted - it doesn't magically go away
+ # if a widget, which just happens to use it, is destroyed. So, loop
+ # through all the puzzle pieces and delete their images, then destroy the
+ # puzzle's master frame $PF, destroying all child widgets. Now, this
+ # scheme isn't particulary efficient, but it is simple; ideally, we'd like
+ # to create these images only once and reuse them as required.
+
+ if (Exists $PF) {
+ my $image;
+ foreach (@PUZ) {
+ $image = $_->cget(-image);
+ $image = $SPACE_IMAGE if not defined $image;
+ $image->delete;
+ }
+ $PF->destroy;
+ }
+
+ $PF = $MW->Frame->grid; # create the puzzle frame grid master
+ $OLD_PIECES = $PIECES;
+ $#PUZ = $#ORDER = $PIECES - 1;
+ $SIDE = sqrt $PIECES;
+
+ my($i, $o, $c, $r, $w, $h, $x, $y, $but, $gif);
+
+ foreach (0..$#ORDER) {$ORDER[$_] = [$_, undef]}
+
+ for($i = 0; $i <= $#PUZ; $i++) {
+ $o = $ORDER[$i]->[0];
+ ($c, $r) = xy $o; # puzzle ordinal to column/row
+ $w = $CAMEL_WIDTH / $SIDE;
+ $h = $CAMEL_HEIGHT / $SIDE;
+ $x = $c * $w; # x/column pixel offset
+ $y = $r * $h; # y/row pixel offset
+ $gif = $PF->Photo; # new, empty, GIF image
+ $gif->copy($CAMEL, -from => $x, $y, $x+$w, $y+$h);
+ $but = $PF->Button(-image => $gif,
+ -relief => 'flat',
+ -borderwidth => 0,
+ -command => \&beep,
+ -highlightthickness => 0,
+ );
+ $PUZ[$o] = $but;
+ ($c, $r) = xy $i;
+ $but->grid(-column => $c, -row => $r, -sticky => 'nsew');
+ if ($o == 0) {
+ $SPACE_IMAGE = $gif;
+ $SPACE = $but;
+ }
+ } # forend all puzzle pieces
+
+} # end create_puz
+
+sub create_ui {
+
+ # Create a color Photo image of the Xcamel puzzle.
+
+ $CAMEL = $MW->Photo(-file => "$WIDTRIB/lib/npuz/Xcamel.npuz");
+ $CAMEL_WIDTH = $CAMEL->image('width');
+ $CAMEL_HEIGHT = $CAMEL->image('height');
+
+ # Create the menubar.
+
+ my $mf = $MW->Frame(-bg => 'blue')->grid(-sticky => 'ew');
+ $mf->gridColumnconfigure(1, -weight => 1);
+
+ my $mbf = $mf->Menubutton(-text => 'File', -relief => 'raised');
+ $mbf->command(-label => 'New Puzzle', -command => \&new_puz);
+ $mbf->separator;
+ $mbf->command(-label => 'Quit', -command => [$MW => 'bell']);
+
+ my $mbp = $mf->Menubutton(-text => 'Prefs', -relief => 'raised');
+ my $pieces = 'Pieces';
+ $mbp->cascade(-label => $pieces);
+ my $mbpm = $mbp->cget(-menu);
+ my $mbpmp = $mbpm->Menu;
+ $mbp->entryconfigure($pieces, -menu => $mbpmp);
+ foreach (@LEVELS) {
+ $mbpmp->radiobutton(-label => $_,
+ -variable => \$PIECES,
+ -value => $_,
+ -command => \&create_puz,
+ );
+ }
+
+ my $mbq = $mf->Menubutton(-text => 'Help', -relief => 'raised');
+ my $about = $MW->Dialog(-text => <<"END"
+npuz Version 1.0\n
+Select \"File/New Puzzle\", then click around the red \"space\" to rearrange the pieces and solve the puzzle!\n\nThis program is described in the Perl/Tk column from Volume 1, Issue 4 of The Perl Journal (http://tpj.com/tpj), and is included in the Perl/Tk distribution with permission.
+END
+ );
+ $about->configure(-wraplength => '6i');
+ $mbq->command(-label => 'About', -command => [$about => 'Show']);
+
+ $mbf->grid(-row => 0, -column => 0, -sticky => 'w');
+ $mbp->grid(-row => 0, -column => 1, -sticky => 'w');
+ $mbq->grid(-row => 0, -column => 2, -sticky => 'e');
+
+} # end create_ui
+
+sub puz_fini {
+
+ # Return true iff all puzzle pieces are in order.
+
+ my($i, $c, $r, %info);
+ for($i = 0; $i <= $#PUZ; $i++) {
+ ($c, $r) = xy $i;
+ %info = $PUZ[$i]->gridInfo;
+ return 0 if $c != $info{-column} or $r != $info{-row};
+ }
+ return 1;
+
+} # end puz_fini
+
+sub move_piece {
+
+ my($piece) = @_;
+
+ my(%info, $c, $r, $sc, $sr);
+ %info = $piece->gridInfo; ($c, $r) = @info{-column,-row};
+ %info = $SPACE->gridInfo; ($sc, $sr) = @info{-column,-row};
+ if ( ($sr == $r and ($sc == $c-1 or $sc == $c+1)) or
+ ($sc == $c and ($sr == $r-1 or $sr == $r+1)) ) {
+ $SPACE->grid(-column => $c, -row => $r);
+ $piece->grid(-column => $sc, -row => $sr);
+ }
+ if (puz_fini) {
+ my $color = ($SPACE->configure(-activebackground))[3];
+ $SPACE->configure(-image => $SPACE_IMAGE,
+ -activebackground => $color,
+ -background => $color,
+ -relief => 'flat',
+ );
+ foreach (@PUZ) {$_->configure(-command => \&beep)}
+ }
+
+} # end move_piece
+
+sub new_puz {
+
+ srand time;
+ foreach (0..$#ORDER) {$ORDER[$_]->[1] = rand $#ORDER}
+ my @order = sort randomly @ORDER;
+ #@order = @ORDER; # here's how I solve the puzzle (;
+ my($i, $o, $c, $r, $but);
+
+ for($i = 0; $i <= $#PUZ; $i++) {
+ $o = $order[$i]->[0];
+ $but = $PUZ[$o];
+ if ($o == 0) {
+ $but->configure(-background => 'red',
+ -relief => 'sunken',
+ -image => undef,
+ -activebackground => 'red',
+ );
+ } else {
+ $but->configure(-command => [\&move_piece, $but]);
+ }
+ ($c, $r) = xy $i;
+ $but->grid(-column => $c, -row => $r, -sticky => 'nsew');
+ }
+
+} # end new_puz
+
+sub randomly {$a->[1] <=> $b->[1]} # randomize order of puzzle pieces
+
+sub xy {my($n) = @_; ($n % $SIDE, int $n / $SIDE)} # ordinal to X/Y
diff --git a/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/plop.pl b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/plop.pl
new file mode 100644
index 00000000000..bd6f801b03f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/demos/widtrib/plop.pl
@@ -0,0 +1,381 @@
+# Plot a series of continuous functions on a Perl/Tk Canvas.
+#
+# This program is described in the Perl/Tk column from Volume 1, Issue 1 of
+# The Perl Journal (http://tpj.com/tpj), and is included in the Perl/Tk
+# distribution with permission. It has been modified slightly to conform
+# to the widget demo standard.
+
+#!/usr/local/bin/perl -w
+#
+# plot_program - plot a series of continuous functions on a Perl/Tk Canvas.
+#
+# Stephen O. Lidie, Lehigh University Computing Center, lusol@Lehigh.EDU
+# 96/01/27.
+#
+# Copyright (C) 1996 - 1998 Stephen O. Lidie. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the same terms as Perl itself.
+
+require 5.002;
+use strict;
+use Tk;
+use Tk::Dialog;
+use Tk::LabEntry;
+eval {require "plop.fnc";}; # user supplied math functions
+
+# Predeclare global subroutines and variables.
+
+sub collect_errors;
+sub display_coordinates;
+sub initialize_canvas;
+sub initialize_dialogs;
+sub initialize_functions;
+sub initialize_menus;
+sub make_menubutton;
+sub plot_functions;
+sub update_functions;
+
+my $VERSION = '1.0';
+
+# The default sample functions and limits, each in a different color.
+
+my (@FUNCTIONS) = ('sin($x)', 'cos($x)', 'exp($x)', '$x', 'int($x)');
+my (@COLORS) = qw(red green blue orange olivedrab magenta black salmon purple);
+my $NUM_COLORS = scalar @COLORS;
+my ($X_MIN, $X_MAX, $Y_MIN, $Y_MAX) = (-5, 5, -5, 5);
+my ($DX, $DY) = ($X_MAX - $X_MIN, $Y_MAX - $Y_MIN);
+
+# Declare constants that configure the plotting area: a square approximately
+# 500 pixels on a side, with left/right and top/bottom margins of 80 pixles
+# where we can paint axes labels. With this layout there is a 340x340 area
+# available for graphs.
+
+my $MIN_PXL = 0; # minimum Canvas pixel coordinate
+my $MAX_PXL = 300; # maximum Canvas pixel coordinate
+my $MARGIN = 80; # margin size, in pixels
+my $ALEN = $MAX_PXL - 2 * $MARGIN; # X/Y axes length, in pixels
+
+# Declare Perl/Tk widgets and other data.
+
+my $CANV; # Canvas widget used for plotting functions
+my $DIALOG_ABOUT; # Dialog widget showing "About" information
+my $DIALOG_USAGE; # Dialog widget describing plot usage
+my $MBF; # Menubutton frame
+my $MW = MainWindow->new; # program's main window
+my $ORIGINAL_CURSOR = ($MW->configure(-cursor))[3]; # restore this cursor
+my $TEXT; # Text widget showing function definitions
+
+# %ERRORS is a hash to collect eval() and -w errors. The keys are the error
+# messages themselves and the values are the number of times a particular
+# error was detected.
+
+my %ERRORS;
+
+# Begin main.
+
+initialize_dialogs;
+initialize_menus;
+initialize_canvas;
+initialize_functions;
+
+# End main.
+
+sub collect_errors {
+
+ # Update the hash %ERRORS with the latest eval() error message. Remove
+ # the eval() line number (it's useless to us) to maintain a compact hash.
+
+ my($error) = @_;
+
+ $error =~ s/eval\s+(\d+)/eval/;
+ $ERRORS{$error}++;
+
+} # end collect_errors
+
+sub display_coordinates {
+
+ # Print Canvas and Plot coordinates.
+
+ my($canvas) = @_;
+
+ my $e = $canvas->XEvent;
+ my($canv_x, $canv_y) = ($e->x, $e->y);
+ my($x, $y);
+ $x = $X_MIN + $DX * (($canv_x - $MARGIN) / $ALEN);
+ $y = $Y_MAX - $DY * (($canv_y - $MARGIN) / $ALEN);
+ print STDOUT "\nCanvas x = $canv_x, Canvas y = $canv_y.\n";
+ print STDOUT "Plot x = $x, Plot y = $y.\n";
+
+} # end display_coordinates
+
+sub initialize_canvas {
+
+ # Create the Canvas widget and draw axes and labels.
+
+ my($label_offset, $tick_length) = (20, 5);
+
+ $CANV = $MW->Canvas(
+ -width => $MAX_PXL + $MARGIN * 2,
+ -height => $MAX_PXL,
+ -relief => 'sunken',
+ );
+ $CANV->pack;
+ $CANV->Tk::bind('<Button-1>' => \&display_coordinates);
+
+ $CANV->create('text',
+ 225, 25,
+ -text => 'Plot Continuous Functions Of The Form y=f($x)',
+ -fill => 'blue',
+ );
+
+ # Create the line to represent the X axis and label it. Then label the
+ # minimum and maximum X values and draw tick marks to indicate where they
+ # fall. The axis limits are LabEntry widgets embedded in Canvas windows.
+
+ $CANV->create('line',
+ $MIN_PXL + $MARGIN, $MAX_PXL - $MARGIN,
+ $MAX_PXL - $MARGIN, $MAX_PXL - $MARGIN,
+ );
+
+ $CANV->create('window',
+ $MIN_PXL + $MARGIN, $MAX_PXL - $label_offset,
+ -window => $MW->LabEntry(
+ -textvariable => \$X_MIN,
+ -label => 'X Minimum',
+ -width => 5,
+ ),
+ );
+ $CANV->create('line',
+ $MIN_PXL + $MARGIN, $MAX_PXL - $MARGIN - $tick_length,
+ $MIN_PXL + $MARGIN, $MAX_PXL - $MARGIN + $tick_length,
+ );
+
+ $CANV->create('window',
+ $MAX_PXL - $MARGIN, $MAX_PXL - $label_offset,
+ -window => $MW->LabEntry(
+ -textvariable => \$X_MAX,
+ -label => 'X Maximum',
+ -width => 5,
+ ),
+ );
+ $CANV->create('line',
+ $MAX_PXL - $MARGIN, $MAX_PXL - $MARGIN - $tick_length,
+ $MAX_PXL - $MARGIN, $MAX_PXL - $MARGIN + $tick_length,
+ );
+
+ # Create the line to represent the Y axis and label it. Then label the
+ # minimum and maximum Y values and draw tick marks to indicate where they
+ # fall. The axis limits are LabEntry widgets embedded in Canvas windows.
+
+ $CANV->create('line',
+ $MAX_PXL - $MARGIN, $MIN_PXL + $MARGIN,
+ $MAX_PXL - $MARGIN, $MAX_PXL - $MARGIN,
+ );
+
+ $CANV->create('window',
+ $MAX_PXL + $label_offset, $MIN_PXL + $MARGIN,
+ -window => $MW->LabEntry(
+ -textvariable => \$Y_MAX,
+ -label => 'Y Maximum',
+ -width => 5,
+ ),
+ );
+ $CANV->create('line',
+ $MAX_PXL - $MARGIN - $tick_length, $MIN_PXL + $MARGIN,
+ $MAX_PXL - $MARGIN + $tick_length, $MIN_PXL + $MARGIN,
+ );
+
+ $CANV->create('window',
+ $MAX_PXL + $label_offset, $MAX_PXL - $MARGIN,
+ -window => $MW->LabEntry(
+ -textvariable => \$Y_MIN,
+ -label => 'Y Minimum',
+ -width => 5,
+ ),
+ );
+ $CANV->create('line',
+ $MAX_PXL - $MARGIN - $tick_length, $MAX_PXL - $MARGIN,
+ $MAX_PXL - $MARGIN + $tick_length, $MAX_PXL - $MARGIN,
+ );
+
+} # end initialize_canvas
+
+sub initialize_dialogs {
+
+ # Create all application Dialog objects.
+
+ $DIALOG_ABOUT = $MW->Dialog(
+ -title => 'About',
+ -text =>
+"plot_program $VERSION\n\n95/12/04\n\nThis program is described in the Perl/Tk column from Volume 1, Issue 1 of The Perl Journal (http://tpj.com/tpj), and is included in the Perl/Tk distribution with permission.",
+ -bitmap => 'info',
+ -buttons => ['Dismiss'],
+ );
+ $DIALOG_ABOUT->configure(-wraplength => '6i');
+ $DIALOG_USAGE = $MW->Dialog(
+ -title => 'Usage',
+ -buttons => ['Dismiss'],
+ );
+ $DIALOG_USAGE->Subwidget('message')->configure(
+ -wraplength => '4i',
+ -text => "plot_program iterates over the range of values X Minimum to X Maximum, setting the variable \$x to each value in turn, then evaluates each f(\$x) and paints a point on the Y axis. The X axis increment is (Xmax - Xmin) / $ALEN.\n\nJust enter your functions in the Text widget and click the Plot button.\n\nYou can define a file named \"plop.fnc\" that contains additional private math functions, which is automatically \"require\"d by plot_program. In this file are your private functions that you can plot.\n\nPressing button one on the pointing device displays on standard output the current canvas and plot X and Y coordinates.",
+ );
+
+} # end initialize_dialogs
+
+sub initialize_functions {
+
+ # Pack a spacer Frame and then display instructions in a Label widget.
+
+# $MW->Frame(-height => 10)->pack;
+ $MW->Label(
+ -text => 'Enter your functions here',
+ -foreground => 'blue',
+ )->pack;
+
+ # Create a Frame with a scrollable Text widget that displays the function
+ # list, and a Button to initiate plot activities.
+
+ my $functions_frame = $MW->Frame;
+ $functions_frame->pack;
+ $TEXT = $functions_frame->Text(-height => 3);
+ $TEXT->pack;
+ $functions_frame->AddScrollbars($TEXT);
+ $functions_frame->configure(-scrollbars => 'e');
+ update_functions;
+
+ my $buttons_frame = $MW->Frame;
+ $buttons_frame->pack(-padx => 10, -pady => 5, -expand => 1, -fill => 'x');
+ my @pack_attributes = qw(-side left -fill x -expand 1);
+ $buttons_frame->Button(
+ -text => 'Plot',
+ -command => \&plot_functions,
+ )->pack(@pack_attributes);
+
+} # end initialize_functions
+
+sub initialize_menus {
+
+ # Create the Menubuttons and their associated Menu items.
+
+ $MBF = $MW->Frame(-relief => 'raised', -borderwidth => 1);
+ $MBF->pack(-fill => 'x');
+
+ make_menubutton($MBF, 'File', 0, 'left',
+ [
+ ['Quit', [$MW => 'bell'], 0],
+ ],
+ );
+ make_menubutton($MBF, 'Help', 0, 'right',
+ [
+ ['About', [$DIALOG_ABOUT => 'Show'], 0],
+ ['', undef, 0],
+ ['Usage', [$DIALOG_USAGE => 'Show'], 0],
+ ],
+ );
+
+} # end initialize_menus
+
+sub make_menubutton {
+
+ # Make a Menubutton widget; note that the Menu is automatically created.
+ # If the label is '', make a separator.
+
+ my($mbf, $mb_label, $mb_label_underline, $pack, $mb_list_ref) = @_;
+
+ my $mb = $mbf->Menubutton(
+ -text => $mb_label,
+ -underline => $mb_label_underline,
+ );
+ my $mb_list;
+ foreach $mb_list (@{$mb_list_ref}) {
+ $mb_list->[0] eq '' ? $mb->separator :
+ $mb->command(
+ -label => $mb_list->[0],
+ -command => $mb_list->[1],
+ -underline => $mb_list->[2],
+ );
+ }
+ $mb->pack(-side => $pack);
+
+} # end make_menubutton
+
+sub plot_functions {
+
+ # Plot all the functions.
+
+ my($x, $y, $canv_x, $canv_y) = (0, 0, 0, 0);
+ $canv_x = $MIN_PXL + $MARGIN; # X minimum
+ $MW->configure(-cursor => 'watch');
+ $DX = $X_MAX - $X_MIN; # update delta X
+ $DY = $Y_MAX - $Y_MIN; # update delta Y
+ $CANV->delete('plot'); # erase all previous plots
+
+ # Fetch the newline-separated Text widget contents and update the function
+ # list @FUNCTIONS. Also update the Text widget with the new colors.
+
+ @FUNCTIONS = ();
+ foreach (split /\n/, $TEXT->get('0.0', 'end')) {
+ next if $_ eq '';
+ push @FUNCTIONS, $_;
+ }
+ update_functions;
+ $MW->idletasks;
+
+ %ERRORS = ();
+ local $SIG{'__WARN__'} = sub {collect_errors($_[0])};
+
+ALL_X_VALUES:
+ for ($x = $X_MIN; $x <= $X_MAX; $x += ($X_MAX - $X_MIN) / $ALEN) {
+
+ ALL_FUNCTIONS:
+ foreach (0 .. $#FUNCTIONS) {
+ next if $FUNCTIONS[$_] =~ /^ERROR:/;
+ $y = eval $FUNCTIONS[$_];
+ if ($::EVAL_ERROR) {
+ collect_errors($::EVAL_ERROR);
+ next;
+ }
+ $canv_y = (($Y_MAX - $y) / $DY) * $ALEN + $MARGIN;
+ $CANV->create('text', $canv_x, $canv_y,
+ -fill => $COLORS[$_ % $NUM_COLORS],
+ -tags => ['plot'],
+ -text => '.',
+ ) if $canv_y > $MIN_PXL + $MARGIN and
+ $canv_y < $MAX_PXL - $MARGIN;
+ } # forend ALL_FUNCTIONS
+
+ $canv_x++; # next X pixel
+
+ } # forend ALL_X_VALUES
+
+ $MW->configure(-cursor => $ORIGINAL_CURSOR);
+ $MW->idletasks;
+
+ # Print all the eval() errors to alert the user of malformed functions.
+
+ print STDOUT "\n" if %ERRORS;
+ foreach (keys %ERRORS) {
+ print STDOUT "$ERRORS{$_} occurrences of $_";
+ }
+
+} # end plot_functions
+
+sub update_functions {
+
+ # Insert the function list into the Text widget.
+
+ $TEXT->delete('0.0', 'end');
+ my $i = 0;
+ foreach (@FUNCTIONS) {
+ $TEXT->insert('end', "$_\n", [$i]);
+ $TEXT->tagConfigure($i,
+ -foreground => $COLORS[$i % $NUM_COLORS],
+ -font => 'fixed',
+ );
+ $i++;
+ }
+ $TEXT->yview('end');
+
+} # end update_function_list
diff --git a/Master/tlpkg/tlperl/lib/Tk/event.pod b/Master/tlpkg/tlperl/lib/Tk/event.pod
new file mode 100644
index 00000000000..9012a596267
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/event.pod
@@ -0,0 +1,417 @@
+# Copyright (c) 1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::event - Miscellaneous event facilities: define virtual events and generate events
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<event>I<Action>(?I<arg, arg, ...>?);
+
+=head1 DESCRIPTION
+
+The B<event>I<Action> methods provides several facilities for dealing with
+window system events, such as defining virtual events and synthesizing
+events. Virtual events are shared by all widgets of the same
+B<MainWindow>. Different L<MainWindow|Tk::MainWindow>s can have different
+virtual event.
+
+The following methods are currently supported:
+
+=over 4
+
+=item I<$widget>-E<gt>B<eventAdd>(B<'E<lt>E<lt>>I<virtual>B<E<gt>E<gt>'>I<, sequence >?,I<sequence, ...>?)
+
+Associates the virtual event I<virtual> with the physical
+event sequence(s) given by the I<sequence> arguments, so that
+the virtual event will trigger whenever any one of the I<sequence>s
+occurs.
+I<Virtual> may be any string value and I<sequence> may have
+any of the values allowed for the I<sequence> argument to the
+L<bind|Tk::bind> method.
+If I<virtual> is already defined, the new physical event sequences
+add to the existing sequences for the event.
+
+=item I<$widget>-E<gt>B<eventDelete>(B<'E<lt>E<lt>>I<virtual>B<E<gt>E<gt>'> ?,I<sequence,> I<sequence, ...>?)
+
+Deletes each of the I<sequence>s from those associated with
+the virtual event given by I<virtual>.
+I<Virtual> may be any string value and I<sequence> may have
+any of the values allowed for the I<sequence> argument to the
+L<bind|Tk::bind> method.
+Any I<sequence>s not currently associated with I<virtual>
+are ignored.
+If no I<sequence> argument is provided, all physical event sequences
+are removed for I<virtual>, so that the virtual event will not
+trigger anymore.
+
+=item I<$widget>-E<gt>B<eventGenerate>(I<event> ?,I<option =E<gt> value, option =E<gt> value, ...>?)
+
+Generates a window event and arranges for it to be processed just as if
+it had come from the window system.
+I<$window> is a reference to the window for which the event
+will be generated.
+I<Event> provides a basic description of
+the event, such as B<E<lt>Shift-Button-2E<gt>> or B<E<lt>E<lt>PasteE<gt>E<gt>>.
+If I<Window> is empty the whole screen is meant, and coordinates
+are relative to the screen.
+I<Event> may have any of the forms allowed for the I<sequence>
+argument of the L<bind|Tk::bind> method except that it must consist
+of a single event pattern, not a sequence.
+I<Option-value> pairs may be used to specify additional
+attributes of the event, such as the x and y mouse position;
+see L<"EVENT FIELDS"> below. If the B<-when> option is not specified, the
+event is processed immediately: all of the handlers for the event
+will complete before the B<eventGenerate> method returns.
+If the B<-when> option is specified then it determines when the
+event is processed.
+
+=item I<$widget>-E<gt>B<eventInfo>(?'B<E<lt>E<lt>>I<virtual>B<E<gt>E<gt>'>?)
+
+Returns information about virtual events.
+If the B<E<lt>E<lt>>I<virtual>B<E<gt>E<gt>> argument is omitted, the return value
+is a list of all the virtual events that are currently defined.
+If B<E<lt>E<lt>>I<virtual>B<E<gt>E<gt>> is specified then the return value is
+a list whose elements are the physical event sequences currently
+defined for the given virtual event; if the virtual event is
+not defined then B<undef> is returned.
+
+=back
+
+=head1 EVENT FIELDS
+
+The following options are supported for the B<eventGenerate>
+method. These correspond to the ``%'' expansions
+allowed in binding callback for the L<bind|Tk::bind> method.
+
+=over 4
+
+=item B<-above> => I<window>
+
+I<Window> specifies the I<above> field for the event,
+either as a window path name or as an integer window id.
+Valid for B<Configure> events.
+Corresponds to the L<%a|Tk::bind/'a'> substitution for binding scripts.
+
+=item B<-borderwidth> => I<size>
+
+I<Size> must be a screen distance; it specifies the
+I<border_width> field for the event.
+Valid for B<Configure> events.
+Corresponds to the L<%B|Tk::bind/'B'> substitution for binding scripts.
+
+=item B<-button> => I<number>
+
+I<Number> must be an integer; it specifies the I<detail> field
+for a B<ButtonPress> or B<ButtonRelease> event, overriding
+any button number provided in the base I<event> argument.
+Corresponds to the L<%b|Tk::bind/'b'> substitution for binding scripts.
+
+=item B<-count> => I<number>
+
+I<Number> must be an integer; it specifies the I<count> field
+for the event. Valid for B<Expose> events.
+Corresponds to the L<%c|Tk::bind/'c'> substitution for binding scripts.
+
+=item B<-delta> =E<gt> I<number>
+
+B<number> must be an integer; it specifies the B<delta> field for the
+B<MouseWheel> event. The delta refers to the direction and magnitude the
+mouse wheel was rotated. Note the value is not a screen distance but
+are units of motion in the mouse wheel. Typically these values are
+multiples of 120. For example, 120 should scroll the text widget up 4
+lines and -240 would scroll the text widget down 8 lines. Of course,
+other widgets may define different behaviors for mouse wheel motion.
+This field corresponds to the %D substitution for binding scripts.
+
+=item B<-detail> => I<detail>
+
+I<Detail> specifies the I<detail> field for the event
+and must be one of the following:
+
+=over 8
+
+ NotifyAncestor NotifyNonlinearVirtual
+ NotifyDetailNone NotifyPointer
+ NotifyInferior NotifyPointerRoot
+ NotifyNonlinear NotifyVirtual
+
+=back
+
+Valid for B<Enter>, B<Leave>, B<FocusIn> and
+B<FocusOut> events.
+Corresponds to the L<%d|Tk::bind/'d'> substitution for binding scripts.
+
+=item B<-focus>I< boolean>
+
+I<Boolean> must be a boolean value; it specifies the I<focus>
+field for the event.
+Valid for B<Enter> and B<Leave> events.
+Corresponds to the L<%f|Tk::bind/'f'> substitution for binding scripts.
+
+=item B<-height>I< size>
+
+I<Size> must be a screen distance; it specifies the I<height>
+field for the event. Valid for B<Configure> events.
+Corresponds to the L<%h|Tk::bind/'h'> substitution for binding scripts.
+
+=item B<-keycode>I< number>
+
+I<Number> must be an integer; it specifies the I<keycode>
+field for the event.
+Valid for B<KeyPress> and B<KeyRelease> events.
+Corresponds to the L<%k|Tk::bind/'k'> substitution for binding scripts.
+
+=item B<-keysym>I< name>
+
+I<Name> must be the name of a valid keysym, such as B<g>,
+B<space>, or B<Return>; its corresponding
+keycode value is used as the I<keycode> field for event, overriding
+any detail specified in the base I<event> argument.
+Valid for B<KeyPress> and B<KeyRelease> events.
+Corresponds to the L<%K|Tk::bind/'K'> substitution for binding scripts.
+
+=item B<-mode>I< notify>
+
+I<Notify> specifies the I<mode> field for the event and must be
+one of B<NotifyNormal>, B<NotifyGrab>, B<NotifyUngrab>, or
+B<NotifyWhileGrabbed>.
+Valid for B<Enter>, B<Leave>, B<FocusIn>, and
+B<FocusOut> events.
+Corresponds to the L<%m|Tk::bind/'m'> substitution for binding scripts.
+
+=item B<-override>I< boolean>
+
+I<Boolean> must be a boolean value; it specifies the
+I<override_redirect> field for the event.
+Valid for B<Map>, B<Reparent>, and B<Configure> events.
+Corresponds to the L<%o|Tk::bind/'o'> substitution for binding scripts.
+
+=item B<-place>I< where>
+
+I<Where> specifies the I<place> field for the event; it must be
+either B<PlaceOnTop> or B<PlaceOnBottom>.
+Valid for B<Circulate> events.
+Corresponds to the L<%p|Tk::bind/'p'> substitution for binding scripts.
+
+=item B<-root>I< window>
+
+I<Window> must be either a window path name or an integer window
+identifier; it specifies the I<root> field for the event.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Enter>, B<Leave>, and B<Motion>
+events.
+Corresponds to the L<%R|Tk::bind/'R'> substitution for binding scripts.
+
+=item B<-rootx>I< coord>
+
+I<Coord> must be a screen distance; it specifies the I<x_root>
+field for the event.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Enter>, B<Leave>, and B<Motion>
+events. Corresponds to the L<%X|Tk::bind/'X'> substitution for binding scripts.
+
+=item B<-rooty>I< coord>
+
+I<Coord> must be a screen distance; it specifies the I<y_root>
+field for the event.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Enter>, B<Leave>, and B<Motion>
+events.
+Corresponds to the L<%Y|Tk::bind/'Y'> substitution for binding scripts.
+
+=item B<-sendevent>I< boolean>
+
+B<Boolean> must be a boolean value; it specifies the I<send_event>
+field for the event. Valid for all events. Corresponds to the
+L<%E|Tk::bind/'E'> substitution for binding scripts.
+
+=item B<-serial>I< number>
+
+I<Number> must be an integer; it specifies the I<serial> field
+for the event. Valid for all events.
+Corresponds to the L<%#|Tk::bind/'#'> substitution for binding scripts.
+
+=item B<-state>I< state>
+
+I<State> specifies the I<state> field for the event.
+For B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Enter>, B<Leave>, and B<Motion> events
+it must be an integer value.
+For B<Visibility> events it must be one of B<VisibilityUnobscured>,
+B<VisibilityPartiallyObscured>, or B<VisibilityFullyObscured>.
+This option overrides any modifiers such as B<Meta> or B<Control>
+specified in the base I<event>.
+Corresponds to the L<%s|Tk::bind/'s'> substitution for binding scripts.
+
+=item B<-subwindow>I< window>
+
+I<Window> specifies the I<subwindow> field for the event, either
+as a path name for a Tk widget or as an integer window identifier.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Enter>, B<Leave>, and B<Motion> events.
+Similar to L<%S|Tk::bind/'S'> substitution for binding scripts.
+
+=item B<-time>I< integer>
+
+I<Integer> must be an integer value; it specifies the I<time> field
+for the event.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Enter>, B<Leave>, B<Motion>,
+and B<Property> events.
+Corresponds to the L<%t|Tk::bind/'t'> substitution for binding scripts.
+
+
+=item B<-warp>I< boolean>
+
+I<boolean> must be a boolean value; it specifies whether
+the screen pointer should be warped as well.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, and B<Motion> events.
+
+=item B<-width>I< size>
+
+I<Size> must be a screen distance; it specifies the I<width> field
+for the event.
+Valid for B<Configure> events.
+Corresponds to the L<%w|Tk::bind/'w'> substitution for binding scripts.
+
+=item B<-when>I< when>
+
+I<When> determines when the event will be processed; it must have one
+of the following values:
+
+=over 8
+
+=item B<now>
+
+Process the event immediately, before the command returns.
+This also happens if the B<-when> option is omitted.
+
+=item B<tail>
+
+Place the event on perl/Tk's event queue behind any events already
+queued for this application.
+
+=item B<head>
+
+Place the event at the front of perl/Tk's event queue, so that it
+will be handled before any other events already queued.
+
+=item B<mark>
+
+Place the event at the front of perl/Tk's event queue but behind any
+other events already queued with B<-when mark>.
+This option is useful when generating a series of events that should
+be processed in order but at the front of the queue.
+
+=back
+
+=item B<-x>I< coord>
+
+I<Coord> must be a screen distance; it specifies the I<x> field
+for the event.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Motion>, B<Enter>, B<Leave>,
+B<Expose>, B<Configure>, B<Gravity>, and B<Reparent>
+events.
+Corresponds to the the L<%x|Tk::bind/'x'> substitution for binding scripts.
+If I<Window> is empty the coordinate is relative to the
+screen, and this option corresponds to the L<%X|Tk::bind/'X'> substitution
+for binding scripts.
+
+=item B<-y>I< coord>
+
+I<Coord> must be a screen distance; it specifies the I<y>
+field for the event.
+Valid for B<KeyPress>, B<KeyRelease>, B<ButtonPress>,
+B<ButtonRelease>, B<Motion>, B<Enter>, B<Leave>,
+B<Expose>, B<Configure>, B<Gravity>, and B<Reparent>
+events.
+Corresponds to the the L<%y|Tk::bind/'y'> substitution for binding scripts.
+If I<Window> is empty the coordinate is relative to the
+screen, and this option corresponds to the L<%Y|Tk::bind/'Y'> substitution
+for binding scripts.
+
+Any options that are not specified when generating an event are filled
+with the value 0, except for I<serial>, which is filled with the
+next X event serial number.
+
+=back
+
+=head1 VIRTUAL EVENT EXAMPLES
+
+In order for a virtual event binding to trigger, two things must
+happen. First, the virtual event must be defined with the
+B<eventAdd> method. Second, a binding must be created for
+the virtual event with the B<bind> method.
+Consider the following virtual event definitions:
+
+ $widget->eventAdd('<<Paste>>' => '<Control-y>');
+ $widget->eventAdd('<<Paste>>' => '<Button-2>');
+ $widget->eventAdd('<<Save>>' => '<Control-X><Control-S>');
+ $widget->eventAdd('<<Save>>' => '<Shift-F12>');
+
+In the B<bind> method, a virtual event can be bound like any other
+builtin event type as follows:
+
+ $entry->bind('Tk::Entry', '<<Paste>>' => sub {
+ $entry->Insert($entry->selectionGet) });
+
+The double angle brackets are used to specify that a virtual event is being
+bound. If the user types Control-y or presses button 2, or if
+a B<E<lt>E<lt>PasteE<gt>E<gt>> virtual event is synthesized with B<eventGenerate>,
+then the B<E<lt>E<lt>PasteE<gt>E<gt>> binding will be invoked.
+
+If a virtual binding has the exact same sequence as a separate
+physical binding, then the physical binding will take precedence.
+Consider the following example:
+
+ $mw->eventAdd('<<Paste>>' => '<Control-y>','<Meta-Control-y>');
+ $mw->bind('Tk::Entry', '<Control-y>' => sub{print 'Control-y'});
+ $mw->bind('Tk::Entry', '<<Paste>>' => sub{print 'Paste'});
+
+When the user types Control-y the B<E<lt>Control-yE<gt>> binding
+will be invoked, because a physical event is considered
+more specific than a virtual event, all other things being equal.
+However, when the user types Meta-Control-y the
+B<E<lt>E<lt>PasteE<gt>E<gt>> binding will be invoked, because the
+B<Meta> modifier in the physical pattern associated with the
+virtual binding is more specific than the B<E<lt>Control-y>E<gt> sequence for
+the physical event.
+
+Bindings on a virtual event may be created before the virtual event exists.
+Indeed, the virtual event never actually needs to be defined, for instance,
+on platforms where the specific virtual event would meaningless or
+ungeneratable.
+
+When a definition of a virtual event changes at run time, all windows
+will respond immediately to the new definition.
+Starting from the preceding example, if the following code is executed:
+
+ $entry->bind(ref($entry), '<Control-y>' => undef);
+ $entry->eventAdd('<<Paste>>' => '<Key-F6>');
+
+the behavior will change such in two ways. First, the shadowed
+B<E<lt>E<lt>PasteE<gt>E<gt>> binding will emerge.
+Typing Control-y will no longer invoke the B<E<lt>Control-yE<gt>> binding,
+but instead invoke the virtual event B<E<lt>E<lt>PasteE<gt>E<gt>>. Second,
+pressing the F6 key will now also invoke the B<E<lt>E<lt>PasteE<gt>E<gt>> binding.
+
+=head1 SEE ALSO
+
+L<Tk::bind|Tk::bind>
+L<Tk::callbacks|Tk::callbacks>
+
+=head1 KEYWORDS
+
+event, binding, define, handle, virtual event
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/exit.pod b/Master/tlpkg/tlperl/lib/Tk/exit.pod
new file mode 100644
index 00000000000..bb564cd0b82
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/exit.pod
@@ -0,0 +1,42 @@
+# Copyright (c) 1993 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::exit - End the application
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+ use Tk qw(exit);
+ ...
+ B<exit>?(I<returnCode>)?;
+
+=head1 DESCRIPTION
+
+Terminate the process, returning I<returnCode> to the
+system as the exit status.
+If I<returnCode> isn't specified then it defaults
+to 0.
+
+If calling C<exit> from code invoked via a Tk callback then
+this Tk version of C<exit> cleans up more reliably than using
+the perl C<exit>.
+
+=head1 CAVEATS
+
+Using C<exit> from a forked process will terminate both the child
+process B<and> the parent process. As C<Tk::exit> is imported by
+default one should use C<CORE::exit> in the forked process instead.
+
+=head1 KEYWORDS
+
+exit, process
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/file.xbm b/Master/tlpkg/tlperl/lib/Tk/file.xbm
new file mode 100644
index 00000000000..7bf12bb4c9f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/file.xbm
@@ -0,0 +1,5 @@
+#define file_width 12
+#define file_height 12
+static unsigned char file_bits[] = {
+ 0xfe, 0x00, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xfe, 0x03};
diff --git a/Master/tlpkg/tlperl/lib/Tk/file.xpm b/Master/tlpkg/tlperl/lib/Tk/file.xpm
new file mode 100644
index 00000000000..10cc24f9a1e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/file.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+static char * file_xpm[] = {
+"12 12 3 1",
+" s None c None",
+". c #000000000000",
+"X c white",
+" ........ ",
+" .XXXXXX. ",
+" .XXXXXX... ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .......... "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/fileevent.pod b/Master/tlpkg/tlperl/lib/Tk/fileevent.pod
new file mode 100644
index 00000000000..1a98cfd6b71
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/fileevent.pod
@@ -0,0 +1,112 @@
+# Copyright (c) 1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::fileevent - Execute a callback when a filehandle becomes readable or writable
+
+=for category Binding Events and Callbacks
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<fileevent>(I<fileHandle>,B<readable>?,I<callback>?)
+
+I<$widget>-E<gt>B<fileevent>(I<fileHandle>,B<writable>?,I<callback>?)
+
+=head1 DESCRIPTION
+
+This command is used to create I<file event handlers>. A file event
+handler is a binding between a filehandle and a callback, such that the callback
+is evaluated whenever the filehandle becomes readable or writable. File event
+handlers are most commonly used to allow data to be received from another
+process on an event-driven basis, so that the receiver can continue to
+interact with the user while waiting for the data to arrive. If an
+application invokes C<E<lt>E<gt>>, C<sysread> or C<read> on a blocking filehandle when
+there is no input data available, the process will block; until the input
+data arrives, it will not be able to service other events, so it will
+appear to the user to ``freeze up''. With B<fileevent>, the process can
+tell when data is present and only invoke B<gets> or B<read> when
+they won't block.
+
+The I<fileHandle> argument to B<fileevent> refers to an open filehandle,
+such as the return value from a previous B<open> or B<socket>
+command.
+If the I<callback> argument is specified, then B<fileevent>
+creates a new event handler: I<callback> will be evaluated
+whenever the filehandle becomes readable or writable (depending on the
+argument to B<fileevent>).
+In this case B<fileevent> returns an empty string.
+The B<readable> and B<writable> event handlers for a file
+are independent, and may be created and deleted separately.
+However, there may be at most one B<readable> and one B<writable>
+handler for a file at a given time in a given interpreter.
+If B<fileevent> is called when the specified handler already
+exists in the invoking interpreter, the new callback replaces the old one.
+
+If the I<callback> argument is not specified, B<fileevent>
+returns the current callback for I<fileHandle>, or an empty string
+if there is none.
+If the I<callback> argument is specified as an empty string
+then the event handler is deleted, so that no callback will be invoked.
+A file event handler is also deleted automatically whenever
+its filehandle is closed or its interpreter is deleted.
+
+A filehandle is considered to be readable if there is unread data
+available on the underlying device.
+A filehandle is also considered to be readable if an end of file or
+error condition is present on the underlying file or device.
+It is important for I<callback> to check for these conditions
+and handle them appropriately; for example, if there is no special
+check for end of file, an infinite loop may occur where I<callback>
+reads no data, returns, and is immediately invoked again.
+
+A filehandle is considered to be writable if at least one byte of data
+can be written to the underlying file or device without blocking,
+or if an error condition is present on the underlying file or device.
+
+Event-driven I/O works best for filehandles that have been
+placed into nonblocking mode.
+In blocking mode, a C<print> command may block if you give it
+more data than the underlying file or device can accept, and a
+C<E<lt>E<gt>>, C<sysread> or C<read> command will block if you attempt to read
+more data than is ready; no events will be processed while the
+commands block.
+In nonblocking mode C<print>, C<E<lt>E<gt>>, C<sysread> and C<read> never block.
+See the documentation for the individual commands for information
+on how they handle blocking and nonblocking filehandles.
+
+The callback for a file event is executed in the context of I<$widget>
+with which B<fileevent> was invoked.
+If an error occurs while executing the callback then the
+L<Tk::Error> mechanism is used to report the error.
+In addition, the file event handler is deleted if it ever returns
+an error; this is done in order to prevent infinite loops due to
+buggy handlers.
+
+=head1 BUGS
+
+On windows platforms B<fileevent> is limited in the types of filehandles
+that behave correctly. Making filefhandles non-blocking is only implemented
+on a subset of UNIX platforms (see L<Tk::IO>).
+
+=head1 CREDITS
+
+B<fileevent> is based on the B<addinput> command created
+by Mark Diekhans.
+
+=head1 SEE ALSO
+
+L<Tk::IO|Tk::IO>
+L<Tk::callbacks|Tk::callbacks>
+
+=head1 KEYWORDS
+
+asynchronous I/O, blocking, filehandle, event handler, nonblocking, readable,
+callback, writable.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/focus.pod b/Master/tlpkg/tlperl/lib/Tk/focus.pod
new file mode 100644
index 00000000000..61dab55b277
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/focus.pod
@@ -0,0 +1,166 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+focus - Manage the input focus
+
+=for category User Interaction
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<focus>
+
+S< >I<$widget>-E<gt>B<focus>I<Option>
+
+S< >I<$widget>-E<gt>B<focusNext>
+
+S< >I<$widget>-E<gt>B<focusPrev>
+
+S< >I<$widget>-E<gt>B<focusFollowsMouse>
+
+=head1 DESCRIPTION
+
+The B<focus> methods are used to manage the Tk input focus.
+At any given time, one window on each display is designated as
+the I<focus window>; any key press or key release events for the
+display are sent to that window.
+It is normally up to the window manager to redirect the focus among the
+top-level windows of a display. For example, some window managers
+automatically set the input focus to a top-level window whenever
+the mouse enters it; others redirect the input focus only when
+the user clicks on a window.
+Usually the window manager will set the focus
+only to top-level windows, leaving it up to the application to
+redirect the focus among the children of the top-level.
+
+Tk remembers one focus window for each top-level (the most recent
+descendant of that top-level to receive the focus); when the window
+manager gives the focus
+to a top-level, Tk automatically redirects it to the remembered
+window. Within a top-level Tk uses an I<explicit> focus model
+by default. Moving the mouse within a top-level does not normally
+change the focus; the focus changes only when a widget
+decides explicitly to claim the focus (e.g., because of a button
+click), or when the user types a key such as Tab that moves the
+focus.
+
+The method B<focusFollowsMouse> may be invoked to
+create an I<implicit> focus model: it reconfigures Tk so that
+the focus is set to a window whenever the mouse enters it.
+The methods B<focusNext> and B<focusPrev>
+implement a focus order among the windows of a top-level; they
+are used in the default bindings for Tab and Shift-Tab, among other
+things.
+
+The B<focus> methods can take any of the following forms:
+
+=over 4
+
+=item I<$widget>-E<gt>B<focusCurrent>
+
+Returns the focus window on the display containing
+the I<$widget>, or an empty string if no window in
+this application has the focus on that display.
+
+=item I<$widget>-E<gt>B<focus>
+
+If the application currently has the input focus on I<$widget>'s
+display, this command resets the input focus for I<$widget>'s display
+to I<$widget> and returns an empty string.
+If the application doesn't currently have the input focus on
+I<$widget>'s display, I<$widget> will be remembered as the focus
+for its top-level; the next time the focus arrives at the top-level,
+Tk will redirect it to I<$widget>.
+
+=item I<$widget>-E<gt>B<focusForce>
+
+Sets the focus of I<$widget>'s display to I<$widget>, even if
+the application doesn't currently have the input focus for the display.
+This command should be used sparingly, if at all.
+In normal usage, an application should not claim the focus for
+itself; instead, it should wait for the window manager to give it
+the focus.
+
+=item I<$widget>-E<gt>B<focusLastfor>
+
+Returns the name of the most recent window to have the input focus
+among all the windows in the same top-level as I<$widget>.
+If no window in that top-level has ever had the input focus, or
+if the most recent focus window has been deleted, then
+the top-level is returned. The return value is the window that
+will receive the input focus the next time the window manager gives
+the focus to the top-level.
+
+=item I<$widget>-E<gt>B<focusNext>
+
+=item I<$widget>-E<gt>B<focusPrev>
+
+B<focusNext> is a utility method used for keyboard traversal, but can be
+useful in other contexts.
+It sets the focus to the ``next'' window after I<$widget> in focus order.
+The focus order is determined by
+the stacking order of windows and the structure of the window hierarchy.
+Among siblings, the focus order is the same as the stacking order, with the
+lowest window being first.
+If a window has children, the window is visited first, followed by
+its children (recursively), followed by its next sibling.
+Top-level windows other than I<$widget> are skipped, so that
+B<focusNext> never returns a window in a different top-level
+from I<$widget>.
+
+After computing the next window, B<focusNext> examines the
+window's B<-takefocus> option to see whether it should be skipped.
+If so, B<focusNext> continues on to the next window in the focus
+order, until it eventually finds a window that will accept the focus
+or returns back to I<$widget>.
+
+B<focusPrev> is similar to B<focusNext> except that it
+sets the focus to the window just before I<$widget> in the focus order.
+
+=item I<$widget>-E<gt>B<focusFollowsMouse>
+
+B<focusFollowsMouse> changes the focus model for the application
+to an implicit one where the window under the mouse gets the focus.
+After this procedure is called, whenever the mouse enters a window
+Tk will automatically give it the input focus.
+The B<focus> command may be used to move the focus to a window
+other than the one under the mouse, but as soon as the mouse moves
+into a new window the focus will jump to that window.
+Note: at present there is no built-in support for returning the
+application to an explicit focus model; to do this you'll have
+to write a script that deletes the bindings created by
+B<focusFollowsMouse>.
+
+=back
+
+=head1 QUIRKS
+
+When an internal window receives the input focus, Tk doesn't actually
+set the X focus to that window; as far as X is concerned, the focus
+will stay on the top-level window containing the window with the focus.
+However, Tk generates FocusIn and FocusOut events just as if the X
+focus were on the internal window. This approach gets around a
+number of problems that would occur if the X focus were actually moved;
+the fact that the X focus is on the top-level is invisible unless
+you use C code to query the X server directly.
+
+=head1 CAVEATS
+
+Note that for the B<Canvas> widget, the call to B<focus> has to be
+fully qualified. This is because there is already a focus method for
+the B<Canvas> widget, which sets the focus on individual canvas tags.
+
+S< >I<$canvas>-E<gt>B<Tk::focus>
+
+
+=head1 KEYWORDS
+
+events, focus, keyboard, top-level, window manager
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/folder.xbm b/Master/tlpkg/tlperl/lib/Tk/folder.xbm
new file mode 100644
index 00000000000..0398f0de777
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/folder.xbm
@@ -0,0 +1,5 @@
+#define folder_width 16
+#define folder_height 10
+static unsigned char folder_bits[] = {
+ 0xfc, 0x00, 0x02, 0x07, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08,
+ 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0xff, 0x07};
diff --git a/Master/tlpkg/tlperl/lib/Tk/folder.xpm b/Master/tlpkg/tlperl/lib/Tk/folder.xpm
new file mode 100644
index 00000000000..fda7c15a549
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/folder.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static char * folder_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"16 12 3 1",
+/* colors */
+" s None c None",
+". c black",
+"X c #f0ff80",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+"............. "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/form.pod b/Master/tlpkg/tlperl/lib/Tk/form.pod
new file mode 100644
index 00000000000..64208c8e26e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/form.pod
@@ -0,0 +1,397 @@
+# Copyright (c) 1996, Expert Interface Technologies
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# The file man.macros and some of the macros used by this file are
+# copyrighted: (c) 1990 The Regents of the University of California.
+# (c) 1994-1995 Sun Microsystems, Inc.
+# The license terms of the Tcl/Tk distribution are in the file
+# license.tcl.
+
+=head1 NAME
+
+Tk::form - Geometry manager based on attachment rules
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+S< >I<$widget>->B<form>?(I<args>)?
+
+S< >I<$widget>->B<form>I<Option>?(I<args>)?
+
+=head1 DESCRIPTION
+
+The B<form> method is used to communicate with the
+B<form> Geometry Manager, a geometry manager that arranges the
+geometry of the children in a parent window according to attachment
+rules. The B<form> geometry manager is very flexible and
+powerful; it can be used to emulate all the existing features of the
+Tk packer and placer geometry managers (see L<pack|Tk::pack>,
+L<place|Tk::place>).
+The B<form> method can have any of several forms,
+depending on I<Option>:
+
+=over 4
+
+=item I<$slave>->B<form>?(I<options>)?
+
+Sets or adjusts the attachment values of the slave window
+according to the I<-option>=>I<value> argument pairs.
+
+=over 8
+
+=item B<-b> => I<attachment>
+
+Abbreviation for the B<-bottom> option.
+
+=item B<-bottom> => I<attachment>
+
+Specifies an attachment for the bottom edge of the slave window. The
+attachment must specified according to L<"SPECIFYING ATTACHMENTS"> below.
+
+=item B<-bottomspring> => I<weight>
+
+Specifies the weight of the spring at the bottom edge of the slave
+window. See L<"USING SPRINGS"> below.
+
+=item B<-bp> => I<value>
+
+Abbreviation for the B<-padbottom> option.
+
+=item B<-bs> => I<weight>
+
+Abbreviation for the B<-bottomspring> option.
+
+=item B<-fill> => I<style>
+
+Specifies the fillings when springs are used for this widget. The
+value must be B<x>, B<y>, B<both> or B<none>.
+
+=item B<-in> => I<$master>
+
+Places the slave window into the specified I<$master> window. If the slave
+was originally in another master window, all attachment values with
+respect to the original master window are discarded. Even if the
+attachment values are the same as in the original master window, they
+need to be specified again. The B<-in> flag, when needed, must appear
+as the first flag of I<options>. Otherwise an error is
+generated.
+
+=item B<-l> => I<attachment>
+
+Abbreviation for the B<-left> option.
+
+=item B<-left> => I<attachment>
+
+Specifies an attachment for the left edge of the slave window. The
+attachment must specified according to L<"SPECIFYING ATTACHMENTS"> below.
+
+=item B<-leftspring> => I<weight>
+
+Specifies the weight of the spring at the left edge of the slave
+window. See L<"USING SPRINGS"> below.
+
+=item B<-lp> => I<value>
+
+Abbreviation for the B<-padleft> option.
+
+=item B<-ls> => I<weight>
+
+Abbreviation for the B<-leftspring> option.
+
+=item B<-padbottom> => I<value>
+
+Specifies the amount of external padding to leave on the bottom side
+of the slave. The I<value> may have any of the forms acceptable to
+B<Tk_GetPixels>.
+
+=item B<-padleft> => I<value>
+
+Specifies the amount of external padding to leave on the left side of
+the slave.
+
+=item B<-padright> => I<value>
+
+Specifies the amount of external padding to leave on the right side of
+the slave.
+
+=item B<-padtop> => I<value>
+
+Specifies the amount of external padding to leave on the top side of
+the slave.
+
+=item B<-padx> => I<value>
+
+Specifies the amount of external padding to leave on both the left and
+the right sides of the slave.
+
+=item B<-pady> => I<value>
+
+Specifies the amount of external padding to leave on both the top and
+the bottom sides of the slave.
+
+=item B<-r> => I<attachment>
+
+Abbreviation for the B<-right> option.
+
+=item B<-right> => I<attachment>
+
+Specifies an attachment for the right edge of the slave window. The
+attachment must specified according to L<"SPECIFYING ATTACHMENTS"> below.
+
+=item B<-rightspring> => I<weight>
+
+Specifies the weight of the spring at the right edge of the slave
+window. See L<"USING SPRINGS"> below.
+
+=item B<-rp> => I<value>
+
+Abbreviation for the B<-padright> option.
+
+=item B<-rs> => I<weight>
+
+Abbreviation for the B<-rightspring> option.
+
+=item B<-t> => I<attachment>
+
+Abbreviation for the B<-top> option.
+
+=item B<-top> => I<attachment>
+
+Specifies an attachment for the top edge of the slave window. The
+attachment must specified according to L<"SPECIFYING ATTACHMENTS"> below.
+
+=item B<-topspring> => I<weight>
+
+Specifies the weight of the spring at the top edge of the slave
+window. See L<"USING SPRINGS"> below.
+
+=item B<-tp> => I<value>
+
+Abbreviation for the B<-padtop> option.
+
+=item B<-ts> => I<weight>
+
+Abbreviation for the B<-topspring> option.
+
+=back
+
+=item I<$master>->B<formCheck>
+
+This method checks whether there is circular dependency in the
+attachments of the master's slaves (see L<"CIRCULAR DEPENDENCY"> below).
+It returns the Boolean value B<TRUE> if it
+discover circular dependency and B<FALSE> otherwise.
+
+=item I<$slave>->B<formForget>
+
+Removes the slave from its master and unmaps its window.
+The slave will no longer be managed by form. All attachment values
+with respect to its master window are discarded. If another slave
+is attached to this slave, then the attachment of the other slave will
+be changed to grid attachment based on its geometry.
+
+=item I<$master>->B<formGrid>?(I<x_size, y_size>)?
+
+When I<x_size> and I<y_size> are given, this method returns the
+number of grids of the I<$master> window in a pair of integers of the form
+(I<x_size, y_size>). When both I<x_size> and I<y_size> are
+given, this method changes the number of horizontal and vertical
+grids on the master window.
+
+=item I<$slave>->B<formInfo>?(I<-option)>?
+
+Queries the attachment options of a slave window. I<-option> can be
+any of the options accepted by the B<form> method. If
+I<-option> is given, only the value of that option is returned.
+Otherwise, this method returns a list whose elements are the current
+configuration state of the slave given in the same I<option-value> form
+that might be specified to B<form>. The first two
+elements in this list list are "B<-in>=>I<$master>" where
+I<$master> is the slave's master window.
+
+=item I<$master>->B<formSlaves>
+
+Returns a list of all of the slaves for the master window. The order
+of the slaves in the list is the same as their order in the packing
+order. If master has no slaves then an empty string is returned.
+
+=back
+
+=head1 SPECIFYING ATTACHMENTS
+
+One can specify an attachment for each side of a slave window managed
+by form. An attachment is specified in the the form "-I<side> =>
+[I<anchor_point>, I<offset>]". -I<side> can be one of
+B<-top>, B<-bottom>, B<-left> or B<-right>.
+
+I<Offset> is given in screen units (i.e. any of the forms
+acceptable to B<Tk_GetPixels>). A positive offset indicates
+shifting to a position to the right or bottom of an anchor point. A
+negative offset indicates shifting to a position to the left or top of
+an anchor point.
+
+I<Anchor_point> can be given in one of the
+following forms:
+
+=over 4
+
+=item B<Grid Attachment>
+
+The master window is divided into a number of horizontal and vertical
+grids. By default the master window is divided into 100x100 grids; the
+number of grids can be adjusted by the B<formGrid> method. A
+grid attachment anchor point is given by a B<%> sign followed by an
+integer value. For example, B<'%0'> specifies the first grid
+line (the top or left edge of the master window). B<'%100'> specifies
+the last grid line (the bottom or right edge of the master window).
+
+=item B<Opposite Side Attachment>
+
+Opposite attachment specifies an anchor point located on the
+B<opposite> side of another slave widget, which must be managed by
+form in the same master window. An opposite attachment anchor point
+is given by the name of another widget. For example,
+"I<$b>->B<form>(B<-top>=>[I<$a>,0])" attaches the top side of the widget I<$b> to the
+bottom of the widget I<$a>.
+
+=item B<Parallel Side Attachment>
+
+Opposite attachment specifies an anchor point located on the
+B<same> side of another slave widget, which must be managed by
+form in the same master window. An parallel attachment anchor point
+is given by the sign B<E<amp>> follwed by the name of another widget.
+For example, "I<$b>->B<form>(B<-top>=>['&',I<$a>,0])" attaches the top side of
+the widget I<$b> to the top of the widget I<$a>, making
+the top sides of these two widgets at the same vertical position
+in their parent window.
+
+=item B<No Attachment>
+
+Specifies a side of the slave to be attached to nothing, indicated by
+the keyword B<none>. When the B<none> anchor point is given, the
+offset must be zero (or not present).
+When a side of a slave is attached to B<['none', 0]>, the position
+of this side is calculated by the position of the other side and the
+natural size of the slave. For example, if a the left side of a
+widget is attached to B<['%0', 100]>, its right side attached to
+B<['none', 0]>, and the natural size of the widget is B<50> pixels,
+the right side of the widget will be positioned at pixel
+B<['%0', 149]>.
+When both B<-top> and B<-bottom> are attached to B<none>,
+then by default B<-top> will be attached to B<['%0', 0]>. When both
+B<-left> and B<-right> are attached to none, then by default
+B<-left> will be attached to B<['%0', 0]>.
+
+=back
+
+Shifting effects can be achieved by specifying a non-zero offset with
+an anchor point. In the following example, the top side of
+widget I<\$b> is attached to the bottom of
+I<\$a>; hence I<\$b>
+always appears below I<\$a>. Also, the left edge of I<\$b>
+is attached to the left side of I<\$a> with a 10
+pixel offest. Therefore, the left edge of I<\$b> is always
+shifted 10 pixels to the right of I<\$a>'s left edge:
+
+S< >I<$b>->B<form>(B<-left>=>[I<$a>,10], B<-top>=>[I<$a>,0]);
+
+=head2 ABBREVIATIONS:
+
+Certain abbreviations can be made on the
+attachment specifications: First an offset of zero can be omitted.
+Thus, the following two lines are equivalent:
+
+S< >I<$b>->B<form>(B<-top>=>[I<$a>,0], B<-right>=>['%100',0]);
+
+S< >I<$b>->B<form>(B<-top>=>[I<$a>], B<-right>=>'%100');
+
+In the second case, when the anchor point is omitted, the offset must
+be given. A default anchor point is chosen according to the value of
+the offset. If the anchor point is B<0> or positive, the default
+anchor point %0 is used; thus, "I<$b>->B<form>(B<-top>=>15)" attaches the top
+edge of I<$b> to a position 15 pixels below the top edge of the
+master window. If the anchor point is "B<-0>" or negative, the
+default anchor point B<%100> is used; thus, "I<$a>->B<form>(B<-right>=>-2)"
+attaches the right edge of I<\$a> to a position 2 pixels to
+the left of the master window's right edge. An further example
+below shows a method with its equivalent abbreviation.
+
+S< >I<$b>->B<form>(B<-top>=>['%0',10], B<-bottom>=>['%100',0]);
+
+S< >I<$b>->B<form>(B<-top>=>10, B<-bottom>=>-0);
+
+=head1 USING SPRINGS
+
+To be written.
+
+=head1 ALGORITHM OF FORM
+
+B<form> starts with any slave in the list of slaves of the master
+window. Then it tries to determine the position of each side of the
+slave.
+
+If the attachment of a side of the slave is grid attachment, the
+position of the side is readily determined.
+
+If the attachment of this side is B<none>, then form tries to
+determine the position of the opposite side first, and then use the
+position of the opposite side and the natural size of the slave to
+determine the position of this side.
+
+If the attachment is opposite or parallel widget attachments, then
+form tries to determine the positions of the other widget first,
+and then use the positions of the other widget and the natural size of
+the slave determine the position of this side. This recursive
+algorithmis carried on until the positions of all slaves are
+determined.
+
+=head1 CIRCULAR DEPENDENCY
+
+The algorithm of form will fail if a circular dependency exists in
+the attachments of the slaves. For example:
+
+S< >I<$c>->B<form>(B<-left>=>I<$b>);
+
+S< >I<$b>->B<form>(B<-right>=>I<$c>);
+
+In this example, the position of the left side of I<$b> depends on
+the right side of I<$c>, which in turn depends on the left side of I<$b>.
+
+When a circular dependency is discovered during the execution of the
+form algorithm, form will generate a background error and the
+geometry of the slaves are undefined (and will be arbitrary). Notice
+that form only executes the algorithm when the specification of the
+slaves' attachments is complete. Therefore, it allows intermediate
+states of circular dependency during the specification of the slaves'
+attachments. Also, unlike the Motif Form manager widget, form
+defines circular dependency as
+``I<dependency in the same dimension>''.
+Therefore, the following code fragment will does not
+have circular dependency because the two widgets do not depend on each
+other in the same dimension (I<$b> depends I<$c> in the
+horizontal dimension and I<$c> depends on I<$b> in the vertical
+dimension):
+
+S< >I<$b>->B<form>(B<-left>=>I<$c>);
+
+S< >I<$c>->B<form>(B<-top>=>I<$b>);
+
+=head1 BUGS
+
+Springs have not been fully implemented yet.
+
+=head1 SEE ALSO
+
+L<Tk::grid|Tk::grid>
+L<Tk::pack|Tk::pack>
+L<Tk::place|Tk::place>
+
+=head1 KEYWORDS
+
+geometry manager, form, attachment, spring, propagation, size, pack,
+tix, master, slave
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/getOpenFile.pod b/Master/tlpkg/tlperl/lib/Tk/getOpenFile.pod
new file mode 100644
index 00000000000..56d39422afd
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/getOpenFile.pod
@@ -0,0 +1,182 @@
+# Copyright (c) 1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+=head1 NAME
+
+getOpenFile, getSaveFile - pop up a dialog box for the user to select a file to open or save.
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<getOpenFile>(?I<-option>=E<gt>value, ...>?)
+
+S< >I<$widget>-E<gt>B<getSaveFile>(?I<-option>=E<gt>value, ...>?)
+
+=head1 DESCRIPTION
+
+The methods B<getOpenFile> and B<getSaveFile> pop up a
+dialog box for the user to select a file to open or save.
+
+The B<getOpenFile> method is usually associated with the B<Open>
+command in the B<File> menu. Its purpose is for the user to select an
+existing file I<only>. If the user enters an non-existent file, the
+dialog box gives the user an error prompt and requires the user to give
+an alternative selection. If an application allows the user to create
+new files, it should do so by providing a separate B<New> menu command.
+
+The B<getSaveFile> method is usually associated with the B<Save>
+as command in the B<File> menu. If the user enters a file that
+already exists, the dialog box prompts the user for confirmation
+whether the existing file should be overwritten or not.
+
+If the user selects a file, both B<getOpenFile> and
+B<getSaveFile> return the full pathname of this file. If the
+user cancels the operation, both commands return an undefined value.
+
+The following I<option-value> pairs are possible as command line
+arguments to these two commands:
+
+=over 4
+
+=item B<-defaultextension> =E<gt> I<extension>
+
+Specifies a string that will be appended to the filename if the user
+enters a filename without an extension. The default value is the empty
+string, which means no extension will be appended to the filename in
+any case. This option is ignored on the Macintosh platform, which
+does not require extensions to filenames, and the UNIX implementation
+guesses reasonable values for this from the B<-filetypes>
+option when this is not supplied.
+
+=item B<-filetypes> =E<gt> [I<filePattern> ?, ...?]
+
+If a B<File types> listbox exists in the file dialog on the particular
+platform, this option gives the I<filetype>s in this listbox. When
+the user choose a filetype in the listbox, only the files of that type
+are listed. If this option is unspecified, or if it is set to the
+empty list, or if the B<File types> listbox is not supported by the
+particular platform then all files are listed regardless of their
+types. See L<"SPECIFYING FILE PATTERNS"> below for a
+discussion on the contents of I<filePattern>s.
+
+=item B<-initialdir> =E<gt> I<directory>
+
+Specifies that the files in I<directory> should be displayed
+when the dialog pops up. If this parameter is not specified, then
+the files in the current working directory are displayed. This
+option may not always work on the Macintosh. This is not a bug.
+Rather, the I<General Controls> control panel on the Mac allows the
+end user to override the application default directory.
+
+=item B<-initialfile> =E<gt> I<filename>
+
+Specifies a filename to be displayed in the dialog when it pops
+up. This option is ignored by the B<getOpenFile> method.
+
+=item B<-multiple>
+
+Allows the user to choose multiple files from the Open dialog. On the
+Macintosh, this is only available when Navigation Services are
+installed.
+
+=item B<-message> =E<gt> I<string>
+
+Specifies a message to include in the client area of the dialog. This
+is only available on the Macintosh, and only when Navigation Services
+are installed.
+
+=item B<-title> =E<gt> I<titleString>
+
+Specifies a string to display as the title of the dialog box. If this
+option is not specified, then a default title is displayed. This
+option is ignored on the Macintosh platform.
+
+=back
+
+=head1 SPECIFYING FILE PATTERNS
+
+The I<filePattern>s given by the B<-filetypes> option
+are a list of file patterns. Each file pattern is a list of the
+form
+
+ typeName [extension ?extension ...?] ?[macType ?macType ...?]?
+
+I<typeName> is the name of the file type described by this
+file pattern and is the text string that appears in the B<File types>
+listbox. I<extension> is a file extension for this file pattern.
+I<macType> is a four-character Macintosh file type. The list of
+I<macType>s is optional and may be omitted for applications that do
+not need to execute on the Macintosh platform.
+
+Several file patterns may have the same I<typeName,> in which case
+they refer to the same file type and share the same entry in the
+listbox. When the user selects an entry in the listbox, all the files
+that match at least one of the file patterns corresponding
+to that entry are listed. Usually, each file pattern corresponds to a
+distinct type of file. The use of more than one file patterns for one
+type of file is necessary on the Macintosh platform only.
+
+On the Macintosh platform, a file matches a file pattern if its
+name matches at least one of the I<extension>(s) AND it
+belongs to at least one of the I<macType>(s) of the
+file pattern. For example, the B<C Source Files> file pattern in the
+sample code matches with files that have a B<\.c> extension AND
+belong to the I<macType> B<TEXT>. To use the OR rule instead,
+you can use two file patterns, one with the I<extensions> only and
+the other with the I<macType> only. The B<GIF Files> file type
+in the sample code matches files that EITHER have a B<\.gif>
+extension OR belong to the I<macType> B<GIFF>.
+
+On the Unix and Windows platforms, a file matches a file pattern
+if its name matches at at least one of the I<extension>(s) of
+the file pattern. The I<macType>s are ignored.
+
+=head1 SPECIFYING EXTENSIONS
+
+On the Unix and Macintosh platforms, extensions are matched using
+glob-style pattern matching. On the Windows platforms, extensions are
+matched by the underlying operating system. The types of possible
+extensions are: (1) the special extension * matches any
+file; (2) the special extension "" matches any files that
+do not have an extension (i.e., the filename contains no full stop
+character); (3) any character string that does not contain any wild
+card characters (* and ?).
+
+Due to the different pattern matching rules on the various platforms,
+to ensure portability, wild card characters are not allowed in the
+extensions, except as in the special extension *. Extensions
+without a full stop character (e.g, ~) are allowed but may not
+work on all platforms.
+
+=head1 CAVEATS
+
+See L<Tk::chooseDirectory/CAVEATS>.
+
+=head1 EXAMPLE
+
+ my $types = [
+ ['Text Files', ['.txt', '.text']],
+ ['TCL Scripts', '.tcl' ],
+ ['C Source Files', '.c', 'TEXT'],
+ ['GIF Files', '.gif', ],
+ ['GIF Files', '', 'GIFF'],
+ ['All Files', '*', ],
+ ];
+ my $filename = $widget->getOpenFile(-filetypes=>$types);
+
+ if ($filename ne "") {
+ # Open the file ...
+ }
+
+=head1 SEE ALSO
+
+L<Tk::FBox|Tk::FBox>, L<Tk::FileSelect|Tk::FileSelect>
+
+=head1 KEYWORDS
+
+file selection dialog
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/grab.pod b/Master/tlpkg/tlperl/lib/Tk/grab.pod
new file mode 100644
index 00000000000..98a488d09f7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/grab.pod
@@ -0,0 +1,140 @@
+# Copyright (c) 1992 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+grab - Confine pointer and keyboard events to a window sub-tree
+
+=for category User Interaction
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<grab>
+
+I<$widget>-E<gt>B<grab>I<Option>
+
+=head1 DESCRIPTION
+
+This set of methods implement simple pointer and keyboard grabs for Tk.
+Tk's grabs are different than the grabs
+described in the Xlib documentation.
+When a grab is set for a particular window, Tk restricts all pointer
+events to the grab window and its descendants in Tk's window hierarchy.
+Whenever the pointer is within the grab window's subtree, the pointer
+will behave exactly the same as if there had been no grab at all
+and all events will be reported in the normal fashion.
+When the pointer is outside I<$widget>'s tree, button presses and
+releases and
+mouse motion events are reported to I<$widget>, and window entry
+and window exit events are ignored.
+The grab subtree ``owns'' the pointer:
+windows outside the grab subtree will be visible on the screen
+but they will be insensitive until the grab is released.
+The tree of windows underneath the grab window can include top-level
+windows, in which case all of those top-level windows
+and their descendants will continue to receive mouse events
+during the grab.
+
+Two forms of grabs are possible: local and global.
+A local grab affects only the grabbing application: events will
+be reported to other applications as if the grab had never occurred.
+Grabs are local by default.
+A global grab locks out all applications on the screen,
+so that only the given subtree of the grabbing application will be
+sensitive to pointer events (mouse button presses, mouse button releases,
+pointer motions, window entries, and window exits).
+During global grabs the window manager will not receive pointer
+events either.
+
+During local grabs, keyboard events (key presses and key releases)
+are delivered as usual: the window
+manager controls which application receives keyboard events, and
+if they are sent to any window in the grabbing application then they are
+redirected to the focus window.
+During a global grab Tk grabs the keyboard so that all keyboard events
+are always sent to the grabbing application.
+The B<focus> method is still used to determine which window in the
+application receives the keyboard events.
+The keyboard grab is released when the grab is released.
+
+Grabs apply to particular displays. If an application has windows
+on multiple displays then it can establish a separate grab on each
+display.
+The grab on a particular display affects only the windows on
+that display.
+It is possible for different applications on a single display to have
+simultaneous local grabs, but only one application can have a global
+grab on a given display at once.
+
+The B<grab> methods take any of the following forms:
+
+=over 4
+
+=item I<$widget>-E<gt>B<grabCurrent>
+
+Returns the current grab
+window in this application for I<$widget>'s display, or an empty
+string if there is no such window.
+
+=item I<$widget>-E<gt>B<grabs>
+
+Returns a list whose elements
+are all of the windows grabbed by this application for all displays,
+or an empty string if the application has no grabs.
+
+I<Not implemented yet!>
+
+=item I<$widget>-E<gt>B<grabRelease>
+
+Releases the grab on I<$widget> if there is one, otherwise does
+nothing. Returns an empty string.
+
+=item I<$widget>-E<gt>B<grab>
+
+Sets a local grab on I<$widget>.
+If a grab was already in effect for this application on
+I<$widget>'s display then it is automatically released.
+If there is already a local grab on I<$widget>, then the command
+does nothing. Returns an empty string.
+
+=item I<$widget>-E<gt>B<grabGlobal>
+
+Sets a global grab on I<$widget>.
+If a grab was already in effect for this application on
+I<$widget>'s display then it is automatically released.
+If there is already a global grab on I<$widget>,
+then the command does nothing. Returns an empty string.
+
+=item I<$widget>-E<gt>B<grabStatus>
+
+Returns B<none> if no grab is currently set on I<$widget>,
+B<local> if a local grab is set on I<$widget>, and
+B<global> if a global grab is set.
+
+=back
+
+=head1 BUGS
+
+It took an incredibly complex and gross implementation to produce
+the simple grab effect described above.
+Given the current implementation, it isn't safe for applications
+to use the Xlib grab facilities at all except through the Tk grab
+procedures.
+If applications try to manipulate X's grab mechanisms directly,
+things will probably break.
+
+If a single process is managing several different Tk applications,
+only one of those applications can have a local grab for a given
+display at any given time. If the applications are in different
+processes, this restriction doesn't exist.
+
+=head1 KEYWORDS
+
+grab, keyboard events, pointer events, window
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/grid.pod b/Master/tlpkg/tlperl/lib/Tk/grid.pod
new file mode 100644
index 00000000000..8db89587a62
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/grid.pod
@@ -0,0 +1,409 @@
+# Copyright (c) 1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::grid - Geometry manager that arranges widgets in a grid
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<grid>?(?I<widget> ...,? ?I<arg> ?...>?)?
+
+S< >I<$widget>-E<gt>B<grid>I<Option>?(I<arg> ?,I<arg> ...?)?
+
+=head1 DESCRIPTION
+
+The B<grid> method is used to communicate with the grid
+geometry manager that arranges widgets in rows and columns inside
+of another window, called the geometry master (or master window).
+The B<grid> method can have any of several forms, depending
+on the I<option> argument:
+
+=over 4
+
+=item I<$slave>-E<gt>B<grid>(?I<$slave, ...>??, I<options>?)
+
+The arguments consist of the optional references to more slave windows
+followed by pairs of arguments that specify how to manage the slaves.
+The characters B<->, B<x> and B<^>,
+can be specified instead of a window reference to alter the default
+location of a I<$slave>, as described in L<"RELATIVE PLACEMENT">, below.
+
+If any of the slaves are already managed by the geometry manager
+then any unspecified options for them retain their previous values rather
+than receiving default values.
+
+The following options are supported:
+
+=over 8
+
+=item B<-column> => I<n>
+
+Insert the I<$slave> so that it occupies the I<n>th column in the grid.
+Column numbers start with 0. If this option is not supplied, then the
+I<$slave> is arranged just to the right of previous slave specified on this
+call to B<grid>, or column "0" if it is the first slave. For each
+B<x> that immediately precedes the I<$slave>, the column position
+is incremented by one. Thus the B<x> represents a blank column
+for this row in the grid.
+
+=item B<-columnspan> => I<n>
+
+Insert the slave so that it occupies I<n> columns in the grid.
+The default is one column, unless the window name is followed by a
+B<->, in which case the columnspan is incremented once for each immediately
+following B<->.
+
+=item B<-in> => I<$other>
+
+Insert the slave(s) in the master
+window given by I<$other>. The default is the first slave's
+parent window.
+
+=item B<-ipadx> => I<amount>
+
+The I<amount> specifies how much horizontal internal padding to
+leave on each side of the slave(s). This is space is added
+inside the slave(s) border.
+The I<amount> must be a valid screen distance, such as B<2> or B<'.5c'>.
+It defaults to 0.
+
+=item B<-ipady> => I<amount>
+
+The I<amount> specifies how much vertical internal padding to
+leave on on the top and bottom of the slave(s).
+This space is added inside the slave(s) border.
+The I<amount> defaults to 0.
+
+=item B<-padx> => I<amount>
+
+The I<amount> specifies how much horizontal external padding to
+leave on each side of the slave(s), in screen units.
+The I<amount> defaults to 0.
+This space is added outside the slave(s) border.
+
+=item B<-pady> => I<amount>
+
+The I<amount> specifies how much vertical external padding to
+leave on the top and bottom of the slave(s), in screen units.
+The I<amount> defaults to 0.
+This space is added outside the slave(s) border.
+
+=item B<-row> => I<n>
+
+Insert the slave so that it occupies the I<n>th row in the grid.
+Row numbers start with 0. If this option is not supplied, then the
+slave is arranged on the same row as the previous slave specified on this
+call to B<grid>, or the first unoccupied row if this is the first slave.
+
+=item B<-rowspan> => I<n>
+
+Insert the slave so that it occupies I<n> rows in the grid.
+The default is one row. If the next B<grid> method contains
+B<^> characters instead of I<$slave>s that line up with the columns
+of this I<$slave>, then the B<rowspan> of this I<$slave> is
+extended by one.
+
+=item B<-sticky> => I<style>
+
+If a slave's cell is larger than its requested dimensions, this
+option may be used to position (or stretch) the slave within its cell.
+I<Style> is a string that contains zero or more of the characters
+B<n>, B<s>, B<e> or B<w>.
+The string can optionally contain spaces or
+commas, but they are ignored. Each letter refers to a side (north, south,
+east, or west) that the slave will "stick" to. If both B<n> and B<s> (or
+B<e> and B<w>) are specified, the slave will be stretched to fill the entire
+height (or width) of its cavity. The B<sticky> option subsumes the
+combination of B<-anchor> and B<-fill> that is used by L<pack|Tk::pack>.
+The default is B<''>, which causes the slave to be centered in its cavity,
+at its requested size.
+
+=back
+
+=item I<$master>-E<gt>B<gridBbox>(?I<column, row>,? ?I<column2, row2>?)
+
+With no arguments,
+the bounding box (in pixels) of the grid is returned.
+The return value consists of 4 integers. The first two are the pixel
+offset from the master window (x then y) of the top-left corner of the
+grid, and the second two integers are the width and height of the grid,
+also in pixels. If a single I<column> and I<row> is specified on
+the command line, then the bounding box for that cell is returned, where the
+top left cell is numbered from zero. If both I<column> and I<row>
+arguments are specified, then the bounding box spanning the rows and columns
+indicated is returned.
+
+=item I<$master>-E<gt>B<gridColumnconfigure>(I<index>?, I<-option>=>I<value, ...>?)
+
+Query or set the column properties of the I<index> column of the
+geometry master, I<$master>.
+The valid options are B<-minsize>, B<-weight> and B<-pad>.
+If one or more options are provided, then I<index> may be given as
+a list of column indices to which the configuration options will operate on.
+The B<-minsize> option sets the minimum size, in screen units,
+that will be permitted for this column.
+The B<-weight> option (an integer value)
+sets the relative weight for apportioning
+any extra spaces among
+columns.
+A weight of zero (0) indicates the column will not deviate from its requested
+size. A column whose weight is two will grow at twice the rate as a column
+of weight one when extra space is allocated to the layout.
+The B<-uniform> option, when a
+non-empty value is supplied, places the column in a I<uniform
+group> with other columns that have the same value for B<-uniform>.
+The space for columns belonging to a uniform group is allocated
+so that their sizes are always in strict proportion to their
+B<-weight> values. See I<THE GRID ALGORITHM> below for further
+details.
+The B<-pad> option specifies the number of screen units that will be
+added to the largest window contained completely in that column when the
+grid geometry manager requests a size from the containing window.
+If only an option is specified, with no value,
+the current value of that option is returned.
+If only the master window and index is specified, all the current settings
+are returned in an list of "-option value" pairs.
+
+=item I<$slave>-E<gt>B<gridConfigure>(?I<$slave, ...>?, I<options>?)
+
+The same as B<grid> method.
+
+=item I<$slave>-E<gt>B<gridForget>?(I<$slave, ...>)?
+
+Removes each of the I<$slave>s from grid for its
+master and unmaps their windows.
+The slaves will no longer be managed by the grid geometry manager.
+The configuration options for that window are forgotten, so that if the
+slave is managed once more by the grid geometry manager, the initial
+default settings are used.
+
+=item I<$slave>-E<gt>B<gridInfo>
+
+Returns a list whose elements are the current configuration state of
+the slave given by I<$slave> in the same option-value form that
+might be specified to B<gridConfigure>.
+The first two elements of the list are ``B<-in>=>I<$master>'' where
+I<$master> is the slave's master.
+
+=item I<$master>-E<gt>B<gridLocation>(I<x, y>)
+
+Given I<x> and I<y> values in screen units relative to the master window,
+the column and row number at that I<x> and I<y> location is returned.
+For locations that are above or to the left of the grid, B<-1> is returned.
+
+=item I<$master>-E<gt>B<gridPropagate>?(I<boolean>)?
+
+If I<boolean> has a true boolean value such as B<1> or B<on>
+then propagation is enabled for I<$master>, which must be a window
+name (see L<"GEOMETRY PROPAGATION"> below).
+If I<boolean> has a false boolean value then propagation is
+disabled for I<$master>.
+In either of these cases an empty string is returned.
+If I<boolean> is omitted then the method returns B<0> or
+B<1> to indicate whether propagation is currently enabled
+for I<$master>.
+Propagation is enabled by default.
+
+=item I<$master>-E<gt>B<gridRowconfigure>(I<index>?, I<-option>=>I<value, ...>?)
+
+Query or set the row properties of the I<index> row of the
+geometry master, I<$master>.
+The valid options are B<-minsize>, B<-weight> and B<-pad>.
+If one or more options are provided, then I<index> may be given as
+a list of row indeces to which the configuration options will operate on.
+The B<-minsize> option sets the minimum size, in screen units,
+that will be permitted for this row.
+The B<-weight> option (an integer value)
+sets the relative weight for apportioning
+any extra spaces among
+rows.
+A weight of zero (0) indicates the row will not deviate from its requested
+size. A row whose weight is two will grow at twice the rate as a row
+of weight one when extra space is allocated to the layout.
+The B<-uniform> option, when a non-empty value is supplied, places the
+row in a I<uniform group> with other rows that have the same value
+for B<-uniform>. The space for rows belonging to a uniform group
+is allocated so that their sizes are always in strict proportion
+to their B<-weight> values. See I<THE GRID ALGORITHM> below for
+further details.
+The B<-pad> option specifies the number of screen units that will be
+added to the largest window contained completely in that row when the
+grid geometry manager requests a size from the containing window.
+If only an option is specified, with no value,
+the current value of that option is returned.
+If only the master window and index is specified, all the current settings
+are returned in an list of "option-value" pairs.
+
+=item I<$slave>-E<gt>B<gridRemove>?(I<$slave, ...>)?
+
+Removes each of the I<$slave>s from grid for its
+master and unmaps their windows.
+The slaves will no longer be managed by the grid geometry manager.
+However, the configuration options for that window are remembered,
+so that if the
+slave is managed once more by the grid geometry manager, the previous
+values are retained.
+
+=item I<$master>-E<gt>B<gridSize>
+
+Returns the size of the grid (in columns then rows) for I<$master>.
+The size is determined either by the I<$slave> occupying the largest
+row or column, or the largest column or row with a B<-minsize>,
+B<-weight>, or B<-pad> that is non-zero.
+
+=item I<$master>-E<gt>B<gridSlaves>?(I<-option>=>I<value>)?
+
+If no options are supplied, a list of all of the slaves in I<$master>
+are returned, most recently manages first.
+I<-option> can be either B<-row> or B<-column> which
+causes only the slaves in the row (or column) specified by I<value>
+to be returned.
+
+=back
+
+=head1 RELATIVE PLACEMENT
+
+The B<grid> method contains a limited set of capabilities that
+permit layouts to be created without specifying the row and column
+information for each slave. This permits slaves to be rearranged,
+added, or removed without the need to explicitly specify row and
+column information.
+When no column or row information is specified for a I<$slave>,
+default values are chosen for
+B<-column>, B<-row>, B<-columnspan> and B<-rowspan>
+at the time the I<$slave> is managed. The values are chosen
+based upon the current layout of the grid, the position of the I<$slave>
+relative to other I<$slave>s in the same grid method, and the presence
+of the characters B<->, B<^>, and B<^> in B<grid>
+method where I<$slave> names are normally expected.
+
+=over 4
+
+=item B<->
+
+This increases the columnspan of the I<$slave> to the left. Several
+B<->'s in a row will successively increase the columnspan. A B<->
+may not follow a B<^> or a B<x>.
+
+=item B<x>
+
+This leaves an empty column between the I<$slave> on the left and
+the I<$slave> on the right.
+
+=item B<^>
+
+This extends the B<-rowspan> of the I<$slave> above the B<^>'s
+in the grid. The number of B<^>'s in a row must match the number of
+columns spanned by the I<$slave> above it.
+
+=back
+
+=head1 THE GRID ALGORITHM
+
+The grid geometry manager lays out its slaves in three steps.
+In the first step, the minimum size needed to fit all of the slaves
+is computed, then (if propagation is turned on), a request is made
+of the master window to become that size.
+In the second step, the requested size is compared against the actual size
+of the master. If the sizes are different, then space is added to or taken
+away from the layout as needed.
+For the final step, each slave is positioned in its row(s) and column(s)
+based on the setting of its I<sticky> flag.
+
+To compute the minimum size of a layout, the grid geometry manager
+first looks at all slaves whose columnspan and rowspan values are one,
+and computes the nominal size of each row or column to be either the
+I<minsize> for that row or column, or the sum of the I<pad>ding
+plus the size of the largest slave, whichever is greater. Then the
+slaves whose rowspans or columnspans are greater than one are
+examined. If a group of rows or columns need to be increased in size
+in order to accommodate these slaves, then extra space is added to each
+row or column in the group according to its I<weight>. For each
+group whose weights are all zero, the additional space is apportioned
+equally.
+
+When multiple rows or columns belong to a uniform group, the space
+allocated to them is always in proportion to their weights. (A weight
+of zero is considered to be 1.) In other words, a row or column
+configured with B<-weight 1 -uniform> a will have exactly the same size
+as any other row or column configured with B<-weight 1 -uniform a>. A
+row or column configured with B<-weight 2 -uniform b> will be exactly
+twice as large as one that is configured with B<-weight 1 -uniform b>.
+
+More technically, each row or column in the group will have a size
+equal to I<k*weight> for some constant k. The constant k is chosen so
+that no row or column becomes smaller than its minimum size. For
+example, if all rows or columns in a group have the same weight, then
+each row or column will have the same size as the largest row or
+column in the group.
+
+
+For masters whose size is larger than the requested layout, the additional
+space is apportioned according to the row and column weights. If all of
+the weights are zero, the layout is centered within its master.
+For masters whose size is smaller than the requested layout, space is taken
+away from columns and rows according to their weights. However, once a
+column or row shrinks to its minsize, its weight is taken to be zero.
+If more space needs to be removed from a layout than would be permitted, as
+when all the rows or columns are at there minimum sizes, the layout is
+clipped on the bottom and right.
+
+=head1 GEOMETRY PROPAGATION
+
+The grid geometry manager normally computes how large a master must be to
+just exactly meet the needs of its slaves, and it sets the
+requested width and height of the master to these dimensions.
+This causes geometry information to propagate up through a
+window hierarchy to a top-level window so that the entire
+sub-tree sizes itself to fit the needs of the leaf windows.
+However, the B<gridPropagate> method may be used to
+turn off propagation for one or more masters.
+If propagation is disabled then grid will not set
+the requested width and height of the master window.
+This may be useful if, for example, you wish for a master
+window to have a fixed size that you specify.
+
+=head1 RESTRICTIONS ON MASTER WINDOWS
+
+The master for each slave must either be the slave's parent
+(the default) or a descendant of the slave's parent.
+This restriction is necessary to guarantee that the
+slave can be placed over any part of its master that is
+visible without danger of the slave being clipped by its parent.
+In addition, all slaves in one call to B<grid> must have the same master.
+
+=head1 STACKING ORDER
+
+If the master for a slave is not its parent then you must make sure
+that the slave is higher in the stacking order than the master.
+Otherwise the master will obscure the slave and it will appear as
+if the slave hasn't been managed correctly.
+The easiest way to make sure the slave is higher than the master is
+to create the master window first: the most recently created window
+will be highest in the stacking order.
+
+=head1 CREDITS
+
+The B<grid> method is based on ideas taken from the I<GridBag>
+geometry manager written by Doug. Stein, and the B<blt_table> geometry
+manager, written by George Howlett.
+
+=head1 SEE ALSO
+
+L<Tk::form|Tk::form>
+L<Tk::pack|Tk::pack>
+L<Tk::place|Tk::place>
+
+=head1 KEYWORDS
+
+geometry manager, location, grid, cell, propagation, size, pack,
+master, slave
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/icon.gif b/Master/tlpkg/tlperl/lib/Tk/icon.gif
new file mode 100644
index 00000000000..dfe6b6621f2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/icon.gif
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/install.pm b/Master/tlpkg/tlperl/lib/Tk/install.pm
new file mode 100644
index 00000000000..2392dc84fca
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/install.pm
@@ -0,0 +1,37 @@
+package Tk::install;
+require Exporter;
+
+use vars qw($VERSION @EXPORT);
+$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/install.pm#4 $
+
+use base qw(Exporter);
+@EXPORT = qw(installbin);
+
+use Config;
+
+sub installbin
+{
+ my $prog = shift(@ARGV);
+ my $start = $Config{'startperl'};
+ my $perl = $Config{'perl'} || 'perl';
+ $start =~ s/$perl$/$prog/;
+ while (($src,$dst) = splice(@ARGV,0,2))
+ {
+ open(SRC,"<$src") || die "Cannot open $src:$!";
+ my $line = <SRC>;
+ $line =~ s/^#!\s*\S+/$start/;
+ warn $line;
+ chmod(0755,$dst) if (-f $dst);
+ open(DST,">$dst") || die "Cannot open $dst:$!";
+ print "installbin $src => $dst\n";
+ do
+ {
+ print DST $line;
+ } while (defined($line = <SRC>));
+ close(SRC);
+ close(DST);
+ chmod(0555,$dst);
+ }
+}
+
+1;
diff --git a/Master/tlpkg/tlperl/lib/Tk/license.terms b/Master/tlpkg/tlperl/lib/Tk/license.terms
new file mode 100644
index 00000000000..6a5d3728366
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/license.terms
@@ -0,0 +1,35 @@
+This software is copyrighted by the Regents of the University of
+California, Sun Microsystems, Inc., and other parties. The following
+terms apply to all files associated with the software unless explicitly
+disclaimed in individual files.
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
+IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
+
+RESTRICTED RIGHTS: Use, duplication or disclosure by the government
+is subject to the restrictions as set forth in subparagraph (c) (1) (ii)
+of the Rights in Technical Data and Computer Software Clause as DFARS
+252.227-7013 and FAR 52.227-19.
+0 in license.terms
+0 in license.terms
+0 in license.terms
diff --git a/Master/tlpkg/tlperl/lib/Tk/mega.pod b/Master/tlpkg/tlperl/lib/Tk/mega.pod
new file mode 100644
index 00000000000..76e40e7891f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/mega.pod
@@ -0,0 +1,423 @@
+
+## Author: Achim Bohnet <ach@mpe.mpg.de>
+##
+## Copyright (c) 1997-1998 Achim Bohnet. All rights reserved.
+## You can redistribute this document and/or modify it under the
+## same terms as Perl itself.
+##
+## Update for Tk804.025, Steve Lidie, 2004/01/11.
+
+=head1 NAME
+
+Tk::mega - Perl/Tk support for writing widgets in pure Perl
+
+=for category Derived Widgets
+
+=head1 SYNOPSIS
+
+Define the widget's new class name:
+
+S< >B<package Tk::>I<MyNewWidget>;
+
+For composite widget classes:
+
+S< >B<use base qw/ Tk::container />; # where B<container> is I<Frame> or I<Toplevel>
+
+For derived widget classes:
+
+S< >B<use base qw/ Tk::Derived Tk::DerivedWidget /;>
+
+Install the new widget in Tk's namespace and establish class and instance
+constructors.
+
+S< >B<Construct Tk::>I<Widget> I<'MyNewWidget'>;
+
+S< >B<sub ClassInit> { I<my ($self, $args) = @_; ...> }
+
+S< >B<sub Populate> { I<my ($self, $args) = @_; ...> }
+
+=head1 DESCRIPTION
+
+The goal of the mega-widget support of Perl/Tk is to make it
+easy to write mega-widgets that obey the same protocol and
+interface that the Tk core widgets support.
+I<For mega-widget sample code please run the B<widget> demonstration program and go to the section B<Sample Perl Mega-Widgets>.>
+
+There are two kinds of mega-widgets:
+
+=over 4
+
+=item * Composite Widgets
+
+A composite widget is composed with one or more existing widgets.
+The composite widget looks to the user like a simple single widget.
+A well known example is the file selection box.
+
+=item * Derived Widgets
+
+A derived widget adds/modifies/removes properties and methods
+from a single widget (this widget may itself be a mega-widget).
+
+=back
+
+=head1 MEGA-WIDGET SUPPORT
+
+=head2 Advertise
+
+Give a subwidget a symbolic name.
+
+Usage:
+
+S< >I<$self>-E<gt>B<Advertise>(B<name>=E<gt>I<$widget>);
+
+Gives a subwidget I<$widget> of the mega-widget I<$self> the
+name B<name>. One can retrieve the reference of an advertised subwidget
+with the L<Subwidget|"Subwidget"> method.
+
+B<Comment:> Mega-Widget Writers: Please make sure to document the
+advertised widgets that are intended for I<public> use.
+If there are none, document this fact, e.g.:
+
+ =head1 ADVERTISED WIDGETS
+
+ None.
+
+=head2 Callback
+
+Invoke a callback specified with an option.
+
+Usage:
+
+S< >I<$self>-E<gt>B<Callback>(I<-option> ?,I<args> ...?);
+
+B<Callback> executes the L<callback|Tk::callbacks> defined with
+I<$self>-E<gt>B<ConfigSpecs>(I<-option>, [B<CALLBACK>, ...]);
+If I<args> are given they are passed to the callback. If
+I<-option> is not defined it does nothing.
+
+=head2 ClassInit
+
+Initialization of the mega-widget class.
+
+Usage:
+
+S< >B<sub ClassInit> { I<my ($class, $mw) = @_;> ... }
+
+B<ClassInit> is called once for I<each> L<MainWindow|Tk::MainWindow>
+just before the first widget instance of a class is created in
+the widget tree of B<MainWindow>.
+
+B<ClassInit> is often used to define bindings and/or other
+resources shared by all instances, e.g., images.
+
+Examples:
+
+ $mw->bind($class,"<Tab>", sub { my $w = shift; $w->Insert("\t"); $w->focus; $w->break});
+ $mw->bind($class,"<Return>", ['Insert',"\n"]);
+ $mw->bind($class,"<Delete>",'Delete');
+
+Notice that I<$class> is the class name (e.g. B<Tk::MyText>) and I<$mw> is the mainwindow.
+
+Don't forget to call I<$class>-E<gt>B<SUPER::ClassInit($mw)> in
+B<ClassInit>.
+
+=head2 Component
+
+Convenience function to create subwidgets.
+
+Usage:
+
+ $cw->Component('Whatever', 'AdvertisedName',
+ -delegate => ['method1', 'method2', ...],
+ ... more widget options ...,
+ );
+
+B<Component> does several things for you with one call:
+
+=over 4
+
+o Creates the widget
+
+o Advertises it with a given name (overridden by 'Name' option)
+
+o Delegates a set of methods to this widget (optional)
+
+=back
+
+Example:
+
+ $cw->Component('Button', 'quitButton', -command => sub{$mw->'destroy'});
+
+=head2 ConfigSpecs
+
+Defines options and their treatment
+
+Usage:
+
+ $cw->ConfigSpecs(
+ -option => [ where, dbname, dbclass, default],
+ ...,
+ DEFAULT => [where],
+ );
+
+Defines the options of a mega-widget and what actions
+are triggered by configure/cget of an option
+(see L<Tk::ConfigSpecs> and L<Tk::Derived> for details).
+
+=head2 Construct
+
+Make the new mega-widget known to B<Tk>.
+
+Usage:
+
+S< >B<Construct> I<baseclass> B<'Name'>;
+
+B<Construct> declares the new widget class so that your mega-widget
+works like normal Perl/Tk widgets.
+
+Examples:
+
+S< >B<Construct Tk::Widget> I<'Whatever'>;
+S< >B<Construct Tk::Menu> I<'MyItem'>;
+
+First example lets one use I<$widget>-E<gt>B<Whatever> to create
+new B<Whatever> widget.
+
+The second example restricts the usage of the B<MyItem> constructor
+method to widgets that are derived from B<Menu>:
+I<$isamenu>-E<gt>I<MyItem>.
+
+=head2 CreateArgs
+
+Process options before any widget is created:
+
+S< >B<sub CreateArgs> { I<my ($package, $parent, $args) = @_; ...; return @newargs;> }
+
+I<$package> is the package of the mega-widget (e.g., B<Tk::MyText>,
+I<$parent> the parent of the widget to be created and $args the hash
+reference to the options specified in the widget constructor call.
+
+Don't forget to call I<$package>-E<gt>B<SUPER::CreateArgs>(I<$parent>, I<$args>) in
+B<CreateArgs>.
+
+=head2 Delegates
+
+Redirect a method of the mega-widget to a subwidget of
+the composite widget
+
+Usage:
+
+ $cw->Delegates(
+ 'method1' => $subwidget1,
+ 'method2' => 'advertived_name',
+ ...,
+ 'Construct' => $subwidget2,
+ 'DEFAULT' => $subwidget3,
+ );
+
+The B<'Construct'> delegation has a special meaning. After
+'Construct' is delegated all Widget constructors are redirected.
+E.g. after
+
+S< >I<$self>-E<gt>B<Delegates>(B<'Construct'>=E<gt>I<$subframe>);
+
+a I<$self>-E<gt>B<Button> does really a I<$subframe>-E<gt>B<Button>
+so the created button is a child of I<$subframe> and not I<$self>.
+
+B<Comment:> Delegates works only with methods that I<$cw> does
+not have itself.
+
+=head2 InitObject
+
+I<Note: this method should not, in general, be used, as it has been
+superceeded by B<Populate> and specifying B<Tk::Derived> as one of the base
+classes.>
+
+Defines construction and interface of derived widgets.
+
+Usage:
+
+ sub InitObject {
+ my ($derived, $args) = @_;
+ ...
+ }
+
+where I<$derived> is the widget reference of the already created
+baseclass widget and I<$args> is the reference to a hash of
+I<-option-value> pairs.
+
+B<InitObject> is almost identical to L<Populate|"Populate"> method.
+B<Populate> does some more 'magic' things useful for mega-widgets
+with several widgets.
+
+Don't forget to call I<$derived>-E<gt>B<SUPER::InitObject>(I<$args>) in
+B<InitObject>.
+
+=head2 OnDestroy
+
+Define a callback invoked when the mega-widget is destroyed.
+
+Usage:
+
+S< >I<$widget>-E<gt>B<OnDestroy>(I<callback>);
+
+B<OnDestroy> installs a L<callback|Tk::callbacks> that's called
+when a widget is going to to be destroyed. Useful
+for special cleanup actions. It differs from a normal B<destroy>
+in that all the widget's data structures are still intact.
+
+B<Comment:> This method could be used with any widgets not just
+for mega-widgets. It's listed here because of it's usefulness.
+
+=head2 Populate
+
+Defines construction and interface of the composite
+widget.
+
+Usage:
+
+ sub Populate {
+ my ($self, $args) = @_;
+ ...
+ }
+
+where I<$self> is the widget reference of the already created baseclass
+widget and I<$args> is the
+reference to a hash of I<-option-value> pairs.
+
+Most the other support function are normally used inside the B<Populate>
+subroutine.
+
+Don't forget to call I<$cw>-E<gt>B<SUPER::Populate>(I<$args>) in
+B<Populate>.
+
+=head2 privateData
+
+Set/get a private hash of a widget to storage
+composite internal data
+
+Usage:
+
+S< >I<$hashref> = I<$self>-E<gt>B<privateData>();
+
+S< >I<$another> = I<$self>-E<gt>B<privateData>(I<unique_key>|I<package>);
+
+=head2 Subwidget
+
+Get the widget reference of an advertised subwidget.
+
+S< >I<@subwidget> = I<$cw>-E<gt>B<Subwidget>();
+
+S< >I<$subwidget> = I<$cw>-E<gt>B<Subwidget>(I<name>);
+
+S< >I<@subwidget> = I<$cw>-E<gt>B<Subwidget>(I<name> ?,...?);
+
+Returns the widget reference(s) of the subwidget known under the given
+name(s). Without arguments, return all known subwidgets of I<$cw>. See
+L<Advertise|"Advertise"> method how to define I<name> for a subwidget.
+
+B<Comment:> Mega-Widget Users: Use B<Subwidget> to get I<only>
+documented subwidgets.
+
+=head1 PITFALLS
+
+=over 4
+
+=item * Resource DB class name
+
+Some of the standard options use a resource date base class
+that is not equal to the resource database name. E.g.,
+
+ Switch: Name: Class:
+
+ -padx padX Pad
+ -activerelief activeRelief Relief
+ -activebackground activeBackground Foreground
+ -status undef undef
+
+One should do the same when one defines one of these
+options via B<ConfigSpecs>.
+
+=item * Method delegation
+
+Redirecting methods to a subwidget with B<Delegate>
+can only work if the base widget itself does have a
+method with this name. Therefore one can't ``I<delegate>''
+any of the methods listed in L<Tk::Widget|Tk::Widget>.
+A common problematic method is B<bind>. In this case
+one as to explicitely redirect the method.
+
+ sub bind {
+ my $self = shift;
+ my $to = $self->privateData->{'my_bind_target'};
+ $to->bind(@_);
+ }
+
+=item * privateData
+
+Graham Barr wrote: ... It is probably
+more private than most people think. Not all calls to privateData will
+return that same HASH reference. The HASH reference that is returned
+depends on the package it was called from, a different HASH is returned
+for each package. This allows a widget to hold private data, but then
+if it is sub-classed the sub-class will get a different HASH and so not
+cause duplicate name clashes.
+
+But privateData does take an optional argument if you want to
+force which HASH is returned.
+
+=item * Scrolled and Composite
+
+B<Scrolled>(I<Kind>,...) constructor can not be used with B<Composite>.
+One has to use $cw->B<Composite>(B<Scrl>I<Kind> =E<gt> B<'name'>, ...);
+
+=back
+
+=head1 MISSING
+
+Of course Perl/Tk does not define support function for
+all necessities. Here's a short list of things you have to
+handle yourself:
+
+=over 4
+
+=item *
+
+No support to define construction-time only options.
+
+=item *
+
+No support to remove an option that is known to the
+base widget.
+
+=item *
+
+It's hard to define B<undef> as fallback for an widget
+option that is not already B<undef>.
+
+=item *
+
+Frame in Perl/Tk carries magic and overhead not needed
+for composite widget class definition.
+
+=item *
+
+No support methods for bindings that are shared between all
+widgets of a composite widget (makes sense at all?)
+
+=back
+
+=head1 KEYWORDS
+
+mega, composite, derived, widget
+
+=head1 SEE ALSO
+
+L<Tk::composite|Tk::composite>
+L<Tk::ConfigSpecs|Tk::ConfigSpecs>
+L<Tk::option|Tk::option>
+L<Tk::callbacks|Tk::callbacks>
+L<Tk::bind|Tk::bind>
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/messageBox.pod b/Master/tlpkg/tlperl/lib/Tk/messageBox.pod
new file mode 100644
index 00000000000..3cae94beb0d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/messageBox.pod
@@ -0,0 +1,67 @@
+=head1 NAME
+
+messageBox - pop up a message window and wait for user response.
+
+=for category Popups and Dialogs
+
+=head1 SYNOPSIS
+
+S< >I<$response> = I<$widget>-E<gt>B<messageBox>(I<-option> =E<gt> I<value>, ... );
+
+=head1 DESCRIPTION
+
+This method uses L<Tk::Dialog|Tk::Dialog> to quickly create several
+common dialog boxes. A dialog widget consists of a message, an icon
+and a set of buttons (see the I<-type> option). After the message
+window is popped up, B<messageBox> waits for the user to select one of
+the buttons and return the button text (note that it's best to check the
+returned value in a case insensitive manner). NOTE: unlike
+B<Tk::Dialog> which creates its widget once and can be used many
+times, the B<messageBox> window is created every time it's used.
+
+The following option/value pairs are supported:
+
+=over 4
+
+=item B<-default>
+
+The case-sensitive symbolic name of the default button
+for this message window ('Ok', 'Cancel' and so
+on). See B<-type> for a list of the symbolic names.
+If the message box has just one button it will
+automatically be made the default, otherwise if
+this option is not specified, there won't be any
+default button.
+
+=item B<-icon>
+
+Specifies an icon to display. On X11 any of the builtin Tk bitmaps can
+specified. On Windows only B<error>, B<info>, B<question> or
+B<warning> are supported.
+
+=item B<-message>
+
+Specifies the message to display.
+
+=item B<-title>
+
+Specifies a string to display as the title.
+
+=item B<-type>
+
+Specifies a predefined set of buttons to be displayed. The following
+values are possible: 'AbortRetryIgnore', 'Ok', 'OkCancel',
+'RetryCancel', 'YesNo' or 'YesNoCancel'.
+
+=back
+
+=head1 EXAMPLE
+
+I<$response> = I<$mw>-E<gt>B<messageBox>(-icon =E<gt> 'question', -message =E<gt> 'Hello World!', -title =E<gt> 'My title', -type =E<gt> 'AbortRetryIgnore', -default =E<gt> 'Retry');
+
+=head1 AUTHOR
+
+Stephen.O.Lidie@Lehigh.EDU. 98/05/25
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/openfile.xbm b/Master/tlpkg/tlperl/lib/Tk/openfile.xbm
new file mode 100644
index 00000000000..859e2e57608
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/openfile.xbm
@@ -0,0 +1,5 @@
+#define openfile_width 16
+#define openfile_height 12
+static unsigned char openfile_bits[] = {
+ 0x00, 0x00, 0xfc, 0x00, 0x02, 0x07, 0x01, 0x08, 0xc1, 0xff, 0xa1, 0xaa,
+ 0x51, 0x55, 0xa9, 0x2a, 0x55, 0x15, 0xab, 0x0a, 0xff, 0x07, 0x00, 0x00};
diff --git a/Master/tlpkg/tlperl/lib/Tk/openfolder.xbm b/Master/tlpkg/tlperl/lib/Tk/openfolder.xbm
new file mode 100644
index 00000000000..59ee624efd0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/openfolder.xbm
@@ -0,0 +1,5 @@
+#define openfolder_width 16
+#define openfolder_height 10
+static unsigned char openfolder_bits[] = {
+ 0xfc, 0x00, 0x02, 0x07, 0x01, 0x08, 0xc1, 0xff, 0x21, 0x80, 0x11, 0x40,
+ 0x09, 0x20, 0x05, 0x10, 0x03, 0x08, 0xff, 0x07};
diff --git a/Master/tlpkg/tlperl/lib/Tk/openfolder.xpm b/Master/tlpkg/tlperl/lib/Tk/openfolder.xpm
new file mode 100644
index 00000000000..191fe1e72bc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/openfolder.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static char * openfolder_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"16 12 3 1",
+/* colors */
+" s None c None",
+". c black",
+"X c #f0ff80",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".XXXXXXXXXXX. ",
+".XXX............",
+".XX.XXXXXXXXXXX.",
+".XX.XXXXXXXXXX. ",
+".X.XXXXXXXXXXX. ",
+".X.XXXXXXXXXXX. ",
+"..XXXXXXXXXX.. ",
+"............. "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/option.pod b/Master/tlpkg/tlperl/lib/Tk/option.pod
new file mode 100644
index 00000000000..1214357d181
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/option.pod
@@ -0,0 +1,217 @@
+# Copyright (c) 1990 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+option - Using the option database in Perl/Tk
+
+=for category Creating and Configuring Widgets
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<widgetClass>(B<Name>=E<gt>I<name>, B<-class>=E<gt>I<class>);
+
+S< >I<$widget>-E<gt>B<PathName>;
+
+S< >I<$widget>-E<gt>B<optionAdd>(I<pattern>=E<gt>I<value > ?,I<priority>?);
+
+S< >I<$widget>-E<gt>B<optionClear>;
+
+S< >I<$widget>-E<gt>B<optionGet>(I<name, class>);
+
+S< >I<$widget>-E<gt>B<optionReadfile>(I<fileName> ?,I<priority>?);
+
+=head1 DESCRIPTION
+
+The option database (also known as the I<resource database> or the
+I<application defaults database>) is a set of rules for applying
+default options to widgets. Users and system administrators can
+set up these rules to customize the appearance of applications
+without changing any application code; for example, a user might
+set up personal foreground and background colors, or a site
+might use fonts associated with visual or language preferences.
+Different window managers (and implementations of them) have implemented
+the database differently, but most Xt-based window managers use the
+I<.Xdefaults> file or the I<xrdb> utility to manage user preferences;
+some use both, and/or implement a more complex set of site, user and
+application databases. Check your site documentation for these topics
+or your window manager's B<RESOURCE_MANAGER> property.
+
+=head2 Being a good citizen
+
+For most applications, the option database "just works." The B<option...>
+methods are for applications that need to do something unusual, such as
+add new rules or test an option's default. Even in such cases, the
+application should provide for user preferences.
+Do not hardcode widget options without a B<very> good reason.
+All users have their own tastes and they are all different.
+They choose a special font in a special size and have often spend a
+lot of time working out a color scheme that they will love until death.
+When you respect their choices they will enjoy working with your
+applications much more. Don't destroy the common look and feel of a
+personal desktop.
+
+=head2 Option rules and widget identification
+
+All widgets in an application are identified hierarchically by I<pathname>,
+starting from the B<MainWindow> and passing through each widget used to create
+the endpoint. The path elements are I<widget names>, much like the elements
+of a file path from the root directory to a file. The rules in the option
+database are patterns that are matched against a widget's I<pathname> to
+determine which defaults apply.
+When a widget is created, the B<Name> option can be
+used to assign the widget's name and thus create a distinctive path
+for widgets in an application. If the B<Name> option isn't given,
+Perl/Tk assigns a default name based on the type of widget; a
+B<MainWindow>'s default name is the B<appname>. These defaults are fine
+for most widgets, so don't feel you need to find a meaningful name for
+every widget you create.
+A widget must have a distinctive name to allow users to tailor its
+options independently of other widgets in an application. For instance,
+to create a B<Text> widget that will
+have special options assigned to it, give it a name such as:
+
+ $text = $mw->Text(Name => 'importantText');
+
+You can then tailor the widget's attributes with a rule in the option
+database such as:
+
+ *importantText*foreground: red
+
+The I<class> attribute identifies groups of widgets, usually within an
+application but also to group similar widgets among different applications.
+One typically assigns a class to a B<TopLevel> or B<Frame> so that the
+class will apply to all of that widget's children. To extend the example,
+we could be more specific about the importantText widget
+by giving its frame a class:
+
+ $frame = $mw->Frame(-class => 'Urgent');
+ $text = $frame->Text(Name => 'importantText');
+
+Then the resource pattern can be specified as so:
+
+ *Urgent*importantText*foreground: red
+
+Similarly, the pattern C<*Urgent*background: cyan> would apply to all
+widgets in the frame.
+
+=head1 METHODS
+
+=over 4
+
+=item I<$widget>-E<gt>B<widgetClass>(B<Name>=E<gt>I<name>, B<-class>=E<gt>I<class>);
+
+Identify a new widget with I<name> and/or I<class>.
+B<Name> specifies the path element for the widget; names generally begin with a
+lowercase letter. B<-class> specifies the class for the widget and its
+children; classes generally begin with an uppercase letter.
+If not specified, Perl/Tk will assign a unique default name to each widget.
+Only B<MainWindow> widgets have a default class, made by uppercasing the
+first letter of the application name.
+
+=item I<$widget>-E<gt>B<PathName>;
+
+The B<PathName> method returns the widget's I<pathname>, which uniquely
+identifies the widget within the application.
+
+=item I<$widget>-E<gt>B<optionAdd>(I<pattern>=E<gt>I<value >?, I<priority>?);
+
+The B<optionAdd> method adds a new option to the database.
+I<Pattern> contains the option being specified, and consists of
+names and/or classes separated by asterisks or dots, in the usual
+X format. I<Value> contains a text string to associate with
+I<pattern>; this is the value that will be returned in calls to
+the B<optionGet> method. If I<priority> is specified, it indicates
+the priority level for this option (see below for legal values);
+it defaults to B<interactive>. This method always returns an empty
+string.
+
+=item I<$widget>-E<gt>B<optionClear>;
+
+The B<optionClear> method clears the option database. Default
+options (from the B<RESOURCE_MANAGER> property or the B<.Xdefaults>
+file) will be reloaded automatically the next time an option is
+added to the database or removed from it. This method always returns
+an empty string.
+
+=item I<$widget>-E<gt>B<optionGet>(I<name,class>);
+
+The B<optionGet> method returns the value of the option specified for
+I<$widget> under I<name> and I<class>. To look up the option,
+B<optionGet> matches the patterns in the resource database against
+I<$widget>'s I<pathname> along with the class of I<$widget>
+(or its parent if I<$widget> has no class specified). The widget's
+class and name are options set when the widget is created (not
+related to class in the sense of L<bless>); the B<MainWindow>'s name
+is the B<appname> and its class is (by default) derived from the name
+of the script.
+
+If several entries in the option database match I<$widget>'s I<pathname>,
+I<name>, and I<class>, then the method returns whichever was created with
+highest I<priority> level. If there are several matching
+entries at the same priority level, then it returns whichever entry
+was I<most recently entered> into the option database. If there are
+no matching entries, then the empty string is returned.
+
+=item I<$widget>-E<gt>B<optionReadfile>(I<fileName>?,I<priority>?);
+
+The B<optionReadfile> method reads I<fileName>, which should have the
+standard format for an X resource database such as B<.Xdefaults>, and
+adds all the options specified in that file to the option database.
+If I<priority> is specified, it indicates the priority level at which
+to enter the options; I<priority> defaults to B<interactive>.
+
+The I<priority> arguments to the B<option> methods are
+normally specified symbolically using one of the following values:
+
+=over 8
+
+=item B<widgetDefault>
+
+Level 20. Used for default values hard-coded into widgets.
+
+=item B<startupFile>
+
+Level 40. Used for options specified in application-specific
+startup files.
+
+=item B<userDefault>
+
+Level 60. Used for options specified in user-specific defaults
+files, such as B<.Xdefaults>, resource databases loaded into
+the X server, or user-specific startup files.
+
+=item B<interactive>
+
+Level 80. Used for options specified interactively after the application
+starts running. If I<priority> isn't specified, it defaults to
+this level.
+
+=back
+
+Any of the above keywords may be abbreviated. In addition, priorities
+may be specified numerically using integers between 0 and 100,
+inclusive. The numeric form is probably a bad idea except for new priority
+levels other than the ones given above.
+
+=back
+
+=head1 BUGS
+
+The priority scheme used by core Tk is not the same as used by normal Xlib
+routines. In particular is assumes that the order of the entries is defined,
+but user commands like B<xrdb -merge> can change the order.
+
+=head1 SEE ALSO
+
+L<Tk::Xrm|Tk::Xrm>
+
+=head1 KEYWORDS
+
+database, option, priority, retrieve
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/options.pod b/Master/tlpkg/tlperl/lib/Tk/options.pod
new file mode 100644
index 00000000000..49d81ddd2b4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/options.pod
@@ -0,0 +1,787 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::options - Standard options supported by widgets and their manipulation
+
+=for category Creating and Configuring Widgets
+
+=head1 SYNOPSIS
+
+S< >I<$value> = I<$widget>-E<gt>B<cget>('I<-option>');
+
+S< >I<$widget>-E<gt>B<configure>(I<-option>=E<gt>I<value> ?,I<-option>=E<gt>I<value> ...?);
+
+S< >I<@list> = I<$widget>-E<gt>B<configure>('I<-option>');
+
+S< >I<@lol> = I<$widget>-E<gt>B<configure>;
+
+=head1 DESCRIPTION
+
+All widgets, and images have a standard mechanism for setting and querying
+attibutes or options. The mechanism is based on two methods B<configure>
+and B<cget>. The behaviour of these methods is as follows:
+
+=over 4
+
+=item I<$widget>-E<gt>B<configure>(I<-option>=E<gt>I<value> ?,I<-option>=E<gt>I<value> ...?);
+
+Sets the values of I<-option> to I<value> for each I<-option>=E<gt>I<value>
+pair. The internal B<new> method does an implicit B<configure> in this
+form with options passed in at widget create time.
+
+=item I<$widget>-E<gt>B<configure>('I<-option>')
+
+In array context returns a list of five or two elements. If I<-option>
+is an alias for another options it return a list consisting of the
+alias option and the name for the option is is an alias for, e.g.,
+C<('-bg', 'background')>. If I<-option> is not an alias the returned
+list has the following five elements:
+
+=over 8
+
+=item I<Option Name>
+
+The value of I<-option>, e.g., B<-background>.
+
+=item I<Name>
+
+The option's name in the option database, e.g., C<background>.
+
+=item I<Class>
+
+The option's class value in the option database, e.g., C<Background>.
+
+=item I<Default>
+
+The default value for the option if not specified or in the option database,
+e.g., C<grey>.
+
+=item I<Value>
+
+The current value (as returned by B<cget>), e.g., C<white>.
+
+=back
+
+=item I<$widget>-E<gt>B<configure>
+
+Returns a list of lists for all the options supported by I<$widget>.
+Each sub-list is in the form returned by B<configure>('I<-option>').
+(This mechanism is used by the B<Tk::Derived> class to determine
+the options available from base class.)
+
+=item I<$widget>-E<gt>B<cget>('I<-option>')
+
+Returns the current value of I<-option> for I<$widget>.
+
+B<cget>('I<-option>') is clumsy with the need for B<''> due to perl's
+parsing rules. Something more subtle using L<tie|perlfunc/tie> might look better.
+
+=back
+
+The following paragraphs describe the common configuration options supported by
+widgets in the Tk toolkit. Every widget does not necessarily support every option
+(see the the documentation entries for individual widgets for a list of the
+standard options supported by that widget), but if a widget does support an option
+with one of the names listed below, then the option has exactly the effect
+described below.
+
+In the descriptions below, ``Name'' refers to the option's name in the option
+database. ``Class'' refers to the option's class value
+in the option database. ``Switch'' refers to the switch used in widget-creation
+and B<configure> widget methods to set this value. For example, if an option's
+configure option is B<-foreground> and there exists a widget I<$widget>, then the
+call:
+
+S< >I<$widget>-E<gt>B<configure>(B<-foreground>=E<gt>B<'black'>)
+
+may be used to specify the value B<black> for the option in the widget I<$widget>.
+Configure options may be abbreviated, as long as the abbreviation is unambiguous
+(abbreviation is deprecated in perl/Tk).
+
+=head2 Creation options: Widget Name and Class
+
+The B<Name> and B<-class> options can only be specified when a widget is
+created, and cannot be changed with B<configure>. These options determine
+the widget's identity and how Tk applies resource values from the
+option database (see L<Tk::option>) and so they
+cannot be assigned by the options database.
+
+=over 4
+
+=item Name: I<name>
+
+=item Switch: B<Name>
+
+Specifies the path element for the widget. Names generally begin with a
+lowercase letter.
+
+Each widget has a unique I<pathname> that follows the hierarchy from the
+B<MainWindow> to the widget itself. Since the widget's B<PathName> is
+used to assign options from the options database, it is important to
+specify a distinctive B<Name> for any widget that will have non-default
+options. See L<Tk::option> for details.
+
+=item Name: I<class>
+
+=item Switch: B<-class>
+
+Specifies a class for the window. Classes generally begin with an
+uppercase letter.
+
+This class will be used when querying the option database for
+the window's other options (see Tk::options), and it will also be used
+later for other purposes such as bindings. One typically assigns a class
+to a B<TopLevel> or B<Frame> so that the class will apply to all of
+that widget's children.
+
+=back
+
+=head2 Reconfigurable options
+
+These options can be set at widget creation or changed later via B<configure>.
+
+=over 4
+
+=item Name: B<activeBackground>
+
+=item Class: B<Foreground>
+
+=item Switch: B<-activebackground>
+
+Specifies background color to use when drawing active elements.
+An element (a widget or portion of a widget) is active if the
+mouse cursor is positioned over the element and pressing a mouse button
+will cause some action to occur.
+If strict Motif compliance has been requested by setting the
+B<$Tk::strictMotif> variable, this option will normally be
+ignored; the normal background color will be used instead.
+For some elements on Windows and Macintosh systems, the active color
+will only be used while mouse button 1 is pressed over the element.
+
+=item Name: B<activeBorderWidth>
+
+=item Class: B<BorderWidth>
+
+=item Switch: B<-activeborderwidth>
+
+Specifies a non-negative value indicating
+the width of the 3-D border drawn around active elements.
+See above for definition of active elements.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+This option is typically only available in widgets displaying more
+than one element at a time (e.g. menus but not buttons).
+
+=item Name: B<activeForeground>
+
+=item Class: B<Background>
+
+=item Switch: B<-activeforeground>
+
+Specifies foreground color to use when drawing active elements.
+See above for definition of active elements.
+
+=item Name: B<activetile>
+
+=item Class: B<Tile>
+
+=item Switch: B<-activetile>
+
+Specifies image used to display inside active elements of the widget.
+See above for definition of active elements.
+
+=item Name: B<anchor>
+
+=item Class: B<Anchor>
+
+=item Switch: B<-anchor>
+
+Specifies how the information in a widget (e.g. text or a bitmap)
+is to be displayed in the widget.
+Must be one of the values B<n>, B<ne>, B<e>, B<se>,
+B<s>, B<sw>, B<w>, B<nw>, or B<center>.
+For example, B<nw> means display the information such that its
+top-left corner is at the top-left corner of the widget.
+
+=item Name: B<background>
+
+=item Class: B<Background>
+
+=item Switch: B<-background>
+
+=item Alias: B<-bg>
+
+Specifies the normal background color to use when displaying the
+widget.
+
+=item Name: B<bitmap>
+
+=item Class: B<Bitmap>
+
+=item Switch: B<-bitmap>
+
+Specifies a bitmap to display in the widget, in any of the forms
+acceptable to B<Tk_GetBitmap>.
+The exact way in which the bitmap is displayed may be affected by
+other options such as B<-anchor> or B<-justify>.
+Typically, if this option is specified then it overrides other
+options that specify a textual value to display in the widget;
+the B<-bitmap> option may be reset to an empty string to re-enable
+a text display.
+In widgets that support both B<-bitmap> and B<-image> options,
+B<-image> will usually override B<-bitmap>.
+
+=item Name: B<borderWidth>
+
+=item Class: B<BorderWidth>
+
+=item Switch: B<-borderwidth>
+
+=item Alias: B<-bd>
+
+Specifies a non-negative value indicating the width
+of the 3-D border to draw around the outside of the widget (if such a
+border is being drawn; the B<relief> option typically determines
+this). The value may also be used when drawing 3-D effects in the
+interior of the widget.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+
+=item Name: B<compound>
+
+=item Class: B<Compound>
+
+=item Switch: B<-compound>
+
+Specifies if the widget should display text and bitmaps/images at the
+same time, and if so, where the bitmap/image should be placed relative
+to the text. Must be one of the values B<none>, B<bottom>, B<top>,
+B<left>, B<right>, or B<center>. For example, the (default) value
+B<none> specifies that the bitmap or image should (if defined) be
+displayed instead of the text, the value B<left> specifies that the
+bitmap or image should be displayed to the left of the text, and the
+value B<center> specifies that the bitmap or image should be displayed on
+top of the text.
+
+=item Name: B<cursor>
+
+=item Class: B<Cursor>
+
+=item Switch: B<-cursor>
+
+Specifies the mouse cursor to be used for the widget.
+The value may have any of the forms acceptable to B<Tk_GetCursor>.
+
+=item Name: B<dash>
+
+=item Class: B<Dash>
+
+=item Switch: B<-dash>
+
+The value may have any of the forms accepted by B<Tk_GetDash>,
+such as B<4>, B<[6,4]>, B<.>, B<->, B<-.>, or B<-..>.
+
+=item Name: B<dashoffset>
+
+=item Class: B<Dashoffset>
+
+=item Switch: B<-dashoffset>
+
+Specifies the offset in the dash list where the drawing starts.
+
+=item Name: B<disabledForeground>
+
+=item Class: B<DisabledForeground>
+
+=item Switch: B<-disabledforeground>
+
+Specifies foreground color to use when drawing a disabled element.
+If the option is specified as an empty string (which is typically the
+case on monochrome displays), disabled elements are drawn with the
+normal foreground color but they are dimmed by drawing them
+with a stippled fill pattern.
+
+=item Name: B<disabledtile>
+
+=item Class: B<Tile>
+
+=item Switch: B<-disabledtile>
+
+Specifies image to use when drawing a disabled element.
+
+=item Name: B<exportSelection>
+
+=item Class: B<ExportSelection>
+
+=item Switch: B<-exportselection>
+
+Specifies whether or not a selection in the widget should also be
+the X selection.
+The value may have any of the forms accepted by B<Tcl_GetBoolean>,
+such as B<true>, B<false>, B<0>, B<1>, B<yes>, or B<no>.
+If the selection is exported, then selecting in the widget deselects
+the current X selection, selecting outside the widget deselects any
+widget selection, and the widget will respond to selection retrieval
+requests when it has a selection. The default is usually for widgets
+to export selections.
+
+=item Name: B<font>
+
+=item Class: B<Font>
+
+=item Switch: B<-font>
+
+Specifies the font to use when drawing text inside the widget.
+
+=item Name: B<foreground>
+
+=item Class: B<Foreground>
+
+=item Switch: B<-foreground>
+
+=item Alias: B<-fg>
+
+Specifies the normal foreground color to use when displaying the widget.
+
+=item Name: B<highlightBackground>
+
+=item Class: B<HighlightBackground>
+
+=item Switch: B<-highlightbackground>
+
+Specifies the color to display in the traversal highlight region when
+the widget does not have the input focus.
+
+=item Name: B<highlightColor>
+
+=item Class: B<HighlightColor>
+
+=item Switch: B<-highlightcolor>
+
+Specifies the color to use for the traversal highlight rectangle that is
+drawn around the widget when it has the input focus.
+
+=item Name: B<highlightThickness>
+
+=item Class: B<HighlightThickness>
+
+=item Switch: B<-highlightthickness>
+
+Specifies a non-negative value indicating the width of the highlight
+rectangle to draw around the outside of the widget when it has the
+input focus.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+If the value is zero, no focus highlight is drawn around the widget.
+
+=item Name: B<image>
+
+=item Class: B<Image>
+
+=item Switch: B<-image>
+
+Specifies an image to display in the widget, which must have been
+created with an image create. (See L<Tk::Image> for details of image creation.)
+Typically, if the B<-image> option is specified then it overrides other
+options that specify a bitmap or textual value to display in the widget;
+the B<-image> option may be reset to an empty string to re-enable
+a bitmap or text display.
+
+=item Name: B<insertBackground>
+
+=item Class: B<Foreground>
+
+=item Switch: B<-insertbackground>
+
+Specifies the color to use as background in the area covered by the
+insertion cursor. This color will normally override either the normal
+background for the widget (or the selection background if the insertion
+cursor happens to fall in the selection).
+
+=item Name: B<insertBorderWidth>
+
+=item Class: B<BorderWidth>
+
+=item Switch: B<-insertborderwidth>
+
+Specifies a non-negative value indicating the width
+of the 3-D border to draw around the insertion cursor.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+
+=item Name: B<insertOffTime>
+
+=item Class: B<OffTime>
+
+=item Switch: B<-insertofftime>
+
+Specifies a non-negative integer value indicating the number of
+milliseconds the insertion cursor should remain ``off'' in each blink cycle.
+If this option is zero then the cursor doesn't blink: it is on
+all the time.
+
+=item Name: B<insertOnTime>
+
+=item Class: B<OnTime>
+
+=item Switch: B<-insertontime>
+
+Specifies a non-negative integer value indicating the number of
+milliseconds the insertion cursor should remain ``on'' in each blink cycle.
+
+=item Name: B<insertWidth>
+
+=item Class: B<InsertWidth>
+
+=item Switch: B<-insertwidth>
+
+Specifies a value indicating the total width of the insertion cursor.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+If a border has been specified for the insertion
+cursor (using the B<insertBorderWidth> option), the border
+will be drawn inside the width specified by the B<insertWidth>
+option.
+
+=item Name: B<jump>
+
+=item Class: B<Jump>
+
+=item Switch: B<-jump>
+
+For widgets with a slider that can be dragged to adjust a value,
+such as scrollbars, this option determines when
+notifications are made about changes in the value.
+The option's value must be a boolean of the form accepted by
+B<Tcl_GetBoolean>.
+If the value is false, updates are made continuously as the
+slider is dragged.
+If the value is true, updates are delayed until the mouse button
+is released to end the drag; at that point a single notification
+is made (the value ``jumps'' rather than changing smoothly).
+
+=item Name: B<justify>
+
+=item Class: B<Justify>
+
+=item Switch: B<-justify>
+
+When there are multiple lines of text displayed in a widget, this
+option determines how the lines line up with each other.
+Must be one of B<left>, B<center>, or B<right>.
+B<Left> means that the lines' left edges all line up, B<center>
+means that the lines' centers are aligned, and B<right> means
+that the lines' right edges line up.
+
+=item Name: B<offset>
+
+=item Class: B<Offset>
+
+=item Switch: B<-offset>
+
+Specifies the offset of tiles (see also B<-tile> option). It can
+have two different formats B<-offset x,y> or B<-offset side>,
+where side can be B<n>, B<ne>, B<e>, B<se>, B<s>,
+B<sw>, B<w>, B<nw>, or B<center>. In the first case
+the origin is the origin of the toplevel of the current window.
+For the canvas itself and canvas objects the origin is the canvas
+origin, but putting B<#> in front of the coordinate pair
+indicates using the toplevel origin in stead. For canvas objects,
+the B<-offset> option is used for stippling as well.
+For the line and polygon canvas items you can also specify
+an index as argument, which connects the stipple or tile
+origin to one of the coordinate points of the line/polygon.
+
+=item Name: B<orient>
+
+=item Class: B<Orient>
+
+=item Switch: B<-orient>
+
+For widgets that can lay themselves out with either a horizontal
+or vertical orientation, such as scrollbars, this option specifies
+which orientation should be used. Must be either B<horizontal>
+or B<vertical> or an abbreviation of one of these.
+
+=item Name: B<padX>
+
+=item Class: B<Pad>
+
+=item Switch: B<-padx>
+
+Specifies a non-negative value indicating how much extra space
+to request for the widget in the X-direction.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+When computing how large a window it needs, the widget will
+add this amount to the width it would normally need (as determined
+by the width of the things displayed in the widget); if the geometry
+manager can satisfy this request, the widget will end up with extra
+internal space to the left and/or right of what it displays inside.
+Most widgets only use this option for padding text: if they are
+displaying a bitmap or image, then they usually ignore padding
+options.
+
+=item Name: B<padY>
+
+=item Class: B<Pad>
+
+=item Switch: B<-pady>
+
+Specifies a non-negative value indicating how much extra space
+to request for the widget in the Y-direction.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+When computing how large a window it needs, the widget will add
+this amount to the height it would normally need (as determined by
+the height of the things displayed in the widget); if the geometry
+manager can satisfy this request, the widget will end up with extra
+internal space above and/or below what it displays inside.
+Most widgets only use this option for padding text: if they are
+displaying a bitmap or image, then they usually ignore padding
+options.
+
+=item Name: B<relief>
+
+=item Class: B<Relief>
+
+=item Switch: B<-relief>
+
+Specifies the 3-D effect desired for the widget. Acceptable
+values are B<raised>, B<sunken>, B<flat>, B<ridge>,
+B<solid>, and B<groove>.
+The value
+indicates how the interior of the widget should appear relative
+to its exterior; for example, B<raised> means the interior of
+the widget should appear to protrude from the screen, relative to
+the exterior of the widget.
+
+=item Name: B<repeatDelay>
+
+=item Class: B<RepeatDelay>
+
+=item Switch: B<-repeatdelay>
+
+Specifies the number of milliseconds a button or key must be held
+down before it begins to auto-repeat. Used, for example, on the
+up- and down-arrows in scrollbars.
+
+=item Name: B<repeatInterval>
+
+=item Class: B<RepeatInterval>
+
+=item Switch: B<-repeatinterval>
+
+Used in conjunction with B<repeatDelay>: once auto-repeat
+begins, this option determines the number of milliseconds between
+auto-repeats.
+
+=item Name: B<selectBackground>
+
+=item Class: B<Foreground>
+
+=item Switch: B<-selectbackground>
+
+Specifies the background color to use when displaying selected
+items.
+
+=item Name: B<selectBorderWidth>
+
+=item Class: B<BorderWidth>
+
+=item Switch: B<-selectborderwidth>
+
+Specifies a non-negative value indicating the width
+of the 3-D border to draw around selected items.
+The value may have any of the forms acceptable to B<Tk_GetPixels>.
+
+=item Name: B<selectForeground>
+
+=item Class: B<Background>
+
+=item Switch: B<-selectforeground>
+
+Specifies the foreground color to use when displaying selected
+items.
+
+=item Name: B<setGrid>
+
+=item Class: B<SetGrid>
+
+=item Switch: B<-setgrid>
+
+Specifies a boolean value that determines whether this widget controls the
+resizing grid for its top-level window.
+This option is typically used in text widgets, where the information
+in the widget has a natural size (the size of a character) and it makes
+sense for the window's dimensions to be integral numbers of these units.
+These natural window sizes form a grid.
+If the B<setGrid> option is set to true then the widget will
+communicate with the window manager so that when the user interactively
+resizes the top-level window that contains the widget, the dimensions of
+the window will be displayed to the user in grid units and the window
+size will be constrained to integral numbers of grid units.
+See L<Tk::Wm/"GRIDDED GEOMETRY MANAGEMENT">
+for more details.
+
+=item Name: B<takeFocus>
+
+=item Class: B<TakeFocus>
+
+=item Switch: B<-takefocus>
+
+Determines whether the window accepts the focus during keyboard
+traversal (e.g., Tab and Shift-Tab).
+Before setting the focus to a window, the traversal scripts
+consult the value of the B<takeFocus> option.
+A value of B<0> means that the window should be skipped entirely
+during keyboard traversal.
+B<1> means that the window should receive the input
+focus as long as it is viewable (it and all of its ancestors are mapped).
+An empty value for the option means that the traversal scripts make
+the decision about whether or not to focus on the window: the current
+algorithm is to skip the window if it is
+disabled, if it has no key bindings, or if it is not viewable.
+If the value has any other form, then the traversal scripts take
+the value, append the name of the window to it (with a separator space),
+and evaluate the resulting string as a Callback.
+The script must return B<0>, B<1>, or an empty string: a
+B<0> or B<1> value specifies whether the window will receive
+the input focus, and an empty string results in the default decision
+described above.
+Note: this interpretation of the option is defined entirely by
+the Callbacks that implement traversal: the widget implementations
+ignore the option entirely, so you can change its meaning if you
+redefine the keyboard traversal scripts.
+
+=item Name: B<text>
+
+=item Class: B<Text>
+
+=item Switch: B<-text>
+
+Specifies a string to be displayed inside the widget. The way in which
+the string is displayed depends on the particular widget and may be
+determined by other options, such as B<anchor> or B<justify>.
+
+=item Name: B<textVariable>
+
+=item Class: B<Variable>
+
+=item Switch: B<-textvariable>
+
+Specifies the name of a variable. The value of the variable is a text
+string to be displayed inside the widget; if the variable value changes
+then the widget will automatically update itself to reflect the new value.
+The way in which the string is displayed in the widget depends on the
+particular widget and may be determined by other options, such as
+B<anchor> or B<justify>.
+
+=item Name: B<tile>
+
+=item Class: B<Tile>
+
+=item Switch: B<-tile>
+
+Specifies image used to display the widget. If image is the empty
+string, then the normal background color is displayed.
+
+=item Name: B<troughColor>
+
+=item Class: B<Background>
+
+=item Switch: B<-troughcolor>
+
+Specifies the color to use for the rectangular trough areas
+in widgets such as scrollbars and scales.
+
+=item Name: B<troughTile>
+
+=item Class: B<Tile>
+
+=item Switch: B<-troughtile>
+
+Specifies image used to display in the rectangular trough areas
+in widgets such as scrollbars and scales.
+
+=item Name: B<underline>
+
+=item Class: B<Underline>
+
+=item Switch: B<-underline>
+
+Specifies the integer index of a character to underline in the widget.
+This option is used by the default bindings to implement keyboard
+traversal for menu buttons and menu entries.
+0 corresponds to the first character of the text displayed in the
+widget, 1 to the next character, and so on.
+
+=item Name: B<wrapLength>
+
+=item Class: B<WrapLength>
+
+=item Switch: B<-wraplength>
+
+For widgets that can perform word-wrapping, this option specifies
+the maximum line length.
+Lines that would exceed this length are wrapped onto the next line,
+so that no line is longer than the specified length.
+The value may be specified in any of the standard forms for
+screen distances.
+If this value is less than or equal to 0 then no wrapping is done: lines
+will break only at newline characters in the text.
+
+=item Name: B<xScrollCommand>
+
+=item Class: B<ScrollCommand>
+
+=item Switch: B<-xscrollcommand>
+
+Specifies a callback used to communicate with horizontal
+scrollbars.
+When the view in the widget's window changes (or
+whenever anything else occurs that could change the display in a
+scrollbar, such as a change in the total size of the widget's
+contents), the widget will
+make a callback passing two numeric arguments in addition to
+any specified in the callback.
+Each of the numbers is a fraction between 0 and 1, which indicates
+a position in the document. 0 indicates the beginning of the document,
+1 indicates the end, .333 indicates a position one third the way through
+the document, and so on.
+The first fraction indicates the first information in the document
+that is visible in the window, and the second fraction indicates
+the information just after the last portion that is visible.
+Typically the
+B<xScrollCommand> option consists of the scrollbar widget object
+and the method ``set'' i.e. [B<set> =E<gt> I<$sb>]:
+this will cause the scrollbar to be updated whenever the view in the window changes.
+If this option is not specified, then no command will be executed.
+
+=item Name: B<yScrollCommand>
+
+=item Class: B<ScrollCommand>
+
+=item Switch: B<-yscrollcommand>
+
+Specifies a calback used to communicate with vertical
+scrollbars. This option is treated in the same way as the
+B<xScrollCommand> option, except that it is used for vertical
+scrollbars and is provided by widgets that support vertical scrolling.
+See the description of B<xScrollCommand> for details
+on how this option is used.
+
+=back
+
+=head1 SEE ALSO
+
+L<Tk::option>
+L<Tk::callbacks>
+L<Tk::ConfigSpecs>
+L<Tk_GetPixels|Tk::pTk::GetPixels>
+
+=head1 KEYWORDS
+
+class, name, standard option, switch
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/overview.pod b/Master/tlpkg/tlperl/lib/Tk/overview.pod
new file mode 100644
index 00000000000..0c9e183b68a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/overview.pod
@@ -0,0 +1,138 @@
+
+=head1 NAME
+
+B<Tk> - An overview of an Object Oriented Tk8 extension for perl5
+
+=for category Introduction
+
+=head1 SYNOPSIS
+
+C<< use Tk; >>
+
+C<< $main = MainWindow-E<gt>new(); >>
+
+C<< $widget = $main-E<gt>I<Widget>(...); >>
+
+C<< $widget-E<gt>pack(...); >>
+
+...
+
+C<< MainLoop; >>
+
+=head1 DESCRIPTION
+
+In writing the perl Tk extension, the goals were to provide a complete
+interface to the latest production version of John Ousterhout's Tk, while providing
+an Object Oriented interface to perl code.
+
+=head1 CONTENTS
+
+The package is composed of three loosely connected parts:
+
+=over 4
+
+=item I<pTk> - Converted Tk source
+
+The I<pTk> sub-directory is a copy of the C code of Tk8.x, modified
+to allow use by languages other than the original Tcl.
+(The pTk can be read as 'perl' Tk or 'portable' Tk, depending on
+your sensibilities.)
+
+=item B<Tk> to Perl 'Glue'
+
+The top level directory provides I<Tk.xs> and I<tkGlue.c>
+which provide the perl-callable interfaces to pTk
+
+=item Perl code for 'Widget' Classes
+
+The I<Tk> sub-directory contains the various perl modules that comprise
+the "Classes" that are visible to Tk applications.
+
+The "major" widgets such as B<Tk::Text> are actually in separate directories
+at the top level (e.g. I<Text/*> for B<Tk::Text>) and are dynamically
+loaded as needed on platforms which support perl5's B<DynaLoader>.
+
+=back
+
+=head1 CLASS HIERARCHY
+
+=over 4
+
+=item B<package Tk;> - the 'base class'
+
+All the "command names" documented in Tcl/Tk are made to look like perl
+sub's and reside in the Tk package. Their names are all lower case.
+Typically there are very few commands at this level which are called
+directly by applications.
+
+=item B<package Tk::Widget;> - the 'Widget class'
+
+There are no actual objects of the B<Tk::Widget> class; however all
+the various Tk window "widgets" inherit from it, and it in turn
+inherits all the core Tk functions from Tk.
+
+B<Tk::Widget> provides various functions and interfaces which are
+common to all Widgets.
+
+A widget is represented to perl as a blessed reference to a hash. There are some
+members of the hash which are private to Tk and its tkGlue code. Keys
+starting with B<'.'> and of the form B</_[A-Z][A-Za-z_]+_/>
+(i.e. starting and ending in _ and with first char after _ being upper case) should be
+considered reserved to B<Tk>.
+
+=item B<Tk::Button>, B<Tk::Entry>, B<Tk::Text> ...
+
+There is one class for each of the "Tk" widget item types.
+Some of them like B<Tk::Frame> do very little indeed, and really
+only exist so that they can be derived from or so that focus or menu
+traversal can discover the "kind" of window being processed.
+
+Other classes, B<Tk::Text> for example, provide a lot of methods
+used with Tk's "bind" to provide a rich keyboard/mouse interface
+to the widgets' data.
+
+These widget classes also include conversions of the Tcl code for
+event bindings, keyboard focus traversal, menu bars, and menu keyboard
+traversal. All the Tcl functions have been converted, but the names have
+changed (systematically) and they have been split up between the various
+classes in what I hope is an appropriate manner.
+Name changes are normally: dropping initial tk_ as the Tk-ness is implicit
+in the B<Tk::> prefix, and similarly dropping say Menu from the name if it
+has been moved the Tk::Menu class.
+Thus 'proc tkMenuNextEntry' becomes 'sub NextEntry' in the Tk::Menu package.
+
+=item B<Tk::Image>
+
+This does for Tk8.x's "images" what B<Tk::Widget> does for widgets.
+Images are new to Tk8.x and the class structure is not mature either.
+
+There are three sub-classes B<Tk::Bitmap>, B<Tk::Pixmap> and B<Tk::Photo>.
+
+It is possible to create dynamic or auto-loaded image types inherited
+from B<Tk::Image> for other image types or photo formats (e.g. support
+for TIFF format).
+
+=item Composite Widgets
+
+A composite is some kind of 'frame' with subwidgets which give it useful behaviour.
+B<Tk::Dialog> is an example of
+a composite widget classes built from the basic B<Tk> ones.
+It is intended that user code should not need to be aware that a particular
+class is a composite, and create and configure such widgets in the same manner
+as any other kind. The B<configure> mechanism and the methods of the
+class manipulate the subwidgets as required.
+
+Composite widgets are implemented via B<Tk::Frame> and multiple inheritance.
+The two 'frame' base classes B<Tk::Frame> and
+B<Tk::Toplevel> include the additional class B<Tk::Derived>
+in their inheritance. B<Tk::Derived> provides methods to allow additional
+B<configure> options to be defined for a widget.
+
+A Composite widget is typically defined as derived
+from B<Tk::Frame> or B<Tk::Toplevel>
+(e.g. B<Tk::Dialog>).
+
+=back
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk.pod b/Master/tlpkg/tlperl/lib/Tk/pTk.pod
new file mode 100644
index 00000000000..6e1a2a04022
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk.pod
@@ -0,0 +1,550 @@
+=head1 NAME
+
+Tk2portableTk - how to make your B<Tk> source portable to other
+interpreted languages.
+
+=for category C Programming
+
+=head1 Author
+
+Ilya Zakharevich <ilya@math.ohio-state.edu> has contributed most of
+this document. Many thanks.
+
+=head1 DESCRIPTION
+
+B<PortableTk> is an attempt to make B<Tk> useful from other
+languages. Currently tk4.0 runs under Perl using this
+approach. Below, I<Lang> is the notation for an external language to
+which B<PortableTk> glues B<Tk> code.
+
+The main problem with using the code developed for B<TCL> with
+different languages is the absence of data types: almost anything is
+C<char*>. It makes automatic translation hopeless. However, if you
+C<typedef> several new symbols to be C<char*>, you can still use your
+code in B<TCL>, I<and> it will make the automatic translation
+possible.
+
+Another problem with the approach that "everything is a string" is
+impossibility to have a result that says "NotApplicable" without
+setting an error. Thus different B<Tk> command return different string
+values that mean "error happened", like C<"">, C<" "> or
+C<"??">. Other languages can be more flexible, so in B<portableTk> you
+should inform the compiler that what you want to return means "error"
+(see L<Setting variables>).
+
+Currently B<PortableTk> uses several different approachs
+to simplify translation: several B<TCL> functions that are especially
+dangerous to use are undefined, so you can easily find places that
+need to be updated to use Language-independent functions based on
+compiler warnings. Eventually a way to use these Language-independent
+functions under proper B<TCL> will be also provided. The end of this
+document provides a starting point for such a project.
+
+=head1 Structure of B<pTk>, porting your code
+
+B<pTk>, that is a port of B<Tk>, is very special with respect to porting
+of other code to B<portableTk>. The problem is that currently there is
+very little hope to merge the modifications back into B<Tk>, so a
+special strategy is needed to maintain this port. Do not use this
+strategy to port your own code.
+
+B<pTk> is produced from B<Tk> via a two-step process: first, some
+manual editing (the result is in the subdirectory C<mTk>), and second,
+automatic conversion by the C<munge> script (written in Perl). Thus the
+subdirectory C<pTk/mTk> contains code with minimal possible difference
+from the virgin B<Tk> code, so it is easier to merge(1) the
+differences between B<Tk> versions into modified code.
+
+It looks like the strategy for a portable code should be exactly
+opposite: starting from B<TCL>-based code, apply C<munge>, and then
+hand-edit the resulting code. Probably it is also possible to target
+your code to B<portableTk> from scratch, since this will make it
+possible to run it under a lot of I<Lang>uages.
+
+The only reason anyone would like to look into contents of C<pTk/mTk>
+directory is to find out which constructs are not supported by
+C<munge>. On the other hand, C<pTk> directory contains code that is
+conformant to B<portableTk>, so you can look there to find example code.
+
+C<munge> is the script that converts most common B<Tk> constructs to
+their C<portableTk> equivalent. For your code to qualify, you should
+follow B<Tk> conventions on indentation and names of variables, in
+particular, the array of arguments for the C<...CmdProc> should be
+called C<argv>.
+
+For details on what C<munge> can do, see
+L<Translation of some TCL functions>.
+
+=head1 B<PortableTk> API
+
+=head2 Checking what you are running under
+
+B<PortableTk> provides a symbol C<????>. If this symbol is defined,
+your source is compiled with it.
+
+=head2 New types of configuration options
+
+B<PortableTk> defines several new types of configuration options:
+
+ TK_CONFIG_CALLBACK
+ TK_CONFIG_LANGARG
+ TK_CONFIG_SCALARVAR
+ TK_CONFIG_HASHVAR
+ TK_CONFIG_ARRAYVAR
+ TK_CONFIG_IMAGE
+
+You should use them instead of TK_CONFIG_STRING whenever
+appropriate. This allows your application to receive a direct
+representation of the corresponding resource instead of the string
+representation, if this is possible under given language.
+
+???? It looks like C<TK_CONFIG_IMAGE> and C<TK_CONFIG_SCALARVAR> set
+variables of type C<char*>.
+
+=head2 Language data
+
+The following data types are defined:
+
+=over 4
+
+=item C<Tcl_Obj *>
+
+is the main datatype of the language. This is a type that your C
+function gets pointers to for arguments when the corresponding I<Lang>
+function is called. The corresponding config type is
+C<TK_CONFIG_LANGARG>.
+
+This is also a type that keeps information about contents of I<Lang>
+variable.
+
+=item C<Var>
+
+Is a substitute for a C<char *> that contains name of variable. In
+I<Lang> it is an object that contains reference to another I<Lang>
+variable.
+
+=item C<LangResultSave>
+
+????
+
+=item C<LangCallback>
+
+C<LangCallback*> a substitute for a C<char *> that contains command to
+call. The corresponding config type is C<TK_CONFIG_CALLBACK>.
+
+=item C<LangFreeProc>
+
+It is the type that the C<Lang_SplitList> sets. Before you call it,
+declare
+
+ Args *args;
+ LangFreeProc *freeProc = NULL;
+ ...
+ code = Lang_SplitList(interp, value,
+ &argc, &args, &freeProc);
+
+After you use the split values, call
+
+ if (args != NULL && freeProc) (*freeProc)(argc,args);
+
+It is not guaranteed that the C<args> can survive deletion of C<value>.
+
+=back
+
+=head2 Conversion
+
+The following macros and functions are used for conversion between
+strings and the additional types:
+
+ LangCallback * LangMakeCallback(Tcl_Obj *)
+ Tcl_Obj * LangCallbackArg(LangCallback *)
+ char * LangString(Tcl_Obj *)
+
+After you use the result of LangCallbackArg(), you should free it with
+C<freeProc> C<LANG_DYNAMIC> (it is not guaranteed that any change of
+C<Tcl_Obj *> will not be reflected in <LangCallback>, so you cannot do
+LangSet...() in between, and you should reset it to C<NULL> if you
+want to do any further assignments to this C<Tcl_Obj *>).
+
+The following function returns the C<Tcl_Obj *> that is a reference to C<Var>:
+
+ Tcl_Obj * LangVarArg(Var)
+
+???? It is very anti-intuitive, I hope the name is changed.
+
+ int LangCmpCallback(LangCallback *a,Tcl_Obj * b)
+
+(currently only a stub), and, at last,
+
+ LangCallback * LangCopyCallback(LangCallback *)
+
+=head2 Callbacks
+
+Above we have seen the new datatype C<LangCallback> and the
+corresponding I<Config option> C<TK_CONFIG_CALLBACK>. The following
+functions are provided for manipulation of C<LangCallback>s:
+
+ void LangFreeCallback(LangCallback *)
+ int LangDoCallback(Tcl_Interp *,LangCallback *,
+ int result,int argc, char *format,...)
+
+The argument C<format> of C<LangDoCallback> should contain a string that is
+suitable for C<sprintf> with optional arguments of C<LangDoCallback>.
+C<result> should be false if result of callback is not needed.
+
+ int LangMethodCall(Tcl_Interp *,Tcl_Obj *,char *method,
+ int result,int argc,...)
+
+????
+
+Conceptually, C<LangCallback*> is a substitute for ubiquitous C<char *>
+in B<TCL>. So you should use C<LangFreeCallback> instead of C<ckfree>
+or C<free> if appropriate.
+
+=head2 Setting variables
+
+ void LangFreeArg (Tcl_Obj *, Tcl_FreeProc *freeProc)
+ Tcl_Obj * LangCopyArg (Tcl_Obj *);
+ void Tcl_AppendArg (Tcl_Interp *interp, Tcl_Obj *)
+ void LangSetString(Tcl_Obj * *, char *s)
+ void LangSetDefault(Tcl_Obj * *, char *s)
+
+These two are equivalent unless s is an empty string. In this case
+C<LangSetDefault> behaves like C<LangSetString> with C<s==NULL>, i.e.,
+it sets the current value of the I<Lang> variable to be false.
+
+ void LangSetInt(Tcl_Obj * *,int)
+ void LangSetDouble(Tcl_Obj * *,double)
+
+The I<Lang> functions separate uninitialized and initialized data
+comparing data with C<NULL>. So the declaration for an C<Tcl_Obj *> should
+look like
+
+ Tcl_Obj * arg = NULL;
+
+if you want to use this C<arg> with the above functions. After you are
+done, you should use C<LangFreeArg> with C<TCL_DYNAMIC> as C<freeProc>.
+
+=head2 Language functions
+
+Use
+
+=over 4
+
+=item C<int LangNull(Tcl_Obj *)>
+
+to check that an object is false;
+
+=item C<int LangStringMatch(char *string, Tcl_Obj * match)>
+
+????
+
+=item C<void LangExit(int)>
+
+to make a proper shutdown;
+
+=item C<int LangEval(Tcl_Interp *interp, char *cmd, int global)>
+
+to call I<Lang> C<eval>;
+
+=item C<void Lang_SetErrorCode(Tcl_Interp *interp,char *code)>
+
+=item C<char *Lang_GetErrorCode(Tcl_Interp *interp)>
+
+=item C<char *Lang_GetErrorInfo(Tcl_Interp *interp)>
+
+=item C<void LangCloseHandler(Tcl_Interp *interp,Tcl_Obj * arg,FILE *f,Lang_FileCloseProc *proc)>
+
+currently stubs only;
+
+=item C<int LangSaveVar(Tcl_Interp *,Tcl_Obj * arg,Var *varPtr,int type)>
+
+to save the structure C<arg> into I<Lang> variable C<*varPtr>;
+
+=item C<void LangFreeVar(Var var)>
+
+to free the result;
+
+=item C<int LangEventCallback(Tcl_Interp *,LangCallback *,XEvent *,KeySym)>
+
+????
+
+=item C<int LangEventHook(int flags)>
+
+=item C<void LangBadFile(int fd)>
+
+=item C<int LangCmpConfig(char *spec, char *arg, size_t length)>
+
+unsupported????;
+
+=item C<void Tcl_AppendArg (Tcl_Interp *interp, Tcl_Obj *)>
+
+=back
+
+Another useful construction is
+
+ Tcl_Obj * variable = LangFindVar(interp, Tk_Window tkwin, char *name);
+
+After using the above function, you should call
+
+ LangFreeVar(Var variable);
+
+???? Note discrepancy in types!
+
+If you want to find the value of a variable (of type C<Tcl_Obj *>) given the
+variable name, use C<Tcl_GetVar(interp, varName, flags)>. If you are
+interested in the string value of this variable, use
+C<LangString(Tcl_GetVar(...))>.
+
+To get a B<C> array of C<Tcl_Obj *> of length C<n>, use
+
+ Tcl_Obj * *args = LangAllocVec(n);
+ ...
+ LangFreeVec(n,args);
+
+You can set the values of the C<Tcl_Obj *>s using C<LangSet...> functions,
+and get string value using C<LangString>.
+
+If you want to merge an array of C<Tcl_Obj *>s into one C<Tcl_Obj *> (that will
+be an array variable), use
+
+ result = Tcl_Merge(listLength, list);
+
+=head2 Translation of some TCL functions
+
+We mark items that can be dealt with by C<munge> by I<Autoconverted>.
+
+=over 4
+
+=item C<Tcl_AppendResult>
+
+does not take C<(char*)NULL>, but C<NULL> as delimiter. I<Autoconverted>.
+
+=item C<Tcl_CreateCommand>, C<Tcl_DeleteCommand>
+
+C<Tk_CreateWidget>, C<Tk_DeleteWidget>, the second argument is the
+window itself, not the pathname. I<Autoconverted>.
+
+=item C<sprintf(interp-E<gt>result, "%d %d %d %d",...)>
+
+C<Tcl_IntResults(interp,4,0,...)>. I<Autoconverted>.
+
+=item C<interp-E<gt>result = "1";>
+
+C<Tcl_SetResult(interp,"1", TCL_STATIC)>. I<Autoconverted>.
+
+=item Reading C<interp-E<gt>result>
+
+C<Tcl_GetResult(interp)>. I<Autoconverted>.
+
+=item C<interp-E<gt>result = Tk_PathName(textPtr-E<gt>tkwin);>
+
+C<Tk_WidgetResult(interp,textPtr-E<gt>tkwin)>. I<Autoconverted>.
+
+=item Sequence C<Tcl_PrintDouble, Tcl_PrintDouble, ..., Tcl_AppendResult>
+
+Use a single command
+
+ void Tcl_DoubleResults(Tcl_Interp *interp, int append,
+ int argc,...);
+
+C<append> governs whether it is required to clear the result first.
+
+A similar command for C<int> arguments is C<Tcl_IntResults>.
+
+=item C<Tcl_SplitList>
+
+Use C<Lang_SplitList> (see the description above).
+
+=back
+
+=head1 Translation back to TCL
+
+To use your B<portableTk> program with B<TCL>, put
+
+ #include "ptcl.h"
+
+I<before> inclusion of C<tk.h>, and link the resulting code with
+C<ptclGlue.c>.
+
+These files currently implement the following:
+
+=over 4
+
+=item Additional config types:
+
+ TK_CONFIG_CALLBACK
+ TK_CONFIG_LANGARG
+ TK_CONFIG_SCALARVAR
+ TK_CONFIG_HASHVAR
+ TK_CONFIG_ARRAYVAR
+ TK_CONFIG_IMAGE
+
+=item Types:
+
+ Var, Tcl_Obj *, LangCallback, LangFreeProc.
+
+=item Functions and macros:
+
+ Lang_SplitList, LangString, LangSetString, LangSetDefault,
+ LangSetInt, LangSetDouble Tcl_ArgResult, LangCallbackArg,
+ LangSaveVar, LangFreeVar,
+ LangFreeSplitProc, LangFreeArg, Tcl_DoubleResults, Tcl_IntResults,
+ LangDoCallback, Tk_WidgetResult, Tcl_CreateCommand,
+ Tcl_DeleteCommand, Tcl_GetResult.
+
+=back
+
+Current implementation contains enough to make it possible to compile
+C<mTk/tkText*.[ch]> with the virgin B<Tk>.
+
+=head2 New types of events ????
+
+PortableTk defines following new types of events:
+
+ TK_EVENTTYPE_NONE
+ TK_EVENTTYPE_STRING
+ TK_EVENTTYPE_NUMBER
+ TK_EVENTTYPE_WINDOW
+ TK_EVENTTYPE_ATOM
+ TK_EVENTTYPE_DISPLAY
+ TK_EVENTTYPE_DATA
+
+and a function
+
+ char * Tk_EventInfo(int letter,
+ Tk_Window tkwin, XEvent *eventPtr,
+ KeySym keySym, int *numPtr, int *isNum, int *type,
+ int num_size, char *numStorage)
+
+=head1 Checking for trouble
+
+If you start with working TCL code, you can start convertion using
+the above hints. Good indication that you are doing is OK is absence
+of C<sprintf> and C<sscanf> in your code (at least in the part that is
+working with interpreter).
+
+=head1 Additional API
+
+What is described here is not included into base B<portableTk>
+distribution. Currently it is coded in B<TCL> and as Perl macros (core
+is coded as functions, so theoretically you can use the same object
+files with different interpreted languages).
+
+=head2 C<ListFactory>
+
+Dynamic arrays in B<TCL> are used for two different purposes: to
+construct strings, and to construct lists. These two usages will have
+separate interfaces in other languages (since list is a different type
+from a string), so you should use a different interface in your code.
+
+The type for construction of dynamic lists is C<ListFactory>. The API
+below is a counterpart of the API for construction of dynamic lists
+in B<TCL>:
+
+ void ListFactoryInit(ListFactory *)
+ void ListFactoryFinish(ListFactory *)
+ void ListFactoryFree(ListFactory *)
+ Tcl_Obj * * ListFactoryArg(ListFactory *)
+ void ListFactoryAppend(ListFactory *, Tcl_Obj * *arg)
+ void ListFactoryAppendCopy(ListFactory *, Tcl_Obj * *arg)
+ ListFactory * ListFactoryNewLevel(ListFactory *)
+ ListFactory * ListFactoryEndLevel(ListFactory *)
+ void ListFactoryResult(Tcl_Interp *, ListFactory *)
+
+The difference is that a call to C<ListFactoryFinish> should precede the
+actual usage of the value of C<ListFactory>, and there are two
+different ways to append an C<Tcl_Obj *> to a C<ListFactory>:
+ListFactoryAppendCopy() guarantees that the value of C<arg> is copied
+to the list, but ListFactoryAppend() may append to the list a
+reference to the current value of C<arg>. If you are not going to change
+the value of C<arg> after appending, the call to ListFactoryAppend may
+be quicker.
+
+As in B<TCL>, the call to ListFactoryFree() does not free the
+C<ListFactory>, only the objects it references.
+
+The functions ListFactoryNewLevel() and ListFactoryEndLevel() return a
+pointer to a C<ListFactory> to fill. The argument of
+ListFactoryEndLevel() cannot be used after a call to this function.
+
+=head2 DStrings
+
+Production of strings are still supported in B<portableTk>.
+
+=head2 Accessing C<Tcl_Obj *>s
+
+The following functions for getting a value of an C<Tcl_Obj *> I<may> be
+provided:
+
+ double LangDouble(Tcl_Obj *)
+ int LangInt(Tcl_Obj *)
+ long LangLong(Tcl_Obj *)
+ int LangIsList(Tcl_Obj * arg)
+
+The function LangIsList() is supported only partially under B<TCL>,
+since there is no data types. It checks whether there is a space
+inside the string C<arg>.
+
+=head2 Assigning numbers to C<Tcl_Obj *>s
+
+While LangSetDouble() and LangSetInt() are supported ways to assign
+numbers to assign an integer value to a variable, for the sake of
+efficiency under B<TCL> it is supposed that the destination of these
+commands was massaged before the call so it contains a long enough
+string to sprintf() the numbers inside it. If you are going to
+immediately use the resulting C<Tcl_Obj *>, the best way to do this is to
+declare a buffer in the beginning of a block by
+
+ dArgBuffer;
+
+and assign this buffer to the C<Tcl_Obj *> by
+
+ void LangSetDefaultBuffer(Tcl_Obj * *)
+
+You can also create the buffer(s) manually and assign them using
+
+ void LangSetBuffer(Tcl_Obj * *, char *)
+
+This is the only choice if you need to assign numeric values to
+several C<Tcl_Obj *>s simultaneously. The advantage of the first approach is
+that the above declarations can be made C<nop>s in different languages.
+
+Note that if you apply C<LangSetDefaultBuffer> to an C<Tcl_Obj *> that
+contains some value, you can create a leak if you do not free that
+C<Tcl_Obj *> first. This is a non-problem in real languages, but can be a
+trouble in C<TCL>, unless you use only the above API.
+
+=head2 Creating new C<Tcl_Obj *>s
+
+The API for creating a new C<Tcl_Obj *> is
+
+ void LangNewArg(Tcl_Obj * *, LangFreeProc *)
+
+The API for creating a new C<Tcl_Obj *> is absent. Just initialize C<Tcl_Obj *> to
+be C<NULL>, and apply one of C<LangSet...> methods.
+
+After you use this C<Tcl_Obj *>, it should be freed thusly:
+
+C<LangFreeArg(arg, freeProc)>.
+
+=head2 Evaluating a list
+
+Use
+
+ int LangArgEval(Tcl_Interp *, Tcl_Obj * arg)
+
+Here C<arg> should be a list to evaluate, in particular, the first
+element should be a C<LangCallback> massaged to be an C<Tcl_Obj *>. The
+arguments can be send to the subroutine by reference or by value in
+different languages.
+
+=head2 Getting result as C<Tcl_Obj *>
+
+Use C<Tcl_ArgResult>. It is not guaranteed that result survives this
+operation, so the C<Tcl_Obj *> you get should be the only mean to access the
+data from this moment on. After you use this C<Tcl_Obj *>, you should free
+it with C<freeProc> C<LANG_DYNAMIC> (you can do LangSet...() in between).
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.h b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.h
new file mode 100644
index 00000000000..4598291f872
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.h
@@ -0,0 +1,206 @@
+#ifndef _LANG
+#define _LANG
+
+#define STATIC_BUILD
+
+
+#ifdef bool
+#undef bool
+#endif
+
+#include "tkConfig.h"
+#define TCL_NO_DEPRECATED
+
+#if !defined(WIN32) && defined(USE_XFT_FONTS)
+#ifndef TCL_UTF_MAX
+#define TCL_UTF_MAX 13
+#endif
+#endif
+
+#define USE_TCLALLOC 1
+#define TCL_MEM_DEBUG
+#define USE_COMPAT_CONST
+#include "tcl.h"
+
+#if !defined(__GNUC__) && !defined(_AIX)
+#ifdef __STDC__
+#ifndef STRINGIFY
+#define STRINGIFY(x) STRINGIFY1(x)
+#define STRINGIFY1(x) #x
+#endif /* STRINGIFY */
+#define __FUNCTION__ __FILE__ ":" STRINGIFY(__LINE__)
+#else /* STDC */
+#define __FUNCTION__ ""
+#endif /* STDC */
+#endif /* GNUC or AIX */
+
+EXTERN int Tcl_DStringLength _ANSI_ARGS_((Tcl_DString *dString));
+EXTERN char * Tcl_DStringValue _ANSI_ARGS_((Tcl_DString *dString));
+
+EXTERN void Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
+EXTERN void Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
+EXTERN int Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
+
+EXTERN Tcl_ObjType * TclObjGetType _ANSI_ARGS_((Tcl_Obj *objPtr));
+EXTERN int TclObjLength _ANSI_ARGS_((Tcl_Obj *objPtr));
+EXTERN void TclObjSetType _ANSI_ARGS_((Tcl_Obj *objPtr,Tcl_ObjType *newType));
+EXTERN Tcl_InternalRep * TclObjInternal _ANSI_ARGS_((Tcl_Obj *objPtr));
+
+#if defined(TCL_EVENT_IMPLEMENT) && !defined(Var)
+#include "mTk/tclGeneric/tclInt.h"
+#endif
+#if !defined(TCL_EVENT_IMPLEMENT) || defined(Var)
+#define _TCLINT
+typedef void *TclHandle;
+extern Tcl_ObjType tclIntType;
+#endif
+
+#ifndef Var
+#define Var Tcl_Obj *
+#endif
+#ifndef LangCallback
+#define LangCallback Tcl_Obj
+#endif
+#define LangStringArg(x) Tcl_NewStringObj(x,-1)
+
+#define XFree_arg_t void
+
+EXTERN void LangSetString _ANSI_ARGS_((Tcl_Obj **,CONST char *));
+EXTERN void LangSetDefault _ANSI_ARGS_((Tcl_Obj **,CONST char *));
+EXTERN void LangSetInt _ANSI_ARGS_((Tcl_Obj **,int));
+EXTERN void LangSetDouble _ANSI_ARGS_((Tcl_Obj **,double));
+EXTERN void LangSetObj _ANSI_ARGS_((Tcl_Obj **,Tcl_Obj *));
+EXTERN void LangSetVar _ANSI_ARGS_((Tcl_Obj **,Var));
+
+EXTERN int LangCmpArg _ANSI_ARGS_((CONST Tcl_Obj *,CONST Tcl_Obj *));
+EXTERN int LangCmpOpt _ANSI_ARGS_((CONST char *opt,CONST char *arg,size_t length));
+
+
+/* FIXME:
+ Tk will set freeProc as for Tcl e.g. NULL for statics & UIDs
+ and to "free" for Tcl_Merge etc.
+ Non Tk users *may* be able to use it as a guide,
+ but it is more likely that they will have to use
+ their own ref counts.
+ Perhaps Tcl_Merge should set freeProc and/or Tcl's
+ LangSetString() deliberately malloc() a copy of the string so we don't need
+ the freeProc
+*/
+EXTERN void LangFreeArg _ANSI_ARGS_((Tcl_Obj *,Tcl_FreeProc *freeProc));
+EXTERN Tcl_Obj *LangCopyArg _ANSI_ARGS_((Tcl_Obj *));
+
+EXTERN int LangNull _ANSI_ARGS_((Tcl_Obj *));
+
+EXTERN void TclpGetTime _ANSI_ARGS_((Tcl_Time *time));
+EXTERN void TclpAsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
+
+EXTERN void Lang_SetErrorCode _ANSI_ARGS_((Tcl_Interp *interp,char *code));
+EXTERN char *Lang_GetErrorCode _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN char *Lang_GetErrorInfo _ANSI_ARGS_((Tcl_Interp *interp));
+
+/* Old-config handler for variables */
+EXTERN int LangSaveVar _ANSI_ARGS_((Tcl_Interp *,Tcl_Obj *,Var *,int type));
+EXTERN void LangFreeVar _ANSI_ARGS_((Var));
+
+/* New-config handler for objects, variables and callbacks */
+EXTERN int LangConfigObj _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj **save,
+ Tcl_Obj *obj, int type));
+
+EXTERN int LangEventHook _ANSI_ARGS_((int flags));
+EXTERN void Lang_BuildInImages _ANSI_ARGS_((void));
+EXTERN void * TclCalloc _ANSI_ARGS_((size_t n,size_t s));
+EXTERN void LangDebug _ANSI_ARGS_((CONST char *fmt,...));
+EXTERN void LangDumpVec _ANSI_ARGS_((CONST char *tag, int argc, Tcl_Obj **vec));
+
+EXTERN void Lang_DeleteObject _ANSI_ARGS_((Tcl_Interp *,Tcl_Command));
+EXTERN Tcl_Command Lang_CreateObject _ANSI_ARGS_((Tcl_Interp *interp,
+ char *cmdName, Tcl_ObjCmdProc *proc,
+ ClientData clientData,
+ Tcl_CmdDeleteProc *deleteProc));
+
+EXTERN int Lang_CallWithArgs _ANSI_ARGS_ ((Tcl_Interp *interp,
+ char *sub, int argc, Tcl_Obj *CONST *argv));
+
+EXTERN void Tcl_IntResults _ANSI_ARGS_((Tcl_Interp *interp,int,int,...));
+EXTERN void Tcl_DoubleResults _ANSI_ARGS_((Tcl_Interp *interp,int,int,...));
+EXTERN void Tcl_SprintfResult _ANSI_ARGS_((Tcl_Interp *,char *,...));
+
+
+
+EXTERN int LangDoCallback _ANSI_ARGS_((Tcl_Interp *,LangCallback *,int result,int argc,...));
+EXTERN int LangMethodCall _ANSI_ARGS_((Tcl_Interp *,Tcl_Obj *,char *,int result,int argc,...));
+
+EXTERN char *LangLibraryDir _ANSI_ARGS_((void));
+EXTERN void Lang_SetBinaryResult _ANSI_ARGS_((Tcl_Interp *interp,
+ char *string, int len, Tcl_FreeProc *freeProc));
+EXTERN Tcl_ObjCmdProc *LangOptionCommand;
+
+typedef char *(Lang_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tcl_Obj *part1, CONST char *part2, int flags));
+
+EXTERN Tcl_Encoding Lang_CreateEncoding _ANSI_ARGS_((
+ CONST char *encodingName,
+ Tcl_EncodingConvertProc *toUtfProc,
+ Tcl_EncodingConvertProc *fromUtfProc,
+ Tcl_EncodingFreeProc *freeProc,
+ ClientData clientData,
+ int nullSize));
+
+EXTERN int Tcl_AfterObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
+
+
+EXTERN int Lang_TraceVar _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj *varRef, int flags,
+ Lang_VarTraceProc * proc,
+ ClientData clientData));
+
+EXTERN void Lang_UntraceVar _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * varRef, int flags,
+ Lang_VarTraceProc * proc,
+ ClientData clientData));
+
+EXTERN int Tk_PropertyCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj **objv));
+
+struct TkFontAttributes;
+
+EXTERN unsigned int LangFontRank _ANSI_ARGS_((unsigned int suggested,
+ int ch, CONST char *gotName,
+ CONST char *wantFoundary,
+ CONST struct TkFontAttributes *wantAttrib,
+ CONST char *wantEncoding,
+ CONST char *gotFoundary,
+ CONST struct TkFontAttributes *gotAttrib,
+ CONST char *gotEncoding));
+
+EXTERN void Lang_FreeRegExp _ANSI_ARGS_((Tcl_RegExp re));
+
+EXTERN long Lang_OSHandle _ANSI_ARGS_((int fd));
+#define TK_LIBRARY LangLibraryDir()
+
+#ifdef WIN32
+#ifdef __BORLANDC__
+#pragma warn -par /* "parameter 'foo' is never used" */
+#pragma warn -aus /* "'foo' is assigned a value that is never used" */
+#pragma warn -use /* "'foo' is declared but never used" */
+#endif
+
+#ifdef _MSC_VER
+#pragma warning(disable:4101 4102 4244 4018)
+#pragma warning(disable:4133) /* init incompatible for xlib */
+#endif
+#endif
+
+#ifndef RC_INVOKED
+#include "tkEvent.h"
+#if !defined(TCL_EVENT_IMPLEMENT)
+#include "tkEvent.m"
+#endif
+#endif
+
+#endif /* _LANG */
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.m b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.m
new file mode 100644
index 00000000000..a7a43aebd54
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.m
@@ -0,0 +1,192 @@
+#ifndef _LANG_VM
+#define _LANG_VM
+#include "Lang_f.h"
+#ifndef NO_VTABLES
+#define LangOptionCommand (*LangVptr->V_LangOptionCommand)
+#define tclIntType (*LangVptr->V_tclIntType)
+#ifndef LangCmpArg
+# define LangCmpArg (*LangVptr->V_LangCmpArg)
+#endif
+
+#ifndef LangCmpOpt
+# define LangCmpOpt (*LangVptr->V_LangCmpOpt)
+#endif
+
+#ifndef LangConfigObj
+# define LangConfigObj (*LangVptr->V_LangConfigObj)
+#endif
+
+#ifndef LangCopyArg
+# define LangCopyArg (*LangVptr->V_LangCopyArg)
+#endif
+
+#ifndef LangDoCallback
+# define LangDoCallback (*LangVptr->V_LangDoCallback)
+#endif
+
+#ifndef LangDumpVec
+# define LangDumpVec (*LangVptr->V_LangDumpVec)
+#endif
+
+#ifndef LangEventHook
+# define LangEventHook (*LangVptr->V_LangEventHook)
+#endif
+
+#ifndef LangFontRank
+# define LangFontRank (*LangVptr->V_LangFontRank)
+#endif
+
+#ifndef LangFreeArg
+# define LangFreeArg (*LangVptr->V_LangFreeArg)
+#endif
+
+#ifndef LangFreeVar
+# define LangFreeVar (*LangVptr->V_LangFreeVar)
+#endif
+
+#ifndef LangLibraryDir
+# define LangLibraryDir (*LangVptr->V_LangLibraryDir)
+#endif
+
+#ifndef LangMethodCall
+# define LangMethodCall (*LangVptr->V_LangMethodCall)
+#endif
+
+#ifndef LangNull
+# define LangNull (*LangVptr->V_LangNull)
+#endif
+
+#ifndef LangSaveVar
+# define LangSaveVar (*LangVptr->V_LangSaveVar)
+#endif
+
+#ifndef LangSetDefault
+# define LangSetDefault (*LangVptr->V_LangSetDefault)
+#endif
+
+#ifndef LangSetDouble
+# define LangSetDouble (*LangVptr->V_LangSetDouble)
+#endif
+
+#ifndef LangSetInt
+# define LangSetInt (*LangVptr->V_LangSetInt)
+#endif
+
+#ifndef LangSetObj
+# define LangSetObj (*LangVptr->V_LangSetObj)
+#endif
+
+#ifndef LangSetString
+# define LangSetString (*LangVptr->V_LangSetString)
+#endif
+
+#ifndef LangSetVar
+# define LangSetVar (*LangVptr->V_LangSetVar)
+#endif
+
+#ifndef Lang_BuildInImages
+# define Lang_BuildInImages (*LangVptr->V_Lang_BuildInImages)
+#endif
+
+#ifndef Lang_CallWithArgs
+# define Lang_CallWithArgs (*LangVptr->V_Lang_CallWithArgs)
+#endif
+
+#ifndef Lang_CreateEncoding
+# define Lang_CreateEncoding (*LangVptr->V_Lang_CreateEncoding)
+#endif
+
+#ifndef Lang_CreateObject
+# define Lang_CreateObject (*LangVptr->V_Lang_CreateObject)
+#endif
+
+#ifndef Lang_DeleteObject
+# define Lang_DeleteObject (*LangVptr->V_Lang_DeleteObject)
+#endif
+
+#ifndef Lang_FreeRegExp
+# define Lang_FreeRegExp (*LangVptr->V_Lang_FreeRegExp)
+#endif
+
+#ifndef Lang_GetErrorCode
+# define Lang_GetErrorCode (*LangVptr->V_Lang_GetErrorCode)
+#endif
+
+#ifndef Lang_GetErrorInfo
+# define Lang_GetErrorInfo (*LangVptr->V_Lang_GetErrorInfo)
+#endif
+
+#ifndef Lang_SetBinaryResult
+# define Lang_SetBinaryResult (*LangVptr->V_Lang_SetBinaryResult)
+#endif
+
+#ifndef Lang_SetErrorCode
+# define Lang_SetErrorCode (*LangVptr->V_Lang_SetErrorCode)
+#endif
+
+#ifndef Lang_TraceVar
+# define Lang_TraceVar (*LangVptr->V_Lang_TraceVar)
+#endif
+
+#ifndef Lang_UntraceVar
+# define Lang_UntraceVar (*LangVptr->V_Lang_UntraceVar)
+#endif
+
+#ifndef TclObjGetType
+# define TclObjGetType (*LangVptr->V_TclObjGetType)
+#endif
+
+#ifndef TclObjInternal
+# define TclObjInternal (*LangVptr->V_TclObjInternal)
+#endif
+
+#ifndef TclObjLength
+# define TclObjLength (*LangVptr->V_TclObjLength)
+#endif
+
+#ifndef TclObjSetType
+# define TclObjSetType (*LangVptr->V_TclObjSetType)
+#endif
+
+#ifndef Tcl_AfterObjCmd
+# define Tcl_AfterObjCmd (*LangVptr->V_Tcl_AfterObjCmd)
+#endif
+
+#ifndef Tcl_DStringLength
+# define Tcl_DStringLength (*LangVptr->V_Tcl_DStringLength)
+#endif
+
+#ifndef Tcl_DStringValue
+# define Tcl_DStringValue (*LangVptr->V_Tcl_DStringValue)
+#endif
+
+#ifndef Tcl_DecrRefCount
+# define Tcl_DecrRefCount (*LangVptr->V_Tcl_DecrRefCount)
+#endif
+
+#ifndef Tcl_DoubleResults
+# define Tcl_DoubleResults (*LangVptr->V_Tcl_DoubleResults)
+#endif
+
+#ifndef Tcl_IncrRefCount
+# define Tcl_IncrRefCount (*LangVptr->V_Tcl_IncrRefCount)
+#endif
+
+#ifndef Tcl_IntResults
+# define Tcl_IntResults (*LangVptr->V_Tcl_IntResults)
+#endif
+
+#ifndef Tcl_IsShared
+# define Tcl_IsShared (*LangVptr->V_Tcl_IsShared)
+#endif
+
+#ifndef Tcl_SprintfResult
+# define Tcl_SprintfResult (*LangVptr->V_Tcl_SprintfResult)
+#endif
+
+#ifndef Tk_PropertyCmd
+# define Tk_PropertyCmd (*LangVptr->V_Tk_PropertyCmd)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _LANG_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.t b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.t
new file mode 100644
index 00000000000..b9a1f287c25
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang.t
@@ -0,0 +1,217 @@
+#ifdef _LANG
+VVAR(Tcl_ObjCmdProc *,LangOptionCommand,V_LangOptionCommand)
+#if !defined(TCL_EVENT_IMPLEMENT) || defined(Var)
+VVAR(Tcl_ObjType,tclIntType,V_tclIntType)
+#endif /* #if !defined(TCL_EVENT_IMPLEMENT) || defined(Var) */
+#ifndef LangCmpArg
+VFUNC(int,LangCmpArg,V_LangCmpArg,_ANSI_ARGS_((CONST Tcl_Obj *,CONST Tcl_Obj *)))
+#endif /* #ifndef LangCmpArg */
+
+#ifndef LangCmpOpt
+VFUNC(int,LangCmpOpt,V_LangCmpOpt,_ANSI_ARGS_((CONST char *opt,CONST char *arg,size_t length)))
+#endif /* #ifndef LangCmpOpt */
+
+#ifndef LangConfigObj
+VFUNC(int,LangConfigObj,V_LangConfigObj,_ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj **save,
+ Tcl_Obj *obj, int type)))
+#endif /* #ifndef LangConfigObj */
+
+#ifndef LangCopyArg
+VFUNC(Tcl_Obj *,LangCopyArg,V_LangCopyArg,_ANSI_ARGS_((Tcl_Obj *)))
+#endif /* #ifndef LangCopyArg */
+
+#ifndef LangDoCallback
+VFUNC(int,LangDoCallback,V_LangDoCallback,_ANSI_ARGS_((Tcl_Interp *,LangCallback *,int result,int argc,...)))
+#endif /* #ifndef LangDoCallback */
+
+#ifndef LangDumpVec
+VFUNC(void,LangDumpVec,V_LangDumpVec,_ANSI_ARGS_((CONST char *tag, int argc, Tcl_Obj **vec)))
+#endif /* #ifndef LangDumpVec */
+
+#ifndef LangEventHook
+VFUNC(int,LangEventHook,V_LangEventHook,_ANSI_ARGS_((int flags)))
+#endif /* #ifndef LangEventHook */
+
+#ifndef LangFontRank
+VFUNC(unsigned int,LangFontRank,V_LangFontRank,_ANSI_ARGS_((unsigned int suggested,
+ int ch, CONST char *gotName,
+ CONST char *wantFoundary,
+ CONST struct TkFontAttributes *wantAttrib,
+ CONST char *wantEncoding,
+ CONST char *gotFoundary,
+ CONST struct TkFontAttributes *gotAttrib,
+ CONST char *gotEncoding)))
+#endif /* #ifndef LangFontRank */
+
+#ifndef LangFreeArg
+VFUNC(void,LangFreeArg,V_LangFreeArg,_ANSI_ARGS_((Tcl_Obj *,Tcl_FreeProc *freeProc)))
+#endif /* #ifndef LangFreeArg */
+
+#ifndef LangFreeVar
+VFUNC(void,LangFreeVar,V_LangFreeVar,_ANSI_ARGS_((Var)))
+#endif /* #ifndef LangFreeVar */
+
+#ifndef LangLibraryDir
+VFUNC(char *,LangLibraryDir,V_LangLibraryDir,_ANSI_ARGS_((void)))
+#endif /* #ifndef LangLibraryDir */
+
+#ifndef LangMethodCall
+VFUNC(int,LangMethodCall,V_LangMethodCall,_ANSI_ARGS_((Tcl_Interp *,Tcl_Obj *,char *,int result,int argc,...)))
+#endif /* #ifndef LangMethodCall */
+
+#ifndef LangNull
+VFUNC(int,LangNull,V_LangNull,_ANSI_ARGS_((Tcl_Obj *)))
+#endif /* #ifndef LangNull */
+
+#ifndef LangSaveVar
+VFUNC(int,LangSaveVar,V_LangSaveVar,_ANSI_ARGS_((Tcl_Interp *,Tcl_Obj *,Var *,int type)))
+#endif /* #ifndef LangSaveVar */
+
+#ifndef LangSetDefault
+VFUNC(void,LangSetDefault,V_LangSetDefault,_ANSI_ARGS_((Tcl_Obj **,CONST char *)))
+#endif /* #ifndef LangSetDefault */
+
+#ifndef LangSetDouble
+VFUNC(void,LangSetDouble,V_LangSetDouble,_ANSI_ARGS_((Tcl_Obj **,double)))
+#endif /* #ifndef LangSetDouble */
+
+#ifndef LangSetInt
+VFUNC(void,LangSetInt,V_LangSetInt,_ANSI_ARGS_((Tcl_Obj **,int)))
+#endif /* #ifndef LangSetInt */
+
+#ifndef LangSetObj
+VFUNC(void,LangSetObj,V_LangSetObj,_ANSI_ARGS_((Tcl_Obj **,Tcl_Obj *)))
+#endif /* #ifndef LangSetObj */
+
+#ifndef LangSetString
+VFUNC(void,LangSetString,V_LangSetString,_ANSI_ARGS_((Tcl_Obj **,CONST char *)))
+#endif /* #ifndef LangSetString */
+
+#ifndef LangSetVar
+VFUNC(void,LangSetVar,V_LangSetVar,_ANSI_ARGS_((Tcl_Obj **,Var)))
+#endif /* #ifndef LangSetVar */
+
+#ifndef Lang_BuildInImages
+VFUNC(void,Lang_BuildInImages,V_Lang_BuildInImages,_ANSI_ARGS_((void)))
+#endif /* #ifndef Lang_BuildInImages */
+
+#ifndef Lang_CallWithArgs
+VFUNC(int,Lang_CallWithArgs,V_Lang_CallWithArgs,_ANSI_ARGS_((Tcl_Interp *interp,
+ char *sub, int argc, Tcl_Obj *CONST *argv)))
+#endif /* #ifndef Lang_CallWithArgs */
+
+#ifndef Lang_CreateEncoding
+VFUNC(Tcl_Encoding,Lang_CreateEncoding,V_Lang_CreateEncoding,_ANSI_ARGS_((
+ CONST char *encodingName,
+ Tcl_EncodingConvertProc *toUtfProc,
+ Tcl_EncodingConvertProc *fromUtfProc,
+ Tcl_EncodingFreeProc *freeProc,
+ ClientData clientData,
+ int nullSize)))
+#endif /* #ifndef Lang_CreateEncoding */
+
+#ifndef Lang_CreateObject
+VFUNC(Tcl_Command,Lang_CreateObject,V_Lang_CreateObject,_ANSI_ARGS_((Tcl_Interp *interp,
+ char *cmdName, Tcl_ObjCmdProc *proc,
+ ClientData clientData,
+ Tcl_CmdDeleteProc *deleteProc)))
+#endif /* #ifndef Lang_CreateObject */
+
+#ifndef Lang_DeleteObject
+VFUNC(void,Lang_DeleteObject,V_Lang_DeleteObject,_ANSI_ARGS_((Tcl_Interp *,Tcl_Command)))
+#endif /* #ifndef Lang_DeleteObject */
+
+#ifndef Lang_FreeRegExp
+VFUNC(void,Lang_FreeRegExp,V_Lang_FreeRegExp,_ANSI_ARGS_((Tcl_RegExp re)))
+#endif /* #ifndef Lang_FreeRegExp */
+
+#ifndef Lang_GetErrorCode
+VFUNC(char *,Lang_GetErrorCode,V_Lang_GetErrorCode,_ANSI_ARGS_((Tcl_Interp *interp)))
+#endif /* #ifndef Lang_GetErrorCode */
+
+#ifndef Lang_GetErrorInfo
+VFUNC(char *,Lang_GetErrorInfo,V_Lang_GetErrorInfo,_ANSI_ARGS_((Tcl_Interp *interp)))
+#endif /* #ifndef Lang_GetErrorInfo */
+
+#ifndef Lang_SetBinaryResult
+VFUNC(void,Lang_SetBinaryResult,V_Lang_SetBinaryResult,_ANSI_ARGS_((Tcl_Interp *interp,
+ char *string, int len, Tcl_FreeProc *freeProc)))
+#endif /* #ifndef Lang_SetBinaryResult */
+
+#ifndef Lang_SetErrorCode
+VFUNC(void,Lang_SetErrorCode,V_Lang_SetErrorCode,_ANSI_ARGS_((Tcl_Interp *interp,char *code)))
+#endif /* #ifndef Lang_SetErrorCode */
+
+#ifndef Lang_TraceVar
+VFUNC(int,Lang_TraceVar,V_Lang_TraceVar,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj *varRef, int flags,
+ Lang_VarTraceProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Lang_TraceVar */
+
+#ifndef Lang_UntraceVar
+VFUNC(void,Lang_UntraceVar,V_Lang_UntraceVar,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * varRef, int flags,
+ Lang_VarTraceProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Lang_UntraceVar */
+
+#ifndef TclObjGetType
+VFUNC(Tcl_ObjType *,TclObjGetType,V_TclObjGetType,_ANSI_ARGS_((Tcl_Obj *objPtr)))
+#endif /* #ifndef TclObjGetType */
+
+#ifndef TclObjInternal
+VFUNC(Tcl_InternalRep *,TclObjInternal,V_TclObjInternal,_ANSI_ARGS_((Tcl_Obj *objPtr)))
+#endif /* #ifndef TclObjInternal */
+
+#ifndef TclObjLength
+VFUNC(int,TclObjLength,V_TclObjLength,_ANSI_ARGS_((Tcl_Obj *objPtr)))
+#endif /* #ifndef TclObjLength */
+
+#ifndef TclObjSetType
+VFUNC(void,TclObjSetType,V_TclObjSetType,_ANSI_ARGS_((Tcl_Obj *objPtr,Tcl_ObjType *newType)))
+#endif /* #ifndef TclObjSetType */
+
+#ifndef Tcl_AfterObjCmd
+VFUNC(int,Tcl_AfterObjCmd,V_Tcl_AfterObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tcl_AfterObjCmd */
+
+#ifndef Tcl_DStringLength
+VFUNC(int,Tcl_DStringLength,V_Tcl_DStringLength,_ANSI_ARGS_((Tcl_DString *dString)))
+#endif /* #ifndef Tcl_DStringLength */
+
+#ifndef Tcl_DStringValue
+VFUNC(char *,Tcl_DStringValue,V_Tcl_DStringValue,_ANSI_ARGS_((Tcl_DString *dString)))
+#endif /* #ifndef Tcl_DStringValue */
+
+#ifndef Tcl_DecrRefCount
+VFUNC(void,Tcl_DecrRefCount,V_Tcl_DecrRefCount,_ANSI_ARGS_((Tcl_Obj *objPtr)))
+#endif /* #ifndef Tcl_DecrRefCount */
+
+#ifndef Tcl_DoubleResults
+VFUNC(void,Tcl_DoubleResults,V_Tcl_DoubleResults,_ANSI_ARGS_((Tcl_Interp *interp,int,int,...)))
+#endif /* #ifndef Tcl_DoubleResults */
+
+#ifndef Tcl_IncrRefCount
+VFUNC(void,Tcl_IncrRefCount,V_Tcl_IncrRefCount,_ANSI_ARGS_((Tcl_Obj *objPtr)))
+#endif /* #ifndef Tcl_IncrRefCount */
+
+#ifndef Tcl_IntResults
+VFUNC(void,Tcl_IntResults,V_Tcl_IntResults,_ANSI_ARGS_((Tcl_Interp *interp,int,int,...)))
+#endif /* #ifndef Tcl_IntResults */
+
+#ifndef Tcl_IsShared
+VFUNC(int,Tcl_IsShared,V_Tcl_IsShared,_ANSI_ARGS_((Tcl_Obj *objPtr)))
+#endif /* #ifndef Tcl_IsShared */
+
+#ifndef Tcl_SprintfResult
+VFUNC(void,Tcl_SprintfResult,V_Tcl_SprintfResult,_ANSI_ARGS_((Tcl_Interp *,char *,...)))
+#endif /* #ifndef Tcl_SprintfResult */
+
+#ifndef Tk_PropertyCmd
+VFUNC(int,Tk_PropertyCmd,V_Tk_PropertyCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj **objv)))
+#endif /* #ifndef Tk_PropertyCmd */
+
+#endif /* _LANG */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Lang_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang_f.h
new file mode 100644
index 00000000000..37058e76411
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Lang_f.h
@@ -0,0 +1,14 @@
+#ifndef LANG_VT
+#define LANG_VT
+typedef struct LangVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "Lang.t"
+#undef VFUNC
+#undef VVAR
+} LangVtab;
+extern LangVtab *LangVptr;
+extern LangVtab *LangVGet(void);
+#endif /* LANG_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Tcl-pTk b/Master/tlpkg/tlperl/lib/Tk/pTk/Tcl-pTk
new file mode 100644
index 00000000000..cc72e16b6c5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Tcl-pTk
@@ -0,0 +1,260 @@
+#!/usr/local/bin/perl -w
+use open IO => ':bytes'; # Avoid UTF-8 issues with some perl5.8.0 (RedHat)
+use Carp;
+my $verbose = 0;
+
+$SIG{'__WARN__'} = sub { print STDERR $_; Carp::confess(shift) };
+
+$src = shift;
+$dst = shift;
+
+die "Usage: $0 <src> <dst> \n" unless (defined $src and defined $dst);
+
+chmod(0666, $dst);
+chmod(0666, "$dst~");
+unlink($dst);
+open(DST,">$dst~") || die "Cannot open $dst~: $!";
+select(DST);
+
+my $copyright;
+
+@ARGV = ($src);
+
+undef $undone;
+
+sub getline
+{
+ local $_;
+ if (defined $undone)
+ {
+ $_ = $undone;
+ undef $undone;
+ }
+ else
+ {
+ $_ = <>;
+ }
+ return $_;
+}
+
+sub int_results
+{my $fmt = shift;
+ my $type = shift;
+ my @fmt = split(/\s+/,$fmt);
+ my $cnt = @fmt;
+ # print STDERR "'$fmt' => $cnt\n";
+ return "Tcl_${type}Results(interp,$cnt,0";
+}
+
+sub result
+{my ($interp,$value,$tail) = @_;
+ my $line = &getline;
+ my $kind = "TCL_STATIC";
+ if (defined $line)
+ {
+ if ($line =~ /^\s*$interp\s*->\s*freeProc\s*=\s*(.*)\s*;\s*$/)
+ {
+ $kind = $1;
+ }
+ else
+ {
+ $undone = $line if (defined $line);
+ }
+ }
+ return "Tcl_SetResult($interp,$value,$kind)$tail";
+}
+
+sub complete
+{
+ my $tail = "";
+ until (/;/)
+ {
+ my $line = &getline;
+ last unless defined($line);
+ s/\s*$//;
+ $line =~ s/^\s*//;
+ $_ .= " " . $line;
+ $tail .= "\n";
+ }
+ $_ .= $tail;
+}
+
+#use Carp;
+#$SIG{'INT'} = sub { Carp::confess($_) };
+
+
+PROCESS:
+while ($_ = &getline)
+ {
+ s/^\s*#\s*include\s*[<"]tcl\.h[">]\s*$/#include "Lang.h"\n/;
+
+ s/^\s*#\s*include\s*<((tk|tkInt|tkPort|tix|tixInt)\.h)>\s*$/#include "$1"\n/;
+
+ next if (/^\s*extern.*\bpanic\s*\(/);
+
+ s/\(char\s*\*\)\s*NULL\b/ NULL/g;
+
+ if (/^#(define|ifn?def|endif)\b/)
+ {
+ print;
+ while (/\\$/)
+ {
+ $_ = &getline;
+ print;
+ }
+ next;
+ }
+
+ if (m#^ */\*# && !m#\*/#)
+ {
+ print;
+ while (!m#\*/#)
+ {
+ $_ = &getline;
+ print;
+ }
+ next;
+ }
+
+ s/tclStubs\.t(\w+)/TkeventVptr->V_T$1/;
+
+ s/\bpanic\b/Tcl_Panic/g;
+
+ s/\b(\w+Ptr)->internalRep\./TclObjInternal($1)->/g;
+
+ s/(\w+bjPtr)->typePtr\s*=\s*(.*);/TclObjSetType($1,$2);/g;
+
+ s/\b(\w*bjPtr)->typePtr\b/TclObjGetType($1)/g;
+
+ if (/if\s*\(\(c == '.'\)\s*$/)
+ {
+ my $line = &getline;
+ if (defined($line))
+ {
+ s/\s*$//;
+ $line =~ s/^\s*//;
+ $_ .= " " . $line . "\n";
+ }
+ }
+
+ if (/Tcl_DeleteCommandFromToken/)
+ {
+ if (/Tcl_DeleteCommandFromToken[^;{]*$/)
+ {
+ &complete;
+ redo PROCESS;
+ }
+ s/Tcl_DeleteCommandFromToken(.*imageCmd)/Lang_DeleteObject$1/;
+ s/Tcl_DeleteCommandFromToken(.*widgetCmd)/Lang_DeleteWidget$1/;
+ }
+
+ if (/Tcl_(Create|Delete)Command/)
+ {
+ if (/Tcl_(Create|Delete)Command[^;{]*$/)
+ {
+ &complete;
+ redo PROCESS;
+ }
+ s/Tcl_CreateCommand\s*\(\s*((\w+->)*interp)\s*,\s*Tk_PathName\s*\(([^\)]+)\)/Lang_CreateWidget($1,$3/;
+ s/Tcl_DeleteCommand\s*\(\s*((\w+->)*(\w+\.)?interp)\s*,\s*Tcl_GetCommandName\s*\([^,]+,\s*([^\)]+->(\w+\.style|image)Cmd)\)/Lang_DeleteObject($1,$4/;
+ s/Tcl_DeleteCommand\s*\(\s*((\w+->)*(\w+\.)?interp)\s*,\s*Tcl_GetCommandName\s*\([^,]+,\s*([^\)]+->widgetCmd)\)/Lang_DeleteWidget($1,$4/;
+ }
+
+ s/\(char \*\*\)\s*objv\b/objv/g;
+
+# s/Tcl_Obj\s+\*(CONST\s+)?objv\b/Tcl_Obj *objv/;
+ if (/\bargv\w*\b/)
+ {
+ if (/\bargv\w*\s*\[([^[]*)\]\s*=[^=][^;{]*$/)
+ {
+ &complete;
+ redo PROCESS;
+ }
+ s/Tcl_Obj\s+\*(CONST\s+)?argv\b/Tcl_Obj *objv/;
+ if (/\bchar\b.*\bargv\w*\b/)
+ {
+ # convert char *argv[] to char **argv
+ s/char\s*\*\s*\bargv\s*\[\s*\]/char **argv/;
+ # convert char **argv to Tcl_Obj **objv
+ s/(CONST\s+)?char\s*\*\*\s*\bargv\b/Tcl_Obj *CONST *objv/;
+ # convert char *argv[n] to Tcl_Obj **objv = LangAllocVec(n)
+ s/char\s*\*\s*\bargv\s*\[\s*([^[]+)\]/Tcl_Obj **objv = LangAllocVec($1)/;
+ }
+ else
+ {
+ s/([^*])\*(argv\w*(\[[^[]*\])?)/${1}${2}[0]/g;
+ }
+ s/\(Tcl_Obj\s\*\)\s*argv\b/objv/g;
+ s/\bargv\s*\[([^[]*)\]\s*=([^=].*);\s*$/LangSetString(objv+$1,$2);\n/;
+ s/\bargv\s*\[([^[]*)\]\+\+/objv[$1] = Tcl_NewStringObj(Tcl_GetString(objv[$1])+1,-1)/;
+ s/\bargv\s*\[([^[]*)\]\+([0-9])/Tcl_NewStringObj(Tcl_GetString(objv[$1])+$2,-1)/;
+ if (/Tcl_Get(Boolean|Int|Double)/ || /Tk_Get(Cursor)/)
+ {
+ s/\bargv(\w*)\b/objv$1/g;
+ }
+ s/\bargv\s*(\[[^[]*\])/Tcl_GetString(objv$1)/g;
+ if (/\bargv\b/)
+ {
+ warn "Leak: $_" if ($verbose && !/\bargv\s*\)/);
+ s/\bargv\b/objv/;
+ }
+ }
+ if (/->\s*result\b/)
+ {
+ s/\s*->\s*result\b/->result/g;
+
+ s/\bsprintf\s*\(\s*interp->result\s*,\s*"((\s*%d)+)"/&int_results($1,"Int")/e;
+
+ s/\bsprintf\s*\(\s*interp->result\s*,\s*"((\s*%g)+)"/&int_results($1,"Double")/e;
+
+ s/\bsprintf\s*\(\s*interp->result\b/Tcl_SprintfResult(interp/;
+ if (/\binterp->result\s*=[^;]*$/)
+ {
+ &complete;
+ redo PROCESS;
+ }
+ s/\b((\w+\s*->\s*)*interp)->result\s*=([^;]*);/&result($1,$3,";")/e;
+ s/\b((\w+\s*->\s*)*interp)->result\s*=(.*);\s*$/&result($1,$3,";\n")/e;
+ s/\b((\w+\s*->\s*)*interp)->result/Tcl_GetResult($1)/;
+ }
+
+ if (/\bTcl_SetResult\s*\(/)
+ {
+ if (/Tcl_SetResult\s*\([^;{]*$/)
+ {
+ &complete;
+ redo PROCESS;
+ }
+ s/Tcl_SetResult\s*\(\s*((\w+->)*interp),\s*"(\d+)",\s*TCL_STATIC\s*\)/Tcl_SetObjResult($1, Tcl_NewIntObj($3))/;
+ s/Tcl_SetResult\s*\(\s*((\w+->)*interp),\s*Tk_PathName\(([^)]+)\),\s*TCL_STATIC\s*\)/Tcl_SetObjResult($1,LangWidgetObj($1,$3))/;
+ s/Tcl_SetResult\s*\(\s*((\w+->)*interp),\s*((\w+->)*\w+)->pathName\s*,\s*TCL_STATIC\s*\)/Tcl_SetObjResult($1,LangWidgetObj($1,(Tk_Window)($3)))/;
+ die $_ if /(Tk_PathName|->pathName)/;
+ }
+# 1 2 3 4 5 6
+ s/\(c == '(.)'\)\s*&&\s*(\(?)\(strncmp\(([^,]+),\s*("-\1[^"]*"),\s*(\w+|strlen\(\3\))\s*\)\s*==\s*0\)(\)?)/(c == '$1') && $2 LangCmpOpt($4,$3,$5) == 0 $6/g;
+ s/\(c == '(.)'\)\s*&&\s*\(strcmp\(([^,]+),\s*("-\1[^"]*")\s*\)\s*==\s*0\)/(c == '$1') && LangCmpOpt($3,$2,0) == 0/g;
+
+ if (defined($copyright) && !/^\s\*\s*Copyright/)
+ {
+ print $copyright;
+ undef $copyright;
+ }
+
+ s/[^\S\n]+$//;
+ print;
+
+ if (0 && /^((\s\*)\s*)Copyright/)
+ {
+ $copyright = "$2\n$1Modifications Copyright (c) 1994-2003 Nick Ing-Simmons\n";
+ }
+ }
+
+select(STDOUT);
+close(DST) or die "While writing to $dst~: $!";
+
+rename "$dst~", $dst or die "Could not rename $dst~ to $dst: $!";
+
+chmod(0444,$dst);
+
+exit 0;
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.h b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.h
new file mode 100644
index 00000000000..1cfc929fc71
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.h
@@ -0,0 +1,149 @@
+#ifndef _XLIB
+#define _XLIB
+#ifndef _XLIB_H_
+extern XFontStruct *XLoadQueryFont _ANSI_ARGS_((Display *, const char *));
+extern XModifierKeymap *XGetModifierMapping _ANSI_ARGS_((Display *));
+extern XImage *XCreateImage _ANSI_ARGS_((Display *, Visual *, unsigned int, int, int, char *, unsigned int, unsigned int, int, int));
+extern XImage *XGetImage _ANSI_ARGS_((Display *, Drawable, int, int, unsigned int, unsigned int, long unsigned int, int));
+extern Display *XOpenDisplay _ANSI_ARGS_((const char *));
+extern char *XGetAtomName _ANSI_ARGS_((Display *, Atom));
+extern char *XKeysymToString _ANSI_ARGS_((KeySym));
+extern Atom XInternAtom _ANSI_ARGS_((Display *, const char *, int));
+extern Colormap XCreateColormap _ANSI_ARGS_((Display *, Window, Visual *, int));
+extern Cursor XCreatePixmapCursor _ANSI_ARGS_((Display *, Pixmap, Pixmap, XColor *, XColor *, unsigned int, unsigned int));
+extern Cursor XCreateGlyphCursor _ANSI_ARGS_((Display *, Font, Font, unsigned int, unsigned int, XColor const *, XColor const *));
+extern Font XLoadFont _ANSI_ARGS_((Display *, const char *));
+extern GC XCreateGC _ANSI_ARGS_((Display *, Drawable, long unsigned int, XGCValues *));
+extern GContext XGContextFromGC _ANSI_ARGS_((GC));
+extern Pixmap XCreateBitmapFromData _ANSI_ARGS_((Display *, Drawable, const char *, unsigned int, unsigned int));
+extern Window XCreateWindow _ANSI_ARGS_((Display *, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual *, long unsigned int, XSetWindowAttributes *));
+extern Atom *XListProperties _ANSI_ARGS_((Display *, Window, int *));
+extern XHostAddress *XListHosts _ANSI_ARGS_((Display *, int *, int *));
+extern KeySym XKeycodeToKeysym _ANSI_ARGS_((Display *, unsigned int, int));
+extern KeySym XStringToKeysym _ANSI_ARGS_((const char *));
+extern VisualID XVisualIDFromVisual _ANSI_ARGS_((Visual *));
+extern Window XRootWindow _ANSI_ARGS_((Display *, int));
+extern Visual *XDefaultVisual _ANSI_ARGS_((Display *, int));
+extern Colormap XDefaultColormap _ANSI_ARGS_((Display *, int));
+extern XErrorHandler XSetErrorHandler _ANSI_ARGS_((XErrorHandler));
+extern int XIconifyWindow _ANSI_ARGS_((Display *, Window, int));
+extern int XWithdrawWindow _ANSI_ARGS_((Display *, Window, int));
+extern int XGetWMColormapWindows _ANSI_ARGS_((Display *, Window, Window **, int *));
+extern int XSetWMColormapWindows _ANSI_ARGS_((Display *, Window, Window *, int));
+extern int XSetTransientForHint _ANSI_ARGS_((Display *, Window, Window));
+extern int XAllocColor _ANSI_ARGS_((Display *, Colormap, XColor *));
+extern int XAllocNamedColor _ANSI_ARGS_((Display *, Colormap, const char *, XColor *, XColor *));
+extern int XBell _ANSI_ARGS_((Display *, int));
+extern int XChangeProperty _ANSI_ARGS_((Display *, Window, Atom, Atom, int, int, const unsigned char *, int));
+extern int XChangeWindowAttributes _ANSI_ARGS_((Display *, Window, long unsigned int, XSetWindowAttributes *));
+extern int XCheckIfEvent _ANSI_ARGS_((Display *, XEvent *, int (*) (Display *, XEvent *, char *), char *));
+extern int XCheckWindowEvent _ANSI_ARGS_((Display *, Window, long int, XEvent *));
+extern int XClearWindow _ANSI_ARGS_((Display *, Window));
+extern int XConfigureWindow _ANSI_ARGS_((Display *, Window, unsigned int, XWindowChanges *));
+extern int XConvertSelection _ANSI_ARGS_((Display *, Atom, Atom, Atom, Window, Time));
+extern int XCopyArea _ANSI_ARGS_((Display *, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int));
+extern int XCopyPlane _ANSI_ARGS_((Display *, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int, long unsigned int));
+extern int XDefaultDepth _ANSI_ARGS_((Display *, int));
+extern int XDefaultScreen _ANSI_ARGS_((Display *));
+extern int XDefineCursor _ANSI_ARGS_((Display *, Window, Cursor));
+extern int XDeleteProperty _ANSI_ARGS_((Display *, Window, Atom));
+extern int XDestroyWindow _ANSI_ARGS_((Display *, Window));
+extern int XDrawArc _ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int));
+extern int XDrawLine _ANSI_ARGS_((Display *, Drawable, GC, int, int, int, int));
+extern int XDrawLines _ANSI_ARGS_((Display *, Drawable, GC, XPoint *, int, int));
+extern int XDrawRectangle _ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int));
+extern int XDrawString _ANSI_ARGS_((Display *, Drawable, GC, int, int, const char *, int));
+extern int XEventsQueued _ANSI_ARGS_((Display *, int));
+extern int XFillArc _ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int));
+extern int XFillPolygon _ANSI_ARGS_((Display *, Drawable, GC, XPoint *, int, int, int));
+extern int XFillRectangle _ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int));
+extern int XFillRectangles _ANSI_ARGS_((Display *, Drawable, GC, XRectangle *, int));
+extern int XFlush _ANSI_ARGS_((Display *));
+extern int XFree _ANSI_ARGS_((XFree_arg_t *));
+extern int XFreeColormap _ANSI_ARGS_((Display *, Colormap));
+extern int XFreeColors _ANSI_ARGS_((Display *, Colormap, long unsigned int *, int, long unsigned int));
+extern int XFreeCursor _ANSI_ARGS_((Display *, Cursor));
+extern int XFreeFont _ANSI_ARGS_((Display *, XFontStruct *));
+extern int XFreeGC _ANSI_ARGS_((Display *, GC));
+extern int XFreeModifiermap _ANSI_ARGS_((XModifierKeymap *));
+extern int XGetFontProperty _ANSI_ARGS_((XFontStruct *, Atom, long unsigned int *));
+extern int XGetGeometry _ANSI_ARGS_((Display *, Drawable, Window *, int *, int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *));
+extern int XGetInputFocus _ANSI_ARGS_((Display *, Window *, int *));
+extern int XGetWindowProperty _ANSI_ARGS_((Display *, Window, Atom, long int, long int, int, Atom, Atom *, int *, long unsigned int *, long unsigned int *, unsigned char **));
+extern int XGetWindowAttributes _ANSI_ARGS_((Display *, Window, XWindowAttributes *));
+extern int XGrabKeyboard _ANSI_ARGS_((Display *, Window, int, int, int, Time));
+extern int XGrabPointer _ANSI_ARGS_((Display *, Window, int, unsigned int, int, int, Window, Cursor, Time));
+extern int XGrabServer _ANSI_ARGS_((Display *));
+extern int XLookupColor _ANSI_ARGS_((Display *, Colormap, const char *, XColor *, XColor *));
+extern int XLowerWindow _ANSI_ARGS_((Display *, Window));
+extern int XMapWindow _ANSI_ARGS_((Display *, Window));
+extern int XMoveResizeWindow _ANSI_ARGS_((Display *, Window, int, int, unsigned int, unsigned int));
+extern int XMoveWindow _ANSI_ARGS_((Display *, Window, int, int));
+extern int XNextEvent _ANSI_ARGS_((Display *, XEvent *));
+extern int XNoOp _ANSI_ARGS_((Display *));
+extern int XParseColor _ANSI_ARGS_((Display *, Colormap, const char *, XColor *));
+extern int XPutBackEvent _ANSI_ARGS_((Display *, XEvent *));
+extern int XPutImage _ANSI_ARGS_((Display *, Drawable, GC, XImage *, int, int, int, int, unsigned int, unsigned int));
+extern int XQueryColors _ANSI_ARGS_((Display *, Colormap, XColor *, int));
+extern int XQueryPointer _ANSI_ARGS_((Display *, Window, Window *, Window *, int *, int *, int *, int *, unsigned int *));
+extern int XQueryTree _ANSI_ARGS_((Display *, Window, Window *, Window *, Window **, unsigned int *));
+extern int XRaiseWindow _ANSI_ARGS_((Display *, Window));
+extern int XReadBitmapFile _ANSI_ARGS_((Display *, Drawable, const char *, unsigned int *, unsigned int *, Pixmap *, int *, int *));
+extern int XRefreshKeyboardMapping _ANSI_ARGS_((XMappingEvent *));
+extern int XResizeWindow _ANSI_ARGS_((Display *, Window, unsigned int, unsigned int));
+extern int XSelectInput _ANSI_ARGS_((Display *, Window, long int));
+extern int XSendEvent _ANSI_ARGS_((Display *, Window, int, long int, XEvent *));
+extern int XSetClipMask _ANSI_ARGS_((Display *, GC, Pixmap));
+extern int XSetClipOrigin _ANSI_ARGS_((Display *, GC, int, int));
+extern int XSetCommand _ANSI_ARGS_((Display *, Window, char **, int));
+extern int XSetDashes _ANSI_ARGS_((Display *, GC, int, const char *, int));
+extern int XSetForeground _ANSI_ARGS_((Display *, GC, long unsigned int));
+extern int XSetIconName _ANSI_ARGS_((Display *, Window, const char *));
+extern int XSetInputFocus _ANSI_ARGS_((Display *, Window, int, Time));
+extern int XSetSelectionOwner _ANSI_ARGS_((Display *, Atom, Window, Time));
+extern int XSetTSOrigin _ANSI_ARGS_((Display *, GC, int, int));
+extern int XSetWindowBackground _ANSI_ARGS_((Display *, Window, long unsigned int));
+extern int XSetWindowBackgroundPixmap _ANSI_ARGS_((Display *, Window, Pixmap));
+extern int XSetWindowBorder _ANSI_ARGS_((Display *, Window, long unsigned int));
+extern int XSetWindowBorderPixmap _ANSI_ARGS_((Display *, Window, Pixmap));
+extern int XSetWindowBorderWidth _ANSI_ARGS_((Display *, Window, unsigned int));
+extern int XSetWindowColormap _ANSI_ARGS_((Display *, Window, Colormap));
+extern int XSync _ANSI_ARGS_((Display *, int));
+extern int XTextExtents _ANSI_ARGS_((XFontStruct *, const char *, int, int *, int *, int *, XCharStruct *));
+extern int XTextWidth _ANSI_ARGS_((XFontStruct *, const char *, int));
+extern int XTranslateCoordinates _ANSI_ARGS_((Display *, Window, Window, int, int, int *, int *, Window *));
+extern int XUngrabKeyboard _ANSI_ARGS_((Display *, Time));
+extern int XUngrabPointer _ANSI_ARGS_((Display *, Time));
+extern int XUngrabServer _ANSI_ARGS_((Display *));
+extern int XUnmapWindow _ANSI_ARGS_((Display *, Window));
+extern int XWindowEvent _ANSI_ARGS_((Display *, Window, long int, XEvent *));
+extern Region XCreateRegion _ANSI_ARGS_((void));
+extern XVisualInfo *XGetVisualInfo _ANSI_ARGS_((Display *, long int, XVisualInfo *, int *));
+extern XSizeHints *XAllocSizeHints _ANSI_ARGS_((void));
+extern XClassHint *XAllocClassHint _ANSI_ARGS_((void));
+extern void XSetWMNormalHints _ANSI_ARGS_((Display *, Window, XSizeHints *));
+extern void XSetWMName _ANSI_ARGS_((Display *, Window, XTextProperty *));
+extern void XSetWMClientMachine _ANSI_ARGS_((Display *, Window, XTextProperty *));
+extern int XStringListToTextProperty _ANSI_ARGS_((char **, int, XTextProperty *));
+extern int XClipBox _ANSI_ARGS_((Region, XRectangle *));
+extern int XDestroyRegion _ANSI_ARGS_((Region));
+extern int XIntersectRegion _ANSI_ARGS_((Region, Region, Region));
+extern int XLookupString _ANSI_ARGS_((XKeyEvent *, char *, int, KeySym *, XComposeStatus *));
+extern int XSetClassHint _ANSI_ARGS_((Display *, Window, XClassHint *));
+extern int XSetWMHints _ANSI_ARGS_((Display *, Window, XWMHints *));
+extern int XSetRegion _ANSI_ARGS_((Display *, GC, Region));
+extern int XUnionRectWithRegion _ANSI_ARGS_((XRectangle *, Region, Region));
+extern int XSetBackground _ANSI_ARGS_((Display *, GC, unsigned long));
+extern int XDrawImageString _ANSI_ARGS_((Display *, Drawable, GC, int, int, const char *, int));
+extern int XWarpPointer _ANSI_ARGS_(( Display *, Window, Window, int, int, unsigned int, unsigned int, int, int ));
+extern int XDrawPoints _ANSI_ARGS_(( Display*, Drawable, GC, XPoint*, int, int));
+extern int XChangeGC _ANSI_ARGS_(( Display*, GC, unsigned long, XGCValues *));
+extern char **XListFonts _ANSI_ARGS_(( Display*, const char *, int, int *));
+extern int XFreeFontNames _ANSI_ARGS_((char **));
+extern Window XGetSelectionOwner _ANSI_ARGS_((Display *, Atom));
+extern int XRectInRegion _ANSI_ARGS_((Region,int,int,unsigned,unsigned));
+extern int XSubtractRegion _ANSI_ARGS_((Region, Region, Region));
+#endif /* _XLIB_H_ */
+extern int _XInitImageFuncPtrs _ANSI_ARGS_((XImage *image));
+#endif /* _XLIB */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.m b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.m
new file mode 100644
index 00000000000..81d863e3d63
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.m
@@ -0,0 +1,661 @@
+#ifndef _XLIB_VM
+#define _XLIB_VM
+#include "Xlib_f.h"
+#ifndef NO_VTABLES
+#if (defined(__WIN32__) || defined(__PM__)) && !defined(DO_X_EXCLUDE)
+# define DO_X_EXCLUDE
+#endif
+#ifndef DO_X_EXCLUDE
+#ifndef XAllocClassHint
+# define XAllocClassHint (*XlibVptr->V_XAllocClassHint)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XAllocColor
+# define XAllocColor (*XlibVptr->V_XAllocColor)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XAllocNamedColor
+# define XAllocNamedColor (*XlibVptr->V_XAllocNamedColor)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XAllocSizeHints
+# define XAllocSizeHints (*XlibVptr->V_XAllocSizeHints)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XBell
+# define XBell (*XlibVptr->V_XBell)
+#endif
+
+#ifndef XChangeGC
+# define XChangeGC (*XlibVptr->V_XChangeGC)
+#endif
+
+#ifndef XChangeProperty
+# define XChangeProperty (*XlibVptr->V_XChangeProperty)
+#endif
+
+#ifndef XChangeWindowAttributes
+# define XChangeWindowAttributes (*XlibVptr->V_XChangeWindowAttributes)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCheckIfEvent
+# define XCheckIfEvent (*XlibVptr->V_XCheckIfEvent)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCheckWindowEvent
+# define XCheckWindowEvent (*XlibVptr->V_XCheckWindowEvent)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XClearWindow
+# define XClearWindow (*XlibVptr->V_XClearWindow)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XClipBox
+# define XClipBox (*XlibVptr->V_XClipBox)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XConfigureWindow
+# define XConfigureWindow (*XlibVptr->V_XConfigureWindow)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XConvertSelection
+# define XConvertSelection (*XlibVptr->V_XConvertSelection)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XCopyArea
+# define XCopyArea (*XlibVptr->V_XCopyArea)
+#endif
+
+#ifndef XCopyPlane
+# define XCopyPlane (*XlibVptr->V_XCopyPlane)
+#endif
+
+#ifndef XCreateBitmapFromData
+# define XCreateBitmapFromData (*XlibVptr->V_XCreateBitmapFromData)
+#endif
+
+#ifndef XCreateColormap
+# define XCreateColormap (*XlibVptr->V_XCreateColormap)
+#endif
+
+#ifndef XCreateGC
+# define XCreateGC (*XlibVptr->V_XCreateGC)
+#endif
+
+#ifndef XCreateGlyphCursor
+# define XCreateGlyphCursor (*XlibVptr->V_XCreateGlyphCursor)
+#endif
+
+#ifndef XCreateImage
+# define XCreateImage (*XlibVptr->V_XCreateImage)
+#endif
+
+#ifndef XCreatePixmapCursor
+# define XCreatePixmapCursor (*XlibVptr->V_XCreatePixmapCursor)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCreateRegion
+# define XCreateRegion (*XlibVptr->V_XCreateRegion)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCreateWindow
+# define XCreateWindow (*XlibVptr->V_XCreateWindow)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultColormap
+# define XDefaultColormap (*XlibVptr->V_XDefaultColormap)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultDepth
+# define XDefaultDepth (*XlibVptr->V_XDefaultDepth)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultScreen
+# define XDefaultScreen (*XlibVptr->V_XDefaultScreen)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultVisual
+# define XDefaultVisual (*XlibVptr->V_XDefaultVisual)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XDefineCursor
+# define XDefineCursor (*XlibVptr->V_XDefineCursor)
+#endif
+
+#ifndef XDeleteProperty
+# define XDeleteProperty (*XlibVptr->V_XDeleteProperty)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDestroyRegion
+# define XDestroyRegion (*XlibVptr->V_XDestroyRegion)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XDestroyWindow
+# define XDestroyWindow (*XlibVptr->V_XDestroyWindow)
+#endif
+
+#ifndef XDrawArc
+# define XDrawArc (*XlibVptr->V_XDrawArc)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDrawImageString
+# define XDrawImageString (*XlibVptr->V_XDrawImageString)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XDrawLine
+# define XDrawLine (*XlibVptr->V_XDrawLine)
+#endif
+
+#ifndef XDrawLines
+# define XDrawLines (*XlibVptr->V_XDrawLines)
+#endif
+
+#ifndef XDrawPoints
+# define XDrawPoints (*XlibVptr->V_XDrawPoints)
+#endif
+
+#ifndef XDrawRectangle
+# define XDrawRectangle (*XlibVptr->V_XDrawRectangle)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDrawString
+# define XDrawString (*XlibVptr->V_XDrawString)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XEventsQueued
+# define XEventsQueued (*XlibVptr->V_XEventsQueued)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XFillArc
+# define XFillArc (*XlibVptr->V_XFillArc)
+#endif
+
+#ifndef XFillPolygon
+# define XFillPolygon (*XlibVptr->V_XFillPolygon)
+#endif
+
+#ifndef XFillRectangle
+# define XFillRectangle (*XlibVptr->V_XFillRectangle)
+#endif
+
+#ifndef XFillRectangles
+# define XFillRectangles (*XlibVptr->V_XFillRectangles)
+#endif
+
+#ifndef XFlush
+# define XFlush (*XlibVptr->V_XFlush)
+#endif
+
+#ifndef XFree
+# define XFree (*XlibVptr->V_XFree)
+#endif
+
+#ifndef XFreeColormap
+# define XFreeColormap (*XlibVptr->V_XFreeColormap)
+#endif
+
+#ifndef XFreeColors
+# define XFreeColors (*XlibVptr->V_XFreeColors)
+#endif
+
+#ifndef XFreeCursor
+# define XFreeCursor (*XlibVptr->V_XFreeCursor)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XFreeFont
+# define XFreeFont (*XlibVptr->V_XFreeFont)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XFreeFontNames
+# define XFreeFontNames (*XlibVptr->V_XFreeFontNames)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XFreeGC
+# define XFreeGC (*XlibVptr->V_XFreeGC)
+#endif
+
+#ifndef XFreeModifiermap
+# define XFreeModifiermap (*XlibVptr->V_XFreeModifiermap)
+#endif
+
+#ifndef XGContextFromGC
+# define XGContextFromGC (*XlibVptr->V_XGContextFromGC)
+#endif
+
+#ifndef XGetAtomName
+# define XGetAtomName (*XlibVptr->V_XGetAtomName)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XGetFontProperty
+# define XGetFontProperty (*XlibVptr->V_XGetFontProperty)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XGetGeometry
+# define XGetGeometry (*XlibVptr->V_XGetGeometry)
+#endif
+
+#ifndef XGetImage
+# define XGetImage (*XlibVptr->V_XGetImage)
+#endif
+
+#ifndef XGetInputFocus
+# define XGetInputFocus (*XlibVptr->V_XGetInputFocus)
+#endif
+
+#ifndef XGetModifierMapping
+# define XGetModifierMapping (*XlibVptr->V_XGetModifierMapping)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XGetSelectionOwner
+# define XGetSelectionOwner (*XlibVptr->V_XGetSelectionOwner)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XGetVisualInfo
+# define XGetVisualInfo (*XlibVptr->V_XGetVisualInfo)
+#endif
+
+#ifndef XGetWMColormapWindows
+# define XGetWMColormapWindows (*XlibVptr->V_XGetWMColormapWindows)
+#endif
+
+#ifndef XGetWindowAttributes
+# define XGetWindowAttributes (*XlibVptr->V_XGetWindowAttributes)
+#endif
+
+#ifndef XGetWindowProperty
+# define XGetWindowProperty (*XlibVptr->V_XGetWindowProperty)
+#endif
+
+#ifndef XGrabKeyboard
+# define XGrabKeyboard (*XlibVptr->V_XGrabKeyboard)
+#endif
+
+#ifndef XGrabPointer
+# define XGrabPointer (*XlibVptr->V_XGrabPointer)
+#endif
+
+#ifndef XGrabServer
+# define XGrabServer (*XlibVptr->V_XGrabServer)
+#endif
+
+#ifndef XIconifyWindow
+# define XIconifyWindow (*XlibVptr->V_XIconifyWindow)
+#endif
+
+#ifndef XInternAtom
+# define XInternAtom (*XlibVptr->V_XInternAtom)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XIntersectRegion
+# define XIntersectRegion (*XlibVptr->V_XIntersectRegion)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XKeycodeToKeysym
+# define XKeycodeToKeysym (*XlibVptr->V_XKeycodeToKeysym)
+#endif
+
+#ifndef XKeysymToString
+# define XKeysymToString (*XlibVptr->V_XKeysymToString)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XListFonts
+# define XListFonts (*XlibVptr->V_XListFonts)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XListHosts
+# define XListHosts (*XlibVptr->V_XListHosts)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XListProperties
+# define XListProperties (*XlibVptr->V_XListProperties)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XLoadFont
+# define XLoadFont (*XlibVptr->V_XLoadFont)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XLoadQueryFont
+# define XLoadQueryFont (*XlibVptr->V_XLoadQueryFont)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XLookupColor
+# define XLookupColor (*XlibVptr->V_XLookupColor)
+#endif
+
+#ifndef XLookupString
+# define XLookupString (*XlibVptr->V_XLookupString)
+#endif
+
+#ifndef XLowerWindow
+# define XLowerWindow (*XlibVptr->V_XLowerWindow)
+#endif
+
+#ifndef XMapWindow
+# define XMapWindow (*XlibVptr->V_XMapWindow)
+#endif
+
+#ifndef XMoveResizeWindow
+# define XMoveResizeWindow (*XlibVptr->V_XMoveResizeWindow)
+#endif
+
+#ifndef XMoveWindow
+# define XMoveWindow (*XlibVptr->V_XMoveWindow)
+#endif
+
+#ifndef XNextEvent
+# define XNextEvent (*XlibVptr->V_XNextEvent)
+#endif
+
+#ifndef XNoOp
+# define XNoOp (*XlibVptr->V_XNoOp)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XOpenDisplay
+# define XOpenDisplay (*XlibVptr->V_XOpenDisplay)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XParseColor
+# define XParseColor (*XlibVptr->V_XParseColor)
+#endif
+
+#ifndef XPutBackEvent
+# define XPutBackEvent (*XlibVptr->V_XPutBackEvent)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XPutImage
+# define XPutImage (*XlibVptr->V_XPutImage)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XQueryColors
+# define XQueryColors (*XlibVptr->V_XQueryColors)
+#endif
+
+#ifndef XQueryPointer
+# define XQueryPointer (*XlibVptr->V_XQueryPointer)
+#endif
+
+#ifndef XQueryTree
+# define XQueryTree (*XlibVptr->V_XQueryTree)
+#endif
+
+#ifndef XRaiseWindow
+# define XRaiseWindow (*XlibVptr->V_XRaiseWindow)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XReadBitmapFile
+# define XReadBitmapFile (*XlibVptr->V_XReadBitmapFile)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XRectInRegion
+# define XRectInRegion (*XlibVptr->V_XRectInRegion)
+#endif
+
+#ifndef XRefreshKeyboardMapping
+# define XRefreshKeyboardMapping (*XlibVptr->V_XRefreshKeyboardMapping)
+#endif
+
+#ifndef XResizeWindow
+# define XResizeWindow (*XlibVptr->V_XResizeWindow)
+#endif
+
+#ifndef XRootWindow
+# define XRootWindow (*XlibVptr->V_XRootWindow)
+#endif
+
+#ifndef XSelectInput
+# define XSelectInput (*XlibVptr->V_XSelectInput)
+#endif
+
+#ifndef XSendEvent
+# define XSendEvent (*XlibVptr->V_XSendEvent)
+#endif
+
+#ifndef XSetBackground
+# define XSetBackground (*XlibVptr->V_XSetBackground)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetClassHint
+# define XSetClassHint (*XlibVptr->V_XSetClassHint)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetClipMask
+# define XSetClipMask (*XlibVptr->V_XSetClipMask)
+#endif
+
+#ifndef XSetClipOrigin
+# define XSetClipOrigin (*XlibVptr->V_XSetClipOrigin)
+#endif
+
+#ifndef XSetCommand
+# define XSetCommand (*XlibVptr->V_XSetCommand)
+#endif
+
+#ifndef XSetDashes
+# define XSetDashes (*XlibVptr->V_XSetDashes)
+#endif
+
+#ifndef XSetErrorHandler
+# define XSetErrorHandler (*XlibVptr->V_XSetErrorHandler)
+#endif
+
+#ifndef XSetForeground
+# define XSetForeground (*XlibVptr->V_XSetForeground)
+#endif
+
+#ifndef XSetIconName
+# define XSetIconName (*XlibVptr->V_XSetIconName)
+#endif
+
+#ifndef XSetInputFocus
+# define XSetInputFocus (*XlibVptr->V_XSetInputFocus)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetRegion
+# define XSetRegion (*XlibVptr->V_XSetRegion)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetSelectionOwner
+# define XSetSelectionOwner (*XlibVptr->V_XSetSelectionOwner)
+#endif
+
+#ifndef XSetTSOrigin
+# define XSetTSOrigin (*XlibVptr->V_XSetTSOrigin)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetTransientForHint
+# define XSetTransientForHint (*XlibVptr->V_XSetTransientForHint)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetWMClientMachine
+# define XSetWMClientMachine (*XlibVptr->V_XSetWMClientMachine)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMColormapWindows
+# define XSetWMColormapWindows (*XlibVptr->V_XSetWMColormapWindows)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMHints
+# define XSetWMHints (*XlibVptr->V_XSetWMHints)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMName
+# define XSetWMName (*XlibVptr->V_XSetWMName)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMNormalHints
+# define XSetWMNormalHints (*XlibVptr->V_XSetWMNormalHints)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetWindowBackground
+# define XSetWindowBackground (*XlibVptr->V_XSetWindowBackground)
+#endif
+
+#ifndef XSetWindowBackgroundPixmap
+# define XSetWindowBackgroundPixmap (*XlibVptr->V_XSetWindowBackgroundPixmap)
+#endif
+
+#ifndef XSetWindowBorder
+# define XSetWindowBorder (*XlibVptr->V_XSetWindowBorder)
+#endif
+
+#ifndef XSetWindowBorderPixmap
+# define XSetWindowBorderPixmap (*XlibVptr->V_XSetWindowBorderPixmap)
+#endif
+
+#ifndef XSetWindowBorderWidth
+# define XSetWindowBorderWidth (*XlibVptr->V_XSetWindowBorderWidth)
+#endif
+
+#ifndef XSetWindowColormap
+# define XSetWindowColormap (*XlibVptr->V_XSetWindowColormap)
+#endif
+
+#ifndef XStringListToTextProperty
+# define XStringListToTextProperty (*XlibVptr->V_XStringListToTextProperty)
+#endif
+
+#ifndef XStringToKeysym
+# define XStringToKeysym (*XlibVptr->V_XStringToKeysym)
+#endif
+
+#ifndef XSubtractRegion
+# define XSubtractRegion (*XlibVptr->V_XSubtractRegion)
+#endif
+
+#ifndef XSync
+# define XSync (*XlibVptr->V_XSync)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XTextExtents
+# define XTextExtents (*XlibVptr->V_XTextExtents)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XTextWidth
+# define XTextWidth (*XlibVptr->V_XTextWidth)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XTranslateCoordinates
+# define XTranslateCoordinates (*XlibVptr->V_XTranslateCoordinates)
+#endif
+
+#ifndef XUngrabKeyboard
+# define XUngrabKeyboard (*XlibVptr->V_XUngrabKeyboard)
+#endif
+
+#ifndef XUngrabPointer
+# define XUngrabPointer (*XlibVptr->V_XUngrabPointer)
+#endif
+
+#ifndef XUngrabServer
+# define XUngrabServer (*XlibVptr->V_XUngrabServer)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XUnionRectWithRegion
+# define XUnionRectWithRegion (*XlibVptr->V_XUnionRectWithRegion)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XUnmapWindow
+# define XUnmapWindow (*XlibVptr->V_XUnmapWindow)
+#endif
+
+#ifndef XVisualIDFromVisual
+# define XVisualIDFromVisual (*XlibVptr->V_XVisualIDFromVisual)
+#endif
+
+#ifndef DO_X_EXCLUDE
+#ifndef XWarpPointer
+# define XWarpPointer (*XlibVptr->V_XWarpPointer)
+#endif
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XWindowEvent
+# define XWindowEvent (*XlibVptr->V_XWindowEvent)
+#endif
+
+#ifndef XWithdrawWindow
+# define XWithdrawWindow (*XlibVptr->V_XWithdrawWindow)
+#endif
+
+#ifndef _XInitImageFuncPtrs
+# define _XInitImageFuncPtrs (*XlibVptr->V__XInitImageFuncPtrs)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _XLIB_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.t b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.t
new file mode 100644
index 00000000000..324678aa634
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib.t
@@ -0,0 +1,657 @@
+#ifdef _XLIB
+#if (defined(__WIN32__) || defined(__PM__)) && !defined(DO_X_EXCLUDE)
+# define DO_X_EXCLUDE
+#endif
+#ifndef DO_X_EXCLUDE
+#ifndef XAllocClassHint
+VFUNC(XClassHint *,XAllocClassHint,V_XAllocClassHint,_ANSI_ARGS_((void)))
+#endif /* #ifndef XAllocClassHint */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XAllocColor
+VFUNC(int,XAllocColor,V_XAllocColor,_ANSI_ARGS_((Display *, Colormap, XColor *)))
+#endif /* #ifndef XAllocColor */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XAllocNamedColor
+VFUNC(int,XAllocNamedColor,V_XAllocNamedColor,_ANSI_ARGS_((Display *, Colormap, const char *, XColor *, XColor *)))
+#endif /* #ifndef XAllocNamedColor */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XAllocSizeHints
+VFUNC(XSizeHints *,XAllocSizeHints,V_XAllocSizeHints,_ANSI_ARGS_((void)))
+#endif /* #ifndef XAllocSizeHints */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XBell
+VFUNC(int,XBell,V_XBell,_ANSI_ARGS_((Display *, int)))
+#endif /* #ifndef XBell */
+
+#ifndef XChangeGC
+VFUNC(int,XChangeGC,V_XChangeGC,_ANSI_ARGS_(( Display*, GC, unsigned long, XGCValues *)))
+#endif /* #ifndef XChangeGC */
+
+#ifndef XChangeProperty
+VFUNC(int,XChangeProperty,V_XChangeProperty,_ANSI_ARGS_((Display *, Window, Atom, Atom, int, int, const unsigned char *, int)))
+#endif /* #ifndef XChangeProperty */
+
+#ifndef XChangeWindowAttributes
+VFUNC(int,XChangeWindowAttributes,V_XChangeWindowAttributes,_ANSI_ARGS_((Display *, Window, long unsigned int, XSetWindowAttributes *)))
+#endif /* #ifndef XChangeWindowAttributes */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCheckIfEvent
+VFUNC(int,XCheckIfEvent,V_XCheckIfEvent,_ANSI_ARGS_((Display *, XEvent *, int (*) (Display *, XEvent *, char *), char *)))
+#endif /* #ifndef XCheckIfEvent */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCheckWindowEvent
+VFUNC(int,XCheckWindowEvent,V_XCheckWindowEvent,_ANSI_ARGS_((Display *, Window, long int, XEvent *)))
+#endif /* #ifndef XCheckWindowEvent */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XClearWindow
+VFUNC(int,XClearWindow,V_XClearWindow,_ANSI_ARGS_((Display *, Window)))
+#endif /* #ifndef XClearWindow */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XClipBox
+VFUNC(int,XClipBox,V_XClipBox,_ANSI_ARGS_((Region, XRectangle *)))
+#endif /* #ifndef XClipBox */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XConfigureWindow
+VFUNC(int,XConfigureWindow,V_XConfigureWindow,_ANSI_ARGS_((Display *, Window, unsigned int, XWindowChanges *)))
+#endif /* #ifndef XConfigureWindow */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XConvertSelection
+VFUNC(int,XConvertSelection,V_XConvertSelection,_ANSI_ARGS_((Display *, Atom, Atom, Atom, Window, Time)))
+#endif /* #ifndef XConvertSelection */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XCopyArea
+VFUNC(int,XCopyArea,V_XCopyArea,_ANSI_ARGS_((Display *, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int)))
+#endif /* #ifndef XCopyArea */
+
+#ifndef XCopyPlane
+VFUNC(int,XCopyPlane,V_XCopyPlane,_ANSI_ARGS_((Display *, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int, long unsigned int)))
+#endif /* #ifndef XCopyPlane */
+
+#ifndef XCreateBitmapFromData
+VFUNC(Pixmap,XCreateBitmapFromData,V_XCreateBitmapFromData,_ANSI_ARGS_((Display *, Drawable, const char *, unsigned int, unsigned int)))
+#endif /* #ifndef XCreateBitmapFromData */
+
+#ifndef XCreateColormap
+VFUNC(Colormap,XCreateColormap,V_XCreateColormap,_ANSI_ARGS_((Display *, Window, Visual *, int)))
+#endif /* #ifndef XCreateColormap */
+
+#ifndef XCreateGC
+VFUNC(GC,XCreateGC,V_XCreateGC,_ANSI_ARGS_((Display *, Drawable, long unsigned int, XGCValues *)))
+#endif /* #ifndef XCreateGC */
+
+#ifndef XCreateGlyphCursor
+VFUNC(Cursor,XCreateGlyphCursor,V_XCreateGlyphCursor,_ANSI_ARGS_((Display *, Font, Font, unsigned int, unsigned int, XColor const *, XColor const *)))
+#endif /* #ifndef XCreateGlyphCursor */
+
+#ifndef XCreateImage
+VFUNC(XImage *,XCreateImage,V_XCreateImage,_ANSI_ARGS_((Display *, Visual *, unsigned int, int, int, char *, unsigned int, unsigned int, int, int)))
+#endif /* #ifndef XCreateImage */
+
+#ifndef XCreatePixmapCursor
+VFUNC(Cursor,XCreatePixmapCursor,V_XCreatePixmapCursor,_ANSI_ARGS_((Display *, Pixmap, Pixmap, XColor *, XColor *, unsigned int, unsigned int)))
+#endif /* #ifndef XCreatePixmapCursor */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCreateRegion
+VFUNC(Region,XCreateRegion,V_XCreateRegion,_ANSI_ARGS_((void)))
+#endif /* #ifndef XCreateRegion */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XCreateWindow
+VFUNC(Window,XCreateWindow,V_XCreateWindow,_ANSI_ARGS_((Display *, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual *, long unsigned int, XSetWindowAttributes *)))
+#endif /* #ifndef XCreateWindow */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultColormap
+VFUNC(Colormap,XDefaultColormap,V_XDefaultColormap,_ANSI_ARGS_((Display *, int)))
+#endif /* #ifndef XDefaultColormap */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultDepth
+VFUNC(int,XDefaultDepth,V_XDefaultDepth,_ANSI_ARGS_((Display *, int)))
+#endif /* #ifndef XDefaultDepth */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultScreen
+VFUNC(int,XDefaultScreen,V_XDefaultScreen,_ANSI_ARGS_((Display *)))
+#endif /* #ifndef XDefaultScreen */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDefaultVisual
+VFUNC(Visual *,XDefaultVisual,V_XDefaultVisual,_ANSI_ARGS_((Display *, int)))
+#endif /* #ifndef XDefaultVisual */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XDefineCursor
+VFUNC(int,XDefineCursor,V_XDefineCursor,_ANSI_ARGS_((Display *, Window, Cursor)))
+#endif /* #ifndef XDefineCursor */
+
+#ifndef XDeleteProperty
+VFUNC(int,XDeleteProperty,V_XDeleteProperty,_ANSI_ARGS_((Display *, Window, Atom)))
+#endif /* #ifndef XDeleteProperty */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDestroyRegion
+VFUNC(int,XDestroyRegion,V_XDestroyRegion,_ANSI_ARGS_((Region)))
+#endif /* #ifndef XDestroyRegion */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XDestroyWindow
+VFUNC(int,XDestroyWindow,V_XDestroyWindow,_ANSI_ARGS_((Display *, Window)))
+#endif /* #ifndef XDestroyWindow */
+
+#ifndef XDrawArc
+VFUNC(int,XDrawArc,V_XDrawArc,_ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int)))
+#endif /* #ifndef XDrawArc */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDrawImageString
+VFUNC(int,XDrawImageString,V_XDrawImageString,_ANSI_ARGS_((Display *, Drawable, GC, int, int, const char *, int)))
+#endif /* #ifndef XDrawImageString */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XDrawLine
+VFUNC(int,XDrawLine,V_XDrawLine,_ANSI_ARGS_((Display *, Drawable, GC, int, int, int, int)))
+#endif /* #ifndef XDrawLine */
+
+#ifndef XDrawLines
+VFUNC(int,XDrawLines,V_XDrawLines,_ANSI_ARGS_((Display *, Drawable, GC, XPoint *, int, int)))
+#endif /* #ifndef XDrawLines */
+
+#ifndef XDrawPoints
+VFUNC(int,XDrawPoints,V_XDrawPoints,_ANSI_ARGS_(( Display*, Drawable, GC, XPoint*, int, int)))
+#endif /* #ifndef XDrawPoints */
+
+#ifndef XDrawRectangle
+VFUNC(int,XDrawRectangle,V_XDrawRectangle,_ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int)))
+#endif /* #ifndef XDrawRectangle */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XDrawString
+VFUNC(int,XDrawString,V_XDrawString,_ANSI_ARGS_((Display *, Drawable, GC, int, int, const char *, int)))
+#endif /* #ifndef XDrawString */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XEventsQueued
+VFUNC(int,XEventsQueued,V_XEventsQueued,_ANSI_ARGS_((Display *, int)))
+#endif /* #ifndef XEventsQueued */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XFillArc
+VFUNC(int,XFillArc,V_XFillArc,_ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int)))
+#endif /* #ifndef XFillArc */
+
+#ifndef XFillPolygon
+VFUNC(int,XFillPolygon,V_XFillPolygon,_ANSI_ARGS_((Display *, Drawable, GC, XPoint *, int, int, int)))
+#endif /* #ifndef XFillPolygon */
+
+#ifndef XFillRectangle
+VFUNC(int,XFillRectangle,V_XFillRectangle,_ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int)))
+#endif /* #ifndef XFillRectangle */
+
+#ifndef XFillRectangles
+VFUNC(int,XFillRectangles,V_XFillRectangles,_ANSI_ARGS_((Display *, Drawable, GC, XRectangle *, int)))
+#endif /* #ifndef XFillRectangles */
+
+#ifndef XFlush
+VFUNC(int,XFlush,V_XFlush,_ANSI_ARGS_((Display *)))
+#endif /* #ifndef XFlush */
+
+#ifndef XFree
+VFUNC(int,XFree,V_XFree,_ANSI_ARGS_((XFree_arg_t *)))
+#endif /* #ifndef XFree */
+
+#ifndef XFreeColormap
+VFUNC(int,XFreeColormap,V_XFreeColormap,_ANSI_ARGS_((Display *, Colormap)))
+#endif /* #ifndef XFreeColormap */
+
+#ifndef XFreeColors
+VFUNC(int,XFreeColors,V_XFreeColors,_ANSI_ARGS_((Display *, Colormap, long unsigned int *, int, long unsigned int)))
+#endif /* #ifndef XFreeColors */
+
+#ifndef XFreeCursor
+VFUNC(int,XFreeCursor,V_XFreeCursor,_ANSI_ARGS_((Display *, Cursor)))
+#endif /* #ifndef XFreeCursor */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XFreeFont
+VFUNC(int,XFreeFont,V_XFreeFont,_ANSI_ARGS_((Display *, XFontStruct *)))
+#endif /* #ifndef XFreeFont */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XFreeFontNames
+VFUNC(int,XFreeFontNames,V_XFreeFontNames,_ANSI_ARGS_((char **)))
+#endif /* #ifndef XFreeFontNames */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XFreeGC
+VFUNC(int,XFreeGC,V_XFreeGC,_ANSI_ARGS_((Display *, GC)))
+#endif /* #ifndef XFreeGC */
+
+#ifndef XFreeModifiermap
+VFUNC(int,XFreeModifiermap,V_XFreeModifiermap,_ANSI_ARGS_((XModifierKeymap *)))
+#endif /* #ifndef XFreeModifiermap */
+
+#ifndef XGContextFromGC
+VFUNC(GContext,XGContextFromGC,V_XGContextFromGC,_ANSI_ARGS_((GC)))
+#endif /* #ifndef XGContextFromGC */
+
+#ifndef XGetAtomName
+VFUNC(char *,XGetAtomName,V_XGetAtomName,_ANSI_ARGS_((Display *, Atom)))
+#endif /* #ifndef XGetAtomName */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XGetFontProperty
+VFUNC(int,XGetFontProperty,V_XGetFontProperty,_ANSI_ARGS_((XFontStruct *, Atom, long unsigned int *)))
+#endif /* #ifndef XGetFontProperty */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XGetGeometry
+VFUNC(int,XGetGeometry,V_XGetGeometry,_ANSI_ARGS_((Display *, Drawable, Window *, int *, int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *)))
+#endif /* #ifndef XGetGeometry */
+
+#ifndef XGetImage
+VFUNC(XImage *,XGetImage,V_XGetImage,_ANSI_ARGS_((Display *, Drawable, int, int, unsigned int, unsigned int, long unsigned int, int)))
+#endif /* #ifndef XGetImage */
+
+#ifndef XGetInputFocus
+VFUNC(int,XGetInputFocus,V_XGetInputFocus,_ANSI_ARGS_((Display *, Window *, int *)))
+#endif /* #ifndef XGetInputFocus */
+
+#ifndef XGetModifierMapping
+VFUNC(XModifierKeymap *,XGetModifierMapping,V_XGetModifierMapping,_ANSI_ARGS_((Display *)))
+#endif /* #ifndef XGetModifierMapping */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XGetSelectionOwner
+VFUNC(Window,XGetSelectionOwner,V_XGetSelectionOwner,_ANSI_ARGS_((Display *, Atom)))
+#endif /* #ifndef XGetSelectionOwner */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XGetVisualInfo
+VFUNC(XVisualInfo *,XGetVisualInfo,V_XGetVisualInfo,_ANSI_ARGS_((Display *, long int, XVisualInfo *, int *)))
+#endif /* #ifndef XGetVisualInfo */
+
+#ifndef XGetWMColormapWindows
+VFUNC(int,XGetWMColormapWindows,V_XGetWMColormapWindows,_ANSI_ARGS_((Display *, Window, Window **, int *)))
+#endif /* #ifndef XGetWMColormapWindows */
+
+#ifndef XGetWindowAttributes
+VFUNC(int,XGetWindowAttributes,V_XGetWindowAttributes,_ANSI_ARGS_((Display *, Window, XWindowAttributes *)))
+#endif /* #ifndef XGetWindowAttributes */
+
+#ifndef XGetWindowProperty
+VFUNC(int,XGetWindowProperty,V_XGetWindowProperty,_ANSI_ARGS_((Display *, Window, Atom, long int, long int, int, Atom, Atom *, int *, long unsigned int *, long unsigned int *, unsigned char **)))
+#endif /* #ifndef XGetWindowProperty */
+
+#ifndef XGrabKeyboard
+VFUNC(int,XGrabKeyboard,V_XGrabKeyboard,_ANSI_ARGS_((Display *, Window, int, int, int, Time)))
+#endif /* #ifndef XGrabKeyboard */
+
+#ifndef XGrabPointer
+VFUNC(int,XGrabPointer,V_XGrabPointer,_ANSI_ARGS_((Display *, Window, int, unsigned int, int, int, Window, Cursor, Time)))
+#endif /* #ifndef XGrabPointer */
+
+#ifndef XGrabServer
+VFUNC(int,XGrabServer,V_XGrabServer,_ANSI_ARGS_((Display *)))
+#endif /* #ifndef XGrabServer */
+
+#ifndef XIconifyWindow
+VFUNC(int,XIconifyWindow,V_XIconifyWindow,_ANSI_ARGS_((Display *, Window, int)))
+#endif /* #ifndef XIconifyWindow */
+
+#ifndef XInternAtom
+VFUNC(Atom,XInternAtom,V_XInternAtom,_ANSI_ARGS_((Display *, const char *, int)))
+#endif /* #ifndef XInternAtom */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XIntersectRegion
+VFUNC(int,XIntersectRegion,V_XIntersectRegion,_ANSI_ARGS_((Region, Region, Region)))
+#endif /* #ifndef XIntersectRegion */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XKeycodeToKeysym
+VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
+#endif /* #ifndef XKeycodeToKeysym */
+
+#ifndef XKeysymToString
+VFUNC(char *,XKeysymToString,V_XKeysymToString,_ANSI_ARGS_((KeySym)))
+#endif /* #ifndef XKeysymToString */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XListFonts
+VFUNC(char **,XListFonts,V_XListFonts,_ANSI_ARGS_(( Display*, const char *, int, int *)))
+#endif /* #ifndef XListFonts */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XListHosts
+VFUNC(XHostAddress *,XListHosts,V_XListHosts,_ANSI_ARGS_((Display *, int *, int *)))
+#endif /* #ifndef XListHosts */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XListProperties
+VFUNC(Atom *,XListProperties,V_XListProperties,_ANSI_ARGS_((Display *, Window, int *)))
+#endif /* #ifndef XListProperties */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XLoadFont
+VFUNC(Font,XLoadFont,V_XLoadFont,_ANSI_ARGS_((Display *, const char *)))
+#endif /* #ifndef XLoadFont */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XLoadQueryFont
+VFUNC(XFontStruct *,XLoadQueryFont,V_XLoadQueryFont,_ANSI_ARGS_((Display *, const char *)))
+#endif /* #ifndef XLoadQueryFont */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XLookupColor
+VFUNC(int,XLookupColor,V_XLookupColor,_ANSI_ARGS_((Display *, Colormap, const char *, XColor *, XColor *)))
+#endif /* #ifndef XLookupColor */
+
+#ifndef XLookupString
+VFUNC(int,XLookupString,V_XLookupString,_ANSI_ARGS_((XKeyEvent *, char *, int, KeySym *, XComposeStatus *)))
+#endif /* #ifndef XLookupString */
+
+#ifndef XLowerWindow
+VFUNC(int,XLowerWindow,V_XLowerWindow,_ANSI_ARGS_((Display *, Window)))
+#endif /* #ifndef XLowerWindow */
+
+#ifndef XMapWindow
+VFUNC(int,XMapWindow,V_XMapWindow,_ANSI_ARGS_((Display *, Window)))
+#endif /* #ifndef XMapWindow */
+
+#ifndef XMoveResizeWindow
+VFUNC(int,XMoveResizeWindow,V_XMoveResizeWindow,_ANSI_ARGS_((Display *, Window, int, int, unsigned int, unsigned int)))
+#endif /* #ifndef XMoveResizeWindow */
+
+#ifndef XMoveWindow
+VFUNC(int,XMoveWindow,V_XMoveWindow,_ANSI_ARGS_((Display *, Window, int, int)))
+#endif /* #ifndef XMoveWindow */
+
+#ifndef XNextEvent
+VFUNC(int,XNextEvent,V_XNextEvent,_ANSI_ARGS_((Display *, XEvent *)))
+#endif /* #ifndef XNextEvent */
+
+#ifndef XNoOp
+VFUNC(int,XNoOp,V_XNoOp,_ANSI_ARGS_((Display *)))
+#endif /* #ifndef XNoOp */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XOpenDisplay
+VFUNC(Display *,XOpenDisplay,V_XOpenDisplay,_ANSI_ARGS_((const char *)))
+#endif /* #ifndef XOpenDisplay */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XParseColor
+VFUNC(int,XParseColor,V_XParseColor,_ANSI_ARGS_((Display *, Colormap, const char *, XColor *)))
+#endif /* #ifndef XParseColor */
+
+#ifndef XPutBackEvent
+VFUNC(int,XPutBackEvent,V_XPutBackEvent,_ANSI_ARGS_((Display *, XEvent *)))
+#endif /* #ifndef XPutBackEvent */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XPutImage
+VFUNC(int,XPutImage,V_XPutImage,_ANSI_ARGS_((Display *, Drawable, GC, XImage *, int, int, int, int, unsigned int, unsigned int)))
+#endif /* #ifndef XPutImage */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XQueryColors
+VFUNC(int,XQueryColors,V_XQueryColors,_ANSI_ARGS_((Display *, Colormap, XColor *, int)))
+#endif /* #ifndef XQueryColors */
+
+#ifndef XQueryPointer
+VFUNC(int,XQueryPointer,V_XQueryPointer,_ANSI_ARGS_((Display *, Window, Window *, Window *, int *, int *, int *, int *, unsigned int *)))
+#endif /* #ifndef XQueryPointer */
+
+#ifndef XQueryTree
+VFUNC(int,XQueryTree,V_XQueryTree,_ANSI_ARGS_((Display *, Window, Window *, Window *, Window **, unsigned int *)))
+#endif /* #ifndef XQueryTree */
+
+#ifndef XRaiseWindow
+VFUNC(int,XRaiseWindow,V_XRaiseWindow,_ANSI_ARGS_((Display *, Window)))
+#endif /* #ifndef XRaiseWindow */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XReadBitmapFile
+VFUNC(int,XReadBitmapFile,V_XReadBitmapFile,_ANSI_ARGS_((Display *, Drawable, const char *, unsigned int *, unsigned int *, Pixmap *, int *, int *)))
+#endif /* #ifndef XReadBitmapFile */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XRectInRegion
+VFUNC(int,XRectInRegion,V_XRectInRegion,_ANSI_ARGS_((Region,int,int,unsigned,unsigned)))
+#endif /* #ifndef XRectInRegion */
+
+#ifndef XRefreshKeyboardMapping
+VFUNC(int,XRefreshKeyboardMapping,V_XRefreshKeyboardMapping,_ANSI_ARGS_((XMappingEvent *)))
+#endif /* #ifndef XRefreshKeyboardMapping */
+
+#ifndef XResizeWindow
+VFUNC(int,XResizeWindow,V_XResizeWindow,_ANSI_ARGS_((Display *, Window, unsigned int, unsigned int)))
+#endif /* #ifndef XResizeWindow */
+
+#ifndef XRootWindow
+VFUNC(Window,XRootWindow,V_XRootWindow,_ANSI_ARGS_((Display *, int)))
+#endif /* #ifndef XRootWindow */
+
+#ifndef XSelectInput
+VFUNC(int,XSelectInput,V_XSelectInput,_ANSI_ARGS_((Display *, Window, long int)))
+#endif /* #ifndef XSelectInput */
+
+#ifndef XSendEvent
+VFUNC(int,XSendEvent,V_XSendEvent,_ANSI_ARGS_((Display *, Window, int, long int, XEvent *)))
+#endif /* #ifndef XSendEvent */
+
+#ifndef XSetBackground
+VFUNC(int,XSetBackground,V_XSetBackground,_ANSI_ARGS_((Display *, GC, unsigned long)))
+#endif /* #ifndef XSetBackground */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetClassHint
+VFUNC(int,XSetClassHint,V_XSetClassHint,_ANSI_ARGS_((Display *, Window, XClassHint *)))
+#endif /* #ifndef XSetClassHint */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetClipMask
+VFUNC(int,XSetClipMask,V_XSetClipMask,_ANSI_ARGS_((Display *, GC, Pixmap)))
+#endif /* #ifndef XSetClipMask */
+
+#ifndef XSetClipOrigin
+VFUNC(int,XSetClipOrigin,V_XSetClipOrigin,_ANSI_ARGS_((Display *, GC, int, int)))
+#endif /* #ifndef XSetClipOrigin */
+
+#ifndef XSetCommand
+VFUNC(int,XSetCommand,V_XSetCommand,_ANSI_ARGS_((Display *, Window, char **, int)))
+#endif /* #ifndef XSetCommand */
+
+#ifndef XSetDashes
+VFUNC(int,XSetDashes,V_XSetDashes,_ANSI_ARGS_((Display *, GC, int, const char *, int)))
+#endif /* #ifndef XSetDashes */
+
+#ifndef XSetErrorHandler
+VFUNC(XErrorHandler,XSetErrorHandler,V_XSetErrorHandler,_ANSI_ARGS_((XErrorHandler)))
+#endif /* #ifndef XSetErrorHandler */
+
+#ifndef XSetForeground
+VFUNC(int,XSetForeground,V_XSetForeground,_ANSI_ARGS_((Display *, GC, long unsigned int)))
+#endif /* #ifndef XSetForeground */
+
+#ifndef XSetIconName
+VFUNC(int,XSetIconName,V_XSetIconName,_ANSI_ARGS_((Display *, Window, const char *)))
+#endif /* #ifndef XSetIconName */
+
+#ifndef XSetInputFocus
+VFUNC(int,XSetInputFocus,V_XSetInputFocus,_ANSI_ARGS_((Display *, Window, int, Time)))
+#endif /* #ifndef XSetInputFocus */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetRegion
+VFUNC(int,XSetRegion,V_XSetRegion,_ANSI_ARGS_((Display *, GC, Region)))
+#endif /* #ifndef XSetRegion */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetSelectionOwner
+VFUNC(int,XSetSelectionOwner,V_XSetSelectionOwner,_ANSI_ARGS_((Display *, Atom, Window, Time)))
+#endif /* #ifndef XSetSelectionOwner */
+
+#ifndef XSetTSOrigin
+VFUNC(int,XSetTSOrigin,V_XSetTSOrigin,_ANSI_ARGS_((Display *, GC, int, int)))
+#endif /* #ifndef XSetTSOrigin */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetTransientForHint
+VFUNC(int,XSetTransientForHint,V_XSetTransientForHint,_ANSI_ARGS_((Display *, Window, Window)))
+#endif /* #ifndef XSetTransientForHint */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetWMClientMachine
+VFUNC(void,XSetWMClientMachine,V_XSetWMClientMachine,_ANSI_ARGS_((Display *, Window, XTextProperty *)))
+#endif /* #ifndef XSetWMClientMachine */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMColormapWindows
+VFUNC(int,XSetWMColormapWindows,V_XSetWMColormapWindows,_ANSI_ARGS_((Display *, Window, Window *, int)))
+#endif /* #ifndef XSetWMColormapWindows */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMHints
+VFUNC(int,XSetWMHints,V_XSetWMHints,_ANSI_ARGS_((Display *, Window, XWMHints *)))
+#endif /* #ifndef XSetWMHints */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMName
+VFUNC(void,XSetWMName,V_XSetWMName,_ANSI_ARGS_((Display *, Window, XTextProperty *)))
+#endif /* #ifndef XSetWMName */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XSetWMNormalHints
+VFUNC(void,XSetWMNormalHints,V_XSetWMNormalHints,_ANSI_ARGS_((Display *, Window, XSizeHints *)))
+#endif /* #ifndef XSetWMNormalHints */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XSetWindowBackground
+VFUNC(int,XSetWindowBackground,V_XSetWindowBackground,_ANSI_ARGS_((Display *, Window, long unsigned int)))
+#endif /* #ifndef XSetWindowBackground */
+
+#ifndef XSetWindowBackgroundPixmap
+VFUNC(int,XSetWindowBackgroundPixmap,V_XSetWindowBackgroundPixmap,_ANSI_ARGS_((Display *, Window, Pixmap)))
+#endif /* #ifndef XSetWindowBackgroundPixmap */
+
+#ifndef XSetWindowBorder
+VFUNC(int,XSetWindowBorder,V_XSetWindowBorder,_ANSI_ARGS_((Display *, Window, long unsigned int)))
+#endif /* #ifndef XSetWindowBorder */
+
+#ifndef XSetWindowBorderPixmap
+VFUNC(int,XSetWindowBorderPixmap,V_XSetWindowBorderPixmap,_ANSI_ARGS_((Display *, Window, Pixmap)))
+#endif /* #ifndef XSetWindowBorderPixmap */
+
+#ifndef XSetWindowBorderWidth
+VFUNC(int,XSetWindowBorderWidth,V_XSetWindowBorderWidth,_ANSI_ARGS_((Display *, Window, unsigned int)))
+#endif /* #ifndef XSetWindowBorderWidth */
+
+#ifndef XSetWindowColormap
+VFUNC(int,XSetWindowColormap,V_XSetWindowColormap,_ANSI_ARGS_((Display *, Window, Colormap)))
+#endif /* #ifndef XSetWindowColormap */
+
+#ifndef XStringListToTextProperty
+VFUNC(int,XStringListToTextProperty,V_XStringListToTextProperty,_ANSI_ARGS_((char **, int, XTextProperty *)))
+#endif /* #ifndef XStringListToTextProperty */
+
+#ifndef XStringToKeysym
+VFUNC(KeySym,XStringToKeysym,V_XStringToKeysym,_ANSI_ARGS_((const char *)))
+#endif /* #ifndef XStringToKeysym */
+
+#ifndef XSubtractRegion
+VFUNC(int,XSubtractRegion,V_XSubtractRegion,_ANSI_ARGS_((Region, Region, Region)))
+#endif /* #ifndef XSubtractRegion */
+
+#ifndef XSync
+VFUNC(int,XSync,V_XSync,_ANSI_ARGS_((Display *, int)))
+#endif /* #ifndef XSync */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XTextExtents
+VFUNC(int,XTextExtents,V_XTextExtents,_ANSI_ARGS_((XFontStruct *, const char *, int, int *, int *, int *, XCharStruct *)))
+#endif /* #ifndef XTextExtents */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XTextWidth
+VFUNC(int,XTextWidth,V_XTextWidth,_ANSI_ARGS_((XFontStruct *, const char *, int)))
+#endif /* #ifndef XTextWidth */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XTranslateCoordinates
+VFUNC(int,XTranslateCoordinates,V_XTranslateCoordinates,_ANSI_ARGS_((Display *, Window, Window, int, int, int *, int *, Window *)))
+#endif /* #ifndef XTranslateCoordinates */
+
+#ifndef XUngrabKeyboard
+VFUNC(int,XUngrabKeyboard,V_XUngrabKeyboard,_ANSI_ARGS_((Display *, Time)))
+#endif /* #ifndef XUngrabKeyboard */
+
+#ifndef XUngrabPointer
+VFUNC(int,XUngrabPointer,V_XUngrabPointer,_ANSI_ARGS_((Display *, Time)))
+#endif /* #ifndef XUngrabPointer */
+
+#ifndef XUngrabServer
+VFUNC(int,XUngrabServer,V_XUngrabServer,_ANSI_ARGS_((Display *)))
+#endif /* #ifndef XUngrabServer */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XUnionRectWithRegion
+VFUNC(int,XUnionRectWithRegion,V_XUnionRectWithRegion,_ANSI_ARGS_((XRectangle *, Region, Region)))
+#endif /* #ifndef XUnionRectWithRegion */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XUnmapWindow
+VFUNC(int,XUnmapWindow,V_XUnmapWindow,_ANSI_ARGS_((Display *, Window)))
+#endif /* #ifndef XUnmapWindow */
+
+#ifndef XVisualIDFromVisual
+VFUNC(VisualID,XVisualIDFromVisual,V_XVisualIDFromVisual,_ANSI_ARGS_((Visual *)))
+#endif /* #ifndef XVisualIDFromVisual */
+
+#ifndef DO_X_EXCLUDE
+#ifndef XWarpPointer
+VFUNC(int,XWarpPointer,V_XWarpPointer,_ANSI_ARGS_(( Display *, Window, Window, int, int, unsigned int, unsigned int, int, int )))
+#endif /* #ifndef XWarpPointer */
+#endif /* !DO_X_EXCLUDE */
+
+#ifndef XWindowEvent
+VFUNC(int,XWindowEvent,V_XWindowEvent,_ANSI_ARGS_((Display *, Window, long int, XEvent *)))
+#endif /* #ifndef XWindowEvent */
+
+#ifndef XWithdrawWindow
+VFUNC(int,XWithdrawWindow,V_XWithdrawWindow,_ANSI_ARGS_((Display *, Window, int)))
+#endif /* #ifndef XWithdrawWindow */
+
+#ifndef _XInitImageFuncPtrs
+VFUNC(int,_XInitImageFuncPtrs,V__XInitImageFuncPtrs,_ANSI_ARGS_((XImage *image)))
+#endif /* #ifndef _XInitImageFuncPtrs */
+
+#endif /* _XLIB */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib_f.h
new file mode 100644
index 00000000000..6c0c3773961
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/Xlib_f.h
@@ -0,0 +1,14 @@
+#ifndef XLIB_VT
+#define XLIB_VT
+typedef struct XlibVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "Xlib.t"
+#undef VFUNC
+#undef VVAR
+} XlibVtab;
+extern XlibVtab *XlibVptr;
+extern XlibVtab *XlibVGet(void);
+#endif /* XLIB_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/compat/limits.h b/Master/tlpkg/tlperl/lib/Tk/pTk/compat/limits.h
new file mode 100644
index 00000000000..66eb54256cf
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/compat/limits.h
@@ -0,0 +1,22 @@
+/*
+ * limits.h --
+ *
+ * This is a dummy header file to #include in Tcl when there
+ * is no limits.h in /usr/include. There are only a few
+ * definitions here; also see tclPort.h, which already
+ * #defines some of the things here if they're not arleady
+ * defined.
+ *
+ * Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) limits.h 1.7 96/02/15 14:43:55
+ */
+
+#define LONG_MIN 0x80000000
+#define LONG_MAX 0x7fffffff
+#define INT_MIN 0x80000000
+#define INT_MAX 0x7fffffff
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/compat/stdlib.h b/Master/tlpkg/tlperl/lib/Tk/pTk/compat/stdlib.h
new file mode 100644
index 00000000000..548f880a19a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/compat/stdlib.h
@@ -0,0 +1,45 @@
+/*
+ * stdlib.h --
+ *
+ * Declares facilities exported by the "stdlib" portion of
+ * the C library. This file isn't complete in the ANSI-C
+ * sense; it only declares things that are needed by Tcl.
+ * This file is needed even on many systems with their own
+ * stdlib.h (e.g. SunOS) because not all stdlib.h files
+ * declare all the procedures needed here (such as strtod).
+ *
+ * Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * @(#) stdlib.h 1.9 94/12/17 16:26:20
+ */
+
+#ifndef _STDLIB
+#define _STDLIB
+
+#include <Lang.h>
+
+extern void abort _ANSI_ARGS_((void));
+extern double atof _ANSI_ARGS_((CONST char *string));
+extern int atoi _ANSI_ARGS_((CONST char *string));
+extern long atol _ANSI_ARGS_((CONST char *string));
+extern char * calloc _ANSI_ARGS_((unsigned int numElements,
+ unsigned int size));
+extern void exit _ANSI_ARGS_((int status));
+extern int free _ANSI_ARGS_((char *blockPtr));
+extern char * getenv _ANSI_ARGS_((CONST char *name));
+extern char * malloc _ANSI_ARGS_((unsigned int numBytes));
+extern void qsort _ANSI_ARGS_((VOID *base, int n, int size,
+ int (*compar)(CONST VOID *element1, CONST VOID
+ *element2)));
+extern char * realloc _ANSI_ARGS_((char *ptr, unsigned int numBytes));
+extern double strtod _ANSI_ARGS_((CONST char *string, char **endPtr));
+extern long strtol _ANSI_ARGS_((CONST char *string, char **endPtr,
+ int base));
+extern unsigned long strtoul _ANSI_ARGS_((CONST char *string,
+ char **endPtr, int base));
+
+#endif /* _STDLIB */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/compat/unistd.h b/Master/tlpkg/tlperl/lib/Tk/pTk/compat/unistd.h
new file mode 100644
index 00000000000..47717e0278c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/compat/unistd.h
@@ -0,0 +1,87 @@
+/*
+ * unistd.h --
+ *
+ * Macros, CONSTants and prototypes for Posix conformance.
+ *
+ * Copyright 1989 Regents of the University of California
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies. The University of California
+ * makes no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ *
+ * $Header: /home/auspex6/CVSROOT/tcl/compat/unistd.h,v 1.1.1.1 1993/11/29 10:44:47 a904209 Exp $
+ */
+
+#ifndef _UNISTD
+#define _UNISTD
+
+#include <sys/types.h>
+#ifndef _TCL
+# include "../Lang.h"
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef LSEEK_TYPE
+#define LSEEK_TYPE long
+#endif
+
+/*
+ * Strict POSIX stuff goes here. Extensions go down below, in the
+ * ifndef _POSIX_SOURCE section.
+ */
+
+extern void _exit _ANSI_ARGS_((int status));
+extern int access _ANSI_ARGS_((CONST char *path, int mode));
+extern int chdir _ANSI_ARGS_((CONST char *path));
+extern int chown _ANSI_ARGS_((CONST char *path, uid_t owner, gid_t group));
+extern int close _ANSI_ARGS_((int fd));
+extern int dup _ANSI_ARGS_((int oldfd));
+extern int dup2 _ANSI_ARGS_((int oldfd, int newfd));
+extern int execl _ANSI_ARGS_((CONST char *path, ...));
+extern int execle _ANSI_ARGS_((CONST char *path, ...));
+extern int execlp _ANSI_ARGS_((CONST char *file, ...));
+extern int execv _ANSI_ARGS_((CONST char *path, char **argv));
+extern int execve _ANSI_ARGS_((CONST char *path, char **argv, char **envp));
+extern int execvp _ANSI_ARGS_((CONST char *file, char **argv));
+extern pid_t fork _ANSI_ARGS_((void));
+extern char *getcwd _ANSI_ARGS_((char *buf, size_t size));
+extern gid_t getegid _ANSI_ARGS_((void));
+extern uid_t geteuid _ANSI_ARGS_((void));
+extern gid_t getgid _ANSI_ARGS_((void));
+extern int getgroups _ANSI_ARGS_((int bufSize, int *buffer));
+extern pid_t getpid _ANSI_ARGS_((void));
+extern uid_t getuid _ANSI_ARGS_((void));
+extern int isatty _ANSI_ARGS_((int fd));
+extern long lseek _ANSI_ARGS_((int fd, LSEEK_TYPE offset, int whence));
+extern int pipe _ANSI_ARGS_((int *fildes));
+extern int read _ANSI_ARGS_((int fd, char *buf, size_t size));
+extern int setgid _ANSI_ARGS_((gid_t group));
+extern int setuid _ANSI_ARGS_((uid_t user));
+extern unsigned sleep _ANSI_ARGS_ ((unsigned seconds));
+extern char *ttyname _ANSI_ARGS_((int fd));
+extern int unlink _ANSI_ARGS_((CONST char *path));
+extern int write _ANSI_ARGS_((int fd, CONST char *buf, size_t size));
+
+#ifndef _POSIX_SOURCE
+extern char *crypt _ANSI_ARGS_((CONST char *, CONST char *));
+extern int fchown _ANSI_ARGS_((int fd, uid_t owner, gid_t group));
+extern int flock _ANSI_ARGS_((int fd, int operation));
+extern int ftruncate _ANSI_ARGS_((int fd, unsigned long length));
+extern int readlink _ANSI_ARGS_((CONST char *path, char *buf, int bufsize));
+extern int setegid _ANSI_ARGS_((gid_t group));
+extern int seteuid _ANSI_ARGS_((uid_t user));
+extern int setreuid _ANSI_ARGS_((int ruid, int euid));
+extern int symlink _ANSI_ARGS_((CONST char *, CONST char *));
+extern int ttyslot _ANSI_ARGS_((void));
+extern int truncate _ANSI_ARGS_((CONST char *path, unsigned long length));
+extern int vfork _ANSI_ARGS_((void));
+#endif /* _POSIX_SOURCE */
+
+#endif /* _UNISTD */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/default.h b/Master/tlpkg/tlperl/lib/Tk/pTk/default.h
new file mode 100644
index 00000000000..5f7f24d546e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/default.h
@@ -0,0 +1,36 @@
+/*
+ * default.h --
+ *
+ * This file defines the defaults for all options for all of
+ * the Tk widgets.
+ *
+ * Copyright (c) 1991-1994 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: default.h,v 1.4 2002/08/31 06:12:19 das Exp $
+ */
+
+#ifndef _DEFAULT
+#define _DEFAULT
+
+#if defined(__WIN32__) || defined(_WIN32) || \
+ (defined(__CYGWIN__) && !defined(WINARCH_X)) || defined(__MINGW32__)
+# include "tkWinDefault.h"
+#else
+# if defined(MAC_OSX_TK)
+# include "tkMacOSXDefault.h"
+# elif defined(MAC_TCL)
+# include "tkMacDefault.h"
+# else
+# ifdef __PM__
+# include "tkOS2Default.h"
+# else
+# include "tkUnixDefault.h"
+# endif
+# endif
+#endif
+
+#endif /* _DEFAULT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/img.h b/Master/tlpkg/tlperl/lib/Tk/pTk/img.h
new file mode 100644
index 00000000000..a1b38a7ebd8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/img.h
@@ -0,0 +1,41 @@
+/* img.h */
+
+#ifndef _IMG
+#define _IMG
+
+#include "Lang.h"
+#include "tk.h"
+
+#define IMG_MAJOR_VERSION 1
+#define IMG_MINOR_VERSION 2
+#define IMG_RELEASE_LEVEL 1
+#define IMG_RELEASE_SERIAL 2
+
+#define IMG_VERSION "1.2"
+#define IMG_PATCH_LEVEL "1.2.4"
+
+#ifndef RESOURCE_INCLUDED
+
+#if defined(__WIN32__)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# undef WIN32_LEAN_AND_MEAN
+# if defined(_MSC_VER)
+# define EXPORT(a,b) __declspec(dllexport) a b
+# else
+# if defined(__BORLANDC__)
+# define EXPORT(a,b) a _export b
+# else
+# define EXPORT(a,b) a b
+# endif
+# endif
+#else
+# define EXPORT(a,b) a b
+#endif
+
+EXTERN EXPORT(int,Img_Init) _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN EXPORT(int,Img_SafeInit) _ANSI_ARGS_((Tcl_Interp *interp));
+
+#endif /* RESOURCE_INCLUDED */
+
+#endif /* _IMG */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.h b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.h
new file mode 100644
index 00000000000..8cca12aa095
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.h
@@ -0,0 +1,75 @@
+/* imgInt.h */
+
+#ifndef _IMGINT
+#define _IMGINT
+
+#include "tkInt.h"
+
+#ifndef RESOURCE_INCLUDED
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#include "img.h"
+
+typedef struct {
+ Tcl_DString *buffer;/* pointer to dynamical string */
+ char *data; /* mmencoded source string */
+ int c; /* bits left over from previous char */
+ int state; /* decoder state (0-4 or IMG_DONE) */
+ int length; /* length of phisical line already written */
+} MFile;
+
+#define IMG_SPECIAL (1<<8)
+#define IMG_PAD (IMG_SPECIAL+1)
+#define IMG_SPACE (IMG_SPECIAL+2)
+#define IMG_BAD (IMG_SPECIAL+3)
+#define IMG_DONE (IMG_SPECIAL+4)
+#define IMG_CHAN (IMG_SPECIAL+5)
+#define IMG_STRING (IMG_SPECIAL+6)
+
+#define IMG_TCL (1<<9)
+#define IMG_OBJS (1<<10)
+#define IMG_PERL (1<<11)
+#define IMG_UTF (1<<12)
+
+EXTERN int ImgPhotoPutBlock _ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height));
+
+EXTERN int ImgLoadLib _ANSI_ARGS_((Tcl_Interp *interp, CONST char *libName,
+ VOID **handlePtr, char **symbols, int num));
+EXTERN void ImgLoadFailed _ANSI_ARGS_((VOID **handlePtr));
+
+EXTERN int ImgObjInit _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN char *ImgGetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
+ int *lengthPtr));
+EXTERN char *ImgGetByteArrayFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
+ int *lengthPtr));
+EXTERN int ImgListObjGetElements _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *objPtr, int *argc, Tcl_Obj ***objv));
+
+EXTERN int ImgGetc _ANSI_ARGS_((MFile *handle));
+EXTERN int ImgRead _ANSI_ARGS_((MFile *handle, char *dst, int count));
+EXTERN int ImgPutc _ANSI_ARGS_((int c, MFile *handle));
+EXTERN int ImgWrite _ANSI_ARGS_((MFile *handle, CONST char *src, int count));
+EXTERN void ImgWriteInit _ANSI_ARGS_((Tcl_DString *buffer, MFile *handle));
+EXTERN int ImgReadInit _ANSI_ARGS_((Tcl_Obj *data, int c, MFile *handle));
+EXTERN Tcl_Channel ImgOpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *fileName, int permissions));
+EXTERN void ImgFixChanMatchProc _ANSI_ARGS_((Tcl_Interp **interp, Tcl_Channel *chan,
+ Tcl_Obj **file, Tcl_Obj **format, int **width, int **height));
+EXTERN void ImgFixObjMatchProc _ANSI_ARGS_((Tcl_Interp **interp, Tcl_Obj **data,
+ Tcl_Obj **format, int **width, int **height));
+EXTERN void ImgFixStringWriteProc _ANSI_ARGS_((Tcl_DString *data, Tcl_Interp **interp,
+ Tcl_DString **dataPtr, Tcl_Obj **format, Tk_PhotoImageBlock **blockPtr));
+
+EXTERN int ImgInitTIFFzip _ANSI_ARGS_((VOID *, int));
+EXTERN int ImgInitTIFFjpeg _ANSI_ARGS_((VOID *, int));
+EXTERN int ImgInitTIFFpixar _ANSI_ARGS_((VOID *, int));
+EXTERN int ImgLoadJpegLibrary _ANSI_ARGS_((void));
+
+#endif /* RESOURCE_INCLUDED */
+
+#endif /* _IMGINT */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.m b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.m
new file mode 100644
index 00000000000..0ac6a144b4b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.m
@@ -0,0 +1,62 @@
+#ifndef _IMGINT_VM
+#define _IMGINT_VM
+#include "imgInt_f.h"
+#ifndef NO_VTABLES
+#ifndef ImgFixChanMatchProc
+# define ImgFixChanMatchProc (*ImgintVptr->V_ImgFixChanMatchProc)
+#endif
+
+#ifndef ImgFixObjMatchProc
+# define ImgFixObjMatchProc (*ImgintVptr->V_ImgFixObjMatchProc)
+#endif
+
+#ifndef ImgFixStringWriteProc
+# define ImgFixStringWriteProc (*ImgintVptr->V_ImgFixStringWriteProc)
+#endif
+
+#ifndef ImgGetByteArrayFromObj
+# define ImgGetByteArrayFromObj (*ImgintVptr->V_ImgGetByteArrayFromObj)
+#endif
+
+#ifndef ImgGetc
+# define ImgGetc (*ImgintVptr->V_ImgGetc)
+#endif
+
+#ifndef ImgListObjGetElements
+# define ImgListObjGetElements (*ImgintVptr->V_ImgListObjGetElements)
+#endif
+
+#ifndef ImgObjInit
+# define ImgObjInit (*ImgintVptr->V_ImgObjInit)
+#endif
+
+#ifndef ImgOpenFileChannel
+# define ImgOpenFileChannel (*ImgintVptr->V_ImgOpenFileChannel)
+#endif
+
+#ifndef ImgPhotoPutBlock
+# define ImgPhotoPutBlock (*ImgintVptr->V_ImgPhotoPutBlock)
+#endif
+
+#ifndef ImgPutc
+# define ImgPutc (*ImgintVptr->V_ImgPutc)
+#endif
+
+#ifndef ImgRead
+# define ImgRead (*ImgintVptr->V_ImgRead)
+#endif
+
+#ifndef ImgReadInit
+# define ImgReadInit (*ImgintVptr->V_ImgReadInit)
+#endif
+
+#ifndef ImgWrite
+# define ImgWrite (*ImgintVptr->V_ImgWrite)
+#endif
+
+#ifndef ImgWriteInit
+# define ImgWriteInit (*ImgintVptr->V_ImgWriteInit)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _IMGINT_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.t b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.t
new file mode 100644
index 00000000000..6f20d9a332b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt.t
@@ -0,0 +1,93 @@
+#ifdef _IMGINT
+#ifndef ImgFixChanMatchProc
+#ifndef RESOURCE_INCLUDED
+VFUNC(void,ImgFixChanMatchProc,V_ImgFixChanMatchProc,_ANSI_ARGS_((Tcl_Interp **interp, Tcl_Channel *chan,
+ Tcl_Obj **file, Tcl_Obj **format, int **width, int **height)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgFixChanMatchProc */
+
+#ifndef ImgFixObjMatchProc
+#ifndef RESOURCE_INCLUDED
+VFUNC(void,ImgFixObjMatchProc,V_ImgFixObjMatchProc,_ANSI_ARGS_((Tcl_Interp **interp, Tcl_Obj **data,
+ Tcl_Obj **format, int **width, int **height)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgFixObjMatchProc */
+
+#ifndef ImgFixStringWriteProc
+#ifndef RESOURCE_INCLUDED
+VFUNC(void,ImgFixStringWriteProc,V_ImgFixStringWriteProc,_ANSI_ARGS_((Tcl_DString *data, Tcl_Interp **interp,
+ Tcl_DString **dataPtr, Tcl_Obj **format, Tk_PhotoImageBlock **blockPtr)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgFixStringWriteProc */
+
+#ifndef ImgGetByteArrayFromObj
+#ifndef RESOURCE_INCLUDED
+VFUNC(char *,ImgGetByteArrayFromObj,V_ImgGetByteArrayFromObj,_ANSI_ARGS_((Tcl_Obj *objPtr,
+ int *lengthPtr)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgGetByteArrayFromObj */
+
+#ifndef ImgGetc
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgGetc,V_ImgGetc,_ANSI_ARGS_((MFile *handle)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgGetc */
+
+#ifndef ImgListObjGetElements
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgListObjGetElements,V_ImgListObjGetElements,_ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *objPtr, int *argc, Tcl_Obj ***objv)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgListObjGetElements */
+
+#ifndef ImgObjInit
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgObjInit,V_ImgObjInit,_ANSI_ARGS_((Tcl_Interp *interp)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgObjInit */
+
+#ifndef ImgOpenFileChannel
+#ifndef RESOURCE_INCLUDED
+VFUNC(Tcl_Channel,ImgOpenFileChannel,V_ImgOpenFileChannel,_ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *fileName, int permissions)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgOpenFileChannel */
+
+#ifndef ImgPhotoPutBlock
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgPhotoPutBlock,V_ImgPhotoPutBlock,_ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgPhotoPutBlock */
+
+#ifndef ImgPutc
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgPutc,V_ImgPutc,_ANSI_ARGS_((int c, MFile *handle)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgPutc */
+
+#ifndef ImgRead
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgRead,V_ImgRead,_ANSI_ARGS_((MFile *handle, char *dst, int count)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgRead */
+
+#ifndef ImgReadInit
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgReadInit,V_ImgReadInit,_ANSI_ARGS_((Tcl_Obj *data, int c, MFile *handle)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgReadInit */
+
+#ifndef ImgWrite
+#ifndef RESOURCE_INCLUDED
+VFUNC(int,ImgWrite,V_ImgWrite,_ANSI_ARGS_((MFile *handle, CONST char *src, int count)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgWrite */
+
+#ifndef ImgWriteInit
+#ifndef RESOURCE_INCLUDED
+VFUNC(void,ImgWriteInit,V_ImgWriteInit,_ANSI_ARGS_((Tcl_DString *buffer, MFile *handle)))
+#endif /* #ifndef RESOURCE_INCLUDED */
+#endif /* #ifndef ImgWriteInit */
+
+#endif /* _IMGINT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt_f.h
new file mode 100644
index 00000000000..4e05f81a81c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/imgInt_f.h
@@ -0,0 +1,14 @@
+#ifndef IMGINT_VT
+#define IMGINT_VT
+typedef struct ImgintVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "imgInt.t"
+#undef VFUNC
+#undef VVAR
+} ImgintVtab;
+extern ImgintVtab *ImgintVptr;
+extern ImgintVtab *ImgintVGet(void);
+#endif /* IMGINT_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/ks_names.h b/Master/tlpkg/tlperl/lib/Tk/pTk/ks_names.h
new file mode 100644
index 00000000000..e0622ae7319
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/ks_names.h
@@ -0,0 +1,925 @@
+/*
+ * This file is generated from $(INCLUDESRC)/keysymdef.h. Do not edit.
+ * RCS: $Id: ks_names.h,v 1.4 2000/04/15 00:33:08 ericm Exp $
+ */
+{ "BackSpace", 0xFF08 },
+{ "Tab", 0xFF09 },
+{ "Linefeed", 0xFF0A },
+{ "Clear", 0xFF0B },
+{ "Return", 0xFF0D },
+{ "Pause", 0xFF13 },
+{ "Scroll_Lock", 0xFF14 },
+{ "Sys_Req", 0xFF15 },
+{ "Escape", 0xFF1B },
+{ "Delete", 0xFFFF },
+{ "Multi_key", 0xFF20 },
+{ "Kanji", 0xFF21 },
+{ "Home", 0xFF50 },
+{ "Left", 0xFF51 },
+{ "Up", 0xFF52 },
+{ "Right", 0xFF53 },
+{ "Down", 0xFF54 },
+{ "Prior", 0xFF55 },
+{ "Next", 0xFF56 },
+{ "End", 0xFF57 },
+{ "Begin", 0xFF58 },
+{ "Win_L", 0xFF5B },
+{ "Win_R", 0xFF5C },
+{ "App", 0xFF5D },
+{ "Select", 0xFF60 },
+{ "Print", 0xFF61 },
+{ "Execute", 0xFF62 },
+{ "Insert", 0xFF63 },
+{ "Undo", 0xFF65 },
+{ "Redo", 0xFF66 },
+{ "Menu", 0xFF67 },
+{ "Find", 0xFF68 },
+{ "Cancel", 0xFF69 },
+{ "Help", 0xFF6A },
+{ "Break", 0xFF6B },
+{ "Mode_switch", 0xFF7E },
+{ "script_switch", 0xFF7E },
+{ "Num_Lock", 0xFF7F },
+{ "KP_Space", 0xFF80 },
+{ "KP_Tab", 0xFF89 },
+{ "KP_Enter", 0xFF8D },
+{ "KP_F1", 0xFF91 },
+{ "KP_F2", 0xFF92 },
+{ "KP_F3", 0xFF93 },
+{ "KP_F4", 0xFF94 },
+{ "KP_Equal", 0xFFBD },
+{ "KP_Multiply", 0xFFAA },
+{ "KP_Add", 0xFFAB },
+{ "KP_Separator", 0xFFAC },
+{ "KP_Subtract", 0xFFAD },
+{ "KP_Decimal", 0xFFAE },
+{ "KP_Divide", 0xFFAF },
+{ "KP_0", 0xFFB0 },
+{ "KP_1", 0xFFB1 },
+{ "KP_2", 0xFFB2 },
+{ "KP_3", 0xFFB3 },
+{ "KP_4", 0xFFB4 },
+{ "KP_5", 0xFFB5 },
+{ "KP_6", 0xFFB6 },
+{ "KP_7", 0xFFB7 },
+{ "KP_8", 0xFFB8 },
+{ "KP_9", 0xFFB9 },
+{ "F1", 0xFFBE },
+{ "F2", 0xFFBF },
+{ "F3", 0xFFC0 },
+{ "F4", 0xFFC1 },
+{ "F5", 0xFFC2 },
+{ "F6", 0xFFC3 },
+{ "F7", 0xFFC4 },
+{ "F8", 0xFFC5 },
+{ "F9", 0xFFC6 },
+{ "F10", 0xFFC7 },
+{ "F11", 0xFFC8 },
+{ "L1", 0xFFC8 },
+{ "F12", 0xFFC9 },
+{ "L2", 0xFFC9 },
+{ "F13", 0xFFCA },
+{ "L3", 0xFFCA },
+{ "F14", 0xFFCB },
+{ "L4", 0xFFCB },
+{ "F15", 0xFFCC },
+{ "L5", 0xFFCC },
+{ "F16", 0xFFCD },
+{ "L6", 0xFFCD },
+{ "F17", 0xFFCE },
+{ "L7", 0xFFCE },
+{ "F18", 0xFFCF },
+{ "L8", 0xFFCF },
+{ "F19", 0xFFD0 },
+{ "L9", 0xFFD0 },
+{ "F20", 0xFFD1 },
+{ "L10", 0xFFD1 },
+{ "F21", 0xFFD2 },
+{ "R1", 0xFFD2 },
+{ "F22", 0xFFD3 },
+{ "R2", 0xFFD3 },
+{ "F23", 0xFFD4 },
+{ "R3", 0xFFD4 },
+{ "F24", 0xFFD5 },
+{ "R4", 0xFFD5 },
+{ "F25", 0xFFD6 },
+{ "R5", 0xFFD6 },
+{ "F26", 0xFFD7 },
+{ "R6", 0xFFD7 },
+{ "F27", 0xFFD8 },
+{ "R7", 0xFFD8 },
+{ "F28", 0xFFD9 },
+{ "R8", 0xFFD9 },
+{ "F29", 0xFFDA },
+{ "R9", 0xFFDA },
+{ "F30", 0xFFDB },
+{ "R10", 0xFFDB },
+{ "F31", 0xFFDC },
+{ "R11", 0xFFDC },
+{ "F32", 0xFFDD },
+{ "R12", 0xFFDD },
+{ "R13", 0xFFDE },
+{ "F33", 0xFFDE },
+{ "F34", 0xFFDF },
+{ "R14", 0xFFDF },
+{ "F35", 0xFFE0 },
+{ "R15", 0xFFE0 },
+{ "Shift_L", 0xFFE1 },
+{ "Shift_R", 0xFFE2 },
+{ "Control_L", 0xFFE3 },
+{ "Control_R", 0xFFE4 },
+{ "Caps_Lock", 0xFFE5 },
+{ "Shift_Lock", 0xFFE6 },
+{ "Meta_L", 0xFFE7 },
+{ "Meta_R", 0xFFE8 },
+{ "Alt_L", 0xFFE9 },
+{ "Alt_R", 0xFFEA },
+{ "Super_L", 0xFFEB },
+{ "Super_R", 0xFFEC },
+{ "Hyper_L", 0xFFED },
+{ "Hyper_R", 0xFFEE },
+{ "space", 0x020 },
+{ "exclam", 0x021 },
+{ "quotedbl", 0x022 },
+{ "numbersign", 0x023 },
+{ "dollar", 0x024 },
+{ "percent", 0x025 },
+{ "ampersand", 0x026 },
+{ "quoteright", 0x027 },
+{ "parenleft", 0x028 },
+{ "parenright", 0x029 },
+{ "asterisk", 0x02a },
+{ "plus", 0x02b },
+{ "comma", 0x02c },
+{ "minus", 0x02d },
+{ "period", 0x02e },
+{ "slash", 0x02f },
+{ "0", 0x030 },
+{ "1", 0x031 },
+{ "2", 0x032 },
+{ "3", 0x033 },
+{ "4", 0x034 },
+{ "5", 0x035 },
+{ "6", 0x036 },
+{ "7", 0x037 },
+{ "8", 0x038 },
+{ "9", 0x039 },
+{ "colon", 0x03a },
+{ "semicolon", 0x03b },
+{ "less", 0x03c },
+{ "equal", 0x03d },
+{ "greater", 0x03e },
+{ "question", 0x03f },
+{ "at", 0x040 },
+{ "A", 0x041 },
+{ "B", 0x042 },
+{ "C", 0x043 },
+{ "D", 0x044 },
+{ "E", 0x045 },
+{ "F", 0x046 },
+{ "G", 0x047 },
+{ "H", 0x048 },
+{ "I", 0x049 },
+{ "J", 0x04a },
+{ "K", 0x04b },
+{ "L", 0x04c },
+{ "M", 0x04d },
+{ "N", 0x04e },
+{ "O", 0x04f },
+{ "P", 0x050 },
+{ "Q", 0x051 },
+{ "R", 0x052 },
+{ "S", 0x053 },
+{ "T", 0x054 },
+{ "U", 0x055 },
+{ "V", 0x056 },
+{ "W", 0x057 },
+{ "X", 0x058 },
+{ "Y", 0x059 },
+{ "Z", 0x05a },
+{ "bracketleft", 0x05b },
+{ "backslash", 0x05c },
+{ "bracketright", 0x05d },
+{ "asciicircum", 0x05e },
+{ "underscore", 0x05f },
+{ "quoteleft", 0x060 },
+{ "a", 0x061 },
+{ "b", 0x062 },
+{ "c", 0x063 },
+{ "d", 0x064 },
+{ "e", 0x065 },
+{ "f", 0x066 },
+{ "g", 0x067 },
+{ "h", 0x068 },
+{ "i", 0x069 },
+{ "j", 0x06a },
+{ "k", 0x06b },
+{ "l", 0x06c },
+{ "m", 0x06d },
+{ "n", 0x06e },
+{ "o", 0x06f },
+{ "p", 0x070 },
+{ "q", 0x071 },
+{ "r", 0x072 },
+{ "s", 0x073 },
+{ "t", 0x074 },
+{ "u", 0x075 },
+{ "v", 0x076 },
+{ "w", 0x077 },
+{ "x", 0x078 },
+{ "y", 0x079 },
+{ "z", 0x07a },
+{ "braceleft", 0x07b },
+{ "bar", 0x07c },
+{ "braceright", 0x07d },
+{ "asciitilde", 0x07e },
+{ "nobreakspace", 0x0a0 },
+{ "exclamdown", 0x0a1 },
+{ "cent", 0x0a2 },
+{ "sterling", 0x0a3 },
+{ "currency", 0x0a4 },
+{ "yen", 0x0a5 },
+{ "brokenbar", 0x0a6 },
+{ "section", 0x0a7 },
+{ "diaeresis", 0x0a8 },
+{ "copyright", 0x0a9 },
+{ "ordfeminine", 0x0aa },
+{ "guillemotleft", 0x0ab },
+{ "notsign", 0x0ac },
+{ "hyphen", 0x0ad },
+{ "registered", 0x0ae },
+{ "macron", 0x0af },
+{ "degree", 0x0b0 },
+{ "plusminus", 0x0b1 },
+{ "twosuperior", 0x0b2 },
+{ "threesuperior", 0x0b3 },
+{ "acute", 0x0b4 },
+{ "mu", 0x0b5 },
+{ "paragraph", 0x0b6 },
+{ "periodcentered", 0x0b7 },
+{ "cedilla", 0x0b8 },
+{ "onesuperior", 0x0b9 },
+{ "masculine", 0x0ba },
+{ "guillemotright", 0x0bb },
+{ "onequarter", 0x0bc },
+{ "onehalf", 0x0bd },
+{ "threequarters", 0x0be },
+{ "questiondown", 0x0bf },
+{ "Agrave", 0x0c0 },
+{ "Aacute", 0x0c1 },
+{ "Acircumflex", 0x0c2 },
+{ "Atilde", 0x0c3 },
+{ "Adiaeresis", 0x0c4 },
+{ "Aring", 0x0c5 },
+{ "AE", 0x0c6 },
+{ "Ccedilla", 0x0c7 },
+{ "Egrave", 0x0c8 },
+{ "Eacute", 0x0c9 },
+{ "Ecircumflex", 0x0ca },
+{ "Ediaeresis", 0x0cb },
+{ "Igrave", 0x0cc },
+{ "Iacute", 0x0cd },
+{ "Icircumflex", 0x0ce },
+{ "Idiaeresis", 0x0cf },
+{ "Eth", 0x0d0 },
+{ "Ntilde", 0x0d1 },
+{ "Ograve", 0x0d2 },
+{ "Oacute", 0x0d3 },
+{ "Ocircumflex", 0x0d4 },
+{ "Otilde", 0x0d5 },
+{ "Odiaeresis", 0x0d6 },
+{ "multiply", 0x0d7 },
+{ "Ooblique", 0x0d8 },
+{ "Ugrave", 0x0d9 },
+{ "Uacute", 0x0da },
+{ "Ucircumflex", 0x0db },
+{ "Udiaeresis", 0x0dc },
+{ "Yacute", 0x0dd },
+{ "Thorn", 0x0de },
+{ "ssharp", 0x0df },
+{ "agrave", 0x0e0 },
+{ "aacute", 0x0e1 },
+{ "acircumflex", 0x0e2 },
+{ "atilde", 0x0e3 },
+{ "adiaeresis", 0x0e4 },
+{ "aring", 0x0e5 },
+{ "ae", 0x0e6 },
+{ "ccedilla", 0x0e7 },
+{ "egrave", 0x0e8 },
+{ "eacute", 0x0e9 },
+{ "ecircumflex", 0x0ea },
+{ "ediaeresis", 0x0eb },
+{ "igrave", 0x0ec },
+{ "iacute", 0x0ed },
+{ "icircumflex", 0x0ee },
+{ "idiaeresis", 0x0ef },
+{ "eth", 0x0f0 },
+{ "ntilde", 0x0f1 },
+{ "ograve", 0x0f2 },
+{ "oacute", 0x0f3 },
+{ "ocircumflex", 0x0f4 },
+{ "otilde", 0x0f5 },
+{ "odiaeresis", 0x0f6 },
+{ "division", 0x0f7 },
+{ "oslash", 0x0f8 },
+{ "ugrave", 0x0f9 },
+{ "uacute", 0x0fa },
+{ "ucircumflex", 0x0fb },
+{ "udiaeresis", 0x0fc },
+{ "yacute", 0x0fd },
+{ "thorn", 0x0fe },
+{ "ydiaeresis", 0x0ff },
+{ "Aogonek", 0x1a1 },
+{ "breve", 0x1a2 },
+{ "Lstroke", 0x1a3 },
+{ "Lcaron", 0x1a5 },
+{ "Sacute", 0x1a6 },
+{ "Scaron", 0x1a9 },
+{ "Scedilla", 0x1aa },
+{ "Tcaron", 0x1ab },
+{ "Zacute", 0x1ac },
+{ "Zcaron", 0x1ae },
+{ "Zabovedot", 0x1af },
+{ "aogonek", 0x1b1 },
+{ "ogonek", 0x1b2 },
+{ "lstroke", 0x1b3 },
+{ "lcaron", 0x1b5 },
+{ "sacute", 0x1b6 },
+{ "caron", 0x1b7 },
+{ "scaron", 0x1b9 },
+{ "scedilla", 0x1ba },
+{ "tcaron", 0x1bb },
+{ "zacute", 0x1bc },
+{ "doubleacute", 0x1bd },
+{ "zcaron", 0x1be },
+{ "zabovedot", 0x1bf },
+{ "Racute", 0x1c0 },
+{ "Abreve", 0x1c3 },
+{ "Cacute", 0x1c6 },
+{ "Ccaron", 0x1c8 },
+{ "Eogonek", 0x1ca },
+{ "Ecaron", 0x1cc },
+{ "Dcaron", 0x1cf },
+{ "Nacute", 0x1d1 },
+{ "Ncaron", 0x1d2 },
+{ "Odoubleacute", 0x1d5 },
+{ "Rcaron", 0x1d8 },
+{ "Uring", 0x1d9 },
+{ "Udoubleacute", 0x1db },
+{ "Tcedilla", 0x1de },
+{ "racute", 0x1e0 },
+{ "abreve", 0x1e3 },
+{ "cacute", 0x1e6 },
+{ "ccaron", 0x1e8 },
+{ "eogonek", 0x1ea },
+{ "ecaron", 0x1ec },
+{ "dcaron", 0x1ef },
+{ "nacute", 0x1f1 },
+{ "ncaron", 0x1f2 },
+{ "odoubleacute", 0x1f5 },
+{ "udoubleacute", 0x1fb },
+{ "rcaron", 0x1f8 },
+{ "uring", 0x1f9 },
+{ "tcedilla", 0x1fe },
+{ "abovedot", 0x1ff },
+{ "Hstroke", 0x2a1 },
+{ "Hcircumflex", 0x2a6 },
+{ "Iabovedot", 0x2a9 },
+{ "Gbreve", 0x2ab },
+{ "Jcircumflex", 0x2ac },
+{ "hstroke", 0x2b1 },
+{ "hcircumflex", 0x2b6 },
+{ "idotless", 0x2b9 },
+{ "gbreve", 0x2bb },
+{ "jcircumflex", 0x2bc },
+{ "Cabovedot", 0x2c5 },
+{ "Ccircumflex", 0x2c6 },
+{ "Gabovedot", 0x2d5 },
+{ "Gcircumflex", 0x2d8 },
+{ "Ubreve", 0x2dd },
+{ "Scircumflex", 0x2de },
+{ "cabovedot", 0x2e5 },
+{ "ccircumflex", 0x2e6 },
+{ "gabovedot", 0x2f5 },
+{ "gcircumflex", 0x2f8 },
+{ "ubreve", 0x2fd },
+{ "scircumflex", 0x2fe },
+{ "kappa", 0x3a2 },
+{ "Rcedilla", 0x3a3 },
+{ "Itilde", 0x3a5 },
+{ "Lcedilla", 0x3a6 },
+{ "Emacron", 0x3aa },
+{ "Gcedilla", 0x3ab },
+{ "Tslash", 0x3ac },
+{ "rcedilla", 0x3b3 },
+{ "itilde", 0x3b5 },
+{ "lcedilla", 0x3b6 },
+{ "emacron", 0x3ba },
+{ "gacute", 0x3bb },
+{ "tslash", 0x3bc },
+{ "ENG", 0x3bd },
+{ "eng", 0x3bf },
+{ "Amacron", 0x3c0 },
+{ "Iogonek", 0x3c7 },
+{ "Eabovedot", 0x3cc },
+{ "Imacron", 0x3cf },
+{ "Ncedilla", 0x3d1 },
+{ "Omacron", 0x3d2 },
+{ "Kcedilla", 0x3d3 },
+{ "Uogonek", 0x3d9 },
+{ "Utilde", 0x3dd },
+{ "Umacron", 0x3de },
+{ "amacron", 0x3e0 },
+{ "iogonek", 0x3e7 },
+{ "eabovedot", 0x3ec },
+{ "imacron", 0x3ef },
+{ "ncedilla", 0x3f1 },
+{ "omacron", 0x3f2 },
+{ "kcedilla", 0x3f3 },
+{ "uogonek", 0x3f9 },
+{ "utilde", 0x3fd },
+{ "umacron", 0x3fe },
+{ "overline", 0x47e },
+{ "kana_fullstop", 0x4a1 },
+{ "kana_openingbracket", 0x4a2 },
+{ "kana_closingbracket", 0x4a3 },
+{ "kana_comma", 0x4a4 },
+{ "kana_middledot", 0x4a5 },
+{ "kana_WO", 0x4a6 },
+{ "kana_a", 0x4a7 },
+{ "kana_i", 0x4a8 },
+{ "kana_u", 0x4a9 },
+{ "kana_e", 0x4aa },
+{ "kana_o", 0x4ab },
+{ "kana_ya", 0x4ac },
+{ "kana_yu", 0x4ad },
+{ "kana_yo", 0x4ae },
+{ "kana_tu", 0x4af },
+{ "prolongedsound", 0x4b0 },
+{ "kana_A", 0x4b1 },
+{ "kana_I", 0x4b2 },
+{ "kana_U", 0x4b3 },
+{ "kana_E", 0x4b4 },
+{ "kana_O", 0x4b5 },
+{ "kana_KA", 0x4b6 },
+{ "kana_KI", 0x4b7 },
+{ "kana_KU", 0x4b8 },
+{ "kana_KE", 0x4b9 },
+{ "kana_KO", 0x4ba },
+{ "kana_SA", 0x4bb },
+{ "kana_SHI", 0x4bc },
+{ "kana_SU", 0x4bd },
+{ "kana_SE", 0x4be },
+{ "kana_SO", 0x4bf },
+{ "kana_TA", 0x4c0 },
+{ "kana_TI", 0x4c1 },
+{ "kana_TU", 0x4c2 },
+{ "kana_TE", 0x4c3 },
+{ "kana_TO", 0x4c4 },
+{ "kana_NA", 0x4c5 },
+{ "kana_NI", 0x4c6 },
+{ "kana_NU", 0x4c7 },
+{ "kana_NE", 0x4c8 },
+{ "kana_NO", 0x4c9 },
+{ "kana_HA", 0x4ca },
+{ "kana_HI", 0x4cb },
+{ "kana_HU", 0x4cc },
+{ "kana_HE", 0x4cd },
+{ "kana_HO", 0x4ce },
+{ "kana_MA", 0x4cf },
+{ "kana_MI", 0x4d0 },
+{ "kana_MU", 0x4d1 },
+{ "kana_ME", 0x4d2 },
+{ "kana_MO", 0x4d3 },
+{ "kana_YA", 0x4d4 },
+{ "kana_YU", 0x4d5 },
+{ "kana_YO", 0x4d6 },
+{ "kana_RA", 0x4d7 },
+{ "kana_RI", 0x4d8 },
+{ "kana_RU", 0x4d9 },
+{ "kana_RE", 0x4da },
+{ "kana_RO", 0x4db },
+{ "kana_WA", 0x4dc },
+{ "kana_N", 0x4dd },
+{ "voicedsound", 0x4de },
+{ "semivoicedsound", 0x4df },
+{ "kana_switch", 0xFF7E },
+{ "Arabic_comma", 0x5ac },
+{ "Arabic_semicolon", 0x5bb },
+{ "Arabic_question_mark", 0x5bf },
+{ "Arabic_hamza", 0x5c1 },
+{ "Arabic_maddaonalef", 0x5c2 },
+{ "Arabic_hamzaonalef", 0x5c3 },
+{ "Arabic_hamzaonwaw", 0x5c4 },
+{ "Arabic_hamzaunderalef", 0x5c5 },
+{ "Arabic_hamzaonyeh", 0x5c6 },
+{ "Arabic_alef", 0x5c7 },
+{ "Arabic_beh", 0x5c8 },
+{ "Arabic_tehmarbuta", 0x5c9 },
+{ "Arabic_teh", 0x5ca },
+{ "Arabic_theh", 0x5cb },
+{ "Arabic_jeem", 0x5cc },
+{ "Arabic_hah", 0x5cd },
+{ "Arabic_khah", 0x5ce },
+{ "Arabic_dal", 0x5cf },
+{ "Arabic_thal", 0x5d0 },
+{ "Arabic_ra", 0x5d1 },
+{ "Arabic_zain", 0x5d2 },
+{ "Arabic_seen", 0x5d3 },
+{ "Arabic_sheen", 0x5d4 },
+{ "Arabic_sad", 0x5d5 },
+{ "Arabic_dad", 0x5d6 },
+{ "Arabic_tah", 0x5d7 },
+{ "Arabic_zah", 0x5d8 },
+{ "Arabic_ain", 0x5d9 },
+{ "Arabic_ghain", 0x5da },
+{ "Arabic_tatweel", 0x5e0 },
+{ "Arabic_feh", 0x5e1 },
+{ "Arabic_qaf", 0x5e2 },
+{ "Arabic_kaf", 0x5e3 },
+{ "Arabic_lam", 0x5e4 },
+{ "Arabic_meem", 0x5e5 },
+{ "Arabic_noon", 0x5e6 },
+{ "Arabic_heh", 0x5e7 },
+{ "Arabic_waw", 0x5e8 },
+{ "Arabic_alefmaksura", 0x5e9 },
+{ "Arabic_yeh", 0x5ea },
+{ "Arabic_fathatan", 0x5eb },
+{ "Arabic_dammatan", 0x5ec },
+{ "Arabic_kasratan", 0x5ed },
+{ "Arabic_fatha", 0x5ee },
+{ "Arabic_damma", 0x5ef },
+{ "Arabic_kasra", 0x5f0 },
+{ "Arabic_shadda", 0x5f1 },
+{ "Arabic_sukun", 0x5f2 },
+{ "Arabic_switch", 0xFF7E },
+{ "Serbian_dje", 0x6a1 },
+{ "Macedonia_gje", 0x6a2 },
+{ "Cyrillic_io", 0x6a3 },
+{ "Ukranian_je", 0x6a4 },
+{ "Macedonia_dse", 0x6a5 },
+{ "Ukranian_i", 0x6a6 },
+{ "Ukranian_yi", 0x6a7 },
+{ "Serbian_je", 0x6a8 },
+{ "Serbian_lje", 0x6a9 },
+{ "Serbian_nje", 0x6aa },
+{ "Serbian_tshe", 0x6ab },
+{ "Macedonia_kje", 0x6ac },
+{ "Byelorussian_shortu", 0x6ae },
+{ "Serbian_dze", 0x6af },
+{ "numerosign", 0x6b0 },
+{ "Serbian_DJE", 0x6b1 },
+{ "Macedonia_GJE", 0x6b2 },
+{ "Cyrillic_IO", 0x6b3 },
+{ "Ukranian_JE", 0x6b4 },
+{ "Macedonia_DSE", 0x6b5 },
+{ "Ukranian_I", 0x6b6 },
+{ "Ukranian_YI", 0x6b7 },
+{ "Serbian_JE", 0x6b8 },
+{ "Serbian_LJE", 0x6b9 },
+{ "Serbian_NJE", 0x6ba },
+{ "Serbian_TSHE", 0x6bb },
+{ "Macedonia_KJE", 0x6bc },
+{ "Byelorussian_SHORTU", 0x6be },
+{ "Serbian_DZE", 0x6bf },
+{ "Cyrillic_yu", 0x6c0 },
+{ "Cyrillic_a", 0x6c1 },
+{ "Cyrillic_be", 0x6c2 },
+{ "Cyrillic_tse", 0x6c3 },
+{ "Cyrillic_de", 0x6c4 },
+{ "Cyrillic_ie", 0x6c5 },
+{ "Cyrillic_ef", 0x6c6 },
+{ "Cyrillic_ghe", 0x6c7 },
+{ "Cyrillic_ha", 0x6c8 },
+{ "Cyrillic_i", 0x6c9 },
+{ "Cyrillic_shorti", 0x6ca },
+{ "Cyrillic_ka", 0x6cb },
+{ "Cyrillic_el", 0x6cc },
+{ "Cyrillic_em", 0x6cd },
+{ "Cyrillic_en", 0x6ce },
+{ "Cyrillic_o", 0x6cf },
+{ "Cyrillic_pe", 0x6d0 },
+{ "Cyrillic_ya", 0x6d1 },
+{ "Cyrillic_er", 0x6d2 },
+{ "Cyrillic_es", 0x6d3 },
+{ "Cyrillic_te", 0x6d4 },
+{ "Cyrillic_u", 0x6d5 },
+{ "Cyrillic_zhe", 0x6d6 },
+{ "Cyrillic_ve", 0x6d7 },
+{ "Cyrillic_softsign", 0x6d8 },
+{ "Cyrillic_yeru", 0x6d9 },
+{ "Cyrillic_ze", 0x6da },
+{ "Cyrillic_sha", 0x6db },
+{ "Cyrillic_e", 0x6dc },
+{ "Cyrillic_shcha", 0x6dd },
+{ "Cyrillic_che", 0x6de },
+{ "Cyrillic_hardsign", 0x6df },
+{ "Cyrillic_YU", 0x6e0 },
+{ "Cyrillic_A", 0x6e1 },
+{ "Cyrillic_BE", 0x6e2 },
+{ "Cyrillic_TSE", 0x6e3 },
+{ "Cyrillic_DE", 0x6e4 },
+{ "Cyrillic_IE", 0x6e5 },
+{ "Cyrillic_EF", 0x6e6 },
+{ "Cyrillic_GHE", 0x6e7 },
+{ "Cyrillic_HA", 0x6e8 },
+{ "Cyrillic_I", 0x6e9 },
+{ "Cyrillic_SHORTI", 0x6ea },
+{ "Cyrillic_KA", 0x6eb },
+{ "Cyrillic_EL", 0x6ec },
+{ "Cyrillic_EM", 0x6ed },
+{ "Cyrillic_EN", 0x6ee },
+{ "Cyrillic_O", 0x6ef },
+{ "Cyrillic_PE", 0x6f0 },
+{ "Cyrillic_YA", 0x6f1 },
+{ "Cyrillic_ER", 0x6f2 },
+{ "Cyrillic_ES", 0x6f3 },
+{ "Cyrillic_TE", 0x6f4 },
+{ "Cyrillic_U", 0x6f5 },
+{ "Cyrillic_ZHE", 0x6f6 },
+{ "Cyrillic_VE", 0x6f7 },
+{ "Cyrillic_SOFTSIGN", 0x6f8 },
+{ "Cyrillic_YERU", 0x6f9 },
+{ "Cyrillic_ZE", 0x6fa },
+{ "Cyrillic_SHA", 0x6fb },
+{ "Cyrillic_E", 0x6fc },
+{ "Cyrillic_SHCHA", 0x6fd },
+{ "Cyrillic_CHE", 0x6fe },
+{ "Cyrillic_HARDSIGN", 0x6ff },
+{ "Greek_ALPHAaccent", 0x7a1 },
+{ "Greek_EPSILONaccent", 0x7a2 },
+{ "Greek_ETAaccent", 0x7a3 },
+{ "Greek_IOTAaccent", 0x7a4 },
+{ "Greek_IOTAdiaeresis", 0x7a5 },
+{ "Greek_IOTAaccentdiaeresis", 0x7a6 },
+{ "Greek_OMICRONaccent", 0x7a7 },
+{ "Greek_UPSILONaccent", 0x7a8 },
+{ "Greek_UPSILONdieresis", 0x7a9 },
+{ "Greek_UPSILONaccentdieresis", 0x7aa },
+{ "Greek_OMEGAaccent", 0x7ab },
+{ "Greek_alphaaccent", 0x7b1 },
+{ "Greek_epsilonaccent", 0x7b2 },
+{ "Greek_etaaccent", 0x7b3 },
+{ "Greek_iotaaccent", 0x7b4 },
+{ "Greek_iotadieresis", 0x7b5 },
+{ "Greek_iotaaccentdieresis", 0x7b6 },
+{ "Greek_omicronaccent", 0x7b7 },
+{ "Greek_upsilonaccent", 0x7b8 },
+{ "Greek_upsilondieresis", 0x7b9 },
+{ "Greek_upsilonaccentdieresis", 0x7ba },
+{ "Greek_omegaaccent", 0x7bb },
+{ "Greek_ALPHA", 0x7c1 },
+{ "Greek_BETA", 0x7c2 },
+{ "Greek_GAMMA", 0x7c3 },
+{ "Greek_DELTA", 0x7c4 },
+{ "Greek_EPSILON", 0x7c5 },
+{ "Greek_ZETA", 0x7c6 },
+{ "Greek_ETA", 0x7c7 },
+{ "Greek_THETA", 0x7c8 },
+{ "Greek_IOTA", 0x7c9 },
+{ "Greek_KAPPA", 0x7ca },
+{ "Greek_LAMBDA", 0x7cb },
+{ "Greek_MU", 0x7cc },
+{ "Greek_NU", 0x7cd },
+{ "Greek_XI", 0x7ce },
+{ "Greek_OMICRON", 0x7cf },
+{ "Greek_PI", 0x7d0 },
+{ "Greek_RHO", 0x7d1 },
+{ "Greek_SIGMA", 0x7d2 },
+{ "Greek_TAU", 0x7d4 },
+{ "Greek_UPSILON", 0x7d5 },
+{ "Greek_PHI", 0x7d6 },
+{ "Greek_CHI", 0x7d7 },
+{ "Greek_PSI", 0x7d8 },
+{ "Greek_OMEGA", 0x7d9 },
+{ "Greek_alpha", 0x7e1 },
+{ "Greek_beta", 0x7e2 },
+{ "Greek_gamma", 0x7e3 },
+{ "Greek_delta", 0x7e4 },
+{ "Greek_epsilon", 0x7e5 },
+{ "Greek_zeta", 0x7e6 },
+{ "Greek_eta", 0x7e7 },
+{ "Greek_theta", 0x7e8 },
+{ "Greek_iota", 0x7e9 },
+{ "Greek_kappa", 0x7ea },
+{ "Greek_lambda", 0x7eb },
+{ "Greek_mu", 0x7ec },
+{ "Greek_nu", 0x7ed },
+{ "Greek_xi", 0x7ee },
+{ "Greek_omicron", 0x7ef },
+{ "Greek_pi", 0x7f0 },
+{ "Greek_rho", 0x7f1 },
+{ "Greek_sigma", 0x7f2 },
+{ "Greek_finalsmallsigma", 0x7f3 },
+{ "Greek_tau", 0x7f4 },
+{ "Greek_upsilon", 0x7f5 },
+{ "Greek_phi", 0x7f6 },
+{ "Greek_chi", 0x7f7 },
+{ "Greek_psi", 0x7f8 },
+{ "Greek_omega", 0x7f9 },
+{ "Greek_switch", 0xFF7E },
+{ "leftradical", 0x8a1 },
+{ "topleftradical", 0x8a2 },
+{ "horizconnector", 0x8a3 },
+{ "topintegral", 0x8a4 },
+{ "botintegral", 0x8a5 },
+{ "vertconnector", 0x8a6 },
+{ "topleftsqbracket", 0x8a7 },
+{ "botleftsqbracket", 0x8a8 },
+{ "toprightsqbracket", 0x8a9 },
+{ "botrightsqbracket", 0x8aa },
+{ "topleftparens", 0x8ab },
+{ "botleftparens", 0x8ac },
+{ "toprightparens", 0x8ad },
+{ "botrightparens", 0x8ae },
+{ "leftmiddlecurlybrace", 0x8af },
+{ "rightmiddlecurlybrace", 0x8b0 },
+{ "topleftsummation", 0x8b1 },
+{ "botleftsummation", 0x8b2 },
+{ "topvertsummationconnector", 0x8b3 },
+{ "botvertsummationconnector", 0x8b4 },
+{ "toprightsummation", 0x8b5 },
+{ "botrightsummation", 0x8b6 },
+{ "rightmiddlesummation", 0x8b7 },
+{ "lessthanequal", 0x8bc },
+{ "notequal", 0x8bd },
+{ "greaterthanequal", 0x8be },
+{ "integral", 0x8bf },
+{ "therefore", 0x8c0 },
+{ "variation", 0x8c1 },
+{ "infinity", 0x8c2 },
+{ "nabla", 0x8c5 },
+{ "approximate", 0x8c8 },
+{ "similarequal", 0x8c9 },
+{ "ifonlyif", 0x8cd },
+{ "implies", 0x8ce },
+{ "identical", 0x8cf },
+{ "radical", 0x8d6 },
+{ "includedin", 0x8da },
+{ "includes", 0x8db },
+{ "intersection", 0x8dc },
+{ "union", 0x8dd },
+{ "logicaland", 0x8de },
+{ "logicalor", 0x8df },
+{ "partialderivative", 0x8ef },
+{ "function", 0x8f6 },
+{ "leftarrow", 0x8fb },
+{ "uparrow", 0x8fc },
+{ "rightarrow", 0x8fd },
+{ "downarrow", 0x8fe },
+{ "blank", 0x9df },
+{ "soliddiamond", 0x9e0 },
+{ "checkerboard", 0x9e1 },
+{ "ht", 0x9e2 },
+{ "ff", 0x9e3 },
+{ "cr", 0x9e4 },
+{ "lf", 0x9e5 },
+{ "nl", 0x9e8 },
+{ "vt", 0x9e9 },
+{ "lowrightcorner", 0x9ea },
+{ "uprightcorner", 0x9eb },
+{ "upleftcorner", 0x9ec },
+{ "lowleftcorner", 0x9ed },
+{ "crossinglines", 0x9ee },
+{ "horizlinescan1", 0x9ef },
+{ "horizlinescan3", 0x9f0 },
+{ "horizlinescan5", 0x9f1 },
+{ "horizlinescan7", 0x9f2 },
+{ "horizlinescan9", 0x9f3 },
+{ "leftt", 0x9f4 },
+{ "rightt", 0x9f5 },
+{ "bott", 0x9f6 },
+{ "topt", 0x9f7 },
+{ "vertbar", 0x9f8 },
+{ "emspace", 0xaa1 },
+{ "enspace", 0xaa2 },
+{ "em3space", 0xaa3 },
+{ "em4space", 0xaa4 },
+{ "digitspace", 0xaa5 },
+{ "punctspace", 0xaa6 },
+{ "thinspace", 0xaa7 },
+{ "hairspace", 0xaa8 },
+{ "emdash", 0xaa9 },
+{ "endash", 0xaaa },
+{ "signifblank", 0xaac },
+{ "ellipsis", 0xaae },
+{ "doubbaselinedot", 0xaaf },
+{ "onethird", 0xab0 },
+{ "twothirds", 0xab1 },
+{ "onefifth", 0xab2 },
+{ "twofifths", 0xab3 },
+{ "threefifths", 0xab4 },
+{ "fourfifths", 0xab5 },
+{ "onesixth", 0xab6 },
+{ "fivesixths", 0xab7 },
+{ "careof", 0xab8 },
+{ "figdash", 0xabb },
+{ "leftanglebracket", 0xabc },
+{ "decimalpoint", 0xabd },
+{ "rightanglebracket", 0xabe },
+{ "marker", 0xabf },
+{ "oneeighth", 0xac3 },
+{ "threeeighths", 0xac4 },
+{ "fiveeighths", 0xac5 },
+{ "seveneighths", 0xac6 },
+{ "trademark", 0xac9 },
+{ "signaturemark", 0xaca },
+{ "trademarkincircle", 0xacb },
+{ "leftopentriangle", 0xacc },
+{ "rightopentriangle", 0xacd },
+{ "emopencircle", 0xace },
+{ "emopenrectangle", 0xacf },
+{ "leftsinglequotemark", 0xad0 },
+{ "rightsinglequotemark", 0xad1 },
+{ "leftdoublequotemark", 0xad2 },
+{ "rightdoublequotemark", 0xad3 },
+{ "prescription", 0xad4 },
+{ "minutes", 0xad6 },
+{ "seconds", 0xad7 },
+{ "latincross", 0xad9 },
+{ "hexagram", 0xada },
+{ "filledrectbullet", 0xadb },
+{ "filledlefttribullet", 0xadc },
+{ "filledrighttribullet", 0xadd },
+{ "emfilledcircle", 0xade },
+{ "emfilledrect", 0xadf },
+{ "enopencircbullet", 0xae0 },
+{ "enopensquarebullet", 0xae1 },
+{ "openrectbullet", 0xae2 },
+{ "opentribulletup", 0xae3 },
+{ "opentribulletdown", 0xae4 },
+{ "openstar", 0xae5 },
+{ "enfilledcircbullet", 0xae6 },
+{ "enfilledsqbullet", 0xae7 },
+{ "filledtribulletup", 0xae8 },
+{ "filledtribulletdown", 0xae9 },
+{ "leftpointer", 0xaea },
+{ "rightpointer", 0xaeb },
+{ "club", 0xaec },
+{ "diamond", 0xaed },
+{ "heart", 0xaee },
+{ "maltesecross", 0xaf0 },
+{ "dagger", 0xaf1 },
+{ "doubledagger", 0xaf2 },
+{ "checkmark", 0xaf3 },
+{ "ballotcross", 0xaf4 },
+{ "musicalsharp", 0xaf5 },
+{ "musicalflat", 0xaf6 },
+{ "malesymbol", 0xaf7 },
+{ "femalesymbol", 0xaf8 },
+{ "telephone", 0xaf9 },
+{ "telephonerecorder", 0xafa },
+{ "phonographcopyright", 0xafb },
+{ "caret", 0xafc },
+{ "singlelowquotemark", 0xafd },
+{ "doublelowquotemark", 0xafe },
+{ "cursor", 0xaff },
+{ "leftcaret", 0xba3 },
+{ "rightcaret", 0xba6 },
+{ "downcaret", 0xba8 },
+{ "upcaret", 0xba9 },
+{ "overbar", 0xbc0 },
+{ "downtack", 0xbc2 },
+{ "upshoe", 0xbc3 },
+{ "downstile", 0xbc4 },
+{ "underbar", 0xbc6 },
+{ "jot", 0xbca },
+{ "quad", 0xbcc },
+{ "uptack", 0xbce },
+{ "circle", 0xbcf },
+{ "upstile", 0xbd3 },
+{ "downshoe", 0xbd6 },
+{ "rightshoe", 0xbd8 },
+{ "leftshoe", 0xbda },
+{ "lefttack", 0xbdc },
+{ "righttack", 0xbfc },
+{ "hebrew_aleph", 0xce0 },
+{ "hebrew_beth", 0xce1 },
+{ "hebrew_gimmel", 0xce2 },
+{ "hebrew_daleth", 0xce3 },
+{ "hebrew_he", 0xce4 },
+{ "hebrew_waw", 0xce5 },
+{ "hebrew_zayin", 0xce6 },
+{ "hebrew_het", 0xce7 },
+{ "hebrew_teth", 0xce8 },
+{ "hebrew_yod", 0xce9 },
+{ "hebrew_finalkaph", 0xcea },
+{ "hebrew_kaph", 0xceb },
+{ "hebrew_lamed", 0xcec },
+{ "hebrew_finalmem", 0xced },
+{ "hebrew_mem", 0xcee },
+{ "hebrew_finalnun", 0xcef },
+{ "hebrew_nun", 0xcf0 },
+{ "hebrew_samekh", 0xcf1 },
+{ "hebrew_ayin", 0xcf2 },
+{ "hebrew_finalpe", 0xcf3 },
+{ "hebrew_pe", 0xcf4 },
+{ "hebrew_finalzadi", 0xcf5 },
+{ "hebrew_zadi", 0xcf6 },
+{ "hebrew_kuf", 0xcf7 },
+{ "hebrew_resh", 0xcf8 },
+{ "hebrew_shin", 0xcf9 },
+{ "hebrew_taf", 0xcfa },
+{ "Hebrew_switch", 0xFF7E },
+{ "ISO_Left_Tab", 0xFE20 },
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/mkVFunc b/Master/tlpkg/tlperl/lib/Tk/pTk/mkVFunc
new file mode 100644
index 00000000000..09ffc80a560
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/mkVFunc
@@ -0,0 +1,433 @@
+#!/usr/local/bin/perl -w
+use strict;
+
+
+my %Ignore;
+my %Ignored;
+my %WinIgnore;
+my %Exclude;
+
+my $oops = 0;
+
+use Getopt::Std;
+my %opt;
+getopts('mt',\%opt);
+my @Files;
+
+sub openRO
+{
+ my ($fh,$file) = @_;
+ if (-f $file && !-w $file)
+ {
+ chmod(0666,$file) || warn "Cannot change permissions on $file:$!";
+ }
+ open($fh,">","$file~") || return 0;
+ push(@Files,$file);
+ return 1;
+}
+
+END
+ {
+ while (@Files)
+ {
+ my $file = pop(@Files);
+ if (-f $file)
+ {
+ chmod(0444,"$file~") || warn "Cannot change permissions on $file:$!";
+ if (!rename("$file~",$file))
+ {
+ warn "Cannot rename $file to $file~ ($!), trying again with deleting $file before...";
+ unlink($file) || warn "Cannot delete $file:$!";
+ rename("$file~",$file) || warn "Cannot rename $file~ to $file ($!), expect major problems now...";
+ }
+ }
+ }
+ }
+
+my $win_arch = shift;
+die "Unknown \$win_arch" unless $win_arch eq 'open32'
+ or $win_arch eq 'pm'
+ or $win_arch eq 'x'
+ or $win_arch eq 'MSWin32';
+my $xexcl = <<EOM;
+#if (defined(__WIN32__) || defined(__PM__)) && !defined(DO_X_EXCLUDE)
+# define DO_X_EXCLUDE
+#endif
+EOM
+
+sub Ignore
+{
+ my $cfile = shift;
+ if (open(C,"<$cfile"))
+ {
+ warn "Ignoring from $cfile\n";
+ while (<C>)
+ {
+ if (/^([A-Za-z][A-Za-z0-9_]*)/)
+ {
+ $Ignore{$1} = $cfile;
+ }
+ }
+ close(C);
+ }
+ else
+ {
+ warn "Cannot open $cfile:$!";
+ }
+}
+
+sub WinIgnore
+{
+ my $cfile = shift;
+ if (open(C,"<$cfile"))
+ {
+ warn "WinIgnoring from $cfile\n";
+ while (<C>)
+ {
+ if (/^([A-Za-z][A-Za-z0-9_]*)/)
+ {
+ $WinIgnore{$1} = $cfile;
+ }
+ }
+ close(C);
+ }
+ else
+ {
+ warn "Cannot open $cfile:$!";
+ }
+}
+
+sub Exclude
+{
+ my $cfile = shift;
+ if (open(C,"<$cfile"))
+ {
+ while (<C>)
+ {
+ if (/{\s*\"[^\"]+\"\s*,\s*(\w+)\s*}/)
+ {
+ $Exclude{$1} = $cfile;
+ }
+ }
+ close(C);
+ }
+ else
+ {
+ warn "Cannot open $cfile:$!";
+ }
+}
+
+sub Vfunc
+{
+ my $hfile = shift;
+ my %VFunc = ();
+ my %VVar = ();
+ my %VError= ();
+ my $errors = 0;
+ my @ifdef = ('');
+ open(H,"<$hfile") || die "Cannot open $hfile:$!";
+ my $gard = "\U$hfile";
+ $gard =~ s/\..*$//;
+ $gard =~ s#/#_#g;
+
+ while (<H>)
+ {
+ if (/^\s*#\s*if/)
+ {
+ s#//.*##;
+ s#/\*.*?\*/# #g;
+ s/\s+$//;
+ s/^\s*#\s*ifndef\s+_$gard\b.*//;
+ s/^\s*#\s*ifndef\s+_\w+_H_\b.*//;
+ warn "'$gard' in '$_'" if /$gard/;
+ push(@ifdef,$_);
+ }
+ elsif (/^\s*#\s*else/)
+ {
+ s/\s+$//;
+ #warn "$hfile:$.:$_\n";
+ $ifdef[-1] = $_;
+ }
+ elsif (/^\s*#\s*endif\b/)
+ {
+ pop(@ifdef);
+ }
+ elsif (/^\s*(MOVEXT|COREXT|EXTERN|extern)\s*(.*?)\s*(\w+)\s+_ANSI_ARGS_\s*\((TCL_VARARGS)?\(/)
+ {
+ my ($type,$name,$op) = ($2,$3,$4);
+ if ($1 eq 'MOVEXT' || $1 eq 'COREXT')
+ {
+ warn "$1 $name\n";
+ $oops++;
+ $Ignore{$name} = $hfile;
+ }
+ $op = "" unless (defined $op);
+ my $defn = "VFUNC($type,$name,V_$name,_ANSI_ARGS_($op(";
+ $_ = $';
+ until (/\)\);\s*$/)
+ {
+ $defn .= $_;
+ $_ = <H>;
+ if (/^\S/)
+ {
+ chomp($_);
+ die $_;
+ }
+ }
+ s/\)\);\s*$/\)\)\)\n/;
+ $defn .= $_;
+ die "$hfile:$.:$ifdef[-1]\n" if $ifdef[-1] =~ /\belse\b/;
+ if (exists($VFunc{$name}{$ifdef[-1]}) && $defn ne $VFunc{$name}{$ifdef[-1]})
+ {
+ warn "Function (@ifdef) $name is $defn and $VFunc{$name}{$ifdef[-1]}";
+ $errors++;
+ }
+ else
+ {
+ $VFunc{$name}{$ifdef[-1]} = $defn;
+ }
+ }
+ elsif (/^\s*(MOVEXT|COREXT|EXTERN|extern)\s*(.*?)\s*(\w+)\s*;/)
+ {
+ my ($type,$name) = ($2,$3);
+ if ($1 eq 'MOVEXT' || $1 eq 'COREXT')
+ {
+ warn "$1 $name\n";
+ $oops++;
+ $Ignore{$name} = $hfile;
+ }
+ my $defn = "VVAR($type,$name,V_$name)\n";
+ die "$hfile:$.:$ifdef[-1]\n" if $ifdef[-1] =~ /\belse\b/;
+ if (exists $VVar{$name}{$ifdef[-1]})
+ {
+ warn "Variable (@ifdef) $name is $defn and $VVar{$name}{$ifdef[-1]}";
+ $errors++;
+ }
+ else
+ {
+ $VVar{$name}{$ifdef[-1]} = $defn;
+ }
+ }
+ elsif (/\b(EXTERN|extern)\s+[\w_]+\s+[\w_]+\[\];$/)
+ {
+
+ }
+ elsif (/\b(EXTERN|extern)\s*"C"\s*\{\s*$/)
+ {
+
+ }
+ elsif (/\b(EXTERN|extern)\b/)
+ {
+ warn "$hfile:$.: $_" unless (/^\s*\#\s*define/);
+ }
+ }
+ close(H);
+ die "Multiple definitions\n" if $errors;
+
+
+ if (keys %VFunc || keys %VVar)
+ {
+ my $name = "\u\L${gard}\UV";
+ my $fdef = $hfile;
+ $fdef =~ s/\..*$/.t/;
+ my $mdef = $hfile;
+ $mdef =~ s/\..*$/.m/;
+
+ $mdef .= 'dmy' unless $opt{'m'};
+ $fdef .= 'dmy' unless $opt{'t'};
+
+ my $htfile = $hfile;
+ $htfile =~ s/\..*$/_f.h/;
+ unless (-r $htfile)
+ {
+ openRO(\*C,$htfile) || die "Cannot open $htfile:$!";
+ print C "#ifndef ${gard}_VT\n";
+ print C "#define ${gard}_VT\n";
+ print C "typedef struct ${name}tab\n{\n";
+ print C " unsigned (*tabSize)(void);\n";
+ print C "#define VFUNC(type,name,mem,args) type (*mem) args;\n";
+ print C "#define VVAR(type,name,mem) type (*mem);\n";
+ print C "#include \"$fdef\"\n";
+ print C "#undef VFUNC\n";
+ print C "#undef VVAR\n";
+ print C "} ${name}tab;\n";
+ print C "extern ${name}tab *${name}ptr;\n";
+ print C "extern ${name}tab *${name}Get(void);\n";
+ print C "#endif /* ${gard}_VT */\n";
+ close(C);
+ }
+
+ my $cfile = $hfile;
+ $cfile =~ s/\..*$/_f.c/;
+ unless (-r $cfile)
+ {
+ openRO(\*C,$cfile) || die "Cannot open $cfile:$!";
+ print C "#include \"$hfile\"\n";
+ print C "#include \"$htfile\"\n";
+ print C "static unsigned ${name}Size(void) { return sizeof(${name}tab);}\n";
+ print C "static ${name}tab ${name}table =\n{\n";
+ print C " ${name}Size,\n";
+ print C "#define VFUNC(type,name,mem,args) name,\n";
+ print C "#define VVAR(type,name,mem) &name,\n";
+ print C "#include \"$fdef\"\n";
+ print C "#undef VFUNC\n";
+ print C "#undef VVAR\n";
+ print C "};\n";
+ print C "${name}tab *${name}ptr;\n";
+ print C "${name}tab *${name}Get() { return ${name}ptr = &${name}table;}\n";
+ close(C);
+ }
+
+ print STDERR "$gard\n";
+ openRO(\*VFUNC,$fdef) || die "Cannot open $fdef:$!";
+ openRO(\*VMACRO,$mdef) || die "Cannot open $mdef:$!";
+ print VFUNC "#ifdef _$gard\n";
+ print VMACRO "#ifndef _${gard}_VM\n";
+ print VMACRO "#define _${gard}_VM\n";
+ print VMACRO "#include \"$htfile\"\n";
+ print VMACRO "#ifndef NO_VTABLES\n";
+ print VMACRO $xexcl if %WinIgnore;
+ print VFUNC $xexcl if %WinIgnore;
+ foreach my $func (sort keys %VVar)
+ {
+ if (!exists($Exclude{$func}) && !exists($Ignore{$func}))
+ {
+ foreach my $ifdef (sort keys %{$VVar{$func}})
+ {
+ print VFUNC "$ifdef\n" if ($ifdef);
+ print VFUNC $VVar{$func}{$ifdef};
+ print VFUNC "#endif /* $ifdef */\n" if ($ifdef);
+ }
+ print VMACRO "#define $func (*${name}ptr->V_$func)\n";
+ }
+ $Ignored{$func} = delete $Ignore{$func} if exists $Ignore{$func};
+ }
+ foreach my $func (sort keys %VFunc)
+ {
+ if (!exists($Exclude{$func}) && !exists($Ignore{$func}))
+ {
+ print VFUNC "#ifndef DO_X_EXCLUDE\n" if exists($WinIgnore{$func});
+ print VFUNC "#ifndef $func\n";
+ foreach my $ifdef (sort keys %{$VFunc{$func}})
+ {
+ print VFUNC "$ifdef\n" if ($ifdef);
+ print VFUNC $VFunc{$func}{$ifdef};
+ print VFUNC "#endif /* $ifdef */\n" if ($ifdef);
+ }
+ print VFUNC "#endif /* #ifndef $func */\n";
+ print VFUNC "#endif /* !DO_X_EXCLUDE */\n" if exists($WinIgnore{$func});
+ print VFUNC "\n";
+
+ print VMACRO "#ifndef DO_X_EXCLUDE\n" if exists($WinIgnore{$func});
+ print VMACRO "#ifndef $func\n";
+ print VMACRO "# define $func (*${name}ptr->V_$func)\n";
+ print VMACRO "#endif\n";
+ print VMACRO "#endif /* !DO_X_EXCLUDE */\n" if exists($WinIgnore{$func});
+ print VMACRO "\n";
+ }
+ $Ignored{$func} = delete $Ignore{$func} if exists $Ignore{$func};
+ }
+ print VMACRO "#endif /* NO_VTABLES */\n";
+ print VMACRO "#endif /* _${gard}_VM */\n";
+ close(VMACRO);
+ print VFUNC "#endif /* _$gard */\n";
+ close(VFUNC); # Close this last - Makefile dependency
+
+ unlink($mdef) unless $opt{'m'};
+ unlink($fdef) unless $opt{'t'};
+ }
+ else
+ {
+ die "No entries in $hfile\n";
+ }
+}
+
+foreach (<tk*Tab.c>)
+ {
+ Exclude($_);
+ }
+
+die "Usage: $0 <some.h>\n" if (@ARGV != 1);
+
+my $h = shift;
+my $x = $h;
+$x =~ s/\.h/.exc/;
+Ignore($x) if (-f $x);
+$x =~ s/\.exc/.excwin/;
+WinIgnore($x) if (-f $x);
+Vfunc($h);
+
+foreach my $s (sort keys %Ignore)
+ {
+ warn "$s is not in $h\n";
+ $oops++;
+ }
+
+if ($oops)
+ {
+ $x = $h;
+ $x =~ s/\.h/.exc/;
+ rename($x,"$x.old") || die "Cannot rename $x to $x.old:$!";
+ open(EXC,">$x") || die "Cannot open $x:$!";
+ foreach my $s (sort keys %Ignored)
+ {
+ print EXC $s,"\n";
+ }
+ close(EXC);
+ }
+
+__END__
+
+=head1 NAME
+
+mkVFunc - Support for "nested" dynamic loading
+
+=head1 SYNOPSIS
+
+ mkVFunc xxx.h
+
+=head1 DESCRIPTION
+
+B<perl/Tk> is designed so that B<Tk> can be dynamically loaded 'on top of'
+perl. That is the easy bit. What it also does is allow Tk::Xxxx to be
+dynamically loaded 'on top of' the B<perl/Tk> composite. Thus when
+you 'require Tk::HList' the shared object F<.../HList.so> needs to be
+able to call functions defined in perl I<and> functions defined in loadable
+.../Tk.so . Now functions in 'base executable' are a well known problem,
+and are solved by DynaLoader. However most of dynamic loading schemes
+cannot handle one loadable calling another loadable.
+
+Thus what Tk does is build a table of functions that should be callable.
+This table is auto-generated from the .h file by looking for
+'extern' (and EXTERN which is #defined to 'extern').
+Thus any function marked as 'extern' is 'referenced' by the table.
+The address of the table is then stored in a perl variable when Tk is loaded.
+When HList is loaded it looks in the perl variable (via functions
+in perl - the 'base executable') to get the address of the table.
+
+The same utility that builds the table also builds a set of #define's.
+HList.c (and any other .c files which comprise HList) #include these
+#define's. So that
+
+ Tk_SomeFunc(x,y,z)
+
+Is actually compiled as
+
+ (*TkVptr->V_Tk_SomeFunc)(x,y,z)
+
+Where Tk_ptr is pointer to the table.
+
+See:
+
+ Tk-b*/pTk/mkVFunc - perl script that produces tables
+ /tk.h - basis from which table is generated
+ /tk.m - #define's to include in sub-extension
+ /tk_f.h - #included both sides.
+ /tk_f.c - Actual table definition.
+ /tk.t - 'shared' set of macros which produce table
+ included in tk_f.c and tk_f.h
+ /tkVMacro.h - Wrapper to include *.m files
+
+In addition to /tk* there are /tkInt*, /Lang* and /tix*
+
+=cut
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/moredefs.h b/Master/tlpkg/tlperl/lib/Tk/pTk/moredefs.h
new file mode 100644
index 00000000000..f81380aea31
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/moredefs.h
@@ -0,0 +1,131 @@
+EXTERN int Tk_BellObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_BindCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_BindtagsCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ButtonCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_CanvasObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_CheckbuttonCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ClipboardCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ChooseColorCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_EntryCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_EventObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_FrameCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_FocusObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_FontObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_GetOpenFileCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_GetSaveFileCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_GrabCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_GridCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ImageObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_LabelCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ListboxCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_LowerCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_MenuCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_MenubuttonCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_MessageBoxCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_MessageCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_OptionCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_PackCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_PlaceCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_PropertyCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_RadiobuttonCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_RaiseCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ScaleCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_SelectionCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_TkwaitCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_ToplevelCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_UpdateCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_WinfoObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_WmCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+
+EXTERN int TkTileParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj * value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj * TkTilePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkOffsetParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj * value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj * TkOffsetPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkStateParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj * value,
+ char *widgRec, int offset));
+EXTERN Tcl_Obj * TkStatePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkOrientParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj * value,
+ char *widgRec, int offset));
+EXTERN Tcl_Obj * TkOrientPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkPixelParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj * value,
+ char *widgRec, int offset));
+EXTERN Tcl_Obj * TkPixelPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/port.h b/Master/tlpkg/tlperl/lib/Tk/pTk/port.h
new file mode 100644
index 00000000000..7a66a7c2751
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/port.h
@@ -0,0 +1,32 @@
+/*
+ * Warning, this file was automatically created by the TIFF configure script
+ * VERSION: v3.5.5
+ * DATE: Sun Jul 16 20:21:17 MET DST 2000
+ * TARGET: i386-unknown-linux
+ * CCOMPILER: /usr/bin/gcc-2.7.2.1
+ */
+#ifndef _PORT_
+#define _PORT_ 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <sys/types.h>
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+#define HOST_BIGENDIAN 0
+#define HAVE_MMAP 1
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <fcntl.h>
+typedef double dblparam_t;
+#ifdef __STRICT_ANSI__
+#define INLINE __inline__
+#else
+#define INLINE inline
+#endif
+#define GLOBALDATA(TYPE,NAME) extern TYPE NAME
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tcl.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tcl.h
new file mode 100644
index 00000000000..2770f572bcc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tcl.h
@@ -0,0 +1,2411 @@
+/*
+ * tcl.h --
+ *
+ * This header file describes the externally-visible facilities
+ * of the Tcl interpreter.
+ *
+ * Copyright (c) 1987-1994 The Regents of the University of California.
+ * Copyright (c) 1993-1996 Lucent Technologies.
+ * Copyright (c) 1994-1998 Sun Microsystems, Inc.
+ * Copyright (c) 1998-2000 by Scriptics Corporation.
+ * Copyright (c) 2002 by Kevin B. Kenny. All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tcl.h,v 1.153.2.8 2003/10/22 22:35:46 andreas_kupries Exp $
+ */
+#ifndef _TCL
+#define _TCL
+
+/*
+ * For C++ compilers, use extern "C"
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The following defines are used to indicate the various release levels.
+ */
+
+#define TCL_ALPHA_RELEASE 0
+#define TCL_BETA_RELEASE 1
+#define TCL_FINAL_RELEASE 2
+
+/*
+ * When version numbers change here, must also go into the following files
+ * and update the version numbers:
+ *
+ * library/init.tcl (only if Major.minor changes, not patchlevel) 1 LOC
+ * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
+ * win/configure.in (as above)
+ * win/tcl.m4 (not patchlevel)
+ * win/makefile.vc (not patchlevel) 2 LOC
+ * README (sections 0 and 2)
+ * mac/README (2 LOC, not patchlevel)
+ * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 2 LOC
+ * win/README.binary (sections 0-4)
+ * win/README (not patchlevel) (sections 0 and 2)
+ * unix/tcl.spec (2 LOC Major/Minor, 1 LOC patch)
+ * tests/basic.test (1 LOC M/M, not patchlevel)
+ * tools/tcl.hpj.in (not patchlevel, for windows installer)
+ * tools/tcl.wse.in (for windows installer)
+ * tools/tclSplash.bmp (not patchlevel)
+ */
+#define TCL_MAJOR_VERSION 8
+#define TCL_MINOR_VERSION 4
+#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
+#define TCL_RELEASE_SERIAL 5
+
+#define TCL_VERSION "8.4"
+#define TCL_PATCH_LEVEL "8.4.5"
+
+/*
+ * The following definitions set up the proper options for Windows
+ * compilers. We use this method because there is no autoconf equivalent.
+ */
+
+#ifndef __WIN32__
+# if defined(_WIN32) || defined(WIN32) || defined(__MINGW32__) || defined(__BORLANDC__)
+# define __WIN32__
+# ifndef WIN32
+# define WIN32
+# endif
+# endif
+#endif
+
+/*
+ * STRICT: See MSDN Article Q83456
+ */
+#ifdef __WIN32__
+# ifndef STRICT
+# define STRICT
+# endif
+#endif /* __WIN32__ */
+
+/*
+ * The following definitions set up the proper options for Macintosh
+ * compilers. We use this method because there is no autoconf equivalent.
+ */
+
+#ifdef MAC_TCL
+#include <ConditionalMacros.h>
+# ifndef USE_TCLALLOC
+# define USE_TCLALLOC 1
+# endif
+# ifndef NO_STRERROR
+# define NO_STRERROR 1
+# endif
+# define INLINE
+#endif
+
+
+/*
+ * Utility macros: STRINGIFY takes an argument and wraps it in "" (double
+ * quotation marks), JOIN joins two arguments.
+ */
+#ifndef STRINGIFY
+# define STRINGIFY(x) STRINGIFY1(x)
+# define STRINGIFY1(x) #x
+#endif
+#ifndef JOIN
+# define JOIN(a,b) JOIN1(a,b)
+# define JOIN1(a,b) a##b
+#endif
+
+/*
+ * A special definition used to allow this header file to be included
+ * from windows or mac resource files so that they can obtain version
+ * information. RC_INVOKED is defined by default by the windows RC tool
+ * and manually set for macintosh.
+ *
+ * Resource compilers don't like all the C stuff, like typedefs and
+ * procedure declarations, that occur below, so block them out.
+ */
+
+#ifndef RC_INVOKED
+
+/*
+ * Special macro to define mutexes, that doesn't do anything
+ * if we are not using threads.
+ */
+
+#ifdef TCL_THREADS
+#define TCL_DECLARE_MUTEX(name) static Tcl_Mutex name;
+#else
+#define TCL_DECLARE_MUTEX(name)
+#endif
+
+/*
+ * Macros that eliminate the overhead of the thread synchronization
+ * functions when compiling without thread support.
+ */
+
+#ifndef TCL_THREADS
+#define Tcl_MutexLock(mutexPtr)
+#define Tcl_MutexUnlock(mutexPtr)
+#define Tcl_MutexFinalize(mutexPtr)
+#define Tcl_ConditionNotify(condPtr)
+#define Tcl_ConditionWait(condPtr, mutexPtr, timePtr)
+#define Tcl_ConditionFinalize(condPtr)
+#endif /* TCL_THREADS */
+
+
+#ifndef BUFSIZ
+# include <stdio.h>
+#endif
+
+
+/*
+ * Definitions that allow Tcl functions with variable numbers of
+ * arguments to be used with either varargs.h or stdarg.h. TCL_VARARGS
+ * is used in procedure prototypes. TCL_VARARGS_DEF is used to declare
+ * the arguments in a function definiton: it takes the type and name of
+ * the first argument and supplies the appropriate argument declaration
+ * string for use in the function definition. TCL_VARARGS_START
+ * initializes the va_list data structure and returns the first argument.
+ */
+#if !defined(NO_STDARG)
+# include <stdarg.h>
+# define TCL_VARARGS(type, name) (type name, ...)
+# define TCL_VARARGS_DEF(type, name) (type name, ...)
+# define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
+#else
+# include <varargs.h>
+# define TCL_VARARGS(type, name) ()
+# define TCL_VARARGS_DEF(type, name) (va_alist)
+# define TCL_VARARGS_START(type, name, list) \
+ (va_start(list), va_arg(list, type))
+#endif
+
+/*
+ * Macros used to declare a function to be exported by a DLL.
+ * Used by Windows, maps to no-op declarations on non-Windows systems.
+ * The default build on windows is for a DLL, which causes the DLLIMPORT
+ * and DLLEXPORT macros to be nonempty. To build a static library, the
+ * macro STATIC_BUILD should be defined.
+ */
+
+#ifdef STATIC_BUILD
+# define DLLIMPORT
+# define DLLEXPORT
+#else
+# if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
+# define DLLIMPORT __declspec(dllimport)
+# define DLLEXPORT __declspec(dllexport)
+# else
+# define DLLIMPORT
+# define DLLEXPORT
+# endif
+#endif
+
+/*
+ * These macros are used to control whether functions are being declared for
+ * import or export. If a function is being declared while it is being built
+ * to be included in a shared library, then it should have the DLLEXPORT
+ * storage class. If is being declared for use by a module that is going to
+ * link against the shared library, then it should have the DLLIMPORT storage
+ * class. If the symbol is beind declared for a static build or for use from a
+ * stub library, then the storage class should be empty.
+ *
+ * The convention is that a macro called BUILD_xxxx, where xxxx is the
+ * name of a library we are building, is set on the compile line for sources
+ * that are to be placed in the library. When this macro is set, the
+ * storage class will be set to DLLEXPORT. At the end of the header file, the
+ * storage class will be reset to DLLIMPORT.
+ */
+#undef TCL_STORAGE_CLASS
+#ifdef BUILD_tcl
+# define TCL_STORAGE_CLASS DLLEXPORT
+#else
+# ifdef USE_TCL_STUBS
+# define TCL_STORAGE_CLASS
+# else
+# define TCL_STORAGE_CLASS DLLIMPORT
+# endif
+#endif
+
+
+/*
+ * Definitions that allow this header file to be used either with or
+ * without ANSI C features like function prototypes.
+ */
+#undef _ANSI_ARGS_
+#undef CONST
+#ifndef INLINE
+# define INLINE
+#endif
+
+#ifndef NO_CONST
+# define CONST const
+#else
+# define CONST
+#endif
+
+#ifndef NO_PROTOTYPES
+# define _ANSI_ARGS_(x) x
+#else
+# define _ANSI_ARGS_(x) ()
+#endif
+
+#ifdef USE_NON_CONST
+# ifdef USE_COMPAT_CONST
+# error define at most one of USE_NON_CONST and USE_COMPAT_CONST
+# endif
+# define CONST84
+# define CONST84_RETURN
+#else
+# ifdef USE_COMPAT_CONST
+# define CONST84
+# define CONST84_RETURN CONST
+# else
+# define CONST84 CONST
+# define CONST84_RETURN CONST
+# endif
+#endif
+
+
+/*
+ * Make sure EXTERN isn't defined elsewhere
+ */
+#ifdef EXTERN
+# undef EXTERN
+#endif /* EXTERN */
+
+#ifdef __cplusplus
+# define EXTERN extern "C" TCL_STORAGE_CLASS
+#else
+# define EXTERN extern TCL_STORAGE_CLASS
+#endif
+
+
+/*
+ * The following code is copied from winnt.h.
+ * If we don't replicate it here, then <windows.h> can't be included
+ * after tcl.h, since tcl.h also defines VOID.
+ * This block is skipped under Cygwin and Mingw.
+ *
+ *
+ */
+#if defined(__WIN32__) && !defined(HAVE_WINNT_IGNORE_VOID)
+#ifndef VOID
+#define VOID void
+typedef char CHAR;
+typedef short SHORT;
+typedef long LONG;
+#endif
+#endif /* __WIN32__ && !HAVE_WINNT_IGNORE_VOID */
+
+/*
+ * Macro to use instead of "void" for arguments that must have
+ * type "void *" in ANSI C; maps them to type "char *" in
+ * non-ANSI systems.
+ */
+
+#ifndef NO_VOID
+# define VOID void
+#else
+# define VOID char
+#endif
+
+/*
+ * Miscellaneous declarations.
+ */
+#ifndef NULL
+# define NULL 0
+#endif
+
+#ifndef _CLIENTDATA
+# ifndef NO_VOID
+ typedef void *ClientData;
+# else
+ typedef int *ClientData;
+# endif
+# define _CLIENTDATA
+#endif
+
+/*
+ * Define Tcl_WideInt to be a type that is (at least) 64-bits wide,
+ * and define Tcl_WideUInt to be the unsigned variant of that type
+ * (assuming that where we have one, we can have the other.)
+ *
+ * Also defines the following macros:
+ * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on
+ * a real 64-bit system.)
+ * Tcl_WideAsLong - forgetful converter from wideInt to long.
+ * Tcl_LongAsWide - sign-extending converter from long to wideInt.
+ * Tcl_WideAsDouble - converter from wideInt to double.
+ * Tcl_DoubleAsWide - converter from double to wideInt.
+ *
+ * The following invariant should hold for any long value 'longVal':
+ * longVal == Tcl_WideAsLong(Tcl_LongAsWide(longVal))
+ *
+ * Note on converting between Tcl_WideInt and strings. This
+ * implementation (in tclObj.c) depends on the functions strtoull()
+ * and sprintf(...,"%" TCL_LL_MODIFIER "d",...). TCL_LL_MODIFIER_SIZE
+ * is the length of the modifier string, which is "ll" on most 32-bit
+ * Unix systems. It has to be split up like this to allow for the more
+ * complex formats sometimes needed (e.g. in the format(n) command.)
+ */
+
+#if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG)
+# if defined(__CYGWIN__)
+# define TCL_WIDE_INT_TYPE long long
+# define TCL_LL_MODIFIER "L"
+typedef struct stat Tcl_StatBuf;
+# define TCL_LL_MODIFIER_SIZE 1
+# elif defined(__WIN32__)
+# define TCL_WIDE_INT_TYPE __int64
+# ifdef __BORLANDC__
+typedef struct stati64 Tcl_StatBuf;
+# define TCL_LL_MODIFIER "L"
+# define TCL_LL_MODIFIER_SIZE 1
+# else /* __BORLANDC__ */
+typedef struct _stati64 Tcl_StatBuf;
+# define TCL_LL_MODIFIER "I64"
+# define TCL_LL_MODIFIER_SIZE 3
+# endif /* __BORLANDC__ */
+# else /* __WIN32__ */
+/*
+ * Don't know what platform it is and configure hasn't discovered what
+ * is going on for us. Try to guess...
+ */
+# ifdef NO_LIMITS_H
+# error please define either TCL_WIDE_INT_TYPE or TCL_WIDE_INT_IS_LONG
+# else /* !NO_LIMITS_H */
+# include <limits.h>
+# if (INT_MAX < LONG_MAX)
+# define TCL_WIDE_INT_IS_LONG 1
+# else
+# define TCL_WIDE_INT_TYPE long long
+# endif
+# endif /* NO_LIMITS_H */
+# endif /* __WIN32__ */
+#endif /* !TCL_WIDE_INT_TYPE & !TCL_WIDE_INT_IS_LONG */
+#ifdef TCL_WIDE_INT_IS_LONG
+# undef TCL_WIDE_INT_TYPE
+# define TCL_WIDE_INT_TYPE long
+#endif /* TCL_WIDE_INT_IS_LONG */
+
+typedef TCL_WIDE_INT_TYPE Tcl_WideInt;
+typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
+
+#ifdef TCL_WIDE_INT_IS_LONG
+typedef struct stat Tcl_StatBuf;
+# define Tcl_WideAsLong(val) ((long)(val))
+# define Tcl_LongAsWide(val) ((long)(val))
+# define Tcl_WideAsDouble(val) ((double)((long)(val)))
+# define Tcl_DoubleAsWide(val) ((long)((double)(val)))
+# ifndef TCL_LL_MODIFIER
+# define TCL_LL_MODIFIER "l"
+# define TCL_LL_MODIFIER_SIZE 1
+# endif /* !TCL_LL_MODIFIER */
+#else /* TCL_WIDE_INT_IS_LONG */
+/*
+ * The next short section of defines are only done when not running on
+ * Windows or some other strange platform.
+ */
+# ifndef TCL_LL_MODIFIER
+# ifdef HAVE_STRUCT_STAT64
+typedef struct stat64 Tcl_StatBuf;
+# else
+typedef struct stat Tcl_StatBuf;
+# endif /* HAVE_STRUCT_STAT64 */
+# define TCL_LL_MODIFIER "ll"
+# define TCL_LL_MODIFIER_SIZE 2
+# endif /* !TCL_LL_MODIFIER */
+# define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val)))
+# define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val)))
+# define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
+# define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
+#endif /* TCL_WIDE_INT_IS_LONG */
+
+
+/*
+ * This flag controls whether binary compatability is maintained with
+ * extensions built against a previous version of Tcl. This is true
+ * by default.
+ */
+#ifndef TCL_PRESERVE_BINARY_COMPATABILITY
+# define TCL_PRESERVE_BINARY_COMPATABILITY 1
+#endif
+
+
+/*
+ * Data structures defined opaquely in this module. The definitions below
+ * just provide dummy types. A few fields are made visible in Tcl_Interp
+ * structures, namely those used for returning a string result from
+ * commands. Direct access to the result field is discouraged in Tcl 8.0.
+ * The interpreter result is either an object or a string, and the two
+ * values are kept consistent unless some C code sets interp->result
+ * directly. Programmers should use either the procedure Tcl_GetObjResult()
+ * or Tcl_GetStringResult() to read the interpreter's result. See the
+ * SetResult man page for details.
+ *
+ * Note: any change to the Tcl_Interp definition below must be mirrored
+ * in the "real" definition in tclInt.h.
+ *
+ * Note: Tcl_ObjCmdProc procedures do not directly set result and freeProc.
+ * Instead, they set a Tcl_Obj member in the "real" structure that can be
+ * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
+ */
+
+#ifndef Tcl_Interp
+typedef struct Tcl_Interp
+#ifdef USE_TCL_STRUCT
+{
+ char *result; /* If the last command returned a string
+ * result, this points to it. */
+ void (*freeProc) _ANSI_ARGS_((char *blockPtr));
+ /* Zero means the string result is
+ * statically allocated. TCL_DYNAMIC means
+ * it was allocated with ckalloc and should
+ * be freed with ckfree. Other values give
+ * the address of procedure to invoke to
+ * free the result. Tcl_Eval must free it
+ * before executing next command. */
+ int errorLine; /* When TCL_ERROR is returned, this gives
+ * the line number within the command where
+ * the error occurred (1 if first line). */
+}
+#endif
+Tcl_Interp;
+#endif
+
+typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
+#ifndef Tcl_Channel
+typedef struct Tcl_Channel_ *Tcl_Channel;
+#endif
+#ifndef Tcl_Command
+typedef struct Tcl_Command_ *Tcl_Command;
+#endif
+typedef struct Tcl_Condition_ *Tcl_Condition;
+typedef struct Tcl_EncodingState_ *Tcl_EncodingState;
+typedef struct Tcl_Encoding_ *Tcl_Encoding;
+typedef struct Tcl_Event Tcl_Event;
+typedef struct Tcl_Mutex_ *Tcl_Mutex;
+typedef struct Tcl_Pid_ *Tcl_Pid;
+#ifndef Tcl_RegExp
+typedef struct Tcl_RegExp_ *Tcl_RegExp;
+#endif
+typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey;
+typedef struct Tcl_ThreadId_ *Tcl_ThreadId;
+typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
+typedef struct Tcl_Trace_ *Tcl_Trace;
+typedef struct Tcl_Var_ *Tcl_Var;
+typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion;
+typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle;
+
+/*
+ * Definition of the interface to procedures implementing threads.
+ * A procedure following this definition is given to each call of
+ * 'Tcl_CreateThread' and will be called as the main fuction of
+ * the new thread created by that call.
+ */
+#ifdef MAC_TCL
+typedef pascal void *(Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
+#elif defined __WIN32__
+typedef unsigned (__stdcall Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
+#else
+typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData));
+#endif
+
+
+/*
+ * Threading function return types used for abstracting away platform
+ * differences when writing a Tcl_ThreadCreateProc. See the NewThread
+ * function in generic/tclThreadTest.c for it's usage.
+ */
+#ifdef MAC_TCL
+# define Tcl_ThreadCreateType pascal void *
+# define TCL_THREAD_CREATE_RETURN return NULL
+#elif defined __WIN32__
+# define Tcl_ThreadCreateType unsigned __stdcall
+# define TCL_THREAD_CREATE_RETURN return 0
+#else
+# define Tcl_ThreadCreateType void
+# define TCL_THREAD_CREATE_RETURN
+#endif
+
+
+/*
+ * Definition of values for default stacksize and the possible flags to be
+ * given to Tcl_CreateThread.
+ */
+#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack */
+#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default behaviour */
+#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable */
+
+/*
+ * Flag values passed to Tcl_GetRegExpFromObj.
+ */
+#define TCL_REG_BASIC 000000 /* BREs (convenience) */
+#define TCL_REG_EXTENDED 000001 /* EREs */
+#define TCL_REG_ADVF 000002 /* advanced features in EREs */
+#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs) */
+#define TCL_REG_QUOTE 000004 /* no special characters, none */
+#define TCL_REG_NOCASE 000010 /* ignore case */
+#define TCL_REG_NOSUB 000020 /* don't care about subexpressions */
+#define TCL_REG_EXPANDED 000040 /* expanded format, white space &
+ * comments */
+#define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */
+#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before */
+#define TCL_REG_NEWLINE 000300 /* newlines are line terminators */
+#define TCL_REG_CANMATCH 001000 /* report details on partial/limited
+ * matches */
+
+/*
+ * The following flag is experimental and only intended for use by Expect. It
+ * will probably go away in a later release.
+ */
+#define TCL_REG_BOSONLY 002000 /* prepend \A to pattern so it only
+ * matches at the beginning of the
+ * string. */
+
+/*
+ * Flags values passed to Tcl_RegExpExecObj.
+ */
+#define TCL_REG_NOTBOL 0001 /* Beginning of string does not match ^. */
+#define TCL_REG_NOTEOL 0002 /* End of string does not match $. */
+
+/*
+ * Structures filled in by Tcl_RegExpInfo. Note that all offset values are
+ * relative to the start of the match string, not the beginning of the
+ * entire string.
+ */
+typedef struct Tcl_RegExpIndices {
+ long start; /* character offset of first character in match */
+ long end; /* character offset of first character after the
+ * match. */
+} Tcl_RegExpIndices;
+
+typedef struct Tcl_RegExpInfo {
+ int nsubs; /* number of subexpressions in the
+ * compiled expression */
+ Tcl_RegExpIndices *matches; /* array of nsubs match offset
+ * pairs */
+ long extendStart; /* The offset at which a subsequent
+ * match might begin. */
+ long reserved; /* Reserved for later use. */
+} Tcl_RegExpInfo;
+
+/*
+ * Picky compilers complain if this typdef doesn't appear before the
+ * struct's reference in tclDecls.h.
+ */
+typedef Tcl_StatBuf *Tcl_Stat_;
+typedef struct stat *Tcl_OldStat_;
+
+/*
+ * When a TCL command returns, the interpreter contains a result from the
+ * command. Programmers are strongly encouraged to use one of the
+ * procedures Tcl_GetObjResult() or Tcl_GetStringResult() to read the
+ * interpreter's result. See the SetResult man page for details. Besides
+ * this result, the command procedure returns an integer code, which is
+ * one of the following:
+ *
+ * TCL_OK Command completed normally; the interpreter's
+ * result contains the command's result.
+ * TCL_ERROR The command couldn't be completed successfully;
+ * the interpreter's result describes what went wrong.
+ * TCL_RETURN The command requests that the current procedure
+ * return; the interpreter's result contains the
+ * procedure's return value.
+ * TCL_BREAK The command requests that the innermost loop
+ * be exited; the interpreter's result is meaningless.
+ * TCL_CONTINUE Go on to the next iteration of the current loop;
+ * the interpreter's result is meaningless.
+ */
+#define TCL_OK 0
+#define TCL_ERROR 1
+#define TCL_RETURN 2
+#define TCL_BREAK 3
+#define TCL_CONTINUE 4
+
+#define TCL_RESULT_SIZE 200
+
+/*
+ * Flags to control what substitutions are performed by Tcl_SubstObj():
+ */
+#define TCL_SUBST_COMMANDS 001
+#define TCL_SUBST_VARIABLES 002
+#define TCL_SUBST_BACKSLASHES 004
+#define TCL_SUBST_ALL 007
+
+
+/*
+ * Argument descriptors for math function callbacks in expressions:
+ */
+typedef enum {
+ TCL_INT, TCL_DOUBLE, TCL_EITHER, TCL_WIDE_INT
+} Tcl_ValueType;
+typedef struct Tcl_Value {
+ Tcl_ValueType type; /* Indicates intValue or doubleValue is
+ * valid, or both. */
+ long intValue; /* Integer value. */
+ double doubleValue; /* Double-precision floating value. */
+ Tcl_WideInt wideValue; /* Wide (min. 64-bit) integer value. */
+} Tcl_Value;
+
+/*
+ * Forward declaration of Tcl_Obj to prevent an error when the forward
+ * reference to Tcl_Obj is encountered in the procedure types declared
+ * below.
+ */
+#ifndef Tcl_Obj
+typedef struct Tcl_Obj Tcl_Obj;
+#endif
+
+/*
+ * Procedure types defined by Tcl:
+ */
+
+typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
+typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int code));
+typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
+typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
+typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
+typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char *argv[]));
+typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
+ ClientData cmdClientData, int argc, CONST84 char *argv[]));
+typedef int (Tcl_CmdObjTraceProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int level, CONST char *command,
+ Tcl_Command commandInfo, int objc, Tcl_Obj * CONST * objv));
+typedef void (Tcl_CmdObjTraceDeleteProc) _ANSI_ARGS_((ClientData clientData));
+typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((Tcl_Obj *srcPtr,
+ Tcl_Obj *dupPtr));
+typedef int (Tcl_EncodingConvertProc)_ANSI_ARGS_((ClientData clientData,
+ CONST char *src, int srcLen, int flags, Tcl_EncodingState *statePtr,
+ char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr,
+ int *dstCharsPtr));
+typedef void (Tcl_EncodingFreeProc)_ANSI_ARGS_((ClientData clientData));
+typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
+typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
+ int flags));
+typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
+ ClientData clientData));
+typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
+ int flags));
+typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
+typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
+typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
+typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((Tcl_Obj *objPtr));
+typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
+typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
+typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp));
+typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
+typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
+typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc, Tcl_Obj * CONST * objv));
+typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
+typedef void (Tcl_PanicProc) _ANSI_ARGS_(TCL_VARARGS(CONST char *, format));
+typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
+ Tcl_Channel chan, char *address, int port));
+typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
+typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *objPtr));
+typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((Tcl_Obj *objPtr));
+typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, CONST84 char *part1, CONST84 char *part2, int flags));
+typedef void (Tcl_CommandTraceProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, CONST char *oldName, CONST char *newName,
+ int flags));
+typedef void (Tcl_CreateFileHandlerProc) _ANSI_ARGS_((int fd, int mask,
+ Tcl_FileProc *proc, ClientData clientData));
+typedef void (Tcl_DeleteFileHandlerProc) _ANSI_ARGS_((int fd));
+typedef void (Tcl_AlertNotifierProc) _ANSI_ARGS_((ClientData clientData));
+typedef void (Tcl_ServiceModeHookProc) _ANSI_ARGS_((int mode));
+typedef ClientData (Tcl_InitNotifierProc) _ANSI_ARGS_((VOID));
+typedef void (Tcl_FinalizeNotifierProc) _ANSI_ARGS_((ClientData clientData));
+typedef void (Tcl_MainLoopProc) _ANSI_ARGS_((void));
+
+
+/*
+ * The following structure represents a type of object, which is a
+ * particular internal representation for an object plus a set of
+ * procedures that provide standard operations on objects of that type.
+ */
+
+typedef struct Tcl_ObjType
+{
+ char *name; /* Name of the type, e.g. "int". */
+ Tcl_FreeInternalRepProc *freeIntRepProc;
+ /* Called to free any storage for the type's
+ * internal rep. NULL if the internal rep
+ * does not need freeing. */
+ Tcl_DupInternalRepProc *dupIntRepProc;
+ /* Called to create a new object as a copy
+ * of an existing object. */
+ Tcl_UpdateStringProc *updateStringProc;
+ /* Called to update the string rep from the
+ * type's internal representation. */
+ Tcl_SetFromAnyProc *setFromAnyProc;
+ /* Called to convert the object's internal
+ * rep to this type. Frees the internal rep
+ * of the old type. Returns TCL_ERROR on
+ * failure. */
+}
+Tcl_ObjType;
+
+
+/*
+ * One of the following structures exists for each object in the Tcl
+ * system. An object stores a value as either a string, some internal
+ * representation, or both.
+ */
+
+#ifndef Tcl_Obj
+#ifdef USE_TCL_STRUCT
+struct Tcl_Obj {
+ int refCount; /* When 0 the object will be freed. */
+ char *bytes; /* This points to the first byte of the
+ * object's string representation. The array
+ * must be followed by a null byte (i.e., at
+ * offset length) but may also contain
+ * embedded null characters. The array's
+ * storage is allocated by ckalloc. NULL
+ * means the string rep is invalid and must
+ * be regenerated from the internal rep.
+ * Clients should use Tcl_GetStringFromObj
+ * or Tcl_GetString to get a pointer to the
+ * byte array as a readonly value. */
+ int length; /* The number of bytes at *bytes, not
+ * including the terminating null. */
+ Tcl_ObjType *typePtr; /* Denotes the object's type. Always
+ * corresponds to the type of the object's
+ * internal rep. NULL indicates the object
+ * has no internal rep (has no type). */
+ union { /* The internal representation: */
+ long longValue; /* - an long integer value */
+ double doubleValue; /* - a double-precision floating value */
+ VOID *otherValuePtr; /* - another, type-specific value */
+ Tcl_WideInt wideValue; /* - a long long value */
+ struct { /* - internal rep as two pointers */
+ VOID *ptr1;
+ VOID *ptr2;
+ } twoPtrValue;
+ } internalRep;
+};
+
+#define TclObjInternal(o) (&((o)->internalRep))
+#define TclObjGetType(o) ((o)->typePtr)
+#define TclObjSetType(o,t) ((o)->typePtr = (t))
+#define TclObjLength(o) ((o)->length)
+
+#endif
+#endif
+
+#ifndef USE_TCL_STRUCT
+typedef union { /* The internal representation: */
+ long longValue; /* - an long integer value */
+ double doubleValue; /* - a double-precision floating value */
+ VOID *otherValuePtr; /* - another, type-specific value */
+ struct { /* - internal rep as two pointers */
+ VOID *ptr1;
+ VOID *ptr2;
+ } twoPtrValue;
+} Tcl_InternalRep;
+#endif
+
+#ifndef TclObjGetType
+EXTERN Tcl_ObjType * TclObjGetType _ANSI_ARGS_((Tcl_Obj *objPtr));
+#endif
+#ifndef TclObjLength
+EXTERN int TclObjLength _ANSI_ARGS_((Tcl_Obj *objPtr));
+#endif
+#ifndef TclObjSetType
+EXTERN void TclObjSetType _ANSI_ARGS_((Tcl_Obj *objPtr,Tcl_ObjType *newType));
+#endif
+#ifndef TclObjInternal
+EXTERN Tcl_InternalRep * TclObjInternal _ANSI_ARGS_((Tcl_Obj *objPtr));
+#endif
+
+
+/*
+ * Macros to increment and decrement a Tcl_Obj's reference count, and to
+ * test whether an object is shared (i.e. has reference count > 1).
+ * Note: clients should use Tcl_DecrRefCount() when they are finished using
+ * an object, and should never call TclFreeObj() directly. TclFreeObj() is
+ * only defined and made public in tcl.h to support Tcl_DecrRefCount's macro
+ * definition. Note also that Tcl_DecrRefCount() refers to the parameter
+ * "obj" twice. This means that you should avoid calling it with an
+ * expression that is expensive to compute or has side effects.
+ */
+
+EXTERN void Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
+EXTERN void Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
+EXTERN int Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
+
+#ifdef USE_TCL_STRUCT
+#ifdef TCL_MEM_DEBUG
+# define Tcl_IncrRefCount(objPtr) \
+ Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
+# define Tcl_DecrRefCount(objPtr) \
+ Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
+# define Tcl_IsShared(objPtr) \
+ Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
+#else
+# define Tcl_IncrRefCount(objPtr) \
+ ++(objPtr)->refCount
+# define Tcl_DecrRefCount(objPtr) \
+ if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)
+# define Tcl_IsShared(objPtr) \
+ ((objPtr)->refCount > 1)
+#endif
+#endif
+
+/*
+ * Macros and definitions that help to debug the use of Tcl objects.
+ * When TCL_MEM_DEBUG is defined, the Tcl_New declarations are
+ * overridden to call debugging versions of the object creation procedures.
+ */
+
+#ifndef _LANG
+#ifdef TCL_MEM_DEBUG
+# define Tcl_NewBooleanObj(val) \
+ Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
+# define Tcl_NewByteArrayObj(bytes, len) \
+ Tcl_DbNewByteArrayObj(bytes, len, __FILE__, __LINE__)
+# define Tcl_NewDoubleObj(val) \
+ Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
+# define Tcl_NewIntObj(val) \
+ Tcl_DbNewLongObj(val, __FILE__, __LINE__)
+# define Tcl_NewListObj(objc, objv) \
+ Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
+# define Tcl_NewLongObj(val) \
+ Tcl_DbNewLongObj(val, __FILE__, __LINE__)
+# define Tcl_NewObj() \
+ Tcl_DbNewObj(__FILE__, __LINE__)
+# define Tcl_NewStringObj(bytes, len) \
+ Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
+# define Tcl_NewWideIntObj(val) \
+ Tcl_DbNewWideIntObj(val, __FILE__, __LINE__)
+#endif /* TCL_MEM_DEBUG */
+#endif
+
+
+/*
+ * The following structure contains the state needed by
+ * Tcl_SaveResult. No-one outside of Tcl should access any of these
+ * fields. This structure is typically allocated on the stack.
+ */
+typedef struct Tcl_SavedResult
+#ifdef USE_TCL_STRUCT
+{
+ char *result;
+ Tcl_FreeProc *freeProc;
+ Tcl_Obj *objResultPtr;
+ char *appendResult;
+ int appendAvl;
+ int appendUsed;
+ char resultSpace[TCL_RESULT_SIZE+1];
+}
+#endif
+Tcl_SavedResult;
+
+
+/*
+ * The following definitions support Tcl's namespace facility.
+ * Note: the first five fields must match exactly the fields in a
+ * Namespace structure (see tclInt.h).
+ */
+
+typedef struct Tcl_Namespace
+#ifdef USE_TCL_STRUCT
+{
+ char *name; /* The namespace's name within its parent
+ * namespace. This contains no ::'s. The
+ * name of the global namespace is ""
+ * although "::" is an synonym. */
+ char *fullName; /* The namespace's fully qualified name.
+ * This starts with ::. */
+ ClientData clientData; /* Arbitrary value associated with this
+ * namespace. */
+ Tcl_NamespaceDeleteProc* deleteProc;
+ /* Procedure invoked when deleting the
+ * namespace to, e.g., free clientData. */
+ struct Tcl_Namespace* parentPtr;
+ /* Points to the namespace that contains
+ * this one. NULL if this is the global
+ * namespace. */
+}
+#endif
+Tcl_Namespace;
+
+
+/*
+ * The following structure represents a call frame, or activation record.
+ * A call frame defines a naming context for a procedure call: its local
+ * scope (for local variables) and its namespace scope (used for non-local
+ * variables; often the global :: namespace). A call frame can also define
+ * the naming context for a namespace eval or namespace inscope command:
+ * the namespace in which the command's code should execute. The
+ * Tcl_CallFrame structures exist only while procedures or namespace
+ * eval/inscope's are being executed, and provide a Tcl call stack.
+ *
+ * A call frame is initialized and pushed using Tcl_PushCallFrame and
+ * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
+ * provided by the Tcl_PushCallFrame caller, and callers typically allocate
+ * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
+ * is defined as a structure and not as an opaque token. However, most
+ * Tcl_CallFrame fields are hidden since applications should not access
+ * them directly; others are declared as "dummyX".
+ *
+ * WARNING!! The structure definition must be kept consistent with the
+ * CallFrame structure in tclInt.h. If you change one, change the other.
+ */
+
+typedef struct Tcl_CallFrame
+#ifdef USE_TCL_STRUCT
+{
+ Tcl_Namespace *nsPtr;
+ int dummy1;
+ int dummy2;
+ char *dummy3;
+ char *dummy4;
+ char *dummy5;
+ int dummy6;
+ char *dummy7;
+ char *dummy8;
+ int dummy9;
+ char* dummy10;
+}
+#endif
+Tcl_CallFrame;
+
+
+/*
+ * Information about commands that is returned by Tcl_GetCommandInfo and
+ * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based
+ * command procedure while proc is a traditional Tcl argc/argv
+ * string-based procedure. Tcl_CreateObjCommand and Tcl_CreateCommand
+ * ensure that both objProc and proc are non-NULL and can be called to
+ * execute the command. However, it may be faster to call one instead of
+ * the other. The member isNativeObjectProc is set to 1 if an
+ * object-based procedure was registered by Tcl_CreateObjCommand, and to
+ * 0 if a string-based procedure was registered by Tcl_CreateCommand.
+ * The other procedure is typically set to a compatibility wrapper that
+ * does string-to-object or object-to-string argument conversions then
+ * calls the other procedure.
+ */
+
+typedef struct Tcl_CmdInfo {
+ int isNativeObjectProc; /* 1 if objProc was registered by a call to
+ * Tcl_CreateObjCommand; 0 otherwise.
+ * Tcl_SetCmdInfo does not modify this
+ * field. */
+ Tcl_ObjCmdProc *objProc; /* Command's object-based procedure. */
+ ClientData objClientData; /* ClientData for object proc. */
+ Tcl_CmdProc *proc; /* Command's string-based procedure. */
+ ClientData clientData; /* ClientData for string proc. */
+ Tcl_CmdDeleteProc *deleteProc;
+ /* Procedure to call when command is
+ * deleted. */
+ ClientData deleteData; /* Value to pass to deleteProc (usually
+ * the same as clientData). */
+ Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
+ * this command. Note that Tcl_SetCmdInfo
+ * will not change a command's namespace;
+ * use Tcl_RenameCommand to do that. */
+
+} Tcl_CmdInfo;
+
+/*
+ * The structure defined below is used to hold dynamic strings. The only
+ * field that clients should use is the string field, accessible via the
+ * macro Tcl_DStringValue.
+ */
+
+#ifndef Tcl_DString
+#define TCL_DSTRING_STATIC_SIZE 200
+#ifdef USE_TCL_STRUCT
+typedef struct Tcl_DString {
+ char *string; /* Points to beginning of string: either
+ * staticSpace below or a malloced array. */
+ int length; /* Number of non-NULL characters in the
+ * string. */
+ int spaceAvl; /* Total number of bytes available for the
+ * string and its terminating NULL char. */
+ char staticSpace[TCL_DSTRING_STATIC_SIZE];
+ /* Space to use in common case where string
+ * is small. */
+} Tcl_DString;
+#else
+typedef Tcl_Obj *Tcl_DString;
+#endif
+#endif
+
+#ifdef USE_TCL_STRUCT
+#define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
+#define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
+#endif
+#define Tcl_DStringTrunc Tcl_DStringSetLength
+
+/*
+ * Definitions for the maximum number of digits of precision that may
+ * be specified in the "tcl_precision" variable, and the number of
+ * bytes of buffer space required by Tcl_PrintDouble.
+ */
+#define TCL_MAX_PREC 17
+#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
+
+/*
+ * Definition for a number of bytes of buffer space sufficient to hold the
+ * string representation of an integer in base 10 (assuming the existence
+ * of 64-bit integers).
+ */
+#define TCL_INTEGER_SPACE 24
+
+/*
+ * Flag that may be passed to Tcl_ConvertElement to force it not to
+ * output braces (careful! if you change this flag be sure to change
+ * the definitions at the front of tclUtil.c).
+ */
+#define TCL_DONT_USE_BRACES 1
+
+/*
+ * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
+ * abbreviated strings.
+ */
+#define TCL_EXACT 1
+
+/*
+ * Flag values passed to Tcl_RecordAndEval and/or Tcl_EvalObj.
+ * WARNING: these bit choices must not conflict with the bit choices
+ * for evalFlag bits in tclInt.h!!
+ */
+#define TCL_NO_EVAL 0x10000
+#define TCL_EVAL_GLOBAL 0x20000
+#define TCL_EVAL_DIRECT 0x40000
+#define TCL_EVAL_INVOKE 0x80000
+
+/*
+ * Special freeProc values that may be passed to Tcl_SetResult (see
+ * the man page for details):
+ */
+#define TCL_VOLATILE ((Tcl_FreeProc *) 1)
+#define TCL_STATIC ((Tcl_FreeProc *) 0)
+#define TCL_DYNAMIC ((Tcl_FreeProc *) 3)
+
+/*
+ * Flag values passed to variable-related procedures.
+ */
+#define TCL_GLOBAL_ONLY 1
+#define TCL_NAMESPACE_ONLY 2
+#define TCL_APPEND_VALUE 4
+#define TCL_LIST_ELEMENT 8
+#define TCL_TRACE_READS 0x10
+#define TCL_TRACE_WRITES 0x20
+#define TCL_TRACE_UNSETS 0x40
+#define TCL_TRACE_DESTROYED 0x80
+#define TCL_INTERP_DESTROYED 0x100
+#define TCL_LEAVE_ERR_MSG 0x200
+#define TCL_TRACE_ARRAY 0x800
+#ifndef TCL_REMOVE_OBSOLETE_TRACES
+/* Required to support old variable/vdelete/vinfo traces */
+#define TCL_TRACE_OLD_STYLE 0x1000
+#endif
+/* Indicate the semantics of the result of a trace */
+#define TCL_TRACE_RESULT_DYNAMIC 0x8000
+#define TCL_TRACE_RESULT_OBJECT 0x10000
+
+/*
+ * Flag values passed to command-related procedures.
+ */
+
+#define TCL_TRACE_RENAME 0x2000
+#define TCL_TRACE_DELETE 0x4000
+
+#define TCL_ALLOW_INLINE_COMPILATION 0x20000
+
+/*
+ * Flag values passed to Tcl_CreateObjTrace, and used internally
+ * by command execution traces. Slots 4,8,16 and 32 are
+ * used internally by execution traces (see tclCmdMZ.c)
+ */
+#define TCL_TRACE_ENTER_EXEC 1
+#define TCL_TRACE_LEAVE_EXEC 2
+
+/*
+ * The TCL_PARSE_PART1 flag is deprecated and has no effect.
+ * The part1 is now always parsed whenever the part2 is NULL.
+ * (This is to avoid a common error when converting code to
+ * use the new object based APIs and forgetting to give the
+ * flag)
+ */
+#ifndef TCL_NO_DEPRECATED
+# define TCL_PARSE_PART1 0x400
+#endif
+
+
+/*
+ * Types for linked variables:
+ */
+#define TCL_LINK_INT 1
+#define TCL_LINK_DOUBLE 2
+#define TCL_LINK_BOOLEAN 3
+#define TCL_LINK_STRING 4
+#define TCL_LINK_WIDE_INT 5
+#define TCL_LINK_READ_ONLY 0x80
+
+
+/*
+ * Forward declarations of Tcl_HashTable and related types.
+ */
+typedef struct Tcl_HashKeyType Tcl_HashKeyType;
+typedef struct Tcl_HashTable Tcl_HashTable;
+typedef struct Tcl_HashEntry Tcl_HashEntry;
+
+typedef unsigned int (Tcl_HashKeyProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr,
+ VOID *keyPtr));
+typedef int (Tcl_CompareHashKeysProc) _ANSI_ARGS_((VOID *keyPtr,
+ Tcl_HashEntry *hPtr));
+typedef Tcl_HashEntry *(Tcl_AllocHashEntryProc) _ANSI_ARGS_((
+ Tcl_HashTable *tablePtr, VOID *keyPtr));
+typedef void (Tcl_FreeHashEntryProc) _ANSI_ARGS_((Tcl_HashEntry *hPtr));
+
+/*
+ * This flag controls whether the hash table stores the hash of a key, or
+ * recalculates it. There should be no reason for turning this flag off
+ * as it is completely binary and source compatible unless you directly
+ * access the bucketPtr member of the Tcl_HashTableEntry structure. This
+ * member has been removed and the space used to store the hash value.
+ */
+#ifndef TCL_HASH_KEY_STORE_HASH
+# define TCL_HASH_KEY_STORE_HASH 1
+#endif
+
+/*
+ * Structure definition for an entry in a hash table. No-one outside
+ * Tcl should access any of these fields directly; use the macros
+ * defined below.
+ */
+
+struct Tcl_HashEntry {
+ Tcl_HashEntry *nextPtr; /* Pointer to next entry in this
+ * hash bucket, or NULL for end of
+ * chain. */
+ Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */
+#if TCL_HASH_KEY_STORE_HASH
+# if TCL_PRESERVE_BINARY_COMPATABILITY
+ VOID *hash; /* Hash value, stored as pointer to
+ * ensure that the offsets of the
+ * fields in this structure are not
+ * changed. */
+# else
+ unsigned int hash; /* Hash value. */
+# endif
+#else
+ Tcl_HashEntry **bucketPtr; /* Pointer to bucket that points to
+ * first entry in this entry's chain:
+ * used for deleting the entry. */
+#endif
+ ClientData clientData; /* Application stores something here
+ * with Tcl_SetHashValue. */
+ union { /* Key has one of these forms: */
+ char *oneWordValue; /* One-word value for key. */
+ Tcl_Obj *objPtr; /* Tcl_Obj * key value. */
+ int words[1]; /* Multiple integer words for key.
+ * The actual size will be as large
+ * as necessary for this table's
+ * keys. */
+ char string[4]; /* String for key. The actual size
+ * will be as large as needed to hold
+ * the key. */
+ } key; /* MUST BE LAST FIELD IN RECORD!! */
+};
+
+/*
+ * Flags used in Tcl_HashKeyType.
+ *
+ * TCL_HASH_KEY_RANDOMIZE_HASH:
+ * There are some things, pointers for example
+ * which don't hash well because they do not use
+ * the lower bits. If this flag is set then the
+ * hash table will attempt to rectify this by
+ * randomising the bits and then using the upper
+ * N bits as the index into the table.
+ */
+#define TCL_HASH_KEY_RANDOMIZE_HASH 0x1
+
+/*
+ * Structure definition for the methods associated with a hash table
+ * key type.
+ */
+#define TCL_HASH_KEY_TYPE_VERSION 1
+struct Tcl_HashKeyType {
+ int version; /* Version of the table. If this structure is
+ * extended in future then the version can be
+ * used to distinguish between different
+ * structures.
+ */
+
+ int flags; /* Flags, see above for details. */
+
+ /* Calculates a hash value for the key. If this is NULL then the pointer
+ * itself is used as a hash value.
+ */
+ Tcl_HashKeyProc *hashKeyProc;
+
+ /* Compares two keys and returns zero if they do not match, and non-zero
+ * if they do. If this is NULL then the pointers are compared.
+ */
+ Tcl_CompareHashKeysProc *compareKeysProc;
+
+ /* Called to allocate memory for a new entry, i.e. if the key is a
+ * string then this could allocate a single block which contains enough
+ * space for both the entry and the string. Only the key field of the
+ * allocated Tcl_HashEntry structure needs to be filled in. If something
+ * else needs to be done to the key, i.e. incrementing a reference count
+ * then that should be done by this function. If this is NULL then Tcl_Alloc
+ * is used to allocate enough space for a Tcl_HashEntry and the key pointer
+ * is assigned to key.oneWordValue.
+ */
+ Tcl_AllocHashEntryProc *allocEntryProc;
+
+ /* Called to free memory associated with an entry. If something else needs
+ * to be done to the key, i.e. decrementing a reference count then that
+ * should be done by this function. If this is NULL then Tcl_Free is used
+ * to free the Tcl_HashEntry.
+ */
+ Tcl_FreeHashEntryProc *freeEntryProc;
+};
+
+/*
+ * Structure definition for a hash table. Must be in tcl.h so clients
+ * can allocate space for these structures, but clients should never
+ * access any fields in this structure.
+ */
+
+#define TCL_SMALL_HASH_TABLE 4
+struct Tcl_HashTable {
+ Tcl_HashEntry **buckets; /* Pointer to bucket array. Each
+ * element points to first entry in
+ * bucket's hash chain, or NULL. */
+ Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
+ /* Bucket array used for small tables
+ * (to avoid mallocs and frees). */
+ int numBuckets; /* Total number of buckets allocated
+ * at **bucketPtr. */
+ int numEntries; /* Total number of entries present
+ * in table. */
+ int rebuildSize; /* Enlarge table when numEntries gets
+ * to be this large. */
+ int downShift; /* Shift count used in hashing
+ * function. Designed to use high-
+ * order bits of randomized keys. */
+ int mask; /* Mask value used in hashing
+ * function. */
+ int keyType; /* Type of keys used in this table.
+ * It's either TCL_CUSTOM_KEYS,
+ * TCL_STRING_KEYS, TCL_ONE_WORD_KEYS,
+ * or an integer giving the number of
+ * ints that is the size of the key.
+ */
+#if TCL_PRESERVE_BINARY_COMPATABILITY
+ Tcl_HashEntry *(*findProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr,
+ CONST char *key));
+ Tcl_HashEntry *(*createProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr,
+ CONST char *key, int *newPtr));
+#endif
+ Tcl_HashKeyType *typePtr; /* Type of the keys used in the
+ * Tcl_HashTable. */
+};
+
+/*
+ * Structure definition for information used to keep track of searches
+ * through hash tables:
+ */
+
+typedef struct Tcl_HashSearch {
+ Tcl_HashTable *tablePtr; /* Table being searched. */
+ int nextIndex; /* Index of next bucket to be
+ * enumerated after present one. */
+ Tcl_HashEntry *nextEntryPtr; /* Next entry to be enumerated in the
+ * the current bucket. */
+} Tcl_HashSearch;
+
+/*
+ * Acceptable key types for hash tables:
+ *
+ * TCL_STRING_KEYS: The keys are strings, they are copied into
+ * the entry.
+ * TCL_ONE_WORD_KEYS: The keys are pointers, the pointer is stored
+ * in the entry.
+ * TCL_CUSTOM_TYPE_KEYS: The keys are arbitrary types which are copied
+ * into the entry.
+ * TCL_CUSTOM_PTR_KEYS: The keys are pointers to arbitrary types, the
+ * pointer is stored in the entry.
+ *
+ * While maintaining binary compatability the above have to be distinct
+ * values as they are used to differentiate between old versions of the
+ * hash table which don't have a typePtr and new ones which do. Once binary
+ * compatability is discarded in favour of making more wide spread changes
+ * TCL_STRING_KEYS can be the same as TCL_CUSTOM_TYPE_KEYS, and
+ * TCL_ONE_WORD_KEYS can be the same as TCL_CUSTOM_PTR_KEYS because they
+ * simply determine how the key is accessed from the entry and not the
+ * behaviour.
+ */
+
+#define TCL_STRING_KEYS 0
+#define TCL_ONE_WORD_KEYS 1
+
+#if TCL_PRESERVE_BINARY_COMPATABILITY
+# define TCL_CUSTOM_TYPE_KEYS -2
+# define TCL_CUSTOM_PTR_KEYS -1
+#else
+# define TCL_CUSTOM_TYPE_KEYS TCL_STRING_KEYS
+# define TCL_CUSTOM_PTR_KEYS TCL_ONE_WORD_KEYS
+#endif
+
+/*
+ * Macros for clients to use to access fields of hash entries:
+ */
+
+#define Tcl_GetHashValue(h) ((h)->clientData)
+#define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
+#if TCL_PRESERVE_BINARY_COMPATABILITY
+# define Tcl_GetHashKey(tablePtr, h) \
+ ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS || \
+ (tablePtr)->keyType == TCL_CUSTOM_PTR_KEYS) \
+ ? (h)->key.oneWordValue \
+ : (h)->key.string))
+#else
+# define Tcl_GetHashKey(tablePtr, h) \
+ ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) \
+ ? (h)->key.oneWordValue \
+ : (h)->key.string))
+#endif
+
+/*
+ * Macros to use for clients to use to invoke find and create procedures
+ * for hash tables:
+ */
+
+#if TCL_PRESERVE_BINARY_COMPATABILITY
+# define Tcl_FindHashEntry(tablePtr, key) \
+ (*((tablePtr)->findProc))(tablePtr, key)
+# define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
+ (*((tablePtr)->createProc))(tablePtr, key, newPtr)
+#else /* !TCL_PRESERVE_BINARY_COMPATABILITY */
+/*
+ * Macro to use new extended version of Tcl_InitHashTable.
+ */
+# define Tcl_InitHashTable(tablePtr, keyType) \
+ Tcl_InitHashTableEx(tablePtr, keyType, NULL)
+#endif /* TCL_PRESERVE_BINARY_COMPATABILITY */
+
+
+/*
+ * Flag values to pass to Tcl_DoOneEvent to disable searches
+ * for some kinds of events:
+ */
+#define TCL_DONT_WAIT (1<<1)
+#define TCL_WINDOW_EVENTS (1<<2)
+#define TCL_FILE_EVENTS (1<<3)
+#define TCL_TIMER_EVENTS (1<<4)
+#define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */
+#define TCL_ALL_EVENTS (~TCL_DONT_WAIT)
+
+/*
+ * The following structure defines a generic event for the Tcl event
+ * system. These are the things that are queued in calls to Tcl_QueueEvent
+ * and serviced later by Tcl_DoOneEvent. There can be many different
+ * kinds of events with different fields, corresponding to window events,
+ * timer events, etc. The structure for a particular event consists of
+ * a Tcl_Event header followed by additional information specific to that
+ * event.
+ */
+struct Tcl_Event {
+ Tcl_EventProc *proc; /* Procedure to call to service this event. */
+ struct Tcl_Event *nextPtr; /* Next in list of pending events, or NULL. */
+};
+
+/*
+ * Positions to pass to Tcl_QueueEvent:
+ */
+typedef enum {
+ TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
+} Tcl_QueuePosition;
+
+/*
+ * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
+ * event routines.
+ */
+#define TCL_SERVICE_NONE 0
+#define TCL_SERVICE_ALL 1
+
+
+/*
+ * The following structure keeps is used to hold a time value, either as
+ * an absolute time (the number of seconds from the epoch) or as an
+ * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
+ * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
+ */
+typedef struct Tcl_Time {
+ long sec; /* Seconds. */
+ long usec; /* Microseconds. */
+} Tcl_Time;
+
+typedef void (Tcl_SetTimerProc) _ANSI_ARGS_((Tcl_Time *timePtr));
+typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((Tcl_Time *timePtr));
+
+
+/*
+ * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
+ * to indicate what sorts of events are of interest:
+ */
+#define TCL_READABLE (1<<1)
+#define TCL_WRITABLE (1<<2)
+#define TCL_EXCEPTION (1<<3)
+
+/*
+ * Flag values to pass to Tcl_OpenCommandChannel to indicate the
+ * disposition of the stdio handles. TCL_STDIN, TCL_STDOUT, TCL_STDERR,
+ * are also used in Tcl_GetStdChannel.
+ */
+#define TCL_STDIN (1<<1)
+#define TCL_STDOUT (1<<2)
+#define TCL_STDERR (1<<3)
+#define TCL_ENFORCE_MODE (1<<4)
+
+/*
+ * Bits passed to Tcl_DriverClose2Proc to indicate which side of a channel
+ * should be closed.
+ */
+#define TCL_CLOSE_READ (1<<1)
+#define TCL_CLOSE_WRITE (1<<2)
+
+/*
+ * Value to use as the closeProc for a channel that supports the
+ * close2Proc interface.
+ */
+#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *)1)
+
+/*
+ * Channel version tag. This was introduced in 8.3.2/8.4.
+ */
+#define TCL_CHANNEL_VERSION_1 ((Tcl_ChannelTypeVersion) 0x1)
+#define TCL_CHANNEL_VERSION_2 ((Tcl_ChannelTypeVersion) 0x2)
+#define TCL_CHANNEL_VERSION_3 ((Tcl_ChannelTypeVersion) 0x3)
+
+/*
+ * Typedefs for the various operations in a channel type:
+ */
+typedef int (Tcl_DriverBlockModeProc) _ANSI_ARGS_((
+ ClientData instanceData, int mode));
+typedef int (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
+ Tcl_Interp *interp));
+typedef int (Tcl_DriverClose2Proc) _ANSI_ARGS_((ClientData instanceData,
+ Tcl_Interp *interp, int flags));
+typedef int (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
+ char *buf, int toRead, int *errorCodePtr));
+typedef int (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
+ CONST84 char *buf, int toWrite, int *errorCodePtr));
+typedef int (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
+ long offset, int mode, int *errorCodePtr));
+typedef int (Tcl_DriverSetOptionProc) _ANSI_ARGS_((
+ ClientData instanceData, Tcl_Interp *interp,
+ CONST char *optionName, CONST char *value));
+typedef int (Tcl_DriverGetOptionProc) _ANSI_ARGS_((
+ ClientData instanceData, Tcl_Interp *interp,
+ CONST84 char *optionName, Tcl_DString *dsPtr));
+typedef void (Tcl_DriverWatchProc) _ANSI_ARGS_((
+ ClientData instanceData, int mask));
+typedef int (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
+ ClientData instanceData, int direction,
+ ClientData *handlePtr));
+typedef int (Tcl_DriverFlushProc) _ANSI_ARGS_((
+ ClientData instanceData));
+typedef int (Tcl_DriverHandlerProc) _ANSI_ARGS_((
+ ClientData instanceData, int interestMask));
+typedef Tcl_WideInt (Tcl_DriverWideSeekProc) _ANSI_ARGS_((
+ ClientData instanceData, Tcl_WideInt offset,
+ int mode, int *errorCodePtr));
+
+
+/*
+ * The following declarations either map ckalloc and ckfree to
+ * malloc and free, or they map them to procedures with all sorts
+ * of debugging hooks defined in tclCkalloc.c.
+ */
+#ifdef TCL_MEM_DEBUG
+
+# define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
+# define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
+# define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
+# define attemptckalloc(x) Tcl_AttemptDbCkalloc(x, __FILE__, __LINE__)
+# define attemptckrealloc(x,y) Tcl_AttemptDbCkrealloc((x), (y), __FILE__, __LINE__)
+#else /* !TCL_MEM_DEBUG */
+
+/*
+ * If we are not using the debugging allocator, we should call the
+ * Tcl_Alloc, et al. routines in order to guarantee that every module
+ * is using the same memory allocator both inside and outside of the
+ * Tcl library.
+ */
+# define ckalloc(x) Tcl_Alloc(x)
+# define ckfree(x) Tcl_Free(x)
+# define ckrealloc(x,y) Tcl_Realloc(x,y)
+# define attemptckalloc(x) Tcl_AttemptAlloc(x)
+# define attemptckrealloc(x,y) Tcl_AttemptRealloc(x,y)
+# define Tcl_InitMemory(x)
+# define Tcl_DumpActiveMemory(x)
+# define Tcl_ValidateAllMemory(x,y)
+
+#endif /* !TCL_MEM_DEBUG */
+
+/*
+ * struct Tcl_ChannelType:
+ *
+ * One such structure exists for each type (kind) of channel.
+ * It collects together in one place all the functions that are
+ * part of the specific channel type.
+ *
+ * It is recommend that the Tcl_Channel* functions are used to access
+ * elements of this structure, instead of direct accessing.
+ */
+typedef struct Tcl_ChannelType
+#ifdef USE_TCL_STRUCT
+{
+ char *typeName; /* The name of the channel type in Tcl
+ * commands. This storage is owned by
+ * channel type. */
+ Tcl_ChannelTypeVersion version; /* Version of the channel type. */
+ Tcl_DriverCloseProc *closeProc; /* Procedure to call to close the
+ * channel, or TCL_CLOSE2PROC if the
+ * close2Proc should be used
+ * instead. */
+ Tcl_DriverInputProc *inputProc; /* Procedure to call for input
+ * on channel. */
+ Tcl_DriverOutputProc *outputProc; /* Procedure to call for output
+ * on channel. */
+ Tcl_DriverSeekProc *seekProc; /* Procedure to call to seek
+ * on the channel. May be NULL. */
+ Tcl_DriverSetOptionProc *setOptionProc;
+ /* Set an option on a channel. */
+ Tcl_DriverGetOptionProc *getOptionProc;
+ /* Get an option from a channel. */
+ Tcl_DriverWatchProc *watchProc; /* Set up the notifier to watch
+ * for events on this channel. */
+ Tcl_DriverGetHandleProc *getHandleProc;
+ /* Get an OS handle from the channel
+ * or NULL if not supported. */
+ Tcl_DriverClose2Proc *close2Proc; /* Procedure to call to close the
+ * channel if the device supports
+ * closing the read & write sides
+ * independently. */
+ Tcl_DriverBlockModeProc *blockModeProc;
+ /* Set blocking mode for the
+ * raw channel. May be NULL. */
+ /*
+ * Only valid in TCL_CHANNEL_VERSION_2 channels or later
+ */
+ Tcl_DriverFlushProc *flushProc; /* Procedure to call to flush a
+ * channel. May be NULL. */
+ Tcl_DriverHandlerProc *handlerProc; /* Procedure to call to handle a
+ * channel event. This will be passed
+ * up the stacked channel chain. */
+ /*
+ * Only valid in TCL_CHANNEL_VERSION_3 channels or later
+ */
+ Tcl_DriverWideSeekProc *wideSeekProc;
+ /* Procedure to call to seek
+ * on the channel which can
+ * handle 64-bit offsets. May be
+ * NULL, and must be NULL if
+ * seekProc is NULL. */
+}
+#endif
+Tcl_ChannelType;
+
+/*
+ * The following flags determine whether the blockModeProc above should
+ * set the channel into blocking or nonblocking mode. They are passed
+ * as arguments to the blockModeProc procedure in the above structure.
+ */
+#define TCL_MODE_BLOCKING 0 /* Put channel into blocking mode. */
+#define TCL_MODE_NONBLOCKING 1 /* Put channel into nonblocking
+ * mode. */
+
+/*
+ * Enum for different types of file paths.
+ */
+typedef enum Tcl_PathType {
+ TCL_PATH_ABSOLUTE,
+ TCL_PATH_RELATIVE,
+ TCL_PATH_VOLUME_RELATIVE
+} Tcl_PathType;
+
+
+/*
+ * The following structure is used to pass glob type data amongst
+ * the various glob routines and Tcl_FSMatchInDirectory.
+ */
+typedef struct Tcl_GlobTypeData {
+ /* Corresponds to bcdpfls as in 'find -t' */
+ int type;
+ /* Corresponds to file permissions */
+ int perm;
+ /* Acceptable mac type */
+ Tcl_Obj* macType;
+ /* Acceptable mac creator */
+ Tcl_Obj* macCreator;
+} Tcl_GlobTypeData;
+
+/*
+ * type and permission definitions for glob command
+ */
+#define TCL_GLOB_TYPE_BLOCK (1<<0)
+#define TCL_GLOB_TYPE_CHAR (1<<1)
+#define TCL_GLOB_TYPE_DIR (1<<2)
+#define TCL_GLOB_TYPE_PIPE (1<<3)
+#define TCL_GLOB_TYPE_FILE (1<<4)
+#define TCL_GLOB_TYPE_LINK (1<<5)
+#define TCL_GLOB_TYPE_SOCK (1<<6)
+#define TCL_GLOB_TYPE_MOUNT (1<<7)
+
+#define TCL_GLOB_PERM_RONLY (1<<0)
+#define TCL_GLOB_PERM_HIDDEN (1<<1)
+#define TCL_GLOB_PERM_R (1<<2)
+#define TCL_GLOB_PERM_W (1<<3)
+#define TCL_GLOB_PERM_X (1<<4)
+
+
+/*
+ * Typedefs for the various filesystem operations:
+ */
+typedef int (Tcl_FSStatProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, Tcl_StatBuf *buf));
+typedef int (Tcl_FSAccessProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, int mode));
+typedef Tcl_Channel (Tcl_FSOpenFileChannelProc)
+ _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *pathPtr,
+ int mode, int permissions));
+typedef int (Tcl_FSMatchInDirectoryProc) _ANSI_ARGS_((Tcl_Interp* interp,
+ Tcl_Obj *result, Tcl_Obj *pathPtr, CONST char *pattern,
+ Tcl_GlobTypeData * types));
+typedef Tcl_Obj* (Tcl_FSGetCwdProc) _ANSI_ARGS_((Tcl_Interp *interp));
+typedef int (Tcl_FSChdirProc) _ANSI_ARGS_((Tcl_Obj *pathPtr));
+typedef int (Tcl_FSLstatProc) _ANSI_ARGS_((Tcl_Obj *pathPtr,
+ Tcl_StatBuf *buf));
+typedef int (Tcl_FSCreateDirectoryProc) _ANSI_ARGS_((Tcl_Obj *pathPtr));
+typedef int (Tcl_FSDeleteFileProc) _ANSI_ARGS_((Tcl_Obj *pathPtr));
+typedef int (Tcl_FSCopyDirectoryProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr,
+ Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr));
+typedef int (Tcl_FSCopyFileProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr,
+ Tcl_Obj *destPathPtr));
+typedef int (Tcl_FSRemoveDirectoryProc) _ANSI_ARGS_((Tcl_Obj *pathPtr,
+ int recursive, Tcl_Obj **errorPtr));
+typedef int (Tcl_FSRenameFileProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr,
+ Tcl_Obj *destPathPtr));
+typedef void (Tcl_FSUnloadFileProc) _ANSI_ARGS_((Tcl_LoadHandle loadHandle));
+typedef Tcl_Obj* (Tcl_FSListVolumesProc) _ANSI_ARGS_((void));
+/* We have to declare the utime structure here. */
+struct utimbuf;
+typedef int (Tcl_FSUtimeProc) _ANSI_ARGS_((Tcl_Obj *pathPtr,
+ struct utimbuf *tval));
+typedef int (Tcl_FSNormalizePathProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *pathPtr, int nextCheckpoint));
+typedef int (Tcl_FSFileAttrsGetProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ int index, Tcl_Obj *pathPtr,
+ Tcl_Obj **objPtrRef));
+typedef CONST char** (Tcl_FSFileAttrStringsProc) _ANSI_ARGS_((Tcl_Obj *pathPtr,
+ Tcl_Obj** objPtrRef));
+typedef int (Tcl_FSFileAttrsSetProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ int index, Tcl_Obj *pathPtr,
+ Tcl_Obj *objPtr));
+typedef Tcl_Obj* (Tcl_FSLinkProc) _ANSI_ARGS_((Tcl_Obj *pathPtr,
+ Tcl_Obj *toPtr, int linkType));
+typedef int (Tcl_FSLoadFileProc) _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj *pathPtr,
+ Tcl_LoadHandle *handlePtr,
+ Tcl_FSUnloadFileProc **unloadProcPtr));
+typedef int (Tcl_FSPathInFilesystemProc) _ANSI_ARGS_((Tcl_Obj *pathPtr,
+ ClientData *clientDataPtr));
+typedef Tcl_Obj* (Tcl_FSFilesystemPathTypeProc)
+ _ANSI_ARGS_((Tcl_Obj *pathPtr));
+typedef Tcl_Obj* (Tcl_FSFilesystemSeparatorProc)
+ _ANSI_ARGS_((Tcl_Obj *pathPtr));
+typedef void (Tcl_FSFreeInternalRepProc) _ANSI_ARGS_((ClientData clientData));
+typedef ClientData (Tcl_FSDupInternalRepProc)
+ _ANSI_ARGS_((ClientData clientData));
+typedef Tcl_Obj* (Tcl_FSInternalToNormalizedProc)
+ _ANSI_ARGS_((ClientData clientData));
+typedef ClientData (Tcl_FSCreateInternalRepProc) _ANSI_ARGS_((Tcl_Obj *pathPtr));
+
+typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
+
+/*
+ *----------------------------------------------------------------
+ * Data structures related to hooking into the filesystem
+ *----------------------------------------------------------------
+ */
+
+/*
+ * Filesystem version tag. This was introduced in 8.4.
+ */
+#define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1)
+
+/*
+ * struct Tcl_Filesystem:
+ *
+ * One such structure exists for each type (kind) of filesystem.
+ * It collects together in one place all the functions that are
+ * part of the specific filesystem. Tcl always accesses the
+ * filesystem through one of these structures.
+ *
+ * Not all entries need be non-NULL; any which are NULL are simply
+ * ignored. However, a complete filesystem should provide all of
+ * these functions. The explanations in the structure show
+ * the importance of each function.
+ */
+
+typedef struct Tcl_Filesystem {
+ CONST char *typeName; /* The name of the filesystem. */
+ int structureLength; /* Length of this structure, so future
+ * binary compatibility can be assured. */
+ Tcl_FSVersion version;
+ /* Version of the filesystem type. */
+ Tcl_FSPathInFilesystemProc *pathInFilesystemProc;
+ /* Function to check whether a path is in
+ * this filesystem. This is the most
+ * important filesystem procedure. */
+ Tcl_FSDupInternalRepProc *dupInternalRepProc;
+ /* Function to duplicate internal fs rep. May
+ * be NULL (but then fs is less efficient). */
+ Tcl_FSFreeInternalRepProc *freeInternalRepProc;
+ /* Function to free internal fs rep. Must
+ * be implemented, if internal representations
+ * need freeing, otherwise it can be NULL. */
+ Tcl_FSInternalToNormalizedProc *internalToNormalizedProc;
+ /* Function to convert internal representation
+ * to a normalized path. Only required if
+ * the fs creates pure path objects with no
+ * string/path representation. */
+ Tcl_FSCreateInternalRepProc *createInternalRepProc;
+ /* Function to create a filesystem-specific
+ * internal representation. May be NULL
+ * if paths have no internal representation,
+ * or if the Tcl_FSPathInFilesystemProc
+ * for this filesystem always immediately
+ * creates an internal representation for
+ * paths it accepts. */
+ Tcl_FSNormalizePathProc *normalizePathProc;
+ /* Function to normalize a path. Should
+ * be implemented for all filesystems
+ * which can have multiple string
+ * representations for the same path
+ * object. */
+ Tcl_FSFilesystemPathTypeProc *filesystemPathTypeProc;
+ /* Function to determine the type of a
+ * path in this filesystem. May be NULL. */
+ Tcl_FSFilesystemSeparatorProc *filesystemSeparatorProc;
+ /* Function to return the separator
+ * character(s) for this filesystem. Must
+ * be implemented. */
+ Tcl_FSStatProc *statProc;
+ /*
+ * Function to process a 'Tcl_FSStat()'
+ * call. Must be implemented for any
+ * reasonable filesystem.
+ */
+ Tcl_FSAccessProc *accessProc;
+ /*
+ * Function to process a 'Tcl_FSAccess()'
+ * call. Must be implemented for any
+ * reasonable filesystem.
+ */
+ Tcl_FSOpenFileChannelProc *openFileChannelProc;
+ /*
+ * Function to process a
+ * 'Tcl_FSOpenFileChannel()' call. Must be
+ * implemented for any reasonable
+ * filesystem.
+ */
+ Tcl_FSMatchInDirectoryProc *matchInDirectoryProc;
+ /* Function to process a
+ * 'Tcl_FSMatchInDirectory()'. If not
+ * implemented, then glob and recursive
+ * copy functionality will be lacking in
+ * the filesystem. */
+ Tcl_FSUtimeProc *utimeProc;
+ /* Function to process a
+ * 'Tcl_FSUtime()' call. Required to
+ * allow setting (not reading) of times
+ * with 'file mtime', 'file atime' and
+ * the open-r/open-w/fcopy implementation
+ * of 'file copy'. */
+ Tcl_FSLinkProc *linkProc;
+ /* Function to process a
+ * 'Tcl_FSLink()' call. Should be
+ * implemented only if the filesystem supports
+ * links (reading or creating). */
+ Tcl_FSListVolumesProc *listVolumesProc;
+ /* Function to list any filesystem volumes
+ * added by this filesystem. Should be
+ * implemented only if the filesystem adds
+ * volumes at the head of the filesystem. */
+ Tcl_FSFileAttrStringsProc *fileAttrStringsProc;
+ /* Function to list all attributes strings
+ * which are valid for this filesystem.
+ * If not implemented the filesystem will
+ * not support the 'file attributes' command.
+ * This allows arbitrary additional information
+ * to be attached to files in the filesystem. */
+ Tcl_FSFileAttrsGetProc *fileAttrsGetProc;
+ /* Function to process a
+ * 'Tcl_FSFileAttrsGet()' call, used by
+ * 'file attributes'. */
+ Tcl_FSFileAttrsSetProc *fileAttrsSetProc;
+ /* Function to process a
+ * 'Tcl_FSFileAttrsSet()' call, used by
+ * 'file attributes'. */
+ Tcl_FSCreateDirectoryProc *createDirectoryProc;
+ /* Function to process a
+ * 'Tcl_FSCreateDirectory()' call. Should
+ * be implemented unless the FS is
+ * read-only. */
+ Tcl_FSRemoveDirectoryProc *removeDirectoryProc;
+ /* Function to process a
+ * 'Tcl_FSRemoveDirectory()' call. Should
+ * be implemented unless the FS is
+ * read-only. */
+ Tcl_FSDeleteFileProc *deleteFileProc;
+ /* Function to process a
+ * 'Tcl_FSDeleteFile()' call. Should
+ * be implemented unless the FS is
+ * read-only. */
+ Tcl_FSCopyFileProc *copyFileProc;
+ /* Function to process a
+ * 'Tcl_FSCopyFile()' call. If not
+ * implemented Tcl will fall back
+ * on open-r, open-w and fcopy as
+ * a copying mechanism, for copying
+ * actions initiated in Tcl (not C). */
+ Tcl_FSRenameFileProc *renameFileProc;
+ /* Function to process a
+ * 'Tcl_FSRenameFile()' call. If not
+ * implemented, Tcl will fall back on
+ * a copy and delete mechanism, for
+ * rename actions initiated in Tcl (not C). */
+ Tcl_FSCopyDirectoryProc *copyDirectoryProc;
+ /* Function to process a
+ * 'Tcl_FSCopyDirectory()' call. If
+ * not implemented, Tcl will fall back
+ * on a recursive create-dir, file copy
+ * mechanism, for copying actions
+ * initiated in Tcl (not C). */
+ Tcl_FSLstatProc *lstatProc;
+ /* Function to process a
+ * 'Tcl_FSLstat()' call. If not implemented,
+ * Tcl will attempt to use the 'statProc'
+ * defined above instead. */
+ Tcl_FSLoadFileProc *loadFileProc;
+ /* Function to process a
+ * 'Tcl_FSLoadFile()' call. If not
+ * implemented, Tcl will fall back on
+ * a copy to native-temp followed by a
+ * Tcl_FSLoadFile on that temporary copy. */
+ Tcl_FSGetCwdProc *getCwdProc;
+ /*
+ * Function to process a 'Tcl_FSGetCwd()'
+ * call. Most filesystems need not
+ * implement this. It will usually only be
+ * called once, if 'getcwd' is called
+ * before 'chdir'. May be NULL.
+ */
+ Tcl_FSChdirProc *chdirProc;
+ /*
+ * Function to process a 'Tcl_FSChdir()'
+ * call. If filesystems do not implement
+ * this, it will be emulated by a series of
+ * directory access checks. Otherwise,
+ * virtual filesystems which do implement
+ * it need only respond with a positive
+ * return result if the dirName is a valid
+ * directory in their filesystem. They
+ * need not remember the result, since that
+ * will be automatically remembered for use
+ * by GetCwd. Real filesystems should
+ * carry out the correct action (i.e. call
+ * the correct system 'chdir' api). If not
+ * implemented, then 'cd' and 'pwd' will
+ * fail inside the filesystem.
+ */
+} Tcl_Filesystem;
+
+/*
+ * The following definitions are used as values for the 'linkAction' flag
+ * to Tcl_FSLink, or the linkProc of any filesystem. Any combination
+ * of flags can be given. For link creation, the linkProc should create
+ * a link which matches any of the types given.
+ *
+ * TCL_CREATE_SYMBOLIC_LINK: Create a symbolic or soft link.
+ * TCL_CREATE_HARD_LINK: Create a hard link.
+ */
+#define TCL_CREATE_SYMBOLIC_LINK 0x01
+#define TCL_CREATE_HARD_LINK 0x02
+
+/*
+ * The following structure represents the Notifier functions that
+ * you can override with the Tcl_SetNotifier call.
+ */
+typedef struct Tcl_NotifierProcs {
+ Tcl_SetTimerProc *setTimerProc;
+ Tcl_WaitForEventProc *waitForEventProc;
+ Tcl_CreateFileHandlerProc *createFileHandlerProc;
+ Tcl_DeleteFileHandlerProc *deleteFileHandlerProc;
+ Tcl_InitNotifierProc *initNotifierProc;
+ Tcl_FinalizeNotifierProc *finalizeNotifierProc;
+ Tcl_AlertNotifierProc *alertNotifierProc;
+ Tcl_ServiceModeHookProc *serviceModeHookProc;
+} Tcl_NotifierProcs;
+
+
+/*
+ * The following structure represents a user-defined encoding. It collects
+ * together all the functions that are used by the specific encoding.
+ */
+typedef struct Tcl_EncodingType
+#ifdef USE_TCL_STRUCT
+{
+ CONST char *encodingName; /* The name of the encoding, e.g. "euc-jp".
+ * This name is the unique key for this
+ * encoding type. */
+ Tcl_EncodingConvertProc *toUtfProc;
+ /* Procedure to convert from external
+ * encoding into UTF-8. */
+ Tcl_EncodingConvertProc *fromUtfProc;
+ /* Procedure to convert from UTF-8 into
+ * external encoding. */
+ Tcl_EncodingFreeProc *freeProc;
+ /* If non-NULL, procedure to call when this
+ * encoding is deleted. */
+ ClientData clientData; /* Arbitrary value associated with encoding
+ * type. Passed to conversion procedures. */
+ int nullSize; /* Number of zero bytes that signify
+ * end-of-string in this encoding. This
+ * number is used to determine the source
+ * string length when the srcLen argument is
+ * negative. Must be 1 or 2. */
+}
+#endif
+Tcl_EncodingType;
+
+/*
+ * The following definitions are used as values for the conversion control
+ * flags argument when converting text from one character set to another:
+ *
+ * TCL_ENCODING_START: Signifies that the source buffer is the first
+ * block in a (potentially multi-block) input
+ * stream. Tells the conversion procedure to
+ * reset to an initial state and perform any
+ * initialization that needs to occur before the
+ * first byte is converted. If the source
+ * buffer contains the entire input stream to be
+ * converted, this flag should be set.
+ *
+ * TCL_ENCODING_END: Signifies that the source buffer is the last
+ * block in a (potentially multi-block) input
+ * stream. Tells the conversion routine to
+ * perform any finalization that needs to occur
+ * after the last byte is converted and then to
+ * reset to an initial state. If the source
+ * buffer contains the entire input stream to be
+ * converted, this flag should be set.
+ *
+ * TCL_ENCODING_STOPONERROR: If set, then the converter will return
+ * immediately upon encountering an invalid
+ * byte sequence or a source character that has
+ * no mapping in the target encoding. If clear,
+ * then the converter will skip the problem,
+ * substituting one or more "close" characters
+ * in the destination buffer and then continue
+ * to sonvert the source.
+ */
+#define TCL_ENCODING_START 0x01
+#define TCL_ENCODING_END 0x02
+#define TCL_ENCODING_STOPONERROR 0x04
+
+
+/*
+ * The following data structures and declarations are for the new Tcl
+ * parser.
+ */
+
+/*
+ * For each word of a command, and for each piece of a word such as a
+ * variable reference, one of the following structures is created to
+ * describe the token.
+ */
+typedef struct Tcl_Token
+#ifdef USE_TCL_STRUCT
+{
+ int type; /* Type of token, such as TCL_TOKEN_WORD;
+ * see below for valid types. */
+ CONST char *start; /* First character in token. */
+ int size; /* Number of bytes in token. */
+ int numComponents; /* If this token is composed of other
+ * tokens, this field tells how many of
+ * them there are (including components of
+ * components, etc.). The component tokens
+ * immediately follow this one. */
+}
+#endif
+Tcl_Token;
+
+/*
+ * Type values defined for Tcl_Token structures. These values are
+ * defined as mask bits so that it's easy to check for collections of
+ * types.
+ *
+ * TCL_TOKEN_WORD - The token describes one word of a command,
+ * from the first non-blank character of
+ * the word (which may be " or {) up to but
+ * not including the space, semicolon, or
+ * bracket that terminates the word.
+ * NumComponents counts the total number of
+ * sub-tokens that make up the word. This
+ * includes, for example, sub-tokens of
+ * TCL_TOKEN_VARIABLE tokens.
+ * TCL_TOKEN_SIMPLE_WORD - This token is just like TCL_TOKEN_WORD
+ * except that the word is guaranteed to
+ * consist of a single TCL_TOKEN_TEXT
+ * sub-token.
+ * TCL_TOKEN_TEXT - The token describes a range of literal
+ * text that is part of a word.
+ * NumComponents is always 0.
+ * TCL_TOKEN_BS - The token describes a backslash sequence
+ * that must be collapsed. NumComponents
+ * is always 0.
+ * TCL_TOKEN_COMMAND - The token describes a command whose result
+ * must be substituted into the word. The
+ * token includes the enclosing brackets.
+ * NumComponents is always 0.
+ * TCL_TOKEN_VARIABLE - The token describes a variable
+ * substitution, including the dollar sign,
+ * variable name, and array index (if there
+ * is one) up through the right
+ * parentheses. NumComponents tells how
+ * many additional tokens follow to
+ * represent the variable name. The first
+ * token will be a TCL_TOKEN_TEXT token
+ * that describes the variable name. If
+ * the variable is an array reference then
+ * there will be one or more additional
+ * tokens, of type TCL_TOKEN_TEXT,
+ * TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and
+ * TCL_TOKEN_VARIABLE, that describe the
+ * array index; numComponents counts the
+ * total number of nested tokens that make
+ * up the variable reference, including
+ * sub-tokens of TCL_TOKEN_VARIABLE tokens.
+ * TCL_TOKEN_SUB_EXPR - The token describes one subexpression of a
+ * expression, from the first non-blank
+ * character of the subexpression up to but not
+ * including the space, brace, or bracket
+ * that terminates the subexpression.
+ * NumComponents counts the total number of
+ * following subtokens that make up the
+ * subexpression; this includes all subtokens
+ * for any nested TCL_TOKEN_SUB_EXPR tokens.
+ * For example, a numeric value used as a
+ * primitive operand is described by a
+ * TCL_TOKEN_SUB_EXPR token followed by a
+ * TCL_TOKEN_TEXT token. A binary subexpression
+ * is described by a TCL_TOKEN_SUB_EXPR token
+ * followed by the TCL_TOKEN_OPERATOR token
+ * for the operator, then TCL_TOKEN_SUB_EXPR
+ * tokens for the left then the right operands.
+ * TCL_TOKEN_OPERATOR - The token describes one expression operator.
+ * An operator might be the name of a math
+ * function such as "abs". A TCL_TOKEN_OPERATOR
+ * token is always preceeded by one
+ * TCL_TOKEN_SUB_EXPR token for the operator's
+ * subexpression, and is followed by zero or
+ * more TCL_TOKEN_SUB_EXPR tokens for the
+ * operator's operands. NumComponents is
+ * always 0.
+ */
+#define TCL_TOKEN_WORD 1
+#define TCL_TOKEN_SIMPLE_WORD 2
+#define TCL_TOKEN_TEXT 4
+#define TCL_TOKEN_BS 8
+#define TCL_TOKEN_COMMAND 16
+#define TCL_TOKEN_VARIABLE 32
+#define TCL_TOKEN_SUB_EXPR 64
+#define TCL_TOKEN_OPERATOR 128
+
+/*
+ * Parsing error types. On any parsing error, one of these values
+ * will be stored in the error field of the Tcl_Parse structure
+ * defined below.
+ */
+#define TCL_PARSE_SUCCESS 0
+#define TCL_PARSE_QUOTE_EXTRA 1
+#define TCL_PARSE_BRACE_EXTRA 2
+#define TCL_PARSE_MISSING_BRACE 3
+#define TCL_PARSE_MISSING_BRACKET 4
+#define TCL_PARSE_MISSING_PAREN 5
+#define TCL_PARSE_MISSING_QUOTE 6
+#define TCL_PARSE_MISSING_VAR_BRACE 7
+#define TCL_PARSE_SYNTAX 8
+#define TCL_PARSE_BAD_NUMBER 9
+
+/*
+ * A structure of the following type is filled in by Tcl_ParseCommand.
+ * It describes a single command parsed from an input string.
+ */
+#define NUM_STATIC_TOKENS 20
+
+typedef struct Tcl_Parse
+#ifdef USE_TCL_STRUCT
+{
+ CONST char *commentStart; /* Pointer to # that begins the first of
+ * one or more comments preceding the
+ * command. */
+ int commentSize; /* Number of bytes in comments (up through
+ * newline character that terminates the
+ * last comment). If there were no
+ * comments, this field is 0. */
+ CONST char *commandStart; /* First character in first word of command. */
+ int commandSize; /* Number of bytes in command, including
+ * first character of first word, up
+ * through the terminating newline,
+ * close bracket, or semicolon. */
+ int numWords; /* Total number of words in command. May
+ * be 0. */
+ Tcl_Token *tokenPtr; /* Pointer to first token representing
+ * the words of the command. Initially
+ * points to staticTokens, but may change
+ * to point to malloc-ed space if command
+ * exceeds space in staticTokens. */
+ int numTokens; /* Total number of tokens in command. */
+ int tokensAvailable; /* Total number of tokens available at
+ * *tokenPtr. */
+ int errorType; /* One of the parsing error types defined
+ * above. */
+
+ /*
+ * The fields below are intended only for the private use of the
+ * parser. They should not be used by procedures that invoke
+ * Tcl_ParseCommand.
+ */
+
+ CONST char *string; /* The original command string passed to
+ * Tcl_ParseCommand. */
+ CONST char *end; /* Points to the character just after the
+ * last one in the command string. */
+ Tcl_Interp *interp; /* Interpreter to use for error reporting,
+ * or NULL. */
+ CONST char *term; /* Points to character in string that
+ * terminated most recent token. Filled in
+ * by ParseTokens. If an error occurs,
+ * points to beginning of region where the
+ * error occurred (e.g. the open brace if
+ * the close brace is missing). */
+ int incomplete; /* This field is set to 1 by Tcl_ParseCommand
+ * if the command appears to be incomplete.
+ * This information is used by
+ * Tcl_CommandComplete. */
+ Tcl_Token staticTokens[NUM_STATIC_TOKENS];
+ /* Initial space for tokens for command.
+ * This space should be large enough to
+ * accommodate most commands; dynamic
+ * space is allocated for very large
+ * commands that don't fit here. */
+}
+#endif
+Tcl_Parse;
+
+/*
+ * The following definitions are the error codes returned by the conversion
+ * routines:
+ *
+ * TCL_OK: All characters were converted.
+ *
+ * TCL_CONVERT_NOSPACE: The output buffer would not have been large
+ * enough for all of the converted data; as many
+ * characters as could fit were converted though.
+ *
+ * TCL_CONVERT_MULTIBYTE: The last few bytes in the source string were
+ * the beginning of a multibyte sequence, but
+ * more bytes were needed to complete this
+ * sequence. A subsequent call to the conversion
+ * routine should pass the beginning of this
+ * unconverted sequence plus additional bytes
+ * from the source stream to properly convert
+ * the formerly split-up multibyte sequence.
+ *
+ * TCL_CONVERT_SYNTAX: The source stream contained an invalid
+ * character sequence. This may occur if the
+ * input stream has been damaged or if the input
+ * encoding method was misidentified. This error
+ * is reported only if TCL_ENCODING_STOPONERROR
+ * was specified.
+ *
+ * TCL_CONVERT_UNKNOWN: The source string contained a character
+ * that could not be represented in the target
+ * encoding. This error is reported only if
+ * TCL_ENCODING_STOPONERROR was specified.
+ */
+#define TCL_CONVERT_MULTIBYTE -1
+#define TCL_CONVERT_SYNTAX -2
+#define TCL_CONVERT_UNKNOWN -3
+#define TCL_CONVERT_NOSPACE -4
+
+/*
+ * The maximum number of bytes that are necessary to represent a single
+ * Unicode character in UTF-8. The valid values should be 3 or 6 (or
+ * perhaps 1 if we want to support a non-unicode enabled core).
+ * If 3, then Tcl_UniChar must be 2-bytes in size (UCS-2). (default)
+ * If 6, then Tcl_UniChar must be 4-bytes in size (UCS-4).
+ * At this time UCS-2 mode is the default and recommended mode.
+ * UCS-4 is experimental and not recommended. It works for the core,
+ * but most extensions expect UCS-2.
+ */
+#ifndef TCL_UTF_MAX
+#define TCL_UTF_MAX 3
+#endif
+
+/*
+ * This represents a Unicode character. Any changes to this should
+ * also be reflected in regcustom.h.
+ */
+#if TCL_UTF_MAX > 3
+ /*
+ * unsigned int isn't 100% accurate as it should be a strict 4-byte
+ * value (perhaps wchar_t). 64-bit systems may have troubles. The
+ * size of this value must be reflected correctly in regcustom.h.
+ */
+typedef unsigned int Tcl_UniChar;
+#else
+typedef unsigned short Tcl_UniChar;
+#endif
+
+
+/*
+ * Deprecated Tcl procedures:
+ */
+#ifndef TCL_NO_DEPRECATED
+# define Tcl_EvalObj(interp,objPtr) \
+ Tcl_EvalObjEx((interp),(objPtr),0)
+# define Tcl_GlobalEvalObj(interp,objPtr) \
+ Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
+#endif
+
+
+/*
+ * These function have been renamed. The old names are deprecated, but we
+ * define these macros for backwards compatibilty.
+ */
+#define Tcl_Ckalloc Tcl_Alloc
+#define Tcl_Ckfree Tcl_Free
+#define Tcl_Ckrealloc Tcl_Realloc
+#define Tcl_Return Tcl_SetResult
+#define Tcl_TildeSubst Tcl_TranslateFileName
+#ifndef _LANG
+#define panic Tcl_Panic
+#endif
+#define panicVA Tcl_PanicVA
+
+
+/*
+ * The following constant is used to test for older versions of Tcl
+ * in the stubs tables.
+ *
+ * Jan Nijtman's plus patch uses 0xFCA1BACF, so we need to pick a different
+ * value since the stubs tables don't match.
+ */
+
+#define TCL_STUB_MAGIC ((int)0xFCA3BACF)
+
+/*
+ * The following function is required to be defined in all stubs aware
+ * extensions. The function is actually implemented in the stub
+ * library, not the main Tcl library, although there is a trivial
+ * implementation in the main library in case an extension is statically
+ * linked into an application.
+ */
+
+EXTERN CONST char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *version, int exact));
+
+#ifndef USE_TCL_STUBS
+
+/*
+ * When not using stubs, make it a macro.
+ */
+
+#define Tcl_InitStubs(interp, version, exact) \
+ Tcl_PkgRequire(interp, "Tcl", version, exact)
+
+#endif
+
+
+/*
+ * Include the public function declarations that are accessible via
+ * the stubs table.
+ */
+
+#include "tclDecls.h"
+
+/*
+ * Include platform specific public function declarations that are
+ * accessible via the stubs table.
+ */
+
+/*
+ * tclPlatDecls.h can't be included here on the Mac, as we need
+ * Mac specific headers to define the Mac types used in this file,
+ * but these Mac haders conflict with a number of tk types
+ * and thus can't be included in the globally read tcl.h
+ * This header was originally added here as a fix for bug 5241
+ * (stub link error for symbols in TclPlatStubs table), as a work-
+ * around for the bug on the mac, tclMac.h is included immediately
+ * after tcl.h in the tcl precompiled header (with DLLEXPORT set).
+ */
+
+#if !defined(MAC_TCL)
+#include "tclPlatDecls.h"
+#endif
+
+/*
+ * Public functions that are not accessible via the stubs table.
+ */
+
+EXTERN void Tcl_Main _ANSI_ARGS_((int argc, char **argv,
+ Tcl_AppInitProc *appInitProc));
+
+/*
+ * Convenience declaration of Tcl_AppInit for backwards compatibility.
+ * This function is not *implemented* by the tcl library, so the storage
+ * class is neither DLLEXPORT nor DLLIMPORT
+ */
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS
+
+EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* RC_INVOKED */
+
+/*
+ * end block for C++
+ */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TCL */
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.h
new file mode 100644
index 00000000000..6ae47c1d922
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.h
@@ -0,0 +1,4143 @@
+/*
+ * tclDecls.h --
+ *
+ * Declarations of functions in the platform independent public Tcl API.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tclDecls.h,v 1.93.2.1 2003/05/13 09:57:40 mistachkin Exp $
+ */
+
+#ifndef _TCLDECLS
+#define _TCLDECLS
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tcl.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+/* 0 */
+EXTERN int Tcl_PkgProvideEx _ANSI_ARGS_((Tcl_Interp* interp,
+ CONST char* name, CONST char* version,
+ ClientData clientData));
+/* 1 */
+EXTERN CONST84_RETURN char * Tcl_PkgRequireEx _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ CONST char * version, int exact,
+ ClientData * clientDataPtr));
+/* 2 */
+EXTERN void Tcl_Panic _ANSI_ARGS_(TCL_VARARGS(CONST char *,format));
+/* 3 */
+EXTERN char * Tcl_Alloc _ANSI_ARGS_((unsigned int size));
+/* 4 */
+EXTERN void Tcl_Free _ANSI_ARGS_((char * ptr));
+/* 5 */
+EXTERN char * Tcl_Realloc _ANSI_ARGS_((char * ptr,
+ unsigned int size));
+/* 6 */
+EXTERN char * Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
+ CONST char * file, int line));
+/* 7 */
+EXTERN int Tcl_DbCkfree _ANSI_ARGS_((char * ptr,
+ CONST char * file, int line));
+/* 8 */
+EXTERN char * Tcl_DbCkrealloc _ANSI_ARGS_((char * ptr,
+ unsigned int size, CONST char * file,
+ int line));
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 9 */
+EXTERN void Tcl_CreateFileHandler _ANSI_ARGS_((int fd, int mask,
+ Tcl_FileProc * proc, ClientData clientData));
+#endif /* UNIX */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 10 */
+EXTERN void Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
+#endif /* UNIX */
+/* 11 */
+EXTERN void Tcl_SetTimer _ANSI_ARGS_((Tcl_Time * timePtr));
+/* 12 */
+EXTERN void Tcl_Sleep _ANSI_ARGS_((int ms));
+/* 13 */
+EXTERN int Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time * timePtr));
+/* 14 */
+EXTERN int Tcl_AppendAllObjTypes _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr));
+/* 15 */
+EXTERN void Tcl_AppendStringsToObj _ANSI_ARGS_(TCL_VARARGS(Tcl_Obj *,objPtr));
+/* 16 */
+EXTERN void Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj* objPtr,
+ CONST char* bytes, int length));
+/* 17 */
+EXTERN Tcl_Obj * Tcl_ConcatObj _ANSI_ARGS_((int objc,
+ Tcl_Obj *CONST objv[]));
+/* 18 */
+EXTERN int Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, Tcl_ObjType * typePtr));
+/* 19 */
+EXTERN void Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj * objPtr,
+ CONST char * file, int line));
+/* 20 */
+EXTERN void Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj * objPtr,
+ CONST char * file, int line));
+/* 21 */
+EXTERN int Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj * objPtr,
+ CONST char * file, int line));
+/* 22 */
+EXTERN Tcl_Obj * Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
+ CONST char * file, int line));
+/* 23 */
+EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj _ANSI_ARGS_((
+ CONST unsigned char * bytes, int length,
+ CONST char * file, int line));
+/* 24 */
+EXTERN Tcl_Obj * Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
+ CONST char * file, int line));
+/* 25 */
+EXTERN Tcl_Obj * Tcl_DbNewListObj _ANSI_ARGS_((int objc,
+ Tcl_Obj *CONST * objv, CONST char * file,
+ int line));
+/* 26 */
+EXTERN Tcl_Obj * Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
+ CONST char * file, int line));
+/* 27 */
+EXTERN Tcl_Obj * Tcl_DbNewObj _ANSI_ARGS_((CONST char * file,
+ int line));
+/* 28 */
+EXTERN Tcl_Obj * Tcl_DbNewStringObj _ANSI_ARGS_((CONST char * bytes,
+ int length, CONST char * file, int line));
+/* 29 */
+EXTERN Tcl_Obj * Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj * objPtr));
+/* 30 */
+EXTERN void TclFreeObj _ANSI_ARGS_((Tcl_Obj * objPtr));
+/* 31 */
+EXTERN int Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * boolPtr));
+/* 32 */
+EXTERN int Tcl_GetBooleanFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ int * boolPtr));
+/* 33 */
+EXTERN unsigned char * Tcl_GetByteArrayFromObj _ANSI_ARGS_((
+ Tcl_Obj * objPtr, int * lengthPtr));
+/* 34 */
+EXTERN int Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, double * doublePtr));
+/* 35 */
+EXTERN int Tcl_GetDoubleFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ double * doublePtr));
+/* 36 */
+EXTERN int Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, CONST char ** tablePtr,
+ CONST char * msg, int flags, int * indexPtr));
+/* 37 */
+EXTERN int Tcl_GetInt _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * intPtr));
+/* 38 */
+EXTERN int Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int * intPtr));
+/* 39 */
+EXTERN int Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, long * longPtr));
+/* 40 */
+EXTERN Tcl_ObjType * Tcl_GetObjType _ANSI_ARGS_((CONST char * typeName));
+/* 41 */
+EXTERN char * Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int * lengthPtr));
+/* 42 */
+EXTERN void Tcl_InvalidateStringRep _ANSI_ARGS_((
+ Tcl_Obj * objPtr));
+/* 43 */
+EXTERN int Tcl_ListObjAppendList _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * listPtr,
+ Tcl_Obj * elemListPtr));
+/* 44 */
+EXTERN int Tcl_ListObjAppendElement _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * listPtr,
+ Tcl_Obj * objPtr));
+/* 45 */
+EXTERN int Tcl_ListObjGetElements _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * listPtr,
+ int * objcPtr, Tcl_Obj *** objvPtr));
+/* 46 */
+EXTERN int Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * listPtr, int index,
+ Tcl_Obj ** objPtrPtr));
+/* 47 */
+EXTERN int Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * listPtr, int * lengthPtr));
+/* 48 */
+EXTERN int Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * listPtr, int first, int count,
+ int objc, Tcl_Obj *CONST objv[]));
+/* 49 */
+EXTERN Tcl_Obj * Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
+/* 50 */
+EXTERN Tcl_Obj * Tcl_NewByteArrayObj _ANSI_ARGS_((
+ CONST unsigned char* bytes, int length));
+/* 51 */
+EXTERN Tcl_Obj * Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
+/* 52 */
+EXTERN Tcl_Obj * Tcl_NewIntObj _ANSI_ARGS_((int intValue));
+/* 53 */
+EXTERN Tcl_Obj * Tcl_NewListObj _ANSI_ARGS_((int objc,
+ Tcl_Obj *CONST objv[]));
+/* 54 */
+EXTERN Tcl_Obj * Tcl_NewLongObj _ANSI_ARGS_((long longValue));
+/* 55 */
+EXTERN Tcl_Obj * Tcl_NewObj _ANSI_ARGS_((void));
+/* 56 */
+EXTERN Tcl_Obj * Tcl_NewStringObj _ANSI_ARGS_((CONST char * bytes,
+ int length));
+/* 57 */
+EXTERN void Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int boolValue));
+/* 58 */
+EXTERN unsigned char * Tcl_SetByteArrayLength _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int length));
+/* 59 */
+EXTERN void Tcl_SetByteArrayObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ CONST unsigned char * bytes, int length));
+/* 60 */
+EXTERN void Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ double doubleValue));
+/* 61 */
+EXTERN void Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int intValue));
+/* 62 */
+EXTERN void Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int objc, Tcl_Obj *CONST objv[]));
+/* 63 */
+EXTERN void Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ long longValue));
+/* 64 */
+EXTERN void Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int length));
+/* 65 */
+EXTERN void Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj* objPtr,
+ CONST char* bytes, int length));
+/* 66 */
+EXTERN void Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * message));
+/* 67 */
+EXTERN void Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * message, int length));
+/* 68 */
+EXTERN void Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp * interp));
+/* 69 */
+EXTERN void Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string));
+/* 70 */
+EXTERN void Tcl_AppendResult _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp));
+/* 71 */
+EXTERN Tcl_AsyncHandler Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc * proc,
+ ClientData clientData));
+/* 72 */
+EXTERN void Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
+/* 73 */
+EXTERN int Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp * interp,
+ int code));
+/* 74 */
+EXTERN void Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
+/* 75 */
+EXTERN int Tcl_AsyncReady _ANSI_ARGS_((void));
+/* 76 */
+EXTERN void Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp * interp));
+/* 77 */
+EXTERN char Tcl_Backslash _ANSI_ARGS_((CONST char * src,
+ int * readPtr));
+/* 78 */
+EXTERN int Tcl_BadChannelOption _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * optionName,
+ CONST char * optionList));
+/* 79 */
+EXTERN void Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_InterpDeleteProc * proc,
+ ClientData clientData));
+/* 80 */
+EXTERN void Tcl_CancelIdleCall _ANSI_ARGS_((
+ Tcl_IdleProc * idleProc,
+ ClientData clientData));
+/* 81 */
+EXTERN int Tcl_Close _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel chan));
+/* 82 */
+EXTERN int Tcl_CommandComplete _ANSI_ARGS_((CONST char * cmd));
+/* 83 */
+EXTERN char * Tcl_Concat _ANSI_ARGS_((int argc,
+ CONST84 char * CONST * objv));
+/* 84 */
+EXTERN int Tcl_ConvertElement _ANSI_ARGS_((CONST char * src,
+ char * dst, int flags));
+/* 85 */
+EXTERN int Tcl_ConvertCountedElement _ANSI_ARGS_((
+ CONST char * src, int length, char * dst,
+ int flags));
+/* 86 */
+EXTERN int Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp * slave,
+ CONST char * slaveCmd, Tcl_Interp * target,
+ CONST char * targetCmd, int argc,
+ CONST84 char * CONST * objv));
+/* 87 */
+EXTERN int Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp * slave,
+ CONST char * slaveCmd, Tcl_Interp * target,
+ CONST char * targetCmd, int objc,
+ Tcl_Obj *CONST objv[]));
+/* 88 */
+EXTERN Tcl_Channel Tcl_CreateChannel _ANSI_ARGS_((
+ Tcl_ChannelType * typePtr,
+ CONST char * chanName,
+ ClientData instanceData, int mask));
+/* 89 */
+EXTERN void Tcl_CreateChannelHandler _ANSI_ARGS_((
+ Tcl_Channel chan, int mask,
+ Tcl_ChannelProc * proc,
+ ClientData clientData));
+/* 90 */
+EXTERN void Tcl_CreateCloseHandler _ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_CloseProc * proc, ClientData clientData));
+/* 91 */
+EXTERN Tcl_Command Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc));
+
+
+
+/* 92 */
+EXTERN void Tcl_CreateEventSource _ANSI_ARGS_((
+ Tcl_EventSetupProc * setupProc,
+ Tcl_EventCheckProc * checkProc,
+ ClientData clientData));
+/* 93 */
+EXTERN void Tcl_CreateExitHandler _ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData));
+/* 94 */
+EXTERN Tcl_Interp * Tcl_CreateInterp _ANSI_ARGS_((void));
+/* 95 */
+EXTERN void Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, int numArgs,
+ Tcl_ValueType * argTypes,
+ Tcl_MathProc * proc, ClientData clientData));
+/* 96 */
+EXTERN Tcl_Command Tcl_CreateObjCommand _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * cmdName,
+ Tcl_ObjCmdProc * proc, ClientData clientData,
+ Tcl_CmdDeleteProc * deleteProc));
+/* 97 */
+EXTERN Tcl_Interp * Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * slaveName, int isSafe));
+/* 98 */
+EXTERN Tcl_TimerToken Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
+ Tcl_TimerProc * proc, ClientData clientData));
+/* 99 */
+EXTERN Tcl_Trace Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp * interp,
+ int level, Tcl_CmdTraceProc * proc,
+ ClientData clientData));
+/* 100 */
+EXTERN void Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name));
+/* 101 */
+EXTERN void Tcl_DeleteChannelHandler _ANSI_ARGS_((
+ Tcl_Channel chan, Tcl_ChannelProc * proc,
+ ClientData clientData));
+/* 102 */
+EXTERN void Tcl_DeleteCloseHandler _ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_CloseProc * proc, ClientData clientData));
+/* 103 */
+EXTERN int Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName));
+
+/* 104 */
+EXTERN int Tcl_DeleteCommandFromToken _ANSI_ARGS_(( Tcl_Interp * interp, Tcl_Command command));
+
+/* 105 */
+EXTERN void Tcl_DeleteEvents _ANSI_ARGS_((
+ Tcl_EventDeleteProc * proc,
+ ClientData clientData));
+/* 106 */
+EXTERN void Tcl_DeleteEventSource _ANSI_ARGS_((
+ Tcl_EventSetupProc * setupProc,
+ Tcl_EventCheckProc * checkProc,
+ ClientData clientData));
+/* 107 */
+EXTERN void Tcl_DeleteExitHandler _ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData));
+/* 108 */
+EXTERN void Tcl_DeleteHashEntry _ANSI_ARGS_((
+ Tcl_HashEntry * entryPtr));
+/* 109 */
+EXTERN void Tcl_DeleteHashTable _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr));
+/* 110 */
+EXTERN void Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp * interp));
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 111 */
+EXTERN void Tcl_DetachPids _ANSI_ARGS_((int numPids,
+ Tcl_Pid * pidPtr));
+#endif /* UNIX */
+#ifdef __WIN32__
+/* 111 */
+EXTERN void Tcl_DetachPids _ANSI_ARGS_((int numPids,
+ Tcl_Pid * pidPtr));
+#endif /* __WIN32__ */
+/* 112 */
+EXTERN void Tcl_DeleteTimerHandler _ANSI_ARGS_((
+ Tcl_TimerToken token));
+/* 113 */
+EXTERN void Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Trace trace));
+/* 114 */
+EXTERN void Tcl_DontCallWhenDeleted _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tcl_InterpDeleteProc * proc,
+ ClientData clientData));
+/* 115 */
+EXTERN int Tcl_DoOneEvent _ANSI_ARGS_((int flags));
+/* 116 */
+EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc * proc,
+ ClientData clientData));
+/* 117 */
+EXTERN char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr,
+ CONST char * str, int length));
+/* 118 */
+EXTERN char * Tcl_DStringAppendElement _ANSI_ARGS_((
+ Tcl_DString * dsPtr, CONST char * string));
+/* 119 */
+EXTERN void Tcl_DStringEndSublist _ANSI_ARGS_((
+ Tcl_DString * dsPtr));
+/* 120 */
+EXTERN void Tcl_DStringFree _ANSI_ARGS_((Tcl_DString * dsPtr));
+/* 121 */
+EXTERN void Tcl_DStringGetResult _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_DString * dsPtr));
+/* 122 */
+EXTERN void Tcl_DStringInit _ANSI_ARGS_((Tcl_DString * dsPtr));
+/* 123 */
+EXTERN void Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_DString * dsPtr));
+/* 124 */
+EXTERN void Tcl_DStringSetLength _ANSI_ARGS_((
+ Tcl_DString * dsPtr, int length));
+/* 125 */
+EXTERN void Tcl_DStringStartSublist _ANSI_ARGS_((
+ Tcl_DString * dsPtr));
+/* 126 */
+EXTERN int Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
+/* 127 */
+EXTERN CONST84_RETURN char * Tcl_ErrnoId _ANSI_ARGS_((void));
+/* 128 */
+EXTERN CONST84_RETURN char * Tcl_ErrnoMsg _ANSI_ARGS_((int err));
+/* 129 */
+EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string));
+/* 130 */
+EXTERN int Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * fileName));
+/* 131 */
+EXTERN int Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr));
+/* 132 */
+EXTERN void Tcl_EventuallyFree _ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_FreeProc * freeProc));
+/* 133 */
+EXTERN void Tcl_Exit _ANSI_ARGS_((int status));
+/* 134 */
+EXTERN int Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * hiddenCmdToken,
+ CONST char * cmdName));
+/* 135 */
+EXTERN int Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * ptr));
+/* 136 */
+EXTERN int Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int * ptr));
+/* 137 */
+EXTERN int Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, double * ptr));
+/* 138 */
+EXTERN int Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, double * ptr));
+/* 139 */
+EXTERN int Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, long * ptr));
+/* 140 */
+EXTERN int Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, long * ptr));
+/* 141 */
+EXTERN int Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr));
+/* 142 */
+EXTERN int Tcl_ExprString _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string));
+/* 143 */
+EXTERN void Tcl_Finalize _ANSI_ARGS_((void));
+/* 144 */
+EXTERN void Tcl_FindExecutable _ANSI_ARGS_((CONST char * argv0));
+/* 145 */
+EXTERN Tcl_HashEntry * Tcl_FirstHashEntry _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr,
+ Tcl_HashSearch * searchPtr));
+/* 146 */
+EXTERN int Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
+/* 147 */
+EXTERN void Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp * interp));
+/* 148 */
+EXTERN int Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * slaveCmd,
+ Tcl_Interp ** targetInterpPtr,
+ CONST84 char ** targetCmdPtr, int * argcPtr,
+ CONST84 char *** argvPtr));
+/* 149 */
+EXTERN int Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * slaveCmd,
+ Tcl_Interp ** targetInterpPtr,
+ CONST84 char ** targetCmdPtr, int * objcPtr,
+ Tcl_Obj *** objv));
+/* 150 */
+EXTERN ClientData Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name,
+ Tcl_InterpDeleteProc ** procPtr));
+/* 151 */
+EXTERN Tcl_Channel Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * chanName, int * modePtr));
+/* 152 */
+EXTERN int Tcl_GetChannelBufferSize _ANSI_ARGS_((
+ Tcl_Channel chan));
+/* 153 */
+EXTERN int Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
+ int direction, ClientData * handlePtr));
+/* 154 */
+EXTERN ClientData Tcl_GetChannelInstanceData _ANSI_ARGS_((
+ Tcl_Channel chan));
+/* 155 */
+EXTERN int Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
+/* 156 */
+EXTERN CONST84_RETURN char * Tcl_GetChannelName _ANSI_ARGS_((
+ Tcl_Channel chan));
+/* 157 */
+EXTERN int Tcl_GetChannelOption _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Channel chan,
+ CONST char * optionName, Tcl_DString * dsPtr));
+/* 158 */
+EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
+/* 159 */
+EXTERN int Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * cmdName, Tcl_CmdInfo * infoPtr));
+/* 160 */
+EXTERN CONST84_RETURN char * Tcl_GetCommandName _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Command command));
+/* 161 */
+EXTERN int Tcl_GetErrno _ANSI_ARGS_((void));
+/* 162 */
+EXTERN CONST84_RETURN char * Tcl_GetHostName _ANSI_ARGS_((void));
+/* 163 */
+EXTERN int Tcl_GetInterpPath _ANSI_ARGS_((
+ Tcl_Interp * askInterp,
+ Tcl_Interp * slaveInterp));
+/* 164 */
+EXTERN Tcl_Interp * Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp * interp));
+/* 165 */
+EXTERN CONST char * Tcl_GetNameOfExecutable _ANSI_ARGS_((void));
+/* 166 */
+EXTERN Tcl_Obj * Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp * interp));
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 167 */
+EXTERN int Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int forWriting,
+ int checkUsage, ClientData * filePtr));
+#endif /* UNIX */
+/* 168 */
+EXTERN Tcl_PathType Tcl_GetPathType _ANSI_ARGS_((CONST char * path));
+/* 169 */
+EXTERN int Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_DString * dsPtr));
+/* 170 */
+EXTERN int Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_Obj * objPtr));
+/* 171 */
+EXTERN int Tcl_GetServiceMode _ANSI_ARGS_((void));
+/* 172 */
+EXTERN Tcl_Interp * Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * slaveName));
+/* 173 */
+EXTERN Tcl_Channel Tcl_GetStdChannel _ANSI_ARGS_((int type));
+/* 174 */
+EXTERN CONST84_RETURN char * Tcl_GetStringResult _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 175 */
+EXTERN CONST84_RETURN char * Tcl_GetVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags));
+/* 176 */
+EXTERN CONST84_RETURN char * Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags));
+/* 177 */
+EXTERN int Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * command));
+/* 178 */
+EXTERN int Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr));
+/* 179 */
+EXTERN int Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * cmdName,
+ CONST char * hiddenCmdToken));
+/* 180 */
+EXTERN int Tcl_Init _ANSI_ARGS_((Tcl_Interp * interp));
+/* 181 */
+EXTERN void Tcl_InitHashTable _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr, int keyType));
+/* 182 */
+EXTERN int Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
+/* 183 */
+EXTERN int Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
+/* 184 */
+EXTERN int Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp * interp));
+/* 185 */
+EXTERN int Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp * interp));
+/* 186 */
+EXTERN char * Tcl_JoinPath _ANSI_ARGS_((int argc,
+ CONST84 char * CONST * objv,
+ Tcl_DString * resultPtr));
+/* 187 */
+EXTERN int Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, char * addr, int type));
+/* Slot 188 is reserved */
+/* 189 */
+EXTERN Tcl_Channel Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
+ int mode));
+/* 190 */
+EXTERN int Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp * interp));
+/* 191 */
+EXTERN Tcl_Channel Tcl_MakeTcpClientChannel _ANSI_ARGS_((
+ ClientData tcpSocket));
+/* 192 */
+EXTERN char * Tcl_Merge _ANSI_ARGS_((int argc,
+ CONST84 char * CONST * objv));
+/* 193 */
+EXTERN Tcl_HashEntry * Tcl_NextHashEntry _ANSI_ARGS_((
+ Tcl_HashSearch * searchPtr));
+/* 194 */
+EXTERN void Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
+ int mask));
+/* 195 */
+EXTERN Tcl_Obj * Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr,
+ int flags));
+/* 196 */
+EXTERN Tcl_Obj * Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr,
+ Tcl_Obj * newValuePtr, int flags));
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 197 */
+EXTERN Tcl_Channel Tcl_OpenCommandChannel _ANSI_ARGS_((
+ Tcl_Interp * interp, int argc,
+ CONST84 Tcl_Obj *CONST *objv, int flags));
+#endif /* UNIX */
+#ifdef __WIN32__
+/* 197 */
+EXTERN Tcl_Channel Tcl_OpenCommandChannel _ANSI_ARGS_((
+ Tcl_Interp * interp, int argc,
+ CONST84 Tcl_Obj *CONST *objv, int flags));
+#endif /* __WIN32__ */
+/* 198 */
+EXTERN Tcl_Channel Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * fileName,
+ CONST char * modeString, int permissions));
+/* 199 */
+EXTERN Tcl_Channel Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp * interp,
+ int port, CONST char * address,
+ CONST char * myaddr, int myport, int async));
+/* 200 */
+EXTERN Tcl_Channel Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp * interp,
+ int port, CONST char * host,
+ Tcl_TcpAcceptProc * acceptProc,
+ ClientData callbackData));
+/* 201 */
+EXTERN void Tcl_Preserve _ANSI_ARGS_((ClientData data));
+/* 202 */
+EXTERN void Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp * interp,
+ double value, char * dst));
+/* 203 */
+EXTERN int Tcl_PutEnv _ANSI_ARGS_((CONST char * string));
+/* 204 */
+EXTERN CONST84_RETURN char * Tcl_PosixError _ANSI_ARGS_((Tcl_Interp * interp));
+/* 205 */
+EXTERN void Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event * evPtr,
+ Tcl_QueuePosition position));
+/* 206 */
+EXTERN int Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
+ char * bufPtr, int toRead));
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 207 */
+EXTERN void Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
+#endif /* UNIX */
+#ifdef __WIN32__
+/* 207 */
+EXTERN void Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
+#endif /* __WIN32__ */
+/* 208 */
+EXTERN int Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * cmd, int flags));
+/* 209 */
+EXTERN int Tcl_RecordAndEvalObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * cmdPtr,
+ int flags));
+/* 210 */
+EXTERN void Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel chan));
+/* 211 */
+EXTERN void Tcl_RegisterObjType _ANSI_ARGS_((
+ Tcl_ObjType * typePtr));
+/* 212 */
+EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string));
+/* 213 */
+EXTERN int Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_RegExp regexp, CONST char * str,
+ CONST char * start));
+/* 214 */
+EXTERN int Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, CONST char * pattern));
+/* 215 */
+EXTERN void Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
+ int index, CONST84 char ** startPtr,
+ CONST84 char ** endPtr));
+/* 216 */
+EXTERN void Tcl_Release _ANSI_ARGS_((ClientData clientData));
+/* 217 */
+EXTERN void Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp * interp));
+/* 218 */
+EXTERN int Tcl_ScanElement _ANSI_ARGS_((CONST char * str,
+ int * flagPtr));
+/* 219 */
+EXTERN int Tcl_ScanCountedElement _ANSI_ARGS_((CONST char * str,
+ int length, int * flagPtr));
+/* 220 */
+EXTERN int Tcl_SeekOld _ANSI_ARGS_((Tcl_Channel chan,
+ int offset, int mode));
+/* 221 */
+EXTERN int Tcl_ServiceAll _ANSI_ARGS_((void));
+/* 222 */
+EXTERN int Tcl_ServiceEvent _ANSI_ARGS_((int flags));
+/* 223 */
+EXTERN void Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name,
+ Tcl_InterpDeleteProc * proc,
+ ClientData clientData));
+/* 224 */
+EXTERN void Tcl_SetChannelBufferSize _ANSI_ARGS_((
+ Tcl_Channel chan, int sz));
+/* 225 */
+EXTERN int Tcl_SetChannelOption _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Channel chan,
+ CONST char * optionName,
+ CONST char * newValue));
+/* 226 */
+EXTERN int Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * cmdName,
+ CONST Tcl_CmdInfo * infoPtr));
+/* 227 */
+EXTERN void Tcl_SetErrno _ANSI_ARGS_((int err));
+/* 228 */
+EXTERN void Tcl_SetErrorCode _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp));
+/* 229 */
+EXTERN void Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time * timePtr));
+/* 230 */
+EXTERN void Tcl_SetPanicProc _ANSI_ARGS_((
+ Tcl_PanicProc * panicProc));
+/* 231 */
+EXTERN int Tcl_SetRecursionLimit _ANSI_ARGS_((
+ Tcl_Interp * interp, int depth));
+/* 232 */
+EXTERN void Tcl_SetResult _ANSI_ARGS_((Tcl_Interp * interp,
+ char * str, Tcl_FreeProc * freeProc));
+/* 233 */
+EXTERN int Tcl_SetServiceMode _ANSI_ARGS_((int mode));
+/* 234 */
+EXTERN void Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * errorObjPtr));
+/* 235 */
+EXTERN void Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * resultObjPtr));
+/* 236 */
+EXTERN void Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
+ int type));
+/* 237 */
+EXTERN CONST84_RETURN char * Tcl_SetVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, CONST char * newValue,
+ int flags));
+/* 238 */
+EXTERN CONST84_RETURN char * Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ CONST char * newValue, int flags));
+/* 239 */
+EXTERN CONST84_RETURN char * Tcl_SignalId _ANSI_ARGS_((int sig));
+/* 240 */
+EXTERN CONST84_RETURN char * Tcl_SignalMsg _ANSI_ARGS_((int sig));
+/* 241 */
+EXTERN void Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp * interp));
+/* 242 */
+EXTERN int Tcl_SplitList _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * listStr, int * argcPtr,
+ CONST84 char *** argvPtr));
+/* 243 */
+EXTERN void Tcl_SplitPath _ANSI_ARGS_((CONST char * path,
+ int * argcPtr, CONST84 char *** argvPtr));
+/* 244 */
+EXTERN void Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * pkgName,
+ Tcl_PackageInitProc * initProc,
+ Tcl_PackageInitProc * safeInitProc));
+/* 245 */
+EXTERN int Tcl_StringMatch _ANSI_ARGS_((CONST char * str,
+ CONST char * pattern));
+/* 246 */
+EXTERN int Tcl_TellOld _ANSI_ARGS_((Tcl_Channel chan));
+/* 247 */
+EXTERN int Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags,
+ Tcl_VarTraceProc * proc,
+ ClientData clientData));
+/* 248 */
+EXTERN int Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags, Tcl_VarTraceProc * proc,
+ ClientData clientData));
+/* 249 */
+EXTERN char * Tcl_TranslateFileName _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ Tcl_DString * bufferPtr));
+/* 250 */
+EXTERN int Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan,
+ CONST char * str, int len, int atHead));
+/* 251 */
+EXTERN void Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName));
+/* 252 */
+EXTERN int Tcl_UnregisterChannel _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Channel chan));
+/* 253 */
+EXTERN int Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags));
+/* 254 */
+EXTERN int Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags));
+/* 255 */
+EXTERN void Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags,
+ Tcl_VarTraceProc * proc,
+ ClientData clientData));
+/* 256 */
+EXTERN void Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags, Tcl_VarTraceProc * proc,
+ ClientData clientData));
+/* 257 */
+EXTERN void Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName));
+/* 258 */
+EXTERN int Tcl_UpVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * frameName, CONST char * varName,
+ CONST char * localName, int flags));
+/* 259 */
+EXTERN int Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * frameName, CONST char * part1,
+ CONST char * part2, CONST char * localName,
+ int flags));
+/* 260 */
+EXTERN int Tcl_VarEval _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp));
+/* 261 */
+EXTERN ClientData Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags,
+ Tcl_VarTraceProc * procPtr,
+ ClientData prevClientData));
+/* 262 */
+EXTERN ClientData Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags, Tcl_VarTraceProc * procPtr,
+ ClientData prevClientData));
+/* 263 */
+EXTERN int Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
+ CONST char * s, int slen));
+/* 264 */
+EXTERN void Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[],
+ CONST char * message));
+/* 265 */
+EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_((
+ CONST char * fileName));
+/* 266 */
+EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((CONST char * file,
+ int line));
+/* 267 */
+EXTERN void Tcl_AppendResultVA _ANSI_ARGS_((Tcl_Interp * interp,
+ va_list argList));
+/* 268 */
+EXTERN void Tcl_AppendStringsToObjVA _ANSI_ARGS_((
+ Tcl_Obj * objPtr, va_list argList));
+/* 269 */
+EXTERN CONST84_RETURN char * Tcl_HashStats _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr));
+/* 270 */
+EXTERN CONST84_RETURN char * Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, CONST84 char ** termPtr));
+/* 271 */
+EXTERN CONST84_RETURN char * Tcl_PkgPresent _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * version,
+ int exact));
+/* 272 */
+EXTERN CONST84_RETURN char * Tcl_PkgPresentEx _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ CONST char * version, int exact,
+ ClientData * clientDataPtr));
+/* 273 */
+EXTERN int Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * version));
+/* 274 */
+EXTERN CONST84_RETURN char * Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * version,
+ int exact));
+/* 275 */
+EXTERN void Tcl_SetErrorCodeVA _ANSI_ARGS_((Tcl_Interp * interp,
+ va_list argList));
+/* 276 */
+EXTERN int Tcl_VarEvalVA _ANSI_ARGS_((Tcl_Interp * interp,
+ va_list argList));
+/* 277 */
+EXTERN Tcl_Pid Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int * statPtr,
+ int options));
+/* 278 */
+EXTERN void Tcl_PanicVA _ANSI_ARGS_((CONST char * format,
+ va_list argList));
+/* 279 */
+EXTERN void Tcl_GetVersion _ANSI_ARGS_((int * major, int * minor,
+ int * patchLevel, int * type));
+/* 280 */
+EXTERN void Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp * interp));
+/* 281 */
+EXTERN Tcl_Channel Tcl_StackChannel _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_ChannelType * typePtr,
+ ClientData instanceData, int mask,
+ Tcl_Channel prevChan));
+/* 282 */
+EXTERN int Tcl_UnstackChannel _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel chan));
+/* 283 */
+EXTERN Tcl_Channel Tcl_GetStackedChannel _ANSI_ARGS_((Tcl_Channel chan));
+/* 284 */
+EXTERN void Tcl_SetMainLoop _ANSI_ARGS_((Tcl_MainLoopProc * proc));
+/* Slot 285 is reserved */
+/* 286 */
+EXTERN void Tcl_AppendObjToObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ Tcl_Obj * appendObjPtr));
+/* 287 */
+EXTERN Tcl_Encoding Tcl_CreateEncoding _ANSI_ARGS_((
+ Tcl_EncodingType * typePtr));
+/* 288 */
+EXTERN void Tcl_CreateThreadExitHandler _ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData));
+/* 289 */
+EXTERN void Tcl_DeleteThreadExitHandler _ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData));
+/* 290 */
+EXTERN void Tcl_DiscardResult _ANSI_ARGS_((
+ Tcl_SavedResult * statePtr));
+/* 291 */
+EXTERN int Tcl_EvalEx _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * script, int numBytes, int flags));
+/* 292 */
+EXTERN int Tcl_EvalObjv _ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[], int flags));
+/* 293 */
+EXTERN int Tcl_EvalObjEx _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int flags));
+/* 294 */
+EXTERN void Tcl_ExitThread _ANSI_ARGS_((int status));
+/* 295 */
+EXTERN int Tcl_ExternalToUtf _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, int flags,
+ Tcl_EncodingState * statePtr, char * dst,
+ int dstLen, int * srcReadPtr,
+ int * dstWrotePtr, int * dstCharsPtr));
+/* 296 */
+EXTERN char * Tcl_ExternalToUtfDString _ANSI_ARGS_((
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, Tcl_DString * dsPtr));
+/* 297 */
+EXTERN void Tcl_FinalizeThread _ANSI_ARGS_((void));
+/* 298 */
+EXTERN void Tcl_FinalizeNotifier _ANSI_ARGS_((
+ ClientData clientData));
+/* 299 */
+EXTERN void Tcl_FreeEncoding _ANSI_ARGS_((Tcl_Encoding encoding));
+/* 300 */
+EXTERN Tcl_ThreadId Tcl_GetCurrentThread _ANSI_ARGS_((void));
+/* 301 */
+EXTERN Tcl_Encoding Tcl_GetEncoding _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name));
+/* 302 */
+EXTERN CONST84_RETURN char * Tcl_GetEncodingName _ANSI_ARGS_((
+ Tcl_Encoding encoding));
+/* 303 */
+EXTERN void Tcl_GetEncodingNames _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 304 */
+EXTERN int Tcl_GetIndexFromObjStruct _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ CONST VOID * tablePtr, int offset,
+ CONST char * msg, int flags, int * indexPtr));
+/* 305 */
+EXTERN VOID * Tcl_GetThreadData _ANSI_ARGS_((
+ Tcl_ThreadDataKey * keyPtr, int size));
+/* 306 */
+EXTERN Tcl_Obj * Tcl_GetVar2Ex _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags));
+/* 307 */
+EXTERN ClientData Tcl_InitNotifier _ANSI_ARGS_((void));
+/* 308 */
+EXTERN void Tcl_MutexLock _ANSI_ARGS_((Tcl_Mutex * mutexPtr));
+/* 309 */
+EXTERN void Tcl_MutexUnlock _ANSI_ARGS_((Tcl_Mutex * mutexPtr));
+/* 310 */
+EXTERN void Tcl_ConditionNotify _ANSI_ARGS_((
+ Tcl_Condition * condPtr));
+/* 311 */
+EXTERN void Tcl_ConditionWait _ANSI_ARGS_((
+ Tcl_Condition * condPtr,
+ Tcl_Mutex * mutexPtr, Tcl_Time * timePtr));
+/* 312 */
+EXTERN int Tcl_NumUtfChars _ANSI_ARGS_((CONST char * src,
+ int len));
+/* 313 */
+EXTERN int Tcl_ReadChars _ANSI_ARGS_((Tcl_Channel channel,
+ Tcl_Obj * objPtr, int charsToRead,
+ int appendFlag));
+/* 314 */
+EXTERN void Tcl_RestoreResult _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_SavedResult * statePtr));
+/* 315 */
+EXTERN void Tcl_SaveResult _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_SavedResult * statePtr));
+/* 316 */
+EXTERN int Tcl_SetSystemEncoding _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name));
+/* 317 */
+EXTERN Tcl_Obj * Tcl_SetVar2Ex _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ Tcl_Obj * newValuePtr, int flags));
+/* 318 */
+EXTERN void Tcl_ThreadAlert _ANSI_ARGS_((Tcl_ThreadId threadId));
+/* 319 */
+EXTERN void Tcl_ThreadQueueEvent _ANSI_ARGS_((
+ Tcl_ThreadId threadId, Tcl_Event* evPtr,
+ Tcl_QueuePosition position));
+/* 320 */
+EXTERN Tcl_UniChar Tcl_UniCharAtIndex _ANSI_ARGS_((CONST char * src,
+ int index));
+/* 321 */
+EXTERN Tcl_UniChar Tcl_UniCharToLower _ANSI_ARGS_((int ch));
+/* 322 */
+EXTERN Tcl_UniChar Tcl_UniCharToTitle _ANSI_ARGS_((int ch));
+/* 323 */
+EXTERN Tcl_UniChar Tcl_UniCharToUpper _ANSI_ARGS_((int ch));
+/* 324 */
+EXTERN int Tcl_UniCharToUtf _ANSI_ARGS_((int ch, char * buf));
+/* 325 */
+EXTERN CONST84_RETURN char * Tcl_UtfAtIndex _ANSI_ARGS_((CONST char * src,
+ int index));
+/* 326 */
+EXTERN int Tcl_UtfCharComplete _ANSI_ARGS_((CONST char * src,
+ int len));
+/* 327 */
+EXTERN int Tcl_UtfBackslash _ANSI_ARGS_((CONST char * src,
+ int * readPtr, char * dst));
+/* 328 */
+EXTERN CONST84_RETURN char * Tcl_UtfFindFirst _ANSI_ARGS_((CONST char * src,
+ int ch));
+/* 329 */
+EXTERN CONST84_RETURN char * Tcl_UtfFindLast _ANSI_ARGS_((CONST char * src,
+ int ch));
+/* 330 */
+EXTERN CONST84_RETURN char * Tcl_UtfNext _ANSI_ARGS_((CONST char * src));
+/* 331 */
+EXTERN CONST84_RETURN char * Tcl_UtfPrev _ANSI_ARGS_((CONST char * src,
+ CONST char * start));
+/* 332 */
+EXTERN int Tcl_UtfToExternal _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, int flags,
+ Tcl_EncodingState * statePtr, char * dst,
+ int dstLen, int * srcReadPtr,
+ int * dstWrotePtr, int * dstCharsPtr));
+/* 333 */
+EXTERN char * Tcl_UtfToExternalDString _ANSI_ARGS_((
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, Tcl_DString * dsPtr));
+/* 334 */
+EXTERN int Tcl_UtfToLower _ANSI_ARGS_((char * src));
+/* 335 */
+EXTERN int Tcl_UtfToTitle _ANSI_ARGS_((char * src));
+/* 336 */
+EXTERN int Tcl_UtfToUniChar _ANSI_ARGS_((CONST char * src,
+ Tcl_UniChar * chPtr));
+/* 337 */
+EXTERN int Tcl_UtfToUpper _ANSI_ARGS_((char * src));
+/* 338 */
+EXTERN int Tcl_WriteChars _ANSI_ARGS_((Tcl_Channel chan,
+ CONST char * src, int srcLen));
+/* 339 */
+EXTERN int Tcl_WriteObj _ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_Obj * objPtr));
+/* 340 */
+EXTERN char * Tcl_GetString _ANSI_ARGS_((Tcl_Obj * objPtr));
+/* 341 */
+EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir _ANSI_ARGS_((void));
+/* 342 */
+EXTERN void Tcl_SetDefaultEncodingDir _ANSI_ARGS_((
+ CONST char * path));
+/* 343 */
+EXTERN void Tcl_AlertNotifier _ANSI_ARGS_((ClientData clientData));
+/* 344 */
+EXTERN void Tcl_ServiceModeHook _ANSI_ARGS_((int mode));
+/* 345 */
+EXTERN int Tcl_UniCharIsAlnum _ANSI_ARGS_((int ch));
+/* 346 */
+EXTERN int Tcl_UniCharIsAlpha _ANSI_ARGS_((int ch));
+/* 347 */
+EXTERN int Tcl_UniCharIsDigit _ANSI_ARGS_((int ch));
+/* 348 */
+EXTERN int Tcl_UniCharIsLower _ANSI_ARGS_((int ch));
+/* 349 */
+EXTERN int Tcl_UniCharIsSpace _ANSI_ARGS_((int ch));
+/* 350 */
+EXTERN int Tcl_UniCharIsUpper _ANSI_ARGS_((int ch));
+/* 351 */
+EXTERN int Tcl_UniCharIsWordChar _ANSI_ARGS_((int ch));
+/* 352 */
+EXTERN int Tcl_UniCharLen _ANSI_ARGS_((CONST Tcl_UniChar * str));
+/* 353 */
+EXTERN int Tcl_UniCharNcmp _ANSI_ARGS_((CONST Tcl_UniChar * cs,
+ CONST Tcl_UniChar * ct, unsigned long n));
+/* 354 */
+EXTERN char * Tcl_UniCharToUtfDString _ANSI_ARGS_((
+ CONST Tcl_UniChar * string, int numChars,
+ Tcl_DString * dsPtr));
+/* 355 */
+EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString _ANSI_ARGS_((
+ CONST char * string, int length,
+ Tcl_DString * dsPtr));
+/* 356 */
+EXTERN Tcl_RegExp Tcl_GetRegExpFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * patObj,
+ int flags));
+/* 357 */
+EXTERN Tcl_Obj * Tcl_EvalTokens _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Token * tokenPtr, int count));
+/* 358 */
+EXTERN void Tcl_FreeParse _ANSI_ARGS_((Tcl_Parse * parsePtr));
+/* 359 */
+EXTERN void Tcl_LogCommandInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * script, CONST char * command,
+ int length));
+/* 360 */
+EXTERN int Tcl_ParseBraces _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string, int numBytes,
+ Tcl_Parse * parsePtr, int append,
+ CONST84 char ** termPtr));
+/* 361 */
+EXTERN int Tcl_ParseCommand _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string, int numBytes,
+ int nested, Tcl_Parse * parsePtr));
+/* 362 */
+EXTERN int Tcl_ParseExpr _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string, int numBytes,
+ Tcl_Parse * parsePtr));
+/* 363 */
+EXTERN int Tcl_ParseQuotedString _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * string,
+ int numBytes, Tcl_Parse * parsePtr,
+ int append, CONST84 char ** termPtr));
+/* 364 */
+EXTERN int Tcl_ParseVarName _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string, int numBytes,
+ Tcl_Parse * parsePtr, int append));
+/* 365 */
+EXTERN char * Tcl_GetCwd _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_DString * cwdPtr));
+/* 366 */
+EXTERN int Tcl_Chdir _ANSI_ARGS_((CONST char * dirName));
+/* 367 */
+EXTERN int Tcl_Access _ANSI_ARGS_((CONST char * path, int mode));
+/* 368 */
+EXTERN int Tcl_Stat _ANSI_ARGS_((CONST char * path,
+ struct stat * bufPtr));
+/* 369 */
+EXTERN int Tcl_UtfNcmp _ANSI_ARGS_((CONST char * s1,
+ CONST char * s2, unsigned long n));
+/* 370 */
+EXTERN int Tcl_UtfNcasecmp _ANSI_ARGS_((CONST char * s1,
+ CONST char * s2, unsigned long n));
+/* 371 */
+EXTERN int Tcl_StringCaseMatch _ANSI_ARGS_((CONST char * str,
+ CONST char * pattern, int nocase));
+/* 372 */
+EXTERN int Tcl_UniCharIsControl _ANSI_ARGS_((int ch));
+/* 373 */
+EXTERN int Tcl_UniCharIsGraph _ANSI_ARGS_((int ch));
+/* 374 */
+EXTERN int Tcl_UniCharIsPrint _ANSI_ARGS_((int ch));
+/* 375 */
+EXTERN int Tcl_UniCharIsPunct _ANSI_ARGS_((int ch));
+/* 376 */
+EXTERN int Tcl_RegExpExecObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_RegExp regexp, Tcl_Obj * objPtr,
+ int offset, int nmatches, int flags));
+/* 377 */
+EXTERN void Tcl_RegExpGetInfo _ANSI_ARGS_((Tcl_RegExp regexp,
+ Tcl_RegExpInfo * infoPtr));
+/* 378 */
+EXTERN Tcl_Obj * Tcl_NewUnicodeObj _ANSI_ARGS_((
+ CONST Tcl_UniChar * unicode, int numChars));
+/* 379 */
+EXTERN void Tcl_SetUnicodeObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ CONST Tcl_UniChar * unicode, int numChars));
+/* 380 */
+EXTERN int Tcl_GetCharLength _ANSI_ARGS_((Tcl_Obj * objPtr));
+/* 381 */
+EXTERN Tcl_UniChar Tcl_GetUniChar _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int index));
+/* 382 */
+EXTERN Tcl_UniChar * Tcl_GetUnicode _ANSI_ARGS_((Tcl_Obj * objPtr));
+/* 383 */
+EXTERN Tcl_Obj * Tcl_GetRange _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int first, int last));
+/* 384 */
+EXTERN void Tcl_AppendUnicodeToObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ CONST Tcl_UniChar * unicode, int length));
+/* 385 */
+EXTERN int Tcl_RegExpMatchObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * stringObj, Tcl_Obj * patternObj));
+/* 386 */
+EXTERN void Tcl_SetNotifier _ANSI_ARGS_((
+ Tcl_NotifierProcs * notifierProcPtr));
+/* 387 */
+EXTERN Tcl_Mutex * Tcl_GetAllocMutex _ANSI_ARGS_((void));
+/* 388 */
+EXTERN int Tcl_GetChannelNames _ANSI_ARGS_((Tcl_Interp * interp));
+/* 389 */
+EXTERN int Tcl_GetChannelNamesEx _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * pattern));
+/* 390 */
+EXTERN int Tcl_ProcObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int objc,
+ Tcl_Obj *CONST objv[]));
+/* 391 */
+EXTERN void Tcl_ConditionFinalize _ANSI_ARGS_((
+ Tcl_Condition * condPtr));
+/* 392 */
+EXTERN void Tcl_MutexFinalize _ANSI_ARGS_((Tcl_Mutex * mutex));
+/* 393 */
+EXTERN int Tcl_CreateThread _ANSI_ARGS_((Tcl_ThreadId * idPtr,
+ Tcl_ThreadCreateProc proc,
+ ClientData clientData, int stackSize,
+ int flags));
+/* 394 */
+EXTERN int Tcl_ReadRaw _ANSI_ARGS_((Tcl_Channel chan,
+ char * dst, int bytesToRead));
+/* 395 */
+EXTERN int Tcl_WriteRaw _ANSI_ARGS_((Tcl_Channel chan,
+ CONST char * src, int srcLen));
+/* 396 */
+EXTERN Tcl_Channel Tcl_GetTopChannel _ANSI_ARGS_((Tcl_Channel chan));
+/* 397 */
+EXTERN int Tcl_ChannelBuffered _ANSI_ARGS_((Tcl_Channel chan));
+/* 398 */
+EXTERN CONST84_RETURN char * Tcl_ChannelName _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 399 */
+EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 400 */
+EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 401 */
+EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 402 */
+EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 403 */
+EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 404 */
+EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 405 */
+EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 406 */
+EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 407 */
+EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 408 */
+EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 409 */
+EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 410 */
+EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 411 */
+EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+/* 412 */
+EXTERN int Tcl_JoinThread _ANSI_ARGS_((Tcl_ThreadId threadId,
+ int* result));
+/* 413 */
+EXTERN int Tcl_IsChannelShared _ANSI_ARGS_((Tcl_Channel channel));
+/* 414 */
+EXTERN int Tcl_IsChannelRegistered _ANSI_ARGS_((
+ Tcl_Interp* interp, Tcl_Channel channel));
+/* 415 */
+EXTERN void Tcl_CutChannel _ANSI_ARGS_((Tcl_Channel channel));
+/* 416 */
+EXTERN void Tcl_SpliceChannel _ANSI_ARGS_((Tcl_Channel channel));
+/* 417 */
+EXTERN void Tcl_ClearChannelHandlers _ANSI_ARGS_((
+ Tcl_Channel channel));
+/* 418 */
+EXTERN int Tcl_IsChannelExisting _ANSI_ARGS_((
+ CONST char* channelName));
+/* 419 */
+EXTERN int Tcl_UniCharNcasecmp _ANSI_ARGS_((
+ CONST Tcl_UniChar * cs,
+ CONST Tcl_UniChar * ct, unsigned long n));
+/* 420 */
+EXTERN int Tcl_UniCharCaseMatch _ANSI_ARGS_((
+ CONST Tcl_UniChar * ustr,
+ CONST Tcl_UniChar * pattern, int nocase));
+/* 421 */
+EXTERN Tcl_HashEntry * Tcl_FindHashEntry _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr, CONST char * key));
+/* 422 */
+EXTERN Tcl_HashEntry * Tcl_CreateHashEntry _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr, CONST char * key,
+ int * newPtr));
+/* 423 */
+EXTERN void Tcl_InitCustomHashTable _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr, int keyType,
+ Tcl_HashKeyType * typePtr));
+/* 424 */
+EXTERN void Tcl_InitObjHashTable _ANSI_ARGS_((
+ Tcl_HashTable * tablePtr));
+/* 425 */
+EXTERN ClientData Tcl_CommandTraceInfo _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * varName,
+ int flags, Tcl_CommandTraceProc * procPtr,
+ ClientData prevClientData));
+/* 426 */
+EXTERN int Tcl_TraceCommand _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags,
+ Tcl_CommandTraceProc * proc,
+ ClientData clientData));
+/* 427 */
+EXTERN void Tcl_UntraceCommand _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags,
+ Tcl_CommandTraceProc * proc,
+ ClientData clientData));
+/* 428 */
+EXTERN char * Tcl_AttemptAlloc _ANSI_ARGS_((unsigned int size));
+/* 429 */
+EXTERN char * Tcl_AttemptDbCkalloc _ANSI_ARGS_((unsigned int size,
+ CONST char * file, int line));
+/* 430 */
+EXTERN char * Tcl_AttemptRealloc _ANSI_ARGS_((char * ptr,
+ unsigned int size));
+/* 431 */
+EXTERN char * Tcl_AttemptDbCkrealloc _ANSI_ARGS_((char * ptr,
+ unsigned int size, CONST char * file,
+ int line));
+/* 432 */
+EXTERN int Tcl_AttemptSetObjLength _ANSI_ARGS_((
+ Tcl_Obj * objPtr, int length));
+/* 433 */
+EXTERN Tcl_ThreadId Tcl_GetChannelThread _ANSI_ARGS_((
+ Tcl_Channel channel));
+/* 434 */
+EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ int * lengthPtr));
+/* 435 */
+EXTERN int Tcl_GetMathFuncInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, int * numArgsPtr,
+ Tcl_ValueType ** argTypesPtr,
+ Tcl_MathProc ** procPtr,
+ ClientData * clientDataPtr));
+/* 436 */
+EXTERN Tcl_Obj * Tcl_ListMathFuncs _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * pattern));
+/* 437 */
+EXTERN Tcl_Obj * Tcl_SubstObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int flags));
+/* 438 */
+EXTERN int Tcl_DetachChannel _ANSI_ARGS_((Tcl_Interp* interp,
+ Tcl_Channel channel));
+/* 439 */
+EXTERN int Tcl_IsStandardChannel _ANSI_ARGS_((
+ Tcl_Channel channel));
+/* 440 */
+EXTERN int Tcl_FSCopyFile _ANSI_ARGS_((Tcl_Obj * srcPathPtr,
+ Tcl_Obj * destPathPtr));
+/* 441 */
+EXTERN int Tcl_FSCopyDirectory _ANSI_ARGS_((
+ Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr,
+ Tcl_Obj ** errorPtr));
+/* 442 */
+EXTERN int Tcl_FSCreateDirectory _ANSI_ARGS_((Tcl_Obj * pathPtr));
+/* 443 */
+EXTERN int Tcl_FSDeleteFile _ANSI_ARGS_((Tcl_Obj * pathPtr));
+/* 444 */
+EXTERN int Tcl_FSLoadFile _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * pathPtr, CONST char * sym1,
+ CONST char * sym2,
+ Tcl_PackageInitProc ** proc1Ptr,
+ Tcl_PackageInitProc ** proc2Ptr,
+ Tcl_LoadHandle * handlePtr,
+ Tcl_FSUnloadFileProc ** unloadProcPtr));
+/* 445 */
+EXTERN int Tcl_FSMatchInDirectory _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * result,
+ Tcl_Obj * pathPtr, CONST char * pattern,
+ Tcl_GlobTypeData * types));
+/* 446 */
+EXTERN Tcl_Obj * Tcl_FSLink _ANSI_ARGS_((Tcl_Obj * pathPtr,
+ Tcl_Obj * toPtr, int linkAction));
+/* 447 */
+EXTERN int Tcl_FSRemoveDirectory _ANSI_ARGS_((Tcl_Obj * pathPtr,
+ int recursive, Tcl_Obj ** errorPtr));
+/* 448 */
+EXTERN int Tcl_FSRenameFile _ANSI_ARGS_((Tcl_Obj * srcPathPtr,
+ Tcl_Obj * destPathPtr));
+/* 449 */
+EXTERN int Tcl_FSLstat _ANSI_ARGS_((Tcl_Obj * pathPtr,
+ Tcl_StatBuf * buf));
+/* 450 */
+EXTERN int Tcl_FSUtime _ANSI_ARGS_((Tcl_Obj * pathPtr,
+ struct utimbuf * tval));
+/* 451 */
+EXTERN int Tcl_FSFileAttrsGet _ANSI_ARGS_((Tcl_Interp * interp,
+ int index, Tcl_Obj * pathPtr,
+ Tcl_Obj ** objPtrRef));
+/* 452 */
+EXTERN int Tcl_FSFileAttrsSet _ANSI_ARGS_((Tcl_Interp * interp,
+ int index, Tcl_Obj * pathPtr,
+ Tcl_Obj * objPtr));
+/* 453 */
+EXTERN CONST char ** Tcl_FSFileAttrStrings _ANSI_ARGS_((Tcl_Obj * pathPtr,
+ Tcl_Obj ** objPtrRef));
+/* 454 */
+EXTERN int Tcl_FSStat _ANSI_ARGS_((Tcl_Obj * pathPtr,
+ Tcl_StatBuf * buf));
+/* 455 */
+EXTERN int Tcl_FSAccess _ANSI_ARGS_((Tcl_Obj * pathPtr,
+ int mode));
+/* 456 */
+EXTERN Tcl_Channel Tcl_FSOpenFileChannel _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * pathPtr,
+ CONST char * modeString, int permissions));
+/* 457 */
+EXTERN Tcl_Obj* Tcl_FSGetCwd _ANSI_ARGS_((Tcl_Interp * interp));
+/* 458 */
+EXTERN int Tcl_FSChdir _ANSI_ARGS_((Tcl_Obj * pathPtr));
+/* 459 */
+EXTERN int Tcl_FSConvertToPathType _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * pathPtr));
+/* 460 */
+EXTERN Tcl_Obj* Tcl_FSJoinPath _ANSI_ARGS_((Tcl_Obj * listObj,
+ int elements));
+/* 461 */
+EXTERN Tcl_Obj* Tcl_FSSplitPath _ANSI_ARGS_((Tcl_Obj* pathPtr,
+ int * lenPtr));
+/* 462 */
+EXTERN int Tcl_FSEqualPaths _ANSI_ARGS_((Tcl_Obj* firstPtr,
+ Tcl_Obj* secondPtr));
+/* 463 */
+EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj* pathObjPtr));
+/* 464 */
+EXTERN Tcl_Obj* Tcl_FSJoinToPath _ANSI_ARGS_((Tcl_Obj * basePtr,
+ int objc, Tcl_Obj *CONST objv[]));
+/* 465 */
+EXTERN ClientData Tcl_FSGetInternalRep _ANSI_ARGS_((
+ Tcl_Obj* pathObjPtr, Tcl_Filesystem * fsPtr));
+/* 466 */
+EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj* pathPtr));
+/* 467 */
+EXTERN int Tcl_FSEvalFile _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * fileName));
+/* 468 */
+EXTERN Tcl_Obj* Tcl_FSNewNativePath _ANSI_ARGS_((
+ Tcl_Filesystem* fromFilesystem,
+ ClientData clientData));
+/* 469 */
+EXTERN CONST char* Tcl_FSGetNativePath _ANSI_ARGS_((Tcl_Obj* pathObjPtr));
+/* 470 */
+EXTERN Tcl_Obj* Tcl_FSFileSystemInfo _ANSI_ARGS_((
+ Tcl_Obj* pathObjPtr));
+/* 471 */
+EXTERN Tcl_Obj* Tcl_FSPathSeparator _ANSI_ARGS_((Tcl_Obj* pathObjPtr));
+/* 472 */
+EXTERN Tcl_Obj* Tcl_FSListVolumes _ANSI_ARGS_((void));
+/* 473 */
+EXTERN int Tcl_FSRegister _ANSI_ARGS_((ClientData clientData,
+ Tcl_Filesystem * fsPtr));
+/* 474 */
+EXTERN int Tcl_FSUnregister _ANSI_ARGS_((Tcl_Filesystem * fsPtr));
+/* 475 */
+EXTERN ClientData Tcl_FSData _ANSI_ARGS_((Tcl_Filesystem * fsPtr));
+/* 476 */
+EXTERN CONST char* Tcl_FSGetTranslatedStringPath _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj* pathPtr));
+/* 477 */
+EXTERN Tcl_Filesystem* Tcl_FSGetFileSystemForPath _ANSI_ARGS_((
+ Tcl_Obj* pathObjPtr));
+/* 478 */
+EXTERN Tcl_PathType Tcl_FSGetPathType _ANSI_ARGS_((Tcl_Obj * pathObjPtr));
+/* 479 */
+EXTERN int Tcl_OutputBuffered _ANSI_ARGS_((Tcl_Channel chan));
+/* 480 */
+EXTERN void Tcl_FSMountsChanged _ANSI_ARGS_((
+ Tcl_Filesystem * fsPtr));
+/* 481 */
+EXTERN int Tcl_EvalTokensStandard _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Token * tokenPtr,
+ int count));
+/* 482 */
+EXTERN void Tcl_GetTime _ANSI_ARGS_((Tcl_Time* timeBuf));
+/* 483 */
+EXTERN Tcl_Trace Tcl_CreateObjTrace _ANSI_ARGS_((Tcl_Interp* interp,
+ int level, int flags,
+ Tcl_CmdObjTraceProc* objProc,
+ ClientData clientData,
+ Tcl_CmdObjTraceDeleteProc* delProc));
+/* 484 */
+EXTERN int Tcl_GetCommandInfoFromToken _ANSI_ARGS_((
+ Tcl_Command token, Tcl_CmdInfo* infoPtr));
+/* 485 */
+EXTERN int Tcl_SetCommandInfoFromToken _ANSI_ARGS_((
+ Tcl_Command token,
+ CONST Tcl_CmdInfo* infoPtr));
+/* 486 */
+EXTERN Tcl_Obj * Tcl_DbNewWideIntObj _ANSI_ARGS_((
+ Tcl_WideInt wideValue, CONST char * file,
+ int line));
+/* 487 */
+EXTERN int Tcl_GetWideIntFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ Tcl_WideInt * widePtr));
+/* 488 */
+EXTERN Tcl_Obj * Tcl_NewWideIntObj _ANSI_ARGS_((Tcl_WideInt wideValue));
+/* 489 */
+EXTERN void Tcl_SetWideIntObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ Tcl_WideInt wideValue));
+/* 490 */
+EXTERN Tcl_StatBuf * Tcl_AllocStatBuf _ANSI_ARGS_((void));
+/* 491 */
+EXTERN Tcl_WideInt Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_WideInt offset, int mode));
+/* 492 */
+EXTERN Tcl_WideInt Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
+/* 493 */
+EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc _ANSI_ARGS_((
+ Tcl_ChannelType * chanTypePtr));
+
+typedef struct TclStubHooks {
+ struct TclPlatStubs *tclPlatStubs;
+ struct TclIntStubs *tclIntStubs;
+ struct TclIntPlatStubs *tclIntPlatStubs;
+} TclStubHooks;
+
+typedef struct TclStubs {
+ int magic;
+ struct TclStubHooks *hooks;
+
+ int (*tcl_PkgProvideEx) _ANSI_ARGS_((Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData)); /* 0 */
+ CONST84_RETURN char * (*tcl_PkgRequireEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr)); /* 1 */
+ void (*tcl_Panic) _ANSI_ARGS_(TCL_VARARGS(CONST char *,format)); /* 2 */
+ char * (*tcl_Alloc) _ANSI_ARGS_((unsigned int size)); /* 3 */
+ void (*tcl_Free) _ANSI_ARGS_((char * ptr)); /* 4 */
+ char * (*tcl_Realloc) _ANSI_ARGS_((char * ptr, unsigned int size)); /* 5 */
+ char * (*tcl_DbCkalloc) _ANSI_ARGS_((unsigned int size, CONST char * file, int line)); /* 6 */
+ int (*tcl_DbCkfree) _ANSI_ARGS_((char * ptr, CONST char * file, int line)); /* 7 */
+ char * (*tcl_DbCkrealloc) _ANSI_ARGS_((char * ptr, unsigned int size, CONST char * file, int line)); /* 8 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void (*tcl_CreateFileHandler) _ANSI_ARGS_((int fd, int mask, Tcl_FileProc * proc, ClientData clientData)); /* 9 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ void *reserved9;
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved9;
+#endif /* MAC_TCL */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void (*tcl_DeleteFileHandler) _ANSI_ARGS_((int fd)); /* 10 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ void *reserved10;
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved10;
+#endif /* MAC_TCL */
+ void (*tcl_SetTimer) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 11 */
+ void (*tcl_Sleep) _ANSI_ARGS_((int ms)); /* 12 */
+ int (*tcl_WaitForEvent) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 13 */
+ int (*tcl_AppendAllObjTypes) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 14 */
+ void (*tcl_AppendStringsToObj) _ANSI_ARGS_(TCL_VARARGS(Tcl_Obj *,objPtr)); /* 15 */
+ void (*tcl_AppendToObj) _ANSI_ARGS_((Tcl_Obj* objPtr, CONST char* bytes, int length)); /* 16 */
+ Tcl_Obj * (*tcl_ConcatObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST objv[])); /* 17 */
+ int (*tcl_ConvertToType) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr)); /* 18 */
+ void (*tcl_DbDecrRefCount) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST char * file, int line)); /* 19 */
+ void (*tcl_DbIncrRefCount) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST char * file, int line)); /* 20 */
+ int (*tcl_DbIsShared) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST char * file, int line)); /* 21 */
+ Tcl_Obj * (*tcl_DbNewBooleanObj) _ANSI_ARGS_((int boolValue, CONST char * file, int line)); /* 22 */
+ Tcl_Obj * (*tcl_DbNewByteArrayObj) _ANSI_ARGS_((CONST unsigned char * bytes, int length, CONST char * file, int line)); /* 23 */
+ Tcl_Obj * (*tcl_DbNewDoubleObj) _ANSI_ARGS_((double doubleValue, CONST char * file, int line)); /* 24 */
+ Tcl_Obj * (*tcl_DbNewListObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST * objv, CONST char * file, int line)); /* 25 */
+ Tcl_Obj * (*tcl_DbNewLongObj) _ANSI_ARGS_((long longValue, CONST char * file, int line)); /* 26 */
+ Tcl_Obj * (*tcl_DbNewObj) _ANSI_ARGS_((CONST char * file, int line)); /* 27 */
+ Tcl_Obj * (*tcl_DbNewStringObj) _ANSI_ARGS_((CONST char * bytes, int length, CONST char * file, int line)); /* 28 */
+ Tcl_Obj * (*tcl_DuplicateObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 29 */
+ void (*tclFreeObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 30 */
+ int (*tcl_GetBoolean) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * boolPtr)); /* 31 */
+ int (*tcl_GetBooleanFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr)); /* 32 */
+ unsigned char * (*tcl_GetByteArrayFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 33 */
+ int (*tcl_GetDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, double * doublePtr)); /* 34 */
+ int (*tcl_GetDoubleFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr)); /* 35 */
+ int (*tcl_GetIndexFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr)); /* 36 */
+ int (*tcl_GetInt) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * intPtr)); /* 37 */
+ int (*tcl_GetIntFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr)); /* 38 */
+ int (*tcl_GetLongFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr)); /* 39 */
+ Tcl_ObjType * (*tcl_GetObjType) _ANSI_ARGS_((CONST char * typeName)); /* 40 */
+ char * (*tcl_GetStringFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 41 */
+ void (*tcl_InvalidateStringRep) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 42 */
+ int (*tcl_ListObjAppendList) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr)); /* 43 */
+ int (*tcl_ListObjAppendElement) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr)); /* 44 */
+ int (*tcl_ListObjGetElements) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr)); /* 45 */
+ int (*tcl_ListObjIndex) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr)); /* 46 */
+ int (*tcl_ListObjLength) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr)); /* 47 */
+ int (*tcl_ListObjReplace) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[])); /* 48 */
+ Tcl_Obj * (*tcl_NewBooleanObj) _ANSI_ARGS_((int boolValue)); /* 49 */
+ Tcl_Obj * (*tcl_NewByteArrayObj) _ANSI_ARGS_((CONST unsigned char* bytes, int length)); /* 50 */
+ Tcl_Obj * (*tcl_NewDoubleObj) _ANSI_ARGS_((double doubleValue)); /* 51 */
+ Tcl_Obj * (*tcl_NewIntObj) _ANSI_ARGS_((int intValue)); /* 52 */
+ Tcl_Obj * (*tcl_NewListObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST objv[])); /* 53 */
+ Tcl_Obj * (*tcl_NewLongObj) _ANSI_ARGS_((long longValue)); /* 54 */
+ Tcl_Obj * (*tcl_NewObj) _ANSI_ARGS_((void)); /* 55 */
+ Tcl_Obj * (*tcl_NewStringObj) _ANSI_ARGS_((CONST char * bytes, int length)); /* 56 */
+ void (*tcl_SetBooleanObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int boolValue)); /* 57 */
+ unsigned char * (*tcl_SetByteArrayLength) _ANSI_ARGS_((Tcl_Obj * objPtr, int length)); /* 58 */
+ void (*tcl_SetByteArrayObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST unsigned char * bytes, int length)); /* 59 */
+ void (*tcl_SetDoubleObj) _ANSI_ARGS_((Tcl_Obj * objPtr, double doubleValue)); /* 60 */
+ void (*tcl_SetIntObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int intValue)); /* 61 */
+ void (*tcl_SetListObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[])); /* 62 */
+ void (*tcl_SetLongObj) _ANSI_ARGS_((Tcl_Obj * objPtr, long longValue)); /* 63 */
+ void (*tcl_SetObjLength) _ANSI_ARGS_((Tcl_Obj * objPtr, int length)); /* 64 */
+ void (*tcl_SetStringObj) _ANSI_ARGS_((Tcl_Obj* objPtr, CONST char* bytes, int length)); /* 65 */
+ void (*tcl_AddErrorInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * message)); /* 66 */
+ void (*tcl_AddObjErrorInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * message, int length)); /* 67 */
+ void (*tcl_AllowExceptions) _ANSI_ARGS_((Tcl_Interp * interp)); /* 68 */
+ void (*tcl_AppendElement) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string)); /* 69 */
+ void (*tcl_AppendResult) _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp)); /* 70 */
+ Tcl_AsyncHandler (*tcl_AsyncCreate) _ANSI_ARGS_((Tcl_AsyncProc * proc, ClientData clientData)); /* 71 */
+ void (*tcl_AsyncDelete) _ANSI_ARGS_((Tcl_AsyncHandler async)); /* 72 */
+ int (*tcl_AsyncInvoke) _ANSI_ARGS_((Tcl_Interp * interp, int code)); /* 73 */
+ void (*tcl_AsyncMark) _ANSI_ARGS_((Tcl_AsyncHandler async)); /* 74 */
+ int (*tcl_AsyncReady) _ANSI_ARGS_((void)); /* 75 */
+ void (*tcl_BackgroundError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 76 */
+ char (*tcl_Backslash) _ANSI_ARGS_((CONST char * src, int * readPtr)); /* 77 */
+ int (*tcl_BadChannelOption) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * optionName, CONST char * optionList)); /* 78 */
+ void (*tcl_CallWhenDeleted) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 79 */
+ void (*tcl_CancelIdleCall) _ANSI_ARGS_((Tcl_IdleProc * idleProc, ClientData clientData)); /* 80 */
+ int (*tcl_Close) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 81 */
+ int (*tcl_CommandComplete) _ANSI_ARGS_((CONST char * cmd)); /* 82 */
+ char * (*tcl_Concat) _ANSI_ARGS_((int argc, CONST84 char * CONST * objv)); /* 83 */
+ int (*tcl_ConvertElement) _ANSI_ARGS_((CONST char * src, char * dst, int flags)); /* 84 */
+ int (*tcl_ConvertCountedElement) _ANSI_ARGS_((CONST char * src, int length, char * dst, int flags)); /* 85 */
+ int (*tcl_CreateAlias) _ANSI_ARGS_((Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * objv)); /* 86 */
+ int (*tcl_CreateAliasObj) _ANSI_ARGS_((Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[])); /* 87 */
+ Tcl_Channel (*tcl_CreateChannel) _ANSI_ARGS_((Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask)); /* 88 */
+ void (*tcl_CreateChannelHandler) _ANSI_ARGS_((Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData)); /* 89 */
+ void (*tcl_CreateCloseHandler) _ANSI_ARGS_((Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData)); /* 90 */
+ Tcl_Command (*tcl_CreateCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 91 */
+ void (*tcl_CreateEventSource) _ANSI_ARGS_((Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData)); /* 92 */
+ void (*tcl_CreateExitHandler) _ANSI_ARGS_((Tcl_ExitProc * proc, ClientData clientData)); /* 93 */
+ Tcl_Interp * (*tcl_CreateInterp) _ANSI_ARGS_((void)); /* 94 */
+ void (*tcl_CreateMathFunc) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData)); /* 95 */
+ Tcl_Command (*tcl_CreateObjCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 96 */
+ Tcl_Interp * (*tcl_CreateSlave) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveName, int isSafe)); /* 97 */
+ Tcl_TimerToken (*tcl_CreateTimerHandler) _ANSI_ARGS_((int milliseconds, Tcl_TimerProc * proc, ClientData clientData)); /* 98 */
+ Tcl_Trace (*tcl_CreateTrace) _ANSI_ARGS_((Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData)); /* 99 */
+ void (*tcl_DeleteAssocData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 100 */
+ void (*tcl_DeleteChannelHandler) _ANSI_ARGS_((Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData)); /* 101 */
+ void (*tcl_DeleteCloseHandler) _ANSI_ARGS_((Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData)); /* 102 */
+ int (*tcl_DeleteCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName)); /* 103 */
+ int (*tcl_DeleteCommandFromToken) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Command command)); /* 104 */
+ void (*tcl_DeleteEvents) _ANSI_ARGS_((Tcl_EventDeleteProc * proc, ClientData clientData)); /* 105 */
+ void (*tcl_DeleteEventSource) _ANSI_ARGS_((Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData)); /* 106 */
+ void (*tcl_DeleteExitHandler) _ANSI_ARGS_((Tcl_ExitProc * proc, ClientData clientData)); /* 107 */
+ void (*tcl_DeleteHashEntry) _ANSI_ARGS_((Tcl_HashEntry * entryPtr)); /* 108 */
+ void (*tcl_DeleteHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 109 */
+ void (*tcl_DeleteInterp) _ANSI_ARGS_((Tcl_Interp * interp)); /* 110 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void (*tcl_DetachPids) _ANSI_ARGS_((int numPids, Tcl_Pid * pidPtr)); /* 111 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tcl_DetachPids) _ANSI_ARGS_((int numPids, Tcl_Pid * pidPtr)); /* 111 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved111;
+#endif /* MAC_TCL */
+ void (*tcl_DeleteTimerHandler) _ANSI_ARGS_((Tcl_TimerToken token)); /* 112 */
+ void (*tcl_DeleteTrace) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Trace trace)); /* 113 */
+ void (*tcl_DontCallWhenDeleted) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 114 */
+ int (*tcl_DoOneEvent) _ANSI_ARGS_((int flags)); /* 115 */
+ void (*tcl_DoWhenIdle) _ANSI_ARGS_((Tcl_IdleProc * proc, ClientData clientData)); /* 116 */
+ char * (*tcl_DStringAppend) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * str, int length)); /* 117 */
+ char * (*tcl_DStringAppendElement) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * string)); /* 118 */
+ void (*tcl_DStringEndSublist) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 119 */
+ void (*tcl_DStringFree) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 120 */
+ void (*tcl_DStringGetResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * dsPtr)); /* 121 */
+ void (*tcl_DStringInit) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 122 */
+ void (*tcl_DStringResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * dsPtr)); /* 123 */
+ void (*tcl_DStringSetLength) _ANSI_ARGS_((Tcl_DString * dsPtr, int length)); /* 124 */
+ void (*tcl_DStringStartSublist) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 125 */
+ int (*tcl_Eof) _ANSI_ARGS_((Tcl_Channel chan)); /* 126 */
+ CONST84_RETURN char * (*tcl_ErrnoId) _ANSI_ARGS_((void)); /* 127 */
+ CONST84_RETURN char * (*tcl_ErrnoMsg) _ANSI_ARGS_((int err)); /* 128 */
+ int (*tcl_Eval) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string)); /* 129 */
+ int (*tcl_EvalFile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * fileName)); /* 130 */
+ int (*tcl_EvalObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 131 */
+ void (*tcl_EventuallyFree) _ANSI_ARGS_((ClientData clientData, Tcl_FreeProc * freeProc)); /* 132 */
+ void (*tcl_Exit) _ANSI_ARGS_((int status)); /* 133 */
+ int (*tcl_ExposeCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName)); /* 134 */
+ int (*tcl_ExprBoolean) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * ptr)); /* 135 */
+ int (*tcl_ExprBooleanObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr)); /* 136 */
+ int (*tcl_ExprDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, double * ptr)); /* 137 */
+ int (*tcl_ExprDoubleObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr)); /* 138 */
+ int (*tcl_ExprLong) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, long * ptr)); /* 139 */
+ int (*tcl_ExprLongObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr)); /* 140 */
+ int (*tcl_ExprObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr)); /* 141 */
+ int (*tcl_ExprString) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string)); /* 142 */
+ void (*tcl_Finalize) _ANSI_ARGS_((void)); /* 143 */
+ void (*tcl_FindExecutable) _ANSI_ARGS_((CONST char * argv0)); /* 144 */
+ Tcl_HashEntry * (*tcl_FirstHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr)); /* 145 */
+ int (*tcl_Flush) _ANSI_ARGS_((Tcl_Channel chan)); /* 146 */
+ void (*tcl_FreeResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 147 */
+ int (*tcl_GetAlias) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr)); /* 148 */
+ int (*tcl_GetAliasObj) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv)); /* 149 */
+ ClientData (*tcl_GetAssocData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr)); /* 150 */
+ Tcl_Channel (*tcl_GetChannel) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * chanName, int * modePtr)); /* 151 */
+ int (*tcl_GetChannelBufferSize) _ANSI_ARGS_((Tcl_Channel chan)); /* 152 */
+ int (*tcl_GetChannelHandle) _ANSI_ARGS_((Tcl_Channel chan, int direction, ClientData * handlePtr)); /* 153 */
+ ClientData (*tcl_GetChannelInstanceData) _ANSI_ARGS_((Tcl_Channel chan)); /* 154 */
+ int (*tcl_GetChannelMode) _ANSI_ARGS_((Tcl_Channel chan)); /* 155 */
+ CONST84_RETURN char * (*tcl_GetChannelName) _ANSI_ARGS_((Tcl_Channel chan)); /* 156 */
+ int (*tcl_GetChannelOption) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr)); /* 157 */
+ Tcl_ChannelType * (*tcl_GetChannelType) _ANSI_ARGS_((Tcl_Channel chan)); /* 158 */
+ int (*tcl_GetCommandInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr)); /* 159 */
+ CONST84_RETURN char * (*tcl_GetCommandName) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Command command)); /* 160 */
+ int (*tcl_GetErrno) _ANSI_ARGS_((void)); /* 161 */
+ CONST84_RETURN char * (*tcl_GetHostName) _ANSI_ARGS_((void)); /* 162 */
+ int (*tcl_GetInterpPath) _ANSI_ARGS_((Tcl_Interp * askInterp, Tcl_Interp * slaveInterp)); /* 163 */
+ Tcl_Interp * (*tcl_GetMaster) _ANSI_ARGS_((Tcl_Interp * interp)); /* 164 */
+ CONST char * (*tcl_GetNameOfExecutable) _ANSI_ARGS_((void)); /* 165 */
+ Tcl_Obj * (*tcl_GetObjResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 166 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ int (*tcl_GetOpenFile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int forWriting, int checkUsage, ClientData * filePtr)); /* 167 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ void *reserved167;
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved167;
+#endif /* MAC_TCL */
+ Tcl_PathType (*tcl_GetPathType) _ANSI_ARGS_((CONST char * path)); /* 168 */
+ int (*tcl_Gets) _ANSI_ARGS_((Tcl_Channel chan, Tcl_DString * dsPtr)); /* 169 */
+ int (*tcl_GetsObj) _ANSI_ARGS_((Tcl_Channel chan, Tcl_Obj * objPtr)); /* 170 */
+ int (*tcl_GetServiceMode) _ANSI_ARGS_((void)); /* 171 */
+ Tcl_Interp * (*tcl_GetSlave) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveName)); /* 172 */
+ Tcl_Channel (*tcl_GetStdChannel) _ANSI_ARGS_((int type)); /* 173 */
+ CONST84_RETURN char * (*tcl_GetStringResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 174 */
+ CONST84_RETURN char * (*tcl_GetVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags)); /* 175 */
+ CONST84_RETURN char * (*tcl_GetVar2) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags)); /* 176 */
+ int (*tcl_GlobalEval) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * command)); /* 177 */
+ int (*tcl_GlobalEvalObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 178 */
+ int (*tcl_HideCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, CONST char * hiddenCmdToken)); /* 179 */
+ int (*tcl_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 180 */
+ void (*tcl_InitHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr, int keyType)); /* 181 */
+ int (*tcl_InputBlocked) _ANSI_ARGS_((Tcl_Channel chan)); /* 182 */
+ int (*tcl_InputBuffered) _ANSI_ARGS_((Tcl_Channel chan)); /* 183 */
+ int (*tcl_InterpDeleted) _ANSI_ARGS_((Tcl_Interp * interp)); /* 184 */
+ int (*tcl_IsSafe) _ANSI_ARGS_((Tcl_Interp * interp)); /* 185 */
+ char * (*tcl_JoinPath) _ANSI_ARGS_((int argc, CONST84 char * CONST * objv, Tcl_DString * resultPtr)); /* 186 */
+ int (*tcl_LinkVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, char * addr, int type)); /* 187 */
+ void *reserved188;
+ Tcl_Channel (*tcl_MakeFileChannel) _ANSI_ARGS_((ClientData handle, int mode)); /* 189 */
+ int (*tcl_MakeSafe) _ANSI_ARGS_((Tcl_Interp * interp)); /* 190 */
+ Tcl_Channel (*tcl_MakeTcpClientChannel) _ANSI_ARGS_((ClientData tcpSocket)); /* 191 */
+ char * (*tcl_Merge) _ANSI_ARGS_((int argc, CONST84 char * CONST * objv)); /* 192 */
+ Tcl_HashEntry * (*tcl_NextHashEntry) _ANSI_ARGS_((Tcl_HashSearch * searchPtr)); /* 193 */
+ void (*tcl_NotifyChannel) _ANSI_ARGS_((Tcl_Channel channel, int mask)); /* 194 */
+ Tcl_Obj * (*tcl_ObjGetVar2) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags)); /* 195 */
+ Tcl_Obj * (*tcl_ObjSetVar2) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags)); /* 196 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ Tcl_Channel (*tcl_OpenCommandChannel) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 Tcl_Obj *CONST *objv, int flags)); /* 197 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ Tcl_Channel (*tcl_OpenCommandChannel) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 Tcl_Obj *CONST *objv, int flags)); /* 197 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved197;
+#endif /* MAC_TCL */
+ Tcl_Channel (*tcl_OpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions)); /* 198 */
+ Tcl_Channel (*tcl_OpenTcpClient) _ANSI_ARGS_((Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async)); /* 199 */
+ Tcl_Channel (*tcl_OpenTcpServer) _ANSI_ARGS_((Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData)); /* 200 */
+ void (*tcl_Preserve) _ANSI_ARGS_((ClientData data)); /* 201 */
+ void (*tcl_PrintDouble) _ANSI_ARGS_((Tcl_Interp * interp, double value, char * dst)); /* 202 */
+ int (*tcl_PutEnv) _ANSI_ARGS_((CONST char * string)); /* 203 */
+ CONST84_RETURN char * (*tcl_PosixError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 204 */
+ void (*tcl_QueueEvent) _ANSI_ARGS_((Tcl_Event * evPtr, Tcl_QueuePosition position)); /* 205 */
+ int (*tcl_Read) _ANSI_ARGS_((Tcl_Channel chan, char * bufPtr, int toRead)); /* 206 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void (*tcl_ReapDetachedProcs) _ANSI_ARGS_((void)); /* 207 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tcl_ReapDetachedProcs) _ANSI_ARGS_((void)); /* 207 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved207;
+#endif /* MAC_TCL */
+ int (*tcl_RecordAndEval) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmd, int flags)); /* 208 */
+ int (*tcl_RecordAndEvalObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags)); /* 209 */
+ void (*tcl_RegisterChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 210 */
+ void (*tcl_RegisterObjType) _ANSI_ARGS_((Tcl_ObjType * typePtr)); /* 211 */
+ Tcl_RegExp (*tcl_RegExpCompile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string)); /* 212 */
+ int (*tcl_RegExpExec) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * str, CONST char * start)); /* 213 */
+ int (*tcl_RegExpMatch) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, CONST char * pattern)); /* 214 */
+ void (*tcl_RegExpRange) _ANSI_ARGS_((Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr)); /* 215 */
+ void (*tcl_Release) _ANSI_ARGS_((ClientData clientData)); /* 216 */
+ void (*tcl_ResetResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 217 */
+ int (*tcl_ScanElement) _ANSI_ARGS_((CONST char * str, int * flagPtr)); /* 218 */
+ int (*tcl_ScanCountedElement) _ANSI_ARGS_((CONST char * str, int length, int * flagPtr)); /* 219 */
+ int (*tcl_SeekOld) _ANSI_ARGS_((Tcl_Channel chan, int offset, int mode)); /* 220 */
+ int (*tcl_ServiceAll) _ANSI_ARGS_((void)); /* 221 */
+ int (*tcl_ServiceEvent) _ANSI_ARGS_((int flags)); /* 222 */
+ void (*tcl_SetAssocData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 223 */
+ void (*tcl_SetChannelBufferSize) _ANSI_ARGS_((Tcl_Channel chan, int sz)); /* 224 */
+ int (*tcl_SetChannelOption) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, CONST char * newValue)); /* 225 */
+ int (*tcl_SetCommandInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr)); /* 226 */
+ void (*tcl_SetErrno) _ANSI_ARGS_((int err)); /* 227 */
+ void (*tcl_SetErrorCode) _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp)); /* 228 */
+ void (*tcl_SetMaxBlockTime) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 229 */
+ void (*tcl_SetPanicProc) _ANSI_ARGS_((Tcl_PanicProc * panicProc)); /* 230 */
+ int (*tcl_SetRecursionLimit) _ANSI_ARGS_((Tcl_Interp * interp, int depth)); /* 231 */
+ void (*tcl_SetResult) _ANSI_ARGS_((Tcl_Interp * interp, char * str, Tcl_FreeProc * freeProc)); /* 232 */
+ int (*tcl_SetServiceMode) _ANSI_ARGS_((int mode)); /* 233 */
+ void (*tcl_SetObjErrorCode) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * errorObjPtr)); /* 234 */
+ void (*tcl_SetObjResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * resultObjPtr)); /* 235 */
+ void (*tcl_SetStdChannel) _ANSI_ARGS_((Tcl_Channel channel, int type)); /* 236 */
+ CONST84_RETURN char * (*tcl_SetVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, CONST char * newValue, int flags)); /* 237 */
+ CONST84_RETURN char * (*tcl_SetVar2) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * newValue, int flags)); /* 238 */
+ CONST84_RETURN char * (*tcl_SignalId) _ANSI_ARGS_((int sig)); /* 239 */
+ CONST84_RETURN char * (*tcl_SignalMsg) _ANSI_ARGS_((int sig)); /* 240 */
+ void (*tcl_SourceRCFile) _ANSI_ARGS_((Tcl_Interp * interp)); /* 241 */
+ int (*tcl_SplitList) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * listStr, int * argcPtr, CONST84 char *** argvPtr)); /* 242 */
+ void (*tcl_SplitPath) _ANSI_ARGS_((CONST char * path, int * argcPtr, CONST84 char *** argvPtr)); /* 243 */
+ void (*tcl_StaticPackage) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc)); /* 244 */
+ int (*tcl_StringMatch) _ANSI_ARGS_((CONST char * str, CONST char * pattern)); /* 245 */
+ int (*tcl_TellOld) _ANSI_ARGS_((Tcl_Channel chan)); /* 246 */
+ int (*tcl_TraceVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 247 */
+ int (*tcl_TraceVar2) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 248 */
+ char * (*tcl_TranslateFileName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr)); /* 249 */
+ int (*tcl_Ungets) _ANSI_ARGS_((Tcl_Channel chan, CONST char * str, int len, int atHead)); /* 250 */
+ void (*tcl_UnlinkVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName)); /* 251 */
+ int (*tcl_UnregisterChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 252 */
+ int (*tcl_UnsetVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags)); /* 253 */
+ int (*tcl_UnsetVar2) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags)); /* 254 */
+ void (*tcl_UntraceVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 255 */
+ void (*tcl_UntraceVar2) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 256 */
+ void (*tcl_UpdateLinkedVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName)); /* 257 */
+ int (*tcl_UpVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * frameName, CONST char * varName, CONST char * localName, int flags)); /* 258 */
+ int (*tcl_UpVar2) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * frameName, CONST char * part1, CONST char * part2, CONST char * localName, int flags)); /* 259 */
+ int (*tcl_VarEval) _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp)); /* 260 */
+ ClientData (*tcl_VarTraceInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData)); /* 261 */
+ ClientData (*tcl_VarTraceInfo2) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData)); /* 262 */
+ int (*tcl_Write) _ANSI_ARGS_((Tcl_Channel chan, CONST char * s, int slen)); /* 263 */
+ void (*tcl_WrongNumArgs) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message)); /* 264 */
+ int (*tcl_DumpActiveMemory) _ANSI_ARGS_((CONST char * fileName)); /* 265 */
+ void (*tcl_ValidateAllMemory) _ANSI_ARGS_((CONST char * file, int line)); /* 266 */
+ void (*tcl_AppendResultVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 267 */
+ void (*tcl_AppendStringsToObjVA) _ANSI_ARGS_((Tcl_Obj * objPtr, va_list argList)); /* 268 */
+ CONST84_RETURN char * (*tcl_HashStats) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 269 */
+ CONST84_RETURN char * (*tcl_ParseVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, CONST84 char ** termPtr)); /* 270 */
+ CONST84_RETURN char * (*tcl_PkgPresent) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact)); /* 271 */
+ CONST84_RETURN char * (*tcl_PkgPresentEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr)); /* 272 */
+ int (*tcl_PkgProvide) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version)); /* 273 */
+ CONST84_RETURN char * (*tcl_PkgRequire) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact)); /* 274 */
+ void (*tcl_SetErrorCodeVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 275 */
+ int (*tcl_VarEvalVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 276 */
+ Tcl_Pid (*tcl_WaitPid) _ANSI_ARGS_((Tcl_Pid pid, int * statPtr, int options)); /* 277 */
+ void (*tcl_PanicVA) _ANSI_ARGS_((CONST char * format, va_list argList)); /* 278 */
+ void (*tcl_GetVersion) _ANSI_ARGS_((int * major, int * minor, int * patchLevel, int * type)); /* 279 */
+ void (*tcl_InitMemory) _ANSI_ARGS_((Tcl_Interp * interp)); /* 280 */
+ Tcl_Channel (*tcl_StackChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan)); /* 281 */
+ int (*tcl_UnstackChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 282 */
+ Tcl_Channel (*tcl_GetStackedChannel) _ANSI_ARGS_((Tcl_Channel chan)); /* 283 */
+ void (*tcl_SetMainLoop) _ANSI_ARGS_((Tcl_MainLoopProc * proc)); /* 284 */
+ void *reserved285;
+ void (*tcl_AppendObjToObj) _ANSI_ARGS_((Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr)); /* 286 */
+ Tcl_Encoding (*tcl_CreateEncoding) _ANSI_ARGS_((Tcl_EncodingType * typePtr)); /* 287 */
+ void (*tcl_CreateThreadExitHandler) _ANSI_ARGS_((Tcl_ExitProc * proc, ClientData clientData)); /* 288 */
+ void (*tcl_DeleteThreadExitHandler) _ANSI_ARGS_((Tcl_ExitProc * proc, ClientData clientData)); /* 289 */
+ void (*tcl_DiscardResult) _ANSI_ARGS_((Tcl_SavedResult * statePtr)); /* 290 */
+ int (*tcl_EvalEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * script, int numBytes, int flags)); /* 291 */
+ int (*tcl_EvalObjv) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags)); /* 292 */
+ int (*tcl_EvalObjEx) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int flags)); /* 293 */
+ void (*tcl_ExitThread) _ANSI_ARGS_((int status)); /* 294 */
+ int (*tcl_ExternalToUtf) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr)); /* 295 */
+ char * (*tcl_ExternalToUtfDString) _ANSI_ARGS_((Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr)); /* 296 */
+ void (*tcl_FinalizeThread) _ANSI_ARGS_((void)); /* 297 */
+ void (*tcl_FinalizeNotifier) _ANSI_ARGS_((ClientData clientData)); /* 298 */
+ void (*tcl_FreeEncoding) _ANSI_ARGS_((Tcl_Encoding encoding)); /* 299 */
+ Tcl_ThreadId (*tcl_GetCurrentThread) _ANSI_ARGS_((void)); /* 300 */
+ Tcl_Encoding (*tcl_GetEncoding) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 301 */
+ CONST84_RETURN char * (*tcl_GetEncodingName) _ANSI_ARGS_((Tcl_Encoding encoding)); /* 302 */
+ void (*tcl_GetEncodingNames) _ANSI_ARGS_((Tcl_Interp * interp)); /* 303 */
+ int (*tcl_GetIndexFromObjStruct) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr)); /* 304 */
+ VOID * (*tcl_GetThreadData) _ANSI_ARGS_((Tcl_ThreadDataKey * keyPtr, int size)); /* 305 */
+ Tcl_Obj * (*tcl_GetVar2Ex) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags)); /* 306 */
+ ClientData (*tcl_InitNotifier) _ANSI_ARGS_((void)); /* 307 */
+ void (*tcl_MutexLock) _ANSI_ARGS_((Tcl_Mutex * mutexPtr)); /* 308 */
+ void (*tcl_MutexUnlock) _ANSI_ARGS_((Tcl_Mutex * mutexPtr)); /* 309 */
+ void (*tcl_ConditionNotify) _ANSI_ARGS_((Tcl_Condition * condPtr)); /* 310 */
+ void (*tcl_ConditionWait) _ANSI_ARGS_((Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr)); /* 311 */
+ int (*tcl_NumUtfChars) _ANSI_ARGS_((CONST char * src, int len)); /* 312 */
+ int (*tcl_ReadChars) _ANSI_ARGS_((Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag)); /* 313 */
+ void (*tcl_RestoreResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_SavedResult * statePtr)); /* 314 */
+ void (*tcl_SaveResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_SavedResult * statePtr)); /* 315 */
+ int (*tcl_SetSystemEncoding) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 316 */
+ Tcl_Obj * (*tcl_SetVar2Ex) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, Tcl_Obj * newValuePtr, int flags)); /* 317 */
+ void (*tcl_ThreadAlert) _ANSI_ARGS_((Tcl_ThreadId threadId)); /* 318 */
+ void (*tcl_ThreadQueueEvent) _ANSI_ARGS_((Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position)); /* 319 */
+ Tcl_UniChar (*tcl_UniCharAtIndex) _ANSI_ARGS_((CONST char * src, int index)); /* 320 */
+ Tcl_UniChar (*tcl_UniCharToLower) _ANSI_ARGS_((int ch)); /* 321 */
+ Tcl_UniChar (*tcl_UniCharToTitle) _ANSI_ARGS_((int ch)); /* 322 */
+ Tcl_UniChar (*tcl_UniCharToUpper) _ANSI_ARGS_((int ch)); /* 323 */
+ int (*tcl_UniCharToUtf) _ANSI_ARGS_((int ch, char * buf)); /* 324 */
+ CONST84_RETURN char * (*tcl_UtfAtIndex) _ANSI_ARGS_((CONST char * src, int index)); /* 325 */
+ int (*tcl_UtfCharComplete) _ANSI_ARGS_((CONST char * src, int len)); /* 326 */
+ int (*tcl_UtfBackslash) _ANSI_ARGS_((CONST char * src, int * readPtr, char * dst)); /* 327 */
+ CONST84_RETURN char * (*tcl_UtfFindFirst) _ANSI_ARGS_((CONST char * src, int ch)); /* 328 */
+ CONST84_RETURN char * (*tcl_UtfFindLast) _ANSI_ARGS_((CONST char * src, int ch)); /* 329 */
+ CONST84_RETURN char * (*tcl_UtfNext) _ANSI_ARGS_((CONST char * src)); /* 330 */
+ CONST84_RETURN char * (*tcl_UtfPrev) _ANSI_ARGS_((CONST char * src, CONST char * start)); /* 331 */
+ int (*tcl_UtfToExternal) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr)); /* 332 */
+ char * (*tcl_UtfToExternalDString) _ANSI_ARGS_((Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr)); /* 333 */
+ int (*tcl_UtfToLower) _ANSI_ARGS_((char * src)); /* 334 */
+ int (*tcl_UtfToTitle) _ANSI_ARGS_((char * src)); /* 335 */
+ int (*tcl_UtfToUniChar) _ANSI_ARGS_((CONST char * src, Tcl_UniChar * chPtr)); /* 336 */
+ int (*tcl_UtfToUpper) _ANSI_ARGS_((char * src)); /* 337 */
+ int (*tcl_WriteChars) _ANSI_ARGS_((Tcl_Channel chan, CONST char * src, int srcLen)); /* 338 */
+ int (*tcl_WriteObj) _ANSI_ARGS_((Tcl_Channel chan, Tcl_Obj * objPtr)); /* 339 */
+ char * (*tcl_GetString) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 340 */
+ CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) _ANSI_ARGS_((void)); /* 341 */
+ void (*tcl_SetDefaultEncodingDir) _ANSI_ARGS_((CONST char * path)); /* 342 */
+ void (*tcl_AlertNotifier) _ANSI_ARGS_((ClientData clientData)); /* 343 */
+ void (*tcl_ServiceModeHook) _ANSI_ARGS_((int mode)); /* 344 */
+ int (*tcl_UniCharIsAlnum) _ANSI_ARGS_((int ch)); /* 345 */
+ int (*tcl_UniCharIsAlpha) _ANSI_ARGS_((int ch)); /* 346 */
+ int (*tcl_UniCharIsDigit) _ANSI_ARGS_((int ch)); /* 347 */
+ int (*tcl_UniCharIsLower) _ANSI_ARGS_((int ch)); /* 348 */
+ int (*tcl_UniCharIsSpace) _ANSI_ARGS_((int ch)); /* 349 */
+ int (*tcl_UniCharIsUpper) _ANSI_ARGS_((int ch)); /* 350 */
+ int (*tcl_UniCharIsWordChar) _ANSI_ARGS_((int ch)); /* 351 */
+ int (*tcl_UniCharLen) _ANSI_ARGS_((CONST Tcl_UniChar * str)); /* 352 */
+ int (*tcl_UniCharNcmp) _ANSI_ARGS_((CONST Tcl_UniChar * cs, CONST Tcl_UniChar * ct, unsigned long n)); /* 353 */
+ char * (*tcl_UniCharToUtfDString) _ANSI_ARGS_((CONST Tcl_UniChar * string, int numChars, Tcl_DString * dsPtr)); /* 354 */
+ Tcl_UniChar * (*tcl_UtfToUniCharDString) _ANSI_ARGS_((CONST char * string, int length, Tcl_DString * dsPtr)); /* 355 */
+ Tcl_RegExp (*tcl_GetRegExpFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * patObj, int flags)); /* 356 */
+ Tcl_Obj * (*tcl_EvalTokens) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Token * tokenPtr, int count)); /* 357 */
+ void (*tcl_FreeParse) _ANSI_ARGS_((Tcl_Parse * parsePtr)); /* 358 */
+ void (*tcl_LogCommandInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * script, CONST char * command, int length)); /* 359 */
+ int (*tcl_ParseBraces) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr)); /* 360 */
+ int (*tcl_ParseCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, int nested, Tcl_Parse * parsePtr)); /* 361 */
+ int (*tcl_ParseExpr) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr)); /* 362 */
+ int (*tcl_ParseQuotedString) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr)); /* 363 */
+ int (*tcl_ParseVarName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr, int append)); /* 364 */
+ char * (*tcl_GetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 365 */
+ int (*tcl_Chdir) _ANSI_ARGS_((CONST char * dirName)); /* 366 */
+ int (*tcl_Access) _ANSI_ARGS_((CONST char * path, int mode)); /* 367 */
+ int (*tcl_Stat) _ANSI_ARGS_((CONST char * path, struct stat * bufPtr)); /* 368 */
+ int (*tcl_UtfNcmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, unsigned long n)); /* 369 */
+ int (*tcl_UtfNcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, unsigned long n)); /* 370 */
+ int (*tcl_StringCaseMatch) _ANSI_ARGS_((CONST char * str, CONST char * pattern, int nocase)); /* 371 */
+ int (*tcl_UniCharIsControl) _ANSI_ARGS_((int ch)); /* 372 */
+ int (*tcl_UniCharIsGraph) _ANSI_ARGS_((int ch)); /* 373 */
+ int (*tcl_UniCharIsPrint) _ANSI_ARGS_((int ch)); /* 374 */
+ int (*tcl_UniCharIsPunct) _ANSI_ARGS_((int ch)); /* 375 */
+ int (*tcl_RegExpExecObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * objPtr, int offset, int nmatches, int flags)); /* 376 */
+ void (*tcl_RegExpGetInfo) _ANSI_ARGS_((Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr)); /* 377 */
+ Tcl_Obj * (*tcl_NewUnicodeObj) _ANSI_ARGS_((CONST Tcl_UniChar * unicode, int numChars)); /* 378 */
+ void (*tcl_SetUnicodeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars)); /* 379 */
+ int (*tcl_GetCharLength) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 380 */
+ Tcl_UniChar (*tcl_GetUniChar) _ANSI_ARGS_((Tcl_Obj * objPtr, int index)); /* 381 */
+ Tcl_UniChar * (*tcl_GetUnicode) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 382 */
+ Tcl_Obj * (*tcl_GetRange) _ANSI_ARGS_((Tcl_Obj * objPtr, int first, int last)); /* 383 */
+ void (*tcl_AppendUnicodeToObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length)); /* 384 */
+ int (*tcl_RegExpMatchObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * stringObj, Tcl_Obj * patternObj)); /* 385 */
+ void (*tcl_SetNotifier) _ANSI_ARGS_((Tcl_NotifierProcs * notifierProcPtr)); /* 386 */
+ Tcl_Mutex * (*tcl_GetAllocMutex) _ANSI_ARGS_((void)); /* 387 */
+ int (*tcl_GetChannelNames) _ANSI_ARGS_((Tcl_Interp * interp)); /* 388 */
+ int (*tcl_GetChannelNamesEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * pattern)); /* 389 */
+ int (*tcl_ProcObjCmd) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 390 */
+ void (*tcl_ConditionFinalize) _ANSI_ARGS_((Tcl_Condition * condPtr)); /* 391 */
+ void (*tcl_MutexFinalize) _ANSI_ARGS_((Tcl_Mutex * mutex)); /* 392 */
+ int (*tcl_CreateThread) _ANSI_ARGS_((Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags)); /* 393 */
+ int (*tcl_ReadRaw) _ANSI_ARGS_((Tcl_Channel chan, char * dst, int bytesToRead)); /* 394 */
+ int (*tcl_WriteRaw) _ANSI_ARGS_((Tcl_Channel chan, CONST char * src, int srcLen)); /* 395 */
+ Tcl_Channel (*tcl_GetTopChannel) _ANSI_ARGS_((Tcl_Channel chan)); /* 396 */
+ int (*tcl_ChannelBuffered) _ANSI_ARGS_((Tcl_Channel chan)); /* 397 */
+ CONST84_RETURN char * (*tcl_ChannelName) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 398 */
+ Tcl_ChannelTypeVersion (*tcl_ChannelVersion) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 399 */
+ Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 400 */
+ Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 401 */
+ Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 402 */
+ Tcl_DriverInputProc * (*tcl_ChannelInputProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 403 */
+ Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 404 */
+ Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 405 */
+ Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 406 */
+ Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 407 */
+ Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 408 */
+ Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 409 */
+ Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 410 */
+ Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 411 */
+ int (*tcl_JoinThread) _ANSI_ARGS_((Tcl_ThreadId threadId, int* result)); /* 412 */
+ int (*tcl_IsChannelShared) _ANSI_ARGS_((Tcl_Channel channel)); /* 413 */
+ int (*tcl_IsChannelRegistered) _ANSI_ARGS_((Tcl_Interp* interp, Tcl_Channel channel)); /* 414 */
+ void (*tcl_CutChannel) _ANSI_ARGS_((Tcl_Channel channel)); /* 415 */
+ void (*tcl_SpliceChannel) _ANSI_ARGS_((Tcl_Channel channel)); /* 416 */
+ void (*tcl_ClearChannelHandlers) _ANSI_ARGS_((Tcl_Channel channel)); /* 417 */
+ int (*tcl_IsChannelExisting) _ANSI_ARGS_((CONST char* channelName)); /* 418 */
+ int (*tcl_UniCharNcasecmp) _ANSI_ARGS_((CONST Tcl_UniChar * cs, CONST Tcl_UniChar * ct, unsigned long n)); /* 419 */
+ int (*tcl_UniCharCaseMatch) _ANSI_ARGS_((CONST Tcl_UniChar * ustr, CONST Tcl_UniChar * pattern, int nocase)); /* 420 */
+ Tcl_HashEntry * (*tcl_FindHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, CONST char * key)); /* 421 */
+ Tcl_HashEntry * (*tcl_CreateHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, CONST char * key, int * newPtr)); /* 422 */
+ void (*tcl_InitCustomHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr)); /* 423 */
+ void (*tcl_InitObjHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 424 */
+ ClientData (*tcl_CommandTraceInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData)); /* 425 */
+ int (*tcl_TraceCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData)); /* 426 */
+ void (*tcl_UntraceCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData)); /* 427 */
+ char * (*tcl_AttemptAlloc) _ANSI_ARGS_((unsigned int size)); /* 428 */
+ char * (*tcl_AttemptDbCkalloc) _ANSI_ARGS_((unsigned int size, CONST char * file, int line)); /* 429 */
+ char * (*tcl_AttemptRealloc) _ANSI_ARGS_((char * ptr, unsigned int size)); /* 430 */
+ char * (*tcl_AttemptDbCkrealloc) _ANSI_ARGS_((char * ptr, unsigned int size, CONST char * file, int line)); /* 431 */
+ int (*tcl_AttemptSetObjLength) _ANSI_ARGS_((Tcl_Obj * objPtr, int length)); /* 432 */
+ Tcl_ThreadId (*tcl_GetChannelThread) _ANSI_ARGS_((Tcl_Channel channel)); /* 433 */
+ Tcl_UniChar * (*tcl_GetUnicodeFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 434 */
+ int (*tcl_GetMathFuncInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr)); /* 435 */
+ Tcl_Obj * (*tcl_ListMathFuncs) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * pattern)); /* 436 */
+ Tcl_Obj * (*tcl_SubstObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int flags)); /* 437 */
+ int (*tcl_DetachChannel) _ANSI_ARGS_((Tcl_Interp* interp, Tcl_Channel channel)); /* 438 */
+ int (*tcl_IsStandardChannel) _ANSI_ARGS_((Tcl_Channel channel)); /* 439 */
+ int (*tcl_FSCopyFile) _ANSI_ARGS_((Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr)); /* 440 */
+ int (*tcl_FSCopyDirectory) _ANSI_ARGS_((Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr)); /* 441 */
+ int (*tcl_FSCreateDirectory) _ANSI_ARGS_((Tcl_Obj * pathPtr)); /* 442 */
+ int (*tcl_FSDeleteFile) _ANSI_ARGS_((Tcl_Obj * pathPtr)); /* 443 */
+ int (*tcl_FSLoadFile) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * sym1, CONST char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr)); /* 444 */
+ int (*tcl_FSMatchInDirectory) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, CONST char * pattern, Tcl_GlobTypeData * types)); /* 445 */
+ Tcl_Obj * (*tcl_FSLink) _ANSI_ARGS_((Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction)); /* 446 */
+ int (*tcl_FSRemoveDirectory) _ANSI_ARGS_((Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr)); /* 447 */
+ int (*tcl_FSRenameFile) _ANSI_ARGS_((Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr)); /* 448 */
+ int (*tcl_FSLstat) _ANSI_ARGS_((Tcl_Obj * pathPtr, Tcl_StatBuf * buf)); /* 449 */
+ int (*tcl_FSUtime) _ANSI_ARGS_((Tcl_Obj * pathPtr, struct utimbuf * tval)); /* 450 */
+ int (*tcl_FSFileAttrsGet) _ANSI_ARGS_((Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef)); /* 451 */
+ int (*tcl_FSFileAttrsSet) _ANSI_ARGS_((Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr)); /* 452 */
+ CONST char ** (*tcl_FSFileAttrStrings) _ANSI_ARGS_((Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef)); /* 453 */
+ int (*tcl_FSStat) _ANSI_ARGS_((Tcl_Obj * pathPtr, Tcl_StatBuf * buf)); /* 454 */
+ int (*tcl_FSAccess) _ANSI_ARGS_((Tcl_Obj * pathPtr, int mode)); /* 455 */
+ Tcl_Channel (*tcl_FSOpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions)); /* 456 */
+ Tcl_Obj* (*tcl_FSGetCwd) _ANSI_ARGS_((Tcl_Interp * interp)); /* 457 */
+ int (*tcl_FSChdir) _ANSI_ARGS_((Tcl_Obj * pathPtr)); /* 458 */
+ int (*tcl_FSConvertToPathType) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr)); /* 459 */
+ Tcl_Obj* (*tcl_FSJoinPath) _ANSI_ARGS_((Tcl_Obj * listObj, int elements)); /* 460 */
+ Tcl_Obj* (*tcl_FSSplitPath) _ANSI_ARGS_((Tcl_Obj* pathPtr, int * lenPtr)); /* 461 */
+ int (*tcl_FSEqualPaths) _ANSI_ARGS_((Tcl_Obj* firstPtr, Tcl_Obj* secondPtr)); /* 462 */
+ Tcl_Obj* (*tcl_FSGetNormalizedPath) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj* pathObjPtr)); /* 463 */
+ Tcl_Obj* (*tcl_FSJoinToPath) _ANSI_ARGS_((Tcl_Obj * basePtr, int objc, Tcl_Obj *CONST objv[])); /* 464 */
+ ClientData (*tcl_FSGetInternalRep) _ANSI_ARGS_((Tcl_Obj* pathObjPtr, Tcl_Filesystem * fsPtr)); /* 465 */
+ Tcl_Obj* (*tcl_FSGetTranslatedPath) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj* pathPtr)); /* 466 */
+ int (*tcl_FSEvalFile) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * fileName)); /* 467 */
+ Tcl_Obj* (*tcl_FSNewNativePath) _ANSI_ARGS_((Tcl_Filesystem* fromFilesystem, ClientData clientData)); /* 468 */
+ CONST char* (*tcl_FSGetNativePath) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 469 */
+ Tcl_Obj* (*tcl_FSFileSystemInfo) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 470 */
+ Tcl_Obj* (*tcl_FSPathSeparator) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 471 */
+ Tcl_Obj* (*tcl_FSListVolumes) _ANSI_ARGS_((void)); /* 472 */
+ int (*tcl_FSRegister) _ANSI_ARGS_((ClientData clientData, Tcl_Filesystem * fsPtr)); /* 473 */
+ int (*tcl_FSUnregister) _ANSI_ARGS_((Tcl_Filesystem * fsPtr)); /* 474 */
+ ClientData (*tcl_FSData) _ANSI_ARGS_((Tcl_Filesystem * fsPtr)); /* 475 */
+ CONST char* (*tcl_FSGetTranslatedStringPath) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj* pathPtr)); /* 476 */
+ Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 477 */
+ Tcl_PathType (*tcl_FSGetPathType) _ANSI_ARGS_((Tcl_Obj * pathObjPtr)); /* 478 */
+ int (*tcl_OutputBuffered) _ANSI_ARGS_((Tcl_Channel chan)); /* 479 */
+ void (*tcl_FSMountsChanged) _ANSI_ARGS_((Tcl_Filesystem * fsPtr)); /* 480 */
+ int (*tcl_EvalTokensStandard) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Token * tokenPtr, int count)); /* 481 */
+ void (*tcl_GetTime) _ANSI_ARGS_((Tcl_Time* timeBuf)); /* 482 */
+ Tcl_Trace (*tcl_CreateObjTrace) _ANSI_ARGS_((Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc)); /* 483 */
+ int (*tcl_GetCommandInfoFromToken) _ANSI_ARGS_((Tcl_Command token, Tcl_CmdInfo* infoPtr)); /* 484 */
+ int (*tcl_SetCommandInfoFromToken) _ANSI_ARGS_((Tcl_Command token, CONST Tcl_CmdInfo* infoPtr)); /* 485 */
+ Tcl_Obj * (*tcl_DbNewWideIntObj) _ANSI_ARGS_((Tcl_WideInt wideValue, CONST char * file, int line)); /* 486 */
+ int (*tcl_GetWideIntFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr)); /* 487 */
+ Tcl_Obj * (*tcl_NewWideIntObj) _ANSI_ARGS_((Tcl_WideInt wideValue)); /* 488 */
+ void (*tcl_SetWideIntObj) _ANSI_ARGS_((Tcl_Obj * objPtr, Tcl_WideInt wideValue)); /* 489 */
+ Tcl_StatBuf * (*tcl_AllocStatBuf) _ANSI_ARGS_((void)); /* 490 */
+ Tcl_WideInt (*tcl_Seek) _ANSI_ARGS_((Tcl_Channel chan, Tcl_WideInt offset, int mode)); /* 491 */
+ Tcl_WideInt (*tcl_Tell) _ANSI_ARGS_((Tcl_Channel chan)); /* 492 */
+ Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) _ANSI_ARGS_((Tcl_ChannelType * chanTypePtr)); /* 493 */
+} TclStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TclStubs *tclStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifndef Tcl_PkgProvideEx
+#define Tcl_PkgProvideEx \
+ (tclStubsPtr->tcl_PkgProvideEx) /* 0 */
+#endif
+#ifndef Tcl_PkgRequireEx
+#define Tcl_PkgRequireEx \
+ (tclStubsPtr->tcl_PkgRequireEx) /* 1 */
+#endif
+#ifndef Tcl_Panic
+#define Tcl_Panic \
+ (tclStubsPtr->tcl_Panic) /* 2 */
+#endif
+#ifndef Tcl_Alloc
+#define Tcl_Alloc \
+ (tclStubsPtr->tcl_Alloc) /* 3 */
+#endif
+#ifndef Tcl_Free
+#define Tcl_Free \
+ (tclStubsPtr->tcl_Free) /* 4 */
+#endif
+#ifndef Tcl_Realloc
+#define Tcl_Realloc \
+ (tclStubsPtr->tcl_Realloc) /* 5 */
+#endif
+#ifndef Tcl_DbCkalloc
+#define Tcl_DbCkalloc \
+ (tclStubsPtr->tcl_DbCkalloc) /* 6 */
+#endif
+#ifndef Tcl_DbCkfree
+#define Tcl_DbCkfree \
+ (tclStubsPtr->tcl_DbCkfree) /* 7 */
+#endif
+#ifndef Tcl_DbCkrealloc
+#define Tcl_DbCkrealloc \
+ (tclStubsPtr->tcl_DbCkrealloc) /* 8 */
+#endif
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef Tcl_CreateFileHandler
+#define Tcl_CreateFileHandler \
+ (tclStubsPtr->tcl_CreateFileHandler) /* 9 */
+#endif
+#endif /* UNIX */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef Tcl_DeleteFileHandler
+#define Tcl_DeleteFileHandler \
+ (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */
+#endif
+#endif /* UNIX */
+#ifndef Tcl_SetTimer
+#define Tcl_SetTimer \
+ (tclStubsPtr->tcl_SetTimer) /* 11 */
+#endif
+#ifndef Tcl_Sleep
+#define Tcl_Sleep \
+ (tclStubsPtr->tcl_Sleep) /* 12 */
+#endif
+#ifndef Tcl_WaitForEvent
+#define Tcl_WaitForEvent \
+ (tclStubsPtr->tcl_WaitForEvent) /* 13 */
+#endif
+#ifndef Tcl_AppendAllObjTypes
+#define Tcl_AppendAllObjTypes \
+ (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */
+#endif
+#ifndef Tcl_AppendStringsToObj
+#define Tcl_AppendStringsToObj \
+ (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */
+#endif
+#ifndef Tcl_AppendToObj
+#define Tcl_AppendToObj \
+ (tclStubsPtr->tcl_AppendToObj) /* 16 */
+#endif
+#ifndef Tcl_ConcatObj
+#define Tcl_ConcatObj \
+ (tclStubsPtr->tcl_ConcatObj) /* 17 */
+#endif
+#ifndef Tcl_ConvertToType
+#define Tcl_ConvertToType \
+ (tclStubsPtr->tcl_ConvertToType) /* 18 */
+#endif
+#ifndef Tcl_DbDecrRefCount
+#define Tcl_DbDecrRefCount \
+ (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */
+#endif
+#ifndef Tcl_DbIncrRefCount
+#define Tcl_DbIncrRefCount \
+ (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */
+#endif
+#ifndef Tcl_DbIsShared
+#define Tcl_DbIsShared \
+ (tclStubsPtr->tcl_DbIsShared) /* 21 */
+#endif
+#ifndef Tcl_DbNewBooleanObj
+#define Tcl_DbNewBooleanObj \
+ (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */
+#endif
+#ifndef Tcl_DbNewByteArrayObj
+#define Tcl_DbNewByteArrayObj \
+ (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */
+#endif
+#ifndef Tcl_DbNewDoubleObj
+#define Tcl_DbNewDoubleObj \
+ (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */
+#endif
+#ifndef Tcl_DbNewListObj
+#define Tcl_DbNewListObj \
+ (tclStubsPtr->tcl_DbNewListObj) /* 25 */
+#endif
+#ifndef Tcl_DbNewLongObj
+#define Tcl_DbNewLongObj \
+ (tclStubsPtr->tcl_DbNewLongObj) /* 26 */
+#endif
+#ifndef Tcl_DbNewObj
+#define Tcl_DbNewObj \
+ (tclStubsPtr->tcl_DbNewObj) /* 27 */
+#endif
+#ifndef Tcl_DbNewStringObj
+#define Tcl_DbNewStringObj \
+ (tclStubsPtr->tcl_DbNewStringObj) /* 28 */
+#endif
+#ifndef Tcl_DuplicateObj
+#define Tcl_DuplicateObj \
+ (tclStubsPtr->tcl_DuplicateObj) /* 29 */
+#endif
+#ifndef TclFreeObj
+#define TclFreeObj \
+ (tclStubsPtr->tclFreeObj) /* 30 */
+#endif
+#ifndef Tcl_GetBoolean
+#define Tcl_GetBoolean \
+ (tclStubsPtr->tcl_GetBoolean) /* 31 */
+#endif
+#ifndef Tcl_GetBooleanFromObj
+#define Tcl_GetBooleanFromObj \
+ (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */
+#endif
+#ifndef Tcl_GetByteArrayFromObj
+#define Tcl_GetByteArrayFromObj \
+ (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */
+#endif
+#ifndef Tcl_GetDouble
+#define Tcl_GetDouble \
+ (tclStubsPtr->tcl_GetDouble) /* 34 */
+#endif
+#ifndef Tcl_GetDoubleFromObj
+#define Tcl_GetDoubleFromObj \
+ (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */
+#endif
+#ifndef Tcl_GetIndexFromObj
+#define Tcl_GetIndexFromObj \
+ (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */
+#endif
+#ifndef Tcl_GetInt
+#define Tcl_GetInt \
+ (tclStubsPtr->tcl_GetInt) /* 37 */
+#endif
+#ifndef Tcl_GetIntFromObj
+#define Tcl_GetIntFromObj \
+ (tclStubsPtr->tcl_GetIntFromObj) /* 38 */
+#endif
+#ifndef Tcl_GetLongFromObj
+#define Tcl_GetLongFromObj \
+ (tclStubsPtr->tcl_GetLongFromObj) /* 39 */
+#endif
+#ifndef Tcl_GetObjType
+#define Tcl_GetObjType \
+ (tclStubsPtr->tcl_GetObjType) /* 40 */
+#endif
+#ifndef Tcl_GetStringFromObj
+#define Tcl_GetStringFromObj \
+ (tclStubsPtr->tcl_GetStringFromObj) /* 41 */
+#endif
+#ifndef Tcl_InvalidateStringRep
+#define Tcl_InvalidateStringRep \
+ (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */
+#endif
+#ifndef Tcl_ListObjAppendList
+#define Tcl_ListObjAppendList \
+ (tclStubsPtr->tcl_ListObjAppendList) /* 43 */
+#endif
+#ifndef Tcl_ListObjAppendElement
+#define Tcl_ListObjAppendElement \
+ (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */
+#endif
+#ifndef Tcl_ListObjGetElements
+#define Tcl_ListObjGetElements \
+ (tclStubsPtr->tcl_ListObjGetElements) /* 45 */
+#endif
+#ifndef Tcl_ListObjIndex
+#define Tcl_ListObjIndex \
+ (tclStubsPtr->tcl_ListObjIndex) /* 46 */
+#endif
+#ifndef Tcl_ListObjLength
+#define Tcl_ListObjLength \
+ (tclStubsPtr->tcl_ListObjLength) /* 47 */
+#endif
+#ifndef Tcl_ListObjReplace
+#define Tcl_ListObjReplace \
+ (tclStubsPtr->tcl_ListObjReplace) /* 48 */
+#endif
+#ifndef Tcl_NewBooleanObj
+#define Tcl_NewBooleanObj \
+ (tclStubsPtr->tcl_NewBooleanObj) /* 49 */
+#endif
+#ifndef Tcl_NewByteArrayObj
+#define Tcl_NewByteArrayObj \
+ (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */
+#endif
+#ifndef Tcl_NewDoubleObj
+#define Tcl_NewDoubleObj \
+ (tclStubsPtr->tcl_NewDoubleObj) /* 51 */
+#endif
+#ifndef Tcl_NewIntObj
+#define Tcl_NewIntObj \
+ (tclStubsPtr->tcl_NewIntObj) /* 52 */
+#endif
+#ifndef Tcl_NewListObj
+#define Tcl_NewListObj \
+ (tclStubsPtr->tcl_NewListObj) /* 53 */
+#endif
+#ifndef Tcl_NewLongObj
+#define Tcl_NewLongObj \
+ (tclStubsPtr->tcl_NewLongObj) /* 54 */
+#endif
+#ifndef Tcl_NewObj
+#define Tcl_NewObj \
+ (tclStubsPtr->tcl_NewObj) /* 55 */
+#endif
+#ifndef Tcl_NewStringObj
+#define Tcl_NewStringObj \
+ (tclStubsPtr->tcl_NewStringObj) /* 56 */
+#endif
+#ifndef Tcl_SetBooleanObj
+#define Tcl_SetBooleanObj \
+ (tclStubsPtr->tcl_SetBooleanObj) /* 57 */
+#endif
+#ifndef Tcl_SetByteArrayLength
+#define Tcl_SetByteArrayLength \
+ (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */
+#endif
+#ifndef Tcl_SetByteArrayObj
+#define Tcl_SetByteArrayObj \
+ (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */
+#endif
+#ifndef Tcl_SetDoubleObj
+#define Tcl_SetDoubleObj \
+ (tclStubsPtr->tcl_SetDoubleObj) /* 60 */
+#endif
+#ifndef Tcl_SetIntObj
+#define Tcl_SetIntObj \
+ (tclStubsPtr->tcl_SetIntObj) /* 61 */
+#endif
+#ifndef Tcl_SetListObj
+#define Tcl_SetListObj \
+ (tclStubsPtr->tcl_SetListObj) /* 62 */
+#endif
+#ifndef Tcl_SetLongObj
+#define Tcl_SetLongObj \
+ (tclStubsPtr->tcl_SetLongObj) /* 63 */
+#endif
+#ifndef Tcl_SetObjLength
+#define Tcl_SetObjLength \
+ (tclStubsPtr->tcl_SetObjLength) /* 64 */
+#endif
+#ifndef Tcl_SetStringObj
+#define Tcl_SetStringObj \
+ (tclStubsPtr->tcl_SetStringObj) /* 65 */
+#endif
+#ifndef Tcl_AddErrorInfo
+#define Tcl_AddErrorInfo \
+ (tclStubsPtr->tcl_AddErrorInfo) /* 66 */
+#endif
+#ifndef Tcl_AddObjErrorInfo
+#define Tcl_AddObjErrorInfo \
+ (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */
+#endif
+#ifndef Tcl_AllowExceptions
+#define Tcl_AllowExceptions \
+ (tclStubsPtr->tcl_AllowExceptions) /* 68 */
+#endif
+#ifndef Tcl_AppendElement
+#define Tcl_AppendElement \
+ (tclStubsPtr->tcl_AppendElement) /* 69 */
+#endif
+#ifndef Tcl_AppendResult
+#define Tcl_AppendResult \
+ (tclStubsPtr->tcl_AppendResult) /* 70 */
+#endif
+#ifndef Tcl_AsyncCreate
+#define Tcl_AsyncCreate \
+ (tclStubsPtr->tcl_AsyncCreate) /* 71 */
+#endif
+#ifndef Tcl_AsyncDelete
+#define Tcl_AsyncDelete \
+ (tclStubsPtr->tcl_AsyncDelete) /* 72 */
+#endif
+#ifndef Tcl_AsyncInvoke
+#define Tcl_AsyncInvoke \
+ (tclStubsPtr->tcl_AsyncInvoke) /* 73 */
+#endif
+#ifndef Tcl_AsyncMark
+#define Tcl_AsyncMark \
+ (tclStubsPtr->tcl_AsyncMark) /* 74 */
+#endif
+#ifndef Tcl_AsyncReady
+#define Tcl_AsyncReady \
+ (tclStubsPtr->tcl_AsyncReady) /* 75 */
+#endif
+#ifndef Tcl_BackgroundError
+#define Tcl_BackgroundError \
+ (tclStubsPtr->tcl_BackgroundError) /* 76 */
+#endif
+#ifndef Tcl_Backslash
+#define Tcl_Backslash \
+ (tclStubsPtr->tcl_Backslash) /* 77 */
+#endif
+#ifndef Tcl_BadChannelOption
+#define Tcl_BadChannelOption \
+ (tclStubsPtr->tcl_BadChannelOption) /* 78 */
+#endif
+#ifndef Tcl_CallWhenDeleted
+#define Tcl_CallWhenDeleted \
+ (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */
+#endif
+#ifndef Tcl_CancelIdleCall
+#define Tcl_CancelIdleCall \
+ (tclStubsPtr->tcl_CancelIdleCall) /* 80 */
+#endif
+#ifndef Tcl_Close
+#define Tcl_Close \
+ (tclStubsPtr->tcl_Close) /* 81 */
+#endif
+#ifndef Tcl_CommandComplete
+#define Tcl_CommandComplete \
+ (tclStubsPtr->tcl_CommandComplete) /* 82 */
+#endif
+#ifndef Tcl_Concat
+#define Tcl_Concat \
+ (tclStubsPtr->tcl_Concat) /* 83 */
+#endif
+#ifndef Tcl_ConvertElement
+#define Tcl_ConvertElement \
+ (tclStubsPtr->tcl_ConvertElement) /* 84 */
+#endif
+#ifndef Tcl_ConvertCountedElement
+#define Tcl_ConvertCountedElement \
+ (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */
+#endif
+#ifndef Tcl_CreateAlias
+#define Tcl_CreateAlias \
+ (tclStubsPtr->tcl_CreateAlias) /* 86 */
+#endif
+#ifndef Tcl_CreateAliasObj
+#define Tcl_CreateAliasObj \
+ (tclStubsPtr->tcl_CreateAliasObj) /* 87 */
+#endif
+#ifndef Tcl_CreateChannel
+#define Tcl_CreateChannel \
+ (tclStubsPtr->tcl_CreateChannel) /* 88 */
+#endif
+#ifndef Tcl_CreateChannelHandler
+#define Tcl_CreateChannelHandler \
+ (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */
+#endif
+#ifndef Tcl_CreateCloseHandler
+#define Tcl_CreateCloseHandler \
+ (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */
+#endif
+#ifndef Tcl_CreateCommand
+#define Tcl_CreateCommand \
+ (tclStubsPtr->tcl_CreateCommand) /* 91 */
+#endif
+#ifndef Tcl_CreateEventSource
+#define Tcl_CreateEventSource \
+ (tclStubsPtr->tcl_CreateEventSource) /* 92 */
+#endif
+#ifndef Tcl_CreateExitHandler
+#define Tcl_CreateExitHandler \
+ (tclStubsPtr->tcl_CreateExitHandler) /* 93 */
+#endif
+#ifndef Tcl_CreateInterp
+#define Tcl_CreateInterp \
+ (tclStubsPtr->tcl_CreateInterp) /* 94 */
+#endif
+#ifndef Tcl_CreateMathFunc
+#define Tcl_CreateMathFunc \
+ (tclStubsPtr->tcl_CreateMathFunc) /* 95 */
+#endif
+#ifndef Tcl_CreateObjCommand
+#define Tcl_CreateObjCommand \
+ (tclStubsPtr->tcl_CreateObjCommand) /* 96 */
+#endif
+#ifndef Tcl_CreateSlave
+#define Tcl_CreateSlave \
+ (tclStubsPtr->tcl_CreateSlave) /* 97 */
+#endif
+#ifndef Tcl_CreateTimerHandler
+#define Tcl_CreateTimerHandler \
+ (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */
+#endif
+#ifndef Tcl_CreateTrace
+#define Tcl_CreateTrace \
+ (tclStubsPtr->tcl_CreateTrace) /* 99 */
+#endif
+#ifndef Tcl_DeleteAssocData
+#define Tcl_DeleteAssocData \
+ (tclStubsPtr->tcl_DeleteAssocData) /* 100 */
+#endif
+#ifndef Tcl_DeleteChannelHandler
+#define Tcl_DeleteChannelHandler \
+ (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */
+#endif
+#ifndef Tcl_DeleteCloseHandler
+#define Tcl_DeleteCloseHandler \
+ (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */
+#endif
+#ifndef Tcl_DeleteCommand
+#define Tcl_DeleteCommand \
+ (tclStubsPtr->tcl_DeleteCommand) /* 103 */
+#endif
+#ifndef Tcl_DeleteCommandFromToken
+#define Tcl_DeleteCommandFromToken \
+ (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */
+#endif
+#ifndef Tcl_DeleteEvents
+#define Tcl_DeleteEvents \
+ (tclStubsPtr->tcl_DeleteEvents) /* 105 */
+#endif
+#ifndef Tcl_DeleteEventSource
+#define Tcl_DeleteEventSource \
+ (tclStubsPtr->tcl_DeleteEventSource) /* 106 */
+#endif
+#ifndef Tcl_DeleteExitHandler
+#define Tcl_DeleteExitHandler \
+ (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */
+#endif
+#ifndef Tcl_DeleteHashEntry
+#define Tcl_DeleteHashEntry \
+ (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */
+#endif
+#ifndef Tcl_DeleteHashTable
+#define Tcl_DeleteHashTable \
+ (tclStubsPtr->tcl_DeleteHashTable) /* 109 */
+#endif
+#ifndef Tcl_DeleteInterp
+#define Tcl_DeleteInterp \
+ (tclStubsPtr->tcl_DeleteInterp) /* 110 */
+#endif
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef Tcl_DetachPids
+#define Tcl_DetachPids \
+ (tclStubsPtr->tcl_DetachPids) /* 111 */
+#endif
+#endif /* UNIX */
+#ifdef __WIN32__
+#ifndef Tcl_DetachPids
+#define Tcl_DetachPids \
+ (tclStubsPtr->tcl_DetachPids) /* 111 */
+#endif
+#endif /* __WIN32__ */
+#ifndef Tcl_DeleteTimerHandler
+#define Tcl_DeleteTimerHandler \
+ (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */
+#endif
+#ifndef Tcl_DeleteTrace
+#define Tcl_DeleteTrace \
+ (tclStubsPtr->tcl_DeleteTrace) /* 113 */
+#endif
+#ifndef Tcl_DontCallWhenDeleted
+#define Tcl_DontCallWhenDeleted \
+ (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */
+#endif
+#ifndef Tcl_DoOneEvent
+#define Tcl_DoOneEvent \
+ (tclStubsPtr->tcl_DoOneEvent) /* 115 */
+#endif
+#ifndef Tcl_DoWhenIdle
+#define Tcl_DoWhenIdle \
+ (tclStubsPtr->tcl_DoWhenIdle) /* 116 */
+#endif
+#ifndef Tcl_DStringAppend
+#define Tcl_DStringAppend \
+ (tclStubsPtr->tcl_DStringAppend) /* 117 */
+#endif
+#ifndef Tcl_DStringAppendElement
+#define Tcl_DStringAppendElement \
+ (tclStubsPtr->tcl_DStringAppendElement) /* 118 */
+#endif
+#ifndef Tcl_DStringEndSublist
+#define Tcl_DStringEndSublist \
+ (tclStubsPtr->tcl_DStringEndSublist) /* 119 */
+#endif
+#ifndef Tcl_DStringFree
+#define Tcl_DStringFree \
+ (tclStubsPtr->tcl_DStringFree) /* 120 */
+#endif
+#ifndef Tcl_DStringGetResult
+#define Tcl_DStringGetResult \
+ (tclStubsPtr->tcl_DStringGetResult) /* 121 */
+#endif
+#ifndef Tcl_DStringInit
+#define Tcl_DStringInit \
+ (tclStubsPtr->tcl_DStringInit) /* 122 */
+#endif
+#ifndef Tcl_DStringResult
+#define Tcl_DStringResult \
+ (tclStubsPtr->tcl_DStringResult) /* 123 */
+#endif
+#ifndef Tcl_DStringSetLength
+#define Tcl_DStringSetLength \
+ (tclStubsPtr->tcl_DStringSetLength) /* 124 */
+#endif
+#ifndef Tcl_DStringStartSublist
+#define Tcl_DStringStartSublist \
+ (tclStubsPtr->tcl_DStringStartSublist) /* 125 */
+#endif
+#ifndef Tcl_Eof
+#define Tcl_Eof \
+ (tclStubsPtr->tcl_Eof) /* 126 */
+#endif
+#ifndef Tcl_ErrnoId
+#define Tcl_ErrnoId \
+ (tclStubsPtr->tcl_ErrnoId) /* 127 */
+#endif
+#ifndef Tcl_ErrnoMsg
+#define Tcl_ErrnoMsg \
+ (tclStubsPtr->tcl_ErrnoMsg) /* 128 */
+#endif
+#ifndef Tcl_Eval
+#define Tcl_Eval \
+ (tclStubsPtr->tcl_Eval) /* 129 */
+#endif
+#ifndef Tcl_EvalFile
+#define Tcl_EvalFile \
+ (tclStubsPtr->tcl_EvalFile) /* 130 */
+#endif
+#ifndef Tcl_EvalObj
+#define Tcl_EvalObj \
+ (tclStubsPtr->tcl_EvalObj) /* 131 */
+#endif
+#ifndef Tcl_EventuallyFree
+#define Tcl_EventuallyFree \
+ (tclStubsPtr->tcl_EventuallyFree) /* 132 */
+#endif
+#ifndef Tcl_Exit
+#define Tcl_Exit \
+ (tclStubsPtr->tcl_Exit) /* 133 */
+#endif
+#ifndef Tcl_ExposeCommand
+#define Tcl_ExposeCommand \
+ (tclStubsPtr->tcl_ExposeCommand) /* 134 */
+#endif
+#ifndef Tcl_ExprBoolean
+#define Tcl_ExprBoolean \
+ (tclStubsPtr->tcl_ExprBoolean) /* 135 */
+#endif
+#ifndef Tcl_ExprBooleanObj
+#define Tcl_ExprBooleanObj \
+ (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */
+#endif
+#ifndef Tcl_ExprDouble
+#define Tcl_ExprDouble \
+ (tclStubsPtr->tcl_ExprDouble) /* 137 */
+#endif
+#ifndef Tcl_ExprDoubleObj
+#define Tcl_ExprDoubleObj \
+ (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */
+#endif
+#ifndef Tcl_ExprLong
+#define Tcl_ExprLong \
+ (tclStubsPtr->tcl_ExprLong) /* 139 */
+#endif
+#ifndef Tcl_ExprLongObj
+#define Tcl_ExprLongObj \
+ (tclStubsPtr->tcl_ExprLongObj) /* 140 */
+#endif
+#ifndef Tcl_ExprObj
+#define Tcl_ExprObj \
+ (tclStubsPtr->tcl_ExprObj) /* 141 */
+#endif
+#ifndef Tcl_ExprString
+#define Tcl_ExprString \
+ (tclStubsPtr->tcl_ExprString) /* 142 */
+#endif
+#ifndef Tcl_Finalize
+#define Tcl_Finalize \
+ (tclStubsPtr->tcl_Finalize) /* 143 */
+#endif
+#ifndef Tcl_FindExecutable
+#define Tcl_FindExecutable \
+ (tclStubsPtr->tcl_FindExecutable) /* 144 */
+#endif
+#ifndef Tcl_FirstHashEntry
+#define Tcl_FirstHashEntry \
+ (tclStubsPtr->tcl_FirstHashEntry) /* 145 */
+#endif
+#ifndef Tcl_Flush
+#define Tcl_Flush \
+ (tclStubsPtr->tcl_Flush) /* 146 */
+#endif
+#ifndef Tcl_FreeResult
+#define Tcl_FreeResult \
+ (tclStubsPtr->tcl_FreeResult) /* 147 */
+#endif
+#ifndef Tcl_GetAlias
+#define Tcl_GetAlias \
+ (tclStubsPtr->tcl_GetAlias) /* 148 */
+#endif
+#ifndef Tcl_GetAliasObj
+#define Tcl_GetAliasObj \
+ (tclStubsPtr->tcl_GetAliasObj) /* 149 */
+#endif
+#ifndef Tcl_GetAssocData
+#define Tcl_GetAssocData \
+ (tclStubsPtr->tcl_GetAssocData) /* 150 */
+#endif
+#ifndef Tcl_GetChannel
+#define Tcl_GetChannel \
+ (tclStubsPtr->tcl_GetChannel) /* 151 */
+#endif
+#ifndef Tcl_GetChannelBufferSize
+#define Tcl_GetChannelBufferSize \
+ (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */
+#endif
+#ifndef Tcl_GetChannelHandle
+#define Tcl_GetChannelHandle \
+ (tclStubsPtr->tcl_GetChannelHandle) /* 153 */
+#endif
+#ifndef Tcl_GetChannelInstanceData
+#define Tcl_GetChannelInstanceData \
+ (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */
+#endif
+#ifndef Tcl_GetChannelMode
+#define Tcl_GetChannelMode \
+ (tclStubsPtr->tcl_GetChannelMode) /* 155 */
+#endif
+#ifndef Tcl_GetChannelName
+#define Tcl_GetChannelName \
+ (tclStubsPtr->tcl_GetChannelName) /* 156 */
+#endif
+#ifndef Tcl_GetChannelOption
+#define Tcl_GetChannelOption \
+ (tclStubsPtr->tcl_GetChannelOption) /* 157 */
+#endif
+#ifndef Tcl_GetChannelType
+#define Tcl_GetChannelType \
+ (tclStubsPtr->tcl_GetChannelType) /* 158 */
+#endif
+#ifndef Tcl_GetCommandInfo
+#define Tcl_GetCommandInfo \
+ (tclStubsPtr->tcl_GetCommandInfo) /* 159 */
+#endif
+#ifndef Tcl_GetCommandName
+#define Tcl_GetCommandName \
+ (tclStubsPtr->tcl_GetCommandName) /* 160 */
+#endif
+#ifndef Tcl_GetErrno
+#define Tcl_GetErrno \
+ (tclStubsPtr->tcl_GetErrno) /* 161 */
+#endif
+#ifndef Tcl_GetHostName
+#define Tcl_GetHostName \
+ (tclStubsPtr->tcl_GetHostName) /* 162 */
+#endif
+#ifndef Tcl_GetInterpPath
+#define Tcl_GetInterpPath \
+ (tclStubsPtr->tcl_GetInterpPath) /* 163 */
+#endif
+#ifndef Tcl_GetMaster
+#define Tcl_GetMaster \
+ (tclStubsPtr->tcl_GetMaster) /* 164 */
+#endif
+#ifndef Tcl_GetNameOfExecutable
+#define Tcl_GetNameOfExecutable \
+ (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */
+#endif
+#ifndef Tcl_GetObjResult
+#define Tcl_GetObjResult \
+ (tclStubsPtr->tcl_GetObjResult) /* 166 */
+#endif
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef Tcl_GetOpenFile
+#define Tcl_GetOpenFile \
+ (tclStubsPtr->tcl_GetOpenFile) /* 167 */
+#endif
+#endif /* UNIX */
+#ifndef Tcl_GetPathType
+#define Tcl_GetPathType \
+ (tclStubsPtr->tcl_GetPathType) /* 168 */
+#endif
+#ifndef Tcl_Gets
+#define Tcl_Gets \
+ (tclStubsPtr->tcl_Gets) /* 169 */
+#endif
+#ifndef Tcl_GetsObj
+#define Tcl_GetsObj \
+ (tclStubsPtr->tcl_GetsObj) /* 170 */
+#endif
+#ifndef Tcl_GetServiceMode
+#define Tcl_GetServiceMode \
+ (tclStubsPtr->tcl_GetServiceMode) /* 171 */
+#endif
+#ifndef Tcl_GetSlave
+#define Tcl_GetSlave \
+ (tclStubsPtr->tcl_GetSlave) /* 172 */
+#endif
+#ifndef Tcl_GetStdChannel
+#define Tcl_GetStdChannel \
+ (tclStubsPtr->tcl_GetStdChannel) /* 173 */
+#endif
+#ifndef Tcl_GetStringResult
+#define Tcl_GetStringResult \
+ (tclStubsPtr->tcl_GetStringResult) /* 174 */
+#endif
+#ifndef Tcl_GetVar
+#define Tcl_GetVar \
+ (tclStubsPtr->tcl_GetVar) /* 175 */
+#endif
+#ifndef Tcl_GetVar2
+#define Tcl_GetVar2 \
+ (tclStubsPtr->tcl_GetVar2) /* 176 */
+#endif
+#ifndef Tcl_GlobalEval
+#define Tcl_GlobalEval \
+ (tclStubsPtr->tcl_GlobalEval) /* 177 */
+#endif
+#ifndef Tcl_GlobalEvalObj
+#define Tcl_GlobalEvalObj \
+ (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */
+#endif
+#ifndef Tcl_HideCommand
+#define Tcl_HideCommand \
+ (tclStubsPtr->tcl_HideCommand) /* 179 */
+#endif
+#ifndef Tcl_Init
+#define Tcl_Init \
+ (tclStubsPtr->tcl_Init) /* 180 */
+#endif
+#ifndef Tcl_InitHashTable
+#define Tcl_InitHashTable \
+ (tclStubsPtr->tcl_InitHashTable) /* 181 */
+#endif
+#ifndef Tcl_InputBlocked
+#define Tcl_InputBlocked \
+ (tclStubsPtr->tcl_InputBlocked) /* 182 */
+#endif
+#ifndef Tcl_InputBuffered
+#define Tcl_InputBuffered \
+ (tclStubsPtr->tcl_InputBuffered) /* 183 */
+#endif
+#ifndef Tcl_InterpDeleted
+#define Tcl_InterpDeleted \
+ (tclStubsPtr->tcl_InterpDeleted) /* 184 */
+#endif
+#ifndef Tcl_IsSafe
+#define Tcl_IsSafe \
+ (tclStubsPtr->tcl_IsSafe) /* 185 */
+#endif
+#ifndef Tcl_JoinPath
+#define Tcl_JoinPath \
+ (tclStubsPtr->tcl_JoinPath) /* 186 */
+#endif
+#ifndef Tcl_LinkVar
+#define Tcl_LinkVar \
+ (tclStubsPtr->tcl_LinkVar) /* 187 */
+#endif
+/* Slot 188 is reserved */
+#ifndef Tcl_MakeFileChannel
+#define Tcl_MakeFileChannel \
+ (tclStubsPtr->tcl_MakeFileChannel) /* 189 */
+#endif
+#ifndef Tcl_MakeSafe
+#define Tcl_MakeSafe \
+ (tclStubsPtr->tcl_MakeSafe) /* 190 */
+#endif
+#ifndef Tcl_MakeTcpClientChannel
+#define Tcl_MakeTcpClientChannel \
+ (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */
+#endif
+#ifndef Tcl_Merge
+#define Tcl_Merge \
+ (tclStubsPtr->tcl_Merge) /* 192 */
+#endif
+#ifndef Tcl_NextHashEntry
+#define Tcl_NextHashEntry \
+ (tclStubsPtr->tcl_NextHashEntry) /* 193 */
+#endif
+#ifndef Tcl_NotifyChannel
+#define Tcl_NotifyChannel \
+ (tclStubsPtr->tcl_NotifyChannel) /* 194 */
+#endif
+#ifndef Tcl_ObjGetVar2
+#define Tcl_ObjGetVar2 \
+ (tclStubsPtr->tcl_ObjGetVar2) /* 195 */
+#endif
+#ifndef Tcl_ObjSetVar2
+#define Tcl_ObjSetVar2 \
+ (tclStubsPtr->tcl_ObjSetVar2) /* 196 */
+#endif
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef Tcl_OpenCommandChannel
+#define Tcl_OpenCommandChannel \
+ (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */
+#endif
+#endif /* UNIX */
+#ifdef __WIN32__
+#ifndef Tcl_OpenCommandChannel
+#define Tcl_OpenCommandChannel \
+ (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */
+#endif
+#endif /* __WIN32__ */
+#ifndef Tcl_OpenFileChannel
+#define Tcl_OpenFileChannel \
+ (tclStubsPtr->tcl_OpenFileChannel) /* 198 */
+#endif
+#ifndef Tcl_OpenTcpClient
+#define Tcl_OpenTcpClient \
+ (tclStubsPtr->tcl_OpenTcpClient) /* 199 */
+#endif
+#ifndef Tcl_OpenTcpServer
+#define Tcl_OpenTcpServer \
+ (tclStubsPtr->tcl_OpenTcpServer) /* 200 */
+#endif
+#ifndef Tcl_Preserve
+#define Tcl_Preserve \
+ (tclStubsPtr->tcl_Preserve) /* 201 */
+#endif
+#ifndef Tcl_PrintDouble
+#define Tcl_PrintDouble \
+ (tclStubsPtr->tcl_PrintDouble) /* 202 */
+#endif
+#ifndef Tcl_PutEnv
+#define Tcl_PutEnv \
+ (tclStubsPtr->tcl_PutEnv) /* 203 */
+#endif
+#ifndef Tcl_PosixError
+#define Tcl_PosixError \
+ (tclStubsPtr->tcl_PosixError) /* 204 */
+#endif
+#ifndef Tcl_QueueEvent
+#define Tcl_QueueEvent \
+ (tclStubsPtr->tcl_QueueEvent) /* 205 */
+#endif
+#ifndef Tcl_Read
+#define Tcl_Read \
+ (tclStubsPtr->tcl_Read) /* 206 */
+#endif
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef Tcl_ReapDetachedProcs
+#define Tcl_ReapDetachedProcs \
+ (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */
+#endif
+#endif /* UNIX */
+#ifdef __WIN32__
+#ifndef Tcl_ReapDetachedProcs
+#define Tcl_ReapDetachedProcs \
+ (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */
+#endif
+#endif /* __WIN32__ */
+#ifndef Tcl_RecordAndEval
+#define Tcl_RecordAndEval \
+ (tclStubsPtr->tcl_RecordAndEval) /* 208 */
+#endif
+#ifndef Tcl_RecordAndEvalObj
+#define Tcl_RecordAndEvalObj \
+ (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */
+#endif
+#ifndef Tcl_RegisterChannel
+#define Tcl_RegisterChannel \
+ (tclStubsPtr->tcl_RegisterChannel) /* 210 */
+#endif
+#ifndef Tcl_RegisterObjType
+#define Tcl_RegisterObjType \
+ (tclStubsPtr->tcl_RegisterObjType) /* 211 */
+#endif
+#ifndef Tcl_RegExpCompile
+#define Tcl_RegExpCompile \
+ (tclStubsPtr->tcl_RegExpCompile) /* 212 */
+#endif
+#ifndef Tcl_RegExpExec
+#define Tcl_RegExpExec \
+ (tclStubsPtr->tcl_RegExpExec) /* 213 */
+#endif
+#ifndef Tcl_RegExpMatch
+#define Tcl_RegExpMatch \
+ (tclStubsPtr->tcl_RegExpMatch) /* 214 */
+#endif
+#ifndef Tcl_RegExpRange
+#define Tcl_RegExpRange \
+ (tclStubsPtr->tcl_RegExpRange) /* 215 */
+#endif
+#ifndef Tcl_Release
+#define Tcl_Release \
+ (tclStubsPtr->tcl_Release) /* 216 */
+#endif
+#ifndef Tcl_ResetResult
+#define Tcl_ResetResult \
+ (tclStubsPtr->tcl_ResetResult) /* 217 */
+#endif
+#ifndef Tcl_ScanElement
+#define Tcl_ScanElement \
+ (tclStubsPtr->tcl_ScanElement) /* 218 */
+#endif
+#ifndef Tcl_ScanCountedElement
+#define Tcl_ScanCountedElement \
+ (tclStubsPtr->tcl_ScanCountedElement) /* 219 */
+#endif
+#ifndef Tcl_SeekOld
+#define Tcl_SeekOld \
+ (tclStubsPtr->tcl_SeekOld) /* 220 */
+#endif
+#ifndef Tcl_ServiceAll
+#define Tcl_ServiceAll \
+ (tclStubsPtr->tcl_ServiceAll) /* 221 */
+#endif
+#ifndef Tcl_ServiceEvent
+#define Tcl_ServiceEvent \
+ (tclStubsPtr->tcl_ServiceEvent) /* 222 */
+#endif
+#ifndef Tcl_SetAssocData
+#define Tcl_SetAssocData \
+ (tclStubsPtr->tcl_SetAssocData) /* 223 */
+#endif
+#ifndef Tcl_SetChannelBufferSize
+#define Tcl_SetChannelBufferSize \
+ (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */
+#endif
+#ifndef Tcl_SetChannelOption
+#define Tcl_SetChannelOption \
+ (tclStubsPtr->tcl_SetChannelOption) /* 225 */
+#endif
+#ifndef Tcl_SetCommandInfo
+#define Tcl_SetCommandInfo \
+ (tclStubsPtr->tcl_SetCommandInfo) /* 226 */
+#endif
+#ifndef Tcl_SetErrno
+#define Tcl_SetErrno \
+ (tclStubsPtr->tcl_SetErrno) /* 227 */
+#endif
+#ifndef Tcl_SetErrorCode
+#define Tcl_SetErrorCode \
+ (tclStubsPtr->tcl_SetErrorCode) /* 228 */
+#endif
+#ifndef Tcl_SetMaxBlockTime
+#define Tcl_SetMaxBlockTime \
+ (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */
+#endif
+#ifndef Tcl_SetPanicProc
+#define Tcl_SetPanicProc \
+ (tclStubsPtr->tcl_SetPanicProc) /* 230 */
+#endif
+#ifndef Tcl_SetRecursionLimit
+#define Tcl_SetRecursionLimit \
+ (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */
+#endif
+#ifndef Tcl_SetResult
+#define Tcl_SetResult \
+ (tclStubsPtr->tcl_SetResult) /* 232 */
+#endif
+#ifndef Tcl_SetServiceMode
+#define Tcl_SetServiceMode \
+ (tclStubsPtr->tcl_SetServiceMode) /* 233 */
+#endif
+#ifndef Tcl_SetObjErrorCode
+#define Tcl_SetObjErrorCode \
+ (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */
+#endif
+#ifndef Tcl_SetObjResult
+#define Tcl_SetObjResult \
+ (tclStubsPtr->tcl_SetObjResult) /* 235 */
+#endif
+#ifndef Tcl_SetStdChannel
+#define Tcl_SetStdChannel \
+ (tclStubsPtr->tcl_SetStdChannel) /* 236 */
+#endif
+#ifndef Tcl_SetVar
+#define Tcl_SetVar \
+ (tclStubsPtr->tcl_SetVar) /* 237 */
+#endif
+#ifndef Tcl_SetVar2
+#define Tcl_SetVar2 \
+ (tclStubsPtr->tcl_SetVar2) /* 238 */
+#endif
+#ifndef Tcl_SignalId
+#define Tcl_SignalId \
+ (tclStubsPtr->tcl_SignalId) /* 239 */
+#endif
+#ifndef Tcl_SignalMsg
+#define Tcl_SignalMsg \
+ (tclStubsPtr->tcl_SignalMsg) /* 240 */
+#endif
+#ifndef Tcl_SourceRCFile
+#define Tcl_SourceRCFile \
+ (tclStubsPtr->tcl_SourceRCFile) /* 241 */
+#endif
+#ifndef Tcl_SplitList
+#define Tcl_SplitList \
+ (tclStubsPtr->tcl_SplitList) /* 242 */
+#endif
+#ifndef Tcl_SplitPath
+#define Tcl_SplitPath \
+ (tclStubsPtr->tcl_SplitPath) /* 243 */
+#endif
+#ifndef Tcl_StaticPackage
+#define Tcl_StaticPackage \
+ (tclStubsPtr->tcl_StaticPackage) /* 244 */
+#endif
+#ifndef Tcl_StringMatch
+#define Tcl_StringMatch \
+ (tclStubsPtr->tcl_StringMatch) /* 245 */
+#endif
+#ifndef Tcl_TellOld
+#define Tcl_TellOld \
+ (tclStubsPtr->tcl_TellOld) /* 246 */
+#endif
+#ifndef Tcl_TraceVar
+#define Tcl_TraceVar \
+ (tclStubsPtr->tcl_TraceVar) /* 247 */
+#endif
+#ifndef Tcl_TraceVar2
+#define Tcl_TraceVar2 \
+ (tclStubsPtr->tcl_TraceVar2) /* 248 */
+#endif
+#ifndef Tcl_TranslateFileName
+#define Tcl_TranslateFileName \
+ (tclStubsPtr->tcl_TranslateFileName) /* 249 */
+#endif
+#ifndef Tcl_Ungets
+#define Tcl_Ungets \
+ (tclStubsPtr->tcl_Ungets) /* 250 */
+#endif
+#ifndef Tcl_UnlinkVar
+#define Tcl_UnlinkVar \
+ (tclStubsPtr->tcl_UnlinkVar) /* 251 */
+#endif
+#ifndef Tcl_UnregisterChannel
+#define Tcl_UnregisterChannel \
+ (tclStubsPtr->tcl_UnregisterChannel) /* 252 */
+#endif
+#ifndef Tcl_UnsetVar
+#define Tcl_UnsetVar \
+ (tclStubsPtr->tcl_UnsetVar) /* 253 */
+#endif
+#ifndef Tcl_UnsetVar2
+#define Tcl_UnsetVar2 \
+ (tclStubsPtr->tcl_UnsetVar2) /* 254 */
+#endif
+#ifndef Tcl_UntraceVar
+#define Tcl_UntraceVar \
+ (tclStubsPtr->tcl_UntraceVar) /* 255 */
+#endif
+#ifndef Tcl_UntraceVar2
+#define Tcl_UntraceVar2 \
+ (tclStubsPtr->tcl_UntraceVar2) /* 256 */
+#endif
+#ifndef Tcl_UpdateLinkedVar
+#define Tcl_UpdateLinkedVar \
+ (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */
+#endif
+#ifndef Tcl_UpVar
+#define Tcl_UpVar \
+ (tclStubsPtr->tcl_UpVar) /* 258 */
+#endif
+#ifndef Tcl_UpVar2
+#define Tcl_UpVar2 \
+ (tclStubsPtr->tcl_UpVar2) /* 259 */
+#endif
+#ifndef Tcl_VarEval
+#define Tcl_VarEval \
+ (tclStubsPtr->tcl_VarEval) /* 260 */
+#endif
+#ifndef Tcl_VarTraceInfo
+#define Tcl_VarTraceInfo \
+ (tclStubsPtr->tcl_VarTraceInfo) /* 261 */
+#endif
+#ifndef Tcl_VarTraceInfo2
+#define Tcl_VarTraceInfo2 \
+ (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */
+#endif
+#ifndef Tcl_Write
+#define Tcl_Write \
+ (tclStubsPtr->tcl_Write) /* 263 */
+#endif
+#ifndef Tcl_WrongNumArgs
+#define Tcl_WrongNumArgs \
+ (tclStubsPtr->tcl_WrongNumArgs) /* 264 */
+#endif
+#ifndef Tcl_DumpActiveMemory
+#define Tcl_DumpActiveMemory \
+ (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */
+#endif
+#ifndef Tcl_ValidateAllMemory
+#define Tcl_ValidateAllMemory \
+ (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */
+#endif
+#ifndef Tcl_AppendResultVA
+#define Tcl_AppendResultVA \
+ (tclStubsPtr->tcl_AppendResultVA) /* 267 */
+#endif
+#ifndef Tcl_AppendStringsToObjVA
+#define Tcl_AppendStringsToObjVA \
+ (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */
+#endif
+#ifndef Tcl_HashStats
+#define Tcl_HashStats \
+ (tclStubsPtr->tcl_HashStats) /* 269 */
+#endif
+#ifndef Tcl_ParseVar
+#define Tcl_ParseVar \
+ (tclStubsPtr->tcl_ParseVar) /* 270 */
+#endif
+#ifndef Tcl_PkgPresent
+#define Tcl_PkgPresent \
+ (tclStubsPtr->tcl_PkgPresent) /* 271 */
+#endif
+#ifndef Tcl_PkgPresentEx
+#define Tcl_PkgPresentEx \
+ (tclStubsPtr->tcl_PkgPresentEx) /* 272 */
+#endif
+#ifndef Tcl_PkgProvide
+#define Tcl_PkgProvide \
+ (tclStubsPtr->tcl_PkgProvide) /* 273 */
+#endif
+#ifndef Tcl_PkgRequire
+#define Tcl_PkgRequire \
+ (tclStubsPtr->tcl_PkgRequire) /* 274 */
+#endif
+#ifndef Tcl_SetErrorCodeVA
+#define Tcl_SetErrorCodeVA \
+ (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */
+#endif
+#ifndef Tcl_VarEvalVA
+#define Tcl_VarEvalVA \
+ (tclStubsPtr->tcl_VarEvalVA) /* 276 */
+#endif
+#ifndef Tcl_WaitPid
+#define Tcl_WaitPid \
+ (tclStubsPtr->tcl_WaitPid) /* 277 */
+#endif
+#ifndef Tcl_PanicVA
+#define Tcl_PanicVA \
+ (tclStubsPtr->tcl_PanicVA) /* 278 */
+#endif
+#ifndef Tcl_GetVersion
+#define Tcl_GetVersion \
+ (tclStubsPtr->tcl_GetVersion) /* 279 */
+#endif
+#ifndef Tcl_InitMemory
+#define Tcl_InitMemory \
+ (tclStubsPtr->tcl_InitMemory) /* 280 */
+#endif
+#ifndef Tcl_StackChannel
+#define Tcl_StackChannel \
+ (tclStubsPtr->tcl_StackChannel) /* 281 */
+#endif
+#ifndef Tcl_UnstackChannel
+#define Tcl_UnstackChannel \
+ (tclStubsPtr->tcl_UnstackChannel) /* 282 */
+#endif
+#ifndef Tcl_GetStackedChannel
+#define Tcl_GetStackedChannel \
+ (tclStubsPtr->tcl_GetStackedChannel) /* 283 */
+#endif
+#ifndef Tcl_SetMainLoop
+#define Tcl_SetMainLoop \
+ (tclStubsPtr->tcl_SetMainLoop) /* 284 */
+#endif
+/* Slot 285 is reserved */
+#ifndef Tcl_AppendObjToObj
+#define Tcl_AppendObjToObj \
+ (tclStubsPtr->tcl_AppendObjToObj) /* 286 */
+#endif
+#ifndef Tcl_CreateEncoding
+#define Tcl_CreateEncoding \
+ (tclStubsPtr->tcl_CreateEncoding) /* 287 */
+#endif
+#ifndef Tcl_CreateThreadExitHandler
+#define Tcl_CreateThreadExitHandler \
+ (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */
+#endif
+#ifndef Tcl_DeleteThreadExitHandler
+#define Tcl_DeleteThreadExitHandler \
+ (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */
+#endif
+#ifndef Tcl_DiscardResult
+#define Tcl_DiscardResult \
+ (tclStubsPtr->tcl_DiscardResult) /* 290 */
+#endif
+#ifndef Tcl_EvalEx
+#define Tcl_EvalEx \
+ (tclStubsPtr->tcl_EvalEx) /* 291 */
+#endif
+#ifndef Tcl_EvalObjv
+#define Tcl_EvalObjv \
+ (tclStubsPtr->tcl_EvalObjv) /* 292 */
+#endif
+#ifndef Tcl_EvalObjEx
+#define Tcl_EvalObjEx \
+ (tclStubsPtr->tcl_EvalObjEx) /* 293 */
+#endif
+#ifndef Tcl_ExitThread
+#define Tcl_ExitThread \
+ (tclStubsPtr->tcl_ExitThread) /* 294 */
+#endif
+#ifndef Tcl_ExternalToUtf
+#define Tcl_ExternalToUtf \
+ (tclStubsPtr->tcl_ExternalToUtf) /* 295 */
+#endif
+#ifndef Tcl_ExternalToUtfDString
+#define Tcl_ExternalToUtfDString \
+ (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */
+#endif
+#ifndef Tcl_FinalizeThread
+#define Tcl_FinalizeThread \
+ (tclStubsPtr->tcl_FinalizeThread) /* 297 */
+#endif
+#ifndef Tcl_FinalizeNotifier
+#define Tcl_FinalizeNotifier \
+ (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */
+#endif
+#ifndef Tcl_FreeEncoding
+#define Tcl_FreeEncoding \
+ (tclStubsPtr->tcl_FreeEncoding) /* 299 */
+#endif
+#ifndef Tcl_GetCurrentThread
+#define Tcl_GetCurrentThread \
+ (tclStubsPtr->tcl_GetCurrentThread) /* 300 */
+#endif
+#ifndef Tcl_GetEncoding
+#define Tcl_GetEncoding \
+ (tclStubsPtr->tcl_GetEncoding) /* 301 */
+#endif
+#ifndef Tcl_GetEncodingName
+#define Tcl_GetEncodingName \
+ (tclStubsPtr->tcl_GetEncodingName) /* 302 */
+#endif
+#ifndef Tcl_GetEncodingNames
+#define Tcl_GetEncodingNames \
+ (tclStubsPtr->tcl_GetEncodingNames) /* 303 */
+#endif
+#ifndef Tcl_GetIndexFromObjStruct
+#define Tcl_GetIndexFromObjStruct \
+ (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */
+#endif
+#ifndef Tcl_GetThreadData
+#define Tcl_GetThreadData \
+ (tclStubsPtr->tcl_GetThreadData) /* 305 */
+#endif
+#ifndef Tcl_GetVar2Ex
+#define Tcl_GetVar2Ex \
+ (tclStubsPtr->tcl_GetVar2Ex) /* 306 */
+#endif
+#ifndef Tcl_InitNotifier
+#define Tcl_InitNotifier \
+ (tclStubsPtr->tcl_InitNotifier) /* 307 */
+#endif
+#ifndef Tcl_MutexLock
+#define Tcl_MutexLock \
+ (tclStubsPtr->tcl_MutexLock) /* 308 */
+#endif
+#ifndef Tcl_MutexUnlock
+#define Tcl_MutexUnlock \
+ (tclStubsPtr->tcl_MutexUnlock) /* 309 */
+#endif
+#ifndef Tcl_ConditionNotify
+#define Tcl_ConditionNotify \
+ (tclStubsPtr->tcl_ConditionNotify) /* 310 */
+#endif
+#ifndef Tcl_ConditionWait
+#define Tcl_ConditionWait \
+ (tclStubsPtr->tcl_ConditionWait) /* 311 */
+#endif
+#ifndef Tcl_NumUtfChars
+#define Tcl_NumUtfChars \
+ (tclStubsPtr->tcl_NumUtfChars) /* 312 */
+#endif
+#ifndef Tcl_ReadChars
+#define Tcl_ReadChars \
+ (tclStubsPtr->tcl_ReadChars) /* 313 */
+#endif
+#ifndef Tcl_RestoreResult
+#define Tcl_RestoreResult \
+ (tclStubsPtr->tcl_RestoreResult) /* 314 */
+#endif
+#ifndef Tcl_SaveResult
+#define Tcl_SaveResult \
+ (tclStubsPtr->tcl_SaveResult) /* 315 */
+#endif
+#ifndef Tcl_SetSystemEncoding
+#define Tcl_SetSystemEncoding \
+ (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */
+#endif
+#ifndef Tcl_SetVar2Ex
+#define Tcl_SetVar2Ex \
+ (tclStubsPtr->tcl_SetVar2Ex) /* 317 */
+#endif
+#ifndef Tcl_ThreadAlert
+#define Tcl_ThreadAlert \
+ (tclStubsPtr->tcl_ThreadAlert) /* 318 */
+#endif
+#ifndef Tcl_ThreadQueueEvent
+#define Tcl_ThreadQueueEvent \
+ (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */
+#endif
+#ifndef Tcl_UniCharAtIndex
+#define Tcl_UniCharAtIndex \
+ (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */
+#endif
+#ifndef Tcl_UniCharToLower
+#define Tcl_UniCharToLower \
+ (tclStubsPtr->tcl_UniCharToLower) /* 321 */
+#endif
+#ifndef Tcl_UniCharToTitle
+#define Tcl_UniCharToTitle \
+ (tclStubsPtr->tcl_UniCharToTitle) /* 322 */
+#endif
+#ifndef Tcl_UniCharToUpper
+#define Tcl_UniCharToUpper \
+ (tclStubsPtr->tcl_UniCharToUpper) /* 323 */
+#endif
+#ifndef Tcl_UniCharToUtf
+#define Tcl_UniCharToUtf \
+ (tclStubsPtr->tcl_UniCharToUtf) /* 324 */
+#endif
+#ifndef Tcl_UtfAtIndex
+#define Tcl_UtfAtIndex \
+ (tclStubsPtr->tcl_UtfAtIndex) /* 325 */
+#endif
+#ifndef Tcl_UtfCharComplete
+#define Tcl_UtfCharComplete \
+ (tclStubsPtr->tcl_UtfCharComplete) /* 326 */
+#endif
+#ifndef Tcl_UtfBackslash
+#define Tcl_UtfBackslash \
+ (tclStubsPtr->tcl_UtfBackslash) /* 327 */
+#endif
+#ifndef Tcl_UtfFindFirst
+#define Tcl_UtfFindFirst \
+ (tclStubsPtr->tcl_UtfFindFirst) /* 328 */
+#endif
+#ifndef Tcl_UtfFindLast
+#define Tcl_UtfFindLast \
+ (tclStubsPtr->tcl_UtfFindLast) /* 329 */
+#endif
+#ifndef Tcl_UtfNext
+#define Tcl_UtfNext \
+ (tclStubsPtr->tcl_UtfNext) /* 330 */
+#endif
+#ifndef Tcl_UtfPrev
+#define Tcl_UtfPrev \
+ (tclStubsPtr->tcl_UtfPrev) /* 331 */
+#endif
+#ifndef Tcl_UtfToExternal
+#define Tcl_UtfToExternal \
+ (tclStubsPtr->tcl_UtfToExternal) /* 332 */
+#endif
+#ifndef Tcl_UtfToExternalDString
+#define Tcl_UtfToExternalDString \
+ (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */
+#endif
+#ifndef Tcl_UtfToLower
+#define Tcl_UtfToLower \
+ (tclStubsPtr->tcl_UtfToLower) /* 334 */
+#endif
+#ifndef Tcl_UtfToTitle
+#define Tcl_UtfToTitle \
+ (tclStubsPtr->tcl_UtfToTitle) /* 335 */
+#endif
+#ifndef Tcl_UtfToUniChar
+#define Tcl_UtfToUniChar \
+ (tclStubsPtr->tcl_UtfToUniChar) /* 336 */
+#endif
+#ifndef Tcl_UtfToUpper
+#define Tcl_UtfToUpper \
+ (tclStubsPtr->tcl_UtfToUpper) /* 337 */
+#endif
+#ifndef Tcl_WriteChars
+#define Tcl_WriteChars \
+ (tclStubsPtr->tcl_WriteChars) /* 338 */
+#endif
+#ifndef Tcl_WriteObj
+#define Tcl_WriteObj \
+ (tclStubsPtr->tcl_WriteObj) /* 339 */
+#endif
+#ifndef Tcl_GetString
+#define Tcl_GetString \
+ (tclStubsPtr->tcl_GetString) /* 340 */
+#endif
+#ifndef Tcl_GetDefaultEncodingDir
+#define Tcl_GetDefaultEncodingDir \
+ (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */
+#endif
+#ifndef Tcl_SetDefaultEncodingDir
+#define Tcl_SetDefaultEncodingDir \
+ (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */
+#endif
+#ifndef Tcl_AlertNotifier
+#define Tcl_AlertNotifier \
+ (tclStubsPtr->tcl_AlertNotifier) /* 343 */
+#endif
+#ifndef Tcl_ServiceModeHook
+#define Tcl_ServiceModeHook \
+ (tclStubsPtr->tcl_ServiceModeHook) /* 344 */
+#endif
+#ifndef Tcl_UniCharIsAlnum
+#define Tcl_UniCharIsAlnum \
+ (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */
+#endif
+#ifndef Tcl_UniCharIsAlpha
+#define Tcl_UniCharIsAlpha \
+ (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */
+#endif
+#ifndef Tcl_UniCharIsDigit
+#define Tcl_UniCharIsDigit \
+ (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */
+#endif
+#ifndef Tcl_UniCharIsLower
+#define Tcl_UniCharIsLower \
+ (tclStubsPtr->tcl_UniCharIsLower) /* 348 */
+#endif
+#ifndef Tcl_UniCharIsSpace
+#define Tcl_UniCharIsSpace \
+ (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */
+#endif
+#ifndef Tcl_UniCharIsUpper
+#define Tcl_UniCharIsUpper \
+ (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */
+#endif
+#ifndef Tcl_UniCharIsWordChar
+#define Tcl_UniCharIsWordChar \
+ (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */
+#endif
+#ifndef Tcl_UniCharLen
+#define Tcl_UniCharLen \
+ (tclStubsPtr->tcl_UniCharLen) /* 352 */
+#endif
+#ifndef Tcl_UniCharNcmp
+#define Tcl_UniCharNcmp \
+ (tclStubsPtr->tcl_UniCharNcmp) /* 353 */
+#endif
+#ifndef Tcl_UniCharToUtfDString
+#define Tcl_UniCharToUtfDString \
+ (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */
+#endif
+#ifndef Tcl_UtfToUniCharDString
+#define Tcl_UtfToUniCharDString \
+ (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */
+#endif
+#ifndef Tcl_GetRegExpFromObj
+#define Tcl_GetRegExpFromObj \
+ (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */
+#endif
+#ifndef Tcl_EvalTokens
+#define Tcl_EvalTokens \
+ (tclStubsPtr->tcl_EvalTokens) /* 357 */
+#endif
+#ifndef Tcl_FreeParse
+#define Tcl_FreeParse \
+ (tclStubsPtr->tcl_FreeParse) /* 358 */
+#endif
+#ifndef Tcl_LogCommandInfo
+#define Tcl_LogCommandInfo \
+ (tclStubsPtr->tcl_LogCommandInfo) /* 359 */
+#endif
+#ifndef Tcl_ParseBraces
+#define Tcl_ParseBraces \
+ (tclStubsPtr->tcl_ParseBraces) /* 360 */
+#endif
+#ifndef Tcl_ParseCommand
+#define Tcl_ParseCommand \
+ (tclStubsPtr->tcl_ParseCommand) /* 361 */
+#endif
+#ifndef Tcl_ParseExpr
+#define Tcl_ParseExpr \
+ (tclStubsPtr->tcl_ParseExpr) /* 362 */
+#endif
+#ifndef Tcl_ParseQuotedString
+#define Tcl_ParseQuotedString \
+ (tclStubsPtr->tcl_ParseQuotedString) /* 363 */
+#endif
+#ifndef Tcl_ParseVarName
+#define Tcl_ParseVarName \
+ (tclStubsPtr->tcl_ParseVarName) /* 364 */
+#endif
+#ifndef Tcl_GetCwd
+#define Tcl_GetCwd \
+ (tclStubsPtr->tcl_GetCwd) /* 365 */
+#endif
+#ifndef Tcl_Chdir
+#define Tcl_Chdir \
+ (tclStubsPtr->tcl_Chdir) /* 366 */
+#endif
+#ifndef Tcl_Access
+#define Tcl_Access \
+ (tclStubsPtr->tcl_Access) /* 367 */
+#endif
+#ifndef Tcl_Stat
+#define Tcl_Stat \
+ (tclStubsPtr->tcl_Stat) /* 368 */
+#endif
+#ifndef Tcl_UtfNcmp
+#define Tcl_UtfNcmp \
+ (tclStubsPtr->tcl_UtfNcmp) /* 369 */
+#endif
+#ifndef Tcl_UtfNcasecmp
+#define Tcl_UtfNcasecmp \
+ (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */
+#endif
+#ifndef Tcl_StringCaseMatch
+#define Tcl_StringCaseMatch \
+ (tclStubsPtr->tcl_StringCaseMatch) /* 371 */
+#endif
+#ifndef Tcl_UniCharIsControl
+#define Tcl_UniCharIsControl \
+ (tclStubsPtr->tcl_UniCharIsControl) /* 372 */
+#endif
+#ifndef Tcl_UniCharIsGraph
+#define Tcl_UniCharIsGraph \
+ (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */
+#endif
+#ifndef Tcl_UniCharIsPrint
+#define Tcl_UniCharIsPrint \
+ (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */
+#endif
+#ifndef Tcl_UniCharIsPunct
+#define Tcl_UniCharIsPunct \
+ (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */
+#endif
+#ifndef Tcl_RegExpExecObj
+#define Tcl_RegExpExecObj \
+ (tclStubsPtr->tcl_RegExpExecObj) /* 376 */
+#endif
+#ifndef Tcl_RegExpGetInfo
+#define Tcl_RegExpGetInfo \
+ (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */
+#endif
+#ifndef Tcl_NewUnicodeObj
+#define Tcl_NewUnicodeObj \
+ (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */
+#endif
+#ifndef Tcl_SetUnicodeObj
+#define Tcl_SetUnicodeObj \
+ (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */
+#endif
+#ifndef Tcl_GetCharLength
+#define Tcl_GetCharLength \
+ (tclStubsPtr->tcl_GetCharLength) /* 380 */
+#endif
+#ifndef Tcl_GetUniChar
+#define Tcl_GetUniChar \
+ (tclStubsPtr->tcl_GetUniChar) /* 381 */
+#endif
+#ifndef Tcl_GetUnicode
+#define Tcl_GetUnicode \
+ (tclStubsPtr->tcl_GetUnicode) /* 382 */
+#endif
+#ifndef Tcl_GetRange
+#define Tcl_GetRange \
+ (tclStubsPtr->tcl_GetRange) /* 383 */
+#endif
+#ifndef Tcl_AppendUnicodeToObj
+#define Tcl_AppendUnicodeToObj \
+ (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */
+#endif
+#ifndef Tcl_RegExpMatchObj
+#define Tcl_RegExpMatchObj \
+ (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */
+#endif
+#ifndef Tcl_SetNotifier
+#define Tcl_SetNotifier \
+ (tclStubsPtr->tcl_SetNotifier) /* 386 */
+#endif
+#ifndef Tcl_GetAllocMutex
+#define Tcl_GetAllocMutex \
+ (tclStubsPtr->tcl_GetAllocMutex) /* 387 */
+#endif
+#ifndef Tcl_GetChannelNames
+#define Tcl_GetChannelNames \
+ (tclStubsPtr->tcl_GetChannelNames) /* 388 */
+#endif
+#ifndef Tcl_GetChannelNamesEx
+#define Tcl_GetChannelNamesEx \
+ (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */
+#endif
+#ifndef Tcl_ProcObjCmd
+#define Tcl_ProcObjCmd \
+ (tclStubsPtr->tcl_ProcObjCmd) /* 390 */
+#endif
+#ifndef Tcl_ConditionFinalize
+#define Tcl_ConditionFinalize \
+ (tclStubsPtr->tcl_ConditionFinalize) /* 391 */
+#endif
+#ifndef Tcl_MutexFinalize
+#define Tcl_MutexFinalize \
+ (tclStubsPtr->tcl_MutexFinalize) /* 392 */
+#endif
+#ifndef Tcl_CreateThread
+#define Tcl_CreateThread \
+ (tclStubsPtr->tcl_CreateThread) /* 393 */
+#endif
+#ifndef Tcl_ReadRaw
+#define Tcl_ReadRaw \
+ (tclStubsPtr->tcl_ReadRaw) /* 394 */
+#endif
+#ifndef Tcl_WriteRaw
+#define Tcl_WriteRaw \
+ (tclStubsPtr->tcl_WriteRaw) /* 395 */
+#endif
+#ifndef Tcl_GetTopChannel
+#define Tcl_GetTopChannel \
+ (tclStubsPtr->tcl_GetTopChannel) /* 396 */
+#endif
+#ifndef Tcl_ChannelBuffered
+#define Tcl_ChannelBuffered \
+ (tclStubsPtr->tcl_ChannelBuffered) /* 397 */
+#endif
+#ifndef Tcl_ChannelName
+#define Tcl_ChannelName \
+ (tclStubsPtr->tcl_ChannelName) /* 398 */
+#endif
+#ifndef Tcl_ChannelVersion
+#define Tcl_ChannelVersion \
+ (tclStubsPtr->tcl_ChannelVersion) /* 399 */
+#endif
+#ifndef Tcl_ChannelBlockModeProc
+#define Tcl_ChannelBlockModeProc \
+ (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */
+#endif
+#ifndef Tcl_ChannelCloseProc
+#define Tcl_ChannelCloseProc \
+ (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */
+#endif
+#ifndef Tcl_ChannelClose2Proc
+#define Tcl_ChannelClose2Proc \
+ (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */
+#endif
+#ifndef Tcl_ChannelInputProc
+#define Tcl_ChannelInputProc \
+ (tclStubsPtr->tcl_ChannelInputProc) /* 403 */
+#endif
+#ifndef Tcl_ChannelOutputProc
+#define Tcl_ChannelOutputProc \
+ (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */
+#endif
+#ifndef Tcl_ChannelSeekProc
+#define Tcl_ChannelSeekProc \
+ (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */
+#endif
+#ifndef Tcl_ChannelSetOptionProc
+#define Tcl_ChannelSetOptionProc \
+ (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */
+#endif
+#ifndef Tcl_ChannelGetOptionProc
+#define Tcl_ChannelGetOptionProc \
+ (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */
+#endif
+#ifndef Tcl_ChannelWatchProc
+#define Tcl_ChannelWatchProc \
+ (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */
+#endif
+#ifndef Tcl_ChannelGetHandleProc
+#define Tcl_ChannelGetHandleProc \
+ (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */
+#endif
+#ifndef Tcl_ChannelFlushProc
+#define Tcl_ChannelFlushProc \
+ (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */
+#endif
+#ifndef Tcl_ChannelHandlerProc
+#define Tcl_ChannelHandlerProc \
+ (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */
+#endif
+#ifndef Tcl_JoinThread
+#define Tcl_JoinThread \
+ (tclStubsPtr->tcl_JoinThread) /* 412 */
+#endif
+#ifndef Tcl_IsChannelShared
+#define Tcl_IsChannelShared \
+ (tclStubsPtr->tcl_IsChannelShared) /* 413 */
+#endif
+#ifndef Tcl_IsChannelRegistered
+#define Tcl_IsChannelRegistered \
+ (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */
+#endif
+#ifndef Tcl_CutChannel
+#define Tcl_CutChannel \
+ (tclStubsPtr->tcl_CutChannel) /* 415 */
+#endif
+#ifndef Tcl_SpliceChannel
+#define Tcl_SpliceChannel \
+ (tclStubsPtr->tcl_SpliceChannel) /* 416 */
+#endif
+#ifndef Tcl_ClearChannelHandlers
+#define Tcl_ClearChannelHandlers \
+ (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */
+#endif
+#ifndef Tcl_IsChannelExisting
+#define Tcl_IsChannelExisting \
+ (tclStubsPtr->tcl_IsChannelExisting) /* 418 */
+#endif
+#ifndef Tcl_UniCharNcasecmp
+#define Tcl_UniCharNcasecmp \
+ (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */
+#endif
+#ifndef Tcl_UniCharCaseMatch
+#define Tcl_UniCharCaseMatch \
+ (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */
+#endif
+#ifndef Tcl_FindHashEntry
+#define Tcl_FindHashEntry \
+ (tclStubsPtr->tcl_FindHashEntry) /* 421 */
+#endif
+#ifndef Tcl_CreateHashEntry
+#define Tcl_CreateHashEntry \
+ (tclStubsPtr->tcl_CreateHashEntry) /* 422 */
+#endif
+#ifndef Tcl_InitCustomHashTable
+#define Tcl_InitCustomHashTable \
+ (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */
+#endif
+#ifndef Tcl_InitObjHashTable
+#define Tcl_InitObjHashTable \
+ (tclStubsPtr->tcl_InitObjHashTable) /* 424 */
+#endif
+#ifndef Tcl_CommandTraceInfo
+#define Tcl_CommandTraceInfo \
+ (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */
+#endif
+#ifndef Tcl_TraceCommand
+#define Tcl_TraceCommand \
+ (tclStubsPtr->tcl_TraceCommand) /* 426 */
+#endif
+#ifndef Tcl_UntraceCommand
+#define Tcl_UntraceCommand \
+ (tclStubsPtr->tcl_UntraceCommand) /* 427 */
+#endif
+#ifndef Tcl_AttemptAlloc
+#define Tcl_AttemptAlloc \
+ (tclStubsPtr->tcl_AttemptAlloc) /* 428 */
+#endif
+#ifndef Tcl_AttemptDbCkalloc
+#define Tcl_AttemptDbCkalloc \
+ (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */
+#endif
+#ifndef Tcl_AttemptRealloc
+#define Tcl_AttemptRealloc \
+ (tclStubsPtr->tcl_AttemptRealloc) /* 430 */
+#endif
+#ifndef Tcl_AttemptDbCkrealloc
+#define Tcl_AttemptDbCkrealloc \
+ (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */
+#endif
+#ifndef Tcl_AttemptSetObjLength
+#define Tcl_AttemptSetObjLength \
+ (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */
+#endif
+#ifndef Tcl_GetChannelThread
+#define Tcl_GetChannelThread \
+ (tclStubsPtr->tcl_GetChannelThread) /* 433 */
+#endif
+#ifndef Tcl_GetUnicodeFromObj
+#define Tcl_GetUnicodeFromObj \
+ (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */
+#endif
+#ifndef Tcl_GetMathFuncInfo
+#define Tcl_GetMathFuncInfo \
+ (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */
+#endif
+#ifndef Tcl_ListMathFuncs
+#define Tcl_ListMathFuncs \
+ (tclStubsPtr->tcl_ListMathFuncs) /* 436 */
+#endif
+#ifndef Tcl_SubstObj
+#define Tcl_SubstObj \
+ (tclStubsPtr->tcl_SubstObj) /* 437 */
+#endif
+#ifndef Tcl_DetachChannel
+#define Tcl_DetachChannel \
+ (tclStubsPtr->tcl_DetachChannel) /* 438 */
+#endif
+#ifndef Tcl_IsStandardChannel
+#define Tcl_IsStandardChannel \
+ (tclStubsPtr->tcl_IsStandardChannel) /* 439 */
+#endif
+#ifndef Tcl_FSCopyFile
+#define Tcl_FSCopyFile \
+ (tclStubsPtr->tcl_FSCopyFile) /* 440 */
+#endif
+#ifndef Tcl_FSCopyDirectory
+#define Tcl_FSCopyDirectory \
+ (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */
+#endif
+#ifndef Tcl_FSCreateDirectory
+#define Tcl_FSCreateDirectory \
+ (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */
+#endif
+#ifndef Tcl_FSDeleteFile
+#define Tcl_FSDeleteFile \
+ (tclStubsPtr->tcl_FSDeleteFile) /* 443 */
+#endif
+#ifndef Tcl_FSLoadFile
+#define Tcl_FSLoadFile \
+ (tclStubsPtr->tcl_FSLoadFile) /* 444 */
+#endif
+#ifndef Tcl_FSMatchInDirectory
+#define Tcl_FSMatchInDirectory \
+ (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */
+#endif
+#ifndef Tcl_FSLink
+#define Tcl_FSLink \
+ (tclStubsPtr->tcl_FSLink) /* 446 */
+#endif
+#ifndef Tcl_FSRemoveDirectory
+#define Tcl_FSRemoveDirectory \
+ (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */
+#endif
+#ifndef Tcl_FSRenameFile
+#define Tcl_FSRenameFile \
+ (tclStubsPtr->tcl_FSRenameFile) /* 448 */
+#endif
+#ifndef Tcl_FSLstat
+#define Tcl_FSLstat \
+ (tclStubsPtr->tcl_FSLstat) /* 449 */
+#endif
+#ifndef Tcl_FSUtime
+#define Tcl_FSUtime \
+ (tclStubsPtr->tcl_FSUtime) /* 450 */
+#endif
+#ifndef Tcl_FSFileAttrsGet
+#define Tcl_FSFileAttrsGet \
+ (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */
+#endif
+#ifndef Tcl_FSFileAttrsSet
+#define Tcl_FSFileAttrsSet \
+ (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */
+#endif
+#ifndef Tcl_FSFileAttrStrings
+#define Tcl_FSFileAttrStrings \
+ (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */
+#endif
+#ifndef Tcl_FSStat
+#define Tcl_FSStat \
+ (tclStubsPtr->tcl_FSStat) /* 454 */
+#endif
+#ifndef Tcl_FSAccess
+#define Tcl_FSAccess \
+ (tclStubsPtr->tcl_FSAccess) /* 455 */
+#endif
+#ifndef Tcl_FSOpenFileChannel
+#define Tcl_FSOpenFileChannel \
+ (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */
+#endif
+#ifndef Tcl_FSGetCwd
+#define Tcl_FSGetCwd \
+ (tclStubsPtr->tcl_FSGetCwd) /* 457 */
+#endif
+#ifndef Tcl_FSChdir
+#define Tcl_FSChdir \
+ (tclStubsPtr->tcl_FSChdir) /* 458 */
+#endif
+#ifndef Tcl_FSConvertToPathType
+#define Tcl_FSConvertToPathType \
+ (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */
+#endif
+#ifndef Tcl_FSJoinPath
+#define Tcl_FSJoinPath \
+ (tclStubsPtr->tcl_FSJoinPath) /* 460 */
+#endif
+#ifndef Tcl_FSSplitPath
+#define Tcl_FSSplitPath \
+ (tclStubsPtr->tcl_FSSplitPath) /* 461 */
+#endif
+#ifndef Tcl_FSEqualPaths
+#define Tcl_FSEqualPaths \
+ (tclStubsPtr->tcl_FSEqualPaths) /* 462 */
+#endif
+#ifndef Tcl_FSGetNormalizedPath
+#define Tcl_FSGetNormalizedPath \
+ (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */
+#endif
+#ifndef Tcl_FSJoinToPath
+#define Tcl_FSJoinToPath \
+ (tclStubsPtr->tcl_FSJoinToPath) /* 464 */
+#endif
+#ifndef Tcl_FSGetInternalRep
+#define Tcl_FSGetInternalRep \
+ (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */
+#endif
+#ifndef Tcl_FSGetTranslatedPath
+#define Tcl_FSGetTranslatedPath \
+ (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */
+#endif
+#ifndef Tcl_FSEvalFile
+#define Tcl_FSEvalFile \
+ (tclStubsPtr->tcl_FSEvalFile) /* 467 */
+#endif
+#ifndef Tcl_FSNewNativePath
+#define Tcl_FSNewNativePath \
+ (tclStubsPtr->tcl_FSNewNativePath) /* 468 */
+#endif
+#ifndef Tcl_FSGetNativePath
+#define Tcl_FSGetNativePath \
+ (tclStubsPtr->tcl_FSGetNativePath) /* 469 */
+#endif
+#ifndef Tcl_FSFileSystemInfo
+#define Tcl_FSFileSystemInfo \
+ (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */
+#endif
+#ifndef Tcl_FSPathSeparator
+#define Tcl_FSPathSeparator \
+ (tclStubsPtr->tcl_FSPathSeparator) /* 471 */
+#endif
+#ifndef Tcl_FSListVolumes
+#define Tcl_FSListVolumes \
+ (tclStubsPtr->tcl_FSListVolumes) /* 472 */
+#endif
+#ifndef Tcl_FSRegister
+#define Tcl_FSRegister \
+ (tclStubsPtr->tcl_FSRegister) /* 473 */
+#endif
+#ifndef Tcl_FSUnregister
+#define Tcl_FSUnregister \
+ (tclStubsPtr->tcl_FSUnregister) /* 474 */
+#endif
+#ifndef Tcl_FSData
+#define Tcl_FSData \
+ (tclStubsPtr->tcl_FSData) /* 475 */
+#endif
+#ifndef Tcl_FSGetTranslatedStringPath
+#define Tcl_FSGetTranslatedStringPath \
+ (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */
+#endif
+#ifndef Tcl_FSGetFileSystemForPath
+#define Tcl_FSGetFileSystemForPath \
+ (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */
+#endif
+#ifndef Tcl_FSGetPathType
+#define Tcl_FSGetPathType \
+ (tclStubsPtr->tcl_FSGetPathType) /* 478 */
+#endif
+#ifndef Tcl_OutputBuffered
+#define Tcl_OutputBuffered \
+ (tclStubsPtr->tcl_OutputBuffered) /* 479 */
+#endif
+#ifndef Tcl_FSMountsChanged
+#define Tcl_FSMountsChanged \
+ (tclStubsPtr->tcl_FSMountsChanged) /* 480 */
+#endif
+#ifndef Tcl_EvalTokensStandard
+#define Tcl_EvalTokensStandard \
+ (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */
+#endif
+#ifndef Tcl_GetTime
+#define Tcl_GetTime \
+ (tclStubsPtr->tcl_GetTime) /* 482 */
+#endif
+#ifndef Tcl_CreateObjTrace
+#define Tcl_CreateObjTrace \
+ (tclStubsPtr->tcl_CreateObjTrace) /* 483 */
+#endif
+#ifndef Tcl_GetCommandInfoFromToken
+#define Tcl_GetCommandInfoFromToken \
+ (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */
+#endif
+#ifndef Tcl_SetCommandInfoFromToken
+#define Tcl_SetCommandInfoFromToken \
+ (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */
+#endif
+#ifndef Tcl_DbNewWideIntObj
+#define Tcl_DbNewWideIntObj \
+ (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */
+#endif
+#ifndef Tcl_GetWideIntFromObj
+#define Tcl_GetWideIntFromObj \
+ (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */
+#endif
+#ifndef Tcl_NewWideIntObj
+#define Tcl_NewWideIntObj \
+ (tclStubsPtr->tcl_NewWideIntObj) /* 488 */
+#endif
+#ifndef Tcl_SetWideIntObj
+#define Tcl_SetWideIntObj \
+ (tclStubsPtr->tcl_SetWideIntObj) /* 489 */
+#endif
+#ifndef Tcl_AllocStatBuf
+#define Tcl_AllocStatBuf \
+ (tclStubsPtr->tcl_AllocStatBuf) /* 490 */
+#endif
+#ifndef Tcl_Seek
+#define Tcl_Seek \
+ (tclStubsPtr->tcl_Seek) /* 491 */
+#endif
+#ifndef Tcl_Tell
+#define Tcl_Tell \
+ (tclStubsPtr->tcl_Tell) /* 492 */
+#endif
+#ifndef Tcl_ChannelWideSeekProc
+#define Tcl_ChannelWideSeekProc \
+ (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */
+#endif
+
+#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#endif /* _TCLDECLS */
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.m
new file mode 100644
index 00000000000..bc3a0953890
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.m
@@ -0,0 +1,538 @@
+#ifndef _TCLDECLS_VM
+#define _TCLDECLS_VM
+#include "tclDecls_f.h"
+#ifndef NO_VTABLES
+#ifndef Tcl_AddErrorInfo
+# define Tcl_AddErrorInfo (*TcldeclsVptr->V_Tcl_AddErrorInfo)
+#endif
+
+#ifndef Tcl_AllowExceptions
+# define Tcl_AllowExceptions (*TcldeclsVptr->V_Tcl_AllowExceptions)
+#endif
+
+#ifndef Tcl_AppendElement
+# define Tcl_AppendElement (*TcldeclsVptr->V_Tcl_AppendElement)
+#endif
+
+#ifndef Tcl_AppendObjToObj
+# define Tcl_AppendObjToObj (*TcldeclsVptr->V_Tcl_AppendObjToObj)
+#endif
+
+#ifndef Tcl_AppendResult
+# define Tcl_AppendResult (*TcldeclsVptr->V_Tcl_AppendResult)
+#endif
+
+#ifndef Tcl_AppendStringsToObj
+# define Tcl_AppendStringsToObj (*TcldeclsVptr->V_Tcl_AppendStringsToObj)
+#endif
+
+#ifndef Tcl_AppendToObj
+# define Tcl_AppendToObj (*TcldeclsVptr->V_Tcl_AppendToObj)
+#endif
+
+#ifndef Tcl_BackgroundError
+# define Tcl_BackgroundError (*TcldeclsVptr->V_Tcl_BackgroundError)
+#endif
+
+#ifndef Tcl_CallWhenDeleted
+# define Tcl_CallWhenDeleted (*TcldeclsVptr->V_Tcl_CallWhenDeleted)
+#endif
+
+#ifndef Tcl_CancelIdleCall
+# define Tcl_CancelIdleCall (*TcldeclsVptr->V_Tcl_CancelIdleCall)
+#endif
+
+#ifndef Tcl_Close
+# define Tcl_Close (*TcldeclsVptr->V_Tcl_Close)
+#endif
+
+#ifndef Tcl_ConcatObj
+# define Tcl_ConcatObj (*TcldeclsVptr->V_Tcl_ConcatObj)
+#endif
+
+#ifndef Tcl_CreateEventSource
+# define Tcl_CreateEventSource (*TcldeclsVptr->V_Tcl_CreateEventSource)
+#endif
+
+#ifndef Tcl_CreateExitHandler
+# define Tcl_CreateExitHandler (*TcldeclsVptr->V_Tcl_CreateExitHandler)
+#endif
+
+#ifndef Tcl_CreateFileHandler
+# define Tcl_CreateFileHandler (*TcldeclsVptr->V_Tcl_CreateFileHandler)
+#endif
+
+#ifndef Tcl_CreateInterp
+# define Tcl_CreateInterp (*TcldeclsVptr->V_Tcl_CreateInterp)
+#endif
+
+#ifndef Tcl_CreateObjCommand
+# define Tcl_CreateObjCommand (*TcldeclsVptr->V_Tcl_CreateObjCommand)
+#endif
+
+#ifndef Tcl_CreateTimerHandler
+# define Tcl_CreateTimerHandler (*TcldeclsVptr->V_Tcl_CreateTimerHandler)
+#endif
+
+#ifndef Tcl_DStringAppend
+# define Tcl_DStringAppend (*TcldeclsVptr->V_Tcl_DStringAppend)
+#endif
+
+#ifndef Tcl_DStringAppendElement
+# define Tcl_DStringAppendElement (*TcldeclsVptr->V_Tcl_DStringAppendElement)
+#endif
+
+#ifndef Tcl_DStringFree
+# define Tcl_DStringFree (*TcldeclsVptr->V_Tcl_DStringFree)
+#endif
+
+#ifndef Tcl_DStringInit
+# define Tcl_DStringInit (*TcldeclsVptr->V_Tcl_DStringInit)
+#endif
+
+#ifndef Tcl_DStringResult
+# define Tcl_DStringResult (*TcldeclsVptr->V_Tcl_DStringResult)
+#endif
+
+#ifndef Tcl_DStringSetLength
+# define Tcl_DStringSetLength (*TcldeclsVptr->V_Tcl_DStringSetLength)
+#endif
+
+#ifndef Tcl_DeleteEventSource
+# define Tcl_DeleteEventSource (*TcldeclsVptr->V_Tcl_DeleteEventSource)
+#endif
+
+#ifndef Tcl_DeleteFileHandler
+# define Tcl_DeleteFileHandler (*TcldeclsVptr->V_Tcl_DeleteFileHandler)
+#endif
+
+#ifndef Tcl_DeleteHashEntry
+# define Tcl_DeleteHashEntry (*TcldeclsVptr->V_Tcl_DeleteHashEntry)
+#endif
+
+#ifndef Tcl_DeleteHashTable
+# define Tcl_DeleteHashTable (*TcldeclsVptr->V_Tcl_DeleteHashTable)
+#endif
+
+#ifndef Tcl_DeleteInterp
+# define Tcl_DeleteInterp (*TcldeclsVptr->V_Tcl_DeleteInterp)
+#endif
+
+#ifndef Tcl_DeleteTimerHandler
+# define Tcl_DeleteTimerHandler (*TcldeclsVptr->V_Tcl_DeleteTimerHandler)
+#endif
+
+#ifndef Tcl_DoOneEvent
+# define Tcl_DoOneEvent (*TcldeclsVptr->V_Tcl_DoOneEvent)
+#endif
+
+#ifndef Tcl_DoWhenIdle
+# define Tcl_DoWhenIdle (*TcldeclsVptr->V_Tcl_DoWhenIdle)
+#endif
+
+#ifndef Tcl_DuplicateObj
+# define Tcl_DuplicateObj (*TcldeclsVptr->V_Tcl_DuplicateObj)
+#endif
+
+#ifndef Tcl_Eof
+# define Tcl_Eof (*TcldeclsVptr->V_Tcl_Eof)
+#endif
+
+#ifndef Tcl_EvalObjEx
+# define Tcl_EvalObjEx (*TcldeclsVptr->V_Tcl_EvalObjEx)
+#endif
+
+#ifndef Tcl_EvalObjv
+# define Tcl_EvalObjv (*TcldeclsVptr->V_Tcl_EvalObjv)
+#endif
+
+#ifndef Tcl_EventuallyFree
+# define Tcl_EventuallyFree (*TcldeclsVptr->V_Tcl_EventuallyFree)
+#endif
+
+#ifndef Tcl_ExternalToUtf
+# define Tcl_ExternalToUtf (*TcldeclsVptr->V_Tcl_ExternalToUtf)
+#endif
+
+#ifndef Tcl_ExternalToUtfDString
+# define Tcl_ExternalToUtfDString (*TcldeclsVptr->V_Tcl_ExternalToUtfDString)
+#endif
+
+#ifndef Tcl_FirstHashEntry
+# define Tcl_FirstHashEntry (*TcldeclsVptr->V_Tcl_FirstHashEntry)
+#endif
+
+#ifndef Tcl_FreeEncoding
+# define Tcl_FreeEncoding (*TcldeclsVptr->V_Tcl_FreeEncoding)
+#endif
+
+#ifndef Tcl_GetAssocData
+# define Tcl_GetAssocData (*TcldeclsVptr->V_Tcl_GetAssocData)
+#endif
+
+#ifndef Tcl_GetBooleanFromObj
+# define Tcl_GetBooleanFromObj (*TcldeclsVptr->V_Tcl_GetBooleanFromObj)
+#endif
+
+#ifndef Tcl_GetChannel
+# define Tcl_GetChannel (*TcldeclsVptr->V_Tcl_GetChannel)
+#endif
+
+#ifndef Tcl_GetCommandInfo
+# define Tcl_GetCommandInfo (*TcldeclsVptr->V_Tcl_GetCommandInfo)
+#endif
+
+#ifndef Tcl_GetDouble
+# define Tcl_GetDouble (*TcldeclsVptr->V_Tcl_GetDouble)
+#endif
+
+#ifndef Tcl_GetDoubleFromObj
+# define Tcl_GetDoubleFromObj (*TcldeclsVptr->V_Tcl_GetDoubleFromObj)
+#endif
+
+#ifndef Tcl_GetEncoding
+# define Tcl_GetEncoding (*TcldeclsVptr->V_Tcl_GetEncoding)
+#endif
+
+#ifndef Tcl_GetEncodingName
+# define Tcl_GetEncodingName (*TcldeclsVptr->V_Tcl_GetEncodingName)
+#endif
+
+#ifndef Tcl_GetIndexFromObj
+# define Tcl_GetIndexFromObj (*TcldeclsVptr->V_Tcl_GetIndexFromObj)
+#endif
+
+#ifndef Tcl_GetInt
+# define Tcl_GetInt (*TcldeclsVptr->V_Tcl_GetInt)
+#endif
+
+#ifndef Tcl_GetIntFromObj
+# define Tcl_GetIntFromObj (*TcldeclsVptr->V_Tcl_GetIntFromObj)
+#endif
+
+#ifndef Tcl_GetLongFromObj
+# define Tcl_GetLongFromObj (*TcldeclsVptr->V_Tcl_GetLongFromObj)
+#endif
+
+#ifndef Tcl_GetObjResult
+# define Tcl_GetObjResult (*TcldeclsVptr->V_Tcl_GetObjResult)
+#endif
+
+#ifndef Tcl_GetObjType
+# define Tcl_GetObjType (*TcldeclsVptr->V_Tcl_GetObjType)
+#endif
+
+#ifndef Tcl_GetRegExpFromObj
+# define Tcl_GetRegExpFromObj (*TcldeclsVptr->V_Tcl_GetRegExpFromObj)
+#endif
+
+#ifndef Tcl_GetStdChannel
+# define Tcl_GetStdChannel (*TcldeclsVptr->V_Tcl_GetStdChannel)
+#endif
+
+#ifndef Tcl_GetString
+# define Tcl_GetString (*TcldeclsVptr->V_Tcl_GetString)
+#endif
+
+#ifndef Tcl_GetStringFromObj
+# define Tcl_GetStringFromObj (*TcldeclsVptr->V_Tcl_GetStringFromObj)
+#endif
+
+#ifndef Tcl_GetStringResult
+# define Tcl_GetStringResult (*TcldeclsVptr->V_Tcl_GetStringResult)
+#endif
+
+#ifndef Tcl_GetThreadData
+# define Tcl_GetThreadData (*TcldeclsVptr->V_Tcl_GetThreadData)
+#endif
+
+#ifndef Tcl_GetTime
+# define Tcl_GetTime (*TcldeclsVptr->V_Tcl_GetTime)
+#endif
+
+#ifndef Tcl_GetVar
+# define Tcl_GetVar (*TcldeclsVptr->V_Tcl_GetVar)
+#endif
+
+#ifndef Tcl_GetVar2
+# define Tcl_GetVar2 (*TcldeclsVptr->V_Tcl_GetVar2)
+#endif
+
+#ifndef Tcl_GetVar2Ex
+# define Tcl_GetVar2Ex (*TcldeclsVptr->V_Tcl_GetVar2Ex)
+#endif
+
+#ifndef Tcl_GlobalEval
+# define Tcl_GlobalEval (*TcldeclsVptr->V_Tcl_GlobalEval)
+#endif
+
+#ifndef Tcl_HideCommand
+# define Tcl_HideCommand (*TcldeclsVptr->V_Tcl_HideCommand)
+#endif
+
+#ifndef Tcl_InitHashTable
+# define Tcl_InitHashTable (*TcldeclsVptr->V_Tcl_InitHashTable)
+#endif
+
+#ifndef Tcl_IsSafe
+# define Tcl_IsSafe (*TcldeclsVptr->V_Tcl_IsSafe)
+#endif
+
+#ifndef Tcl_LinkVar
+# define Tcl_LinkVar (*TcldeclsVptr->V_Tcl_LinkVar)
+#endif
+
+#ifndef Tcl_ListObjAppendElement
+# define Tcl_ListObjAppendElement (*TcldeclsVptr->V_Tcl_ListObjAppendElement)
+#endif
+
+#ifndef Tcl_ListObjGetElements
+# define Tcl_ListObjGetElements (*TcldeclsVptr->V_Tcl_ListObjGetElements)
+#endif
+
+#ifndef Tcl_ListObjIndex
+# define Tcl_ListObjIndex (*TcldeclsVptr->V_Tcl_ListObjIndex)
+#endif
+
+#ifndef Tcl_ListObjLength
+# define Tcl_ListObjLength (*TcldeclsVptr->V_Tcl_ListObjLength)
+#endif
+
+#ifndef Tcl_ListObjReplace
+# define Tcl_ListObjReplace (*TcldeclsVptr->V_Tcl_ListObjReplace)
+#endif
+
+#ifndef Tcl_NewBooleanObj
+# define Tcl_NewBooleanObj (*TcldeclsVptr->V_Tcl_NewBooleanObj)
+#endif
+
+#ifndef Tcl_NewDoubleObj
+# define Tcl_NewDoubleObj (*TcldeclsVptr->V_Tcl_NewDoubleObj)
+#endif
+
+#ifndef Tcl_NewIntObj
+# define Tcl_NewIntObj (*TcldeclsVptr->V_Tcl_NewIntObj)
+#endif
+
+#ifndef Tcl_NewListObj
+# define Tcl_NewListObj (*TcldeclsVptr->V_Tcl_NewListObj)
+#endif
+
+#ifndef Tcl_NewLongObj
+# define Tcl_NewLongObj (*TcldeclsVptr->V_Tcl_NewLongObj)
+#endif
+
+#ifndef Tcl_NewObj
+# define Tcl_NewObj (*TcldeclsVptr->V_Tcl_NewObj)
+#endif
+
+#ifndef Tcl_NewStringObj
+# define Tcl_NewStringObj (*TcldeclsVptr->V_Tcl_NewStringObj)
+#endif
+
+#ifndef Tcl_NextHashEntry
+# define Tcl_NextHashEntry (*TcldeclsVptr->V_Tcl_NextHashEntry)
+#endif
+
+#ifndef Tcl_NumUtfChars
+# define Tcl_NumUtfChars (*TcldeclsVptr->V_Tcl_NumUtfChars)
+#endif
+
+#ifndef Tcl_ObjGetVar2
+# define Tcl_ObjGetVar2 (*TcldeclsVptr->V_Tcl_ObjGetVar2)
+#endif
+
+#ifndef Tcl_ObjSetVar2
+# define Tcl_ObjSetVar2 (*TcldeclsVptr->V_Tcl_ObjSetVar2)
+#endif
+
+#ifndef Tcl_OpenFileChannel
+# define Tcl_OpenFileChannel (*TcldeclsVptr->V_Tcl_OpenFileChannel)
+#endif
+
+#ifndef Tcl_Panic
+# define Tcl_Panic (*TcldeclsVptr->V_Tcl_Panic)
+#endif
+
+#ifndef Tcl_PosixError
+# define Tcl_PosixError (*TcldeclsVptr->V_Tcl_PosixError)
+#endif
+
+#ifndef Tcl_Preserve
+# define Tcl_Preserve (*TcldeclsVptr->V_Tcl_Preserve)
+#endif
+
+#ifndef Tcl_Read
+# define Tcl_Read (*TcldeclsVptr->V_Tcl_Read)
+#endif
+
+#ifndef Tcl_RegExpExec
+# define Tcl_RegExpExec (*TcldeclsVptr->V_Tcl_RegExpExec)
+#endif
+
+#ifndef Tcl_RegExpRange
+# define Tcl_RegExpRange (*TcldeclsVptr->V_Tcl_RegExpRange)
+#endif
+
+#ifndef Tcl_Release
+# define Tcl_Release (*TcldeclsVptr->V_Tcl_Release)
+#endif
+
+#ifndef Tcl_ResetResult
+# define Tcl_ResetResult (*TcldeclsVptr->V_Tcl_ResetResult)
+#endif
+
+#ifndef Tcl_Seek
+# define Tcl_Seek (*TcldeclsVptr->V_Tcl_Seek)
+#endif
+
+#ifndef Tcl_ServiceEvent
+# define Tcl_ServiceEvent (*TcldeclsVptr->V_Tcl_ServiceEvent)
+#endif
+
+#ifndef Tcl_SetAssocData
+# define Tcl_SetAssocData (*TcldeclsVptr->V_Tcl_SetAssocData)
+#endif
+
+#ifndef Tcl_SetBooleanObj
+# define Tcl_SetBooleanObj (*TcldeclsVptr->V_Tcl_SetBooleanObj)
+#endif
+
+#ifndef Tcl_SetChannelOption
+# define Tcl_SetChannelOption (*TcldeclsVptr->V_Tcl_SetChannelOption)
+#endif
+
+#ifndef Tcl_SetCommandInfo
+# define Tcl_SetCommandInfo (*TcldeclsVptr->V_Tcl_SetCommandInfo)
+#endif
+
+#ifndef Tcl_SetDoubleObj
+# define Tcl_SetDoubleObj (*TcldeclsVptr->V_Tcl_SetDoubleObj)
+#endif
+
+#ifndef Tcl_SetIntObj
+# define Tcl_SetIntObj (*TcldeclsVptr->V_Tcl_SetIntObj)
+#endif
+
+#ifndef Tcl_SetListObj
+# define Tcl_SetListObj (*TcldeclsVptr->V_Tcl_SetListObj)
+#endif
+
+#ifndef Tcl_SetLongObj
+# define Tcl_SetLongObj (*TcldeclsVptr->V_Tcl_SetLongObj)
+#endif
+
+#ifndef Tcl_SetMaxBlockTime
+# define Tcl_SetMaxBlockTime (*TcldeclsVptr->V_Tcl_SetMaxBlockTime)
+#endif
+
+#ifndef Tcl_SetObjErrorCode
+# define Tcl_SetObjErrorCode (*TcldeclsVptr->V_Tcl_SetObjErrorCode)
+#endif
+
+#ifndef Tcl_SetObjResult
+# define Tcl_SetObjResult (*TcldeclsVptr->V_Tcl_SetObjResult)
+#endif
+
+#ifndef Tcl_SetResult
+# define Tcl_SetResult (*TcldeclsVptr->V_Tcl_SetResult)
+#endif
+
+#ifndef Tcl_SetStringObj
+# define Tcl_SetStringObj (*TcldeclsVptr->V_Tcl_SetStringObj)
+#endif
+
+#ifndef Tcl_SetVar
+# define Tcl_SetVar (*TcldeclsVptr->V_Tcl_SetVar)
+#endif
+
+#ifndef Tcl_Sleep
+# define Tcl_Sleep (*TcldeclsVptr->V_Tcl_Sleep)
+#endif
+
+#ifndef Tcl_StringMatch
+# define Tcl_StringMatch (*TcldeclsVptr->V_Tcl_StringMatch)
+#endif
+
+#ifndef Tcl_TranslateFileName
+# define Tcl_TranslateFileName (*TcldeclsVptr->V_Tcl_TranslateFileName)
+#endif
+
+#ifndef Tcl_UniCharIsAlpha
+# define Tcl_UniCharIsAlpha (*TcldeclsVptr->V_Tcl_UniCharIsAlpha)
+#endif
+
+#ifndef Tcl_UniCharIsSpace
+# define Tcl_UniCharIsSpace (*TcldeclsVptr->V_Tcl_UniCharIsSpace)
+#endif
+
+#ifndef Tcl_UniCharIsUpper
+# define Tcl_UniCharIsUpper (*TcldeclsVptr->V_Tcl_UniCharIsUpper)
+#endif
+
+#ifndef Tcl_UniCharIsWordChar
+# define Tcl_UniCharIsWordChar (*TcldeclsVptr->V_Tcl_UniCharIsWordChar)
+#endif
+
+#ifndef Tcl_UniCharToLower
+# define Tcl_UniCharToLower (*TcldeclsVptr->V_Tcl_UniCharToLower)
+#endif
+
+#ifndef Tcl_UniCharToUpper
+# define Tcl_UniCharToUpper (*TcldeclsVptr->V_Tcl_UniCharToUpper)
+#endif
+
+#ifndef Tcl_UniCharToUtf
+# define Tcl_UniCharToUtf (*TcldeclsVptr->V_Tcl_UniCharToUtf)
+#endif
+
+#ifndef Tcl_UnlinkVar
+# define Tcl_UnlinkVar (*TcldeclsVptr->V_Tcl_UnlinkVar)
+#endif
+
+#ifndef Tcl_UtfAtIndex
+# define Tcl_UtfAtIndex (*TcldeclsVptr->V_Tcl_UtfAtIndex)
+#endif
+
+#ifndef Tcl_UtfCharComplete
+# define Tcl_UtfCharComplete (*TcldeclsVptr->V_Tcl_UtfCharComplete)
+#endif
+
+#ifndef Tcl_UtfNext
+# define Tcl_UtfNext (*TcldeclsVptr->V_Tcl_UtfNext)
+#endif
+
+#ifndef Tcl_UtfPrev
+# define Tcl_UtfPrev (*TcldeclsVptr->V_Tcl_UtfPrev)
+#endif
+
+#ifndef Tcl_UtfToExternal
+# define Tcl_UtfToExternal (*TcldeclsVptr->V_Tcl_UtfToExternal)
+#endif
+
+#ifndef Tcl_UtfToExternalDString
+# define Tcl_UtfToExternalDString (*TcldeclsVptr->V_Tcl_UtfToExternalDString)
+#endif
+
+#ifndef Tcl_UtfToLower
+# define Tcl_UtfToLower (*TcldeclsVptr->V_Tcl_UtfToLower)
+#endif
+
+#ifndef Tcl_UtfToUniChar
+# define Tcl_UtfToUniChar (*TcldeclsVptr->V_Tcl_UtfToUniChar)
+#endif
+
+#ifndef Tcl_Write
+# define Tcl_Write (*TcldeclsVptr->V_Tcl_Write)
+#endif
+
+#ifndef Tcl_WriteChars
+# define Tcl_WriteChars (*TcldeclsVptr->V_Tcl_WriteChars)
+#endif
+
+#ifndef Tcl_WrongNumArgs
+# define Tcl_WrongNumArgs (*TcldeclsVptr->V_Tcl_WrongNumArgs)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TCLDECLS_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.t
new file mode 100644
index 00000000000..e54ecbb64ed
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls.t
@@ -0,0 +1,675 @@
+#ifdef _TCLDECLS
+#ifndef Tcl_AddErrorInfo
+VFUNC(void,Tcl_AddErrorInfo,V_Tcl_AddErrorInfo,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * message)))
+#endif /* #ifndef Tcl_AddErrorInfo */
+
+#ifndef Tcl_AllowExceptions
+VFUNC(void,Tcl_AllowExceptions,V_Tcl_AllowExceptions,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_AllowExceptions */
+
+#ifndef Tcl_AppendElement
+VFUNC(void,Tcl_AppendElement,V_Tcl_AppendElement,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * string)))
+#endif /* #ifndef Tcl_AppendElement */
+
+#ifndef Tcl_AppendObjToObj
+VFUNC(void,Tcl_AppendObjToObj,V_Tcl_AppendObjToObj,_ANSI_ARGS_((Tcl_Obj * objPtr,
+ Tcl_Obj * appendObjPtr)))
+#endif /* #ifndef Tcl_AppendObjToObj */
+
+#ifndef Tcl_AppendResult
+VFUNC(void,Tcl_AppendResult,V_Tcl_AppendResult,_ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp)))
+#endif /* #ifndef Tcl_AppendResult */
+
+#ifndef Tcl_AppendStringsToObj
+VFUNC(void,Tcl_AppendStringsToObj,V_Tcl_AppendStringsToObj,_ANSI_ARGS_(TCL_VARARGS(Tcl_Obj *,objPtr)))
+#endif /* #ifndef Tcl_AppendStringsToObj */
+
+#ifndef Tcl_AppendToObj
+VFUNC(void,Tcl_AppendToObj,V_Tcl_AppendToObj,_ANSI_ARGS_((Tcl_Obj* objPtr,
+ CONST char* bytes, int length)))
+#endif /* #ifndef Tcl_AppendToObj */
+
+#ifndef Tcl_BackgroundError
+VFUNC(void,Tcl_BackgroundError,V_Tcl_BackgroundError,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_BackgroundError */
+
+#ifndef Tcl_CallWhenDeleted
+VFUNC(void,Tcl_CallWhenDeleted,V_Tcl_CallWhenDeleted,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_InterpDeleteProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_CallWhenDeleted */
+
+#ifndef Tcl_CancelIdleCall
+VFUNC(void,Tcl_CancelIdleCall,V_Tcl_CancelIdleCall,_ANSI_ARGS_((
+ Tcl_IdleProc * idleProc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_CancelIdleCall */
+
+#ifndef Tcl_Close
+VFUNC(int,Tcl_Close,V_Tcl_Close,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel chan)))
+#endif /* #ifndef Tcl_Close */
+
+#ifndef Tcl_ConcatObj
+VFUNC(Tcl_Obj *,Tcl_ConcatObj,V_Tcl_ConcatObj,_ANSI_ARGS_((int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tcl_ConcatObj */
+
+#ifndef Tcl_CreateEventSource
+VFUNC(void,Tcl_CreateEventSource,V_Tcl_CreateEventSource,_ANSI_ARGS_((
+ Tcl_EventSetupProc * setupProc,
+ Tcl_EventCheckProc * checkProc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_CreateEventSource */
+
+#ifndef Tcl_CreateExitHandler
+VFUNC(void,Tcl_CreateExitHandler,V_Tcl_CreateExitHandler,_ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData)))
+#endif /* #ifndef Tcl_CreateExitHandler */
+
+#ifndef Tcl_CreateFileHandler
+#if !defined(__WIN32__) && !defined(MAC_TCL)
+VFUNC(void,Tcl_CreateFileHandler,V_Tcl_CreateFileHandler,_ANSI_ARGS_((int fd, int mask,
+ Tcl_FileProc * proc, ClientData clientData)))
+#endif /* #if !defined(__WIN32__) && !defined(MAC_TCL) */
+#endif /* #ifndef Tcl_CreateFileHandler */
+
+#ifndef Tcl_CreateInterp
+VFUNC(Tcl_Interp *,Tcl_CreateInterp,V_Tcl_CreateInterp,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_CreateInterp */
+
+#ifndef Tcl_CreateObjCommand
+VFUNC(Tcl_Command,Tcl_CreateObjCommand,V_Tcl_CreateObjCommand,_ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * cmdName,
+ Tcl_ObjCmdProc * proc, ClientData clientData,
+ Tcl_CmdDeleteProc * deleteProc)))
+#endif /* #ifndef Tcl_CreateObjCommand */
+
+#ifndef Tcl_CreateTimerHandler
+VFUNC(Tcl_TimerToken,Tcl_CreateTimerHandler,V_Tcl_CreateTimerHandler,_ANSI_ARGS_((int milliseconds,
+ Tcl_TimerProc * proc, ClientData clientData)))
+#endif /* #ifndef Tcl_CreateTimerHandler */
+
+#ifndef Tcl_DStringAppend
+VFUNC(char *,Tcl_DStringAppend,V_Tcl_DStringAppend,_ANSI_ARGS_((Tcl_DString * dsPtr,
+ CONST char * str, int length)))
+#endif /* #ifndef Tcl_DStringAppend */
+
+#ifndef Tcl_DStringAppendElement
+VFUNC(char *,Tcl_DStringAppendElement,V_Tcl_DStringAppendElement,_ANSI_ARGS_((
+ Tcl_DString * dsPtr, CONST char * string)))
+#endif /* #ifndef Tcl_DStringAppendElement */
+
+#ifndef Tcl_DStringFree
+VFUNC(void,Tcl_DStringFree,V_Tcl_DStringFree,_ANSI_ARGS_((Tcl_DString * dsPtr)))
+#endif /* #ifndef Tcl_DStringFree */
+
+#ifndef Tcl_DStringInit
+VFUNC(void,Tcl_DStringInit,V_Tcl_DStringInit,_ANSI_ARGS_((Tcl_DString * dsPtr)))
+#endif /* #ifndef Tcl_DStringInit */
+
+#ifndef Tcl_DStringResult
+VFUNC(void,Tcl_DStringResult,V_Tcl_DStringResult,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_DString * dsPtr)))
+#endif /* #ifndef Tcl_DStringResult */
+
+#ifndef Tcl_DStringSetLength
+VFUNC(void,Tcl_DStringSetLength,V_Tcl_DStringSetLength,_ANSI_ARGS_((
+ Tcl_DString * dsPtr, int length)))
+#endif /* #ifndef Tcl_DStringSetLength */
+
+#ifndef Tcl_DeleteEventSource
+VFUNC(void,Tcl_DeleteEventSource,V_Tcl_DeleteEventSource,_ANSI_ARGS_((
+ Tcl_EventSetupProc * setupProc,
+ Tcl_EventCheckProc * checkProc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_DeleteEventSource */
+
+#ifndef Tcl_DeleteFileHandler
+#if !defined(__WIN32__) && !defined(MAC_TCL)
+VFUNC(void,Tcl_DeleteFileHandler,V_Tcl_DeleteFileHandler,_ANSI_ARGS_((int fd)))
+#endif /* #if !defined(__WIN32__) && !defined(MAC_TCL) */
+#endif /* #ifndef Tcl_DeleteFileHandler */
+
+#ifndef Tcl_DeleteHashEntry
+VFUNC(void,Tcl_DeleteHashEntry,V_Tcl_DeleteHashEntry,_ANSI_ARGS_((
+ Tcl_HashEntry * entryPtr)))
+#endif /* #ifndef Tcl_DeleteHashEntry */
+
+#ifndef Tcl_DeleteHashTable
+VFUNC(void,Tcl_DeleteHashTable,V_Tcl_DeleteHashTable,_ANSI_ARGS_((
+ Tcl_HashTable * tablePtr)))
+#endif /* #ifndef Tcl_DeleteHashTable */
+
+#ifndef Tcl_DeleteInterp
+VFUNC(void,Tcl_DeleteInterp,V_Tcl_DeleteInterp,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_DeleteInterp */
+
+#ifndef Tcl_DeleteTimerHandler
+VFUNC(void,Tcl_DeleteTimerHandler,V_Tcl_DeleteTimerHandler,_ANSI_ARGS_((
+ Tcl_TimerToken token)))
+#endif /* #ifndef Tcl_DeleteTimerHandler */
+
+#ifndef Tcl_DoOneEvent
+VFUNC(int,Tcl_DoOneEvent,V_Tcl_DoOneEvent,_ANSI_ARGS_((int flags)))
+#endif /* #ifndef Tcl_DoOneEvent */
+
+#ifndef Tcl_DoWhenIdle
+VFUNC(void,Tcl_DoWhenIdle,V_Tcl_DoWhenIdle,_ANSI_ARGS_((Tcl_IdleProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_DoWhenIdle */
+
+#ifndef Tcl_DuplicateObj
+VFUNC(Tcl_Obj *,Tcl_DuplicateObj,V_Tcl_DuplicateObj,_ANSI_ARGS_((Tcl_Obj * objPtr)))
+#endif /* #ifndef Tcl_DuplicateObj */
+
+#ifndef Tcl_Eof
+VFUNC(int,Tcl_Eof,V_Tcl_Eof,_ANSI_ARGS_((Tcl_Channel chan)))
+#endif /* #ifndef Tcl_Eof */
+
+#ifndef Tcl_EvalObjEx
+VFUNC(int,Tcl_EvalObjEx,V_Tcl_EvalObjEx,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int flags)))
+#endif /* #ifndef Tcl_EvalObjEx */
+
+#ifndef Tcl_EvalObjv
+VFUNC(int,Tcl_EvalObjv,V_Tcl_EvalObjv,_ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[], int flags)))
+#endif /* #ifndef Tcl_EvalObjv */
+
+#ifndef Tcl_EventuallyFree
+VFUNC(void,Tcl_EventuallyFree,V_Tcl_EventuallyFree,_ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_FreeProc * freeProc)))
+#endif /* #ifndef Tcl_EventuallyFree */
+
+#ifndef Tcl_ExternalToUtf
+VFUNC(int,Tcl_ExternalToUtf,V_Tcl_ExternalToUtf,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, int flags,
+ Tcl_EncodingState * statePtr, char * dst,
+ int dstLen, int * srcReadPtr,
+ int * dstWrotePtr, int * dstCharsPtr)))
+#endif /* #ifndef Tcl_ExternalToUtf */
+
+#ifndef Tcl_ExternalToUtfDString
+VFUNC(char *,Tcl_ExternalToUtfDString,V_Tcl_ExternalToUtfDString,_ANSI_ARGS_((
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, Tcl_DString * dsPtr)))
+#endif /* #ifndef Tcl_ExternalToUtfDString */
+
+#ifndef Tcl_FirstHashEntry
+VFUNC(Tcl_HashEntry *,Tcl_FirstHashEntry,V_Tcl_FirstHashEntry,_ANSI_ARGS_((
+ Tcl_HashTable * tablePtr,
+ Tcl_HashSearch * searchPtr)))
+#endif /* #ifndef Tcl_FirstHashEntry */
+
+#ifndef Tcl_FreeEncoding
+VFUNC(void,Tcl_FreeEncoding,V_Tcl_FreeEncoding,_ANSI_ARGS_((Tcl_Encoding encoding)))
+#endif /* #ifndef Tcl_FreeEncoding */
+
+#ifndef Tcl_GetAssocData
+VFUNC(ClientData,Tcl_GetAssocData,V_Tcl_GetAssocData,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name,
+ Tcl_InterpDeleteProc ** procPtr)))
+#endif /* #ifndef Tcl_GetAssocData */
+
+#ifndef Tcl_GetBooleanFromObj
+VFUNC(int,Tcl_GetBooleanFromObj,V_Tcl_GetBooleanFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ int * boolPtr)))
+#endif /* #ifndef Tcl_GetBooleanFromObj */
+
+#ifndef Tcl_GetChannel
+VFUNC(Tcl_Channel,Tcl_GetChannel,V_Tcl_GetChannel,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * chanName, int * modePtr)))
+#endif /* #ifndef Tcl_GetChannel */
+
+#ifndef Tcl_GetCommandInfo
+VFUNC(int,Tcl_GetCommandInfo,V_Tcl_GetCommandInfo,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * cmdName, Tcl_CmdInfo * infoPtr)))
+#endif /* #ifndef Tcl_GetCommandInfo */
+
+#ifndef Tcl_GetDouble
+VFUNC(int,Tcl_GetDouble,V_Tcl_GetDouble,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, double * doublePtr)))
+#endif /* #ifndef Tcl_GetDouble */
+
+#ifndef Tcl_GetDoubleFromObj
+VFUNC(int,Tcl_GetDoubleFromObj,V_Tcl_GetDoubleFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ double * doublePtr)))
+#endif /* #ifndef Tcl_GetDoubleFromObj */
+
+#ifndef Tcl_GetEncoding
+VFUNC(Tcl_Encoding,Tcl_GetEncoding,V_Tcl_GetEncoding,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name)))
+#endif /* #ifndef Tcl_GetEncoding */
+
+#ifndef Tcl_GetEncodingName
+VFUNC(CONST84_RETURN char *,Tcl_GetEncodingName,V_Tcl_GetEncodingName,_ANSI_ARGS_((
+ Tcl_Encoding encoding)))
+#endif /* #ifndef Tcl_GetEncodingName */
+
+#ifndef Tcl_GetIndexFromObj
+VFUNC(int,Tcl_GetIndexFromObj,V_Tcl_GetIndexFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, CONST char ** tablePtr,
+ CONST char * msg, int flags, int * indexPtr)))
+#endif /* #ifndef Tcl_GetIndexFromObj */
+
+#ifndef Tcl_GetInt
+VFUNC(int,Tcl_GetInt,V_Tcl_GetInt,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * intPtr)))
+#endif /* #ifndef Tcl_GetInt */
+
+#ifndef Tcl_GetIntFromObj
+VFUNC(int,Tcl_GetIntFromObj,V_Tcl_GetIntFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int * intPtr)))
+#endif /* #ifndef Tcl_GetIntFromObj */
+
+#ifndef Tcl_GetLongFromObj
+VFUNC(int,Tcl_GetLongFromObj,V_Tcl_GetLongFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, long * longPtr)))
+#endif /* #ifndef Tcl_GetLongFromObj */
+
+#ifndef Tcl_GetObjResult
+VFUNC(Tcl_Obj *,Tcl_GetObjResult,V_Tcl_GetObjResult,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_GetObjResult */
+
+#ifndef Tcl_GetObjType
+VFUNC(Tcl_ObjType *,Tcl_GetObjType,V_Tcl_GetObjType,_ANSI_ARGS_((CONST char * typeName)))
+#endif /* #ifndef Tcl_GetObjType */
+
+#ifndef Tcl_GetRegExpFromObj
+VFUNC(Tcl_RegExp,Tcl_GetRegExpFromObj,V_Tcl_GetRegExpFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * patObj,
+ int flags)))
+#endif /* #ifndef Tcl_GetRegExpFromObj */
+
+#ifndef Tcl_GetStdChannel
+VFUNC(Tcl_Channel,Tcl_GetStdChannel,V_Tcl_GetStdChannel,_ANSI_ARGS_((int type)))
+#endif /* #ifndef Tcl_GetStdChannel */
+
+#ifndef Tcl_GetString
+VFUNC(char *,Tcl_GetString,V_Tcl_GetString,_ANSI_ARGS_((Tcl_Obj * objPtr)))
+#endif /* #ifndef Tcl_GetString */
+
+#ifndef Tcl_GetStringFromObj
+VFUNC(char *,Tcl_GetStringFromObj,V_Tcl_GetStringFromObj,_ANSI_ARGS_((Tcl_Obj * objPtr,
+ int * lengthPtr)))
+#endif /* #ifndef Tcl_GetStringFromObj */
+
+#ifndef Tcl_GetStringResult
+VFUNC(CONST84_RETURN char *,Tcl_GetStringResult,V_Tcl_GetStringResult,_ANSI_ARGS_((
+ Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_GetStringResult */
+
+#ifndef Tcl_GetThreadData
+VFUNC(VOID *,Tcl_GetThreadData,V_Tcl_GetThreadData,_ANSI_ARGS_((
+ Tcl_ThreadDataKey * keyPtr, int size)))
+#endif /* #ifndef Tcl_GetThreadData */
+
+#ifndef Tcl_GetTime
+VFUNC(void,Tcl_GetTime,V_Tcl_GetTime,_ANSI_ARGS_((Tcl_Time* timeBuf)))
+#endif /* #ifndef Tcl_GetTime */
+
+#ifndef Tcl_GetVar
+VFUNC(CONST84_RETURN char *,Tcl_GetVar,V_Tcl_GetVar,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, int flags)))
+#endif /* #ifndef Tcl_GetVar */
+
+#ifndef Tcl_GetVar2
+VFUNC(CONST84_RETURN char *,Tcl_GetVar2,V_Tcl_GetVar2,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags)))
+#endif /* #ifndef Tcl_GetVar2 */
+
+#ifndef Tcl_GetVar2Ex
+VFUNC(Tcl_Obj *,Tcl_GetVar2Ex,V_Tcl_GetVar2Ex,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags)))
+#endif /* #ifndef Tcl_GetVar2Ex */
+
+#ifndef Tcl_GlobalEval
+VFUNC(int,Tcl_GlobalEval,V_Tcl_GlobalEval,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * command)))
+#endif /* #ifndef Tcl_GlobalEval */
+
+#ifndef Tcl_HideCommand
+VFUNC(int,Tcl_HideCommand,V_Tcl_HideCommand,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * cmdName,
+ CONST char * hiddenCmdToken)))
+#endif /* #ifndef Tcl_HideCommand */
+
+#ifndef Tcl_InitHashTable
+VFUNC(void,Tcl_InitHashTable,V_Tcl_InitHashTable,_ANSI_ARGS_((
+ Tcl_HashTable * tablePtr, int keyType)))
+#endif /* #ifndef Tcl_InitHashTable */
+
+#ifndef Tcl_IsSafe
+VFUNC(int,Tcl_IsSafe,V_Tcl_IsSafe,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_IsSafe */
+
+#ifndef Tcl_LinkVar
+VFUNC(int,Tcl_LinkVar,V_Tcl_LinkVar,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, char * addr, int type)))
+#endif /* #ifndef Tcl_LinkVar */
+
+#ifndef Tcl_ListObjAppendElement
+VFUNC(int,Tcl_ListObjAppendElement,V_Tcl_ListObjAppendElement,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * listPtr,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tcl_ListObjAppendElement */
+
+#ifndef Tcl_ListObjGetElements
+VFUNC(int,Tcl_ListObjGetElements,V_Tcl_ListObjGetElements,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * listPtr,
+ int * objcPtr, Tcl_Obj *** objvPtr)))
+#endif /* #ifndef Tcl_ListObjGetElements */
+
+#ifndef Tcl_ListObjIndex
+VFUNC(int,Tcl_ListObjIndex,V_Tcl_ListObjIndex,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * listPtr, int index,
+ Tcl_Obj ** objPtrPtr)))
+#endif /* #ifndef Tcl_ListObjIndex */
+
+#ifndef Tcl_ListObjLength
+VFUNC(int,Tcl_ListObjLength,V_Tcl_ListObjLength,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * listPtr, int * lengthPtr)))
+#endif /* #ifndef Tcl_ListObjLength */
+
+#ifndef Tcl_ListObjReplace
+VFUNC(int,Tcl_ListObjReplace,V_Tcl_ListObjReplace,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * listPtr, int first, int count,
+ int objc, Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tcl_ListObjReplace */
+
+#ifndef Tcl_NewBooleanObj
+VFUNC(Tcl_Obj *,Tcl_NewBooleanObj,V_Tcl_NewBooleanObj,_ANSI_ARGS_((int boolValue)))
+#endif /* #ifndef Tcl_NewBooleanObj */
+
+#ifndef Tcl_NewDoubleObj
+VFUNC(Tcl_Obj *,Tcl_NewDoubleObj,V_Tcl_NewDoubleObj,_ANSI_ARGS_((double doubleValue)))
+#endif /* #ifndef Tcl_NewDoubleObj */
+
+#ifndef Tcl_NewIntObj
+VFUNC(Tcl_Obj *,Tcl_NewIntObj,V_Tcl_NewIntObj,_ANSI_ARGS_((int intValue)))
+#endif /* #ifndef Tcl_NewIntObj */
+
+#ifndef Tcl_NewListObj
+VFUNC(Tcl_Obj *,Tcl_NewListObj,V_Tcl_NewListObj,_ANSI_ARGS_((int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tcl_NewListObj */
+
+#ifndef Tcl_NewLongObj
+VFUNC(Tcl_Obj *,Tcl_NewLongObj,V_Tcl_NewLongObj,_ANSI_ARGS_((long longValue)))
+#endif /* #ifndef Tcl_NewLongObj */
+
+#ifndef Tcl_NewObj
+VFUNC(Tcl_Obj *,Tcl_NewObj,V_Tcl_NewObj,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_NewObj */
+
+#ifndef Tcl_NewStringObj
+VFUNC(Tcl_Obj *,Tcl_NewStringObj,V_Tcl_NewStringObj,_ANSI_ARGS_((CONST char * bytes,
+ int length)))
+#endif /* #ifndef Tcl_NewStringObj */
+
+#ifndef Tcl_NextHashEntry
+VFUNC(Tcl_HashEntry *,Tcl_NextHashEntry,V_Tcl_NextHashEntry,_ANSI_ARGS_((
+ Tcl_HashSearch * searchPtr)))
+#endif /* #ifndef Tcl_NextHashEntry */
+
+#ifndef Tcl_NumUtfChars
+VFUNC(int,Tcl_NumUtfChars,V_Tcl_NumUtfChars,_ANSI_ARGS_((CONST char * src,
+ int len)))
+#endif /* #ifndef Tcl_NumUtfChars */
+
+#ifndef Tcl_ObjGetVar2
+VFUNC(Tcl_Obj *,Tcl_ObjGetVar2,V_Tcl_ObjGetVar2,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr,
+ int flags)))
+#endif /* #ifndef Tcl_ObjGetVar2 */
+
+#ifndef Tcl_ObjSetVar2
+VFUNC(Tcl_Obj *,Tcl_ObjSetVar2,V_Tcl_ObjSetVar2,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr,
+ Tcl_Obj * newValuePtr, int flags)))
+#endif /* #ifndef Tcl_ObjSetVar2 */
+
+#ifndef Tcl_OpenFileChannel
+VFUNC(Tcl_Channel,Tcl_OpenFileChannel,V_Tcl_OpenFileChannel,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * fileName,
+ CONST char * modeString, int permissions)))
+#endif /* #ifndef Tcl_OpenFileChannel */
+
+#ifndef Tcl_Panic
+VFUNC(void,Tcl_Panic,V_Tcl_Panic,_ANSI_ARGS_(TCL_VARARGS(CONST char *,format)))
+#endif /* #ifndef Tcl_Panic */
+
+#ifndef Tcl_PosixError
+VFUNC(CONST84_RETURN char *,Tcl_PosixError,V_Tcl_PosixError,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_PosixError */
+
+#ifndef Tcl_Preserve
+VFUNC(void,Tcl_Preserve,V_Tcl_Preserve,_ANSI_ARGS_((ClientData data)))
+#endif /* #ifndef Tcl_Preserve */
+
+#ifndef Tcl_Read
+VFUNC(int,Tcl_Read,V_Tcl_Read,_ANSI_ARGS_((Tcl_Channel chan,
+ char * bufPtr, int toRead)))
+#endif /* #ifndef Tcl_Read */
+
+#ifndef Tcl_RegExpExec
+VFUNC(int,Tcl_RegExpExec,V_Tcl_RegExpExec,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_RegExp regexp, CONST char * str,
+ CONST char * start)))
+#endif /* #ifndef Tcl_RegExpExec */
+
+#ifndef Tcl_RegExpRange
+VFUNC(void,Tcl_RegExpRange,V_Tcl_RegExpRange,_ANSI_ARGS_((Tcl_RegExp regexp,
+ int index, CONST84 char ** startPtr,
+ CONST84 char ** endPtr)))
+#endif /* #ifndef Tcl_RegExpRange */
+
+#ifndef Tcl_Release
+VFUNC(void,Tcl_Release,V_Tcl_Release,_ANSI_ARGS_((ClientData clientData)))
+#endif /* #ifndef Tcl_Release */
+
+#ifndef Tcl_ResetResult
+VFUNC(void,Tcl_ResetResult,V_Tcl_ResetResult,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tcl_ResetResult */
+
+#ifndef Tcl_Seek
+VFUNC(Tcl_WideInt,Tcl_Seek,V_Tcl_Seek,_ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_WideInt offset, int mode)))
+#endif /* #ifndef Tcl_Seek */
+
+#ifndef Tcl_ServiceEvent
+VFUNC(int,Tcl_ServiceEvent,V_Tcl_ServiceEvent,_ANSI_ARGS_((int flags)))
+#endif /* #ifndef Tcl_ServiceEvent */
+
+#ifndef Tcl_SetAssocData
+VFUNC(void,Tcl_SetAssocData,V_Tcl_SetAssocData,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name,
+ Tcl_InterpDeleteProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_SetAssocData */
+
+#ifndef Tcl_SetBooleanObj
+VFUNC(void,Tcl_SetBooleanObj,V_Tcl_SetBooleanObj,_ANSI_ARGS_((Tcl_Obj * objPtr,
+ int boolValue)))
+#endif /* #ifndef Tcl_SetBooleanObj */
+
+#ifndef Tcl_SetChannelOption
+VFUNC(int,Tcl_SetChannelOption,V_Tcl_SetChannelOption,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Channel chan,
+ CONST char * optionName,
+ CONST char * newValue)))
+#endif /* #ifndef Tcl_SetChannelOption */
+
+#ifndef Tcl_SetCommandInfo
+VFUNC(int,Tcl_SetCommandInfo,V_Tcl_SetCommandInfo,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * cmdName,
+ CONST Tcl_CmdInfo * infoPtr)))
+#endif /* #ifndef Tcl_SetCommandInfo */
+
+#ifndef Tcl_SetDoubleObj
+VFUNC(void,Tcl_SetDoubleObj,V_Tcl_SetDoubleObj,_ANSI_ARGS_((Tcl_Obj * objPtr,
+ double doubleValue)))
+#endif /* #ifndef Tcl_SetDoubleObj */
+
+#ifndef Tcl_SetIntObj
+VFUNC(void,Tcl_SetIntObj,V_Tcl_SetIntObj,_ANSI_ARGS_((Tcl_Obj * objPtr,
+ int intValue)))
+#endif /* #ifndef Tcl_SetIntObj */
+
+#ifndef Tcl_SetListObj
+VFUNC(void,Tcl_SetListObj,V_Tcl_SetListObj,_ANSI_ARGS_((Tcl_Obj * objPtr,
+ int objc, Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tcl_SetListObj */
+
+#ifndef Tcl_SetLongObj
+VFUNC(void,Tcl_SetLongObj,V_Tcl_SetLongObj,_ANSI_ARGS_((Tcl_Obj * objPtr,
+ long longValue)))
+#endif /* #ifndef Tcl_SetLongObj */
+
+#ifndef Tcl_SetMaxBlockTime
+VFUNC(void,Tcl_SetMaxBlockTime,V_Tcl_SetMaxBlockTime,_ANSI_ARGS_((Tcl_Time * timePtr)))
+#endif /* #ifndef Tcl_SetMaxBlockTime */
+
+#ifndef Tcl_SetObjErrorCode
+VFUNC(void,Tcl_SetObjErrorCode,V_Tcl_SetObjErrorCode,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * errorObjPtr)))
+#endif /* #ifndef Tcl_SetObjErrorCode */
+
+#ifndef Tcl_SetObjResult
+VFUNC(void,Tcl_SetObjResult,V_Tcl_SetObjResult,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * resultObjPtr)))
+#endif /* #ifndef Tcl_SetObjResult */
+
+#ifndef Tcl_SetResult
+VFUNC(void,Tcl_SetResult,V_Tcl_SetResult,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * str, Tcl_FreeProc * freeProc)))
+#endif /* #ifndef Tcl_SetResult */
+
+#ifndef Tcl_SetStringObj
+VFUNC(void,Tcl_SetStringObj,V_Tcl_SetStringObj,_ANSI_ARGS_((Tcl_Obj* objPtr,
+ CONST char* bytes, int length)))
+#endif /* #ifndef Tcl_SetStringObj */
+
+#ifndef Tcl_SetVar
+VFUNC(CONST84_RETURN char *,Tcl_SetVar,V_Tcl_SetVar,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName, CONST char * newValue,
+ int flags)))
+#endif /* #ifndef Tcl_SetVar */
+
+#ifndef Tcl_Sleep
+VFUNC(void,Tcl_Sleep,V_Tcl_Sleep,_ANSI_ARGS_((int ms)))
+#endif /* #ifndef Tcl_Sleep */
+
+#ifndef Tcl_StringMatch
+VFUNC(int,Tcl_StringMatch,V_Tcl_StringMatch,_ANSI_ARGS_((CONST char * str,
+ CONST char * pattern)))
+#endif /* #ifndef Tcl_StringMatch */
+
+#ifndef Tcl_TranslateFileName
+VFUNC(char *,Tcl_TranslateFileName,V_Tcl_TranslateFileName,_ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ Tcl_DString * bufferPtr)))
+#endif /* #ifndef Tcl_TranslateFileName */
+
+#ifndef Tcl_UniCharIsAlpha
+VFUNC(int,Tcl_UniCharIsAlpha,V_Tcl_UniCharIsAlpha,_ANSI_ARGS_((int ch)))
+#endif /* #ifndef Tcl_UniCharIsAlpha */
+
+#ifndef Tcl_UniCharIsSpace
+VFUNC(int,Tcl_UniCharIsSpace,V_Tcl_UniCharIsSpace,_ANSI_ARGS_((int ch)))
+#endif /* #ifndef Tcl_UniCharIsSpace */
+
+#ifndef Tcl_UniCharIsUpper
+VFUNC(int,Tcl_UniCharIsUpper,V_Tcl_UniCharIsUpper,_ANSI_ARGS_((int ch)))
+#endif /* #ifndef Tcl_UniCharIsUpper */
+
+#ifndef Tcl_UniCharIsWordChar
+VFUNC(int,Tcl_UniCharIsWordChar,V_Tcl_UniCharIsWordChar,_ANSI_ARGS_((int ch)))
+#endif /* #ifndef Tcl_UniCharIsWordChar */
+
+#ifndef Tcl_UniCharToLower
+VFUNC(Tcl_UniChar,Tcl_UniCharToLower,V_Tcl_UniCharToLower,_ANSI_ARGS_((int ch)))
+#endif /* #ifndef Tcl_UniCharToLower */
+
+#ifndef Tcl_UniCharToUpper
+VFUNC(Tcl_UniChar,Tcl_UniCharToUpper,V_Tcl_UniCharToUpper,_ANSI_ARGS_((int ch)))
+#endif /* #ifndef Tcl_UniCharToUpper */
+
+#ifndef Tcl_UniCharToUtf
+VFUNC(int,Tcl_UniCharToUtf,V_Tcl_UniCharToUtf,_ANSI_ARGS_((int ch, char * buf)))
+#endif /* #ifndef Tcl_UniCharToUtf */
+
+#ifndef Tcl_UnlinkVar
+VFUNC(void,Tcl_UnlinkVar,V_Tcl_UnlinkVar,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName)))
+#endif /* #ifndef Tcl_UnlinkVar */
+
+#ifndef Tcl_UtfAtIndex
+VFUNC(CONST84_RETURN char *,Tcl_UtfAtIndex,V_Tcl_UtfAtIndex,_ANSI_ARGS_((CONST char * src,
+ int index)))
+#endif /* #ifndef Tcl_UtfAtIndex */
+
+#ifndef Tcl_UtfCharComplete
+VFUNC(int,Tcl_UtfCharComplete,V_Tcl_UtfCharComplete,_ANSI_ARGS_((CONST char * src,
+ int len)))
+#endif /* #ifndef Tcl_UtfCharComplete */
+
+#ifndef Tcl_UtfNext
+VFUNC(CONST84_RETURN char *,Tcl_UtfNext,V_Tcl_UtfNext,_ANSI_ARGS_((CONST char * src)))
+#endif /* #ifndef Tcl_UtfNext */
+
+#ifndef Tcl_UtfPrev
+VFUNC(CONST84_RETURN char *,Tcl_UtfPrev,V_Tcl_UtfPrev,_ANSI_ARGS_((CONST char * src,
+ CONST char * start)))
+#endif /* #ifndef Tcl_UtfPrev */
+
+#ifndef Tcl_UtfToExternal
+VFUNC(int,Tcl_UtfToExternal,V_Tcl_UtfToExternal,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, int flags,
+ Tcl_EncodingState * statePtr, char * dst,
+ int dstLen, int * srcReadPtr,
+ int * dstWrotePtr, int * dstCharsPtr)))
+#endif /* #ifndef Tcl_UtfToExternal */
+
+#ifndef Tcl_UtfToExternalDString
+VFUNC(char *,Tcl_UtfToExternalDString,V_Tcl_UtfToExternalDString,_ANSI_ARGS_((
+ Tcl_Encoding encoding, CONST char * src,
+ int srcLen, Tcl_DString * dsPtr)))
+#endif /* #ifndef Tcl_UtfToExternalDString */
+
+#ifndef Tcl_UtfToLower
+VFUNC(int,Tcl_UtfToLower,V_Tcl_UtfToLower,_ANSI_ARGS_((char * src)))
+#endif /* #ifndef Tcl_UtfToLower */
+
+#ifndef Tcl_UtfToUniChar
+VFUNC(int,Tcl_UtfToUniChar,V_Tcl_UtfToUniChar,_ANSI_ARGS_((CONST char * src,
+ Tcl_UniChar * chPtr)))
+#endif /* #ifndef Tcl_UtfToUniChar */
+
+#ifndef Tcl_Write
+VFUNC(int,Tcl_Write,V_Tcl_Write,_ANSI_ARGS_((Tcl_Channel chan,
+ CONST char * s, int slen)))
+#endif /* #ifndef Tcl_Write */
+
+#ifndef Tcl_WriteChars
+VFUNC(int,Tcl_WriteChars,V_Tcl_WriteChars,_ANSI_ARGS_((Tcl_Channel chan,
+ CONST char * src, int srcLen)))
+#endif /* #ifndef Tcl_WriteChars */
+
+#ifndef Tcl_WrongNumArgs
+VFUNC(void,Tcl_WrongNumArgs,V_Tcl_WrongNumArgs,_ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[],
+ CONST char * message)))
+#endif /* #ifndef Tcl_WrongNumArgs */
+
+#endif /* _TCLDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls_f.h
new file mode 100644
index 00000000000..b150c471937
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclDecls_f.h
@@ -0,0 +1,14 @@
+#ifndef TCLDECLS_VT
+#define TCLDECLS_VT
+typedef struct TcldeclsVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tclDecls.t"
+#undef VFUNC
+#undef VVAR
+} TcldeclsVtab;
+extern TcldeclsVtab *TcldeclsVptr;
+extern TcldeclsVtab *TcldeclsVGet(void);
+#endif /* TCLDECLS_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclIntDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tclIntDecls.h
new file mode 100644
index 00000000000..4e3c6afd400
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclIntDecls.h
@@ -0,0 +1,1324 @@
+/*
+ * tclIntDecls.h --
+ *
+ * This file contains the declarations for all unsupported
+ * functions that are exported by the Tcl library. These
+ * interfaces are not guaranteed to remain the same between
+ * versions. Use at your own risk.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.49 2003/02/18 02:25:45 hobbs Exp $
+ */
+
+#ifndef _TCLINTDECLS
+#define _TCLINTDECLS
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tclInt.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+/* Slot 0 is reserved */
+/* 1 */
+EXTERN int TclAccessDeleteProc _ANSI_ARGS_((
+ TclAccessProc_ * proc));
+/* 2 */
+EXTERN int TclAccessInsertProc _ANSI_ARGS_((
+ TclAccessProc_ * proc));
+/* 3 */
+EXTERN void TclAllocateFreeObjects _ANSI_ARGS_((void));
+/* Slot 4 is reserved */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 5 */
+EXTERN int TclCleanupChildren _ANSI_ARGS_((Tcl_Interp * interp,
+ int numPids, Tcl_Pid * pidPtr,
+ Tcl_Channel errorChan));
+#endif /* UNIX */
+#ifdef __WIN32__
+/* 5 */
+EXTERN int TclCleanupChildren _ANSI_ARGS_((Tcl_Interp * interp,
+ int numPids, Tcl_Pid * pidPtr,
+ Tcl_Channel errorChan));
+#endif /* __WIN32__ */
+/* 6 */
+EXTERN void TclCleanupCommand _ANSI_ARGS_((Command * cmdPtr));
+/* 7 */
+EXTERN int TclCopyAndCollapse _ANSI_ARGS_((int count,
+ CONST char * src, char * dst));
+/* 8 */
+EXTERN int TclCopyChannel _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel inChan, Tcl_Channel outChan,
+ int toRead, Tcl_Obj * cmdPtr));
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 9 */
+EXTERN int TclCreatePipeline _ANSI_ARGS_((Tcl_Interp * interp,
+ int argc, Tcl_Obj *CONST *objv,
+ Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr,
+ TclFile * outPipePtr, TclFile * errFilePtr));
+#endif /* UNIX */
+#ifdef __WIN32__
+/* 9 */
+EXTERN int TclCreatePipeline _ANSI_ARGS_((Tcl_Interp * interp,
+ int argc, Tcl_Obj *CONST *objv,
+ Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr,
+ TclFile * outPipePtr, TclFile * errFilePtr));
+#endif /* __WIN32__ */
+/* 10 */
+EXTERN int TclCreateProc _ANSI_ARGS_((Tcl_Interp * interp,
+ Namespace * nsPtr, CONST char * procName,
+ Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr,
+ Proc ** procPtrPtr));
+/* 11 */
+EXTERN void TclDeleteCompiledLocalVars _ANSI_ARGS_((
+ Interp * iPtr, CallFrame * framePtr));
+/* 12 */
+EXTERN void TclDeleteVars _ANSI_ARGS_((Interp * iPtr,
+ Tcl_HashTable * tablePtr));
+/* 13 */
+EXTERN int TclDoGlob _ANSI_ARGS_((Tcl_Interp * interp,
+ char * separators, Tcl_DString * headPtr,
+ char * tail, Tcl_GlobTypeData * types));
+/* 14 */
+EXTERN void TclDumpMemoryInfo _ANSI_ARGS_((FILE * outFile));
+/* Slot 15 is reserved */
+/* 16 */
+EXTERN void TclExprFloatError _ANSI_ARGS_((Tcl_Interp * interp,
+ double value));
+/* Slot 17 is reserved */
+/* Slot 18 is reserved */
+/* Slot 19 is reserved */
+/* Slot 20 is reserved */
+/* Slot 21 is reserved */
+/* 22 */
+EXTERN int TclFindElement _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * listStr, int listLength,
+ CONST char ** elementPtr,
+ CONST char ** nextPtr, int * sizePtr,
+ int * bracePtr));
+/* 23 */
+EXTERN Proc * TclFindProc _ANSI_ARGS_((Interp * iPtr,
+ CONST char * procName));
+/* 24 */
+EXTERN int TclFormatInt _ANSI_ARGS_((char * buffer, long n));
+/* 25 */
+EXTERN void TclFreePackageInfo _ANSI_ARGS_((Interp * iPtr));
+/* Slot 26 is reserved */
+/* 27 */
+EXTERN int TclGetDate _ANSI_ARGS_((char * p, unsigned long now,
+ long zone, unsigned long * timePtr));
+/* 28 */
+EXTERN Tcl_Channel TclpGetDefaultStdChannel _ANSI_ARGS_((int type));
+/* Slot 29 is reserved */
+/* Slot 30 is reserved */
+/* 31 */
+EXTERN char * TclGetExtension _ANSI_ARGS_((char * name));
+/* 32 */
+EXTERN int TclGetFrame _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, CallFrame ** framePtrPtr));
+/* 33 */
+EXTERN TclCmdProcType TclGetInterpProc _ANSI_ARGS_((void));
+/* 34 */
+EXTERN int TclGetIntForIndex _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int endValue,
+ int * indexPtr));
+/* Slot 35 is reserved */
+/* 36 */
+EXTERN int TclGetLong _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, long * longPtr));
+/* 37 */
+EXTERN int TclGetLoadedPackages _ANSI_ARGS_((
+ Tcl_Interp * interp, char * targetName));
+/* 38 */
+EXTERN int TclGetNamespaceForQualName _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * qualName,
+ Namespace * cxtNsPtr, int flags,
+ Namespace ** nsPtrPtr,
+ Namespace ** altNsPtrPtr,
+ Namespace ** actualCxtPtrPtr,
+ CONST char ** simpleNamePtr));
+/* 39 */
+EXTERN TclObjCmdProcType TclGetObjInterpProc _ANSI_ARGS_((void));
+/* 40 */
+EXTERN int TclGetOpenMode _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * seekFlagPtr));
+/* 41 */
+EXTERN Tcl_Command TclGetOriginalCommand _ANSI_ARGS_((
+ Tcl_Command command));
+/* 42 */
+EXTERN char * TclpGetUserHome _ANSI_ARGS_((CONST char * name,
+ Tcl_DString * bufferPtr));
+/* 43 */
+EXTERN int TclGlobalInvoke _ANSI_ARGS_((Tcl_Interp * interp,
+ int argc, CONST84 Tcl_Obj *CONST *objv, int flags));
+/* 44 */
+EXTERN int TclGuessPackageName _ANSI_ARGS_((
+ CONST char * fileName, Tcl_DString * bufPtr));
+/* 45 */
+EXTERN int TclHideUnsafeCommands _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 46 */
+EXTERN int TclInExit _ANSI_ARGS_((void));
+/* Slot 47 is reserved */
+/* Slot 48 is reserved */
+/* 49 */
+EXTERN Tcl_Obj * TclIncrVar2 _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr,
+ long incrAmount, int part1NotParsed));
+/* 50 */
+EXTERN void TclInitCompiledLocals _ANSI_ARGS_((
+ Tcl_Interp * interp, CallFrame * framePtr,
+ Namespace * nsPtr));
+/* 51 */
+EXTERN int TclInterpInit _ANSI_ARGS_((Tcl_Interp * interp));
+/* 52 */
+EXTERN int TclInvoke _ANSI_ARGS_((Tcl_Interp * interp, int argc,
+ CONST84 Tcl_Obj *CONST *objv, int flags));
+/* 53 */
+EXTERN int TclInvokeObjectCommand _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp * interp,
+ int argc, CONST84 Tcl_Obj *CONST *objv));
+/* 54 */
+EXTERN int TclInvokeStringCommand _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[]));
+/* 55 */
+EXTERN Proc * TclIsProc _ANSI_ARGS_((Command * cmdPtr));
+/* Slot 56 is reserved */
+/* Slot 57 is reserved */
+/* 58 */
+EXTERN Var * TclLookupVar _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * part1, CONST char * part2,
+ int flags, CONST char * msg, int createPart1,
+ int createPart2, Var ** arrayPtrPtr));
+/* Slot 59 is reserved */
+/* 60 */
+EXTERN int TclNeedSpace _ANSI_ARGS_((CONST char * start,
+ CONST char * end));
+/* 61 */
+EXTERN Tcl_Obj * TclNewProcBodyObj _ANSI_ARGS_((Proc * procPtr));
+/* 62 */
+EXTERN int TclObjCommandComplete _ANSI_ARGS_((Tcl_Obj * cmdPtr));
+/* 63 */
+EXTERN int TclObjInterpProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int objc,
+ Tcl_Obj *CONST objv[]));
+/* 64 */
+EXTERN int TclObjInvoke _ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[], int flags));
+/* 65 */
+EXTERN int TclObjInvokeGlobal _ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[], int flags));
+/* 66 */
+EXTERN int TclOpenFileChannelDeleteProc _ANSI_ARGS_((
+ TclOpenFileChannelProc_ * proc));
+/* 67 */
+EXTERN int TclOpenFileChannelInsertProc _ANSI_ARGS_((
+ TclOpenFileChannelProc_ * proc));
+/* Slot 68 is reserved */
+/* 69 */
+EXTERN char * TclpAlloc _ANSI_ARGS_((unsigned int size));
+/* Slot 70 is reserved */
+/* Slot 71 is reserved */
+/* Slot 72 is reserved */
+/* Slot 73 is reserved */
+/* 74 */
+EXTERN void TclpFree _ANSI_ARGS_((char * ptr));
+/* 75 */
+EXTERN unsigned long TclpGetClicks _ANSI_ARGS_((void));
+/* 76 */
+EXTERN unsigned long TclpGetSeconds _ANSI_ARGS_((void));
+/* 77 */
+EXTERN void TclpGetTime _ANSI_ARGS_((Tcl_Time * time));
+/* 78 */
+EXTERN int TclpGetTimeZone _ANSI_ARGS_((unsigned long time));
+/* Slot 79 is reserved */
+/* Slot 80 is reserved */
+/* 81 */
+EXTERN char * TclpRealloc _ANSI_ARGS_((char * ptr,
+ unsigned int size));
+/* Slot 82 is reserved */
+/* Slot 83 is reserved */
+/* Slot 84 is reserved */
+/* Slot 85 is reserved */
+/* Slot 86 is reserved */
+/* Slot 87 is reserved */
+/* 88 */
+EXTERN char * TclPrecTraceProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, CONST char * name1,
+ CONST char * name2, int flags));
+/* 89 */
+EXTERN int TclPreventAliasLoop _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Interp * cmdInterp, Tcl_Command cmd));
+/* Slot 90 is reserved */
+/* 91 */
+EXTERN void TclProcCleanupProc _ANSI_ARGS_((Proc * procPtr));
+/* 92 */
+EXTERN int TclProcCompileProc _ANSI_ARGS_((Tcl_Interp * interp,
+ Proc * procPtr, Tcl_Obj * bodyPtr,
+ Namespace * nsPtr, CONST char * description,
+ CONST char * procName));
+/* 93 */
+EXTERN void TclProcDeleteProc _ANSI_ARGS_((ClientData clientData));
+/* 94 */
+EXTERN int TclProcInterpProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int argc,
+ CONST84 Tcl_Obj *CONST *objv));
+/* Slot 95 is reserved */
+/* 96 */
+EXTERN int TclRenameCommand _ANSI_ARGS_((Tcl_Interp * interp,
+ char * oldName, char * newName));
+/* 97 */
+EXTERN void TclResetShadowedCmdRefs _ANSI_ARGS_((
+ Tcl_Interp * interp, Command * newCmdPtr));
+/* 98 */
+EXTERN int TclServiceIdle _ANSI_ARGS_((void));
+/* Slot 99 is reserved */
+/* Slot 100 is reserved */
+/* 101 */
+EXTERN char * TclSetPreInitScript _ANSI_ARGS_((char * string));
+/* 102 */
+EXTERN void TclSetupEnv _ANSI_ARGS_((Tcl_Interp * interp));
+/* 103 */
+EXTERN int TclSockGetPort _ANSI_ARGS_((Tcl_Interp * interp,
+ char * str, char * proto, int * portPtr));
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 104 */
+EXTERN int TclSockMinimumBuffers _ANSI_ARGS_((int sock,
+ int size));
+#endif /* UNIX */
+#ifdef __WIN32__
+/* 104 */
+EXTERN int TclSockMinimumBuffers _ANSI_ARGS_((int sock,
+ int size));
+#endif /* __WIN32__ */
+/* Slot 105 is reserved */
+/* 106 */
+EXTERN int TclStatDeleteProc _ANSI_ARGS_((TclStatProc_ * proc));
+/* 107 */
+EXTERN int TclStatInsertProc _ANSI_ARGS_((TclStatProc_ * proc));
+/* 108 */
+EXTERN void TclTeardownNamespace _ANSI_ARGS_((Namespace * nsPtr));
+/* 109 */
+EXTERN int TclUpdateReturnInfo _ANSI_ARGS_((Interp * iPtr));
+/* Slot 110 is reserved */
+/* 111 */
+EXTERN void Tcl_AddInterpResolvers _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ Tcl_ResolveCmdProc * cmdProc,
+ Tcl_ResolveVarProc * varProc,
+ Tcl_ResolveCompiledVarProc * compiledVarProc));
+/* 112 */
+EXTERN int Tcl_AppendExportList _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Namespace * nsPtr,
+ Tcl_Obj * objPtr));
+/* 113 */
+EXTERN Tcl_Namespace * Tcl_CreateNamespace _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, ClientData clientData,
+ Tcl_NamespaceDeleteProc * deleteProc));
+/* 114 */
+EXTERN void Tcl_DeleteNamespace _ANSI_ARGS_((
+ Tcl_Namespace * nsPtr));
+/* 115 */
+EXTERN int Tcl_Export _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Namespace * nsPtr, CONST char * pattern,
+ int resetListFirst));
+/* 116 */
+EXTERN Tcl_Command Tcl_FindCommand _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name,
+ Tcl_Namespace * contextNsPtr, int flags));
+/* 117 */
+EXTERN Tcl_Namespace * Tcl_FindNamespace _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name,
+ Tcl_Namespace * contextNsPtr, int flags));
+/* 118 */
+EXTERN int Tcl_GetInterpResolvers _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ Tcl_ResolverInfo * resInfo));
+/* 119 */
+EXTERN int Tcl_GetNamespaceResolvers _ANSI_ARGS_((
+ Tcl_Namespace * namespacePtr,
+ Tcl_ResolverInfo * resInfo));
+/* 120 */
+EXTERN Tcl_Var Tcl_FindNamespaceVar _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ Tcl_Namespace * contextNsPtr, int flags));
+/* 121 */
+EXTERN int Tcl_ForgetImport _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Namespace * nsPtr, CONST char * pattern));
+/* 122 */
+EXTERN Tcl_Command Tcl_GetCommandFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr));
+/* 123 */
+EXTERN void Tcl_GetCommandFullName _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Command command,
+ Tcl_Obj * objPtr));
+/* 124 */
+EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 125 */
+EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 126 */
+EXTERN void Tcl_GetVariableFullName _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Var variable,
+ Tcl_Obj * objPtr));
+/* 127 */
+EXTERN int Tcl_Import _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Namespace * nsPtr, CONST char * pattern,
+ int allowOverwrite));
+/* 128 */
+EXTERN void Tcl_PopCallFrame _ANSI_ARGS_((Tcl_Interp* interp));
+/* 129 */
+EXTERN int Tcl_PushCallFrame _ANSI_ARGS_((Tcl_Interp* interp,
+ Tcl_CallFrame * framePtr,
+ Tcl_Namespace * nsPtr, int isProcCallFrame));
+/* 130 */
+EXTERN int Tcl_RemoveInterpResolvers _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name));
+/* 131 */
+EXTERN void Tcl_SetNamespaceResolvers _ANSI_ARGS_((
+ Tcl_Namespace * namespacePtr,
+ Tcl_ResolveCmdProc * cmdProc,
+ Tcl_ResolveVarProc * varProc,
+ Tcl_ResolveCompiledVarProc * compiledVarProc));
+/* 132 */
+EXTERN int TclpHasSockets _ANSI_ARGS_((Tcl_Interp * interp));
+/* 133 */
+EXTERN struct tm * TclpGetDate _ANSI_ARGS_((TclpTime_t time, int useGMT));
+/* 134 */
+EXTERN size_t TclpStrftime _ANSI_ARGS_((char * s, size_t maxsize,
+ CONST char * format, CONST struct tm * t,
+ int useGMT));
+/* 135 */
+EXTERN int TclpCheckStackSpace _ANSI_ARGS_((void));
+/* Slot 136 is reserved */
+/* Slot 137 is reserved */
+/* 138 */
+EXTERN CONST84_RETURN char * TclGetEnv _ANSI_ARGS_((CONST char * name,
+ Tcl_DString * valuePtr));
+/* Slot 139 is reserved */
+/* 140 */
+EXTERN int TclLooksLikeInt _ANSI_ARGS_((CONST char * bytes,
+ int length));
+/* 141 */
+EXTERN CONST84_RETURN char * TclpGetCwd _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_DString * cwdPtr));
+/* 142 */
+EXTERN int TclSetByteCodeFromAny _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ CompileHookProc * hookProc,
+ ClientData clientData));
+/* 143 */
+EXTERN int TclAddLiteralObj _ANSI_ARGS_((
+ struct CompileEnv * envPtr, Tcl_Obj * objPtr,
+ LiteralEntry ** litPtrPtr));
+/* 144 */
+EXTERN void TclHideLiteral _ANSI_ARGS_((Tcl_Interp * interp,
+ struct CompileEnv * envPtr, int index));
+/* 145 */
+EXTERN struct AuxDataType * TclGetAuxDataType _ANSI_ARGS_((char * typeName));
+/* 146 */
+EXTERN TclHandle TclHandleCreate _ANSI_ARGS_((VOID * ptr));
+/* 147 */
+EXTERN void TclHandleFree _ANSI_ARGS_((TclHandle handle));
+/* 148 */
+EXTERN TclHandle TclHandlePreserve _ANSI_ARGS_((TclHandle handle));
+/* 149 */
+EXTERN void TclHandleRelease _ANSI_ARGS_((TclHandle handle));
+/* 150 */
+EXTERN int TclRegAbout _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_RegExp re));
+/* 151 */
+EXTERN void TclRegExpRangeUniChar _ANSI_ARGS_((Tcl_RegExp re,
+ int index, int * startPtr, int * endPtr));
+/* 152 */
+EXTERN void TclSetLibraryPath _ANSI_ARGS_((Tcl_Obj * pathPtr));
+/* 153 */
+EXTERN Tcl_Obj * TclGetLibraryPath _ANSI_ARGS_((void));
+/* Slot 154 is reserved */
+/* Slot 155 is reserved */
+/* 156 */
+EXTERN void TclRegError _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * msg, int status));
+/* 157 */
+EXTERN Var * TclVarTraceExists _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * varName));
+/* 158 */
+EXTERN void TclSetStartupScriptFileName _ANSI_ARGS_((
+ CONST char * filename));
+/* 159 */
+EXTERN CONST84_RETURN char * TclGetStartupScriptFileName _ANSI_ARGS_((void));
+/* Slot 160 is reserved */
+/* 161 */
+EXTERN int TclChannelTransform _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel chan, Tcl_Obj * cmdObjPtr));
+/* 162 */
+EXTERN void TclChannelEventScriptInvoker _ANSI_ARGS_((
+ ClientData clientData, int flags));
+/* 163 */
+EXTERN void * TclGetInstructionTable _ANSI_ARGS_((void));
+/* 164 */
+EXTERN void TclExpandCodeArray _ANSI_ARGS_((void * envPtr));
+/* 165 */
+EXTERN void TclpSetInitialEncodings _ANSI_ARGS_((void));
+/* 166 */
+EXTERN int TclListObjSetElement _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * listPtr,
+ int index, Tcl_Obj * valuePtr));
+/* 167 */
+EXTERN void TclSetStartupScriptPath _ANSI_ARGS_((
+ Tcl_Obj * pathPtr));
+/* 168 */
+EXTERN Tcl_Obj * TclGetStartupScriptPath _ANSI_ARGS_((void));
+/* 169 */
+EXTERN int TclpUtfNcmp2 _ANSI_ARGS_((CONST char * s1,
+ CONST char * s2, unsigned long n));
+/* 170 */
+EXTERN int TclCheckInterpTraces _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * command,
+ int numChars, Command * cmdPtr, int result,
+ int traceFlags, int objc,
+ Tcl_Obj *CONST objv[]));
+/* 171 */
+EXTERN int TclCheckExecutionTraces _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * command,
+ int numChars, Command * cmdPtr, int result,
+ int traceFlags, int objc,
+ Tcl_Obj *CONST objv[]));
+/* 172 */
+EXTERN int TclInThreadExit _ANSI_ARGS_((void));
+/* 173 */
+EXTERN int TclUniCharMatch _ANSI_ARGS_((
+ CONST Tcl_UniChar * string, int strLen,
+ CONST Tcl_UniChar * pattern, int ptnLen,
+ int nocase));
+
+typedef struct TclIntStubs {
+ int magic;
+ struct TclIntStubHooks *hooks;
+
+ void *reserved0;
+ int (*tclAccessDeleteProc) _ANSI_ARGS_((TclAccessProc_ * proc)); /* 1 */
+ int (*tclAccessInsertProc) _ANSI_ARGS_((TclAccessProc_ * proc)); /* 2 */
+ void (*tclAllocateFreeObjects) _ANSI_ARGS_((void)); /* 3 */
+ void *reserved4;
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ int (*tclCleanupChildren) _ANSI_ARGS_((Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan)); /* 5 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ int (*tclCleanupChildren) _ANSI_ARGS_((Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan)); /* 5 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved5;
+#endif /* MAC_TCL */
+ void (*tclCleanupCommand) _ANSI_ARGS_((Command * cmdPtr)); /* 6 */
+ int (*tclCopyAndCollapse) _ANSI_ARGS_((int count, CONST char * src, char * dst)); /* 7 */
+ int (*tclCopyChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr)); /* 8 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ int (*tclCreatePipeline) _ANSI_ARGS_((Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr)); /* 9 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ int (*tclCreatePipeline) _ANSI_ARGS_((Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr)); /* 9 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved9;
+#endif /* MAC_TCL */
+ int (*tclCreateProc) _ANSI_ARGS_((Tcl_Interp * interp, Namespace * nsPtr, CONST char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr)); /* 10 */
+ void (*tclDeleteCompiledLocalVars) _ANSI_ARGS_((Interp * iPtr, CallFrame * framePtr)); /* 11 */
+ void (*tclDeleteVars) _ANSI_ARGS_((Interp * iPtr, Tcl_HashTable * tablePtr)); /* 12 */
+ int (*tclDoGlob) _ANSI_ARGS_((Tcl_Interp * interp, char * separators, Tcl_DString * headPtr, char * tail, Tcl_GlobTypeData * types)); /* 13 */
+ void (*tclDumpMemoryInfo) _ANSI_ARGS_((FILE * outFile)); /* 14 */
+ void *reserved15;
+ void (*tclExprFloatError) _ANSI_ARGS_((Tcl_Interp * interp, double value)); /* 16 */
+ void *reserved17;
+ void *reserved18;
+ void *reserved19;
+ void *reserved20;
+ void *reserved21;
+ int (*tclFindElement) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * listStr, int listLength, CONST char ** elementPtr, CONST char ** nextPtr, int * sizePtr, int * bracePtr)); /* 22 */
+ Proc * (*tclFindProc) _ANSI_ARGS_((Interp * iPtr, CONST char * procName)); /* 23 */
+ int (*tclFormatInt) _ANSI_ARGS_((char * buffer, long n)); /* 24 */
+ void (*tclFreePackageInfo) _ANSI_ARGS_((Interp * iPtr)); /* 25 */
+ void *reserved26;
+ int (*tclGetDate) _ANSI_ARGS_((char * p, unsigned long now, long zone, unsigned long * timePtr)); /* 27 */
+ Tcl_Channel (*tclpGetDefaultStdChannel) _ANSI_ARGS_((int type)); /* 28 */
+ void *reserved29;
+ void *reserved30;
+ char * (*tclGetExtension) _ANSI_ARGS_((char * name)); /* 31 */
+ int (*tclGetFrame) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, CallFrame ** framePtrPtr)); /* 32 */
+ TclCmdProcType (*tclGetInterpProc) _ANSI_ARGS_((void)); /* 33 */
+ int (*tclGetIntForIndex) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr)); /* 34 */
+ void *reserved35;
+ int (*tclGetLong) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, long * longPtr)); /* 36 */
+ int (*tclGetLoadedPackages) _ANSI_ARGS_((Tcl_Interp * interp, char * targetName)); /* 37 */
+ int (*tclGetNamespaceForQualName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr)); /* 38 */
+ TclObjCmdProcType (*tclGetObjInterpProc) _ANSI_ARGS_((void)); /* 39 */
+ int (*tclGetOpenMode) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * seekFlagPtr)); /* 40 */
+ Tcl_Command (*tclGetOriginalCommand) _ANSI_ARGS_((Tcl_Command command)); /* 41 */
+ char * (*tclpGetUserHome) _ANSI_ARGS_((CONST char * name, Tcl_DString * bufferPtr)); /* 42 */
+ int (*tclGlobalInvoke) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 Tcl_Obj *CONST *objv, int flags)); /* 43 */
+ int (*tclGuessPackageName) _ANSI_ARGS_((CONST char * fileName, Tcl_DString * bufPtr)); /* 44 */
+ int (*tclHideUnsafeCommands) _ANSI_ARGS_((Tcl_Interp * interp)); /* 45 */
+ int (*tclInExit) _ANSI_ARGS_((void)); /* 46 */
+ void *reserved47;
+ void *reserved48;
+ Tcl_Obj * (*tclIncrVar2) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, long incrAmount, int part1NotParsed)); /* 49 */
+ void (*tclInitCompiledLocals) _ANSI_ARGS_((Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr)); /* 50 */
+ int (*tclInterpInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 51 */
+ int (*tclInvoke) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 Tcl_Obj *CONST *objv, int flags)); /* 52 */
+ int (*tclInvokeObjectCommand) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int argc, CONST84 Tcl_Obj *CONST *objv)); /* 53 */
+ int (*tclInvokeStringCommand) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 54 */
+ Proc * (*tclIsProc) _ANSI_ARGS_((Command * cmdPtr)); /* 55 */
+ void *reserved56;
+ void *reserved57;
+ Var * (*tclLookupVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, CONST char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr)); /* 58 */
+ void *reserved59;
+ int (*tclNeedSpace) _ANSI_ARGS_((CONST char * start, CONST char * end)); /* 60 */
+ Tcl_Obj * (*tclNewProcBodyObj) _ANSI_ARGS_((Proc * procPtr)); /* 61 */
+ int (*tclObjCommandComplete) _ANSI_ARGS_((Tcl_Obj * cmdPtr)); /* 62 */
+ int (*tclObjInterpProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 63 */
+ int (*tclObjInvoke) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags)); /* 64 */
+ int (*tclObjInvokeGlobal) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags)); /* 65 */
+ int (*tclOpenFileChannelDeleteProc) _ANSI_ARGS_((TclOpenFileChannelProc_ * proc)); /* 66 */
+ int (*tclOpenFileChannelInsertProc) _ANSI_ARGS_((TclOpenFileChannelProc_ * proc)); /* 67 */
+ void *reserved68;
+ char * (*tclpAlloc) _ANSI_ARGS_((unsigned int size)); /* 69 */
+ void *reserved70;
+ void *reserved71;
+ void *reserved72;
+ void *reserved73;
+ void (*tclpFree) _ANSI_ARGS_((char * ptr)); /* 74 */
+ unsigned long (*tclpGetClicks) _ANSI_ARGS_((void)); /* 75 */
+ unsigned long (*tclpGetSeconds) _ANSI_ARGS_((void)); /* 76 */
+ void (*tclpGetTime) _ANSI_ARGS_((Tcl_Time * time)); /* 77 */
+ int (*tclpGetTimeZone) _ANSI_ARGS_((unsigned long time)); /* 78 */
+ void *reserved79;
+ void *reserved80;
+ char * (*tclpRealloc) _ANSI_ARGS_((char * ptr, unsigned int size)); /* 81 */
+ void *reserved82;
+ void *reserved83;
+ void *reserved84;
+ void *reserved85;
+ void *reserved86;
+ void *reserved87;
+ char * (*tclPrecTraceProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, CONST char * name1, CONST char * name2, int flags)); /* 88 */
+ int (*tclPreventAliasLoop) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd)); /* 89 */
+ void *reserved90;
+ void (*tclProcCleanupProc) _ANSI_ARGS_((Proc * procPtr)); /* 91 */
+ int (*tclProcCompileProc) _ANSI_ARGS_((Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, CONST char * description, CONST char * procName)); /* 92 */
+ void (*tclProcDeleteProc) _ANSI_ARGS_((ClientData clientData)); /* 93 */
+ int (*tclProcInterpProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int argc, CONST84 Tcl_Obj *CONST *objv)); /* 94 */
+ void *reserved95;
+ int (*tclRenameCommand) _ANSI_ARGS_((Tcl_Interp * interp, char * oldName, char * newName)); /* 96 */
+ void (*tclResetShadowedCmdRefs) _ANSI_ARGS_((Tcl_Interp * interp, Command * newCmdPtr)); /* 97 */
+ int (*tclServiceIdle) _ANSI_ARGS_((void)); /* 98 */
+ void *reserved99;
+ void *reserved100;
+ char * (*tclSetPreInitScript) _ANSI_ARGS_((char * string)); /* 101 */
+ void (*tclSetupEnv) _ANSI_ARGS_((Tcl_Interp * interp)); /* 102 */
+ int (*tclSockGetPort) _ANSI_ARGS_((Tcl_Interp * interp, char * str, char * proto, int * portPtr)); /* 103 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ int (*tclSockMinimumBuffers) _ANSI_ARGS_((int sock, int size)); /* 104 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ int (*tclSockMinimumBuffers) _ANSI_ARGS_((int sock, int size)); /* 104 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void *reserved104;
+#endif /* MAC_TCL */
+ void *reserved105;
+ int (*tclStatDeleteProc) _ANSI_ARGS_((TclStatProc_ * proc)); /* 106 */
+ int (*tclStatInsertProc) _ANSI_ARGS_((TclStatProc_ * proc)); /* 107 */
+ void (*tclTeardownNamespace) _ANSI_ARGS_((Namespace * nsPtr)); /* 108 */
+ int (*tclUpdateReturnInfo) _ANSI_ARGS_((Interp * iPtr)); /* 109 */
+ void *reserved110;
+ void (*tcl_AddInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc)); /* 111 */
+ int (*tcl_AppendExportList) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr)); /* 112 */
+ Tcl_Namespace * (*tcl_CreateNamespace) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc)); /* 113 */
+ void (*tcl_DeleteNamespace) _ANSI_ARGS_((Tcl_Namespace * nsPtr)); /* 114 */
+ int (*tcl_Export) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst)); /* 115 */
+ Tcl_Command (*tcl_FindCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags)); /* 116 */
+ Tcl_Namespace * (*tcl_FindNamespace) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags)); /* 117 */
+ int (*tcl_GetInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_ResolverInfo * resInfo)); /* 118 */
+ int (*tcl_GetNamespaceResolvers) _ANSI_ARGS_((Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo)); /* 119 */
+ Tcl_Var (*tcl_FindNamespaceVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags)); /* 120 */
+ int (*tcl_ForgetImport) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern)); /* 121 */
+ Tcl_Command (*tcl_GetCommandFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 122 */
+ void (*tcl_GetCommandFullName) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr)); /* 123 */
+ Tcl_Namespace * (*tcl_GetCurrentNamespace) _ANSI_ARGS_((Tcl_Interp * interp)); /* 124 */
+ Tcl_Namespace * (*tcl_GetGlobalNamespace) _ANSI_ARGS_((Tcl_Interp * interp)); /* 125 */
+ void (*tcl_GetVariableFullName) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr)); /* 126 */
+ int (*tcl_Import) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite)); /* 127 */
+ void (*tcl_PopCallFrame) _ANSI_ARGS_((Tcl_Interp* interp)); /* 128 */
+ int (*tcl_PushCallFrame) _ANSI_ARGS_((Tcl_Interp* interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame)); /* 129 */
+ int (*tcl_RemoveInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 130 */
+ void (*tcl_SetNamespaceResolvers) _ANSI_ARGS_((Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc)); /* 131 */
+ int (*tclpHasSockets) _ANSI_ARGS_((Tcl_Interp * interp)); /* 132 */
+ struct tm * (*tclpGetDate) _ANSI_ARGS_((TclpTime_t time, int useGMT)); /* 133 */
+ size_t (*tclpStrftime) _ANSI_ARGS_((char * s, size_t maxsize, CONST char * format, CONST struct tm * t, int useGMT)); /* 134 */
+ int (*tclpCheckStackSpace) _ANSI_ARGS_((void)); /* 135 */
+ void *reserved136;
+ void *reserved137;
+ CONST84_RETURN char * (*tclGetEnv) _ANSI_ARGS_((CONST char * name, Tcl_DString * valuePtr)); /* 138 */
+ void *reserved139;
+ int (*tclLooksLikeInt) _ANSI_ARGS_((CONST char * bytes, int length)); /* 140 */
+ CONST84_RETURN char * (*tclpGetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 141 */
+ int (*tclSetByteCodeFromAny) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData)); /* 142 */
+ int (*tclAddLiteralObj) _ANSI_ARGS_((struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr)); /* 143 */
+ void (*tclHideLiteral) _ANSI_ARGS_((Tcl_Interp * interp, struct CompileEnv * envPtr, int index)); /* 144 */
+ struct AuxDataType * (*tclGetAuxDataType) _ANSI_ARGS_((char * typeName)); /* 145 */
+ TclHandle (*tclHandleCreate) _ANSI_ARGS_((VOID * ptr)); /* 146 */
+ void (*tclHandleFree) _ANSI_ARGS_((TclHandle handle)); /* 147 */
+ TclHandle (*tclHandlePreserve) _ANSI_ARGS_((TclHandle handle)); /* 148 */
+ void (*tclHandleRelease) _ANSI_ARGS_((TclHandle handle)); /* 149 */
+ int (*tclRegAbout) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp re)); /* 150 */
+ void (*tclRegExpRangeUniChar) _ANSI_ARGS_((Tcl_RegExp re, int index, int * startPtr, int * endPtr)); /* 151 */
+ void (*tclSetLibraryPath) _ANSI_ARGS_((Tcl_Obj * pathPtr)); /* 152 */
+ Tcl_Obj * (*tclGetLibraryPath) _ANSI_ARGS_((void)); /* 153 */
+ void *reserved154;
+ void *reserved155;
+ void (*tclRegError) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * msg, int status)); /* 156 */
+ Var * (*tclVarTraceExists) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * varName)); /* 157 */
+ void (*tclSetStartupScriptFileName) _ANSI_ARGS_((CONST char * filename)); /* 158 */
+ CONST84_RETURN char * (*tclGetStartupScriptFileName) _ANSI_ARGS_((void)); /* 159 */
+ void *reserved160;
+ int (*tclChannelTransform) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr)); /* 161 */
+ void (*tclChannelEventScriptInvoker) _ANSI_ARGS_((ClientData clientData, int flags)); /* 162 */
+ void * (*tclGetInstructionTable) _ANSI_ARGS_((void)); /* 163 */
+ void (*tclExpandCodeArray) _ANSI_ARGS_((void * envPtr)); /* 164 */
+ void (*tclpSetInitialEncodings) _ANSI_ARGS_((void)); /* 165 */
+ int (*tclListObjSetElement) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr)); /* 166 */
+ void (*tclSetStartupScriptPath) _ANSI_ARGS_((Tcl_Obj * pathPtr)); /* 167 */
+ Tcl_Obj * (*tclGetStartupScriptPath) _ANSI_ARGS_((void)); /* 168 */
+ int (*tclpUtfNcmp2) _ANSI_ARGS_((CONST char * s1, CONST char * s2, unsigned long n)); /* 169 */
+ int (*tclCheckInterpTraces) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[])); /* 170 */
+ int (*tclCheckExecutionTraces) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[])); /* 171 */
+ int (*tclInThreadExit) _ANSI_ARGS_((void)); /* 172 */
+ int (*tclUniCharMatch) _ANSI_ARGS_((CONST Tcl_UniChar * string, int strLen, CONST Tcl_UniChar * pattern, int ptnLen, int nocase)); /* 173 */
+} TclIntStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TclIntStubs *tclIntStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+/* Slot 0 is reserved */
+#ifndef TclAccessDeleteProc
+#define TclAccessDeleteProc \
+ (tclIntStubsPtr->tclAccessDeleteProc) /* 1 */
+#endif
+#ifndef TclAccessInsertProc
+#define TclAccessInsertProc \
+ (tclIntStubsPtr->tclAccessInsertProc) /* 2 */
+#endif
+#ifndef TclAllocateFreeObjects
+#define TclAllocateFreeObjects \
+ (tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */
+#endif
+/* Slot 4 is reserved */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef TclCleanupChildren
+#define TclCleanupChildren \
+ (tclIntStubsPtr->tclCleanupChildren) /* 5 */
+#endif
+#endif /* UNIX */
+#ifdef __WIN32__
+#ifndef TclCleanupChildren
+#define TclCleanupChildren \
+ (tclIntStubsPtr->tclCleanupChildren) /* 5 */
+#endif
+#endif /* __WIN32__ */
+#ifndef TclCleanupCommand
+#define TclCleanupCommand \
+ (tclIntStubsPtr->tclCleanupCommand) /* 6 */
+#endif
+#ifndef TclCopyAndCollapse
+#define TclCopyAndCollapse \
+ (tclIntStubsPtr->tclCopyAndCollapse) /* 7 */
+#endif
+#ifndef TclCopyChannel
+#define TclCopyChannel \
+ (tclIntStubsPtr->tclCopyChannel) /* 8 */
+#endif
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef TclCreatePipeline
+#define TclCreatePipeline \
+ (tclIntStubsPtr->tclCreatePipeline) /* 9 */
+#endif
+#endif /* UNIX */
+#ifdef __WIN32__
+#ifndef TclCreatePipeline
+#define TclCreatePipeline \
+ (tclIntStubsPtr->tclCreatePipeline) /* 9 */
+#endif
+#endif /* __WIN32__ */
+#ifndef TclCreateProc
+#define TclCreateProc \
+ (tclIntStubsPtr->tclCreateProc) /* 10 */
+#endif
+#ifndef TclDeleteCompiledLocalVars
+#define TclDeleteCompiledLocalVars \
+ (tclIntStubsPtr->tclDeleteCompiledLocalVars) /* 11 */
+#endif
+#ifndef TclDeleteVars
+#define TclDeleteVars \
+ (tclIntStubsPtr->tclDeleteVars) /* 12 */
+#endif
+#ifndef TclDoGlob
+#define TclDoGlob \
+ (tclIntStubsPtr->tclDoGlob) /* 13 */
+#endif
+#ifndef TclDumpMemoryInfo
+#define TclDumpMemoryInfo \
+ (tclIntStubsPtr->tclDumpMemoryInfo) /* 14 */
+#endif
+/* Slot 15 is reserved */
+#ifndef TclExprFloatError
+#define TclExprFloatError \
+ (tclIntStubsPtr->tclExprFloatError) /* 16 */
+#endif
+/* Slot 17 is reserved */
+/* Slot 18 is reserved */
+/* Slot 19 is reserved */
+/* Slot 20 is reserved */
+/* Slot 21 is reserved */
+#ifndef TclFindElement
+#define TclFindElement \
+ (tclIntStubsPtr->tclFindElement) /* 22 */
+#endif
+#ifndef TclFindProc
+#define TclFindProc \
+ (tclIntStubsPtr->tclFindProc) /* 23 */
+#endif
+#ifndef TclFormatInt
+#define TclFormatInt \
+ (tclIntStubsPtr->tclFormatInt) /* 24 */
+#endif
+#ifndef TclFreePackageInfo
+#define TclFreePackageInfo \
+ (tclIntStubsPtr->tclFreePackageInfo) /* 25 */
+#endif
+/* Slot 26 is reserved */
+#ifndef TclGetDate
+#define TclGetDate \
+ (tclIntStubsPtr->tclGetDate) /* 27 */
+#endif
+#ifndef TclpGetDefaultStdChannel
+#define TclpGetDefaultStdChannel \
+ (tclIntStubsPtr->tclpGetDefaultStdChannel) /* 28 */
+#endif
+/* Slot 29 is reserved */
+/* Slot 30 is reserved */
+#ifndef TclGetExtension
+#define TclGetExtension \
+ (tclIntStubsPtr->tclGetExtension) /* 31 */
+#endif
+#ifndef TclGetFrame
+#define TclGetFrame \
+ (tclIntStubsPtr->tclGetFrame) /* 32 */
+#endif
+#ifndef TclGetInterpProc
+#define TclGetInterpProc \
+ (tclIntStubsPtr->tclGetInterpProc) /* 33 */
+#endif
+#ifndef TclGetIntForIndex
+#define TclGetIntForIndex \
+ (tclIntStubsPtr->tclGetIntForIndex) /* 34 */
+#endif
+/* Slot 35 is reserved */
+#ifndef TclGetLong
+#define TclGetLong \
+ (tclIntStubsPtr->tclGetLong) /* 36 */
+#endif
+#ifndef TclGetLoadedPackages
+#define TclGetLoadedPackages \
+ (tclIntStubsPtr->tclGetLoadedPackages) /* 37 */
+#endif
+#ifndef TclGetNamespaceForQualName
+#define TclGetNamespaceForQualName \
+ (tclIntStubsPtr->tclGetNamespaceForQualName) /* 38 */
+#endif
+#ifndef TclGetObjInterpProc
+#define TclGetObjInterpProc \
+ (tclIntStubsPtr->tclGetObjInterpProc) /* 39 */
+#endif
+#ifndef TclGetOpenMode
+#define TclGetOpenMode \
+ (tclIntStubsPtr->tclGetOpenMode) /* 40 */
+#endif
+#ifndef TclGetOriginalCommand
+#define TclGetOriginalCommand \
+ (tclIntStubsPtr->tclGetOriginalCommand) /* 41 */
+#endif
+#ifndef TclpGetUserHome
+#define TclpGetUserHome \
+ (tclIntStubsPtr->tclpGetUserHome) /* 42 */
+#endif
+#ifndef TclGlobalInvoke
+#define TclGlobalInvoke \
+ (tclIntStubsPtr->tclGlobalInvoke) /* 43 */
+#endif
+#ifndef TclGuessPackageName
+#define TclGuessPackageName \
+ (tclIntStubsPtr->tclGuessPackageName) /* 44 */
+#endif
+#ifndef TclHideUnsafeCommands
+#define TclHideUnsafeCommands \
+ (tclIntStubsPtr->tclHideUnsafeCommands) /* 45 */
+#endif
+#ifndef TclInExit
+#define TclInExit \
+ (tclIntStubsPtr->tclInExit) /* 46 */
+#endif
+/* Slot 47 is reserved */
+/* Slot 48 is reserved */
+#ifndef TclIncrVar2
+#define TclIncrVar2 \
+ (tclIntStubsPtr->tclIncrVar2) /* 49 */
+#endif
+#ifndef TclInitCompiledLocals
+#define TclInitCompiledLocals \
+ (tclIntStubsPtr->tclInitCompiledLocals) /* 50 */
+#endif
+#ifndef TclInterpInit
+#define TclInterpInit \
+ (tclIntStubsPtr->tclInterpInit) /* 51 */
+#endif
+#ifndef TclInvoke
+#define TclInvoke \
+ (tclIntStubsPtr->tclInvoke) /* 52 */
+#endif
+#ifndef TclInvokeObjectCommand
+#define TclInvokeObjectCommand \
+ (tclIntStubsPtr->tclInvokeObjectCommand) /* 53 */
+#endif
+#ifndef TclInvokeStringCommand
+#define TclInvokeStringCommand \
+ (tclIntStubsPtr->tclInvokeStringCommand) /* 54 */
+#endif
+#ifndef TclIsProc
+#define TclIsProc \
+ (tclIntStubsPtr->tclIsProc) /* 55 */
+#endif
+/* Slot 56 is reserved */
+/* Slot 57 is reserved */
+#ifndef TclLookupVar
+#define TclLookupVar \
+ (tclIntStubsPtr->tclLookupVar) /* 58 */
+#endif
+/* Slot 59 is reserved */
+#ifndef TclNeedSpace
+#define TclNeedSpace \
+ (tclIntStubsPtr->tclNeedSpace) /* 60 */
+#endif
+#ifndef TclNewProcBodyObj
+#define TclNewProcBodyObj \
+ (tclIntStubsPtr->tclNewProcBodyObj) /* 61 */
+#endif
+#ifndef TclObjCommandComplete
+#define TclObjCommandComplete \
+ (tclIntStubsPtr->tclObjCommandComplete) /* 62 */
+#endif
+#ifndef TclObjInterpProc
+#define TclObjInterpProc \
+ (tclIntStubsPtr->tclObjInterpProc) /* 63 */
+#endif
+#ifndef TclObjInvoke
+#define TclObjInvoke \
+ (tclIntStubsPtr->tclObjInvoke) /* 64 */
+#endif
+#ifndef TclObjInvokeGlobal
+#define TclObjInvokeGlobal \
+ (tclIntStubsPtr->tclObjInvokeGlobal) /* 65 */
+#endif
+#ifndef TclOpenFileChannelDeleteProc
+#define TclOpenFileChannelDeleteProc \
+ (tclIntStubsPtr->tclOpenFileChannelDeleteProc) /* 66 */
+#endif
+#ifndef TclOpenFileChannelInsertProc
+#define TclOpenFileChannelInsertProc \
+ (tclIntStubsPtr->tclOpenFileChannelInsertProc) /* 67 */
+#endif
+/* Slot 68 is reserved */
+#ifndef TclpAlloc
+#define TclpAlloc \
+ (tclIntStubsPtr->tclpAlloc) /* 69 */
+#endif
+/* Slot 70 is reserved */
+/* Slot 71 is reserved */
+/* Slot 72 is reserved */
+/* Slot 73 is reserved */
+#ifndef TclpFree
+#define TclpFree \
+ (tclIntStubsPtr->tclpFree) /* 74 */
+#endif
+#ifndef TclpGetClicks
+#define TclpGetClicks \
+ (tclIntStubsPtr->tclpGetClicks) /* 75 */
+#endif
+#ifndef TclpGetSeconds
+#define TclpGetSeconds \
+ (tclIntStubsPtr->tclpGetSeconds) /* 76 */
+#endif
+#ifndef TclpGetTime
+#define TclpGetTime \
+ (tclIntStubsPtr->tclpGetTime) /* 77 */
+#endif
+#ifndef TclpGetTimeZone
+#define TclpGetTimeZone \
+ (tclIntStubsPtr->tclpGetTimeZone) /* 78 */
+#endif
+/* Slot 79 is reserved */
+/* Slot 80 is reserved */
+#ifndef TclpRealloc
+#define TclpRealloc \
+ (tclIntStubsPtr->tclpRealloc) /* 81 */
+#endif
+/* Slot 82 is reserved */
+/* Slot 83 is reserved */
+/* Slot 84 is reserved */
+/* Slot 85 is reserved */
+/* Slot 86 is reserved */
+/* Slot 87 is reserved */
+#ifndef TclPrecTraceProc
+#define TclPrecTraceProc \
+ (tclIntStubsPtr->tclPrecTraceProc) /* 88 */
+#endif
+#ifndef TclPreventAliasLoop
+#define TclPreventAliasLoop \
+ (tclIntStubsPtr->tclPreventAliasLoop) /* 89 */
+#endif
+/* Slot 90 is reserved */
+#ifndef TclProcCleanupProc
+#define TclProcCleanupProc \
+ (tclIntStubsPtr->tclProcCleanupProc) /* 91 */
+#endif
+#ifndef TclProcCompileProc
+#define TclProcCompileProc \
+ (tclIntStubsPtr->tclProcCompileProc) /* 92 */
+#endif
+#ifndef TclProcDeleteProc
+#define TclProcDeleteProc \
+ (tclIntStubsPtr->tclProcDeleteProc) /* 93 */
+#endif
+#ifndef TclProcInterpProc
+#define TclProcInterpProc \
+ (tclIntStubsPtr->tclProcInterpProc) /* 94 */
+#endif
+/* Slot 95 is reserved */
+#ifndef TclRenameCommand
+#define TclRenameCommand \
+ (tclIntStubsPtr->tclRenameCommand) /* 96 */
+#endif
+#ifndef TclResetShadowedCmdRefs
+#define TclResetShadowedCmdRefs \
+ (tclIntStubsPtr->tclResetShadowedCmdRefs) /* 97 */
+#endif
+#ifndef TclServiceIdle
+#define TclServiceIdle \
+ (tclIntStubsPtr->tclServiceIdle) /* 98 */
+#endif
+/* Slot 99 is reserved */
+/* Slot 100 is reserved */
+#ifndef TclSetPreInitScript
+#define TclSetPreInitScript \
+ (tclIntStubsPtr->tclSetPreInitScript) /* 101 */
+#endif
+#ifndef TclSetupEnv
+#define TclSetupEnv \
+ (tclIntStubsPtr->tclSetupEnv) /* 102 */
+#endif
+#ifndef TclSockGetPort
+#define TclSockGetPort \
+ (tclIntStubsPtr->tclSockGetPort) /* 103 */
+#endif
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef TclSockMinimumBuffers
+#define TclSockMinimumBuffers \
+ (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */
+#endif
+#endif /* UNIX */
+#ifdef __WIN32__
+#ifndef TclSockMinimumBuffers
+#define TclSockMinimumBuffers \
+ (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */
+#endif
+#endif /* __WIN32__ */
+/* Slot 105 is reserved */
+#ifndef TclStatDeleteProc
+#define TclStatDeleteProc \
+ (tclIntStubsPtr->tclStatDeleteProc) /* 106 */
+#endif
+#ifndef TclStatInsertProc
+#define TclStatInsertProc \
+ (tclIntStubsPtr->tclStatInsertProc) /* 107 */
+#endif
+#ifndef TclTeardownNamespace
+#define TclTeardownNamespace \
+ (tclIntStubsPtr->tclTeardownNamespace) /* 108 */
+#endif
+#ifndef TclUpdateReturnInfo
+#define TclUpdateReturnInfo \
+ (tclIntStubsPtr->tclUpdateReturnInfo) /* 109 */
+#endif
+/* Slot 110 is reserved */
+#ifndef Tcl_AddInterpResolvers
+#define Tcl_AddInterpResolvers \
+ (tclIntStubsPtr->tcl_AddInterpResolvers) /* 111 */
+#endif
+#ifndef Tcl_AppendExportList
+#define Tcl_AppendExportList \
+ (tclIntStubsPtr->tcl_AppendExportList) /* 112 */
+#endif
+#ifndef Tcl_CreateNamespace
+#define Tcl_CreateNamespace \
+ (tclIntStubsPtr->tcl_CreateNamespace) /* 113 */
+#endif
+#ifndef Tcl_DeleteNamespace
+#define Tcl_DeleteNamespace \
+ (tclIntStubsPtr->tcl_DeleteNamespace) /* 114 */
+#endif
+#ifndef Tcl_Export
+#define Tcl_Export \
+ (tclIntStubsPtr->tcl_Export) /* 115 */
+#endif
+#ifndef Tcl_FindCommand
+#define Tcl_FindCommand \
+ (tclIntStubsPtr->tcl_FindCommand) /* 116 */
+#endif
+#ifndef Tcl_FindNamespace
+#define Tcl_FindNamespace \
+ (tclIntStubsPtr->tcl_FindNamespace) /* 117 */
+#endif
+#ifndef Tcl_GetInterpResolvers
+#define Tcl_GetInterpResolvers \
+ (tclIntStubsPtr->tcl_GetInterpResolvers) /* 118 */
+#endif
+#ifndef Tcl_GetNamespaceResolvers
+#define Tcl_GetNamespaceResolvers \
+ (tclIntStubsPtr->tcl_GetNamespaceResolvers) /* 119 */
+#endif
+#ifndef Tcl_FindNamespaceVar
+#define Tcl_FindNamespaceVar \
+ (tclIntStubsPtr->tcl_FindNamespaceVar) /* 120 */
+#endif
+#ifndef Tcl_ForgetImport
+#define Tcl_ForgetImport \
+ (tclIntStubsPtr->tcl_ForgetImport) /* 121 */
+#endif
+#ifndef Tcl_GetCommandFromObj
+#define Tcl_GetCommandFromObj \
+ (tclIntStubsPtr->tcl_GetCommandFromObj) /* 122 */
+#endif
+#ifndef Tcl_GetCommandFullName
+#define Tcl_GetCommandFullName \
+ (tclIntStubsPtr->tcl_GetCommandFullName) /* 123 */
+#endif
+#ifndef Tcl_GetCurrentNamespace
+#define Tcl_GetCurrentNamespace \
+ (tclIntStubsPtr->tcl_GetCurrentNamespace) /* 124 */
+#endif
+#ifndef Tcl_GetGlobalNamespace
+#define Tcl_GetGlobalNamespace \
+ (tclIntStubsPtr->tcl_GetGlobalNamespace) /* 125 */
+#endif
+#ifndef Tcl_GetVariableFullName
+#define Tcl_GetVariableFullName \
+ (tclIntStubsPtr->tcl_GetVariableFullName) /* 126 */
+#endif
+#ifndef Tcl_Import
+#define Tcl_Import \
+ (tclIntStubsPtr->tcl_Import) /* 127 */
+#endif
+#ifndef Tcl_PopCallFrame
+#define Tcl_PopCallFrame \
+ (tclIntStubsPtr->tcl_PopCallFrame) /* 128 */
+#endif
+#ifndef Tcl_PushCallFrame
+#define Tcl_PushCallFrame \
+ (tclIntStubsPtr->tcl_PushCallFrame) /* 129 */
+#endif
+#ifndef Tcl_RemoveInterpResolvers
+#define Tcl_RemoveInterpResolvers \
+ (tclIntStubsPtr->tcl_RemoveInterpResolvers) /* 130 */
+#endif
+#ifndef Tcl_SetNamespaceResolvers
+#define Tcl_SetNamespaceResolvers \
+ (tclIntStubsPtr->tcl_SetNamespaceResolvers) /* 131 */
+#endif
+#ifndef TclpHasSockets
+#define TclpHasSockets \
+ (tclIntStubsPtr->tclpHasSockets) /* 132 */
+#endif
+#ifndef TclpGetDate
+#define TclpGetDate \
+ (tclIntStubsPtr->tclpGetDate) /* 133 */
+#endif
+#ifndef TclpStrftime
+#define TclpStrftime \
+ (tclIntStubsPtr->tclpStrftime) /* 134 */
+#endif
+#ifndef TclpCheckStackSpace
+#define TclpCheckStackSpace \
+ (tclIntStubsPtr->tclpCheckStackSpace) /* 135 */
+#endif
+/* Slot 136 is reserved */
+/* Slot 137 is reserved */
+#ifndef TclGetEnv
+#define TclGetEnv \
+ (tclIntStubsPtr->tclGetEnv) /* 138 */
+#endif
+/* Slot 139 is reserved */
+#ifndef TclLooksLikeInt
+#define TclLooksLikeInt \
+ (tclIntStubsPtr->tclLooksLikeInt) /* 140 */
+#endif
+#ifndef TclpGetCwd
+#define TclpGetCwd \
+ (tclIntStubsPtr->tclpGetCwd) /* 141 */
+#endif
+#ifndef TclSetByteCodeFromAny
+#define TclSetByteCodeFromAny \
+ (tclIntStubsPtr->tclSetByteCodeFromAny) /* 142 */
+#endif
+#ifndef TclAddLiteralObj
+#define TclAddLiteralObj \
+ (tclIntStubsPtr->tclAddLiteralObj) /* 143 */
+#endif
+#ifndef TclHideLiteral
+#define TclHideLiteral \
+ (tclIntStubsPtr->tclHideLiteral) /* 144 */
+#endif
+#ifndef TclGetAuxDataType
+#define TclGetAuxDataType \
+ (tclIntStubsPtr->tclGetAuxDataType) /* 145 */
+#endif
+#ifndef TclHandleCreate
+#define TclHandleCreate \
+ (tclIntStubsPtr->tclHandleCreate) /* 146 */
+#endif
+#ifndef TclHandleFree
+#define TclHandleFree \
+ (tclIntStubsPtr->tclHandleFree) /* 147 */
+#endif
+#ifndef TclHandlePreserve
+#define TclHandlePreserve \
+ (tclIntStubsPtr->tclHandlePreserve) /* 148 */
+#endif
+#ifndef TclHandleRelease
+#define TclHandleRelease \
+ (tclIntStubsPtr->tclHandleRelease) /* 149 */
+#endif
+#ifndef TclRegAbout
+#define TclRegAbout \
+ (tclIntStubsPtr->tclRegAbout) /* 150 */
+#endif
+#ifndef TclRegExpRangeUniChar
+#define TclRegExpRangeUniChar \
+ (tclIntStubsPtr->tclRegExpRangeUniChar) /* 151 */
+#endif
+#ifndef TclSetLibraryPath
+#define TclSetLibraryPath \
+ (tclIntStubsPtr->tclSetLibraryPath) /* 152 */
+#endif
+#ifndef TclGetLibraryPath
+#define TclGetLibraryPath \
+ (tclIntStubsPtr->tclGetLibraryPath) /* 153 */
+#endif
+/* Slot 154 is reserved */
+/* Slot 155 is reserved */
+#ifndef TclRegError
+#define TclRegError \
+ (tclIntStubsPtr->tclRegError) /* 156 */
+#endif
+#ifndef TclVarTraceExists
+#define TclVarTraceExists \
+ (tclIntStubsPtr->tclVarTraceExists) /* 157 */
+#endif
+#ifndef TclSetStartupScriptFileName
+#define TclSetStartupScriptFileName \
+ (tclIntStubsPtr->tclSetStartupScriptFileName) /* 158 */
+#endif
+#ifndef TclGetStartupScriptFileName
+#define TclGetStartupScriptFileName \
+ (tclIntStubsPtr->tclGetStartupScriptFileName) /* 159 */
+#endif
+/* Slot 160 is reserved */
+#ifndef TclChannelTransform
+#define TclChannelTransform \
+ (tclIntStubsPtr->tclChannelTransform) /* 161 */
+#endif
+#ifndef TclChannelEventScriptInvoker
+#define TclChannelEventScriptInvoker \
+ (tclIntStubsPtr->tclChannelEventScriptInvoker) /* 162 */
+#endif
+#ifndef TclGetInstructionTable
+#define TclGetInstructionTable \
+ (tclIntStubsPtr->tclGetInstructionTable) /* 163 */
+#endif
+#ifndef TclExpandCodeArray
+#define TclExpandCodeArray \
+ (tclIntStubsPtr->tclExpandCodeArray) /* 164 */
+#endif
+#ifndef TclpSetInitialEncodings
+#define TclpSetInitialEncodings \
+ (tclIntStubsPtr->tclpSetInitialEncodings) /* 165 */
+#endif
+#ifndef TclListObjSetElement
+#define TclListObjSetElement \
+ (tclIntStubsPtr->tclListObjSetElement) /* 166 */
+#endif
+#ifndef TclSetStartupScriptPath
+#define TclSetStartupScriptPath \
+ (tclIntStubsPtr->tclSetStartupScriptPath) /* 167 */
+#endif
+#ifndef TclGetStartupScriptPath
+#define TclGetStartupScriptPath \
+ (tclIntStubsPtr->tclGetStartupScriptPath) /* 168 */
+#endif
+#ifndef TclpUtfNcmp2
+#define TclpUtfNcmp2 \
+ (tclIntStubsPtr->tclpUtfNcmp2) /* 169 */
+#endif
+#ifndef TclCheckInterpTraces
+#define TclCheckInterpTraces \
+ (tclIntStubsPtr->tclCheckInterpTraces) /* 170 */
+#endif
+#ifndef TclCheckExecutionTraces
+#define TclCheckExecutionTraces \
+ (tclIntStubsPtr->tclCheckExecutionTraces) /* 171 */
+#endif
+#ifndef TclInThreadExit
+#define TclInThreadExit \
+ (tclIntStubsPtr->tclInThreadExit) /* 172 */
+#endif
+#ifndef TclUniCharMatch
+#define TclUniCharMatch \
+ (tclIntStubsPtr->tclUniCharMatch) /* 173 */
+#endif
+
+#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#endif /* _TCLINTDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclIntPlatDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tclIntPlatDecls.h
new file mode 100644
index 00000000000..d69d3e9eead
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclIntPlatDecls.h
@@ -0,0 +1,585 @@
+/*
+ * tclIntPlatDecls.h --
+ *
+ * This file contains the declarations for all platform dependent
+ * unsupported functions that are exported by the Tcl library. These
+ * interfaces are not guaranteed to remain the same between
+ * versions. Use at your own risk.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * All rights reserved.
+ *
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.19 2002/12/06 23:22:59 hobbs Exp $
+ */
+
+#ifndef _TCLINTPLATDECLS
+#define _TCLINTPLATDECLS
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tclInt.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+/* 0 */
+EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel chan));
+/* 1 */
+EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file));
+/* 2 */
+EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_((
+ TclFile readFile, TclFile writeFile,
+ TclFile errorFile, int numPids,
+ Tcl_Pid * pidPtr));
+/* 3 */
+EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe,
+ TclFile * writePipe));
+/* 4 */
+EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp,
+ int argc, Tcl_Obj *CONST *objv,
+ TclFile inputFile, TclFile outputFile,
+ TclFile errorFile, Tcl_Pid * pidPtr));
+/* Slot 5 is reserved */
+/* 6 */
+EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel,
+ int direction));
+/* 7 */
+EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char * fname,
+ int mode));
+/* 8 */
+EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask,
+ int timeout));
+/* 9 */
+EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((
+ CONST char * contents));
+/* 10 */
+EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR * dir));
+/* 11 */
+EXTERN struct tm * TclpLocaltime _ANSI_ARGS_((time_t * clock));
+/* 12 */
+EXTERN struct tm * TclpGmtime _ANSI_ARGS_((time_t * clock));
+/* 13 */
+EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr));
+#endif /* UNIX */
+#ifdef __WIN32__
+/* 0 */
+EXTERN void TclWinConvertError _ANSI_ARGS_((DWORD errCode));
+/* 1 */
+EXTERN void TclWinConvertWSAError _ANSI_ARGS_((DWORD errCode));
+/* 2 */
+EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char * nm,
+ CONST char * proto));
+/* 3 */
+EXTERN int TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level,
+ int optname, char FAR * optval,
+ int FAR * optlen));
+/* 4 */
+EXTERN HINSTANCE TclWinGetTclInstance _ANSI_ARGS_((void));
+/* Slot 5 is reserved */
+/* 6 */
+EXTERN u_short TclWinNToHS _ANSI_ARGS_((u_short ns));
+/* 7 */
+EXTERN int TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level,
+ int optname, CONST char FAR * optval,
+ int optlen));
+/* 8 */
+EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid));
+/* 9 */
+EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void));
+/* Slot 10 is reserved */
+/* 11 */
+EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Channel chan));
+/* 12 */
+EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file));
+/* 13 */
+EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_((
+ TclFile readFile, TclFile writeFile,
+ TclFile errorFile, int numPids,
+ Tcl_Pid * pidPtr));
+/* 14 */
+EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe,
+ TclFile * writePipe));
+/* 15 */
+EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp,
+ int argc, Tcl_Obj *CONST *objv,
+ TclFile inputFile, TclFile outputFile,
+ TclFile errorFile, Tcl_Pid * pidPtr));
+/* Slot 16 is reserved */
+/* Slot 17 is reserved */
+/* 18 */
+EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel,
+ int direction));
+/* 19 */
+EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char * fname,
+ int mode));
+/* 20 */
+EXTERN void TclWinAddProcess _ANSI_ARGS_((HANDLE hProcess,
+ DWORD id));
+/* Slot 21 is reserved */
+/* 22 */
+EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((
+ CONST char * contents));
+/* 23 */
+EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst));
+/* 24 */
+EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char * path));
+/* 25 */
+EXTERN TclPlatformType * TclWinGetPlatform _ANSI_ARGS_((void));
+/* 26 */
+EXTERN void TclWinSetInterfaces _ANSI_ARGS_((int wide));
+/* 27 */
+EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void));
+/* 28 */
+EXTERN void TclWinResetInterfaces _ANSI_ARGS_((void));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 0 */
+EXTERN VOID * TclpSysAlloc _ANSI_ARGS_((long size, int isBin));
+/* 1 */
+EXTERN void TclpSysFree _ANSI_ARGS_((VOID * ptr));
+/* 2 */
+EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID * cp,
+ unsigned int size));
+/* 3 */
+EXTERN void TclpExit _ANSI_ARGS_((int status));
+/* 4 */
+EXTERN int FSpGetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
+/* 5 */
+EXTERN int FSpSetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
+/* 6 */
+EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum,
+ OSType folderType, Boolean createFolder,
+ FSSpec * spec));
+/* 7 */
+EXTERN void GetGlobalMouseTcl _ANSI_ARGS_((Point * mouse));
+/* 8 */
+EXTERN pascal OSErr FSpGetDirectoryIDTcl _ANSI_ARGS_((
+ CONST FSSpec * spec, long * theDirID,
+ Boolean * isDirectory));
+/* 9 */
+EXTERN pascal short FSpOpenResFileCompatTcl _ANSI_ARGS_((
+ CONST FSSpec * spec, SignedByte permission));
+/* 10 */
+EXTERN pascal void FSpCreateResFileCompatTcl _ANSI_ARGS_((
+ CONST FSSpec * spec, OSType creator,
+ OSType fileType, ScriptCode scriptTag));
+/* 11 */
+EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length,
+ CONST char * path, FSSpecPtr theSpec));
+/* 12 */
+EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec,
+ int * length, Handle * fullPath));
+/* 13 */
+EXTERN void TclMacExitHandler _ANSI_ARGS_((void));
+/* 14 */
+EXTERN void TclMacInitExitToShell _ANSI_ARGS_((int usePatch));
+/* 15 */
+EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_((
+ ExitToShellProcPtr newProc));
+/* 16 */
+EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error));
+/* 17 */
+EXTERN void TclMacRemoveTimer _ANSI_ARGS_((void * timerToken));
+/* 18 */
+EXTERN void * TclMacStartTimer _ANSI_ARGS_((long ms));
+/* 19 */
+EXTERN int TclMacTimerExpired _ANSI_ARGS_((void * timerToken));
+/* 20 */
+EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_((
+ short fileRef, Tcl_Obj * tokenPtr,
+ int insert));
+/* 21 */
+EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_((
+ char * tokenPtr, Tcl_Obj * resultPtr));
+/* 22 */
+EXTERN int TclMacCreateEnv _ANSI_ARGS_((void));
+/* 23 */
+EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char * path,
+ CONST char * mode));
+/* 24 */
+EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst));
+/* 25 */
+EXTERN int TclMacChmod _ANSI_ARGS_((CONST char * path, int mode));
+/* 26 */
+EXTERN int FSpLLocationFromPath _ANSI_ARGS_((int length,
+ CONST char * path, FSSpecPtr theSpec));
+#endif /* MAC_TCL */
+
+typedef struct TclIntPlatStubs {
+ int magic;
+ struct TclIntPlatStubHooks *hooks;
+
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 0 */
+ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 1 */
+ Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr)); /* 2 */
+ int (*tclpCreatePipe) _ANSI_ARGS_((TclFile * readPipe, TclFile * writePipe)); /* 3 */
+ int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 4 */
+ void *reserved5;
+ TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 6 */
+ TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode)); /* 7 */
+ int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 8 */
+ TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 9 */
+ Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR * dir)); /* 10 */
+ struct tm * (*tclpLocaltime) _ANSI_ARGS_((time_t * clock)); /* 11 */
+ struct tm * (*tclpGmtime) _ANSI_ARGS_((time_t * clock)); /* 12 */
+ char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr)); /* 13 */
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */
+ void (*tclWinConvertWSAError) _ANSI_ARGS_((DWORD errCode)); /* 1 */
+ struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char * nm, CONST char * proto)); /* 2 */
+ int (*tclWinGetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, char FAR * optval, int FAR * optlen)); /* 3 */
+ HINSTANCE (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */
+ void *reserved5;
+ u_short (*tclWinNToHS) _ANSI_ARGS_((u_short ns)); /* 6 */
+ int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, CONST char FAR * optval, int optlen)); /* 7 */
+ unsigned long (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */
+ int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */
+ void *reserved10;
+ void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 11 */
+ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 12 */
+ Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr)); /* 13 */
+ int (*tclpCreatePipe) _ANSI_ARGS_((TclFile * readPipe, TclFile * writePipe)); /* 14 */
+ int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 15 */
+ void *reserved16;
+ void *reserved17;
+ TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 18 */
+ TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode)); /* 19 */
+ void (*tclWinAddProcess) _ANSI_ARGS_((HANDLE hProcess, DWORD id)); /* 20 */
+ void *reserved21;
+ TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 22 */
+ char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 23 */
+ char * (*tclWinNoBackslash) _ANSI_ARGS_((char * path)); /* 24 */
+ TclPlatformType * (*tclWinGetPlatform) _ANSI_ARGS_((void)); /* 25 */
+ void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */
+ void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */
+ void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin)); /* 0 */
+ void (*tclpSysFree) _ANSI_ARGS_((VOID * ptr)); /* 1 */
+ VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID * cp, unsigned int size)); /* 2 */
+ void (*tclpExit) _ANSI_ARGS_((int status)); /* 3 */
+ int (*fSpGetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 4 */
+ int (*fSpSetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 5 */
+ OSErr (*fSpFindFolder) _ANSI_ARGS_((short vRefNum, OSType folderType, Boolean createFolder, FSSpec * spec)); /* 6 */
+ void (*getGlobalMouseTcl) _ANSI_ARGS_((Point * mouse)); /* 7 */
+ pascal OSErr (*fSpGetDirectoryIDTcl) _ANSI_ARGS_((CONST FSSpec * spec, long * theDirID, Boolean * isDirectory)); /* 8 */
+ pascal short (*fSpOpenResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, SignedByte permission)); /* 9 */
+ pascal void (*fSpCreateResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, OSType creator, OSType fileType, ScriptCode scriptTag)); /* 10 */
+ int (*fSpLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 11 */
+ OSErr (*fSpPathFromLocation) _ANSI_ARGS_((FSSpecPtr theSpec, int * length, Handle * fullPath)); /* 12 */
+ void (*tclMacExitHandler) _ANSI_ARGS_((void)); /* 13 */
+ void (*tclMacInitExitToShell) _ANSI_ARGS_((int usePatch)); /* 14 */
+ OSErr (*tclMacInstallExitToShellPatch) _ANSI_ARGS_((ExitToShellProcPtr newProc)); /* 15 */
+ int (*tclMacOSErrorToPosixError) _ANSI_ARGS_((int error)); /* 16 */
+ void (*tclMacRemoveTimer) _ANSI_ARGS_((void * timerToken)); /* 17 */
+ void * (*tclMacStartTimer) _ANSI_ARGS_((long ms)); /* 18 */
+ int (*tclMacTimerExpired) _ANSI_ARGS_((void * timerToken)); /* 19 */
+ int (*tclMacRegisterResourceFork) _ANSI_ARGS_((short fileRef, Tcl_Obj * tokenPtr, int insert)); /* 20 */
+ short (*tclMacUnRegisterResourceFork) _ANSI_ARGS_((char * tokenPtr, Tcl_Obj * resultPtr)); /* 21 */
+ int (*tclMacCreateEnv) _ANSI_ARGS_((void)); /* 22 */
+ FILE * (*tclMacFOpenHack) _ANSI_ARGS_((CONST char * path, CONST char * mode)); /* 23 */
+ char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 24 */
+ int (*tclMacChmod) _ANSI_ARGS_((CONST char * path, int mode)); /* 25 */
+ int (*fSpLLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 26 */
+#endif /* MAC_TCL */
+} TclIntPlatStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TclIntPlatStubs *tclIntPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+#ifndef TclGetAndDetachPids
+#define TclGetAndDetachPids \
+ (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */
+#endif
+#ifndef TclpCloseFile
+#define TclpCloseFile \
+ (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */
+#endif
+#ifndef TclpCreateCommandChannel
+#define TclpCreateCommandChannel \
+ (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */
+#endif
+#ifndef TclpCreatePipe
+#define TclpCreatePipe \
+ (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */
+#endif
+#ifndef TclpCreateProcess
+#define TclpCreateProcess \
+ (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */
+#endif
+/* Slot 5 is reserved */
+#ifndef TclpMakeFile
+#define TclpMakeFile \
+ (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */
+#endif
+#ifndef TclpOpenFile
+#define TclpOpenFile \
+ (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */
+#endif
+#ifndef TclUnixWaitForFile
+#define TclUnixWaitForFile \
+ (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */
+#endif
+#ifndef TclpCreateTempFile
+#define TclpCreateTempFile \
+ (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */
+#endif
+#ifndef TclpReaddir
+#define TclpReaddir \
+ (tclIntPlatStubsPtr->tclpReaddir) /* 10 */
+#endif
+#ifndef TclpLocaltime
+#define TclpLocaltime \
+ (tclIntPlatStubsPtr->tclpLocaltime) /* 11 */
+#endif
+#ifndef TclpGmtime
+#define TclpGmtime \
+ (tclIntPlatStubsPtr->tclpGmtime) /* 12 */
+#endif
+#ifndef TclpInetNtoa
+#define TclpInetNtoa \
+ (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */
+#endif
+#endif /* UNIX */
+#ifdef __WIN32__
+#ifndef TclWinConvertError
+#define TclWinConvertError \
+ (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */
+#endif
+#ifndef TclWinConvertWSAError
+#define TclWinConvertWSAError \
+ (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */
+#endif
+#ifndef TclWinGetServByName
+#define TclWinGetServByName \
+ (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */
+#endif
+#ifndef TclWinGetSockOpt
+#define TclWinGetSockOpt \
+ (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */
+#endif
+#ifndef TclWinGetTclInstance
+#define TclWinGetTclInstance \
+ (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */
+#endif
+/* Slot 5 is reserved */
+#ifndef TclWinNToHS
+#define TclWinNToHS \
+ (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */
+#endif
+#ifndef TclWinSetSockOpt
+#define TclWinSetSockOpt \
+ (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */
+#endif
+#ifndef TclpGetPid
+#define TclpGetPid \
+ (tclIntPlatStubsPtr->tclpGetPid) /* 8 */
+#endif
+#ifndef TclWinGetPlatformId
+#define TclWinGetPlatformId \
+ (tclIntPlatStubsPtr->tclWinGetPlatformId) /* 9 */
+#endif
+/* Slot 10 is reserved */
+#ifndef TclGetAndDetachPids
+#define TclGetAndDetachPids \
+ (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */
+#endif
+#ifndef TclpCloseFile
+#define TclpCloseFile \
+ (tclIntPlatStubsPtr->tclpCloseFile) /* 12 */
+#endif
+#ifndef TclpCreateCommandChannel
+#define TclpCreateCommandChannel \
+ (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 13 */
+#endif
+#ifndef TclpCreatePipe
+#define TclpCreatePipe \
+ (tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */
+#endif
+#ifndef TclpCreateProcess
+#define TclpCreateProcess \
+ (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */
+#endif
+/* Slot 16 is reserved */
+/* Slot 17 is reserved */
+#ifndef TclpMakeFile
+#define TclpMakeFile \
+ (tclIntPlatStubsPtr->tclpMakeFile) /* 18 */
+#endif
+#ifndef TclpOpenFile
+#define TclpOpenFile \
+ (tclIntPlatStubsPtr->tclpOpenFile) /* 19 */
+#endif
+#ifndef TclWinAddProcess
+#define TclWinAddProcess \
+ (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */
+#endif
+/* Slot 21 is reserved */
+#ifndef TclpCreateTempFile
+#define TclpCreateTempFile \
+ (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */
+#endif
+#ifndef TclpGetTZName
+#define TclpGetTZName \
+ (tclIntPlatStubsPtr->tclpGetTZName) /* 23 */
+#endif
+#ifndef TclWinNoBackslash
+#define TclWinNoBackslash \
+ (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */
+#endif
+#ifndef TclWinGetPlatform
+#define TclWinGetPlatform \
+ (tclIntPlatStubsPtr->tclWinGetPlatform) /* 25 */
+#endif
+#ifndef TclWinSetInterfaces
+#define TclWinSetInterfaces \
+ (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */
+#endif
+#ifndef TclWinFlushDirtyChannels
+#define TclWinFlushDirtyChannels \
+ (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */
+#endif
+#ifndef TclWinResetInterfaces
+#define TclWinResetInterfaces \
+ (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TclpSysAlloc
+#define TclpSysAlloc \
+ (tclIntPlatStubsPtr->tclpSysAlloc) /* 0 */
+#endif
+#ifndef TclpSysFree
+#define TclpSysFree \
+ (tclIntPlatStubsPtr->tclpSysFree) /* 1 */
+#endif
+#ifndef TclpSysRealloc
+#define TclpSysRealloc \
+ (tclIntPlatStubsPtr->tclpSysRealloc) /* 2 */
+#endif
+#ifndef TclpExit
+#define TclpExit \
+ (tclIntPlatStubsPtr->tclpExit) /* 3 */
+#endif
+#ifndef FSpGetDefaultDir
+#define FSpGetDefaultDir \
+ (tclIntPlatStubsPtr->fSpGetDefaultDir) /* 4 */
+#endif
+#ifndef FSpSetDefaultDir
+#define FSpSetDefaultDir \
+ (tclIntPlatStubsPtr->fSpSetDefaultDir) /* 5 */
+#endif
+#ifndef FSpFindFolder
+#define FSpFindFolder \
+ (tclIntPlatStubsPtr->fSpFindFolder) /* 6 */
+#endif
+#ifndef GetGlobalMouseTcl
+#define GetGlobalMouseTcl \
+ (tclIntPlatStubsPtr->getGlobalMouseTcl) /* 7 */
+#endif
+#ifndef FSpGetDirectoryIDTcl
+#define FSpGetDirectoryIDTcl \
+ (tclIntPlatStubsPtr->fSpGetDirectoryIDTcl) /* 8 */
+#endif
+#ifndef FSpOpenResFileCompatTcl
+#define FSpOpenResFileCompatTcl \
+ (tclIntPlatStubsPtr->fSpOpenResFileCompatTcl) /* 9 */
+#endif
+#ifndef FSpCreateResFileCompatTcl
+#define FSpCreateResFileCompatTcl \
+ (tclIntPlatStubsPtr->fSpCreateResFileCompatTcl) /* 10 */
+#endif
+#ifndef FSpLocationFromPath
+#define FSpLocationFromPath \
+ (tclIntPlatStubsPtr->fSpLocationFromPath) /* 11 */
+#endif
+#ifndef FSpPathFromLocation
+#define FSpPathFromLocation \
+ (tclIntPlatStubsPtr->fSpPathFromLocation) /* 12 */
+#endif
+#ifndef TclMacExitHandler
+#define TclMacExitHandler \
+ (tclIntPlatStubsPtr->tclMacExitHandler) /* 13 */
+#endif
+#ifndef TclMacInitExitToShell
+#define TclMacInitExitToShell \
+ (tclIntPlatStubsPtr->tclMacInitExitToShell) /* 14 */
+#endif
+#ifndef TclMacInstallExitToShellPatch
+#define TclMacInstallExitToShellPatch \
+ (tclIntPlatStubsPtr->tclMacInstallExitToShellPatch) /* 15 */
+#endif
+#ifndef TclMacOSErrorToPosixError
+#define TclMacOSErrorToPosixError \
+ (tclIntPlatStubsPtr->tclMacOSErrorToPosixError) /* 16 */
+#endif
+#ifndef TclMacRemoveTimer
+#define TclMacRemoveTimer \
+ (tclIntPlatStubsPtr->tclMacRemoveTimer) /* 17 */
+#endif
+#ifndef TclMacStartTimer
+#define TclMacStartTimer \
+ (tclIntPlatStubsPtr->tclMacStartTimer) /* 18 */
+#endif
+#ifndef TclMacTimerExpired
+#define TclMacTimerExpired \
+ (tclIntPlatStubsPtr->tclMacTimerExpired) /* 19 */
+#endif
+#ifndef TclMacRegisterResourceFork
+#define TclMacRegisterResourceFork \
+ (tclIntPlatStubsPtr->tclMacRegisterResourceFork) /* 20 */
+#endif
+#ifndef TclMacUnRegisterResourceFork
+#define TclMacUnRegisterResourceFork \
+ (tclIntPlatStubsPtr->tclMacUnRegisterResourceFork) /* 21 */
+#endif
+#ifndef TclMacCreateEnv
+#define TclMacCreateEnv \
+ (tclIntPlatStubsPtr->tclMacCreateEnv) /* 22 */
+#endif
+#ifndef TclMacFOpenHack
+#define TclMacFOpenHack \
+ (tclIntPlatStubsPtr->tclMacFOpenHack) /* 23 */
+#endif
+#ifndef TclpGetTZName
+#define TclpGetTZName \
+ (tclIntPlatStubsPtr->tclpGetTZName) /* 24 */
+#endif
+#ifndef TclMacChmod
+#define TclMacChmod \
+ (tclIntPlatStubsPtr->tclMacChmod) /* 25 */
+#endif
+#ifndef FSpLLocationFromPath
+#define FSpLLocationFromPath \
+ (tclIntPlatStubsPtr->fSpLLocationFromPath) /* 26 */
+#endif
+#endif /* MAC_TCL */
+
+#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#endif /* _TCLINTPLATDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclMath.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tclMath.h
new file mode 100644
index 00000000000..ee1a02e375f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclMath.h
@@ -0,0 +1,27 @@
+/*
+ * tclMath.h --
+ *
+ * This file is necessary because of Metrowerks CodeWarrior Pro 1
+ * on the Macintosh. With 8-byte doubles turned on, the definitions of
+ * sin, cos, acos, etc., are screwed up. They are fine as long as
+ * they are used as function calls, but if the function pointers
+ * are passed around and used, they will crash hard on the 68K.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tclMath.h,v 1.2 1998/09/14 18:40:01 stanton Exp $
+ */
+
+#ifndef _TCLMATH
+#define _TCLMATH
+
+#if defined(MAC_TCL)
+# include "tclMacMath.h"
+#else
+# include <math.h>
+#endif
+
+#endif /* _TCLMATH */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclPlatDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tclPlatDecls.h
new file mode 100644
index 00000000000..3b567dbeb95
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclPlatDecls.h
@@ -0,0 +1,197 @@
+/*
+ * tclPlatDecls.h --
+ *
+ * Declarations of platform specific Tcl APIs.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * All rights reserved.
+ *
+ * RCS: @(#) $Id: tclPlatDecls.h,v 1.18.2.1 2003/05/13 08:41:26 das Exp $
+ */
+
+#ifndef _TCLPLATDECLS
+#define _TCLPLATDECLS
+
+/*
+ * Pull in the typedef of TCHAR for windows.
+ */
+#if defined(__CYGWIN__)
+ typedef char TCHAR;
+#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
+# include <tchar.h>
+# ifndef _TCHAR_DEFINED
+ /* Borland seems to forget to set this. */
+ typedef _TCHAR TCHAR;
+# define _TCHAR_DEFINED
+# endif
+# if defined(_MSC_VER) && defined(__STDC__)
+ /* MSVC++ misses this. */
+ typedef _TCHAR TCHAR;
+# endif
+#endif
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+#ifdef __WIN32__
+/* 0 */
+EXTERN TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str,
+ int len, Tcl_DString * dsPtr));
+/* 1 */
+EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str,
+ int len, Tcl_DString * dsPtr));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 0 */
+EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_((
+ Tcl_MacConvertEventPtr procPtr));
+/* 1 */
+EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_((
+ Handle resource));
+/* 2 */
+EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * resourceName,
+ int resourceNumber, CONST char * fileName));
+/* 3 */
+EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp,
+ long resourceType, CONST char * resourceName,
+ int resourceNumber, CONST char * resFileRef,
+ int * releaseIt));
+/* 4 */
+EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ OSType * osTypePtr));
+/* 5 */
+EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr,
+ OSType osType));
+/* 6 */
+EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
+/* 7 */
+EXTERN int strncasecmp _ANSI_ARGS_((CONST char * s1,
+ CONST char * s2, size_t n));
+/* 8 */
+EXTERN int strcasecmp _ANSI_ARGS_((CONST char * s1,
+ CONST char * s2));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TCL
+/* 0 */
+EXTERN int Tcl_MacOSXOpenBundleResources _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * bundleName,
+ int hasResourceFile, int maxPathLen,
+ char * libraryPath));
+/* 1 */
+EXTERN int Tcl_MacOSXOpenVersionedBundleResources _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * bundleName,
+ CONST char * bundleVersion,
+ int hasResourceFile, int maxPathLen,
+ char * libraryPath));
+#endif /* MAC_OSX_TCL */
+
+typedef struct TclPlatStubs {
+ int magic;
+ struct TclPlatStubHooks *hooks;
+
+#ifdef __WIN32__
+ TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); /* 0 */
+ char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); /* 1 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */
+ char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); /* 1 */
+ int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * resourceName, int resourceNumber, CONST char * fileName)); /* 2 */
+ Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, CONST char * resourceName, int resourceNumber, CONST char * resFileRef, int * releaseIt)); /* 3 */
+ int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr)); /* 4 */
+ void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType)); /* 5 */
+ Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); /* 6 */
+ int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 7 */
+ int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); /* 8 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TCL
+ int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 0 */
+ int (*tcl_MacOSXOpenVersionedBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 1 */
+#endif /* MAC_OSX_TCL */
+} TclPlatStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TclPlatStubs *tclPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifdef __WIN32__
+#ifndef Tcl_WinUtfToTChar
+#define Tcl_WinUtfToTChar \
+ (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
+#endif
+#ifndef Tcl_WinTCharToUtf
+#define Tcl_WinTCharToUtf \
+ (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef Tcl_MacSetEventProc
+#define Tcl_MacSetEventProc \
+ (tclPlatStubsPtr->tcl_MacSetEventProc) /* 0 */
+#endif
+#ifndef Tcl_MacConvertTextResource
+#define Tcl_MacConvertTextResource \
+ (tclPlatStubsPtr->tcl_MacConvertTextResource) /* 1 */
+#endif
+#ifndef Tcl_MacEvalResource
+#define Tcl_MacEvalResource \
+ (tclPlatStubsPtr->tcl_MacEvalResource) /* 2 */
+#endif
+#ifndef Tcl_MacFindResource
+#define Tcl_MacFindResource \
+ (tclPlatStubsPtr->tcl_MacFindResource) /* 3 */
+#endif
+#ifndef Tcl_GetOSTypeFromObj
+#define Tcl_GetOSTypeFromObj \
+ (tclPlatStubsPtr->tcl_GetOSTypeFromObj) /* 4 */
+#endif
+#ifndef Tcl_SetOSTypeObj
+#define Tcl_SetOSTypeObj \
+ (tclPlatStubsPtr->tcl_SetOSTypeObj) /* 5 */
+#endif
+#ifndef Tcl_NewOSTypeObj
+#define Tcl_NewOSTypeObj \
+ (tclPlatStubsPtr->tcl_NewOSTypeObj) /* 6 */
+#endif
+#ifndef strncasecmp
+#define strncasecmp \
+ (tclPlatStubsPtr->strncasecmp) /* 7 */
+#endif
+#ifndef strcasecmp
+#define strcasecmp \
+ (tclPlatStubsPtr->strcasecmp) /* 8 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TCL
+#ifndef Tcl_MacOSXOpenBundleResources
+#define Tcl_MacOSXOpenBundleResources \
+ (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
+#endif
+#ifndef Tcl_MacOSXOpenVersionedBundleResources
+#define Tcl_MacOSXOpenVersionedBundleResources \
+ (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
+#endif
+#endif /* MAC_OSX_TCL */
+
+#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#endif /* _TCLPLATDECLS */
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tclWinInt.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tclWinInt.h
new file mode 100644
index 00000000000..3248ac88f27
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tclWinInt.h
@@ -0,0 +1,145 @@
+/*
+ * tclWinInt.h --
+ *
+ * Declarations of Windows-specific shared variables and procedures.
+ *
+ * Copyright (c) 1994-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tclWinInt.h,v 1.20.2.1 2003/04/14 15:46:01 vincentdarley Exp $
+ */
+
+#ifndef _TCLWININT
+#define _TCLWININT
+
+#ifndef _TCLINT
+#include "tclInt.h"
+#endif
+#ifndef _TCLPORT
+#include "tclPort.h"
+#endif
+
+/*
+ * The following specifies how much stack space TclpCheckStackSpace()
+ * ensures is available. TclpCheckStackSpace() is called by Tcl_EvalObj()
+ * to help avoid overflowing the stack in the case of infinite recursion.
+ */
+
+#define TCL_WIN_STACK_THRESHOLD 0x2000
+
+#ifdef BUILD_tcl
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Some versions of Borland C have a define for the OSVERSIONINFO for
+ * Win32s and for NT, but not for Windows 95.
+ */
+
+#ifndef VER_PLATFORM_WIN32_WINDOWS
+#define VER_PLATFORM_WIN32_WINDOWS 1
+#endif
+
+/*
+ * The following structure keeps track of whether we are using the
+ * multi-byte or the wide-character interfaces to the operating system.
+ * System calls should be made through the following function table.
+ */
+
+typedef union {
+ WIN32_FIND_DATAA a;
+ WIN32_FIND_DATAW w;
+} WIN32_FIND_DATAT;
+
+typedef struct TclWinProcs {
+ int useWide;
+
+ BOOL (WINAPI *buildCommDCBProc)(CONST TCHAR *, LPDCB);
+ TCHAR *(WINAPI *charLowerProc)(TCHAR *);
+ BOOL (WINAPI *copyFileProc)(CONST TCHAR *, CONST TCHAR *, BOOL);
+ BOOL (WINAPI *createDirectoryProc)(CONST TCHAR *, LPSECURITY_ATTRIBUTES);
+ HANDLE (WINAPI *createFileProc)(CONST TCHAR *, DWORD, DWORD,
+ LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
+ BOOL (WINAPI *createProcessProc)(CONST TCHAR *, TCHAR *,
+ LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD,
+ LPVOID, CONST TCHAR *, LPSTARTUPINFOA, LPPROCESS_INFORMATION);
+ BOOL (WINAPI *deleteFileProc)(CONST TCHAR *);
+ HANDLE (WINAPI *findFirstFileProc)(CONST TCHAR *, WIN32_FIND_DATAT *);
+ BOOL (WINAPI *findNextFileProc)(HANDLE, WIN32_FIND_DATAT *);
+ BOOL (WINAPI *getComputerNameProc)(WCHAR *, LPDWORD);
+ DWORD (WINAPI *getCurrentDirectoryProc)(DWORD, WCHAR *);
+ DWORD (WINAPI *getFileAttributesProc)(CONST TCHAR *);
+ DWORD (WINAPI *getFullPathNameProc)(CONST TCHAR *, DWORD nBufferLength,
+ WCHAR *, TCHAR **);
+ DWORD (WINAPI *getModuleFileNameProc)(HMODULE, WCHAR *, int);
+ DWORD (WINAPI *getShortPathNameProc)(CONST TCHAR *, WCHAR *, DWORD);
+ UINT (WINAPI *getTempFileNameProc)(CONST TCHAR *, CONST TCHAR *, UINT,
+ WCHAR *);
+ DWORD (WINAPI *getTempPathProc)(DWORD, WCHAR *);
+ BOOL (WINAPI *getVolumeInformationProc)(CONST TCHAR *, WCHAR *, DWORD,
+ LPDWORD, LPDWORD, LPDWORD, WCHAR *, DWORD);
+ HINSTANCE (WINAPI *loadLibraryProc)(CONST TCHAR *);
+ TCHAR (WINAPI *lstrcpyProc)(WCHAR *, CONST TCHAR *);
+ BOOL (WINAPI *moveFileProc)(CONST TCHAR *, CONST TCHAR *);
+ BOOL (WINAPI *removeDirectoryProc)(CONST TCHAR *);
+ DWORD (WINAPI *searchPathProc)(CONST TCHAR *, CONST TCHAR *,
+ CONST TCHAR *, DWORD, WCHAR *, TCHAR **);
+ BOOL (WINAPI *setCurrentDirectoryProc)(CONST TCHAR *);
+ BOOL (WINAPI *setFileAttributesProc)(CONST TCHAR *, DWORD);
+ /*
+ * These two function pointers will only be set when
+ * Tcl_FindExecutable is called. If you don't ever call that
+ * function, the application will crash whenever WinTcl tries to call
+ * functions through these null pointers. That is not a bug in Tcl
+ * -- Tcl_FindExecutable is obligatory in recent Tcl releases.
+ */
+ BOOL (WINAPI *getFileAttributesExProc)(CONST TCHAR *,
+ GET_FILEEX_INFO_LEVELS, LPVOID);
+ BOOL (WINAPI *createHardLinkProc)(CONST TCHAR*, CONST TCHAR*,
+ LPSECURITY_ATTRIBUTES);
+
+ INT (__cdecl *utimeProc)(CONST TCHAR*, struct _utimbuf *);
+ /* These two are also NULL at start; see comment above */
+ HANDLE (WINAPI *findFirstFileExProc)(CONST TCHAR*, UINT,
+ LPVOID, UINT,
+ LPVOID, DWORD);
+ BOOL (WINAPI *getVolumeNameForVMPProc)(CONST TCHAR*, TCHAR*, DWORD);
+} TclWinProcs;
+
+EXTERN TclWinProcs *tclWinProcs;
+
+/*
+ * Declarations of functions that are not accessible by way of the
+ * stubs table.
+ */
+
+EXTERN void TclWinEncodingsCleanup();
+EXTERN void TclWinResetInterfaceEncodings();
+EXTERN void TclWinInit(HINSTANCE hInst);
+EXTERN int TclWinSymLinkCopyDirectory(CONST TCHAR* LinkOriginal,
+ CONST TCHAR* LinkCopy);
+EXTERN int TclWinSymLinkDelete(CONST TCHAR* LinkOriginal,
+ int linkOnly);
+EXTERN char TclWinDriveLetterForVolMountPoint(CONST WCHAR *mountPoint);
+#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
+EXTERN void TclWinFreeAllocCache(void);
+EXTERN void TclFreeAllocCache(void *);
+EXTERN Tcl_Mutex *TclpNewAllocMutex(void);
+EXTERN void *TclpGetAllocCache(void);
+EXTERN void TclpSetAllocCache(void *);
+#endif /* TCL_THREADS */
+
+/* Needed by tclWinFile.c and tclWinFCmd.c */
+#ifndef FILE_ATTRIBUTE_REPARSE_POINT
+#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
+#endif
+
+#include "tclIntPlatDecls.h"
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TCLWININT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tix.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tix.h
new file mode 100644
index 00000000000..ce5a411e8f7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tix.h
@@ -0,0 +1,512 @@
+
+/* $Id: tix.h,v 1.4.2.2 2001/12/09 03:10:49 idiscovery Exp $ */
+
+/*
+ * tix.h --
+ *
+ * This is the standard header file for all tix C code. It
+ * defines many macros and utility functions to make it easier to
+ * write TCL commands and TK widgets in C. No more needs to write
+ * 2000 line functions!
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+#ifndef _TIX_PORT_H_
+#include "tixPort.h"
+#endif
+#ifndef _TIX
+#define _TIX
+#define _TIX_H_
+
+#ifndef TIX_VERSION
+#define TIX_VERSION "8.1"
+#endif
+#define TIX_PATCHLEVEL "8.1.4"
+#define TIX_PATCH_LEVEL TIX_PATCHLEVEL
+
+#define TIX_RELEASE "8.1.4"
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+
+#if defined(__WIN32__) || defined(_WIN32) || defined (__BORLAND) || defined(_Windows)
+#ifndef _WINDOWS
+#define _WINDOWS
+#endif
+#endif
+
+/*
+ * When building Tix itself, BUILD_tix should be defined by the makefile
+ * so that all EXTERN declarations get DLLEXPORT; when building apps
+ * using Tix, BUILD_tix should NOT be defined so that all EXTERN
+ * declarations get DLLIMPORT as defined in tcl.h
+ *
+ * NOTE: This ifdef MUST appear after the include of tcl.h and tk.h
+ * because the EXTERN declarations in those files need DLLIMPORT.
+ */
+/*
+ * These macros are used to control whether functions are being declared for
+ * import or export. If a function is being declared while it is being built
+ * to be included in a shared library, then it should have the DLLEXPORT
+ * storage class. If is being declared for use by a module that is going to
+ * link against the shared library, then it should have the DLLIMPORT storage
+ * class. If the symbol is beind declared for a static build or for use from a
+ * stub library, then the storage class should be empty.
+ *
+ * The convention is that a macro called BUILD_xxxx, where xxxx is the
+ * name of a library we are building, is set on the compile line for sources
+ * that are to be placed in the library. When this macro is set, the
+ * storage class will be set to DLLEXPORT. At the end of the header file, the
+ * storage class will be reset to DLLIMPORt.
+ */
+
+#undef TCL_STORAGE_CLASS
+#ifdef BUILD_tix
+# define TCL_STORAGE_CLASS DLLEXPORT
+#else
+# ifdef USE_TCL_STUBS
+# define TCL_STORAGE_CLASS
+# else
+# define TCL_STORAGE_CLASS DLLIMPORT
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if (TCL_MAJOR_VERSION > 7)
+# define TCL_7_5_OR_LATER
+#else
+# if ((TCL_MAJOR_VERSION == 7) && (TCL_MINOR_VERSION >= 5))
+# define TCL_7_5_OR_LATER
+# endif
+#endif
+
+
+#if (TK_MAJOR_VERSION > 4)
+# define TK_4_1_OR_LATER
+#else
+# if ((TK_MAJOR_VERSION == 4) && (TK_MINOR_VERSION >= 1))
+# define TK_4_1_OR_LATER
+# endif
+#endif /* TK_MAJOR_VERSION ... */
+
+#if (TK_MAJOR_VERSION >= 8)
+# define TK_8_0_OR_LATER
+#endif
+
+#ifdef TK_4_1_OR_LATER
+ /* TK 4.1 or later */
+# define Tix_FreeProc Tcl_FreeProc
+
+#else
+ /* TK 4.0 */
+# define Tix_FreeProc Tk_FreeProc
+
+ /* These portable features were not defined in previous versions of
+ * TK but are used in Tix. Let's define them here.
+ */
+# define TkPutImage(a, b, c, d, e, f, g, h, i, j, k, l) \
+ XPutImage(c, d, e, f, g, h, i, j, k, l)
+
+# define TkStringToKeysym XStringToKeysym
+
+#endif /* TK_4_1_OR_LATER */
+
+
+#define TIX_STDIN_ALWAYS 0
+#define TIX_STDIN_OPTIONAL 1
+#define TIX_STDIN_NONE 2
+
+typedef struct {
+ char *name; /* Name of command. */
+ int (*cmdProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp,
+ int argc, Tcl_Obj *CONST *objv));
+ /* Command procedure. */
+} Tix_TclCmd;
+
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * SUB-COMMAND HANDLING
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+typedef int (*Tix_CmdProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+typedef int (*Tix_SubCmdProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+typedef int (*Tix_CheckArgvProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+
+typedef struct _Tix_CmdInfo {
+ int numSubCmds;
+ int minargc;
+ int maxargc;
+ char * info;
+} Tix_CmdInfo;
+
+typedef struct _Tix_SubCmdInfo {
+ int namelen;
+ char * name;
+ int minargc;
+ int maxargc;
+ Tix_SubCmdProc proc;
+ char * info;
+ Tix_CheckArgvProc checkArgvProc;
+} Tix_SubCmdInfo;
+
+/*
+ * Tix_ArraySize --
+ *
+ * Find out the number of elements inside a C array. The argument "x"
+ * must be a valid C array. Pointers don't work.
+ */
+#define Tix_ArraySize(x) (sizeof(x) / sizeof(x[0]))
+
+/*
+ * This is used for Tix_CmdInfo.maxargc and Tix_SubCmdInfo.maxargc,
+ * indicating that this command takes a variable number of arguments.
+ */
+#define TIX_VAR_ARGS -1
+
+/*
+ * TIX_DEFAULT_LEN --
+ *
+ * Use this for Tix_SubCmdInfo.namelen and Tix_ExecSubCmds() will try to
+ * determine the length of the subcommand name for you.
+ */
+#define TIX_DEFAULT_LEN -1
+
+/*
+ * TIX_DEFAULT_SUB_CMD --
+ *
+ * Use this for Tix_SubCmdInfo.name. This will match any subcommand name,
+ * including the empty string, when Tix_ExecSubCmds() finds a subcommand
+ * to execute.
+ */
+#define TIX_DEFAULT_SUBCMD 0
+
+/*
+ * TIX_DECLARE_CMD --
+ *
+ * This is just a handy macro to declare a C function to use as a
+ * command function.
+ */
+#define TIX_DECLARE_CMD(func) \
+ int func _ANSI_ARGS_((ClientData clientData,\
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]))
+
+/*
+ * TIX_DECLARE_SUBCMD --
+ *
+ * This is just a handy macro to declare a C function to use as a
+ * sub command function.
+ */
+#define TIX_DECLARE_SUBCMD(func) \
+ int func _ANSI_ARGS_((ClientData clientData,\
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]))
+
+/*
+ * TIX_DEFINE_CMD --
+ *
+ * This is just a handy macro to define a C function to use as a
+ * command function.
+ */
+#define TIX_DEFINE_CMD(func) \
+int func(clientData, interp, argc, argv) \
+ ClientData clientData; /* Main window associated with \
+ * interpreter. */ \
+ Tcl_Interp *interp; /* Current interpreter. */ \
+ int argc; /* Number of arguments. */ \
+ Tcl_Obj *objv[]; /* Argument strings. */
+
+
+
+/*----------------------------------------------------------------------
+ * Link-list functions --
+ *
+ * These functions makes it easy to use link lists in C code.
+ *
+ *----------------------------------------------------------------------
+ */
+typedef struct Tix_ListInfo {
+ int nextOffset; /* offset of the "next" pointer in a list
+ * item */
+ int prevOffset; /* offset of the "next" pointer in a list
+ * item */
+} Tix_ListInfo;
+
+
+/* Singly-linked list */
+typedef struct Tix_LinkList {
+ int numItems; /* number of items in this list */
+ char * head; /* (general pointer) head of the list */
+ char * tail; /* (general pointer) tail of the list */
+} Tix_LinkList;
+
+typedef struct Tix_ListIterator {
+ char * last;
+ char * curr;
+ unsigned int started : 1; /* True if the search operation has
+ * already started for this list */
+ unsigned int deleted : 1; /* True if a delete operation has been
+ * performed on the current item (in this
+ * case the curr pointer has already been
+ * adjusted
+ */
+} Tix_ListIterator;
+
+#define Tix_IsLinkListEmpty(list) ((list.numItems) == 0)
+#define TIX_UNIQUE 1
+#define TIX_UNDEFINED -1
+
+/*----------------------------------------------------------------------
+ * General Single Link List --
+ *
+ * The next pointer can be anywhere inside a link.
+ *----------------------------------------------------------------------
+ */
+
+EXTERN void Tix_LinkListInit _ANSI_ARGS_((Tix_LinkList * lPtr));
+EXTERN void Tix_LinkListAppend _ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, char * itemPtr, int flags));
+EXTERN void Tix_LinkListStart _ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr));
+EXTERN void Tix_LinkListNext _ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr));
+EXTERN void Tix_LinkListDelete _ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr));
+EXTERN int Tix_LinkListDeleteRange _ANSI_ARGS_((
+ Tix_ListInfo * infoPtr, Tix_LinkList * lPtr,
+ char * fromPtr, char * toPtr,
+ Tix_ListIterator * liPtr));
+EXTERN int Tix_LinkListFind _ANSI_ARGS_((
+ Tix_ListInfo * infoPtr, Tix_LinkList * lPtr,
+ char * itemPtr, Tix_ListIterator * liPtr));
+EXTERN int Tix_LinkListFindAndDelete _ANSI_ARGS_((
+ Tix_ListInfo * infoPtr, Tix_LinkList * lPtr,
+ char * itemPtr, Tix_ListIterator * liPtr));
+EXTERN void Tix_LinkListInsert _ANSI_ARGS_((
+ Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, char * itemPtr,
+ Tix_ListIterator * liPtr));
+EXTERN void Tix_LinkListIteratorInit _ANSI_ARGS_(( Tix_ListIterator * liPtr));
+
+#define Tix_LinkListDone(liPtr) ((liPtr)->curr == NULL)
+
+
+/*----------------------------------------------------------------------
+ * Simple Single Link List --
+ *
+ * The next pointer is always offset 0 in the link structure.
+ *----------------------------------------------------------------------
+ */
+
+EXTERN void Tix_SimpleListInit _ANSI_ARGS_((Tix_LinkList * lPtr));
+EXTERN void Tix_SimpleListAppend _ANSI_ARGS_((
+ Tix_LinkList * lPtr, char * itemPtr, int flags));
+EXTERN void Tix_SimpleListStart _ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr));
+EXTERN void Tix_SimpleListNext _ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr));
+EXTERN void Tix_SimpleListDelete _ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr));
+EXTERN int Tix_SimpleListDeleteRange _ANSI_ARGS_((
+ Tix_LinkList * lPtr,
+ char * fromPtr, char * toPtr,
+ Tix_ListIterator * liPtr));
+EXTERN int Tix_SimpleListFind _ANSI_ARGS_((
+ Tix_LinkList * lPtr,
+ char * itemPtr, Tix_ListIterator * liPtr));
+EXTERN int Tix_SimpleListFindAndDelete _ANSI_ARGS_((
+ Tix_LinkList * lPtr, char * itemPtr,
+ Tix_ListIterator * liPtr));
+EXTERN void Tix_SimpleListInsert _ANSI_ARGS_((
+ Tix_LinkList * lPtr, char * itemPtr,
+ Tix_ListIterator * liPtr));
+EXTERN void Tix_SimpleListIteratorInit _ANSI_ARGS_((
+ Tix_ListIterator * liPtr));
+
+#define Tix_SimpleListDone(liPtr) ((liPtr)->curr == NULL)
+
+/*----------------------------------------------------------------------
+ *
+ *
+ *
+ * CUSTOM CONFIG OPTIONS
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+#define TIX_RELIEF_RAISED 1
+#define TIX_RELIEF_FLAT 2
+#define TIX_RELIEF_SUNKEN 4
+#define TIX_RELIEF_GROOVE 8
+#define TIX_RELIEF_RIDGE 16
+#define TIX_RELIEF_SOLID 32
+
+typedef int Tix_Relief;
+
+EXTERN Tk_CustomOption tixConfigItemType;
+EXTERN Tk_CustomOption tixConfigItemStyle;
+EXTERN Tk_CustomOption tixConfigRelief;
+
+
+/*
+ * C functions exported by Tix
+ */
+
+EXTERN int Tix_ArgcError _ANSI_ARGS_((Tcl_Interp *interp,
+ int argc, Tcl_Obj *CONST *objv, int prefixCount,
+ char *message));
+EXTERN void Tix_CreateCommands _ANSI_ARGS_((
+ Tcl_Interp *interp, Tix_TclCmd *commands,
+ ClientData clientData,
+ Tcl_CmdDeleteProc *deleteProc));
+EXTERN Tk_Window Tix_CreateSubWindow _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ char * subPath));
+EXTERN int Tix_DefinePixmap _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Uid name, char **data));
+EXTERN void Tix_DrawAnchorLines _ANSI_ARGS_((
+ Display *display, Drawable drawable,
+ GC gc, int x, int y, int w, int h));
+EXTERN int Tix_EvalArgv _ANSI_ARGS_((
+ Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tix_ExistMethod _ANSI_ARGS_((Tcl_Interp *interp,
+ char *context, char *method));
+EXTERN void Tix_Exit _ANSI_ARGS_((Tcl_Interp * interp, int code));
+EXTERN Pixmap Tix_GetRenderBuffer _ANSI_ARGS_((Display *display,
+ Drawable d, int width, int height, int depth));
+
+#ifdef TCL_VARARGS
+/*
+ * The TCL_VARARGS macro is only defined in Tcl 7.5 or later
+ */
+EXTERN int Tix_GlobalVarEval _ANSI_ARGS_(
+ TCL_VARARGS(Tcl_Interp *,interp));
+#else
+EXTERN int Tix_GlobalVarEval _ANSI_ARGS_(
+ VARARGS(Tcl_Interp *interp));
+#endif
+
+EXTERN int Tix_HandleSubCmds _ANSI_ARGS_((
+ Tix_CmdInfo * cmdInfo,
+ Tix_SubCmdInfo * subCmdInfo,
+ ClientData clientData, Tcl_Interp *interp,
+ int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tix_Init _ANSI_ARGS_((Tcl_Interp *interp));
+
+EXTERN int Tix_LoadTclLibrary _ANSI_ARGS_((
+ Tcl_Interp *interp, char *envName,
+ char *tclName, char *initFile,
+ char *defDir, char * appName));
+EXTERN void Tix_OpenStdin _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN void Tix_SetArgv _ANSI_ARGS_((Tcl_Interp *interp,
+ int argc, Tcl_Obj *CONST *objv));
+EXTERN void Tix_SetRcFileName _ANSI_ARGS_((
+ Tcl_Interp * interp, char * rcFileName));
+EXTERN char * TixGetStringFromObj _ANSI_ARGS_((
+ char *objPtr,int *lengthPtr));
+
+/*
+ * Entry points for Tk_CONFIG_CUSTOM stubs to call
+ */
+
+EXTERN int TixDItemParseProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj * value,
+ char *widRec, int offset));
+
+EXTERN Tcl_Obj * TixDItemPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin, char *widRec,
+ int offset, Tcl_FreeProc **freeProcPtr));
+
+EXTERN int TixDItemStyleParseProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj * value,
+ char *widRec, int offset));
+
+EXTERN Tcl_Obj * TixDItemStylePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin, char *widRec,
+ int offset, Tcl_FreeProc **freeProcPtr));
+
+
+/*
+ * Commands exported by Tix
+ *
+ */
+
+extern TIX_DECLARE_CMD(Tix_CallMethodCmd);
+extern TIX_DECLARE_CMD(Tix_ChainMethodCmd);
+extern TIX_DECLARE_CMD(Tix_ClassCmd);
+extern TIX_DECLARE_CMD(Tix_DoWhenIdleCmd);
+extern TIX_DECLARE_CMD(Tix_DoWhenMappedCmd);
+extern TIX_DECLARE_CMD(Tix_FalseCmd);
+extern TIX_DECLARE_CMD(Tix_FileCmd);
+extern TIX_DECLARE_CMD(Tix_FlushXCmd);
+extern TIX_DECLARE_CMD(Tix_FormCmd);
+extern TIX_DECLARE_CMD(Tix_GridCmd);
+extern TIX_DECLARE_CMD(Tix_GeometryRequestCmd);
+extern TIX_DECLARE_CMD(Tix_Get3DBorderCmd);
+extern TIX_DECLARE_CMD(Tix_GetBooleanCmd);
+extern TIX_DECLARE_CMD(Tix_GetIntCmd);
+extern TIX_DECLARE_CMD(Tix_GetMethodCmd);
+extern TIX_DECLARE_CMD(Tix_HListCmd);
+extern TIX_DECLARE_CMD(Tix_HandleOptionsCmd);
+extern TIX_DECLARE_CMD(Tix_InputOnlyCmd);
+extern TIX_DECLARE_CMD(Tix_ItemStyleCmd);
+extern TIX_DECLARE_CMD(Tix_ManageGeometryCmd);
+extern TIX_DECLARE_CMD(Tix_MapWindowCmd);
+extern TIX_DECLARE_CMD(Tix_MoveResizeWindowCmd);
+extern TIX_DECLARE_CMD(Tix_NoteBookFrameCmd);
+extern TIX_DECLARE_CMD(Tix_RaiseWindowCmd);
+extern TIX_DECLARE_CMD(Tix_ShellInputCmd);
+extern TIX_DECLARE_CMD(Tix_StringSubCmd);
+extern TIX_DECLARE_CMD(Tix_StrEqCmd);
+extern TIX_DECLARE_CMD(Tix_TListCmd);
+extern TIX_DECLARE_CMD(Tix_TmpLineCmd);
+extern TIX_DECLARE_CMD(Tix_TrueCmd);
+extern TIX_DECLARE_CMD(Tix_UnmapWindowCmd);
+extern TIX_DECLARE_CMD(Tix_MwmCmd);
+extern TIX_DECLARE_CMD(Tix_CreateWidgetCmd);
+
+#define SET_RECORD(interp, record, var, value) \
+ Tcl_SetVar2(interp, record, var, value, TCL_GLOBAL_ONLY)
+
+#define GET_RECORD(interp, record, var) \
+ Tcl_GetVar2(interp, record, var, TCL_GLOBAL_ONLY)
+
+
+#define TIX_HASHKEY(k) ((sizeof(k)>sizeof(int))?((char*)&(k)):((char*)(k)))
+
+/*----------------------------------------------------------------------
+ * Compatibility section
+ *---------------------------------------------------------------------- */
+
+
+#ifdef _WINDOWS
+/* This is the way win/tkWinPort.h in tk8.0.5 defines it */
+#ifndef strcasecmp
+#define strcasecmp stricmp
+#endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _TIX */
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tix.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tix.m
new file mode 100644
index 00000000000..92b9f74eb3f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tix.m
@@ -0,0 +1,126 @@
+#ifndef _TIX_VM
+#define _TIX_VM
+#include "tix_f.h"
+#ifndef NO_VTABLES
+#ifndef TixDItemParseProc
+# define TixDItemParseProc (*TixVptr->V_TixDItemParseProc)
+#endif
+
+#ifndef TixDItemPrintProc
+# define TixDItemPrintProc (*TixVptr->V_TixDItemPrintProc)
+#endif
+
+#ifndef TixDItemStyleParseProc
+# define TixDItemStyleParseProc (*TixVptr->V_TixDItemStyleParseProc)
+#endif
+
+#ifndef TixDItemStylePrintProc
+# define TixDItemStylePrintProc (*TixVptr->V_TixDItemStylePrintProc)
+#endif
+
+#ifndef TixGetStringFromObj
+# define TixGetStringFromObj (*TixVptr->V_TixGetStringFromObj)
+#endif
+
+#ifndef Tix_ArgcError
+# define Tix_ArgcError (*TixVptr->V_Tix_ArgcError)
+#endif
+
+#ifndef Tix_CreateSubWindow
+# define Tix_CreateSubWindow (*TixVptr->V_Tix_CreateSubWindow)
+#endif
+
+#ifndef Tix_DrawAnchorLines
+# define Tix_DrawAnchorLines (*TixVptr->V_Tix_DrawAnchorLines)
+#endif
+
+#ifndef Tix_GetRenderBuffer
+# define Tix_GetRenderBuffer (*TixVptr->V_Tix_GetRenderBuffer)
+#endif
+
+#ifndef Tix_HandleSubCmds
+# define Tix_HandleSubCmds (*TixVptr->V_Tix_HandleSubCmds)
+#endif
+
+#ifndef Tix_LinkListAppend
+# define Tix_LinkListAppend (*TixVptr->V_Tix_LinkListAppend)
+#endif
+
+#ifndef Tix_LinkListDelete
+# define Tix_LinkListDelete (*TixVptr->V_Tix_LinkListDelete)
+#endif
+
+#ifndef Tix_LinkListDeleteRange
+# define Tix_LinkListDeleteRange (*TixVptr->V_Tix_LinkListDeleteRange)
+#endif
+
+#ifndef Tix_LinkListFind
+# define Tix_LinkListFind (*TixVptr->V_Tix_LinkListFind)
+#endif
+
+#ifndef Tix_LinkListFindAndDelete
+# define Tix_LinkListFindAndDelete (*TixVptr->V_Tix_LinkListFindAndDelete)
+#endif
+
+#ifndef Tix_LinkListInit
+# define Tix_LinkListInit (*TixVptr->V_Tix_LinkListInit)
+#endif
+
+#ifndef Tix_LinkListInsert
+# define Tix_LinkListInsert (*TixVptr->V_Tix_LinkListInsert)
+#endif
+
+#ifndef Tix_LinkListIteratorInit
+# define Tix_LinkListIteratorInit (*TixVptr->V_Tix_LinkListIteratorInit)
+#endif
+
+#ifndef Tix_LinkListNext
+# define Tix_LinkListNext (*TixVptr->V_Tix_LinkListNext)
+#endif
+
+#ifndef Tix_LinkListStart
+# define Tix_LinkListStart (*TixVptr->V_Tix_LinkListStart)
+#endif
+
+#ifndef Tix_SimpleListAppend
+# define Tix_SimpleListAppend (*TixVptr->V_Tix_SimpleListAppend)
+#endif
+
+#ifndef Tix_SimpleListDelete
+# define Tix_SimpleListDelete (*TixVptr->V_Tix_SimpleListDelete)
+#endif
+
+#ifndef Tix_SimpleListDeleteRange
+# define Tix_SimpleListDeleteRange (*TixVptr->V_Tix_SimpleListDeleteRange)
+#endif
+
+#ifndef Tix_SimpleListFind
+# define Tix_SimpleListFind (*TixVptr->V_Tix_SimpleListFind)
+#endif
+
+#ifndef Tix_SimpleListFindAndDelete
+# define Tix_SimpleListFindAndDelete (*TixVptr->V_Tix_SimpleListFindAndDelete)
+#endif
+
+#ifndef Tix_SimpleListInit
+# define Tix_SimpleListInit (*TixVptr->V_Tix_SimpleListInit)
+#endif
+
+#ifndef Tix_SimpleListInsert
+# define Tix_SimpleListInsert (*TixVptr->V_Tix_SimpleListInsert)
+#endif
+
+#ifndef Tix_SimpleListIteratorInit
+# define Tix_SimpleListIteratorInit (*TixVptr->V_Tix_SimpleListIteratorInit)
+#endif
+
+#ifndef Tix_SimpleListNext
+# define Tix_SimpleListNext (*TixVptr->V_Tix_SimpleListNext)
+#endif
+
+#ifndef Tix_SimpleListStart
+# define Tix_SimpleListStart (*TixVptr->V_Tix_SimpleListStart)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TIX_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tix.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tix.t
new file mode 100644
index 00000000000..08379729f4f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tix.t
@@ -0,0 +1,170 @@
+#ifdef _TIX
+#ifndef TixDItemParseProc
+VFUNC(int,TixDItemParseProc,V_TixDItemParseProc,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj * value,
+ char *widRec, int offset)))
+#endif /* #ifndef TixDItemParseProc */
+
+#ifndef TixDItemPrintProc
+VFUNC(Tcl_Obj *,TixDItemPrintProc,V_TixDItemPrintProc,_ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin, char *widRec,
+ int offset, Tcl_FreeProc **freeProcPtr)))
+#endif /* #ifndef TixDItemPrintProc */
+
+#ifndef TixDItemStyleParseProc
+VFUNC(int,TixDItemStyleParseProc,V_TixDItemStyleParseProc,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj * value,
+ char *widRec, int offset)))
+#endif /* #ifndef TixDItemStyleParseProc */
+
+#ifndef TixDItemStylePrintProc
+VFUNC(Tcl_Obj *,TixDItemStylePrintProc,V_TixDItemStylePrintProc,_ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin, char *widRec,
+ int offset, Tcl_FreeProc **freeProcPtr)))
+#endif /* #ifndef TixDItemStylePrintProc */
+
+#ifndef TixGetStringFromObj
+VFUNC(char *,TixGetStringFromObj,V_TixGetStringFromObj,_ANSI_ARGS_((
+ char *objPtr,int *lengthPtr)))
+#endif /* #ifndef TixGetStringFromObj */
+
+#ifndef Tix_ArgcError
+VFUNC(int,Tix_ArgcError,V_Tix_ArgcError,_ANSI_ARGS_((Tcl_Interp *interp,
+ int argc, Tcl_Obj *CONST *objv, int prefixCount,
+ char *message)))
+#endif /* #ifndef Tix_ArgcError */
+
+#ifndef Tix_CreateSubWindow
+VFUNC(Tk_Window,Tix_CreateSubWindow,V_Tix_CreateSubWindow,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ char * subPath)))
+#endif /* #ifndef Tix_CreateSubWindow */
+
+#ifndef Tix_DrawAnchorLines
+VFUNC(void,Tix_DrawAnchorLines,V_Tix_DrawAnchorLines,_ANSI_ARGS_((
+ Display *display, Drawable drawable,
+ GC gc, int x, int y, int w, int h)))
+#endif /* #ifndef Tix_DrawAnchorLines */
+
+#ifndef Tix_GetRenderBuffer
+VFUNC(Pixmap,Tix_GetRenderBuffer,V_Tix_GetRenderBuffer,_ANSI_ARGS_((Display *display,
+ Drawable d, int width, int height, int depth)))
+#endif /* #ifndef Tix_GetRenderBuffer */
+
+#ifndef Tix_HandleSubCmds
+VFUNC(int,Tix_HandleSubCmds,V_Tix_HandleSubCmds,_ANSI_ARGS_((
+ Tix_CmdInfo * cmdInfo,
+ Tix_SubCmdInfo * subCmdInfo,
+ ClientData clientData, Tcl_Interp *interp,
+ int argc, Tcl_Obj *CONST *objv)))
+#endif /* #ifndef Tix_HandleSubCmds */
+
+#ifndef Tix_LinkListAppend
+VFUNC(void,Tix_LinkListAppend,V_Tix_LinkListAppend,_ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, char * itemPtr, int flags)))
+#endif /* #ifndef Tix_LinkListAppend */
+
+#ifndef Tix_LinkListDelete
+VFUNC(void,Tix_LinkListDelete,V_Tix_LinkListDelete,_ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListDelete */
+
+#ifndef Tix_LinkListDeleteRange
+VFUNC(int,Tix_LinkListDeleteRange,V_Tix_LinkListDeleteRange,_ANSI_ARGS_((
+ Tix_ListInfo * infoPtr, Tix_LinkList * lPtr,
+ char * fromPtr, char * toPtr,
+ Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListDeleteRange */
+
+#ifndef Tix_LinkListFind
+VFUNC(int,Tix_LinkListFind,V_Tix_LinkListFind,_ANSI_ARGS_((
+ Tix_ListInfo * infoPtr, Tix_LinkList * lPtr,
+ char * itemPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListFind */
+
+#ifndef Tix_LinkListFindAndDelete
+VFUNC(int,Tix_LinkListFindAndDelete,V_Tix_LinkListFindAndDelete,_ANSI_ARGS_((
+ Tix_ListInfo * infoPtr, Tix_LinkList * lPtr,
+ char * itemPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListFindAndDelete */
+
+#ifndef Tix_LinkListInit
+VFUNC(void,Tix_LinkListInit,V_Tix_LinkListInit,_ANSI_ARGS_((Tix_LinkList * lPtr)))
+#endif /* #ifndef Tix_LinkListInit */
+
+#ifndef Tix_LinkListInsert
+VFUNC(void,Tix_LinkListInsert,V_Tix_LinkListInsert,_ANSI_ARGS_((
+ Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, char * itemPtr,
+ Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListInsert */
+
+#ifndef Tix_LinkListIteratorInit
+VFUNC(void,Tix_LinkListIteratorInit,V_Tix_LinkListIteratorInit,_ANSI_ARGS_(( Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListIteratorInit */
+
+#ifndef Tix_LinkListNext
+VFUNC(void,Tix_LinkListNext,V_Tix_LinkListNext,_ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListNext */
+
+#ifndef Tix_LinkListStart
+VFUNC(void,Tix_LinkListStart,V_Tix_LinkListStart,_ANSI_ARGS_((Tix_ListInfo * infoPtr,
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_LinkListStart */
+
+#ifndef Tix_SimpleListAppend
+VFUNC(void,Tix_SimpleListAppend,V_Tix_SimpleListAppend,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, char * itemPtr, int flags)))
+#endif /* #ifndef Tix_SimpleListAppend */
+
+#ifndef Tix_SimpleListDelete
+VFUNC(void,Tix_SimpleListDelete,V_Tix_SimpleListDelete,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListDelete */
+
+#ifndef Tix_SimpleListDeleteRange
+VFUNC(int,Tix_SimpleListDeleteRange,V_Tix_SimpleListDeleteRange,_ANSI_ARGS_((
+ Tix_LinkList * lPtr,
+ char * fromPtr, char * toPtr,
+ Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListDeleteRange */
+
+#ifndef Tix_SimpleListFind
+VFUNC(int,Tix_SimpleListFind,V_Tix_SimpleListFind,_ANSI_ARGS_((
+ Tix_LinkList * lPtr,
+ char * itemPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListFind */
+
+#ifndef Tix_SimpleListFindAndDelete
+VFUNC(int,Tix_SimpleListFindAndDelete,V_Tix_SimpleListFindAndDelete,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, char * itemPtr,
+ Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListFindAndDelete */
+
+#ifndef Tix_SimpleListInit
+VFUNC(void,Tix_SimpleListInit,V_Tix_SimpleListInit,_ANSI_ARGS_((Tix_LinkList * lPtr)))
+#endif /* #ifndef Tix_SimpleListInit */
+
+#ifndef Tix_SimpleListInsert
+VFUNC(void,Tix_SimpleListInsert,V_Tix_SimpleListInsert,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, char * itemPtr,
+ Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListInsert */
+
+#ifndef Tix_SimpleListIteratorInit
+VFUNC(void,Tix_SimpleListIteratorInit,V_Tix_SimpleListIteratorInit,_ANSI_ARGS_((
+ Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListIteratorInit */
+
+#ifndef Tix_SimpleListNext
+VFUNC(void,Tix_SimpleListNext,V_Tix_SimpleListNext,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListNext */
+
+#ifndef Tix_SimpleListStart
+VFUNC(void,Tix_SimpleListStart,V_Tix_SimpleListStart,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_ListIterator * liPtr)))
+#endif /* #ifndef Tix_SimpleListStart */
+
+#endif /* _TIX */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixBitmaps.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixBitmaps.h
new file mode 100644
index 00000000000..4e9885cb7e8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixBitmaps.h
@@ -0,0 +1,618 @@
+
+/* $Id: tixBitmaps.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+{
+#define maximize_width 15
+#define maximize_height 15
+static UNSIGNED_CHAR maximize_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x04, 0x10, 0x04, 0x70, 0x04, 0x70,
+ 0x04, 0x70, 0x04, 0x70, 0x04, 0x70, 0x04, 0x70, 0x04, 0x70, 0x04, 0x70,
+ 0xfc, 0x7f, 0xf0, 0x7f, 0xf0, 0x7f};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("maximize"), (char*)maximize_bits, maximize_width, maximize_height);
+}
+{
+#define act_fold_width 16
+#define act_fold_height 10
+static UNSIGNED_CHAR act_fold_bits[] = {
+ 0xfc, 0x00, 0xaa, 0x0f, 0x55, 0x15, 0xeb, 0xff, 0x15, 0x80, 0x0b, 0x40,
+ 0x05, 0x20, 0x03, 0x10, 0x01, 0x08, 0xff, 0x07};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("act_fold"), (char*)act_fold_bits, act_fold_width, act_fold_height);
+}
+{
+/* XPM */
+static char * act_fold_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"16 12 4 1",
+/* colors */
+" s None c None",
+". c black",
+"X c yellow",
+"o c #5B5B57574646",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".oXoXoXoXoXo. ",
+".XoX............",
+".oX.XXXXXXXXXXX.",
+".Xo.XXXXXXXXXX. ",
+".o.XXXXXXXXXXX. ",
+".X.XXXXXXXXXXX. ",
+"..XXXXXXXXXX.. ",
+"............. "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("act_fold"), act_fold_xpm);
+}
+{
+#define balarrow_width 6
+#define balarrow_height 6
+static UNSIGNED_CHAR balarrow_bits[] = {
+ 0x1f, 0x07, 0x07, 0x09, 0x11, 0x20};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("balarrow"), (char*)balarrow_bits, balarrow_width, balarrow_height);
+}
+{
+#define cbxarrow_width 11
+#define cbxarrow_height 14
+static UNSIGNED_CHAR cbxarrow_bits[] = {
+ 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00,
+ 0xfe, 0x03, 0xfc, 0x01, 0xf8, 0x00, 0x70, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0xfe, 0x03, 0xfe, 0x03};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("cbxarrow"), (char*)cbxarrow_bits, cbxarrow_width, cbxarrow_height);
+}
+{
+#define ck_def_width 13
+#define ck_def_height 13
+static UNSIGNED_CHAR ck_def_bits[] = {
+ 0xff, 0x1f, 0x01, 0x10, 0x55, 0x15, 0x01, 0x10, 0x55, 0x15, 0x01, 0x10,
+ 0x55, 0x15, 0x01, 0x10, 0x55, 0x15, 0x01, 0x10, 0x55, 0x15, 0x01, 0x10,
+ 0xff, 0x1f};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("ck_def"), (char*)ck_def_bits, ck_def_width, ck_def_height);
+}
+{
+#define ck_off_width 13
+#define ck_off_height 13
+static UNSIGNED_CHAR ck_off_bits[] = {
+ 0xff, 0x1f, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10,
+ 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10,
+ 0xff, 0x1f};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("ck_off"), (char*)ck_off_bits, ck_off_width, ck_off_height);
+}
+{
+#define ck_on_width 13
+#define ck_on_height 13
+static UNSIGNED_CHAR ck_on_bits[] = {
+ 0xff, 0x1f, 0x01, 0x10, 0x01, 0x10, 0x01, 0x14, 0x01, 0x16, 0x01, 0x17,
+ 0x89, 0x13, 0xdd, 0x11, 0xf9, 0x10, 0x71, 0x10, 0x21, 0x10, 0x01, 0x10,
+ 0xff, 0x1f};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("ck_on"), (char*)ck_on_bits, ck_on_width, ck_on_height);
+}
+{
+#define cross_width 14
+#define cross_height 14
+static UNSIGNED_CHAR cross_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x0e, 0x1c, 0x1c, 0x0e, 0x38, 0x07,
+ 0xf0, 0x03, 0xe0, 0x01, 0xe0, 0x01, 0xf0, 0x03, 0x38, 0x07, 0x1c, 0x0e,
+ 0x0e, 0x1c, 0x06, 0x18};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("cross"), (char*)cross_bits, cross_width, cross_height);
+}
+{
+#define decr_width 7
+#define decr_height 4
+static UNSIGNED_CHAR decr_bits[] = {
+ 0x7f, 0x3e, 0x1c, 0x08};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("decr"), (char*)decr_bits, decr_width, decr_height);
+}
+{
+#define drop_width 16
+#define drop_height 16
+#define drop_x_hot 6
+#define drop_y_hot 4
+static UNSIGNED_CHAR drop_bits[] = {
+ 0x00, 0x00, 0xfe, 0x07, 0x02, 0x04, 0x02, 0x04, 0x42, 0x04, 0xc2, 0x04,
+ 0xc2, 0x05, 0xc2, 0x07, 0xc2, 0x07, 0xc2, 0x0f, 0xfe, 0x1f, 0xc0, 0x07,
+ 0xc0, 0x06, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x08};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("drop"), (char*)drop_bits, drop_width, drop_height);
+}
+{
+#define file_width 12
+#define file_height 12
+static UNSIGNED_CHAR file_bits[] = {
+ 0xfe, 0x00, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xfe, 0x03};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("file"), (char*)file_bits, file_width, file_height);
+}
+{
+/* XPM */
+static char * file_xpm[] = {
+"12 12 3 1",
+" s None c None",
+". c black",
+"X c #FFFFFFFFF3CE",
+" ........ ",
+" .XXXXXX. ",
+" .XXXXXX... ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .......... "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("file"), file_xpm);
+}
+{
+#define folder_width 16
+#define folder_height 10
+static UNSIGNED_CHAR folder_bits[] = {
+ 0xfc, 0x00, 0x02, 0x07, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08,
+ 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0xff, 0x07};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("folder"), (char*)folder_bits, folder_width, folder_height);
+}
+{
+/* XPM */
+static char * folder_foo_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"16 12 3 1",
+/* colors */
+" s None c None",
+". c black",
+"X c #f0ff80",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+"............. "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("folder"), folder_foo_xpm);
+}
+{
+#define harddisk_width 32
+#define harddisk_height 32
+static UNSIGNED_CHAR harddisk_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x18, 0xa8, 0xaa, 0xaa, 0x1a,
+ 0x48, 0x55, 0xd5, 0x1d, 0xa8, 0xaa, 0xaa, 0x1b, 0x48, 0x55, 0x55, 0x1d,
+ 0xa8, 0xfa, 0xaf, 0x1a, 0xc8, 0xff, 0xff, 0x1d, 0xa8, 0xfa, 0xaf, 0x1a,
+ 0x48, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1a, 0x48, 0x55, 0x55, 0x1d,
+ 0xa8, 0xaa, 0xaa, 0x1a, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("harddisk"), (char*)harddisk_bits, harddisk_width, harddisk_height);
+}
+{
+#define hourglass_width 32
+#define hourglas_height 32
+#define hourglas_x_hot 16
+#define hourglas_y_hot 15
+static UNSIGNED_CHAR hourglas_bits[] = {
+ 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
+ 0x7c, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 0x7c,
+ 0xfc, 0x00, 0x00, 0x7e, 0xfc, 0x00, 0x00, 0x7e, 0xfc, 0x00, 0x00, 0x7e,
+ 0xbc, 0x01, 0x00, 0x7b, 0xbc, 0xfd, 0x7e, 0x7b, 0x3c, 0xfb, 0xbf, 0x79,
+ 0x3c, 0xe6, 0xcf, 0x78, 0x3c, 0xdc, 0x77, 0x78, 0x3c, 0x38, 0x39, 0x78,
+ 0x3c, 0x60, 0x0d, 0x78, 0x3c, 0x38, 0x38, 0x78, 0x3c, 0x1c, 0x71, 0x78,
+ 0x3c, 0x06, 0xc1, 0x78, 0x3c, 0x03, 0x80, 0x79, 0xbc, 0x01, 0x00, 0x7b,
+ 0xbc, 0x01, 0x00, 0x7b, 0xfc, 0x00, 0x01, 0x7e, 0xfc, 0x00, 0x01, 0x7e,
+ 0xfc, 0x80, 0x03, 0x7e, 0x7c, 0xc0, 0x07, 0x7c, 0x7c, 0xf0, 0x1f, 0x7c,
+ 0x7c, 0xfe, 0xff, 0x7c, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff,
+ 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("hourglas"), (char*)hourglas_bits, hourglass_width, hourglas_height);
+}
+{
+#define incr_width 7
+#define incr_height 4
+static UNSIGNED_CHAR incr_bits[] = {
+ 0x08, 0x1c, 0x3e, 0x7f};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("incr"), (char*)incr_bits, incr_width, incr_height);
+}
+{
+/* XPM */
+static char * info_xpm[] = {
+"32 32 3 1",
+" s None c None",
+". c #000000000000",
+"X c white",
+" ",
+" ......... ",
+" ...XXXXXXXXX... ",
+" .XXXXXXXXXXXXXXX. ",
+" ..XXXXXXXXXXXXXXXXX.. ",
+" .XXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXX...XXXXXXXXXX. ",
+" .XXXXXXXXX.....XXXXXXXXX. ",
+" .XXXXXXXXX.......XXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+" .XXXXXXXXXXX.....XXXXXXXXXXX. ",
+".XXXXXXXXXXXXX...XXXXXXXXXXXXX. ",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+" .XXXXXXXXX.......XXXXXXXXX. ",
+" .XXXXXXXX.......XXXXXXXX. ",
+" .XXXXXXXX.......XXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXX. ",
+" ..XXXXXXXXXXXXXXXXX.. ",
+" .XXXXXXXXXXXXXXX. ",
+" ...XXXXXXXXX... ",
+" ......... "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("info"), info_xpm);
+}
+{
+#define minimize_width 15
+#define minimize_height 15
+static UNSIGNED_CHAR minimize_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01,
+ 0x20, 0x03, 0x20, 0x03, 0xe0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("minimize"), (char*)minimize_bits, minimize_width, minimize_height);
+}
+{
+#define minus_width 9
+#define minus_height 9
+static UNSIGNED_CHAR minus_bits[] = {
+ 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x7d, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0xff, 0x01};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("minus"), (char*)minus_bits, minus_width, minus_height);
+}
+{
+/* XPM */
+static char * minus_xpm[] = {
+"9 9 2 1",
+". s None c None",
+" c black",
+" ",
+" ....... ",
+" ....... ",
+" ....... ",
+" . . ",
+" ....... ",
+" ....... ",
+" ....... ",
+" "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("minus"), minus_xpm);
+}
+{
+#define minusarm_width 9
+#define minusarm_height 9
+static UNSIGNED_CHAR minusarm_bits[] = {
+ 0xff, 0x01, 0x01, 0x01, 0x7d, 0x01, 0x7d, 0x01, 0x01, 0x01, 0x7d, 0x01,
+ 0x7d, 0x01, 0x01, 0x01, 0xff, 0x01};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("minusarm"), (char*)minusarm_bits, minusarm_width, minusarm_height);
+}
+{
+/* XPM */
+static char * minusarm_xpm[] = {
+"9 9 3 1",
+" c black",
+". c yellow",
+"X c #808080808080",
+" ",
+" ....... ",
+" ....... ",
+" .XXXXX. ",
+" .X X. ",
+" .XXXXX. ",
+" ....... ",
+" ....... ",
+" "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("minusarm"), minusarm_xpm);
+}
+{
+#define network_width 32
+#define network_height 32
+static UNSIGNED_CHAR network_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x02, 0x40,
+ 0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x52,
+ 0x00, 0x00, 0x0a, 0x52, 0x00, 0x00, 0x8a, 0x51, 0x00, 0x00, 0x0a, 0x50,
+ 0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x50,
+ 0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x02, 0x40, 0xfe, 0x7f, 0x52, 0x55,
+ 0x02, 0x40, 0xaa, 0x6a, 0xfa, 0x5f, 0xfe, 0x7f, 0x0a, 0x50, 0xfe, 0x7f,
+ 0x0a, 0x52, 0x80, 0x00, 0x0a, 0x52, 0x80, 0x00, 0x8a, 0x51, 0x80, 0x00,
+ 0x0a, 0x50, 0x80, 0x00, 0x4a, 0x50, 0x80, 0x00, 0x0a, 0x50, 0xe0, 0x03,
+ 0x0a, 0x50, 0x20, 0x02, 0xfa, 0xdf, 0x3f, 0x03, 0x02, 0x40, 0xa0, 0x02,
+ 0x52, 0x55, 0xe0, 0x03, 0xaa, 0x6a, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00,
+ 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("network"), (char*)network_bits, network_width, network_height);
+}
+{
+/* XPM */
+static char * no_entry_xpm[] = {
+"32 32 4 1",
+" s None c None",
+". c #000000000000",
+"X c red",
+"o c yellow",
+" ",
+" ......... ",
+" ...XXXXXXXXX... ",
+" .XXXXXXXXXXXXXXX. ",
+" ..XXXXXXXXXXXXXXXXX.. ",
+" .XXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+".XXX.......................XXX. ",
+".XXX.ooooooooooooooooooooo.XXX. ",
+".XXX.ooooooooooooooooooooo.XXX. ",
+".XXX.ooooooooooooooooooooo.XXX. ",
+".XXX.ooooooooooooooooooooo.XXX. ",
+".XXX.ooooooooooooooooooooo.XXX. ",
+".XXX.ooooooooooooooooooooo.XXX. ",
+".XXX.......................XXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXX. ",
+" ..XXXXXXXXXXXXXXXXX.. ",
+" .XXXXXXXXXXXXXXX. ",
+" ...XXXXXXXXX... ",
+" ......... "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("no_entry"), no_entry_xpm);
+}
+{
+#define openfile_width 16
+#define openfile_height 10
+static UNSIGNED_CHAR openfile_bits[] = {
+ 0xf8, 0x01, 0x04, 0x06, 0x02, 0x08, 0x02, 0x10, 0xe2, 0xff, 0x52, 0x55,
+ 0xaa, 0x2a, 0x56, 0x15, 0xaa, 0x0a, 0xfe, 0x07};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("openfile"), (char*)openfile_bits, openfile_width, openfile_height);
+}
+{
+#define openfold_width 16
+#define openfold_height 10
+static UNSIGNED_CHAR openfold_bits[] = {
+ 0xfc, 0x00, 0x02, 0x07, 0x01, 0x08, 0xc1, 0xff, 0x21, 0x80, 0x11, 0x40,
+ 0x09, 0x20, 0x05, 0x10, 0x03, 0x08, 0xff, 0x07};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("openfold"), (char*)openfold_bits, openfold_width, openfold_height);
+}
+{
+/* XPM */
+static char * openfolder_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"16 12 3 1",
+/* colors */
+" s None c None",
+". c black",
+"X c #f0ff80",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".XXXXXXXXXXX. ",
+".XXX............",
+".XX.XXXXXXXXXXX.",
+".XX.XXXXXXXXXX. ",
+".X.XXXXXXXXXXX. ",
+".X.XXXXXXXXXXX. ",
+"..XXXXXXXXXX.. ",
+"............. "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("openfold"), openfolder_xpm);
+}
+{
+#define plus_width 9
+#define plus_height 9
+static UNSIGNED_CHAR plus_bits[] = {
+ 0xff, 0x01, 0x01, 0x01, 0x11, 0x01, 0x11, 0x01, 0x7d, 0x01, 0x11, 0x01,
+ 0x11, 0x01, 0x01, 0x01, 0xff, 0x01};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("plus"), (char*)plus_bits, plus_width, plus_height);
+}
+{
+/* XPM */
+static char * plus_xpm[] = {
+"9 9 2 1",
+". s None c None",
+" c black",
+" ",
+" ....... ",
+" ... ... ",
+" ... ... ",
+" . . ",
+" ... ... ",
+" ... ... ",
+" ....... ",
+" "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("plus"), plus_xpm);
+}
+{
+#define plusarm_width 9
+#define plusarm_height 9
+static UNSIGNED_CHAR plusarm_bits[] = {
+ 0xff, 0x01, 0x01, 0x01, 0x6d, 0x01, 0x6d, 0x01, 0x01, 0x01, 0x6d, 0x01,
+ 0x6d, 0x01, 0x01, 0x01, 0xff, 0x01};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("plusarm"), (char*)plusarm_bits, plusarm_width, plusarm_height);
+}
+{
+/* XPM */
+static char * plusarm_xpm[] = {
+"9 9 3 1",
+" c black",
+". c yellow",
+"X c gray40",
+" ",
+" ....... ",
+" ... ... ",
+" ..X X.. ",
+" . X . ",
+" ..X X.. ",
+" ... ... ",
+" ....... ",
+" "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("plusarm"), plusarm_xpm);
+}
+{
+#define resize1_width 13
+#define resize1_height 13
+#define resize1_x_hot 6
+#define resize1_y_hot 6
+static UNSIGNED_CHAR resize1_bits[] = {
+ 0x7f, 0x00, 0x21, 0x00, 0x11, 0x00, 0x31, 0x00, 0x6d, 0x00, 0xdb, 0x00,
+ 0xb1, 0x11, 0x60, 0x1b, 0xc0, 0x16, 0x80, 0x11, 0x00, 0x11, 0x80, 0x10,
+ 0xc0, 0x1f};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("resize1"),(char*) resize1_bits, resize1_width, resize1_height);
+}
+{
+#define resize2_width 13
+#define resize2_height 13
+#define resize2_x_hot 6
+#define resize2_y_hot 6
+static UNSIGNED_CHAR resize2_bits[] = {
+ 0xc0, 0x1f, 0x80, 0x10, 0x00, 0x11, 0x80, 0x11, 0xc0, 0x16, 0x60, 0x1b,
+ 0xb1, 0x11, 0xdb, 0x00, 0x6d, 0x00, 0x31, 0x00, 0x11, 0x00, 0x21, 0x00,
+ 0x7f, 0x00};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("resize2"), (char*)resize2_bits, resize2_width, resize2_height);
+}
+{
+#define restore_width 15
+#define restore_height 15
+static UNSIGNED_CHAR restore_bits[] = {
+ 0x00, 0x00, 0x80, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f,
+ 0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x1f, 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03,
+ 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("restore"), (char*)restore_bits, restore_width, restore_height);
+}
+{
+#define srcfile_width 12
+#define srcfile_height 12
+static UNSIGNED_CHAR srcfile_bits[] = {
+ 0xfe, 0x01, 0x02, 0x01, 0x02, 0x07, 0x02, 0x04, 0x72, 0x04, 0x8a, 0x04,
+ 0x0a, 0x04, 0x0a, 0x04, 0x8a, 0x04, 0x72, 0x04, 0x02, 0x04, 0xfe, 0x07};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("srcfile"), (char*)srcfile_bits, srcfile_width, srcfile_height);
+}
+{
+/* XPM */
+static char * srcfile_xpm[] = {
+"12 12 3 1",
+" s None c None",
+". c black",
+"X c gray91",
+" ........ ",
+" .XXXXXX. ",
+" .XXXXXX... ",
+" .XXXXXXXX. ",
+" .XX...XXX. ",
+" .X.XXX.XX. ",
+" .X.XXXXXX. ",
+" .X.XXXXXX. ",
+" .X.XXX.XX. ",
+" .XX...XXX. ",
+" .XXXXXXXX. ",
+" .......... "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("srcfile"), srcfile_xpm);
+}
+{
+#define system_width 15
+#define system_height 15
+static UNSIGNED_CHAR system_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f,
+ 0x02, 0x20, 0x02, 0x20, 0xfe, 0x3f, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("system"), (char*)system_bits, system_width, system_height);
+}
+{
+#define textfile_width 12
+#define textfile_height 12
+static UNSIGNED_CHAR textfile_bits[] = {
+ 0xfe, 0x01, 0x02, 0x01, 0x02, 0x07, 0x7a, 0x04, 0x02, 0x04, 0x3a, 0x04,
+ 0x02, 0x04, 0xfa, 0x04, 0x02, 0x04, 0xfa, 0x04, 0x02, 0x04, 0xfe, 0x07};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("textfile"), (char*)textfile_bits, textfile_width, textfile_height);
+}
+{
+/* XPM */
+static char * textfile_xpm[] = {
+"12 12 3 1",
+" s None c None",
+". c black",
+"X c #FFFFFFFFF3CE",
+" ........ ",
+" .XXXXXX. ",
+" .XXXXXX... ",
+" .X....XXX. ",
+" .XXXXXXXX. ",
+" .X...XXXX. ",
+" .XXXXXXXX. ",
+" .X.....XX. ",
+" .XXXXXXXX. ",
+" .X.....XX. ",
+" .XXXXXXXX. ",
+" .......... "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("textfile"), textfile_xpm);
+}
+{
+#define tick_width 14
+#define tick_height 14
+static UNSIGNED_CHAR tick_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x38, 0x00, 0x1c, 0x00, 0x0e,
+ 0x00, 0x07, 0x80, 0x03, 0xc2, 0x01, 0xe7, 0x00, 0x7f, 0x00, 0x3e, 0x00,
+ 0x1c, 0x00, 0x08, 0x00};
+Tk_DefineBitmap(Et_Interp, Tk_GetUid("tick"), (char*)tick_bits, tick_width, tick_height);
+}
+{
+/* XPM */
+static char * warning_xpm[] = {
+"32 32 3 1",
+" s None c None",
+". c #000000000000",
+"X c yellow",
+" ",
+" ......... ",
+" ...XXXXXXXXX... ",
+" .XXXXXXXXXXXXXXX. ",
+" ..XXXXXXXXXXXXXXXXX.. ",
+" .XXXXXXXXX...XXXXXXXXX. ",
+" .XXXXXXXXX.....XXXXXXXXX. ",
+" .XXXXXXXXX.....XXXXXXXXX. ",
+" .XXXXXXXXX.......XXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+" .XXXXXXXXXX.......XXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXX.......XXXXXXXXXXX. ",
+".XXXXXXXXXXXX.....XXXXXXXXXXXX. ",
+".XXXXXXXXXXXX.....XXXXXXXXXXXX. ",
+".XXXXXXXXXXXX.....XXXXXXXXXXXX. ",
+".XXXXXXXXXXXXX...XXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XXXXXXXXXXXX...XXXXXXXXXXXX. ",
+" .XXXXXXXXXXX.....XXXXXXXXXXX. ",
+" .XXXXXXXXX.......XXXXXXXXX. ",
+" .XXXXXXXX.......XXXXXXXX. ",
+" .XXXXXXXX.......XXXXXXXX. ",
+" .XXXXXXXX.....XXXXXXXX. ",
+" ..XXXXXXX...XXXXXXX.. ",
+" .XXXXXXXXXXXXXXX. ",
+" ...XXXXXXXXX... ",
+" ......... "};
+Tix_DefinePixmap(Et_Interp, Tk_GetUid("warning"), warning_xpm);
+}
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixDef.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixDef.h
new file mode 100644
index 00000000000..14b2dbc67e7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixDef.h
@@ -0,0 +1,173 @@
+
+/* $Id: tixDef.h,v 1.2 2000/10/17 16:35:37 idiscovery Exp $ */
+
+/*
+ * tixdef.h --
+ *
+ * This file defines the defaults for all options for all of
+ * the Tix widgets.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#ifndef TIX_DEFAULT
+#define TIX_DEFAULT
+
+/*
+ * Include the defaults of the TK distriburion
+ */
+#ifndef _DEFAULT
+#include <default.h>
+#endif
+
+#ifndef CTL_FONT
+#define CTL_FONT "Helvetica -12 bold"
+#endif
+
+#define BORDER_COLOR "gray"
+
+/*
+ * Compound widget
+ */
+#define DEF_CMPIMAGE_BG_COLOR NORMAL_BG
+#define DEF_CMPIMAGE_BG_MONO WHITE
+#define DEF_CMPIMAGE_FG_COLOR BLACK
+#define DEF_CMPIMAGE_FG_MONO BLACK
+#define DEF_CMPIMAGE_FONT CTL_FONT
+
+/*
+ * tixHList widget
+ */
+#define DEF_HLIST_BG_COLOR NORMAL_BG
+#define DEF_HLIST_BG_MONO WHITE
+#define DEF_HLIST_BORDER_WIDTH "2"
+#define DEF_HLIST_BROWSE_COMMAND ""
+#define DEF_HLIST_COMMAND ""
+#define DEF_HLIST_COLUMNS "1"
+#define DEF_HLIST_CURSOR ""
+#define DEF_HLIST_DISPLAY_MODE "tree"
+#define DEF_HLIST_DRAG_COMMAND ""
+#define DEF_HLIST_DRAW_BRANCH "true"
+#define DEF_HLIST_DROP_COMMAND ""
+#define DEF_HLIST_EXPORT_SELECTION "0"
+#define DEF_HLIST_FONT CTL_FONT
+#define DEF_HLIST_FG_COLOR BLACK
+#define DEF_HLIST_FG_MONO BLACK
+#define DEF_HLIST_HEADER "0"
+#define DEF_HLIST_HEIGHT "10"
+#define DEF_HLIST_HIGHLIGHT_COLOR BLACK
+#define DEF_HLIST_HIGHLIGHT_MONO BLACK
+#define DEF_HLIST_HIGHLIGHT_WIDTH "2"
+#define DEF_HLIST_RELIEF "sunken"
+#define DEF_HLIST_ORIENT "vertical"
+#define DEF_HLIST_PADX "2"
+#define DEF_HLIST_PADY "2"
+#define DEF_HLIST_GAP "5"
+#define DEF_HLIST_INDENT "10"
+#define DEF_HLIST_INDICATOR "0"
+#define DEF_HLIST_INDICATOR_CMD ""
+#define DEF_HLIST_ITEM_TYPE "text"
+#define DEF_HLIST_SELECT_BG_COLOR ACTIVE_BG
+#define DEF_HLIST_SELECT_FG_COLOR BLACK
+#define DEF_HLIST_SELECT_BG_MONO BLACK
+#define DEF_HLIST_SELECT_FG_MONO WHITE
+#define DEF_HLIST_SELECT_MODE "browse"
+#define DEF_HLIST_SELECT_BORDERWIDTH "1"
+#define DEF_HLIST_SEPARATOR "."
+#define DEF_HLIST_SIZE_COMMAND ""
+#define DEF_HLIST_TAKE_FOCUS "1"
+#define DEF_HLIST_WIDTH "20"
+#define DEF_HLIST_WIDE_SELECT "true"
+#define DEF_HLIST_Y_SCROLL_COMMAND ""
+#define DEF_HLIST_X_SCROLL_COMMAND ""
+
+/*
+ * HList Entry
+ */
+#define DEF_HLISTENTRY_BITMAP ""
+#define DEF_HLISTENTRY_DATA ""
+#define DEF_HLISTENTRY_GAP "4"
+#define DEF_HLISTENTRY_IMAGE ""
+#define DEF_HLISTENTRY_JUSTIFY "left"
+#define DEF_HLISTENTRY_NAME ""
+#define DEF_HLISTENTRY_PADX "2"
+#define DEF_HLISTENTRY_PADY "2"
+#define DEF_HLISTENTRY_STATE "normal"
+#define DEF_HLISTENTRY_TEXT ""
+#define DEF_HLISTENTRY_UNDERLINE "-1"
+#define DEF_HLISTENTRY_WIDGET ""
+#define DEF_HLISTENTRY_WLENGTH "0"
+
+/*
+ * HList Entry
+ */
+#define DEF_HLISTHEADER_BG_COLOR NORMAL_BG
+#define DEF_HLISTHEADER_BG_MONO WHITE
+#define DEF_HLISTHEADER_BORDER_WIDTH "2"
+#define DEF_HLISTHEADER_RELIEF "raised"
+
+/*
+ * tixNBFrame widget
+ */
+#define DEF_NOTEBOOKFRAME_ACTIVE_BG_COLOR ACTIVE_BG
+#define DEF_NOTEBOOKFRAME_ACTIVE_BG_MONO BLACK
+#define DEF_NOTEBOOKFRAME_INACTIVE_BG_COLOR TROUGH
+#define DEF_NOTEBOOKFRAME_INACTIVE_BG_MONO WHITE
+#define DEF_NOTEBOOKFRAME_BACKPAGE_COLOR NORMAL_BG
+#define DEF_NOTEBOOKFRAME_BACKPAGE_MONO WHITE
+#define DEF_NOTEBOOKFRAME_BG_COLOR NORMAL_BG
+#define DEF_NOTEBOOKFRAME_BG_MONO WHITE
+#define DEF_NOTEBOOKFRAME_DISABLED_FG_COLOR DISABLED
+#define DEF_NOTEBOOKFRAME_DISABLED_FG_MONO ""
+#define DEF_NOTEBOOKFRAME_FOCUS_COLOR BLACK
+#define DEF_NOTEBOOKFRAME_FOCUS_MONO BLACK
+#define DEF_NOTEBOOKFRAME_BORDER_WIDTH "2"
+#define DEF_NOTEBOOKFRAME_CURSOR ""
+#define DEF_NOTEBOOKFRAME_FONT CTL_FONT
+#define DEF_NOTEBOOKFRAME_FG_COLOR BLACK
+#define DEF_NOTEBOOKFRAME_FG_MONO BLACK
+#define DEF_NOTEBOOKFRAME_RELIEF "sunken"
+#define DEF_NOTEBOOKFRAME_SLAVE "1"
+#define DEF_NOTEBOOKFRAME_TAKE_FOCUS "1"
+#define DEF_NOTEBOOKFRAME_WIDTH "10"
+#define DEF_NOTEBOOKFRAME_TABPADX "6"
+#define DEF_NOTEBOOKFRAME_TABPADY "5"
+
+/*
+ * tixTList.h
+ */
+#define DEF_TLIST_BG_COLOR NORMAL_BG
+#define DEF_TLIST_BG_MONO WHITE
+#define DEF_TLIST_BORDER_WIDTH "2"
+#define DEF_TLIST_BROWSE_COMMAND ""
+#define DEF_TLIST_COMMAND ""
+#define DEF_TLIST_CURSOR ""
+#define DEF_TLIST_FONT CTL_FONT
+#define DEF_TLIST_FG_COLOR BLACK
+#define DEF_TLIST_FG_MONO BLACK
+#define DEF_TLIST_HEIGHT "10"
+#define DEF_TLIST_HIGHLIGHT_COLOR BLACK
+#define DEF_TLIST_HIGHLIGHT_MONO BLACK
+#define DEF_TLIST_HIGHLIGHT_WIDTH "2"
+#define DEF_TLIST_ITEM_TYPE "text"
+#define DEF_TLIST_RELIEF "sunken"
+#define DEF_TLIST_ORIENT "vertical"
+#define DEF_TLIST_PADX "2"
+#define DEF_TLIST_PADY "2"
+#define DEF_TLIST_SELECT_BG_COLOR ACTIVE_BG
+#define DEF_TLIST_SELECT_FG_COLOR BLACK
+#define DEF_TLIST_SELECT_BG_MONO BLACK
+#define DEF_TLIST_SELECT_FG_MONO WHITE
+#define DEF_TLIST_SELECT_MODE "browse"
+#define DEF_TLIST_SELECT_BORDERWIDTH "1"
+#define DEF_TLIST_STATE "normal"
+#define DEF_TLIST_SIZE_COMMAND ""
+#define DEF_TLIST_TAKE_FOCUS "1"
+#define DEF_TLIST_WIDTH "20"
+#define DEF_TLIST_Y_SCROLL_COMMAND ""
+#define DEF_TLIST_X_SCROLL_COMMAND ""
+
+#endif /* TIX_DEFAULT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixForm.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixForm.h
new file mode 100644
index 00000000000..8b2dbcd6976
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixForm.h
@@ -0,0 +1,143 @@
+
+/* $Id: tixForm.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixForm.h --
+ *
+ * Declares the internal functions and data types for the Tix Form
+ * geometry manager.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_FORM_H
+#define _TIX_FORM_H
+
+#define SIDE0 0
+#define SIDE1 1
+
+#define NEXT_SIDE(x) (!x)
+
+#define SIDEX 0
+#define SIDEY 1
+
+#define AXIS_X 0
+#define AXIS_Y 1
+
+#define OPPO_SIDE0 1
+#define OPPO_SIDE1 2
+#define OPPO_ALL 3
+
+#define PINNED_SIDE0 4
+#define PINNED_SIDE1 8
+#define PINNED_ALL 12
+
+#define ATT_NONE 0
+#define ATT_GRID 1
+#define ATT_OPPOSITE 2
+#define ATT_PARALLEL 3
+
+/*
+ * The following structures carry information about the client windows
+ */
+typedef union {
+ int grid;
+ struct _FormInfo * widget;
+} Attachment;
+
+typedef struct {
+ int pcnt; /* percentage anchor point */
+ int disp; /* displacement from the percentage anchor point*/
+} Side;
+
+typedef struct _FormInfo {
+ Tk_Window tkwin;
+ struct _MasterInfo* master; /* The master of this window */
+ struct _FormInfo * next;
+
+ int depend; /* used to detect circular dependency*/
+
+ /* These are specified by the user and set by the "tixForm" command
+ */
+ Attachment att[2][2]; /* anchor of attachment */
+ int off[2][2]; /* offset of attachment */
+ char isDefault[2][2];/* Is this side a default attachment*/
+
+ char attType[2][2]; /* type of attachment
+ GRID or PIXEL*/
+ int pad[2][2]; /* value of padding */
+
+ /* These values are calculated by the PinnClient() functions
+ * and are used to calculated the required size of the master
+ * inside CalculateMasterGeometry(), as well as the positions
+ * of the clients inside ArrangeGeometry()
+ */
+ Side side[2][2];
+ int sideFlags[2];
+
+ /* These values are used to place the clients into the clients
+ */
+ int posn[2][2];
+
+ /* These things are for Spring'ing */
+ int spring[2][2];
+ struct _FormInfo * strWidget[2][2];
+ int springFail[2];
+ int fill[2];
+} FormInfo;
+
+
+/*
+ * The following structures carry information about the master windows
+ */
+typedef struct {
+ unsigned int isDeleted : 1;
+ unsigned int repackPending : 1;
+} MasterFlags;
+
+typedef struct _MasterInfo {
+ Tk_Window tkwin;
+ struct _FormInfo * client;
+ struct _FormInfo * client_tail;
+ int numClients;
+ int reqSize[2];
+ int numRequests; /* This is used to detect
+ * whether two geometry managers
+ * are used to manage the same
+ * master window
+ */
+ int grids[2];
+ MasterFlags flags;
+} MasterInfo;
+
+/* tixFormMisc.c */
+
+
+EXTERN int TixFm_Configure _ANSI_ARGS_((FormInfo *clientPtr,
+ Tk_Window topLevel,
+ Tcl_Interp* interp, int argc, Tcl_Obj *CONST *objv));
+
+/* tixForm.c */
+EXTERN FormInfo * TixFm_GetFormInfo _ANSI_ARGS_((Tk_Window tkwin,
+ int create));
+EXTERN void TixFm_StructureProc _ANSI_ARGS_((ClientData clientData,
+ XEvent * eventPtr));
+EXTERN void TixFm_AddToMaster _ANSI_ARGS_((MasterInfo *masterPtr,
+ FormInfo *clientPtr));
+EXTERN void TixFm_DeleteMaster _ANSI_ARGS_((
+ MasterInfo *masterPtr));
+EXTERN void TixFm_FreeMasterInfo _ANSI_ARGS_((
+ char *clientData));
+EXTERN FormInfo * TixFm_FindClientPtrByName _ANSI_ARGS_((
+ Tcl_Interp * interp, char * name,
+ Tk_Window topLevel));
+EXTERN void TixFm_ForgetOneClient _ANSI_ARGS_((
+ FormInfo *clientPtr));
+EXTERN void TixFm_Unlink _ANSI_ARGS_((FormInfo *clientPtr));
+EXTERN void TixFm_UnlinkFromMaster _ANSI_ARGS_((
+ FormInfo *clientPtr));
+#endif /* _TIX_FORM_H */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixGrData.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixGrData.h
new file mode 100644
index 00000000000..1db10aaa37b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixGrData.h
@@ -0,0 +1,88 @@
+
+/* $Id: tixGrData.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixGData.h --
+ *
+ * Defines portable data structure for tixGrid.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_GRID_DATA_H_
+#define _TIX_GRID_DATA_H_
+
+/*
+ * Data structure that stored the cells in a Grid widget. It is optimized
+ * for column/row insertion and deletion.
+ *
+ * - A grid is divideded into a set of rows and columns. Each row and column
+ * is divided into a set of cells.
+ *
+ * - The following discusses the structure of a row. The structure of a
+ * column is the reverse of a row.
+ *
+ * Row y is stored in the hash table TixGridDataSet.index[1] with
+ * the index y. Hence, to search for row y, we use the FindHashEntry
+ * operation:
+ *
+ * row_y = TixGridDataSet.index[1].FindHashEntry(y);
+ *
+ * To locate a cell (x,y), we can first find the row y, and then
+ * locate the cell at column x of this row. Note that the cell is
+ * *not* indexed by its column position (y), but rather by the hash
+ * table of the column y. The following example illustrates how cell
+ * (x,y) can be searched:
+ *
+ * row_y = TixGridDataSet.index[1].FindHashEntry(y);
+ * col_x = TixGridDataSet.index[0].FindHashEntry(x);
+ *
+ * cell_xy = row_x.list.FindHashEntry(&col_x);
+ *
+ * The advantage of this arrangement is it is very efficient to
+ * insert a row into into the grid -- we just have to fix the
+ * indices of the rows table. For example, if, after the insertion,
+ * row_y is now moved to the row y1, we change its index from y to
+ * y1. In general, an insertion operation takes log(n) time in a
+ * grid that contains n items.
+ *
+ */
+typedef struct TixGridDataSet {
+ Tcl_HashTable index[2]; /* the row and column indices */
+ /* index[0] holds the columns
+ * (horizontal index)
+ */
+ int maxIdx[2]; /* the max row/col, or {-1,-1}
+ * if there are no rows/col
+ */
+} TixGridDataSet;
+
+#define TIX_GR_AUTO 0
+#define TIX_GR_DEFAULT 1
+#define TIX_GR_DEFINED_PIXEL 2
+#define TIX_GR_DEFINED_CHAR 3
+
+typedef struct TixGridSize {
+ int sizeType;
+ int sizeValue; /* width or height */
+ int pixels;
+ int pad0, pad1;
+ double charValue;
+} TixGridSize;
+
+typedef struct TixGridRowCol {
+ /* private: */
+ Tcl_HashTable table;
+
+ /* public: */
+ int dispIndex; /* the row or column in which
+ * this TixGridRowCol is displayed */
+ TixGridSize size;
+} TixGridRowCol;
+
+
+#endif
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixGrid.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixGrid.h
new file mode 100644
index 00000000000..b1733b64e18
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixGrid.h
@@ -0,0 +1,458 @@
+
+/* $Id: tixGrid.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixGrid.h --
+ *
+ * Defines main data structures for tixGrid
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_GRID_H_
+#define _TIX_GRID_H_
+#include "tkVMacro.h"
+
+#ifndef _TIX_GRID_DATA_H_
+#include "tixGrData.h"
+#endif
+
+#define TIX_X 0
+#define TIX_Y 1
+
+
+#define TIX_S_MARGIN 0
+#define TIX_X_MARGIN 1
+#define TIX_Y_MARGIN 2
+#define TIX_MAIN 3
+
+#define TIX_SITE_NONE -1
+
+typedef struct TixGrEntry {
+ Tix_DItem * iPtr;
+ Tcl_HashEntry * entryPtr[2]; /* The index of this entry in the
+ * row/col tables */
+} TixGrEntry;
+
+/*----------------------------------------------------------------------
+ * Render Block
+ *
+ * Before the Grid is rendered, information is filled into a pseudo 2D
+ * array of RenderBlockElem's:
+ *
+ * (1) entries are placed in the appropriate (x,y) locations
+ * (2) background and borders are formatted according
+ * (3) highlights are formatted.
+ *
+ * The widget is redrawn using the render-block. This saves reformatting
+ * the next time the widget is exposed.
+ *----------------------------------------------------------------------
+ */
+typedef struct RenderBlockElem {
+ TixGrEntry * chPtr; /* not allocated, don't need to free */
+ int borderW[2][2];
+ int index[2];
+
+ unsigned int selected : 1;
+ unsigned int filled : 1;
+} RenderBlockElem;
+
+
+/* ElmDispSize --
+ *
+ * This structure stores the size information of the visible
+ * rows (RenderBlock.dispSize[0][...]) and columns
+ * (RenderBlock.dispSize[1][...])
+ */
+typedef struct ElmDispSize {
+ int preBorder;
+ int size;
+ int postBorder;
+
+ int total; /* simple the sum of the above */
+} ElmDispSize;
+
+typedef struct RenderBlock {
+ int size[2]; /* num of rows and cols in the render block */
+
+ RenderBlockElem **elms; /* An Malloc'ed pseudo 2D array (you can do
+ * things like elms[0][0]), Used for the
+ * main body of the Grid.
+ */
+ ElmDispSize *dispSize[2]; /* (dispSizes[0][x], dispSizes[1][y])
+ * will be the dimension of the element (x,y)
+ * displayed on the screen (may be bigger
+ * or smaller than its desired size). */
+ int visArea[2]; /* visible area (width times height) of
+ * the visible cells on the screen */
+} RenderBlock;
+
+/*----------------------------------------------------------------------
+ * RenderInfo
+ *
+ * This stores information for rendering from the RB into an X drawable.
+ *
+ *----------------------------------------------------------------------
+ */
+typedef struct RenderInfo {
+ Drawable drawable;
+ int origin[2];
+ int offset[2];
+ int size[2]; /* width and height of the area to draw
+ * (number of pixels starting from the offset)
+ * if offset = (2,2) and size = (5,5) we have
+ * to draw the rectangle ((2,2), (6,6));
+ */
+ struct { /* the current valid grid area for the */
+ int x1, x2, y1, y2; /* "format" command */
+ int whichArea;
+ } fmt;
+} RenderInfo;
+
+typedef struct ExposedArea {
+ int x1, y1, x2, y2;
+} ExposedArea, Rect;
+
+/*----------------------------------------------------------------------
+ * ColorInfo
+ *
+ * These colors are used by the format commands. They must be saved
+ * or otherwise the colormap may be changed ..
+ *----------------------------------------------------------------------
+ */
+typedef struct ColorInfo {
+ struct ColorInfo * next;
+ int counter;
+ int type; /* TK_CONFIG_BORDER or TK_CONFIG_COLOR */
+ long pixel;
+ Tk_3DBorder border;
+ XColor * color;
+} ColorInfo;
+
+/*----------------------------------------------------------------------
+ * SelectBlock
+ *
+ * These structures are arranged in a list and are used to determine
+ * where a cell is selected.
+ *----------------------------------------------------------------------
+ */
+#define TIX_GR_CLEAR 1
+#define TIX_GR_SET 2
+#define TIX_GR_TOGGLE 3
+
+#define TIX_GR_MAX 0x7fffffff
+
+#define TIX_GR_RESIZE 1
+#define TIX_GR_REDRAW 2
+
+
+typedef struct SelectBlock {
+ struct SelectBlock * next;
+ int range[2][2]; /* the top left and bottom right corners */
+ int type; /* TIX_GR_CLEAR, TIX_GR_SET,
+ * TIX_GR_TOGGLE
+ *
+ * If several SelectBlock covers the same
+ * cell, the last block in the wPtr->selList
+ * determines whether this cell is selected
+ * or not */
+} SelectBlock;
+
+/*----------------------------------------------------------------------
+ * GrSortItem
+ *
+ * Used to sort the items in the grid
+ *----------------------------------------------------------------------
+ */
+typedef struct Tix_GrSortItem {
+ Tcl_Obj * data; /* is usually a string, but
+ * can be a pointer to an
+ * arbitrary data in C API */
+ int index; /* row or column */
+} Tix_GrSortItem;
+
+/*----------------------------------------------------------------------
+ * Data structure for iterating the cells inside the grid.
+ *
+ *----------------------------------------------------------------------
+ */
+
+typedef struct Tix_GrDataRowSearch {
+ struct TixGridRowCol * row;
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry *hashPtr;
+} Tix_GrDataRowSearch;
+
+typedef struct Tix_GrDataCellSearch {
+ char * data;
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry *hashPtr;
+} Tix_GrDataCellSearch;
+
+/*----------------------------------------------------------------------
+ *
+ * Main data structure of the grid widget.
+ *
+ *----------------------------------------------------------------------
+ */
+typedef struct Tix_GridScrollInfo {
+ LangCallback *command;
+
+ int max; /* total size (width or height) of the widget*/
+ int offset; /* The top/left side of the scrolled widget */
+ int unit; /* How much should we scroll when the user */
+
+ double window; /* visible size, percentage of the total */
+}Tix_GridScrollInfo;
+
+
+typedef struct GridStruct {
+ Tix_DispData dispData;
+
+ Tcl_Command widgetCmd; /* Token for button's widget command. */
+
+ /*
+ * Information used when displaying widget:
+ */
+ int reqSize[2]; /* For app programmer to request size */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ /* Border and general drawing */
+ int borderWidth; /* Width of 3-D borders. */
+ int selBorderWidth; /* Width of 3-D borders for selected items */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ Tk_3DBorder border; /* Used for drawing the 3d border. */
+ Tk_3DBorder selectBorder; /* Used for selected background. */
+ XColor *normalFg; /* Normal foreground for text. */
+ XColor *normalBg; /* Normal background for text. */
+ XColor *selectFg; /* Color for drawing selected text. */
+
+ Tk_Uid state; /* State can only be normal or disabled. */
+
+ /* GC and stuff */
+ GC backgroundGC; /* GC for drawing background. */
+ GC selectGC; /* GC for drawing selected background. */
+ GC anchorGC; /* GC for drawing dotted anchor highlight. */
+ TixFont font; /* Default font used by the DItems. */
+
+ /* Text drawing */
+ Cursor cursor; /* Current cursor for window, or None. */
+
+ /* For highlights */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ int bdPad; /* = highlightWidth + borderWidth */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ GC highlightGC; /* For drawing traversal highlight. */
+
+ /*
+ * default pad and gap values
+ */
+ int padX, padY;
+
+ Tk_Uid selectMode; /* Selection style: single, browse, multiple,
+ * or extended. This value isn't used in C
+ * code, but the Tcl bindings use it. */
+ Tk_Uid selectUnit; /* Selection unit: cell, row or column.
+ * This value isn't used in C
+ * code, but the Tcl bindings use it. */
+
+ /*
+ * The following three sites are used according to the -selectunit.
+ * if selectunit is: "cell", [0] and [1] are used; "row", only [0]
+ * is used; "column", only [1] is used
+ */
+ int anchor[2]; /* The current anchor unit */
+ int dropSite[2]; /* The current drop site */
+ int dragSite[2]; /* The current drop site */
+
+ /*
+ * Callback commands.
+ */
+ LangCallback *command; /* The command when user double-clicks */
+ LangCallback *browseCmd; /* The command to call when the selection
+ * changes. */
+ LangCallback *editNotifyCmd; /* The command to call to determine whether
+ * a cell is editable. */
+ LangCallback *editDoneCmd; /* The command to call when an entry has
+ * been edited by the user.*/
+ LangCallback *formatCmd; /* The command to call when the Grid widget
+ * needs to be reformatted (e.g, Exposure
+ * events or when contents have been
+ * changed). */
+ LangCallback *sizeCmd; /* The command to call when the size of
+ * the listbox changes. E.g., when the user
+ * add/deletes elements. Useful for auto-
+ * scrollbar geometry managers */
+
+ /*
+ * Info for lay-out
+ */
+ char *takeFocus; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+
+ int serial; /* this number is incremented before each time
+ * the widget is redisplayed */
+
+ TixGridDataSet * dataSet;
+ RenderBlock * mainRB; /* Malloc'ed */
+
+ int hdrSize[2]; /* number of rows (height of x header, index
+ * [0]) and columns (width of y header, index
+ * [1]) */
+ int floatRange[2]; /* Are the num of columns and rows floated?
+ * (if floated, you can scroll past the max
+ * element).*/
+ int gridSize[2]; /* the size of the grid where there is data */
+ Tix_DItemInfo * diTypePtr; /* Default item type */
+ ExposedArea expArea;
+
+ RenderInfo * renderInfo; /* only points to stuff in stack */
+ Tix_GridScrollInfo scrollInfo[2];
+ int fontSize[2]; /* size of the "0" char of the -font option
+ */
+ TixGridSize defSize[2];
+ Tix_LinkList colorInfo;
+ Tix_LinkList selList;
+ Tix_LinkList mappedWindows;
+ int colorInfoCounter;
+
+ unsigned int hasFocus : 1;
+
+ unsigned int idleEvent : 1;
+ unsigned int toResize : 1; /* idle event */
+ unsigned int toRedraw : 1; /* idle event */
+
+ unsigned int toResetRB : 1; /* Do we need to reset the render block */
+ unsigned int toComputeSel : 1;
+ unsigned int toRedrawHighlight : 1;
+} Grid;
+
+typedef Grid WidgetRecord;
+typedef Grid * WidgetPtr;
+
+#define DEF_GRID_BG_COLOR NORMAL_BG
+#define DEF_GRID_BG_MONO WHITE
+#define DEF_GRID_BORDER_WIDTH "2"
+#define DEF_GRID_BROWSE_COMMAND ""
+#define DEF_GRID_COMMAND ""
+#define DEF_GRID_CURSOR ""
+#define DEF_GRID_DEFAULT_WIDTH "40"
+#define DEF_GRID_DEFAULT_HEIGHT "20"
+#define DEF_GRID_EDITDONE_COMMAND ""
+#define DEF_GRID_EDITNOTIFY_COMMAND ""
+#define DEF_GRID_FLOATING_ROWS "0"
+#define DEF_GRID_FLOATING_COLS "0"
+#define DEF_GRID_FONT "Helvetica -12 bold"
+#define DEF_GRID_FG_COLOR BLACK
+#define DEF_GRID_FG_MONO BLACK
+#define DEF_GRID_FORMAT_COMMAND ""
+#define DEF_GRID_HEIGHT "10"
+#define DEF_GRID_HIGHLIGHT_COLOR BLACK
+#define DEF_GRID_HIGHLIGHT_MONO BLACK
+#define DEF_GRID_HIGHLIGHT_WIDTH "2"
+#define DEF_GRID_LEFT_MARGIN "1"
+#define DEF_GRID_ITEM_TYPE "text"
+#define DEF_GRID_RELIEF "sunken"
+#define DEF_GRID_PADX "2"
+#define DEF_GRID_PADY "2"
+#define DEF_GRID_SELECT_BG_COLOR ACTIVE_BG
+#define DEF_GRID_SELECT_FG_COLOR BLACK
+#define DEF_GRID_SELECT_BG_MONO BLACK
+#define DEF_GRID_SELECT_FG_MONO WHITE
+#define DEF_GRID_SELECT_MODE "single"
+#define DEF_GRID_SELECT_UNIT "row"
+#define DEF_GRID_SELECT_BORDERWIDTH "1"
+#define DEF_GRID_STATE "normal"
+#define DEF_GRID_SIZE_COMMAND ""
+#define DEF_GRID_TAKE_FOCUS "1"
+#define DEF_GRID_TOP_MARGIN "1"
+#define DEF_GRID_WIDTH "4"
+#define DEF_GRID_Y_SCROLL_COMMAND ""
+#define DEF_GRID_X_SCROLL_COMMAND ""
+
+/*
+ * common functions
+ */
+
+EXTERN void Tix_GrAddChangedRect _ANSI_ARGS_((
+ WidgetPtr wPtr, int changedRect[2][2],
+ int isSite));
+EXTERN int Tix_GrConfigSize _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, Tcl_Obj *CONST *objv,
+ TixGridSize *sizePtr, char * argcErrorMsg,
+ int *changed_ret));
+EXTERN void Tix_GrDoWhenIdle _ANSI_ARGS_((WidgetPtr wPtr,
+ int type));
+EXTERN void Tix_GrCancelDoWhenIdle _ANSI_ARGS_((WidgetPtr wPtr));
+EXTERN void Tix_GrFreeElem _ANSI_ARGS_((TixGrEntry * chPtr));
+EXTERN void Tix_GrFreeUnusedColors _ANSI_ARGS_((WidgetPtr wPtr,
+ int freeAll));
+EXTERN void Tix_GrScrollPage _ANSI_ARGS_((WidgetPtr wPtr,
+ int count, int axis));
+
+/*
+ * The dataset functions
+ */
+
+EXTERN int TixGridDataConfigRowColSize _ANSI_ARGS_((
+ Tcl_Interp * interp, WidgetPtr wPtr,
+ TixGridDataSet * dataSet, int which, int index,
+ int argc, Tcl_Obj *CONST *objv, char * argcErrorMsg,
+ int *changed_ret));
+EXTERN char * TixGridDataCreateEntry _ANSI_ARGS_((
+ TixGridDataSet * dataSet, int x, int y,
+ char * defaultEntry));
+EXTERN int TixGridDataDeleteEntry _ANSI_ARGS_((
+ TixGridDataSet * dataSet, int x, int y));
+EXTERN void TixGridDataDeleteRange _ANSI_ARGS_((WidgetPtr wPtr,
+ TixGridDataSet * dataSet, int which,
+ int from, int to));
+EXTERN void TixGridDataDeleteSearchedEntry _ANSI_ARGS_((
+ Tix_GrDataCellSearch * cellSearchPtr));
+EXTERN char * TixGridDataFindEntry _ANSI_ARGS_((
+ TixGridDataSet * dataSet, int x, int y));
+EXTERN int TixGrDataFirstCell _ANSI_ARGS_((
+ Tix_GrDataRowSearch * rowSearchPtr,
+ Tix_GrDataCellSearch * cellSearchPtr));
+EXTERN int TixGrDataFirstRow _ANSI_ARGS_((
+ TixGridDataSet* dataSet,
+ Tix_GrDataRowSearch * rowSearchPtr));
+EXTERN int TixGridDataGetRowColSize _ANSI_ARGS_((
+ WidgetPtr wPtr, TixGridDataSet * dataSet,
+ int which, int index, TixGridSize * defSize,
+ int *pad0, int * pad1));
+EXTERN void TixGridDataGetGridSize _ANSI_ARGS_((
+ TixGridDataSet * dataSet, int *width_ret,
+ int *height_ret));
+EXTERN int TixGridDataGetIndex _ANSI_ARGS_((
+ Tcl_Interp * interp, WidgetPtr wPtr,
+ Tcl_Obj * xStr, Tcl_Obj * yStr, int * xPtr, int * yPtr));
+EXTERN void TixGridDataInsert _ANSI_ARGS_((
+ TixGridDataSet * dataSet,
+ int x, int y, ClientData data));
+EXTERN void TixGridDataMoveRange _ANSI_ARGS_((WidgetPtr wPtr,
+ TixGridDataSet * dataSet, int which,
+ int from, int to, int by));
+EXTERN int TixGrDataNextCell _ANSI_ARGS_((
+ Tix_GrDataCellSearch * cellSearchPtr));
+EXTERN int TixGrDataNextRow _ANSI_ARGS_((
+ Tix_GrDataRowSearch * rowSearchPtr));
+EXTERN TixGridDataSet* TixGridDataSetInit _ANSI_ARGS_((void));
+EXTERN void TixGridDataSetFree _ANSI_ARGS_((
+ TixGridDataSet* dataSet));
+EXTERN int TixGridDataUpdateSort _ANSI_ARGS_((
+ TixGridDataSet * dataSet, int axis,
+ int start, int end, Tix_GrSortItem *items));
+
+#endif /*_TIX_GRID_H_*/
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixHList.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixHList.h
new file mode 100644
index 00000000000..5625f137c15
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixHList.h
@@ -0,0 +1,323 @@
+
+/* $Id: tixHList.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixHList.h --
+ *
+ * Defines the data structures and functions used by the tixHList
+ * widget.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_HLIST_H_
+#define _TIX_HLIST_H_
+
+#ifndef _TIX_INT_H_
+#include "tixInt.h"
+#endif
+
+#include "tkVMacro.h"
+
+#define HLTYPE_COLUMN 1
+#define HLTYPE_HEADER 2
+#define HLTYPE_ENTRY 3
+
+/* This is used to indetify what object has caused a DItemSizeChange
+ * All data structs for objects that manage DItems must have these two
+ * members as the beginning of the struct.
+ */
+typedef struct HLItemTypeInfo {
+ int type;
+ char * self;
+} HLItemTypeInfo;
+
+typedef struct HListColumn {
+ /* generic type info section */
+ int type;
+ char * self;
+ struct _HListElement * chPtr;
+
+ /* other data */
+ Tix_DItem * iPtr;
+ int width;
+} HListColumn;
+
+typedef struct HListHeader {
+ /* generic type info section */
+ int type;
+ char * self;
+
+ struct HListStruct * wPtr;
+ /* other data */
+ Tix_DItem * iPtr;
+ int width;
+
+ Tk_3DBorder background; /* Used for drawing the 3d border. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int borderWidth;
+} HListHeader;
+
+/*----------------------------------------------------------------------
+ * A HListElement structure contain the information about each element
+ * inside the HList.
+ *
+ */
+typedef struct _HListElement {
+ /* generic type info section */
+ int type;
+ char * self;
+
+ /* other data */
+ struct HListStruct * wPtr;
+ struct _HListElement * parent;
+ struct _HListElement * prev;
+ struct _HListElement * next;
+ struct _HListElement * childHead;
+ struct _HListElement * childTail;
+
+ int numSelectedChild; /* number of childs that has selection(s) in
+ * them (either this child is selected or some
+ * of its descendants are selected */
+ int numCreatedChild; /* this var gets increment by one each
+ * time a child is created */
+ char * pathName; /* Full pathname of this element */
+ char * name; /* Name of this element */
+ int height; /* Height of this element, including padding
+ * and selBorderWidth;
+ */
+ int allHeight; /* Height of all descendants and self */
+ Tk_Uid state; /* State of Tab's for display purposes:
+ * normal or disabled. */
+ Tcl_Obj * data; /* user data field */
+ /* bottom-middle position of the bitmap/image branch (offset from
+ * the top-left corner of the item)
+ */
+ int branchX;
+ int branchY;
+
+ /* offset of the left-middle position of the icon */
+ int iconX;
+ int iconY;
+ /*----------------------------------*/
+ /* Things to display in the element */
+ /*----------------------------------*/
+ HListColumn * col; /* the multi-column display items */
+ HListColumn _oneCol; /* If we have only one column, then this
+ * space is used (pointed to by column).
+ * This will save one Malloc */
+ int indent;
+ Tix_DItem * indicator; /* indicator: little triangle on Mac */
+
+ /*----------------------------------*/
+ /* Flags */
+ /*----------------------------------*/
+ Tix_DItemInfo * diTypePtr;
+
+ unsigned int selected : 1;
+ unsigned int hidden : 1;
+ unsigned int dirty : 1; /* If it is dirty then its geometry needs
+ * be recalculated */
+} Tix_HListElement, HListElement;
+
+/*
+ * A data structure of the following type is kept for each
+ * widget managed by this file:
+ */
+typedef struct HListStruct {
+ Tix_DispData dispData;
+ Tcl_Command widgetCmd; /* Token for button's widget command. */
+
+ /*
+ * Information used when displaying widget:
+ */
+ LangCallback *command; /* Command prefix to use when invoking
+ * scrolling commands. NULL means don't
+ * invoke commands. Malloc'ed. */
+ int width, height; /* For app programmer to request size */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ /* Border and general drawing */
+ int borderWidth; /* Width of 3-D borders. */
+ int selBorderWidth; /* Width of 3-D borders for selected items */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int indent; /* How much should the children be indented
+ * (to the right)?, in pixels */
+ Tk_3DBorder border; /* Used for drawing the 3d border. */
+ Tk_3DBorder selectBorder; /* Used for selected background. */
+ XColor *normalFg; /* Normal foreground for text. */
+ XColor *normalBg; /* Normal bachground for text. */
+ XColor *selectFg; /* Color for drawing selected text. */
+ TixFont font; /* The default font used in the DItems. */
+ GC backgroundGC; /* GC for drawing background. */
+ GC normalGC; /* GC for drawing text in normal mode. */
+ GC selectGC; /* GC for drawing selected background. */
+ GC anchorGC; /* GC for drawing dotted anchor highlight. */
+ GC dropSiteGC; /* GC for drawing dotted anchor highlight. */
+
+ Cursor cursor; /* Current cursor for window, or None. */
+
+ int topPixel; /* Vertical offset */
+ int leftPixel; /* Horizontal offset */
+ int bottomPixel;
+ int wideSelect; /* BOOL: if 1, use a wide selection: the
+ * selection background color covers the whole
+ * widget. If 0, only the "significant" part
+ * of a list entry is highlighted */
+ int selectWidth; /* Width of the selection: takes effect only
+ * if wideSelect == 1 */
+ int exportSelection; /* Do we grab X Selection */
+ /* For highlights */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ GC highlightGC; /* For drawing traversal highlight. */
+
+ /* default pad and gap values */
+ int gap, padX, padY;
+ char * separator;
+
+ Tk_Uid selectMode; /* Selection style: single, browse, multiple,
+ * or extended. This value isn't used in C
+ * code, but the Tcl bindings use it. */
+ int drawBranch; /* Whether to draw the "branch" lines from
+ * parent entry to children */
+ Tcl_HashTable childTable; /* Hash table to translate child names
+ * into (HListElement *) */
+ HListElement * root; /* Mother of all elements */
+ HListElement * anchor; /* The current anchor item */
+ HListElement * dragSite; /* The current drag site */
+ HListElement * dropSite; /* The current drop site */
+
+ LangCallback *yScrollCmd; /* Command prefix for communicating with
+ * vertical scrollbar. NULL means no command
+ * to issue. Malloc'ed. */
+ LangCallback *xScrollCmd; /* Command prefix for communicating with
+ * horizontal scrollbar. NULL means no command
+ * to issue. Malloc'ed. */
+ LangCallback *sizeCmd; /* The command to call when the size of
+ * the listbox changes. E.g., when the user
+ * add/deletes elements. Useful for
+ * auto-scrollbar geometry managers */
+ LangCallback *browseCmd; /* The command to call when the selection
+ * changes. */
+ LangCallback *indicatorCmd; /* The command to call when the user touches
+ * the indicator. */
+ LangCallback *dragCmd; /* The command to call when info about a
+ * drag source is needed */
+ LangCallback *dropCmd; /* The command to call when action at a drop
+ * side needs to be performed */
+ char *takeFocus; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+
+ Tix_LinkList mappedWindows; /* Those windows that are are mapped by this
+ * widget*/
+ int serial; /* this number is incremented before each time
+ * the widget is redisplayed */
+
+ int numColumns; /* number of columns in the tixHList widget,
+ * cannot be changed after the widget's
+ * creation */
+
+ int totalSize[2];
+
+ HListColumn * reqSize; /* Requested column sizes by the user:
+ take precedence */
+ HListColumn * actualSize; /* Actual column sizes, calculated using
+ * the sizes of the ditems */
+
+ HListHeader ** headers; /* Stores all the headers for a HList widget */
+ int useHeader; /* whether headers should be used */
+ int headerHeight; /* required height of the header */
+
+ Tix_DItemInfo * diTypePtr; /* Default item type */
+ Tix_StyleTemplate stTmpl;
+
+ int useIndicator; /* should indicators be displayed */
+ int scrollUnit[2];
+
+ Tk_Window headerWin; /* subwindow, used to draw the headers */
+ char * elmToSee; /* name of element to "see" the next time
+ * this widget is redrawn */
+ unsigned redrawing : 1;
+ unsigned redrawingFrame : 1;
+ unsigned resizing : 1;
+ unsigned hasFocus : 1;
+ unsigned allDirty : 1;
+ unsigned initialized : 1;
+ unsigned headerDirty : 1;
+ unsigned needToRaise : 1; /* The header subwindow needs to be raised
+ * if we add a new window item into the
+ * HList widget (either in the list or
+ * in the header */
+} HList;
+
+#define TIX_X 0
+#define TIX_Y 1
+#define UNINITIALIZED -1
+
+typedef HList WidgetRecord;
+typedef HList * WidgetPtr;
+
+EXTERN TIX_DECLARE_SUBCMD(Tix_HLColumn);
+EXTERN TIX_DECLARE_SUBCMD(Tix_HLItem);
+
+EXTERN HListColumn * Tix_HLAllocColumn _ANSI_ARGS_((
+ WidgetPtr wPtr, HListElement * chPtr));
+EXTERN void Tix_HLCancelResizeWhenIdle _ANSI_ARGS_((
+ WidgetPtr wPtr));
+EXTERN void Tix_HLComputeGeometry _ANSI_ARGS_((
+ ClientData clientData));
+EXTERN HListElement * Tix_HLFindElement _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, char * pathName));
+EXTERN void Tix_HLFreeMappedWindow _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+EXTERN int Tix_HLElementTopOffset _ANSI_ARGS_((
+ WidgetPtr wPtr, HListElement *chPtr));
+EXTERN int Tix_HLElementLeftOffset _ANSI_ARGS_((
+ WidgetPtr wPtr, HListElement *chPtr));
+EXTERN int Tix_HLItemInfo _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tix_HLHeader _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tix_HLCreateHeaders _ANSI_ARGS_((
+ Tcl_Interp *interp, WidgetPtr wPtr));
+EXTERN void Tix_HLFreeHeaders _ANSI_ARGS_((
+ Tcl_Interp *interp, WidgetPtr wPtr));
+EXTERN void Tix_HLDrawHeader _ANSI_ARGS_((
+ WidgetPtr wPtr, Pixmap pixmap, GC gc,
+ int hdrX, int hdrY, int hdrW, int hdrH,
+ int xOffset));
+EXTERN void Tix_HLComputeHeaderGeometry _ANSI_ARGS_((
+ WidgetPtr wPtr));
+
+EXTERN void Tix_HLMarkElementDirty _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement *chPtr));
+EXTERN void Tix_HLResizeWhenIdle _ANSI_ARGS_((WidgetPtr wPtr));
+EXTERN void Tix_HLResizeNow _ANSI_ARGS_((WidgetPtr wPtr));
+EXTERN void Tix_HLComputeGeometry _ANSI_ARGS_((
+ ClientData clientData));
+EXTERN void Tix_HLCancelResizeWhenIdle _ANSI_ARGS_((
+ WidgetPtr wPtr));
+
+
+/* in tixHLCol.c */
+EXTERN TIX_DECLARE_SUBCMD(Tix_HLColumn);
+EXTERN TIX_DECLARE_SUBCMD(Tix_HLItem);
+
+/* in tixHLInd.c */
+EXTERN TIX_DECLARE_SUBCMD(Tix_HLIndicator);
+
+#endif /*_TIX_HLIST_H_ */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.h
new file mode 100644
index 00000000000..deb68ea76e1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.h
@@ -0,0 +1,134 @@
+
+/* $Id: tixImgXpm.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixImgXpm.h --
+ *
+ * Generic header file for the pixmap image type. This is NOT a public
+ * header file!
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_IMG_XPM_H_
+#define _TIX_IMG_XPM_H_
+#define _TIXIMGXPM
+/*
+ * Constants
+ */
+
+#define XPM_MONO 1
+#define XPM_GRAY_4 2
+#define XPM_GRAY 3
+#define XPM_COLOR 4
+#define XPM_SYMBOLIC 5
+#define XPM_UNKNOWN 6
+
+/*
+ * The following data structure represents the master for a pixmap
+ * image:
+ */
+
+typedef struct PixmapMaster {
+ Tk_ImageMaster tkMaster; /* Tk's token for image master. NULL means
+ * the image is being deleted. */
+ Tcl_Interp *interp; /* Interpreter for application that is
+ * using image. */
+ Tcl_Command imageCmd; /* Token for image command (used to delete
+ * it when the image goes away). NULL means
+ * the image command has already been
+ * deleted. */
+ char *fileString; /* Value of -file option (malloc'ed).
+ * valid only if the -file option is specified
+ */
+ char *dataString; /* Value of -data option (malloc'ed).
+ * valid only if the -data option is specified
+ */
+ Tk_Uid id; /* ID's for XPM data already compiled
+ * into the tixwish binary */
+ int size[2]; /* width and height */
+ int ncolors; /* number of colors */
+ int cpp; /* characters per pixel */
+ char ** data; /* The data that defines this pixmap
+ * image (array of strings). It is
+ * converted into an X Pixmap when this
+ * image is instanciated
+ */
+ int isDataAlloced; /* False iff the data is got from
+ * the -id switch */
+ /* First in list of all instances associated
+ * with this master. */
+ struct PixmapInstance *instancePtr;
+} PixmapMaster;
+
+typedef struct ColorStruct {
+ char c; /* This is used if CPP is one */
+ char * cstring; /* This is used if CPP is bigger than one */
+ XColor * colorPtr;
+} ColorStruct;
+
+/*----------------------------------------------------------------------
+ * PixmapInstance --
+ *
+ * Represents all of the instances of an image that lie within a
+ * particular window:
+ *
+ * %% ToDo
+ * Currently one instance is created for each window that uses
+ * this pixmap. This is usually OK because pixmaps are usually
+ * not shared or only shared by a small number of windows. To
+ * improve resource allocation, we can create an instance for
+ * each (Display x Visual x Depth) combo. This will usually
+ * reduce the number of instances to one.
+ *----------------------------------------------------------------------
+ */
+typedef struct PixmapInstance {
+ int refCount; /* Number of instances that share this
+ * data structure. */
+ PixmapMaster *masterPtr; /* Pointer to master for image. */
+ Tk_Window tkwin; /* Window in which the instances will be
+ * displayed. */
+ Pixmap pixmap; /* The pixmap to display. */
+ struct PixmapInstance *nextPtr;
+ /* Next in list of all instance structures
+ * associated with masterPtr (NULL means
+ * end of list).
+ */
+ ColorStruct * colors;
+ ClientData clientData; /* Place holder for platform specific
+ * instance data */
+} PixmapInstance;
+
+
+EXTERN void TixpInitPixmapInstance _ANSI_ARGS_((
+ PixmapMaster *masterPtr,
+ PixmapInstance *instancePtr));
+EXTERN void TixpXpmAllocTmpBuffer _ANSI_ARGS_((
+ PixmapMaster * masterPtr,
+ PixmapInstance * instancePtr,
+ XImage ** imagePtr, XImage ** maskPtr));
+EXTERN void TixpXpmFreeTmpBuffer _ANSI_ARGS_((
+ PixmapMaster * masterPtr,
+ PixmapInstance * instancePtr,
+ XImage * image, XImage * mask));
+EXTERN void TixpXpmSetPixel _ANSI_ARGS_((
+ PixmapInstance * instancePtr, XImage * image,
+ XImage * mask, int x, int y, XColor * colorPtr,
+ int * isTranspPtr));
+EXTERN void TixpXpmRealizePixmap _ANSI_ARGS_((
+ PixmapMaster * masterPtr,
+ PixmapInstance * instancePtr,
+ XImage * image, XImage * mask, int isTransp));
+EXTERN void TixpXpmFreeInstanceData _ANSI_ARGS_((
+ PixmapInstance *instancePtr, int delete,
+ Display *display));
+EXTERN void TixpXpmDisplay _ANSI_ARGS_((ClientData clientData,
+ Display *display, Drawable drawable,
+ int imageX, int imageY, int width, int height,
+ int drawableX, int drawableY));
+
+#endif
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.m
new file mode 100644
index 00000000000..2e6845bef96
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.m
@@ -0,0 +1,34 @@
+#ifndef _TIXIMGXPM_VM
+#define _TIXIMGXPM_VM
+#include "tixImgXpm_f.h"
+#ifndef NO_VTABLES
+#ifndef TixpInitPixmapInstance
+# define TixpInitPixmapInstance (*TiximgxpmVptr->V_TixpInitPixmapInstance)
+#endif
+
+#ifndef TixpXpmAllocTmpBuffer
+# define TixpXpmAllocTmpBuffer (*TiximgxpmVptr->V_TixpXpmAllocTmpBuffer)
+#endif
+
+#ifndef TixpXpmDisplay
+# define TixpXpmDisplay (*TiximgxpmVptr->V_TixpXpmDisplay)
+#endif
+
+#ifndef TixpXpmFreeInstanceData
+# define TixpXpmFreeInstanceData (*TiximgxpmVptr->V_TixpXpmFreeInstanceData)
+#endif
+
+#ifndef TixpXpmFreeTmpBuffer
+# define TixpXpmFreeTmpBuffer (*TiximgxpmVptr->V_TixpXpmFreeTmpBuffer)
+#endif
+
+#ifndef TixpXpmRealizePixmap
+# define TixpXpmRealizePixmap (*TiximgxpmVptr->V_TixpXpmRealizePixmap)
+#endif
+
+#ifndef TixpXpmSetPixel
+# define TixpXpmSetPixel (*TiximgxpmVptr->V_TixpXpmSetPixel)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TIXIMGXPM_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.t
new file mode 100644
index 00000000000..b52ad2cf398
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm.t
@@ -0,0 +1,49 @@
+#ifdef _TIXIMGXPM
+#ifndef TixpInitPixmapInstance
+VFUNC(void,TixpInitPixmapInstance,V_TixpInitPixmapInstance,_ANSI_ARGS_((
+ PixmapMaster *masterPtr,
+ PixmapInstance *instancePtr)))
+#endif /* #ifndef TixpInitPixmapInstance */
+
+#ifndef TixpXpmAllocTmpBuffer
+VFUNC(void,TixpXpmAllocTmpBuffer,V_TixpXpmAllocTmpBuffer,_ANSI_ARGS_((
+ PixmapMaster * masterPtr,
+ PixmapInstance * instancePtr,
+ XImage ** imagePtr, XImage ** maskPtr)))
+#endif /* #ifndef TixpXpmAllocTmpBuffer */
+
+#ifndef TixpXpmDisplay
+VFUNC(void,TixpXpmDisplay,V_TixpXpmDisplay,_ANSI_ARGS_((ClientData clientData,
+ Display *display, Drawable drawable,
+ int imageX, int imageY, int width, int height,
+ int drawableX, int drawableY)))
+#endif /* #ifndef TixpXpmDisplay */
+
+#ifndef TixpXpmFreeInstanceData
+VFUNC(void,TixpXpmFreeInstanceData,V_TixpXpmFreeInstanceData,_ANSI_ARGS_((
+ PixmapInstance *instancePtr, int delete,
+ Display *display)))
+#endif /* #ifndef TixpXpmFreeInstanceData */
+
+#ifndef TixpXpmFreeTmpBuffer
+VFUNC(void,TixpXpmFreeTmpBuffer,V_TixpXpmFreeTmpBuffer,_ANSI_ARGS_((
+ PixmapMaster * masterPtr,
+ PixmapInstance * instancePtr,
+ XImage * image, XImage * mask)))
+#endif /* #ifndef TixpXpmFreeTmpBuffer */
+
+#ifndef TixpXpmRealizePixmap
+VFUNC(void,TixpXpmRealizePixmap,V_TixpXpmRealizePixmap,_ANSI_ARGS_((
+ PixmapMaster * masterPtr,
+ PixmapInstance * instancePtr,
+ XImage * image, XImage * mask, int isTransp)))
+#endif /* #ifndef TixpXpmRealizePixmap */
+
+#ifndef TixpXpmSetPixel
+VFUNC(void,TixpXpmSetPixel,V_TixpXpmSetPixel,_ANSI_ARGS_((
+ PixmapInstance * instancePtr, XImage * image,
+ XImage * mask, int x, int y, XColor * colorPtr,
+ int * isTranspPtr)))
+#endif /* #ifndef TixpXpmSetPixel */
+
+#endif /* _TIXIMGXPM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm_f.h
new file mode 100644
index 00000000000..909c5bd7737
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixImgXpm_f.h
@@ -0,0 +1,14 @@
+#ifndef TIXIMGXPM_VT
+#define TIXIMGXPM_VT
+typedef struct TiximgxpmVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tixImgXpm.t"
+#undef VFUNC
+#undef VVAR
+} TiximgxpmVtab;
+extern TiximgxpmVtab *TiximgxpmVptr;
+extern TiximgxpmVtab *TiximgxpmVGet(void);
+#endif /* TIXIMGXPM_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.h
new file mode 100644
index 00000000000..d1dad2b88e6
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.h
@@ -0,0 +1,886 @@
+
+/* $Id: tixInt.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixInt.h --
+ *
+ * Defines internal data types and functions used by the Tix library.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+#ifndef _TIX
+#include "tix.h"
+#endif
+#ifndef _TIXINT
+#define _TIXINT
+#define _TIX_INT_H_
+
+/*----------------------------------------------------------------------
+ *
+ * Tix Display Item Types
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define TIX_DITEM_NONE 0
+#define TIX_DITEM_TEXT 1
+#define TIX_DITEM_IMAGETEXT 2
+#define TIX_DITEM_WINDOW 3
+#define TIX_DITEM_IMAGE 4
+
+/*
+ * The flags for drawing DItems
+ */
+
+#define TIX_DITEM_NORMAL_BG (0x1 << 0)
+#define TIX_DITEM_ACTIVE_BG (0x1 << 1)
+#define TIX_DITEM_SELECTED_BG (0x1 << 2)
+#define TIX_DITEM_DISABLED_BG (0x1 << 3)
+#define TIX_DITEM_NORMAL_FG (0x1 << 4)
+#define TIX_DITEM_ACTIVE_FG (0x1 << 5)
+#define TIX_DITEM_SELECTED_FG (0x1 << 6)
+#define TIX_DITEM_DISABLED_FG (0x1 << 7)
+#define TIX_DITEM_FONT (0x1 << 8)
+#define TIX_DITEM_PADX (0x1 << 9)
+#define TIX_DITEM_PADY (0x1 << 10)
+
+#define TIX_DONT_CALL_CONFIG TK_CONFIG_USER_BIT
+
+/*
+ * These values are used ONLY for indexing the color array in
+ * Tix_StyleTemplate
+ */
+
+#define TIX_DITEM_NORMAL 0
+#define TIX_DITEM_ACTIVE 1
+#define TIX_DITEM_SELECTED 2
+#define TIX_DITEM_DISABLED 3
+
+/*
+ * Flags for MultiInfo
+ */
+#define TIX_CONFIG_INFO 1
+#define TIX_CONFIG_VALUE 2
+
+typedef union Tix_DItem Tix_DItem;
+typedef union Tix_DItemStyle Tix_DItemStyle;
+typedef struct Tix_DItemInfo Tix_DItemInfo;
+typedef struct Tix_DispData Tix_DispData;
+typedef struct Tix_StyleTemplate Tix_StyleTemplate;
+
+typedef void Tix_DItemCalculateSizeProc _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+typedef char * Tix_DItemComponentProc _ANSI_ARGS_((
+ Tix_DItem * iPtr, int x, int y));
+typedef int Tix_DItemConfigureProc _ANSI_ARGS_((
+ Tix_DItem * iPtr, int argc, Tcl_Obj *CONST *objv,
+ int flags));
+typedef Tix_DItem * Tix_DItemCreateProc _ANSI_ARGS_((
+ Tix_DispData * ddPtr,
+ Tix_DItemInfo * diTypePtr));
+typedef void Tix_DItemDisplayProc _ANSI_ARGS_((
+ Pixmap pixmap, GC gc, Tix_DItem * iPtr,
+ int x, int y, int width, int height, int flag));
+typedef void Tix_DItemFreeProc _ANSI_ARGS_((Tix_DItem * diPtr));
+typedef void Tix_DItemSizeChangedProc _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+
+typedef void Tix_DItemStyleChangedProc _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+typedef void Tix_DItemLostStyleProc _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+typedef int Tix_DItemStyleConfigureProc _ANSI_ARGS_((
+ Tix_DItemStyle* style, int argc, Tcl_Obj *CONST *objv,
+ int flags));
+typedef Tix_DItemStyle* Tix_DItemStyleCreateProc _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tix_DItemInfo * diTypePtr, char * name));
+typedef void Tix_DItemStyleFreeProc _ANSI_ARGS_((
+ Tix_DItemStyle* style));
+typedef void Tix_DItemStyleSetTemplateProc _ANSI_ARGS_((
+ Tix_DItemStyle* style,
+ Tix_StyleTemplate * tmplPtr));
+
+/*
+ * These are debugging routines
+ */
+
+typedef int Tix_DItemRefCountProc _ANSI_ARGS_(());
+typedef int Tix_DItemStyleRefCountProc _ANSI_ARGS_(());
+
+/*----------------------------------------------------------------------
+ * Tix_DItemInfo --
+ *
+ * This structure is used to register a new display item (call
+ * Tix_AddDItemType).
+ *----------------------------------------------------------------------
+ */
+struct Tix_DItemInfo {
+ char * name;
+ int type;
+
+ /*
+ * These procedures communicate with the items
+ */
+ Tix_DItemCreateProc * createProc;
+ Tix_DItemConfigureProc * configureProc;
+ Tix_DItemCalculateSizeProc * calculateSizeProc;
+ Tix_DItemComponentProc * componentProc;
+ Tix_DItemDisplayProc * displayProc;
+ Tix_DItemFreeProc * freeProc;
+ Tix_DItemStyleChangedProc *styleChangedProc;
+ Tix_DItemLostStyleProc * lostStyleProc;
+
+ /*
+ * These procedures communicate with the styles
+ */
+ Tix_DItemStyleCreateProc * styleCreateProc;
+ Tix_DItemStyleConfigureProc * styleConfigureProc;
+ Tix_DItemStyleFreeProc * styleFreeProc;
+ Tix_DItemStyleSetTemplateProc * styleSetTemplateProc;
+
+ Tk_ConfigSpec * itemConfigSpecs;
+ Tk_ConfigSpec * styleConfigSpecs;
+ struct Tix_DItemInfo * next;
+};
+
+/*----------------------------------------------------------------------
+ * Tix_DispData --
+ *
+ * Information needed by the display types to display the item in
+ * an X drawable.
+ *----------------------------------------------------------------------
+ */
+struct Tix_DispData {
+ Display * display;
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ Tix_DItemSizeChangedProc * sizeChangedProc;
+};
+
+/*----------------------------------------------------------------------
+ * Tix_StyleTemplate --
+ *
+ * A StyleTemplate is used to set the values of the default styles
+ * associated with a widget
+ *----------------------------------------------------------------------
+ */
+struct Tix_StyleTemplate {
+ int flags; /* determines which field is valid */
+
+ struct {
+ XColor * bg;
+ XColor * fg;
+ } colors[4]; /* colors for the four basic modes*/
+
+ int pad[2];
+#if 0
+ /* %bordercolor not used */
+ XColor * borderColor;
+ Tix_Relief relief;
+ int borderWidth;
+#endif
+ TixFont font;
+};
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * Display Item Types
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+/*
+ * Display Styles
+ */
+typedef struct TixBaseStyle TixBaseStyle;
+typedef struct TixImageTextStyle TixImageTextStyle;
+typedef struct TixImageStyle TixImageStyle;
+typedef struct TixTextStyle TixTextStyle;
+typedef struct TixWindowStyle TixWindowStyle;
+
+typedef struct TixBaseItem TixBaseItem;
+typedef struct TixColorStyle TixColorStyle;
+typedef struct TixImageTextItem TixImageTextItem;
+typedef struct TixImageItem TixImageItem;
+typedef struct TixTextItem TixTextItem;
+typedef struct TixWindowItem TixWindowItem;
+
+/*----------------------------------------------------------------------
+ * TixBaseItem --
+ *
+ * This is the abstract base class for all display items. All
+ * display items should have the data members defined in the
+ * BaseItem structure
+ *----------------------------------------------------------------------
+ */
+#define ITEM_COMMON_MEMBERS \
+ Tix_DItemInfo * diTypePtr; \
+ Tix_DispData * ddPtr; \
+ ClientData clientData; \
+ int size[2] /* Size of this element */ \
+
+struct TixBaseItem {
+ ITEM_COMMON_MEMBERS;
+ TixBaseStyle * stylePtr;
+};
+
+/*----------------------------------------------------------------------
+ * TixBaseStyle --
+ *
+ * This is the abstract base class for all display styles. All
+ * display items should have the data members defined in the
+ * BaseStyle structure. The common members are initialized by
+ * tixDiStyle.c
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define STYLE_COMMON_MEMBERS \
+ Tcl_Command styleCmd; /* Token for style's command. */ \
+ Tcl_HashTable items; /* Ditems affected by this style */ \
+ int refCount; /* Number of ditems affected by this style */\
+ int flags; /* Various attributes */ \
+ Tcl_Interp *interp; /* Interpreter associated with style. */ \
+ Tk_Window tkwin; /* Window associated with this style */ \
+ Tix_DItemInfo * diTypePtr; \
+ Tk_Anchor anchor; /* Anchor information */ \
+ char * name; /* Name of this style */ \
+ int pad[2] /* paddings */
+
+
+#if 0
+ Tix_Relief relief
+ /* %bordercolor not used */
+ int borderWidth;
+ XColor * borderColor; /* color of the border when it is displayed
+ * in "flat border" mode
+ */
+ GC borderGC
+#endif
+
+#define STYLE_COLOR_MEMBERS \
+ struct { \
+ XColor * bg; \
+ XColor * fg; \
+ GC foreGC; \
+ GC backGC; \
+ } colors[4] /* colors and GC's for the four basic modes*/
+
+struct TixBaseStyle {
+ STYLE_COMMON_MEMBERS;
+};
+
+#define TIX_STYLE_DELETED 1
+#define TIX_STYLE_DEFAULT 2
+
+/*
+ * Abstract type for all styles that have a color element
+ */
+struct TixColorStyle {
+ STYLE_COMMON_MEMBERS;
+ STYLE_COLOR_MEMBERS;
+};
+
+/*----------------------------------------------------------------------
+ * ImageTextItem --
+ *
+ * Display an image together with a text string
+ *----------------------------------------------------------------------
+ */
+struct TixImageTextItem {
+ ITEM_COMMON_MEMBERS;
+
+ TixImageTextStyle *stylePtr;
+ /*-------------------------*/
+ /* Bitmap */
+ /*-------------------------*/
+ Pixmap bitmap;
+ int bitmapW, bitmapH; /* Size of bitmap */
+
+ /*-------------------------*/
+ /* Image */
+ /*-------------------------*/
+ char *imageString; /* Name of image to display (malloc'ed), or
+ * NULL. If non-NULL, bitmap, text, and
+ * textVarName are ignored. */
+ Tk_Image image;
+ int imageW, imageH; /* Size of image */
+
+ /*-------------------------*/
+ /* Text */
+ /*-------------------------*/
+
+ Tcl_Obj * text; /* Show descriptive text */
+ size_t numChars; /* Size of text */
+ int textW, textH;
+ int wrapLength;
+ Tk_Justify justify; /* Justification to use for multi-line text. */
+ int underline; /* Index of character to underline. < 0 means
+ * don't underline anything. */
+
+ int showImage, showText;
+};
+
+struct TixImageTextStyle {
+ STYLE_COMMON_MEMBERS;
+ STYLE_COLOR_MEMBERS;
+ int wrapLength;
+ Tk_Justify justify; /* Justification to use for multi-line text. */
+ TixFont font;
+ int gap; /* Gap between text and image */
+ Tk_Anchor textanchor; /* Text anchor information */
+};
+
+/*----------------------------------------------------------------------
+ * ImageItem --
+ *
+ * Displays an image
+ *----------------------------------------------------------------------
+ */
+struct TixImageItem {
+ ITEM_COMMON_MEMBERS;
+
+ TixImageStyle *stylePtr;
+
+ /*-------------------------*/
+ /* Image */
+ /*-------------------------*/
+ char *imageString; /* Name of image to display (malloc'ed), or
+ * NULL. If non-NULL, bitmap, text, and
+ * textVarName are ignored. */
+ Tk_Image image;
+ int imageW, imageH; /* Size of image */
+};
+
+struct TixImageStyle {
+ STYLE_COMMON_MEMBERS;
+ STYLE_COLOR_MEMBERS;
+};
+/*----------------------------------------------------------------------
+ * TextItem --
+ *
+ * Displays a text string.
+ *----------------------------------------------------------------------
+ */
+struct TixTextItem {
+ ITEM_COMMON_MEMBERS;
+
+ TixTextStyle *stylePtr;
+ /*-------------------------*/
+ /* Text */
+ /*-------------------------*/
+
+ Tcl_Obj * text; /* Show descriptive text */
+ size_t numChars; /* Size of text */
+ int textW, textH;
+ int underline; /* Index of character to underline. < 0 means
+ * don't underline anything. */
+};
+
+struct TixTextStyle {
+ STYLE_COMMON_MEMBERS;
+ STYLE_COLOR_MEMBERS;
+ int wrapLength;
+ Tk_Justify justify; /* Justification to use for multi-line text. */
+ TixFont font;
+};
+
+/*----------------------------------------------------------------------
+ * WindowItem --
+ *
+ * Displays a window.
+ *----------------------------------------------------------------------
+ */
+struct TixWindowItem {
+ ITEM_COMMON_MEMBERS;
+ TixWindowStyle *stylePtr;
+ Tk_Window tkwin;
+ struct TixWindowItem * next;
+ int serial;
+};
+
+struct TixWindowStyle {
+ STYLE_COMMON_MEMBERS;
+};
+
+/*----------------------------------------------------------------------
+ * Tix_DItem and Tix_DItemStyle --
+ *
+ * These unions just make it easy to address the internals of the
+ * structures of the display items and styles. If you create a new
+ * display item, you will need to do you type casting yourself.
+ *----------------------------------------------------------------------
+ */
+union Tix_DItem {
+ TixBaseItem base;
+ TixImageTextItem imagetext;
+ TixTextItem text;
+ TixWindowItem window;
+ TixImageItem image;
+};
+
+union Tix_DItemStyle {
+ TixBaseStyle base;
+ TixColorStyle color;
+ TixImageTextStyle imagetext;
+ TixTextStyle text;
+ TixWindowStyle window;
+ TixImageStyle image;
+};
+
+#define Tix_DItemType(x) ((x)->base.diTypePtr->type)
+#define Tix_DItemTypeName(x) ((x)->base.diTypePtr->name)
+#define Tix_DItemWidth(x) ((x)->base.size[0])
+#define Tix_DItemHeight(x) ((x)->base.size[1])
+#define Tix_DItemConfigSpecs(x) ((x)->base.diTypePtr->itemConfigSpecs)
+#define Tix_DItemPadX(x) ((x)->base.stylePtr->pad[0])
+#define Tix_DItemPadY(x) ((x)->base.stylePtr->pad[1])
+
+#define TIX_WIDTH 0
+#define TIX_HEIGHT 1
+
+/*----------------------------------------------------------------------
+ * Tix_ArgumentList --
+ *
+ * This data structure is used to split command arguments for
+ * the display item types
+ *----------------------------------------------------------------------
+ */
+#define FIXED_SIZE 4
+typedef struct {
+ int argc;
+ Tcl_Obj **objv;
+} Tix_Argument;
+
+typedef struct {
+ Tix_Argument * arg;
+ int numLists;
+ Tix_Argument preAlloc[FIXED_SIZE];
+} Tix_ArgumentList;
+
+/*----------------------------------------------------------------------
+ * Tix_ScrollInfo --
+ *
+ * This data structure encapsulates all the necessary operations
+ * for scrolling widgets
+ *----------------------------------------------------------------------
+ */
+#define TIX_SCROLL_INT 1
+#define TIX_SCROLL_DOUBLE 2
+
+/* abstract type */
+typedef struct Tix_ScrollInfo {
+ int type; /* TIX_SCROLL_INT or TIX_SCROLL_DOUBLE */
+ LangCallback *command;
+ /* place holder for actual space - double must be mentioned
+ to force alignment for too-clever-by-half compilers
+ */
+ union {
+ int iscroll[4];
+ double dscroll[4];
+ } info;
+} Tix_ScrollInfo;
+
+typedef struct Tix_IntScrollInfo {
+ int type; /* TIX_SCROLL_INT */
+ LangCallback *command;
+
+ int total; /* total size (width or height) of the widget*/
+ int window; /* visible size */
+ int offset; /* The top/left side of the scrolled widget */
+ int unit; /* How much should we scroll when the user
+ * press the arrow on a scrollbar? */
+
+} Tix_IntScrollInfo;
+
+typedef struct Tix_DoubleScrollInfo {
+ int type; /* TIX_SCROLL_DOUBLE */
+ LangCallback *command;
+
+ double total; /* total size (width or height) of the widget*/
+ double window; /* visible size */
+ double offset; /* The top/left side of the scrolled widget */
+ double unit; /* How much should we scroll when the user
+ * press the arrow on a scrollbar? */
+} Tix_DoubleScrollInfo;
+
+/*----------------------------------------------------------------------
+ *
+ * Global variables
+ *
+ * Should be used only in the Tix library. Some systems don't support
+ * exporting of global variables from shared libraries.
+ *
+ *----------------------------------------------------------------------
+ */
+EXTERN Tk_Uid tixNormalUid;
+EXTERN Tk_Uid tixDisabledUid;
+EXTERN Tk_Uid tixCellUid;
+EXTERN Tk_Uid tixRowUid;
+EXTERN Tk_Uid tixColumnUid;
+
+#define FLAG_READONLY 0
+#define FLAG_STATIC 1
+#define FLAG_FORCECALL 2
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * MEGA-WIDGET CONFIG HANDLING
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+typedef struct _TixConfigSpec TixConfigSpec;
+typedef struct _TixConfigAlias TixConfigAlias;
+typedef struct _TixClassRecord TixClassRecord;
+
+struct _TixConfigSpec {
+ unsigned int isAlias : 1;
+ unsigned int readOnly : 1;
+ unsigned int isStatic : 1;
+ unsigned int forceCall : 1;
+
+ char * argvName;
+ char * defValue;
+
+ char * dbName; /* The additional parts of a */
+ char * dbClass; /* TixWidgetConfigSpec structure */
+
+ char *verifyCmd;
+
+ TixConfigSpec * realPtr; /* valid only if this option is an alias */
+};
+
+/*
+ * Controls the access of root widget and subwidget commands and options
+ */
+typedef struct _Tix_ExportSpec {
+ Tix_LinkList exportCmds;
+ Tix_LinkList restrictCmds;
+ Tix_LinkList exportOpts;
+ Tix_LinkList restrictOpts;
+} Tix_ExportSpec;
+
+typedef struct _Tix_SubWidgetSpec {
+ struct _Tix_SubWidgetSpec * next;
+ char * name;
+ Tix_ExportSpec export;
+} Tix_SubWidgetSpec;
+
+typedef struct _Tix_StringLink {
+ struct _Tix_StringLink *next;
+ char * string;
+} Tix_StringLink;
+
+typedef struct _Tix_SubwidgetDef {
+ struct _TixSubwidgetDef * next;
+ char * spec;
+ char * value;
+} Tix_SubwidgetDef;
+
+typedef struct _TixClassParseStruct {
+ char * alias;
+ char * ClassName;
+ char * configSpec;
+ char * def;
+ char * flag;
+ char * forceCall;
+ char * method;
+ char * readOnly;
+ char * isStatic;
+ char * superClass;
+ char * subWidget;
+ char * isVirtual;
+
+ int optArgc;
+ char ** optArgv;
+} TixClassParseStruct;
+
+struct _TixClassRecord {
+ TixClassRecord * next; /* Chains to the next class record in
+ * a superClass's unInitSubCls list */
+ TixClassRecord * superClass; /* The superclass of this class. Is
+ * NULL if this class does not have
+ * a superclass. */
+ unsigned int isWidget; /* TRUE iff this class is created by
+ * the "tixWidgetClass" command */
+ char * className; /* Instiantiation command */
+ char * ClassName; /* used in TK option database */
+
+ int nSpecs;
+ TixConfigSpec ** specs;
+ int nMethods;
+ char ** methods;
+ Tk_Window mainWindow; /* This variable is essentially
+ * a cached variable so that
+ * we can advoid calling
+ * Tk_MainWindow() */
+ int isVirtual; /* is this a virtual base class
+ * (shouldn't be instantiated)*/
+ TixClassParseStruct*parsePtr; /* Information supplied by the
+ * tixClass or tixWidgetClass
+ * commands */
+ Tix_LinkList unInitSubCls; /* The subclasses that have not been
+ * initialized. */
+ int initialized; /* Is this class initialized? A class
+ * is not initialized if it has been
+ * defined but some its superclass
+ * is not initialized.
+ */
+ Tix_LinkList subWDefs; /* the -defaults option */
+#if USE_ACCESS_CONTROL
+ Tix_LinkList subWidgets;
+ Tix_ExportSpec exportSpec; /* controls the export status
+ * of the commands and options
+ * of the root widget */
+#endif
+};
+
+typedef struct _TixInterpState {
+ char * result;
+ char * errorInfo;
+ char * errorCode;
+} TixInterpState;
+
+/*----------------------------------------------------------------------
+ *
+ * Internal procedures
+ *
+ *----------------------------------------------------------------------
+ */
+
+EXTERN int Tix_CallConfigMethod _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ char * widRec, TixConfigSpec *spec, char * value));
+EXTERN int Tix_CallMethod _ANSI_ARGS_((Tcl_Interp *interp,
+ char *context, char *widRec, char *method,
+ int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tix_ChangeOneOption _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ char * widRec, TixConfigSpec *spec, char * value,
+ int isDefault, int isInit));
+EXTERN int Tix_ChangeOptions _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ char * widRec, int argc, Tcl_Obj *CONST *objv));
+EXTERN TixConfigSpec * Tix_FindConfigSpecByName _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ TixClassRecord * cPtr, char * name));
+EXTERN char * Tix_FindMethod _ANSI_ARGS_((Tcl_Interp *interp,
+ char *context, char *method));
+EXTERN char * Tix_FindPublicMethod _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord * cPtr,
+ char * method));
+EXTERN int Tix_GetChars _ANSI_ARGS_((Tcl_Interp *interp,
+ char *string, double *doublePtr));
+EXTERN char * Tix_GetConfigSpecFullName _ANSI_ARGS_((char *clasRec,
+ char *flag));
+EXTERN char * Tix_GetContext _ANSI_ARGS_((
+ Tcl_Interp * interp, char * widRec));
+EXTERN char * Tix_GetMethodFullName _ANSI_ARGS_((char *context,
+ char *method));
+EXTERN void Tix_GetPublicMethods _ANSI_ARGS_((Tcl_Interp *interp,
+ char *widRec, int *numMethods,
+ char *** validMethods));
+EXTERN int Tix_GetWidgetOption _ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin,
+ char *argvName, char *dbName, char *dbClass,
+ char *defValue, int argc, Tcl_Obj *CONST *objv,
+ int type, char *ptr));
+EXTERN int Tix_GetVar _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ char * widRec, char * flag));
+EXTERN int Tix_QueryAllOptions _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord * cPtr,
+ char *widRec));
+EXTERN int Tix_QueryOneOption _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ char *widRec, char *flag));
+EXTERN int Tix_SuperClass _ANSI_ARGS_((Tcl_Interp *interp,
+ char *widClass, char ** superClass_ret));
+EXTERN int Tix_UnknownPublicMethodError _ANSI_ARGS_((
+ Tcl_Interp *interp, TixClassRecord * cPtr,
+ char * widRec, char * method));
+EXTERN int Tix_ValueMissingError _ANSI_ARGS_((Tcl_Interp *interp,
+ char *spec));
+EXTERN void Tix_AddDItemType _ANSI_ARGS_((
+ Tix_DItemInfo * diTypePtr));
+EXTERN int Tix_ConfigureInfo2 _ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin,
+ char *entRec, Tk_ConfigSpec *entConfigSpecs,
+ Tix_DItem * iPtr, char *argvName, int flags));
+EXTERN int Tix_ConfigureValue2 _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, char * entRec,
+ Tk_ConfigSpec *entConfigSpecs, Tix_DItem * iPtr,
+ char *argvName, int flags));
+EXTERN void Tix_DItemCalculateSize _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+EXTERN char * Tix_DItemComponent _ANSI_ARGS_((Tix_DItem * diPtr,
+ int x, int y));
+EXTERN int Tix_DItemConfigure _ANSI_ARGS_((
+ Tix_DItem * diPtr, int argc,
+ Tcl_Obj *CONST *objv, int flags));
+EXTERN Tix_DItem * Tix_DItemCreate _ANSI_ARGS_((Tix_DispData * ddPtr,
+ char * type));
+EXTERN void Tix_DItemDrawBackground _ANSI_ARGS_((
+ Pixmap pixmap, GC gc, Tix_DItem * iPtr,
+ int x, int y, int width, int height, int flags));
+EXTERN void Tix_DItemDisplay _ANSI_ARGS_((
+ Pixmap pixmap, GC gc, Tix_DItem * iPtr,
+ int x, int y, int width, int height, int flag));
+EXTERN void Tix_DItemFree _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+EXTERN void TixDItemStyleChanged _ANSI_ARGS_((
+ Tix_DItemInfo * diTypePtr,
+ Tix_DItemStyle * stylePtr));
+EXTERN void TixDItemStyleFree _ANSI_ARGS_((Tix_DItem *iPtr,
+ Tix_DItemStyle * stylePtr));
+EXTERN void TixDItemGetAnchor _ANSI_ARGS_((Tk_Anchor anchor,
+ int x, int y, int cav_w, int cav_h,
+ int width, int height, int * x_ret, int * y_ret));
+EXTERN void Tix_FreeArgumentList _ANSI_ARGS_((
+ Tix_ArgumentList *argListPtr));
+EXTERN void TixGetColorDItemGC _ANSI_ARGS_((
+ Tix_DItem * iPtr, GC * backGC_ret,
+ GC * foreGC_ret, int flags));
+EXTERN Tix_DItemStyle* TixGetDefaultDItemStyle _ANSI_ARGS_((
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr,
+ Tix_DItem *iPtr, Tix_DItemStyle* oldStylePtr));
+EXTERN Tix_DItemInfo * Tix_GetDItemType _ANSI_ARGS_((
+ Tcl_Interp * interp, char *type));
+EXTERN void Tix_GetScrollFractions _ANSI_ARGS_((
+ Tix_ScrollInfo * siPtr,
+ double * first_ret, double * last_ret));
+EXTERN void Tix_InitScrollInfo _ANSI_ARGS_((
+ Tix_ScrollInfo * siPtr, int type));
+EXTERN int Tix_MultiConfigureInfo _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec **specsList,
+ int numLists, char **widgRecList, char *argvName,
+ int flags, int request));
+EXTERN void Tix_SetDefaultStyleTemplate _ANSI_ARGS_((
+ Tk_Window tkwin, Tix_StyleTemplate * tmplPtr));
+EXTERN int Tix_SetScrollBarView _ANSI_ARGS_((
+ Tcl_Interp *interp, Tix_ScrollInfo * siPtr,
+ int argc, Tcl_Obj *CONST *objv, int compat));
+EXTERN void Tix_SetWindowItemSerial _ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_DItem * iPtr,
+ int serial));
+EXTERN int Tix_SplitConfig _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec ** specsList,
+ int numLists, int argc, Tcl_Obj *CONST *objv,
+ Tix_ArgumentList * argListPtr));
+EXTERN void Tix_UnmapInvisibleWindowItems _ANSI_ARGS_((
+ Tix_LinkList * lPtr, int serial));
+EXTERN void Tix_UpdateScrollBar _ANSI_ARGS_((
+ Tcl_Interp *interp, Tix_ScrollInfo * siPtr));
+EXTERN int Tix_WidgetConfigure2 _ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin, char * entRec,
+ Tk_ConfigSpec *entConfigSpecs,
+ Tix_DItem * iPtr, int argc, Tcl_Obj *CONST *objv,
+ int flags, int forced, int * sizeChanged_ret));
+EXTERN void Tix_WindowItemListRemove _ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_DItem * iPtr));
+
+typedef struct _TixpSubRegion TixpSubRegion;
+
+struct _TixpSubRegion {
+ Pixmap pixmap;
+ int origX, origY;
+ int x, y;
+ int width, height;
+};
+
+/*
+ * Functions that should be used by Tix only. Functions prefixed by "Tix"
+ * are generic functions that has one implementation for all platforms.
+ * Functions prefixed with "Tixp" requires one implementation on each
+ * platform.
+ */
+
+extern int TixInitSam _ANSI_ARGS_((Tcl_Interp * interp));
+extern int TixLoadLibrary _ANSI_ARGS_((Tcl_Interp * interp));
+extern void TixRestoreInterpState _ANSI_ARGS_((
+ Tcl_Interp * interp, TixInterpState * statePtr));
+extern void TixSaveInterpState _ANSI_ARGS_((Tcl_Interp * interp,
+ TixInterpState * statePtr));
+
+extern void TixpDrawAnchorLines _ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc, int x, int y,
+ int w, int h));
+extern void TixpDrawTmpLine _ANSI_ARGS_((int x1, int y1,
+ int x2, int y2, Tk_Window tkwin));
+extern void TixpEndSubRegionDraw _ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr));
+extern int TixpSetWindowParent _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Window newParent,
+ int parentId));
+extern void TixpStartSubRegionDraw _ANSI_ARGS_((Tix_DispData *ddPtr,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr, int origX,
+ int origY, int x, int y, int width, int height,
+ int needWidth, int needHeight));
+extern void TixpSubRegDisplayText _ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr,
+ TixFont font, char *string,
+ int numChars, int x, int y, int length,
+ Tk_Justify justify, int underline));
+extern void TixpSubRegDrawBitmap _ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr, Pixmap bitmap,
+ int src_x, int src_y, int width, int height,
+ int dest_x, int dest_y, unsigned long plane));
+extern void TixpSubRegDrawImage _ANSI_ARGS_((
+ TixpSubRegion * subRegPtr, Tk_Image image,
+ int imageX, int imageY, int width, int height,
+ Drawable drawable, int drawableX, int drawableY));
+extern void TixpSubRegFillRectangle _ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr, int x, int y,
+ int width, int height));
+
+/* These functions are also, and originaly declared in tixPort.h but
+ * that would mean even more Vtables
+ */
+
+EXTERN void TixComputeTextGeometry _ANSI_ARGS_((
+ TixFont fontStructPtr, char *string,
+ int numChars, int wrapLength, int *widthPtr,
+ int *heightPtr));
+EXTERN void TixDisplayText _ANSI_ARGS_((Display *display,
+ Drawable drawable, TixFont font,
+ char *string, int numChars, int x, int y,
+ int length, Tk_Justify justify, int underline,
+ GC gc));
+EXTERN Tcl_HashTable * TixGetHashTable _ANSI_ARGS_((Tcl_Interp * interp,
+ char * name, Tcl_InterpDeleteProc *deleteProc));
+
+/*
+ * built-in strdup is not compatible with the tcl memory allocator. We
+ * replace all strdup calls with tixStrDup.
+ */
+#define NO_STRDUP 1
+extern char *tixStrDup _ANSI_ARGS_(( CONST char * s));
+
+/*
+ * Console Stuff
+ * (these are declared with the EXTERN in win/winMain.c but without it
+ * in generic/tkConsole.c)
+ */
+EXTERN void TkConsoleCreate _ANSI_ARGS_((void));
+EXTERN int TkConsoleInit _ANSI_ARGS_((Tcl_Interp *interp));
+
+#define TixConsoleCreate(x) TkConsoleCreate()
+#define TixConsoleInit(x) TkConsoleInit(x)
+
+#endif /* _TIXINT */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.m
new file mode 100644
index 00000000000..3c953cbf032
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.m
@@ -0,0 +1,171 @@
+#ifndef _TIXINT_VM
+#define _TIXINT_VM
+#include "tixInt_f.h"
+#ifndef NO_VTABLES
+#define tixCellUid (*TixintVptr->V_tixCellUid)
+#define tixColumnUid (*TixintVptr->V_tixColumnUid)
+#define tixDisabledUid (*TixintVptr->V_tixDisabledUid)
+#define tixNormalUid (*TixintVptr->V_tixNormalUid)
+#define tixRowUid (*TixintVptr->V_tixRowUid)
+#ifndef TixComputeTextGeometry
+# define TixComputeTextGeometry (*TixintVptr->V_TixComputeTextGeometry)
+#endif
+
+#ifndef TixDItemGetAnchor
+# define TixDItemGetAnchor (*TixintVptr->V_TixDItemGetAnchor)
+#endif
+
+#ifndef TixDItemStyleChanged
+# define TixDItemStyleChanged (*TixintVptr->V_TixDItemStyleChanged)
+#endif
+
+#ifndef TixDItemStyleFree
+# define TixDItemStyleFree (*TixintVptr->V_TixDItemStyleFree)
+#endif
+
+#ifndef TixDisplayText
+# define TixDisplayText (*TixintVptr->V_TixDisplayText)
+#endif
+
+#ifndef TixGetColorDItemGC
+# define TixGetColorDItemGC (*TixintVptr->V_TixGetColorDItemGC)
+#endif
+
+#ifndef TixGetDefaultDItemStyle
+# define TixGetDefaultDItemStyle (*TixintVptr->V_TixGetDefaultDItemStyle)
+#endif
+
+#ifndef TixGetHashTable
+# define TixGetHashTable (*TixintVptr->V_TixGetHashTable)
+#endif
+
+#ifndef Tix_AddDItemType
+# define Tix_AddDItemType (*TixintVptr->V_Tix_AddDItemType)
+#endif
+
+#ifndef Tix_ConfigureInfo2
+# define Tix_ConfigureInfo2 (*TixintVptr->V_Tix_ConfigureInfo2)
+#endif
+
+#ifndef Tix_ConfigureValue2
+# define Tix_ConfigureValue2 (*TixintVptr->V_Tix_ConfigureValue2)
+#endif
+
+#ifndef Tix_DItemCalculateSize
+# define Tix_DItemCalculateSize (*TixintVptr->V_Tix_DItemCalculateSize)
+#endif
+
+#ifndef Tix_DItemComponent
+# define Tix_DItemComponent (*TixintVptr->V_Tix_DItemComponent)
+#endif
+
+#ifndef Tix_DItemConfigure
+# define Tix_DItemConfigure (*TixintVptr->V_Tix_DItemConfigure)
+#endif
+
+#ifndef Tix_DItemCreate
+# define Tix_DItemCreate (*TixintVptr->V_Tix_DItemCreate)
+#endif
+
+#ifndef Tix_DItemDisplay
+# define Tix_DItemDisplay (*TixintVptr->V_Tix_DItemDisplay)
+#endif
+
+#ifndef Tix_DItemDrawBackground
+# define Tix_DItemDrawBackground (*TixintVptr->V_Tix_DItemDrawBackground)
+#endif
+
+#ifndef Tix_DItemFree
+# define Tix_DItemFree (*TixintVptr->V_Tix_DItemFree)
+#endif
+
+#ifndef Tix_FreeArgumentList
+# define Tix_FreeArgumentList (*TixintVptr->V_Tix_FreeArgumentList)
+#endif
+
+#ifndef Tix_GetDItemType
+# define Tix_GetDItemType (*TixintVptr->V_Tix_GetDItemType)
+#endif
+
+#ifndef Tix_GetScrollFractions
+# define Tix_GetScrollFractions (*TixintVptr->V_Tix_GetScrollFractions)
+#endif
+
+#ifndef Tix_InitScrollInfo
+# define Tix_InitScrollInfo (*TixintVptr->V_Tix_InitScrollInfo)
+#endif
+
+#ifndef Tix_MultiConfigureInfo
+# define Tix_MultiConfigureInfo (*TixintVptr->V_Tix_MultiConfigureInfo)
+#endif
+
+#ifndef Tix_SetDefaultStyleTemplate
+# define Tix_SetDefaultStyleTemplate (*TixintVptr->V_Tix_SetDefaultStyleTemplate)
+#endif
+
+#ifndef Tix_SetScrollBarView
+# define Tix_SetScrollBarView (*TixintVptr->V_Tix_SetScrollBarView)
+#endif
+
+#ifndef Tix_SetWindowItemSerial
+# define Tix_SetWindowItemSerial (*TixintVptr->V_Tix_SetWindowItemSerial)
+#endif
+
+#ifndef Tix_SplitConfig
+# define Tix_SplitConfig (*TixintVptr->V_Tix_SplitConfig)
+#endif
+
+#ifndef Tix_UnmapInvisibleWindowItems
+# define Tix_UnmapInvisibleWindowItems (*TixintVptr->V_Tix_UnmapInvisibleWindowItems)
+#endif
+
+#ifndef Tix_UpdateScrollBar
+# define Tix_UpdateScrollBar (*TixintVptr->V_Tix_UpdateScrollBar)
+#endif
+
+#ifndef Tix_WidgetConfigure2
+# define Tix_WidgetConfigure2 (*TixintVptr->V_Tix_WidgetConfigure2)
+#endif
+
+#ifndef Tix_WindowItemListRemove
+# define Tix_WindowItemListRemove (*TixintVptr->V_Tix_WindowItemListRemove)
+#endif
+
+#ifndef TixpDrawAnchorLines
+# define TixpDrawAnchorLines (*TixintVptr->V_TixpDrawAnchorLines)
+#endif
+
+#ifndef TixpDrawTmpLine
+# define TixpDrawTmpLine (*TixintVptr->V_TixpDrawTmpLine)
+#endif
+
+#ifndef TixpEndSubRegionDraw
+# define TixpEndSubRegionDraw (*TixintVptr->V_TixpEndSubRegionDraw)
+#endif
+
+#ifndef TixpStartSubRegionDraw
+# define TixpStartSubRegionDraw (*TixintVptr->V_TixpStartSubRegionDraw)
+#endif
+
+#ifndef TixpSubRegDisplayText
+# define TixpSubRegDisplayText (*TixintVptr->V_TixpSubRegDisplayText)
+#endif
+
+#ifndef TixpSubRegDrawBitmap
+# define TixpSubRegDrawBitmap (*TixintVptr->V_TixpSubRegDrawBitmap)
+#endif
+
+#ifndef TixpSubRegDrawImage
+# define TixpSubRegDrawImage (*TixintVptr->V_TixpSubRegDrawImage)
+#endif
+
+#ifndef TixpSubRegFillRectangle
+# define TixpSubRegFillRectangle (*TixintVptr->V_TixpSubRegFillRectangle)
+#endif
+
+#ifndef tixStrDup
+# define tixStrDup (*TixintVptr->V_tixStrDup)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TIXINT_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.t
new file mode 100644
index 00000000000..07e593d2337
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt.t
@@ -0,0 +1,249 @@
+#ifdef _TIXINT
+VVAR(Tk_Uid,tixCellUid,V_tixCellUid)
+VVAR(Tk_Uid,tixColumnUid,V_tixColumnUid)
+VVAR(Tk_Uid,tixDisabledUid,V_tixDisabledUid)
+VVAR(Tk_Uid,tixNormalUid,V_tixNormalUid)
+VVAR(Tk_Uid,tixRowUid,V_tixRowUid)
+#ifndef TixComputeTextGeometry
+VFUNC(void,TixComputeTextGeometry,V_TixComputeTextGeometry,_ANSI_ARGS_((
+ TixFont fontStructPtr, char *string,
+ int numChars, int wrapLength, int *widthPtr,
+ int *heightPtr)))
+#endif /* #ifndef TixComputeTextGeometry */
+
+#ifndef TixDItemGetAnchor
+VFUNC(void,TixDItemGetAnchor,V_TixDItemGetAnchor,_ANSI_ARGS_((Tk_Anchor anchor,
+ int x, int y, int cav_w, int cav_h,
+ int width, int height, int * x_ret, int * y_ret)))
+#endif /* #ifndef TixDItemGetAnchor */
+
+#ifndef TixDItemStyleChanged
+VFUNC(void,TixDItemStyleChanged,V_TixDItemStyleChanged,_ANSI_ARGS_((
+ Tix_DItemInfo * diTypePtr,
+ Tix_DItemStyle * stylePtr)))
+#endif /* #ifndef TixDItemStyleChanged */
+
+#ifndef TixDItemStyleFree
+VFUNC(void,TixDItemStyleFree,V_TixDItemStyleFree,_ANSI_ARGS_((Tix_DItem *iPtr,
+ Tix_DItemStyle * stylePtr)))
+#endif /* #ifndef TixDItemStyleFree */
+
+#ifndef TixDisplayText
+VFUNC(void,TixDisplayText,V_TixDisplayText,_ANSI_ARGS_((Display *display,
+ Drawable drawable, TixFont font,
+ char *string, int numChars, int x, int y,
+ int length, Tk_Justify justify, int underline,
+ GC gc)))
+#endif /* #ifndef TixDisplayText */
+
+#ifndef TixGetColorDItemGC
+VFUNC(void,TixGetColorDItemGC,V_TixGetColorDItemGC,_ANSI_ARGS_((
+ Tix_DItem * iPtr, GC * backGC_ret,
+ GC * foreGC_ret, int flags)))
+#endif /* #ifndef TixGetColorDItemGC */
+
+#ifndef TixGetDefaultDItemStyle
+VFUNC(Tix_DItemStyle*,TixGetDefaultDItemStyle,V_TixGetDefaultDItemStyle,_ANSI_ARGS_((
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr,
+ Tix_DItem *iPtr, Tix_DItemStyle* oldStylePtr)))
+#endif /* #ifndef TixGetDefaultDItemStyle */
+
+#ifndef TixGetHashTable
+VFUNC(Tcl_HashTable *,TixGetHashTable,V_TixGetHashTable,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * name, Tcl_InterpDeleteProc *deleteProc)))
+#endif /* #ifndef TixGetHashTable */
+
+#ifndef Tix_AddDItemType
+VFUNC(void,Tix_AddDItemType,V_Tix_AddDItemType,_ANSI_ARGS_((
+ Tix_DItemInfo * diTypePtr)))
+#endif /* #ifndef Tix_AddDItemType */
+
+#ifndef Tix_ConfigureInfo2
+VFUNC(int,Tix_ConfigureInfo2,V_Tix_ConfigureInfo2,_ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin,
+ char *entRec, Tk_ConfigSpec *entConfigSpecs,
+ Tix_DItem * iPtr, char *argvName, int flags)))
+#endif /* #ifndef Tix_ConfigureInfo2 */
+
+#ifndef Tix_ConfigureValue2
+VFUNC(int,Tix_ConfigureValue2,V_Tix_ConfigureValue2,_ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, char * entRec,
+ Tk_ConfigSpec *entConfigSpecs, Tix_DItem * iPtr,
+ char *argvName, int flags)))
+#endif /* #ifndef Tix_ConfigureValue2 */
+
+#ifndef Tix_DItemCalculateSize
+VFUNC(void,Tix_DItemCalculateSize,V_Tix_DItemCalculateSize,_ANSI_ARGS_((
+ Tix_DItem * iPtr)))
+#endif /* #ifndef Tix_DItemCalculateSize */
+
+#ifndef Tix_DItemComponent
+VFUNC(char *,Tix_DItemComponent,V_Tix_DItemComponent,_ANSI_ARGS_((Tix_DItem * diPtr,
+ int x, int y)))
+#endif /* #ifndef Tix_DItemComponent */
+
+#ifndef Tix_DItemConfigure
+VFUNC(int,Tix_DItemConfigure,V_Tix_DItemConfigure,_ANSI_ARGS_((
+ Tix_DItem * diPtr, int argc,
+ Tcl_Obj *CONST *objv, int flags)))
+#endif /* #ifndef Tix_DItemConfigure */
+
+#ifndef Tix_DItemCreate
+VFUNC(Tix_DItem *,Tix_DItemCreate,V_Tix_DItemCreate,_ANSI_ARGS_((Tix_DispData * ddPtr,
+ char * type)))
+#endif /* #ifndef Tix_DItemCreate */
+
+#ifndef Tix_DItemDisplay
+VFUNC(void,Tix_DItemDisplay,V_Tix_DItemDisplay,_ANSI_ARGS_((
+ Pixmap pixmap, GC gc, Tix_DItem * iPtr,
+ int x, int y, int width, int height, int flag)))
+#endif /* #ifndef Tix_DItemDisplay */
+
+#ifndef Tix_DItemDrawBackground
+VFUNC(void,Tix_DItemDrawBackground,V_Tix_DItemDrawBackground,_ANSI_ARGS_((
+ Pixmap pixmap, GC gc, Tix_DItem * iPtr,
+ int x, int y, int width, int height, int flags)))
+#endif /* #ifndef Tix_DItemDrawBackground */
+
+#ifndef Tix_DItemFree
+VFUNC(void,Tix_DItemFree,V_Tix_DItemFree,_ANSI_ARGS_((
+ Tix_DItem * iPtr)))
+#endif /* #ifndef Tix_DItemFree */
+
+#ifndef Tix_FreeArgumentList
+VFUNC(void,Tix_FreeArgumentList,V_Tix_FreeArgumentList,_ANSI_ARGS_((
+ Tix_ArgumentList *argListPtr)))
+#endif /* #ifndef Tix_FreeArgumentList */
+
+#ifndef Tix_GetDItemType
+VFUNC(Tix_DItemInfo *,Tix_GetDItemType,V_Tix_GetDItemType,_ANSI_ARGS_((
+ Tcl_Interp * interp, char *type)))
+#endif /* #ifndef Tix_GetDItemType */
+
+#ifndef Tix_GetScrollFractions
+VFUNC(void,Tix_GetScrollFractions,V_Tix_GetScrollFractions,_ANSI_ARGS_((
+ Tix_ScrollInfo * siPtr,
+ double * first_ret, double * last_ret)))
+#endif /* #ifndef Tix_GetScrollFractions */
+
+#ifndef Tix_InitScrollInfo
+VFUNC(void,Tix_InitScrollInfo,V_Tix_InitScrollInfo,_ANSI_ARGS_((
+ Tix_ScrollInfo * siPtr, int type)))
+#endif /* #ifndef Tix_InitScrollInfo */
+
+#ifndef Tix_MultiConfigureInfo
+VFUNC(int,Tix_MultiConfigureInfo,V_Tix_MultiConfigureInfo,_ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec **specsList,
+ int numLists, char **widgRecList, char *argvName,
+ int flags, int request)))
+#endif /* #ifndef Tix_MultiConfigureInfo */
+
+#ifndef Tix_SetDefaultStyleTemplate
+VFUNC(void,Tix_SetDefaultStyleTemplate,V_Tix_SetDefaultStyleTemplate,_ANSI_ARGS_((
+ Tk_Window tkwin, Tix_StyleTemplate * tmplPtr)))
+#endif /* #ifndef Tix_SetDefaultStyleTemplate */
+
+#ifndef Tix_SetScrollBarView
+VFUNC(int,Tix_SetScrollBarView,V_Tix_SetScrollBarView,_ANSI_ARGS_((
+ Tcl_Interp *interp, Tix_ScrollInfo * siPtr,
+ int argc, Tcl_Obj *CONST *objv, int compat)))
+#endif /* #ifndef Tix_SetScrollBarView */
+
+#ifndef Tix_SetWindowItemSerial
+VFUNC(void,Tix_SetWindowItemSerial,V_Tix_SetWindowItemSerial,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_DItem * iPtr,
+ int serial)))
+#endif /* #ifndef Tix_SetWindowItemSerial */
+
+#ifndef Tix_SplitConfig
+VFUNC(int,Tix_SplitConfig,V_Tix_SplitConfig,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec ** specsList,
+ int numLists, int argc, Tcl_Obj *CONST *objv,
+ Tix_ArgumentList * argListPtr)))
+#endif /* #ifndef Tix_SplitConfig */
+
+#ifndef Tix_UnmapInvisibleWindowItems
+VFUNC(void,Tix_UnmapInvisibleWindowItems,V_Tix_UnmapInvisibleWindowItems,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, int serial)))
+#endif /* #ifndef Tix_UnmapInvisibleWindowItems */
+
+#ifndef Tix_UpdateScrollBar
+VFUNC(void,Tix_UpdateScrollBar,V_Tix_UpdateScrollBar,_ANSI_ARGS_((
+ Tcl_Interp *interp, Tix_ScrollInfo * siPtr)))
+#endif /* #ifndef Tix_UpdateScrollBar */
+
+#ifndef Tix_WidgetConfigure2
+VFUNC(int,Tix_WidgetConfigure2,V_Tix_WidgetConfigure2,_ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin, char * entRec,
+ Tk_ConfigSpec *entConfigSpecs,
+ Tix_DItem * iPtr, int argc, Tcl_Obj *CONST *objv,
+ int flags, int forced, int * sizeChanged_ret)))
+#endif /* #ifndef Tix_WidgetConfigure2 */
+
+#ifndef Tix_WindowItemListRemove
+VFUNC(void,Tix_WindowItemListRemove,V_Tix_WindowItemListRemove,_ANSI_ARGS_((
+ Tix_LinkList * lPtr, Tix_DItem * iPtr)))
+#endif /* #ifndef Tix_WindowItemListRemove */
+
+#ifndef TixpDrawAnchorLines
+VFUNC(void,TixpDrawAnchorLines,V_TixpDrawAnchorLines,_ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc, int x, int y,
+ int w, int h)))
+#endif /* #ifndef TixpDrawAnchorLines */
+
+#ifndef TixpDrawTmpLine
+VFUNC(void,TixpDrawTmpLine,V_TixpDrawTmpLine,_ANSI_ARGS_((int x1, int y1,
+ int x2, int y2, Tk_Window tkwin)))
+#endif /* #ifndef TixpDrawTmpLine */
+
+#ifndef TixpEndSubRegionDraw
+VFUNC(void,TixpEndSubRegionDraw,V_TixpEndSubRegionDraw,_ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr)))
+#endif /* #ifndef TixpEndSubRegionDraw */
+
+#ifndef TixpStartSubRegionDraw
+VFUNC(void,TixpStartSubRegionDraw,V_TixpStartSubRegionDraw,_ANSI_ARGS_((Tix_DispData *ddPtr,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr, int origX,
+ int origY, int x, int y, int width, int height,
+ int needWidth, int needHeight)))
+#endif /* #ifndef TixpStartSubRegionDraw */
+
+#ifndef TixpSubRegDisplayText
+VFUNC(void,TixpSubRegDisplayText,V_TixpSubRegDisplayText,_ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr,
+ TixFont font, char *string,
+ int numChars, int x, int y, int length,
+ Tk_Justify justify, int underline)))
+#endif /* #ifndef TixpSubRegDisplayText */
+
+#ifndef TixpSubRegDrawBitmap
+VFUNC(void,TixpSubRegDrawBitmap,V_TixpSubRegDrawBitmap,_ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr, Pixmap bitmap,
+ int src_x, int src_y, int width, int height,
+ int dest_x, int dest_y, unsigned long plane)))
+#endif /* #ifndef TixpSubRegDrawBitmap */
+
+#ifndef TixpSubRegDrawImage
+VFUNC(void,TixpSubRegDrawImage,V_TixpSubRegDrawImage,_ANSI_ARGS_((
+ TixpSubRegion * subRegPtr, Tk_Image image,
+ int imageX, int imageY, int width, int height,
+ Drawable drawable, int drawableX, int drawableY)))
+#endif /* #ifndef TixpSubRegDrawImage */
+
+#ifndef TixpSubRegFillRectangle
+VFUNC(void,TixpSubRegFillRectangle,V_TixpSubRegFillRectangle,_ANSI_ARGS_((Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr, int x, int y,
+ int width, int height)))
+#endif /* #ifndef TixpSubRegFillRectangle */
+
+#ifndef tixStrDup
+VFUNC(char *,tixStrDup,V_tixStrDup,_ANSI_ARGS_(( CONST char * s)))
+#endif /* #ifndef tixStrDup */
+
+#endif /* _TIXINT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt_f.h
new file mode 100644
index 00000000000..f085e2778fc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixInt_f.h
@@ -0,0 +1,14 @@
+#ifndef TIXINT_VT
+#define TIXINT_VT
+typedef struct TixintVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tixInt.t"
+#undef VFUNC
+#undef VVAR
+} TixintVtab;
+extern TixintVtab *TixintVptr;
+extern TixintVtab *TixintVGet(void);
+#endif /* TIXINT_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixPort.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixPort.h
new file mode 100644
index 00000000000..56bffaf4869
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixPort.h
@@ -0,0 +1,110 @@
+
+/* $Id: tixPort.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixPort.h --
+ *
+ * This header file handles porting issues that occur because of
+ * differences between systems. It reads in platform specific
+ * portability files.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+#ifndef _TIX_PORT_H_
+#define _TIX_PORT_H_
+
+#ifndef _TKPORT
+#include "tkPort.h"
+#endif
+
+#ifndef _LANG
+#include "Lang.h"
+#endif
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+#if (!defined(__WIN32__)) && (!defined(_WIN32)) && (!defined(MAC_TCL)) && (!defined(__PM__))
+ /*
+ * The Tcl/Tk porting stuff is needed only in Unix.
+ */
+#if !defined(_TCLPORT) && !defined(_TKPORT)
+# if defined(_TKINT) || defined(_LANG)
+# include "tkPort.h"
+# else
+# include "tclPort.h"
+# endif
+#endif
+#endif
+
+
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__PM__)
+# include "tixWinPort.h"
+#else
+# if defined(MAC_TCL)
+# include "tixMacPort.h"
+# else
+# include "tixUnixPort.h"
+# endif
+#endif
+
+
+EXTERN Tcl_HashTable * TixGetHashTable _ANSI_ARGS_((Tcl_Interp * interp,
+ char * name, Tcl_InterpDeleteProc *deleteProc));
+#define _TixGetHashTable(i,n,p) TixGetHashTable(i,n,p)
+
+#if (TK_MAJOR_VERSION > 4)
+
+/*
+ * The font handling is changed in Tk 8.0 and later
+ */
+
+typedef Tk_Font TixFont;
+#define TixFontId(font) Tk_FontId(font)
+
+EXTERN void TixComputeTextGeometry _ANSI_ARGS_((
+ TixFont fontStructPtr, char *string,
+ int numChars, int wrapLength, int *widthPtr,
+ int *heightPtr));
+EXTERN void TixDisplayText _ANSI_ARGS_((Display *display,
+ Drawable drawable, TixFont font,
+ char *string, int numChars, int x, int y,
+ int length, Tk_Justify justify, int underline,
+ GC gc));
+
+#define TixFreeFont Tk_FreeFont
+#define TixNameOfFont Tk_NameOfFont
+#define TixGetFont Tk_GetFont
+
+#else
+
+typedef XFontStruct* TixFont;
+#define TixFontId(font) ((font)->fid)
+#define TixComputeTextGeometry TkComputeTextGeometry
+#define TixDisplayText TkDisplayText
+#define TixFreeFont Tk_FreeFontStruct
+#define TixNameOfFont Tk_NameOfFontStruct
+#define TixGetFont Tk_GetFontStruct
+
+#ifndef TkDisplayText
+EXTERN void TkDisplayText _ANSI_ARGS_((Display *display,
+ Drawable drawable, XFontStruct *fontStructPtr,
+ char *string, int numChars, int x, int y,
+ int length, Tk_Justify justify, int underline,
+ GC gc));
+#endif
+#ifndef TkComputeTextGeometry
+EXTERN void TkComputeTextGeometry _ANSI_ARGS_((
+ XFontStruct *fontStructPtr, char *string,
+ int numChars, int wrapLength, int *widthPtr,
+ int *heightPtr));
+#endif
+
+#endif
+
+#endif /* _TIX_PORT_H_ */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixTList.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixTList.h
new file mode 100644
index 00000000000..52584a022b8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixTList.h
@@ -0,0 +1,148 @@
+
+/* $Id: tixTList.h,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixTList.h --
+ *
+ * This header file defines the data structures used by the tixTList
+ * widget.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_TLIST_H_
+#define _TIX_TLIST_H_
+
+#ifndef _TIX_INT_H_
+#include "tixInt.h"
+#endif
+
+#include "tkVMacro.h"
+
+#define TIX_X 0
+#define TIX_Y 1
+
+typedef struct ListEntry {
+ struct ListEntry * next;
+ Tix_DItem * iPtr;
+ Tk_Uid state;
+ Tcl_Obj * data; /* user data field */
+ int size[2];
+ unsigned int selected : 1;
+} ListEntry;
+
+typedef struct ListRow {
+ ListEntry * chPtr;
+ int size[2];
+ int numEnt;
+} ListRow;
+
+/*
+ * A data structure of the following type is kept for each
+ * widget managed by this file:
+ */
+typedef struct ListStruct {
+ Tix_DispData dispData;
+
+ Tcl_Command widgetCmd; /* Token for button's widget command. */
+
+ /*
+ * Information used when displaying widget:
+ */
+ int width, height; /* For app programmer to request size */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ /* Border and general drawing */
+ int borderWidth; /* Width of 3-D borders. */
+ int selBorderWidth; /* Width of 3-D borders for selected items */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ Tk_3DBorder border; /* Used for drawing the 3d border. */
+ Tk_3DBorder selectBorder; /* Used for selected background. */
+ XColor *normalFg; /* Normal foreground for text. */
+ XColor *normalBg; /* Normal background for text. */
+ XColor *selectFg; /* Color for drawing selected text. */
+
+ /* GC and stuff */
+ GC backgroundGC; /* GC for drawing background. */
+ GC selectGC; /* GC for drawing selected background. */
+ GC anchorGC; /* GC for drawing dotted anchor highlight. */
+ TixFont font; /* Default font used by the DItems. */
+
+ /* Text drawing */
+ Cursor cursor; /* Current cursor for window, or None. */
+
+ /* For highlights */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ GC highlightGC; /* For drawing traversal highlight. */
+
+ /* default pad and gap values */
+ int padX, padY;
+
+ Tk_Uid selectMode; /* Selection style: single, browse, multiple,
+ * or extended. This value isn't used in C
+ * code, but the Tcl bindings use it. */
+ Tk_Uid state; /* State can only be normal or disabled. */
+ Tix_LinkList entList;
+
+ int numRowAllocd;
+ int numRow;
+ ListRow * rows;
+
+ ListEntry * seeElemPtr; /* The current item to "see" */
+ ListEntry * anchor; /* The current anchor item */
+ ListEntry * active; /* The current active item */
+ ListEntry * dropSite; /* The current drop site */
+ ListEntry * dragSite; /* The current drop site */
+
+ /*
+ * Commands
+ */
+ LangCallback *command; /* The command when user double-clicks */
+ LangCallback *browseCmd; /* The command to call when the selection
+ * changes. */
+ LangCallback *sizeCmd; /* The command to call when the size of
+ * the listbox changes. E.g., when the user
+ * add/deletes elements. Useful for
+ * auto-scrollbar geometry managers */
+
+ /* These options control how the items are arranged on the list */
+ Tk_Uid orientUid; /* Can be "vertical" or "horizontal" */
+ int packMode[2]; /* is row and column packed */
+ int numMajor[2]; /* num of rows and columns */
+ int itemSize[2]; /* horizontal and vertical size of items, -1
+ * means natural size */
+
+ /* Info for laying out */
+ int maxSize[2]; /* max size of all elements in X and Y, (they
+ * do not need to be the same element, may be
+ * invalid according to mode */
+ char *takeFocus; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+
+ int serial; /* this number is incremented before each time
+ * the widget is redisplayed */
+
+ Tix_DItemInfo * diTypePtr; /* Default item type */
+ Tix_IntScrollInfo scrollInfo[2];
+ unsigned int redrawing : 1;
+ unsigned int resizing : 1;
+ unsigned int hasFocus : 1;
+ unsigned int isVertical : 1;
+} TixTListWidget;
+
+typedef TixTListWidget WidgetRecord;
+typedef TixTListWidget * WidgetPtr;
+
+#endif /* _TIX_TLIST_H_ */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixWinInt.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixWinInt.h
new file mode 100644
index 00000000000..092cfddb9fe
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixWinInt.h
@@ -0,0 +1,23 @@
+
+/* $Id: tixWinInt.h,v 1.1.1.1 2000/05/17 11:08:55 idiscovery Exp $ */
+
+/*
+ * tixWinInt.h
+ *
+ * Internal header file for Tix on the Windows platform.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_WIN_INT_H_
+#define _TIX_WIN_INT_H_
+
+#ifndef _TIX_INT_H_
+#include "tixInt.h"
+#endif
+
+#endif /* _TIX_WIN_INT_H_ */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tixWinPort.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tixWinPort.h
new file mode 100644
index 00000000000..6c71160c756
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tixWinPort.h
@@ -0,0 +1,40 @@
+
+/* $Id: tixWinPort.h,v 1.1.1.1 2000/05/17 11:08:55 idiscovery Exp $ */
+
+/*
+ * tixWinPort.h --
+ *
+ * This header file handles porting issues that occur because of
+ * differences between systems. It reads in platform specific
+ * portability files.
+ *
+ * Copyright (c) 1996, Expert Interface Technologies
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#ifndef _TIX_WINPORT_H_
+#define _TIX_WINPORT_H_
+
+#include <stdio.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/timeb.h>
+#include <time.h>
+#include <io.h>
+#include <fcntl.h>
+
+#define WIN32_LEAN_AND_MEAN
+# ifndef __PM__
+# include <windows.h>
+# endif
+#undef WIN32_LEAN_AND_MEAN
+
+typedef unsigned char UNSIGNED_CHAR;
+
+#endif /* _TIX_WINPORT_H_ */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tix_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tix_f.h
new file mode 100644
index 00000000000..0289ee3f7a3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tix_f.h
@@ -0,0 +1,14 @@
+#ifndef TIX_VT
+#define TIX_VT
+typedef struct TixVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tix.t"
+#undef VFUNC
+#undef VVAR
+} TixVtab;
+extern TixVtab *TixVptr;
+extern TixVtab *TixVGet(void);
+#endif /* TIX_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tk.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tk.h
new file mode 100644
index 00000000000..7d0082e27dc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tk.h
@@ -0,0 +1,1857 @@
+/*
+ * tk.h --
+ *
+ * Declarations for Tk-related things that are visible
+ * outside of the Tk module itself.
+ *
+ * Copyright (c) 1989-1994 The Regents of the University of California.
+ * Copyright (c) 1994 The Australian National University.
+ * Copyright (c) 1994-1998 Sun Microsystems, Inc.
+ * Copyright (c) 1998-2000 Ajuba Solutions.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tk.h,v 1.74.2.3 2003/10/03 16:32:39 dgp Exp $
+ */
+
+#ifndef _TK
+#define _TK
+
+/*
+ * For C++ compilers, use extern "C"
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * When version numbers change here, you must also go into the following files
+ * and update the version numbers:
+ *
+ * library/tk.tcl (only if Major.minor changes, not patchlevel)
+ * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
+ * win/configure.in (as above)
+ * win/makefile.vc (not patchlevel)
+ * README (sections 0 and 1)
+ * mac/README (not patchlevel)
+ * macosx/Wish.pbproj/project.pbxproj
+ * (14 LOC total, 4 LOC patch)
+ * win/README (not patchlevel)
+ * unix/README (not patchlevel)
+ * unix/tk.spec (3 LOC Major/Minor, 2 LOC patch)
+ * win/tcl.m4 (not patchlevel)
+ *
+ * You may also need to update some of these files when the numbers change
+ * for the version of Tcl that this release of Tk is compiled against.
+ */
+
+#define TK_MAJOR_VERSION 8
+#define TK_MINOR_VERSION 4
+#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
+#define TK_RELEASE_SERIAL 5
+
+#define TK_VERSION "8.4"
+#define TK_PATCH_LEVEL "8.4.5"
+
+/*
+ * The following definitions set up the proper options for Macintosh
+ * compilers. We use this method because there is no autoconf equivalent.
+ */
+
+#if defined(MAC_TCL) || defined(MAC_OSX_TK)
+# ifndef REDO_KEYSYM_LOOKUP
+# define REDO_KEYSYM_LOOKUP
+# endif
+#endif
+
+
+/*
+ * A special definition used to allow this header file to be included
+ * from windows or mac resource files so that they can obtain version
+ * information. RC_INVOKED is defined by default by the windows RC tool
+ * and manually set for macintosh.
+ *
+ * Resource compilers don't like all the C stuff, like typedefs and
+ * procedure declarations, that occur below, so block them out.
+ */
+
+#ifdef RC_INVOKED
+#include "Lang.h"
+#endif
+
+#ifndef RC_INVOKED
+
+#ifndef _TKPORT
+#include "tkPort.h"
+#endif
+
+#ifndef _XLIB_H
+# if defined (MAC_TCL)
+# include <Xlib.h>
+# include <X.h>
+# elif defined(MAC_OSX_TK)
+# include <X11/Xlib.h>
+# include <X11/X.h>
+# else
+# include <X11/Xlib.h>
+# endif
+#if !defined(_XLIB_H)
+#define _XLIB_H
+#endif
+#endif
+
+
+#ifdef __STDC__
+# include <stddef.h>
+#endif
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Decide whether or not to use input methods.
+ */
+
+#ifdef XNQueryInputStyle
+#define TK_USE_INPUT_METHODS
+#endif
+
+/*
+ * Dummy types that are used by clients:
+ */
+
+typedef struct Tk_BindingTable_ *Tk_BindingTable;
+typedef struct Tk_Canvas_ *Tk_Canvas;
+typedef struct Tk_Cursor_ *Tk_Cursor;
+typedef struct Tk_ErrorHandler_ *Tk_ErrorHandler;
+typedef struct Tk_Font_ *Tk_Font;
+typedef struct Tk_Image__ *Tk_Image;
+typedef struct Tk_ImageMaster_ *Tk_ImageMaster;
+typedef struct Tk_OptionTable_ *Tk_OptionTable;
+typedef struct Tk_PostscriptInfo_ *Tk_PostscriptInfo;
+typedef struct Tk_TextLayout_ *Tk_TextLayout;
+typedef struct Tk_Window_ *Tk_Window;
+typedef struct Tk_3DBorder_ *Tk_3DBorder;
+typedef struct Tk_Style_ *Tk_Style;
+typedef struct Tk_StyleEngine_ *Tk_StyleEngine;
+typedef struct Tk_StyledElement_ *Tk_StyledElement;
+
+/*
+ * Additional types exported to clients.
+ */
+
+typedef CONST char *Tk_Uid;
+
+/*
+ * The enum below defines the valid types for Tk configuration options
+ * as implemented by Tk_InitOptions, Tk_SetOptions, etc.
+ */
+
+typedef enum {
+ TK_OPTION_BOOLEAN,
+ TK_OPTION_INT,
+ TK_OPTION_DOUBLE,
+ TK_OPTION_STRING,
+ TK_OPTION_STRING_TABLE,
+ TK_OPTION_COLOR,
+ TK_OPTION_FONT,
+ TK_OPTION_BITMAP,
+ TK_OPTION_BORDER,
+ TK_OPTION_RELIEF,
+ TK_OPTION_CURSOR,
+ TK_OPTION_JUSTIFY,
+ TK_OPTION_ANCHOR,
+ TK_OPTION_SYNONYM,
+ TK_OPTION_PIXELS,
+ TK_OPTION_WINDOW,
+ TK_OPTION_END,
+ TK_OPTION_CUSTOM,
+ TK_OPTION_STYLE,
+ TK_OPTION_OBJ,
+ TK_OPTION_CALLBACK,
+ TK_OPTION_SCALARVAR,
+ TK_OPTION_HASHVAR,
+ TK_OPTION_ARRAYVAR
+} Tk_OptionType;
+
+/*
+ * Structures of the following type are used by widgets to specify
+ * their configuration options. Typically each widget has a static
+ * array of these structures, where each element of the array describes
+ * a single configuration option. The array is passed to
+ * Tk_CreateOptionTable.
+ */
+
+typedef struct Tk_OptionSpec {
+ Tk_OptionType type; /* Type of option, such as TK_OPTION_COLOR;
+ * see definitions above. Last option in
+ * table must have type TK_OPTION_END. */
+ char *optionName; /* Name used to specify option in Tcl
+ * commands. */
+ char *dbName; /* Name for option in option database. */
+ char *dbClass; /* Class for option in database. */
+ char *defValue; /* Default value for option if not specified
+ * in command line, the option database,
+ * or the system. */
+ int objOffset; /* Where in record to store a Tcl_Obj * that
+ * holds the value of this option, specified
+ * as an offset in bytes from the start of
+ * the record. Use the Tk_Offset macro to
+ * generate values for this. -1 means don't
+ * store the Tcl_Obj in the record. */
+ int internalOffset; /* Where in record to store the internal
+ * representation of the value of this option,
+ * such as an int or XColor *. This field
+ * is specified as an offset in bytes
+ * from the start of the record. Use the
+ * Tk_Offset macro to generate values for it.
+ * -1 means don't store the internal
+ * representation in the record. */
+ int flags; /* Any combination of the values defined
+ * below. */
+ ClientData clientData; /* An alternate place to put option-specific
+ * data. Used for the monochrome default value
+ * for colors, etc. */
+ int typeMask; /* An arbitrary bit mask defined by the
+ * class manager; typically bits correspond
+ * to certain kinds of options such as all
+ * those that require a redisplay when they
+ * change. Tk_SetOptions returns the bit-wise
+ * OR of the typeMasks of all options that
+ * were changed. */
+} Tk_OptionSpec;
+
+/*
+ * Flag values for Tk_OptionSpec structures. These flags are shared by
+ * Tk_ConfigSpec structures, so be sure to coordinate any changes
+ * carefully.
+ */
+
+#define TK_OPTION_NULL_OK (1 << 0)
+#define TK_OPTION_DONT_SET_DEFAULT (1 << 3)
+
+/*
+ * The following structure and function types are used by TK_OPTION_CUSTOM
+ * options; the structure holds pointers to the functions needed by the Tk
+ * option config code to handle a custom option.
+ */
+
+typedef int (Tk_CustomOptionSetProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *widgRec,
+ int offset, char *saveInternalPtr, int flags));
+typedef Tcl_Obj *(Tk_CustomOptionGetProc) _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin, char *widgRec, int offset));
+typedef void (Tk_CustomOptionRestoreProc) _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin, char *internalPtr, char *saveInternalPtr));
+typedef void (Tk_CustomOptionFreeProc) _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin, char *internalPtr));
+
+typedef struct Tk_ObjCustomOption {
+ char *name; /* Name of the custom option. */
+ Tk_CustomOptionSetProc *setProc; /* Function to use to set a record's
+ * option value from a Tcl_Obj */
+ Tk_CustomOptionGetProc *getProc; /* Function to use to get a Tcl_Obj
+ * representation from an internal
+ * representation of an option. */
+ Tk_CustomOptionRestoreProc *restoreProc; /* Function to use to restore a
+ * saved value for the internal
+ * representation. */
+ Tk_CustomOptionFreeProc *freeProc; /* Function to use to free the internal
+ * representation of an option. */
+ ClientData clientData; /* Arbitrary one-word value passed to
+ * the handling procs. */
+} Tk_ObjCustomOption;
+
+
+/*
+ * Macro to use to fill in "offset" fields of the Tk_OptionSpec.
+ * struct. Computes number of bytes from beginning of structure
+ * to a given field.
+ */
+
+#ifdef offsetof
+#define Tk_Offset(type, field) ((int) offsetof(type, field))
+#else
+#define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
+#endif
+
+/*
+ * The following two structures are used for error handling. When
+ * configuration options are being modified, the old values are
+ * saved in a Tk_SavedOptions structure. If an error occurs, then the
+ * contents of the structure can be used to restore all of the old
+ * values. The contents of this structure are for the private use
+ * Tk. No-one outside Tk should ever read or write any of the fields
+ * of these structures.
+ */
+
+typedef struct Tk_SavedOption {
+ struct TkOption *optionPtr; /* Points to information that describes
+ * the option. */
+ Tcl_Obj *valuePtr; /* The old value of the option, in
+ * the form of a Tcl object; may be
+ * NULL if the value wasn't saved as
+ * an object. */
+ double internalForm; /* The old value of the option, in
+ * some internal representation such
+ * as an int or (XColor *). Valid
+ * only if optionPtr->specPtr->objOffset
+ * is < 0. The space must be large
+ * enough to accommodate a double, a
+ * long, or a pointer; right now it
+ * looks like a double is big
+ * enough. Also, using a double
+ * guarantees that the field is
+ * properly aligned for storing large
+ * values. */
+} Tk_SavedOption;
+
+#ifdef TCL_MEM_DEBUG
+# define TK_NUM_SAVED_OPTIONS 2
+#else
+# define TK_NUM_SAVED_OPTIONS 20
+#endif
+
+typedef struct Tk_SavedOptions {
+ char *recordPtr; /* The data structure in which to
+ * restore configuration options. */
+ Tk_Window tkwin; /* Window associated with recordPtr;
+ * needed to restore certain options. */
+ int numItems; /* The number of valid items in
+ * items field. */
+ Tk_SavedOption items[TK_NUM_SAVED_OPTIONS];
+ /* Items used to hold old values. */
+ struct Tk_SavedOptions *nextPtr; /* Points to next structure in list;
+ * needed if too many options changed
+ * to hold all the old values in a
+ * single structure. NULL means no
+ * more structures. */
+} Tk_SavedOptions;
+
+/*
+ * Structure used to describe application-specific configuration
+ * options: indicates procedures to call to parse an option and
+ * to return a text string describing an option. THESE ARE
+ * DEPRECATED; PLEASE USE THE NEW STRUCTURES LISTED ABOVE.
+ */
+
+/*
+ * This is a temporary flag used while tkObjConfig and new widgets
+ * are in development.
+ */
+
+#ifndef __NO_OLD_CONFIG
+
+typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+typedef Tcl_Obj *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin, char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+
+typedef struct Tk_CustomOption {
+ Tk_OptionParseProc *parseProc; /* Procedure to call to parse an
+ * option and store it in converted
+ * form. */
+ Tk_OptionPrintProc *printProc; /* Procedure to return a printable
+ * string describing an existing
+ * option. */
+ ClientData clientData; /* Arbitrary one-word value used by
+ * option parser: passed to
+ * parseProc and printProc. */
+} Tk_CustomOption;
+
+/*
+ * Structure used to specify information for Tk_ConfigureWidget. Each
+ * structure gives complete information for one option, including
+ * how the option is specified on the command line, where it appears
+ * in the option database, etc.
+ */
+
+typedef struct Tk_ConfigSpec {
+ int type; /* Type of option, such as TK_CONFIG_COLOR;
+ * see definitions below. Last option in
+ * table must have type TK_CONFIG_END. */
+ char *argvName; /* Switch used to specify option in objv.
+ * NULL means this spec is part of a group. */
+ Tk_Uid dbName; /* Name for option in option database. */
+ Tk_Uid dbClass; /* Class for option in database. */
+ Tk_Uid defValue; /* Default value for option if not
+ * specified in command line or database. */
+ int offset; /* Where in widget record to store value;
+ * use Tk_Offset macro to generate values
+ * for this. */
+ int specFlags; /* Any combination of the values defined
+ * below; other bits are used internally
+ * by tkConfig.c. */
+ Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is
+ * a pointer to info about how to parse and
+ * print the option. Otherwise it is
+ * irrelevant. */
+} Tk_ConfigSpec;
+
+/*
+ * Type values for Tk_ConfigSpec structures. See the user
+ * documentation for details.
+ */
+
+
+/*
+ * Macro to use to fill in "offset" fields of Tk_ConfigInfos.
+ * Computes number of bytes from beginning of structure to a
+ * given field.
+ */
+
+#ifdef offsetof
+#define Tk_Offset(type, field) ((int) offsetof(type, field))
+#else
+#define Tk_Offset(type, field) ((int) ((char *) &((type *) 0)->field))
+#endif
+
+typedef enum {
+ TK_CONFIG_BOOLEAN, TK_CONFIG_INT, TK_CONFIG_DOUBLE, TK_CONFIG_STRING,
+ TK_CONFIG_UID, TK_CONFIG_COLOR, TK_CONFIG_FONT, TK_CONFIG_BITMAP,
+ TK_CONFIG_BORDER, TK_CONFIG_RELIEF, TK_CONFIG_CURSOR,
+ TK_CONFIG_ACTIVE_CURSOR, TK_CONFIG_JUSTIFY, TK_CONFIG_ANCHOR,
+ TK_CONFIG_SYNONYM, TK_CONFIG_CAP_STYLE, TK_CONFIG_JOIN_STYLE,
+ TK_CONFIG_PIXELS, TK_CONFIG_MM, TK_CONFIG_WINDOW, TK_CONFIG_CUSTOM,
+ TK_CONFIG_CALLBACK, TK_CONFIG_LANGARG, TK_CONFIG_SCALARVAR,
+ TK_CONFIG_HASHVAR, TK_CONFIG_ARRAYVAR, TK_CONFIG_OBJECT,
+ TK_CONFIG_END
+} Tk_ConfigTypes;
+
+/*
+ * Possible values for flags argument to Tk_ConfigureWidget:
+ */
+
+#define TK_CONFIG_ARGV_ONLY 1
+#define TK_CONFIG_OBJS 0x80
+
+/*
+ * Possible flag values for Tk_ConfigSpec structures. Any bits at
+ * or above TK_CONFIG_USER_BIT may be used by clients for selecting
+ * certain entries. Before changing any values here, coordinate with
+ * tkOldConfig.c (internal-use-only flags are defined there).
+ */
+
+#define TK_CONFIG_NULL_OK (1 << 0)
+#define TK_CONFIG_COLOR_ONLY (1 << 1)
+#define TK_CONFIG_MONO_ONLY (1 << 2)
+#define TK_CONFIG_DONT_SET_DEFAULT (1 << 3)
+#define TK_CONFIG_OPTION_SPECIFIED (1 << 4)
+#define TK_CONFIG_USER_BIT 0x100
+#endif /* __NO_OLD_CONFIG */
+
+/*
+ * Structure used to specify how to handle argv options.
+ */
+
+typedef struct {
+ char *key; /* The key string that flags the option in the
+ * objv array. */
+ int type; /* Indicates option type; see below. */
+ char *src; /* Value to be used in setting dst; usage
+ * depends on type. */
+ char *dst; /* Address of value to be modified; usage
+ * depends on type. */
+ char *help; /* Documentation message describing this option. */
+} Tk_ArgvInfo;
+
+/*
+ * Legal values for the type field of a Tk_ArgvInfo: see the user
+ * documentation for details.
+ */
+
+#define TK_ARGV_CONSTANT 15
+#define TK_ARGV_INT 16
+#define TK_ARGV_STRING 17
+#define TK_ARGV_UID 18
+#define TK_ARGV_REST 19
+#define TK_ARGV_FLOAT 20
+#define TK_ARGV_FUNC 21
+#define TK_ARGV_GENFUNC 22
+#define TK_ARGV_HELP 23
+#define TK_ARGV_CONST_OPTION 24
+#define TK_ARGV_OPTION_VALUE 25
+#define TK_ARGV_OPTION_NAME_VALUE 26
+#define TK_ARGV_END 27
+
+/*
+ * Flag bits for passing to Tk_ParseArgv:
+ */
+
+#define TK_ARGV_NO_DEFAULTS 0x1
+#define TK_ARGV_NO_LEFTOVERS 0x2
+#define TK_ARGV_NO_ABBREV 0x4
+#define TK_ARGV_DONT_SKIP_FIRST_ARG 0x8
+
+/*
+ * Enumerated type for describing actions to be taken in response
+ * to a restrictProc established by Tk_RestrictEvents.
+ */
+
+typedef enum {
+ TK_DEFER_EVENT, TK_PROCESS_EVENT, TK_DISCARD_EVENT
+} Tk_RestrictAction;
+
+/*
+ * Priority levels to pass to Tk_AddOption:
+ */
+
+#define TK_WIDGET_DEFAULT_PRIO 20
+#define TK_STARTUP_FILE_PRIO 40
+#define TK_USER_DEFAULT_PRIO 60
+#define TK_INTERACTIVE_PRIO 80
+#define TK_MAX_PRIO 100
+
+/*
+ * Relief values returned by Tk_GetRelief:
+ */
+
+#define TK_RELIEF_NULL -1
+#define TK_RELIEF_FLAT 0
+#define TK_RELIEF_GROOVE 1
+#define TK_RELIEF_RAISED 2
+#define TK_RELIEF_RIDGE 3
+#define TK_RELIEF_SOLID 4
+#define TK_RELIEF_SUNKEN 5
+
+/*
+ * "Which" argument values for Tk_3DBorderGC:
+ */
+
+#define TK_3D_FLAT_GC 1
+#define TK_3D_LIGHT_GC 2
+#define TK_3D_DARK_GC 3
+
+/*
+ * Special EnterNotify/LeaveNotify "mode" for use in events
+ * generated by tkShare.c. Pick a high enough value that it's
+ * unlikely to conflict with existing values (like NotifyNormal)
+ * or any new values defined in the future.
+ */
+
+#define TK_NOTIFY_SHARE 20
+
+/*
+ * Enumerated type for describing a point by which to anchor something:
+ */
+
+typedef enum {
+ TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE,
+ TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW,
+ TK_ANCHOR_CENTER
+} Tk_Anchor;
+
+/*
+ * Enumerated type for describing a style of justification:
+ */
+
+typedef enum {
+ TK_JUSTIFY_LEFT, TK_JUSTIFY_RIGHT, TK_JUSTIFY_CENTER
+} Tk_Justify;
+
+/*
+ * The following structure is used by Tk_GetFontMetrics() to return
+ * information about the properties of a Tk_Font.
+ */
+
+typedef struct Tk_FontMetrics {
+ int ascent; /* The amount in pixels that the tallest
+ * letter sticks up above the baseline, plus
+ * any extra blank space added by the designer
+ * of the font. */
+ int descent; /* The largest amount in pixels that any
+ * letter sticks below the baseline, plus any
+ * extra blank space added by the designer of
+ * the font. */
+ int linespace; /* The sum of the ascent and descent. How
+ * far apart two lines of text in the same
+ * font should be placed so that none of the
+ * characters in one line overlap any of the
+ * characters in the other line. */
+} Tk_FontMetrics;
+
+/*
+ * Flags passed to Tk_MeasureChars:
+ */
+
+#define TK_WHOLE_WORDS 1
+#define TK_AT_LEAST_ONE 2
+#define TK_PARTIAL_OK 4
+
+/*
+ * Flags passed to Tk_ComputeTextLayout:
+ */
+
+#define TK_IGNORE_TABS 8
+#define TK_IGNORE_NEWLINES 16
+
+/*
+ * Widget class procedures used to implement platform specific widget
+ * behavior.
+ */
+
+typedef Window (Tk_ClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin,
+ Window parent, ClientData instanceData));
+typedef void (Tk_ClassWorldChangedProc) _ANSI_ARGS_((ClientData instanceData));
+typedef void (Tk_ClassModalProc) _ANSI_ARGS_((Tk_Window tkwin,
+ XEvent *eventPtr));
+
+typedef struct Tk_ClassProcs {
+ unsigned int size;
+ Tk_ClassWorldChangedProc *worldChangedProc;
+ /* Procedure to invoke when the widget needs to
+ * respond in some way to a change in the
+ * world (font changes, etc.) */
+ Tk_ClassCreateProc *createProc;
+ /* Procedure to invoke when the
+ * platform-dependent window needs to be
+ * created. */
+ Tk_ClassModalProc *modalProc;
+ /* Procedure to invoke after all bindings on a
+ * widget have been triggered in order to
+ * handle a modal loop. */
+} Tk_ClassProcs;
+
+/*
+ * Simple accessor for Tk_ClassProcs structure. Checks that the structure
+ * is not NULL, then checks the size field and returns either the requested
+ * field, if present, or NULL if the structure is too small to have the field
+ * (or NULL if the structure is NULL).
+ *
+ * A more general version of this function may be useful if other
+ * size-versioned structure pop up in the future:
+ *
+ * #define Tk_GetField(name, who, which) \
+ * (((who) == NULL) ? NULL :
+ * (((who)->size <= Tk_Offset(name, which)) ? NULL :(name)->which))
+ */
+
+#define Tk_GetClassProc(procs, which) \
+ (((procs) == NULL) ? NULL : \
+ (((procs)->size <= Tk_Offset(Tk_ClassProcs, which)) ? NULL:(procs)->which))
+
+/*
+ * Each geometry manager (the packer, the placer, etc.) is represented
+ * by a structure of the following form, which indicates procedures
+ * to invoke in the geometry manager to carry out certain functions.
+ */
+
+typedef void (Tk_GeomRequestProc) _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin));
+typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin));
+
+typedef struct Tk_GeomMgr {
+ char *name; /* Name of the geometry manager (command
+ * used to invoke it, or name of widget
+ * class that allows embedded widgets). */
+ Tk_GeomRequestProc *requestProc;
+ /* Procedure to invoke when a slave's
+ * requested geometry changes. */
+ Tk_GeomLostSlaveProc *lostSlaveProc;
+ /* Procedure to invoke when a slave is
+ * taken away from one geometry manager
+ * by another. NULL means geometry manager
+ * doesn't care when slaves are lost. */
+} Tk_GeomMgr;
+
+/*
+ * Result values returned by Tk_GetScrollInfo:
+ */
+
+#define TK_SCROLL_MOVETO 1
+#define TK_SCROLL_PAGES 2
+#define TK_SCROLL_UNITS 3
+#define TK_SCROLL_ERROR 4
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * Extensions to the X event set
+ *
+ *---------------------------------------------------------------------------
+ */
+#define VirtualEvent (MappingNotify + 1)
+#define ActivateNotify (MappingNotify + 2)
+#define DeactivateNotify (MappingNotify + 3)
+#define MouseWheelEvent (MappingNotify + 4)
+#define TK_LASTEVENT (MappingNotify + 5)
+
+#define MouseWheelMask (1L << 28)
+#define ActivateMask (1L << 29)
+#define VirtualEventMask (1L << 30)
+
+
+/*
+ * A virtual event shares most of its fields with the XKeyEvent and
+ * XButtonEvent structures. 99% of the time a virtual event will be
+ * an abstraction of a key or button event, so this structure provides
+ * the most information to the user. The only difference is the changing
+ * of the detail field for a virtual event so that it holds the name of the
+ * virtual event being triggered.
+ */
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* True if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event; /* Window on which event was requested. */
+ Window root; /* root window that the event occured on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ Tk_Uid name; /* Name of virtual event. */
+ Bool same_screen; /* same screen flag */
+} XVirtualEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* True if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* Window in which event occurred. */
+} XActivateDeactivateEvent;
+typedef XActivateDeactivateEvent XActivateEvent;
+typedef XActivateDeactivateEvent XDeactivateEvent;
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Macros for querying Tk_Window structures. See the
+ * manual entries for documentation.
+ *
+ *--------------------------------------------------------------
+ */
+
+#define Tk_Display(tkwin) (((Tk_FakeWin *) (tkwin))->display)
+#define Tk_ScreenNumber(tkwin) (((Tk_FakeWin *) (tkwin))->screenNum)
+#define Tk_Screen(tkwin) (ScreenOfDisplay(Tk_Display(tkwin), \
+ Tk_ScreenNumber(tkwin)))
+#define Tk_Depth(tkwin) (((Tk_FakeWin *) (tkwin))->depth)
+#define Tk_Visual(tkwin) (((Tk_FakeWin *) (tkwin))->visual)
+#define Tk_WindowId(tkwin) (((Tk_FakeWin *) (tkwin))->window)
+#define Tk_PathName(tkwin) (((Tk_FakeWin *) (tkwin))->pathName)
+#define Tk_Name(tkwin) (((Tk_FakeWin *) (tkwin))->nameUid)
+#define Tk_Class(tkwin) (((Tk_FakeWin *) (tkwin))->classUid)
+#define Tk_X(tkwin) (((Tk_FakeWin *) (tkwin))->changes.x)
+#define Tk_Y(tkwin) (((Tk_FakeWin *) (tkwin))->changes.y)
+#define Tk_Width(tkwin) (((Tk_FakeWin *) (tkwin))->changes.width)
+#define Tk_Height(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->changes.height)
+#define Tk_Changes(tkwin) (&((Tk_FakeWin *) (tkwin))->changes)
+#define Tk_Attributes(tkwin) (&((Tk_FakeWin *) (tkwin))->atts)
+#define Tk_IsEmbedded(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_EMBEDDED)
+#define Tk_IsContainer(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_CONTAINER)
+#define Tk_IsMapped(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_MAPPED)
+#define Tk_IsTopLevel(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_LEVEL)
+#define Tk_HasWrapper(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_HAS_WRAPPER)
+#define Tk_WinManaged(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_WIN_MANAGED)
+#define Tk_TopWinHierarchy(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->flags & TK_TOP_HIERARCHY)
+#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth)
+#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight)
+/* Tk_InternalBorderWidth is deprecated */
+#define Tk_InternalBorderWidth(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderLeft)
+#define Tk_InternalBorderLeft(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderLeft)
+#define Tk_InternalBorderRight(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderRight)
+#define Tk_InternalBorderTop(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderTop)
+#define Tk_InternalBorderBottom(tkwin) \
+ (((Tk_FakeWin *) (tkwin))->internalBorderBottom)
+#define Tk_MinReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->minReqWidth)
+#define Tk_MinReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->minReqHeight)
+#define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr)
+#define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap)
+
+/*
+ * The structure below is needed by the macros above so that they can
+ * access the fields of a Tk_Window. The fields not needed by the macros
+ * are declared as "dummyX". The structure has its own type in order to
+ * prevent applications from accessing Tk_Window fields except using
+ * official macros. WARNING!! The structure definition must be kept
+ * consistent with the TkWindow structure in tkInt.h. If you change one,
+ * then change the other. See the declaration in tkInt.h for
+ * documentation on what the fields are used for internally.
+ */
+
+typedef struct Tk_FakeWin {
+ Display *display;
+ char *dummy1; /* dispPtr */
+ int screenNum;
+ Visual *visual;
+ int depth;
+ Window window;
+ char *dummy2; /* childList */
+ char *dummy3; /* lastChildPtr */
+ Tk_Window parentPtr; /* parentPtr */
+ char *dummy4; /* nextPtr */
+ char *dummy5; /* mainPtr */
+ char *pathName;
+ Tk_Uid nameUid;
+ Tk_Uid classUid;
+ XWindowChanges changes;
+ unsigned int dummy6; /* dirtyChanges */
+ XSetWindowAttributes atts;
+ unsigned long dummy7; /* dirtyAtts */
+ unsigned int flags;
+ char *dummy8; /* handlerList */
+#ifdef TK_USE_INPUT_METHODS
+ XIC dummy9; /* inputContext */
+#endif /* TK_USE_INPUT_METHODS */
+ ClientData *dummy10; /* tagPtr */
+ int dummy11; /* numTags */
+ int dummy12; /* optionLevel */
+ char *dummy13; /* selHandlerList */
+ char *dummy14; /* geomMgrPtr */
+ ClientData dummy15; /* geomData */
+ int reqWidth, reqHeight;
+ int internalBorderLeft;
+ char *dummy16; /* wmInfoPtr */
+ char *dummy17; /* classProcPtr */
+ ClientData dummy18; /* instanceData */
+ char *dummy19; /* privatePtr */
+ int internalBorderRight;
+ int internalBorderTop;
+ int internalBorderBottom;
+ int minReqWidth;
+ int minReqHeight;
+} Tk_FakeWin;
+
+/*
+ * Flag values for TkWindow (and Tk_FakeWin) structures are:
+ *
+ * TK_MAPPED: 1 means window is currently mapped,
+ * 0 means unmapped.
+ * TK_TOP_LEVEL: 1 means this is a top-level widget.
+ * TK_ALREADY_DEAD: 1 means the window is in the process of
+ * being destroyed already.
+ * TK_NEED_CONFIG_NOTIFY: 1 means that the window has been reconfigured
+ * before it was made to exist. At the time of
+ * making it exist a ConfigureNotify event needs
+ * to be generated.
+ * TK_GRAB_FLAG: Used to manage grabs. See tkGrab.c for
+ * details.
+ * TK_CHECKED_IC: 1 means we've already tried to get an input
+ * context for this window; if the ic field
+ * is NULL it means that there isn't a context
+ * for the field.
+ * TK_DONT_DESTROY_WINDOW: 1 means that Tk_DestroyWindow should not
+ * invoke XDestroyWindow to destroy this widget's
+ * X window. The flag is set when the window
+ * has already been destroyed elsewhere (e.g.
+ * by another application) or when it will be
+ * destroyed later (e.g. by destroying its
+ * parent).
+ * TK_WM_COLORMAP_WINDOW: 1 means that this window has at some time
+ * appeared in the WM_COLORMAP_WINDOWS property
+ * for its toplevel, so we have to remove it
+ * from that property if the window is
+ * deleted and the toplevel isn't.
+ * TK_EMBEDDED: 1 means that this window (which must be a
+ * toplevel) is not a free-standing window but
+ * rather is embedded in some other application.
+ * TK_CONTAINER: 1 means that this window is a container, and
+ * that some other application (either in
+ * this process or elsewhere) may be
+ * embedding itself inside the window.
+ * TK_BOTH_HALVES: 1 means that this window is used for
+ * application embedding (either as
+ * container or embedded application), and
+ * both the containing and embedded halves
+ * are associated with windows in this
+ * particular process.
+ * TK_DEFER_MODAL: 1 means that this window has deferred a modal
+ * loop until all of the bindings for the current
+ * event have been invoked.
+ * TK_WRAPPER: 1 means that this window is the extra
+ * wrapper window created around a toplevel
+ * to hold the menubar under Unix. See
+ * tkUnixWm.c for more information.
+ * TK_REPARENTED: 1 means that this window has been reparented
+ * so that as far as the window system is
+ * concerned it isn't a child of its Tk
+ * parent. Initially this is used only for
+ * special Unix menubar windows.
+ * TK_ANONYMOUS_WINDOW: 1 means that this window has no name, and is
+ * thus not accessible from Tk.
+ * TK_HAS_WRAPPER 1 means that this window has a wrapper window
+ * TK_WIN_MANAGED 1 means that this window is a child of the
+ * root window, and is managed by the window
+ * manager.
+ * TK_TOP_HIERARCHY 1 means this window is at the top of a
+ * physical window hierarchy within this
+ * process, i.e. the window's parent
+ * either doesn't exist or is not owned by
+ * this Tk application.
+ * TK_PROP_PROPCHANGE 1 means that PropertyNotify events in
+ * this window's children should propagate
+ * up to this window.
+ */
+
+
+#define TK_MAPPED 1
+#define TK_TOP_LEVEL 2
+#define TK_ALREADY_DEAD 4
+#define TK_NEED_CONFIG_NOTIFY 8
+#define TK_GRAB_FLAG 0x10
+#define TK_CHECKED_IC 0x20
+#define TK_DONT_DESTROY_WINDOW 0x40
+#define TK_WM_COLORMAP_WINDOW 0x80
+#define TK_EMBEDDED 0x100
+#define TK_CONTAINER 0x200
+#define TK_BOTH_HALVES 0x400
+#define TK_DEFER_MODAL 0x800
+#define TK_WRAPPER 0x1000
+#define TK_REPARENTED 0x2000
+#define TK_ANONYMOUS_WINDOW 0x4000
+#define TK_HAS_WRAPPER 0x8000
+#define TK_WIN_MANAGED 0x10000
+#define TK_TOP_HIERARCHY 0x20000
+#define TK_PROP_PROPCHANGE 0x40000
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Procedure prototypes and structures used for defining new canvas
+ * items:
+ *
+ *--------------------------------------------------------------
+ */
+
+typedef enum {
+ TK_STATE_NULL = -1, TK_STATE_ACTIVE, TK_STATE_DISABLED,
+ TK_STATE_NORMAL, TK_STATE_HIDDEN
+} Tk_State;
+
+typedef struct Tk_SmoothMethod {
+ char *name;
+ int (*coordProc) _ANSI_ARGS_((Tk_Canvas canvas,
+ double *pointPtr, int numPoints, int numSteps,
+ XPoint xPoints[], double dblPoints[]));
+ void (*postscriptProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, double *coordPtr,
+ int numPoints, int numSteps));
+} Tk_SmoothMethod;
+
+/*
+ * For each item in a canvas widget there exists one record with
+ * the following structure. Each actual item is represented by
+ * a record with the following stuff at its beginning, plus additional
+ * type-specific stuff after that.
+ */
+
+#define TK_TAG_SPACE 3
+
+typedef struct Tk_Item {
+ int id; /* Unique identifier for this item
+ * (also serves as first tag for
+ * item). */
+ struct Tk_Item *nextPtr; /* Next in display list of all
+ * items in this canvas. Later items
+ * in list are drawn on top of earlier
+ * ones. */
+ Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of
+ * tags. */
+ Tk_Uid *tagPtr; /* Pointer to array of tags. Usually
+ * points to staticTagSpace, but
+ * may point to malloc-ed space if
+ * there are lots of tags. */
+ int tagSpace; /* Total amount of tag space available
+ * at tagPtr. */
+ int numTags; /* Number of tag slots actually used
+ * at *tagPtr. */
+ struct Tk_ItemType *typePtr; /* Table of procedures that implement
+ * this type of item. */
+ int x1, y1, x2, y2; /* Bounding box for item, in integer
+ * canvas units. Set by item-specific
+ * code and guaranteed to contain every
+ * pixel drawn in item. Item area
+ * includes x1 and y1 but not x2
+ * and y2. */
+ struct Tk_Item *prevPtr; /* Previous in display list of all
+ * items in this canvas. Later items
+ * in list are drawn just below earlier
+ * ones. */
+ Tk_State state; /* state of item */
+ LangCallback *updateCmd; /* for "-updatecommand" option */
+ int redraw_flags; /* some flags used in the canvas */
+ struct Tk_Item *group; /* group item managing this one */
+
+ /*
+ *------------------------------------------------------------------
+ * Starting here is additional type-specific stuff; see the
+ * declarations for individual types to see what is part of
+ * each type. The actual space below is determined by the
+ * "itemInfoSize" of the type's Tk_ItemType record.
+ *------------------------------------------------------------------
+ */
+} Tk_Item;
+
+/*
+ * Flag bits for canvases (redraw_flags):
+ *
+ * TK_ITEM_STATE_DEPENDANT - 1 means that object needs to be
+ * redrawn if the canvas state changes.
+ * TK_ITEM_DONT_REDRAW - 1 means that the object redraw is already
+ * been prepared, so the general canvas code
+ * doesn't need to do that any more.
+ */
+
+#define TK_ITEM_STATE_DEPENDANT 1
+#define TK_ITEM_DONT_REDRAW 2
+
+/*
+ * Structures used for implementing visitors.
+ */
+
+typedef ClientData Tk_VisitorStartProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, int argc, Tcl_Obj *CONST *objv));
+typedef int Tk_VisitorItemProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, ClientData clientData,
+ Tk_Item *itemPtr));
+typedef int Tk_VisitorEndProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, ClientData clientData));
+
+typedef struct Tk_VisitorType {
+ char *name;
+ int typeSize; /* should be sizeof(Tk_VisitorType) */
+ int flags; /* If this flag is non-zero then
+ * the item needs to be redrawn. */
+ Tk_VisitorStartProc *startProc;
+ Tk_VisitorEndProc *endProc;
+ Tk_VisitorItemProc *visitArc; /* The Arc visitor procedure. */
+ Tk_VisitorItemProc *visitBitmap; /* The Bitmap visitor procedure. */
+ Tk_VisitorItemProc *visitImage; /* The Image visitor procedure. */
+ Tk_VisitorItemProc *visitLine; /* The Line visitor procedure. */
+ Tk_VisitorItemProc *visitOval; /* The Oval visitor procedure. */
+ Tk_VisitorItemProc *visitPolygon; /* The Polygon visitor procedure. */
+ Tk_VisitorItemProc *visitRectangle; /* The Rectangle visitor procedure. */
+ Tk_VisitorItemProc *visitText; /* The Text visitor procedure. */
+ Tk_VisitorItemProc *visitWindow; /* The Window visitor procedure. */
+ Tk_VisitorItemProc *visitSticker; /* The Sticker visitor procedure.
+ * from tkSticker*/
+ Tk_VisitorItemProc *visitViewport; /* The Viewport visitor procedure.
+ * from TkSM */
+ Tk_VisitorItemProc *visitBarchart; /* The Barchart visitor procedure.
+ * from Scotty */
+ Tk_VisitorItemProc *visitStripchart;/* The Stripchart visitor procedure.
+ * from Scotty */
+
+ /* ptk extensions */
+ Tk_VisitorItemProc *visitGroup; /* The Group visitor procedure. */
+ Tk_VisitorItemProc *visitGrid; /* The Grid visitor procedure. */
+
+ /*
+ *------------------------------------------------------------------
+ * Starting here is additional item-extension stuff;
+ * you can add extra item types after this plus other information.
+ *------------------------------------------------------------------
+ */
+} Tk_VisitorType;
+
+/*
+ * Records of the following type are used to describe a type of
+ * item (e.g. lines, circles, etc.) that can form part of a
+ * canvas widget.
+ */
+
+#ifdef USE_OLD_CANVAS
+typedef int Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
+ Tcl_Obj *CONST *objv));
+typedef int Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
+ Tcl_Obj *CONST *objv, int flags));
+typedef int Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
+ Tcl_Obj *CONST *objv));
+#else
+typedef int Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
+ Tcl_Obj *CONST objv[]));
+typedef int Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
+ CONST84 Tcl_Obj *CONST objv[], int flags));
+typedef int Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, int argc,
+ Tcl_Obj *CONST objv[]));
+#endif
+typedef void Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, Display *display));
+typedef void Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, Display *display, Drawable dst,
+ int x, int y, int width, int height));
+typedef double Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, double *pointPtr));
+typedef int Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, double *rectPtr));
+typedef int Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, int prepass));
+typedef void Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, double originX, double originY,
+ double scaleX, double scaleY));
+typedef void Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, double deltaX, double deltaY));
+typedef int Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Obj *indexString,
+ int *indexPtr));
+typedef void Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, int index));
+typedef int Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, int offset, char *buffer,
+ int maxBytes));
+typedef void Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, int beforeThis, Tcl_Obj *string));
+typedef void Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, int first, int last));
+typedef void Tk_ItemBboxProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr));
+typedef int Tk_ItemGetCoordProc _ANSI_ARGS_((Tk_Item *itemPtr,
+ double **coordsPtr, Tcl_FreeProc *freeProc));
+typedef int Tk_ItemSetCoordProc _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *itemPtr, int num, double *coords));
+
+/*
+ * Some flag values that can be used in the "flags" field in Tk_ItemType.
+ */
+
+#define TK_ITEM_ALWAYS_REDRAW 1
+#define TK_ITEM_VISITOR_SUPPORT 2
+
+/*
+ * Structures used for implementing visitors.
+ */
+#ifndef __NO_OLD_CONFIG
+
+typedef struct Tk_ItemType {
+ char *name; /* The name of this type of item, such
+ * as "line". */
+ int itemSize; /* Total amount of space needed for
+ * item's record. */
+ Tk_ItemCreateProc *createProc; /* Procedure to create a new item of
+ * this type. */
+ Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration
+ * specs for this type. Used for
+ * returning configuration info. */
+ Tk_ItemConfigureProc *configProc; /* Procedure to call to change
+ * configuration options. */
+ Tk_ItemCoordProc *coordProc; /* Procedure to call to get and set
+ * the item's coordinates. */
+ Tk_ItemDeleteProc *deleteProc; /* Procedure to delete existing item of
+ * this type. */
+ Tk_ItemDisplayProc *displayProc; /* Procedure to display items of
+ * this type. */
+ int alwaysRedraw; /* Non-zero means displayProc should
+ * be called even when the item has
+ * been moved off-screen. */
+ Tk_ItemPointProc *pointProc; /* Computes distance from item to
+ * a given point. */
+ Tk_ItemAreaProc *areaProc; /* Computes whether item is inside,
+ * outside, or overlapping an area. */
+ Tk_ItemPostscriptProc *postscriptProc;
+ /* Procedure to write a Postscript
+ * description for items of this
+ * type. */
+ Tk_ItemScaleProc *scaleProc; /* Procedure to rescale items of
+ * this type. */
+ Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of
+ * this type. */
+ Tk_ItemIndexProc *indexProc; /* Procedure to determine index of
+ * indicated character. NULL if
+ * item doesn't support indexing. */
+ Tk_ItemCursorProc *icursorProc; /* Procedure to set insert cursor pos.
+ * to just before a given position. */
+ Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in
+ * STRING format) when it is in this
+ * item. */
+ Tk_ItemInsertProc *insertProc; /* Procedure to insert something into
+ * an item. */
+ Tk_ItemDCharsProc *dCharsProc; /* Procedure to delete characters
+ * from an item. */
+ struct Tk_ItemType *nextPtr; /* Used to link types together into
+ * a list. */
+ Tk_ItemBboxProc *bboxProc; /* Reserved for future extension. */
+ int reserved2; /* Carefully compatible with */
+ char *reserved3; /* Jan Nijtmans dash patch */
+ char *reserved4;
+} Tk_ItemType;
+
+#endif
+
+/*
+ * The following structure provides information about the selection and
+ * the insertion cursor. It is needed by only a few items, such as
+ * those that display text. It is shared by the generic canvas code
+ * and the item-specific code, but most of the fields should be written
+ * only by the canvas generic code.
+ */
+
+typedef struct Tk_CanvasTextInfo {
+ Tk_3DBorder selBorder; /* Border and background for selected
+ * characters. Read-only to items.*/
+ int selBorderWidth; /* Width of border around selection.
+ * Read-only to items. */
+ XColor *selFgColorPtr; /* Foreground color for selected text.
+ * Read-only to items. */
+ Tk_Item *selItemPtr; /* Pointer to selected item. NULL means
+ * selection isn't in this canvas.
+ * Writable by items. */
+ int selectFirst; /* Character index of first selected
+ * character. Writable by items. */
+ int selectLast; /* Character index of last selected
+ * character. Writable by items. */
+ Tk_Item *anchorItemPtr; /* Item corresponding to "selectAnchor":
+ * not necessarily selItemPtr. Read-only
+ * to items. */
+ int selectAnchor; /* Character index of fixed end of
+ * selection (i.e. "select to" operation will
+ * use this as one end of the selection).
+ * Writable by items. */
+ Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion
+ * cursor. Read-only to items. */
+ int insertWidth; /* Total width of insertion cursor. Read-only
+ * to items. */
+ int insertBorderWidth; /* Width of 3-D border around insert cursor.
+ * Read-only to items. */
+ Tk_Item *focusItemPtr; /* Item that currently has the input focus,
+ * or NULL if no such item. Read-only to
+ * items. */
+ int gotFocus; /* Non-zero means that the canvas widget has
+ * the input focus. Read-only to items.*/
+ int cursorOn; /* Non-zero means that an insertion cursor
+ * should be displayed in focusItemPtr.
+ * Read-only to items.*/
+} Tk_CanvasTextInfo;
+
+/*
+ * Structures used for Dashing and Outline.
+ */
+
+typedef struct Tk_Dash {
+ int number;
+ union {
+ char *pt;
+ char array[sizeof(char *)];
+ } pattern;
+} Tk_Dash;
+
+typedef struct Tk_TSOffset {
+ int flags; /* flags; see below for possible values */
+ int xoffset; /* x offset */
+ int yoffset; /* y offset */
+} Tk_TSOffset;
+
+/*
+ * Bit fields in Tk_Offset->flags:
+ */
+
+#define TK_OFFSET_INDEX 1
+#define TK_OFFSET_RELATIVE 2
+#define TK_OFFSET_LEFT 4
+#define TK_OFFSET_CENTER 8
+#define TK_OFFSET_RIGHT 16
+#define TK_OFFSET_TOP 32
+#define TK_OFFSET_MIDDLE 64
+#define TK_OFFSET_BOTTOM 128
+
+typedef struct Tk_Tile_ *Tk_Tile; /* Opaque type for tiles */
+
+typedef struct Tk_Outline {
+ GC gc; /* Graphics context. */
+ double width; /* Width of outline. */
+ double activeWidth; /* Width of outline. */
+ double disabledWidth; /* Width of outline. */
+ int offset; /* Dash offset */
+ Tk_Dash dash; /* Dash pattern */
+ Tk_Dash activeDash; /* Dash pattern if state is active*/
+ Tk_Dash disabledDash; /* Dash pattern if state is disabled*/
+ VOID *reserved1; /* reserved for future expansion */
+ VOID *reserved2;
+ VOID *reserved3;
+ Tk_TSOffset tsoffset; /* stipple offset for outline*/
+ XColor *color; /* Outline color. */
+ XColor *activeColor; /* Outline color if state is active. */
+ XColor *disabledColor; /* Outline color if state is disabled. */
+ Pixmap stipple; /* Outline Stipple pattern. */
+ Pixmap activeStipple; /* Outline Stipple pattern if state is active. */
+ Pixmap disabledStipple; /* Outline Stipple pattern if state is disabled. */
+ Tk_Tile tile;
+} Tk_Outline;
+
+
+/*
+ * Some functions handy for Dashing and Outlines (in tkCanvUtil.c).
+ */
+
+EXTERN void Tk_CreateOutline _ANSI_ARGS_((Tk_Outline *outline));
+EXTERN void Tk_DeleteOutline _ANSI_ARGS_((Display *display,
+ Tk_Outline *outline));
+EXTERN int Tk_ConfigOutlineGC _ANSI_ARGS_((XGCValues *gcValues,
+ Tk_Canvas canvas ,Tk_Item *item,
+ Tk_Outline *outline));
+EXTERN int Tk_ChangeOutlineGC _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *item, Tk_Outline *outline));
+EXTERN int Tk_ResetOutlineGC _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *item, Tk_Outline *outline));
+EXTERN int Tk_CanvasPsOutline _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item *item, Tk_Outline *outline));
+
+/*
+ * Some functions handy for Tiling and Stipple/Tile offset.
+ */
+
+typedef void (Tk_TileChangedProc) _ANSI_ARGS_((ClientData clientData,
+ Tk_Tile tile));
+EXTERN Tk_Tile Tk_GetTile _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin,
+ CONST char *imageName));
+EXTERN void Tk_FreeTile _ANSI_ARGS_((Tk_Tile tile));
+EXTERN CONST char * Tk_NameOfTile _ANSI_ARGS_((Tk_Tile tile));
+EXTERN void Tk_SetTileChangedProc _ANSI_ARGS_((Tk_Tile tile,
+ Tk_TileChangedProc * changeProc, ClientData clientData));
+EXTERN Pixmap Tk_PixmapOfTile _ANSI_ARGS_((Tk_Tile tile));
+EXTERN int Tk_PixelParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj *Tk_PixelPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN void Tk_SizeOfTile _ANSI_ARGS_((Tk_Tile tile, int *widthPtr,
+ int *heightPtr));
+EXTERN int Tk_TileParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj *Tk_TilePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int Tk_OffsetParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj *Tk_OffsetPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int Tk_OrientParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj *Tk_OrientPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Procedure prototypes and structures used for managing images:
+ *
+ *--------------------------------------------------------------
+ */
+
+typedef struct Tk_ImageType Tk_ImageType;
+#ifdef USE_OLD_IMAGE
+typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ char *name, int argc, Tcl_Obj *CONST *objv, Tk_ImageType *typePtr,
+ Tk_ImageMaster master, ClientData *masterDataPtr));
+#else
+typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ char *name, int objc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr,
+ Tk_ImageMaster master, ClientData *masterDataPtr));
+#endif
+typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,
+ ClientData masterData));
+typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData,
+ Display *display, Drawable drawable, int imageX, int imageY,
+ int width, int height, int drawableX, int drawableY));
+typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData,
+ Display *display));
+typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData));
+typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData,
+ int x, int y, int width, int height, int imageWidth,
+ int imageHeight));
+typedef int (Tk_ImagePostscriptProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, Tk_PostscriptInfo psinfo,
+ int x, int y, int width, int height, int prepass));
+
+/*
+ * The following structure represents a particular type of image
+ * (bitmap, xpm image, etc.). It provides information common to
+ * all images of that type, such as the type name and a collection
+ * of procedures in the image manager that respond to various
+ * events. Each image manager is represented by one of these
+ * structures.
+ */
+
+struct Tk_ImageType {
+ char *name; /* Name of image type. */
+ Tk_ImageCreateProc *createProc;
+ /* Procedure to call to create a new image
+ * of this type. */
+ Tk_ImageGetProc *getProc; /* Procedure to call the first time
+ * Tk_GetImage is called in a new way
+ * (new visual or screen). */
+ Tk_ImageDisplayProc *displayProc;
+ /* Call to draw image, in response to
+ * Tk_RedrawImage calls. */
+ Tk_ImageFreeProc *freeProc; /* Procedure to call whenever Tk_FreeImage
+ * is called to release an instance of an
+ * image. */
+ Tk_ImageDeleteProc *deleteProc;
+ /* Procedure to call to delete image. It
+ * will not be called until after freeProc
+ * has been called for each instance of the
+ * image. */
+ Tk_ImagePostscriptProc *postscriptProc;
+ /* Procedure to call to produce postscript
+ * output for the image. */
+ struct Tk_ImageType *nextPtr;
+ /* Next in list of all image types currently
+ * known. Filled in by Tk, not by image
+ * manager. */
+ char *reserved; /* reserved for future expansion */
+};
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Additional definitions used to manage images of type "photo".
+ *
+ *--------------------------------------------------------------
+ */
+
+/*
+ * The following type is used to identify a particular photo image
+ * to be manipulated:
+ */
+
+typedef void *Tk_PhotoHandle;
+
+/*
+ * The following structure describes a block of pixels in memory:
+ */
+
+typedef struct Tk_PhotoImageBlock {
+ unsigned char *pixelPtr; /* Pointer to the first pixel. */
+ int width; /* Width of block, in pixels. */
+ int height; /* Height of block, in pixels. */
+ int pitch; /* Address difference between corresponding
+ * pixels in successive lines. */
+ int pixelSize; /* Address difference between successive
+ * pixels in the same line. */
+ int offset[4]; /* Address differences between the red, green
+ * and blue components of the pixel and the
+ * pixel as a whole. */
+ int reserved; /* Reserved for extensions (dash patch) */
+} Tk_PhotoImageBlock;
+
+/*
+ * The following values control how blocks are combined into photo
+ * images when the alpha component of a pixel is not 255, a.k.a. the
+ * compositing rule.
+ */
+
+#define TK_PHOTO_COMPOSITE_OVERLAY 0
+#define TK_PHOTO_COMPOSITE_SET 1
+
+/*
+ * Procedure prototypes and structures used in reading and
+ * writing photo images:
+ */
+
+typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;
+#ifdef USE_OLD_IMAGE
+typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,
+ char *fileName, char *formatString, int *widthPtr, int *heightPtr));
+typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string,
+ char *formatString, int *widthPtr, int *heightPtr));
+typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Channel chan, char *fileName, char *formatString,
+ Tk_PhotoHandle imageHandle, int destX, int destY,
+ int width, int height, int srcX, int srcY));
+typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ char *string, char *formatString, Tk_PhotoHandle imageHandle,
+ int destX, int destY, int width, int height, int srcX, int srcY));
+typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr));
+typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_DString *dataPtr, char *formatString,
+ Tk_PhotoImageBlock *blockPtr));
+#else
+typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,
+ Tcl_Obj *fileName, Tcl_Obj *format, int *widthPtr,
+ int *heightPtr,Tcl_Interp *interp));
+typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Obj *dataObj,
+ Tcl_Obj *format, int *widthPtr, int *heightPt, Tcl_Interp *interp));
+typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Channel chan, Tcl_Obj *fileName, Tcl_Obj *format,
+ Tk_PhotoHandle imageHandle, int destX, int destY,
+ int width, int height, int srcX, int srcY));
+typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *dataObj, Tcl_Obj *format, Tk_PhotoHandle imageHandle,
+ int destX, int destY, int width, int height, int srcX, int srcY));
+typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
+typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));
+#endif
+
+/*
+ * The following structure represents a particular file format for
+ * storing images (e.g., PPM, GIF, JPEG, etc.). It provides information
+ * to allow image files of that format to be recognized and read into
+ * a photo image.
+ */
+
+struct Tk_PhotoImageFormat {
+ char *name; /* Name of image file format */
+ Tk_ImageFileMatchProc *fileMatchProc;
+ /* Procedure to call to determine whether
+ * an image file matches this format. */
+ Tk_ImageStringMatchProc *stringMatchProc;
+ /* Procedure to call to determine whether
+ * the data in a string matches this format. */
+ Tk_ImageFileReadProc *fileReadProc;
+ /* Procedure to call to read data from
+ * an image file into a photo image. */
+ Tk_ImageStringReadProc *stringReadProc;
+ /* Procedure to call to read data from
+ * a string into a photo image. */
+ Tk_ImageFileWriteProc *fileWriteProc;
+ /* Procedure to call to write data from
+ * a photo image to a file. */
+ Tk_ImageStringWriteProc *stringWriteProc;
+ /* Procedure to call to obtain a string
+ * representation of the data in a photo
+ * image.*/
+ struct Tk_PhotoImageFormat *nextPtr;
+ /* Next in list of all photo image formats
+ * currently known. Filled in by Tk, not
+ * by image format handler. */
+};
+
+EXTERN void Tk_CreateOldImageType _ANSI_ARGS_((
+ Tk_ImageType *typePtr));
+EXTERN void Tk_CreateOldPhotoImageFormat _ANSI_ARGS_((
+ Tk_PhotoImageFormat *formatPtr));
+
+#if !defined(USE_TK_STUBS) && defined(USE_OLD_IMAGE)
+#define Tk_CreateImageType Tk_CreateOldImageType
+#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat
+#endif
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Procedure prototypes and structures used for managing styles:
+ *
+ *--------------------------------------------------------------
+ */
+
+/*
+ * Style support version tag.
+ */
+#define TK_STYLE_VERSION_1 0x1
+#define TK_STYLE_VERSION TK_STYLE_VERSION_1
+
+/*
+ * The following structures and prototypes are used as static templates to
+ * declare widget elements.
+ */
+
+typedef void (Tk_GetElementSizeProc) _ANSI_ARGS_((ClientData clientData,
+ char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin,
+ int width, int height, int inner, int *widthPtr, int *heightPtr));
+typedef void (Tk_GetElementBoxProc) _ANSI_ARGS_((ClientData clientData,
+ char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin,
+ int x, int y, int width, int height, int inner, int *xPtr, int *yPtr,
+ int *widthPtr, int *heightPtr));
+typedef int (Tk_GetElementBorderWidthProc) _ANSI_ARGS_((ClientData clientData,
+ char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin));
+typedef void (Tk_DrawElementProc) _ANSI_ARGS_((ClientData clientData,
+ char *recordPtr, CONST Tk_OptionSpec **optionsPtr, Tk_Window tkwin,
+ Drawable d, int x, int y, int width, int height, int state));
+
+typedef struct Tk_ElementOptionSpec {
+ char *name; /* Name of the required option. */
+ Tk_OptionType type; /* Accepted option type. TK_OPTION_END means
+ * any. */
+} Tk_ElementOptionSpec;
+
+typedef struct Tk_ElementSpec {
+ int version; /* Version of the style support. */
+ char *name; /* Name of element. */
+ Tk_ElementOptionSpec *options;
+ /* List of required options. Last one's name
+ * must be NULL. */
+
+ /*
+ * Hooks
+ */
+
+ Tk_GetElementSizeProc *getSize;
+ /* Compute the external (resp. internal) size of
+ * the element from its desired internal (resp.
+ * external) size. */
+ Tk_GetElementBoxProc *getBox;
+ /* Compute the inscribed or bounding boxes
+ * within a given area. */
+ Tk_GetElementBorderWidthProc *getBorderWidth;
+ /* Return the element's internal border width.
+ * Mostly useful for widgets. */
+ Tk_DrawElementProc *draw; /* Draw the element in the given bounding box.*/
+} Tk_ElementSpec;
+
+/*
+ * Element state flags. Can be OR'ed.
+ */
+
+#define TK_ELEMENT_STATE_ACTIVE 1<<0
+#define TK_ELEMENT_STATE_DISABLED 1<<1
+#define TK_ELEMENT_STATE_FOCUS 1<<2
+#define TK_ELEMENT_STATE_PRESSED 1<<3
+
+/*
+ *--------------------------------------------------------------
+ *
+ * The definitions below provide backward compatibility for
+ * functions and types related to event handling that used to
+ * be in Tk but have moved to Tcl.
+ *
+ *--------------------------------------------------------------
+ */
+
+#if 0
+
+#define TK_READABLE TCL_READABLE
+#define TK_WRITABLE TCL_WRITABLE
+#define TK_EXCEPTION TCL_EXCEPTION
+
+#define TK_DONT_WAIT TCL_DONT_WAIT
+#define TK_X_EVENTS TCL_WINDOW_EVENTS
+#define TK_WINDOW_EVENTS TCL_WINDOW_EVENTS
+#define TK_FILE_EVENTS TCL_FILE_EVENTS
+#define TK_TIMER_EVENTS TCL_TIMER_EVENTS
+#define TK_IDLE_EVENTS TCL_IDLE_EVENTS
+#define TK_ALL_EVENTS TCL_ALL_EVENTS
+
+#define Tk_IdleProc Tcl_IdleProc
+#define Tk_FileProc Tcl_FileProc
+#define Tk_TimerProc Tcl_TimerProc
+#define Tk_TimerToken Tcl_TimerToken
+
+#define Tk_BackgroundError Tcl_BackgroundError
+#define Tk_CancelIdleCall Tcl_CancelIdleCall
+#define Tk_CreateFileHandler Tcl_CreateFileHandler
+#define Tk_CreateTimerHandler Tcl_CreateTimerHandler
+#define Tk_DeleteFileHandler Tcl_DeleteFileHandler
+#define Tk_DeleteTimerHandler Tcl_DeleteTimerHandler
+#define Tk_DoOneEvent Tcl_DoOneEvent
+#define Tk_DoWhenIdle Tcl_DoWhenIdle
+#define Tk_Sleep Tcl_Sleep
+
+/* Additional stuff that has moved to Tcl: */
+
+#define Tk_EventuallyFree Tcl_EventuallyFree
+#define Tk_FreeProc Tcl_FreeProc
+#define Tk_Preserve Tcl_Preserve
+#define Tk_Release Tcl_Release
+#define Tk_FileeventCmd Tcl_FileEventCmd
+
+#endif
+
+
+/* Removed Tk_Main, use macro instead */
+#define Tk_Main(argc, argv, proc) \
+ Tk_MainEx(argc, argv, proc, Tcl_CreateInterp())
+
+extern CONST char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact));
+
+#ifndef USE_TK_STUBS
+
+#define Tk_InitStubs(interp, version, exact) \
+ Tcl_PkgRequire(interp, "Tk", version, exact)
+
+#endif
+
+extern void Tk_InitImageArgs _ANSI_ARGS_((Tcl_Interp *interp, int argc, char ***objv));
+
+#if !defined(USE_TK_STUBS) || !defined(USE_OLD_IMAGE)
+
+#define Tk_InitImageArgs(interp, argc, argv) /**/
+
+#endif
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Additional procedure types defined by Tk.
+ *
+ *--------------------------------------------------------------
+ */
+
+#define TK_EVENTTYPE_NONE 0
+#define TK_EVENTTYPE_STRING 1
+#define TK_EVENTTYPE_NUMBER 2
+#define TK_EVENTTYPE_WINDOW 3
+#define TK_EVENTTYPE_ATOM 4
+#define TK_EVENTTYPE_DISPLAY 5
+#define TK_EVENTTYPE_DATA 6
+
+typedef int (Tk_ErrorProc) _ANSI_ARGS_((ClientData clientData,
+ XErrorEvent *errEventPtr));
+typedef void (Tk_EventProc) _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+typedef int (Tk_GenericProc) _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+typedef int (Tk_ClientMessageProc) _ANSI_ARGS_((Tk_Window tkwin,
+ XEvent *eventPtr));
+typedef int (Tk_GetSelProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, char *portion));
+typedef int (Tk_GetXSelProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, long *portion, int numValues,
+ int format, Atom type, Tk_Window tkwin));
+typedef void (Tk_LostSelProc) _ANSI_ARGS_((ClientData clientData));
+typedef Tk_RestrictAction (Tk_RestrictProc) _ANSI_ARGS_((
+ ClientData clientData, XEvent *eventPtr));
+typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData,
+ int offset, char *buffer, int maxBytes));
+
+typedef int (Tk_XSelectionProc) _ANSI_ARGS_((ClientData clientData,
+ int offset, long *buffer, int maxBytes,
+ Atom type, Tk_Window tkwin));
+
+
+typedef struct {
+ char *name; /* Name of command. */
+ int (*cmdProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp,
+ int argc, Tcl_Obj *CONST *objv));
+ /* Command procedure. */
+} Tk_Cmd;
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Platform independant exported procedures and variables.
+ *
+ *--------------------------------------------------------------
+ */
+
+#include "tkDecls.h"
+
+/*
+ * Allow users to say that they don't want to alter their source to
+ * add the extra argument to Tk_PhotoPutBlock(); DO NOT DEFINE THIS
+ * WHEN BUILDING TK.
+ *
+ * This goes after the inclusion of the stubbed-decls so that the
+ * declarations of what is actually there can be correct.
+ */
+
+#ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK
+# ifdef Tk_PhotoPutBlock
+# undef Tk_PhotoPutBlock
+# endif
+# define Tk_PhotoPutBlock Tk_PhotoPutBlock_NoComposite
+# ifdef Tk_PhotoPutZoomedBlock
+# undef Tk_PhotoPutZoomedBlock
+# endif
+# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_NoComposite
+#endif /* USE_COMPOSITELESS_PHOTO_PUT_BLOCK */
+
+/*
+ * Tcl commands exported by Tk:
+ */
+
+EXTERN Tcl_Command Lang_CreateWidget _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window, Tcl_ObjCmdProc *proc,
+ ClientData clientData,
+ Tcl_CmdDeleteProc *deleteProc));
+
+EXTERN Tcl_Command Lang_CreateImage _ANSI_ARGS_((Tcl_Interp *interp,
+ char *cmdName, Tcl_ObjCmdProc *proc,
+ ClientData clientData,
+ Tcl_CmdDeleteProc *deleteProc,
+ Tk_ImageType *typePtr));
+
+EXTERN void Lang_DeleteWidget _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Command cmd));
+
+EXTERN void Tk_ChangeScreen _ANSI_ARGS_((Tcl_Interp *interp,
+ char *dispName, int screenIndex));
+
+EXTERN Var LangFindVar _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window, CONST char *name));
+
+EXTERN Tcl_Obj * LangWidgetObj _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window));
+EXTERN Tcl_Obj * LangFontObj _ANSI_ARGS_((Tcl_Interp *interp, Tk_Font font, char *name));
+EXTERN Tcl_Obj * LangObjectObj _ANSI_ARGS_((Tcl_Interp *interp, char *));
+
+#define LangWidgetArg(interp,win) LangObjArg(LangWidgetObj(interp,win),__FILE__,__LINE__)
+#define LangFontArg(interp,font,name) LangObjArg(LangFontObj(interp,font,name),__FILE__,__LINE__)
+#define LangObjectArg(interp,name) LangObjArg(LangObjectObj(interp,name),__FILE__,__LINE__)
+
+
+#ifndef NO_EXTERN
+EXTERN void Lang_DeadMainWindow _ANSI_ARGS_((Tcl_Interp *, Tk_Window));
+EXTERN void Lang_NewMainWindow _ANSI_ARGS_((Tcl_Interp *, Tk_Window));
+EXTERN void LangDeadWindow _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window));
+EXTERN void LangClientMessage _ANSI_ARGS_((Tcl_Interp *interp,Tk_Window, XEvent *));
+EXTERN void LangSelectHook _ANSI_ARGS_((CONST char *what, Tk_Window tkwin,
+ Atom selection, Atom target, Atom type));
+#endif
+
+EXTERN int LangEventCallback _ANSI_ARGS_((ClientData, Tcl_Interp *,XEvent *,Tk_Window,KeySym));
+EXTERN int Tk_GetXSelection _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, Atom selection, Atom target,
+ Tk_GetXSelProc *proc, ClientData clientData));
+EXTERN Tk_Window Tk_EventWindow _ANSI_ARGS_((XEvent *eventPtr));
+EXTERN char * Tk_EventInfo _ANSI_ARGS_((int letter, Tk_Window tkwin, XEvent *eventPtr,
+ KeySym keySym, int *numPtr, int *isNum, int *type,
+ int num_size, char *numStorage));
+
+extern void LangCheckDC _ANSI_ARGS_((const char *file, int line));
+
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* RC_INVOKED */
+
+/*
+ * end block for C++
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TK */
+
+
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tk.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tk.m
new file mode 100644
index 00000000000..202863eeef7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tk.m
@@ -0,0 +1,94 @@
+#ifndef _TK_VM
+#define _TK_VM
+#include "tk_f.h"
+#ifndef NO_VTABLES
+#ifndef LangCheckDC
+# define LangCheckDC (*TkVptr->V_LangCheckDC)
+#endif
+
+#ifndef LangEventCallback
+# define LangEventCallback (*TkVptr->V_LangEventCallback)
+#endif
+
+#ifndef LangFindVar
+# define LangFindVar (*TkVptr->V_LangFindVar)
+#endif
+
+#ifndef LangFontObj
+# define LangFontObj (*TkVptr->V_LangFontObj)
+#endif
+
+#ifndef LangObjectObj
+# define LangObjectObj (*TkVptr->V_LangObjectObj)
+#endif
+
+#ifndef LangSelectHook
+# define LangSelectHook (*TkVptr->V_LangSelectHook)
+#endif
+
+#ifndef LangWidgetObj
+# define LangWidgetObj (*TkVptr->V_LangWidgetObj)
+#endif
+
+#ifndef Lang_CreateImage
+# define Lang_CreateImage (*TkVptr->V_Lang_CreateImage)
+#endif
+
+#ifndef Lang_CreateWidget
+# define Lang_CreateWidget (*TkVptr->V_Lang_CreateWidget)
+#endif
+
+#ifndef Lang_DeleteWidget
+# define Lang_DeleteWidget (*TkVptr->V_Lang_DeleteWidget)
+#endif
+
+#ifndef Tk_ChangeScreen
+# define Tk_ChangeScreen (*TkVptr->V_Tk_ChangeScreen)
+#endif
+
+#ifndef Tk_CreateOldImageType
+# define Tk_CreateOldImageType (*TkVptr->V_Tk_CreateOldImageType)
+#endif
+
+#ifndef Tk_EventInfo
+# define Tk_EventInfo (*TkVptr->V_Tk_EventInfo)
+#endif
+
+#ifndef Tk_EventWindow
+# define Tk_EventWindow (*TkVptr->V_Tk_EventWindow)
+#endif
+
+#ifndef Tk_FreeTile
+# define Tk_FreeTile (*TkVptr->V_Tk_FreeTile)
+#endif
+
+#ifndef Tk_GetTile
+# define Tk_GetTile (*TkVptr->V_Tk_GetTile)
+#endif
+
+#ifndef Tk_GetXSelection
+# define Tk_GetXSelection (*TkVptr->V_Tk_GetXSelection)
+#endif
+
+#ifndef Tk_InitImageArgs
+# define Tk_InitImageArgs (*TkVptr->V_Tk_InitImageArgs)
+#endif
+
+#ifndef Tk_NameOfTile
+# define Tk_NameOfTile (*TkVptr->V_Tk_NameOfTile)
+#endif
+
+#ifndef Tk_PixmapOfTile
+# define Tk_PixmapOfTile (*TkVptr->V_Tk_PixmapOfTile)
+#endif
+
+#ifndef Tk_SetTileChangedProc
+# define Tk_SetTileChangedProc (*TkVptr->V_Tk_SetTileChangedProc)
+#endif
+
+#ifndef Tk_SizeOfTile
+# define Tk_SizeOfTile (*TkVptr->V_Tk_SizeOfTile)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TK_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tk.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tk.t
new file mode 100644
index 00000000000..18c40ef81c5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tk.t
@@ -0,0 +1,151 @@
+#ifdef _TK
+#ifndef LangCheckDC
+#ifndef RC_INVOKED
+VFUNC(void,LangCheckDC,V_LangCheckDC,_ANSI_ARGS_((const char *file, int line)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef LangCheckDC */
+
+#ifndef LangEventCallback
+#ifndef RC_INVOKED
+VFUNC(int,LangEventCallback,V_LangEventCallback,_ANSI_ARGS_((ClientData, Tcl_Interp *,XEvent *,Tk_Window,KeySym)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef LangEventCallback */
+
+#ifndef LangFindVar
+#ifndef RC_INVOKED
+VFUNC(Var,LangFindVar,V_LangFindVar,_ANSI_ARGS_((Tcl_Interp * interp, Tk_Window, CONST char *name)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef LangFindVar */
+
+#ifndef LangFontObj
+#ifndef RC_INVOKED
+VFUNC(Tcl_Obj *,LangFontObj,V_LangFontObj,_ANSI_ARGS_((Tcl_Interp *interp, Tk_Font font, char *name)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef LangFontObj */
+
+#ifndef LangObjectObj
+#ifndef RC_INVOKED
+VFUNC(Tcl_Obj *,LangObjectObj,V_LangObjectObj,_ANSI_ARGS_((Tcl_Interp *interp, char *)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef LangObjectObj */
+
+#ifndef LangSelectHook
+#ifndef NO_EXTERN
+VFUNC(void,LangSelectHook,V_LangSelectHook,_ANSI_ARGS_((CONST char *what, Tk_Window tkwin,
+ Atom selection, Atom target, Atom type)))
+#endif /* #ifndef NO_EXTERN */
+#endif /* #ifndef LangSelectHook */
+
+#ifndef LangWidgetObj
+#ifndef RC_INVOKED
+VFUNC(Tcl_Obj *,LangWidgetObj,V_LangWidgetObj,_ANSI_ARGS_((Tcl_Interp *interp, Tk_Window)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef LangWidgetObj */
+
+#ifndef Lang_CreateImage
+#ifndef RC_INVOKED
+VFUNC(Tcl_Command,Lang_CreateImage,V_Lang_CreateImage,_ANSI_ARGS_((Tcl_Interp *interp,
+ char *cmdName, Tcl_ObjCmdProc *proc,
+ ClientData clientData,
+ Tcl_CmdDeleteProc *deleteProc,
+ Tk_ImageType *typePtr)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Lang_CreateImage */
+
+#ifndef Lang_CreateWidget
+#ifndef RC_INVOKED
+VFUNC(Tcl_Command,Lang_CreateWidget,V_Lang_CreateWidget,_ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window, Tcl_ObjCmdProc *proc,
+ ClientData clientData,
+ Tcl_CmdDeleteProc *deleteProc)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Lang_CreateWidget */
+
+#ifndef Lang_DeleteWidget
+#ifndef RC_INVOKED
+VFUNC(void,Lang_DeleteWidget,V_Lang_DeleteWidget,_ANSI_ARGS_((Tcl_Interp *interp, Tcl_Command cmd)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Lang_DeleteWidget */
+
+#ifndef Tk_ChangeScreen
+#ifndef RC_INVOKED
+VFUNC(void,Tk_ChangeScreen,V_Tk_ChangeScreen,_ANSI_ARGS_((Tcl_Interp *interp,
+ char *dispName, int screenIndex)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_ChangeScreen */
+
+#ifndef Tk_CreateOldImageType
+#ifndef RC_INVOKED
+VFUNC(void,Tk_CreateOldImageType,V_Tk_CreateOldImageType,_ANSI_ARGS_((
+ Tk_ImageType *typePtr)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_CreateOldImageType */
+
+#ifndef Tk_EventInfo
+#ifndef RC_INVOKED
+VFUNC(char *,Tk_EventInfo,V_Tk_EventInfo,_ANSI_ARGS_((int letter, Tk_Window tkwin, XEvent *eventPtr,
+ KeySym keySym, int *numPtr, int *isNum, int *type,
+ int num_size, char *numStorage)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_EventInfo */
+
+#ifndef Tk_EventWindow
+#ifndef RC_INVOKED
+VFUNC(Tk_Window,Tk_EventWindow,V_Tk_EventWindow,_ANSI_ARGS_((XEvent *eventPtr)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_EventWindow */
+
+#ifndef Tk_FreeTile
+#ifndef RC_INVOKED
+VFUNC(void,Tk_FreeTile,V_Tk_FreeTile,_ANSI_ARGS_((Tk_Tile tile)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_FreeTile */
+
+#ifndef Tk_GetTile
+#ifndef RC_INVOKED
+VFUNC(Tk_Tile,Tk_GetTile,V_Tk_GetTile,_ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin,
+ CONST char *imageName)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_GetTile */
+
+#ifndef Tk_GetXSelection
+#ifndef RC_INVOKED
+VFUNC(int,Tk_GetXSelection,V_Tk_GetXSelection,_ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, Atom selection, Atom target,
+ Tk_GetXSelProc *proc, ClientData clientData)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_GetXSelection */
+
+#ifndef Tk_InitImageArgs
+#ifndef RC_INVOKED
+VFUNC(void,Tk_InitImageArgs,V_Tk_InitImageArgs,_ANSI_ARGS_((Tcl_Interp *interp, int argc, char ***objv)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_InitImageArgs */
+
+#ifndef Tk_NameOfTile
+#ifndef RC_INVOKED
+VFUNC(CONST char *,Tk_NameOfTile,V_Tk_NameOfTile,_ANSI_ARGS_((Tk_Tile tile)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_NameOfTile */
+
+#ifndef Tk_PixmapOfTile
+#ifndef RC_INVOKED
+VFUNC(Pixmap,Tk_PixmapOfTile,V_Tk_PixmapOfTile,_ANSI_ARGS_((Tk_Tile tile)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_PixmapOfTile */
+
+#ifndef Tk_SetTileChangedProc
+#ifndef RC_INVOKED
+VFUNC(void,Tk_SetTileChangedProc,V_Tk_SetTileChangedProc,_ANSI_ARGS_((Tk_Tile tile,
+ Tk_TileChangedProc * changeProc, ClientData clientData)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_SetTileChangedProc */
+
+#ifndef Tk_SizeOfTile
+#ifndef RC_INVOKED
+VFUNC(void,Tk_SizeOfTile,V_Tk_SizeOfTile,_ANSI_ARGS_((Tk_Tile tile, int *widthPtr,
+ int *heightPtr)))
+#endif /* #ifndef RC_INVOKED */
+#endif /* #ifndef Tk_SizeOfTile */
+
+#endif /* _TK */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tk3d.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tk3d.h
new file mode 100644
index 00000000000..f7b89114068
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tk3d.h
@@ -0,0 +1,102 @@
+/*
+ * tk3d.h --
+ *
+ * Declarations of types and functions shared by the 3d border
+ * module.
+ *
+ * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tk3d.h,v 1.5 1999/04/16 01:51:10 stanton Exp $
+ */
+
+#ifndef _TK3D
+#define _TK3D
+
+#include "tkInt.h"
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * One of the following data structures is allocated for each 3-D border
+ * currently in use. Structures of this type are indexed by
+ * borderTable, so that a single structure can be shared for several
+ * uses.
+ */
+
+typedef struct TkBorder {
+ Screen *screen; /* Screen on which the border will be used. */
+ Visual *visual; /* Visual for all windows and pixmaps using
+ * the border. */
+ int depth; /* Number of bits per pixel of drawables where
+ * the border will be used. */
+ Colormap colormap; /* Colormap out of which pixels are
+ * allocated. */
+ int resourceRefCount; /* Number of active uses of this color (each
+ * active use corresponds to a call to
+ * Tk_Alloc3DBorderFromObj or Tk_Get3DBorder).
+ * If this count is 0, then this structure
+ * is no longer valid and it isn't present
+ * in borderTable: it is being kept around
+ * only because there are objects referring
+ * to it. The structure is freed when
+ * resourceRefCount and objRefCount are
+ * both 0. */
+ int objRefCount; /* The number of Tcl objects that reference
+ * this structure. */
+ XColor *bgColorPtr; /* Background color (intensity
+ * between lightColorPtr and
+ * darkColorPtr). */
+ XColor *darkColorPtr; /* Color for darker areas (must free when
+ * deleting structure). NULL means shadows
+ * haven't been allocated yet.*/
+ XColor *lightColorPtr; /* Color used for lighter areas of border
+ * (must free this when deleting structure).
+ * NULL means shadows haven't been allocated
+ * yet. */
+ Pixmap shadow; /* Stipple pattern to use for drawing
+ * shadows areas. Used for displays with
+ * <= 64 colors or where colormap has filled
+ * up. */
+ GC bgGC; /* Used (if necessary) to draw areas in
+ * the background color. */
+ GC darkGC; /* Used to draw darker parts of the
+ * border. None means the shadow colors
+ * haven't been allocated yet.*/
+ GC lightGC; /* Used to draw lighter parts of
+ * the border. None means the shadow colors
+ * haven't been allocated yet. */
+ Tcl_HashEntry *hashPtr; /* Entry in borderTable (needed in
+ * order to delete structure). */
+ struct TkBorder *nextPtr; /* Points to the next TkBorder structure with
+ * the same color name. Borders with the
+ * same name but different screens or
+ * colormaps are chained together off a
+ * single entry in borderTable. */
+} TkBorder;
+
+
+/*
+ * Maximum intensity for a color:
+ */
+
+#define MAX_INTENSITY 65535
+
+/*
+ * Declarations for platform specific interfaces used by this module.
+ */
+
+EXTERN TkBorder * TkpGetBorder _ANSI_ARGS_((void));
+EXTERN void TkpGetShadows _ANSI_ARGS_((TkBorder *borderPtr,
+ Tk_Window tkwin));
+EXTERN void TkpFreeBorder _ANSI_ARGS_((TkBorder *borderPtr));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TK3D */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkButton.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkButton.h
new file mode 100644
index 00000000000..e75742e6beb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkButton.h
@@ -0,0 +1,320 @@
+/*
+ * tkButton.h --
+ *
+ * Declarations of types and functions used to implement
+ * button-like widgets.
+ *
+ * Copyright (c) 1996-1998 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkButton.h,v 1.9.2.1 2003/04/26 02:53:46 hobbs Exp $
+ */
+
+#ifndef _TKBUTTON
+#define _TKBUTTON
+
+#ifndef _TKINT
+#include "tkInt.h"
+#endif
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Legal values for the "compound" field of TkButton records.
+ */
+
+enum compound {
+ COMPOUND_BOTTOM, COMPOUND_CENTER, COMPOUND_LEFT, COMPOUND_NONE,
+ COMPOUND_RIGHT, COMPOUND_TOP
+};
+
+/*
+ * Legal values for the "state" field of TkButton records.
+ */
+
+enum state {
+ STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
+};
+
+/*
+ * Legal values for the "defaultState" field of TkButton records.
+ */
+
+enum defaultState {
+ DEFAULT_ACTIVE, DEFAULT_DISABLED, DEFAULT_NORMAL
+};
+
+/*
+ * A data structure of the following type is kept for each
+ * widget managed by this file:
+ */
+
+typedef struct {
+ Tk_Window tkwin; /* Window that embodies the button. NULL
+ * means that the window has been destroyed. */
+ Display *display; /* Display containing widget. Needed to
+ * free up resources after tkwin is gone. */
+ Tcl_Interp *interp; /* Interpreter associated with button. */
+ Tcl_Command widgetCmd; /* Token for button's widget command. */
+ int type; /* Type of widget, such as TYPE_LABEL:
+ * restricts operations that may be performed
+ * on widget. See below for legal values. */
+ Tk_OptionTable optionTable; /* Table that defines configuration options
+ * available for this widget. */
+
+ /*
+ * Information about what's in the button.
+ */
+
+ Tcl_Obj *textPtr; /* Value of -text option: specifies text to
+ * display in button. */
+ int underline; /* Value of -underline option: specifies
+ * index of character to underline. < 0 means
+ * don't underline anything. */
+ Tcl_Obj *textVarNamePtr; /* Value of -textvariable option: specifies
+ * name of variable or NULL. If non-NULL,
+ * button displays the contents of this
+ * variable. */
+ Pixmap bitmap; /* Value of -bitmap option. If not None,
+ * specifies bitmap to display and text and
+ * textVar are ignored. */
+ Tcl_Obj *imagePtr; /* Value of -image option: specifies image
+ * to display in window, or NULL if none.
+ * If non-NULL, bitmap, text, and textVarName
+ * are ignored.*/
+ Tk_Image image; /* Derived from imagePtr by calling
+ * Tk_GetImage, or NULL if imagePtr is NULL. */
+ Tcl_Obj *selectImagePtr; /* Value of -selectimage option: specifies
+ * image to display in window when selected,
+ * or NULL if none. Ignored if imagePtr is
+ * NULL. */
+ Tk_Image selectImage; /* Derived from selectImagePtr by calling
+ * Tk_GetImage, or NULL if selectImagePtr
+ * is NULL. */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ enum state state; /* Value of -state option: specifies
+ * state of button for display purposes.*/
+ Tk_3DBorder normalBorder; /* Value of -background option: specifies
+ * color for background (and border) when
+ * window isn't active. */
+ Tk_3DBorder activeBorder; /* Value of -activebackground option:
+ * this is the color used to draw 3-D border
+ * and background when widget is active. */
+ Tcl_Obj *borderWidthPtr; /* Value of -borderWidth option: specifies
+ * width of border in pixels. */
+ int borderWidth; /* Integer value corresponding to
+ * borderWidthPtr. Always >= 0. */
+ int relief; /* Value of -relief option: specifies 3-d
+ * effect for border, such as
+ * TK_RELIEF_RAISED. */
+ int overRelief; /* Value of -overrelief option: specifies a 3-d
+ * effect for the border, such as
+ * TK_RELIEF_RAISED, to be used when the mouse
+ * is over the button. */
+ int offRelief; /* Value of -offrelief option: specifies a 3-d
+ * effect for the border, such as
+ * TK_RELIEF_RAISED, to be used when a
+ * checkbutton or radiobutton without
+ * indicator is off */
+ Tcl_Obj *highlightWidthPtr; /* Value of -highlightthickness option:
+ * specifies width in pixels of highlight to
+ * draw around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ int highlightWidth; /* Integer value corresponding to
+ * highlightWidthPtr. Always >= 0. */
+ Tk_3DBorder highlightBorder;/* Value of -highlightbackground option:
+ * specifies background with which to draw 3-D
+ * default ring and focus highlight area when
+ * highlight is off. */
+ XColor *highlightColorPtr; /* Value of -highlightcolor option:
+ * specifies color for drawing traversal
+ * highlight. */
+ int inset; /* Total width of all borders, including
+ * traversal highlight and 3-D border.
+ * Indicates how much interior stuff must
+ * be offset from outside edges to leave
+ * room for borders. */
+ Tk_Font tkfont; /* Value of -font option: specifies font
+ * to use for display text. */
+ XColor *normalFg; /* Value of -font option: specifies foreground
+ * color in normal mode. */
+ XColor *activeFg; /* Value of -activeforeground option:
+ * foreground color in active mode. NULL
+ * means use -foreground instead. */
+ XColor *disabledFg; /* Value of -disabledforeground option:
+ * foreground color when disabled. NULL
+ * means use normalFg with a 50% stipple
+ * instead. */
+ GC normalTextGC; /* GC for drawing text in normal mode. Also
+ * used to copy from off-screen pixmap onto
+ * screen. */
+ GC activeTextGC; /* GC for drawing text in active mode (NULL
+ * means use normalTextGC). */
+ GC disabledGC; /* Used to produce disabled effect for text
+ * and check/radio marks. */
+ GC stippleGC; /* Used to produce disabled stipple effect
+ * for images when disabled. */
+ Pixmap gray; /* Pixmap for displaying disabled text if
+ * disabledFg is NULL. */
+ GC copyGC; /* Used for copying information from an
+ * off-screen pixmap to the screen. */
+ Tcl_Obj *widthPtr; /* Value of -width option. */
+ int width; /* Integer value corresponding to widthPtr. */
+ Tcl_Obj *heightPtr; /* Value of -height option. */
+ int height; /* Integer value corresponding to heightPtr. */
+ Tcl_Obj *wrapLengthPtr; /* Value of -wraplength option: specifies
+ * line length (in pixels) at which to wrap
+ * onto next line. <= 0 means don't wrap
+ * except at newlines. */
+ int wrapLength; /* Integer value corresponding to
+ * wrapLengthPtr. */
+ Tcl_Obj *padXPtr; /* Value of -padx option: specifies how many
+ * pixels of extra space to leave on left and
+ * right of text. Ignored for bitmaps and
+ * images. */
+ int padX; /* Integer value corresponding to padXPtr. */
+ Tcl_Obj *padYPtr; /* Value of -padx option: specifies how many
+ * pixels of extra space to leave above and
+ * below text. Ignored for bitmaps and
+ * images. */
+ int padY; /* Integer value corresponding to padYPtr. */
+ Tk_Anchor anchor; /* Value of -anchor option: specifies where
+ * text/bitmap should be displayed inside
+ * button region. */
+ Tk_Justify justify; /* Value of -justify option: specifies how
+ * to align lines of multi-line text. */
+ int indicatorOn; /* Value of -indicatoron option: 1 means
+ * draw indicator in checkbuttons and
+ * radiobuttons, 0 means don't draw it. */
+ Tk_3DBorder selectBorder; /* Value of -selectcolor option: specifies
+ * color for drawing indicator background, or
+ * perhaps widget background, when selected. */
+ int textWidth; /* Width needed to display text as requested,
+ * in pixels. */
+ int textHeight; /* Height needed to display text as requested,
+ * in pixels. */
+ Tk_TextLayout textLayout; /* Saved text layout information. */
+ int indicatorSpace; /* Horizontal space (in pixels) allocated for
+ * display of indicator. */
+ int indicatorDiameter; /* Diameter of indicator, in pixels. */
+ enum defaultState defaultState;
+ /* Value of -default option, such as
+ * DEFAULT_NORMAL: specifies state
+ * of default ring for buttons (normal,
+ * active, or disabled). NULL for other
+ * classes. */
+
+ /*
+ * For check and radio buttons, the fields below are used
+ * to manage the variable indicating the button's state.
+ */
+
+ Tcl_Obj *selVarNamePtr; /* Value of -variable option: specifies name
+ * of variable used to control selected
+ * state of button. */
+ Tcl_Obj *onValuePtr; /* Value of -offvalue option: specifies value
+ * to store in variable when this button is
+ * selected. */
+ Tcl_Obj *offValuePtr; /* Value of -offvalue option: specifies value
+ * to store in variable when this button
+ * isn't selected. Used only by
+ * checkbuttons. */
+
+ /*
+ * Miscellaneous information:
+ */
+
+ Tk_Cursor cursor; /* Value of -cursor option: if not None,
+ * specifies current cursor for window. */
+ Tcl_Obj *takeFocusPtr; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. */
+ Tcl_Obj *commandPtr; /* Value of -command option: specifies script
+ * to execute when button is invoked. If
+ * widget is label or has no command, this
+ * is NULL. */
+ int compound; /* Value of -compound option; specifies whether
+ * the button should show both an image and
+ * text, and, if so, how. */
+ int repeatDelay; /* Value of -repeatdelay option; specifies
+ * the number of ms after which the button will
+ * start to auto-repeat its command. */
+ int repeatInterval; /* Value of -repeatinterval option; specifies
+ * the number of ms between auto-repeat
+ * invocataions of the button command. */
+ int flags; /* Various flags; see below for
+ * definitions. */
+} TkButton;
+
+/*
+ * Possible "type" values for buttons. These are the kinds of
+ * widgets supported by this file. The ordering of the type
+ * numbers is significant: greater means more features and is
+ * used in the code.
+ */
+
+#define TYPE_LABEL 0
+#define TYPE_BUTTON 1
+#define TYPE_CHECK_BUTTON 2
+#define TYPE_RADIO_BUTTON 3
+
+/*
+ * Flag bits for buttons:
+ *
+ * REDRAW_PENDING: Non-zero means a DoWhenIdle handler
+ * has already been queued to redraw
+ * this window.
+ * SELECTED: Non-zero means this button is selected,
+ * so special highlight should be drawn.
+ * GOT_FOCUS: Non-zero means this button currently
+ * has the input focus.
+ * BUTTON_DELETED: Non-zero needs that this button has been
+ * deleted, or is in the process of being
+ * deleted.
+ */
+
+#define REDRAW_PENDING (1 << 0)
+#define SELECTED (1 << 1)
+#define GOT_FOCUS (1 << 2)
+#define BUTTON_DELETED (1 << 3)
+/*
+ * Declaration of variables shared between the files in the button module.
+ */
+
+extern Tk_ClassProcs tkpButtonProcs;
+
+/*
+ * Declaration of procedures used in the implementation of the button
+ * widget.
+ */
+
+#ifndef TkpButtonSetDefaults
+EXTERN void TkpButtonSetDefaults _ANSI_ARGS_((
+ Tk_OptionSpec *specPtr));
+#endif
+EXTERN void TkButtonWorldChanged _ANSI_ARGS_((
+ ClientData instanceData));
+EXTERN void TkpComputeButtonGeometry _ANSI_ARGS_((
+ TkButton *butPtr));
+EXTERN TkButton * TkpCreateButton _ANSI_ARGS_((Tk_Window tkwin));
+#ifndef TkpDestroyButton
+EXTERN void TkpDestroyButton _ANSI_ARGS_((TkButton *butPtr));
+#endif
+#ifndef TkpDisplayButton
+EXTERN void TkpDisplayButton _ANSI_ARGS_((ClientData clientData));
+#endif
+EXTERN int TkInvokeButton _ANSI_ARGS_((TkButton *butPtr));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKBUTTON */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvas.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvas.h
new file mode 100644
index 00000000000..6b033bf63fc
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvas.h
@@ -0,0 +1,334 @@
+/*
+ * tkCanvas.h --
+ *
+ * Declarations shared among all the files that implement
+ * canvas widgets.
+ *
+ * Copyright (c) 1991-1994 The Regents of the University of California.
+ * Copyright (c) 1994-1995 Sun Microsystems, Inc.
+ * Copyright (c) 1998 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkCanvas.h,v 1.7 2003/01/08 23:02:33 drh Exp $
+ */
+
+#ifndef _TKCANVAS
+#define _TKCANVAS
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+#ifndef USE_OLD_TAG_SEARCH
+typedef struct TagSearchExpr_s TagSearchExpr;
+
+struct TagSearchExpr_s {
+ TagSearchExpr *next; /* for linked lists of expressions - used in bindings */
+ Tk_Uid uid; /* the uid of the whole expression */
+ Tk_Uid *uids; /* expresion compiled to an array of uids */
+ int allocated; /* available space for array of uids */
+ int length; /* length of expression */
+ int index; /* current position in expression evaluation */
+ int match; /* this expression matches event's item's tags*/
+};
+#endif /* not USE_OLD_TAG_SEARCH */
+
+/*
+ * The record below describes a canvas widget. It is made available
+ * to the item procedures so they can access certain shared fields such
+ * as the overall displacement and scale factor for the canvas.
+ */
+
+typedef struct TkCanvas {
+ Tk_Window tkwin; /* Window that embodies the canvas. NULL
+ * means that the window has been destroyed
+ * but the data structures haven't yet been
+ * cleaned up.*/
+ Display *display; /* Display containing widget; needed, among
+ * other things, to release resources after
+ * tkwin has already gone away. */
+ Tcl_Interp *interp; /* Interpreter associated with canvas. */
+ Tcl_Command widgetCmd; /* Token for canvas's widget command. */
+ Tk_Item *firstItemPtr; /* First in list of all items in canvas,
+ * or NULL if canvas empty. */
+ Tk_Item *lastItemPtr; /* Last in list of all items in canvas,
+ * or NULL if canvas empty. */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ int borderWidth; /* Width of 3-D border around window. */
+ Tk_3DBorder bgBorder; /* Used for canvas background. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ XColor *highlightBgColorPtr;
+ /* Color for drawing traversal highlight
+ * area when highlight is off. */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ int inset; /* Total width of all borders, including
+ * traversal highlight and 3-D border.
+ * Indicates how much interior stuff must
+ * be offset from outside edges to leave
+ * room for borders. */
+ GC pixmapGC; /* Used to copy bits from a pixmap to the
+ * screen and also to clear the pixmap. */
+ int width, height; /* Dimensions to request for canvas window,
+ * specified in pixels. */
+ int redrawX1, redrawY1; /* Upper left corner of area to redraw,
+ * in pixel coordinates. Border pixels
+ * are included. Only valid if
+ * REDRAW_PENDING flag is set. */
+ int redrawX2, redrawY2; /* Lower right corner of area to redraw,
+ * in integer canvas coordinates. Border
+ * pixels will *not* be redrawn. */
+ int confine; /* Non-zero means constrain view to keep
+ * as much of canvas visible as possible. */
+
+ /*
+ * Information used to manage the selection and insertion cursor:
+ */
+
+ Tk_CanvasTextInfo textInfo; /* Contains lots of fields; see tk.h for
+ * details. This structure is shared with
+ * the code that implements individual items. */
+ int insertOnTime; /* Number of milliseconds cursor should spend
+ * in "on" state for each blink. */
+ int insertOffTime; /* Number of milliseconds cursor should spend
+ * in "off" state for each blink. */
+ Tcl_TimerToken insertBlinkHandler;
+ /* Timer handler used to blink cursor on and
+ * off. */
+
+ /*
+ * Transformation applied to canvas as a whole: to compute screen
+ * coordinates (X,Y) from canvas coordinates (x,y), do the following:
+ *
+ * X = x - xOrigin;
+ * Y = y - yOrigin;
+ */
+
+ int xOrigin, yOrigin; /* Canvas coordinates corresponding to
+ * upper-left corner of window, given in
+ * canvas pixel units. */
+ int drawableXOrigin, drawableYOrigin;
+ /* During redisplay, these fields give the
+ * canvas coordinates corresponding to
+ * the upper-left corner of the drawable
+ * where items are actually being drawn
+ * (typically a pixmap smaller than the
+ * whole window). */
+
+ /*
+ * Information used for event bindings associated with items.
+ */
+
+ Tk_BindingTable bindingTable;
+ /* Table of all bindings currently defined
+ * for this canvas. NULL means that no
+ * bindings exist, so the table hasn't been
+ * created. Each "object" used for this
+ * table is either a Tk_Uid for a tag or
+ * the address of an item named by id. */
+ Tk_Item *currentItemPtr; /* The item currently containing the mouse
+ * pointer, or NULL if none. */
+ Tk_Item *newCurrentPtr; /* The item that is about to become the
+ * current one, or NULL. This field is
+ * used to detect deletions of the new
+ * current item pointer that occur during
+ * Leave processing of the previous current
+ * item. */
+ double closeEnough; /* The mouse is assumed to be inside an
+ * item if it is this close to it. */
+ XEvent pickEvent; /* The event upon which the current choice
+ * of currentItem is based. Must be saved
+ * so that if the currentItem is deleted,
+ * can pick another. */
+ int state; /* Last known modifier state. Used to
+ * defer picking a new current object
+ * while buttons are down. */
+
+ /*
+ * Information used for managing scrollbars:
+ */
+
+ LangCallback *xScrollCmd; /* Command prefix for communicating with
+ * horizontal scrollbar. NULL means no
+ * horizontal scrollbar. Malloc'ed*/
+ LangCallback *yScrollCmd; /* Command prefix for communicating with
+ * vertical scrollbar. NULL means no
+ * vertical scrollbar. Malloc'ed*/
+ int scrollX1, scrollY1, scrollX2, scrollY2;
+ /* These four coordinates define the region
+ * that is the 100% area for scrolling (i.e.
+ * these numbers determine the size and
+ * location of the sliders on scrollbars).
+ * Units are pixels in canvas coords. */
+ Tcl_Obj * regionArg; /* The option string from which scrollX1
+ * etc. are derived. Malloc'ed. */
+ int xScrollIncrement; /* If >0, defines a grid for horizontal
+ * scrolling. This is the size of the "unit",
+ * and the left edge of the screen will always
+ * lie on an even unit boundary. */
+ int yScrollIncrement; /* If >0, defines a grid for horizontal
+ * scrolling. This is the size of the "unit",
+ * and the left edge of the screen will always
+ * lie on an even unit boundary. */
+
+ /*
+ * Information used for scanning:
+ */
+
+ int scanX; /* X-position at which scan started (e.g.
+ * button was pressed here). */
+ int scanXOrigin; /* Value of xOrigin field when scan started. */
+ int scanY; /* Y-position at which scan started (e.g.
+ * button was pressed here). */
+ int scanYOrigin; /* Value of yOrigin field when scan started. */
+
+ /*
+ * Information used to speed up searches by remembering the last item
+ * created or found with an item id search.
+ */
+
+ Tk_Item *hotPtr; /* Pointer to "hot" item (one that's been
+ * recently used. NULL means there's no
+ * hot item. */
+ Tk_Item *hotPrevPtr; /* Pointer to predecessor to hotPtr (NULL
+ * means item is first in list). This is
+ * only a hint and may not really be hotPtr's
+ * predecessor. */
+
+ /*
+ * Miscellaneous information:
+ */
+
+ Tk_Cursor cursor; /* Current cursor for window, or None. */
+ char *takeFocus; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+ double pixelsPerMM; /* Scale factor between MM and pixels;
+ * used when converting coordinates. */
+ int flags; /* Various flags; see below for
+ * definitions. */
+ int nextId; /* Number to use as id for next item
+ * created in widget. */
+ Tk_PostscriptInfo psInfo;
+ /* Pointer to information used for generating
+ * Postscript for the canvas. NULL means
+ * no Postscript is currently being
+ * generated. */
+ Tcl_HashTable idTable; /* Table of integer indices. */
+ /*
+ * Additional information, added by the 'dash'-patch
+ */
+ Tk_State canvas_state; /* state of canvas */
+ Tk_Tile tile;
+ Tk_Tile disabledTile;
+ Tk_TSOffset tsoffset;
+#ifndef USE_OLD_TAG_SEARCH
+ TagSearchExpr *bindTagExprs; /* linked list of tag expressions used in bindings */
+#endif
+ /* pTk additions */
+ Tk_Item *activeGroup; /* Which group item is active */
+ Tcl_Obj *updateCmds;
+} TkCanvas;
+
+/*
+ * Flag bits for canvases:
+ *
+ * REDRAW_PENDING - 1 means a DoWhenIdle handler has already
+ * been created to redraw some or all of the
+ * canvas.
+ * REDRAW_BORDERS - 1 means that the borders need to be redrawn
+ * during the next redisplay operation.
+ * REPICK_NEEDED - 1 means DisplayCanvas should pick a new
+ * current item before redrawing the canvas.
+ * GOT_FOCUS - 1 means the focus is currently in this
+ * widget, so should draw the insertion cursor
+ * and traversal highlight.
+ * CURSOR_ON - 1 means the insertion cursor is in the "on"
+ * phase of its blink cycle. 0 means either
+ * we don't have the focus or the cursor is in
+ * the "off" phase of its cycle.
+ * UPDATE_SCROLLBARS - 1 means the scrollbars should get updated
+ * as part of the next display operation.
+ * LEFT_GRABBED_ITEM - 1 means that the mouse left the current
+ * item while a grab was in effect, so we
+ * didn't change canvasPtr->currentItemPtr.
+ * REPICK_IN_PROGRESS - 1 means PickCurrentItem is currently
+ * executing. If it should be called recursively,
+ * it should simply return immediately.
+ * BBOX_NOT_EMPTY - 1 means that the bounding box of the area
+ * that should be redrawn is not empty.
+ */
+
+#define REDRAW_PENDING 1
+#define REDRAW_BORDERS 2
+#define REPICK_NEEDED 4
+#define GOT_FOCUS 8
+#define CURSOR_ON 0x10
+#define UPDATE_SCROLLBARS 0x20
+#define LEFT_GRABBED_ITEM 0x40
+#define REPICK_IN_PROGRESS 0x100
+#define BBOX_NOT_EMPTY 0x200
+
+/*
+ * Flag bits for canvas items (redraw_flags):
+ *
+ * FORCE_REDRAW - 1 means that the new coordinates of some
+ * item are not yet registered using
+ * Tk_CanvasEventuallyRedraw(). It should still
+ * be done by the general canvas code.
+ */
+
+#define FORCE_REDRAW 8
+#define NEEDS_DISPLAY 16
+
+/*
+ * Canvas-related procedures that are shared among Tk modules but not
+ * exported to the outside world:
+ */
+
+extern int TkCanvPostscriptCmd _ANSI_ARGS_((TkCanvas *canvasPtr,
+ Tcl_Interp *interp, int argc, CONST84 Tcl_Obj *CONST *objv));
+
+/*
+ * Other procedures that are shared among Tk canvas modules but not exported
+ * to the outside world:
+ */
+extern int TkCanvTranslatePath _ANSI_ARGS_((TkCanvas *canvPtr,
+ int numVertex, double *coordPtr, int closed,
+ XPoint *outPtr));
+
+
+#define Tk_CanvasActiveGroup(canvas) ((TkCanvas *) (canvas))->activeGroup
+
+#define Tk_CanvasGroupHidden(canvas,itemPtr) ( \
+ ( Tk_CanvasActiveGroup(canvas) && \
+ (itemPtr)->group != Tk_CanvasActiveGroup(canvas)) || \
+ ( (itemPtr)->group && \
+ (itemPtr)->group != Tk_CanvasActiveGroup(canvas) && \
+ (itemPtr)->group->state != TK_STATE_ACTIVE ))
+
+#define Tk_GetItemState(canvas,itemPtr) \
+( \
+ (0 && Tk_CanvasGroupHidden(canvas,itemPtr)) \
+ ? TK_STATE_HIDDEN \
+ : (((itemPtr)->state == TK_STATE_NULL) \
+ ? ((TkCanvas *)(canvas))->canvas_state \
+ : (itemPtr)->state \
+ ) \
+)
+
+EXTERN void TkGroupRemoveItem _ANSI_ARGS_((Tk_Item *item));
+
+#endif /* _TKCANVAS */
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvases.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvases.h
new file mode 100644
index 00000000000..14d604e6591
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkCanvases.h
@@ -0,0 +1,81 @@
+#ifndef _TKCANVASES
+#define _TKCANVASES
+
+#ifndef _TKCANVAS
+#include "tkCanvas.h"
+#endif
+
+EXTERN Tk_CustomOption tk_CanvasTagsOption;
+
+
+EXTERN void Tk_CanvasDrawableCoords _ANSI_ARGS_((Tk_Canvas canvas,
+ double x, double y, short *drawableXPtr,
+ short *drawableYPtr));
+EXTERN void Tk_CanvasEventuallyRedraw _ANSI_ARGS_((
+ Tk_Canvas canvas, int x1, int y1, int x2,
+ int y2));
+EXTERN int Tk_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, CONST char *string,
+ double *doublePtr));
+EXTERN Tk_CanvasTextInfo *Tk_CanvasGetTextInfo _ANSI_ARGS_((Tk_Canvas canvas));
+EXTERN int Tk_CanvasPsBitmap _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Pixmap bitmap, int x, int y,
+ int width, int height));
+EXTERN int Tk_CanvasPsColor _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, XColor *colorPtr));
+EXTERN int Tk_CanvasPsFont _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tk_Font font));
+EXTERN void Tk_CanvasPsPath _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, double *coordPtr, int numPoints));
+EXTERN int Tk_CanvasPsStipple _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Pixmap bitmap));
+EXTERN double Tk_CanvasPsY _ANSI_ARGS_((Tk_Canvas canvas, double y));
+EXTERN void Tk_CanvasSetStippleOrigin _ANSI_ARGS_((
+ Tk_Canvas canvas, GC gc));
+EXTERN Tk_Window Tk_CanvasTkwin _ANSI_ARGS_((Tk_Canvas canvas));
+EXTERN void Tk_CanvasWindowCoords _ANSI_ARGS_((Tk_Canvas canvas,
+ double x, double y, short *screenXPtr,
+ short *screenYPtr));
+EXTERN void Tk_CreateItemType _ANSI_ARGS_((Tk_ItemType *typePtr));
+EXTERN Tk_ItemType * Tk_GetItemTypes _ANSI_ARGS_((void));
+
+/* These are from tkInt.h */
+
+extern void TkBezierPoints _ANSI_ARGS_((double control[],
+ int numSteps, double *coordPtr));
+extern void TkBezierScreenPoints _ANSI_ARGS_((Tk_Canvas canvas,
+ double control[], int numSteps,
+ XPoint *xPointPtr));
+extern void TkFillPolygon _ANSI_ARGS_((Tk_Canvas canvas,
+ double *coordPtr, int numPoints, Display *display,
+ Drawable drawable, GC gc, GC outlineGC));
+extern int TkMakeBezierCurve _ANSI_ARGS_((Tk_Canvas canvas,
+ double *pointPtr, int numPoints, int numSteps,
+ XPoint xPoints[], double dblPoints[]));
+extern void TkMakeBezierPostscript _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, double *pointPtr,
+ int numPoints));
+extern void TkIncludePoint _ANSI_ARGS_((Tk_Item *itemPtr,
+ double *pointPtr));
+extern void TkGetButtPoints _ANSI_ARGS_((double p1[], double p2[],
+ double width, int project, double m1[],
+ double m2[]));
+extern int TkGetMiterPoints _ANSI_ARGS_((double p1[], double p2[],
+ double p3[], double width, double m1[],
+ double m2[]));
+extern int TkLineToArea _ANSI_ARGS_((double end1Ptr[2],
+ double end2Ptr[2], double rectPtr[4]));
+extern double TkLineToPoint _ANSI_ARGS_((double end1Ptr[2],
+ double end2Ptr[2], double pointPtr[2]));
+extern int TkOvalToArea _ANSI_ARGS_((double *ovalPtr,
+ double *rectPtr));
+extern double TkOvalToPoint _ANSI_ARGS_((double ovalPtr[4],
+ double width, int filled, double pointPtr[2]));
+extern int TkPolygonToArea _ANSI_ARGS_((double *polyPtr,
+ int numPoints, double *rectPtr));
+extern double TkPolygonToPoint _ANSI_ARGS_((double *polyPtr,
+ int numPoints, double *pointPtr));
+
+#include "tkVMacro.h"
+#endif
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkColor.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkColor.h
new file mode 100644
index 00000000000..f24df7c8759
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkColor.h
@@ -0,0 +1,89 @@
+/*
+ * tkColor.h --
+ *
+ * Declarations of data types and functions used by the
+ * Tk color module.
+ *
+ * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkColor.h,v 1.6 1999/11/19 22:00:03 hobbs Exp $
+ */
+
+#ifndef _TKCOLOR
+#define _TKCOLOR
+
+#include "tkInt.h"
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * One of the following data structures is used to keep track of
+ * each color that is being used by the application; typically there
+ * is a colormap entry allocated for each of these colors.
+ */
+
+#define TK_COLOR_BY_NAME 1
+#define TK_COLOR_BY_VALUE 2
+
+#define COLOR_MAGIC ((unsigned int) 0x46140277)
+
+typedef struct TkColor {
+ XColor color; /* Information about this color. */
+ unsigned int magic; /* Used for quick integrity check on this
+ * structure. Must always have the
+ * value COLOR_MAGIC. */
+ GC gc; /* Simple gc with this color as foreground
+ * color and all other fields defaulted.
+ * May be None. */
+ Screen *screen; /* Screen where this color is valid. Used
+ * to delete it, and to find its display. */
+ Colormap colormap; /* Colormap from which this entry was
+ * allocated. */
+ Visual *visual; /* Visual associated with colormap. */
+ int resourceRefCount; /* Number of active uses of this color (each
+ * active use corresponds to a call to
+ * Tk_AllocColorFromObj or Tk_GetColor).
+ * If this count is 0, then this TkColor
+ * structure is no longer valid and it isn't
+ * present in a hash table: it is being
+ * kept around only because there are objects
+ * referring to it. The structure is freed
+ * when resourceRefCount and objRefCount
+ * are both 0. */
+ int objRefCount; /* The number of Tcl objects that reference
+ * this structure. */
+ int type; /* TK_COLOR_BY_NAME or TK_COLOR_BY_VALUE */
+ Tcl_HashEntry *hashPtr; /* Pointer to hash table entry for this
+ * structure. (for use in deleting entry). */
+ struct TkColor *nextPtr; /* Points to the next TkColor structure with
+ * the same color name. Colors with the
+ * same name but different screens or
+ * colormaps are chained together off a
+ * single entry in nameTable. For colors in
+ * valueTable (those allocated by
+ * Tk_GetColorByValue) this field is always
+ * NULL. */
+} TkColor;
+
+/*
+ * Common APIs exported from all platform-specific implementations.
+ */
+
+#ifndef TkpFreeColor
+EXTERN void TkpFreeColor _ANSI_ARGS_((TkColor *tkColPtr));
+#endif
+EXTERN TkColor * TkpGetColor _ANSI_ARGS_((Tk_Window tkwin,
+ Tk_Uid name));
+EXTERN TkColor * TkpGetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
+ XColor *colorPtr));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKCOLOR */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkConfig.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkConfig.h
new file mode 100644
index 00000000000..02cc8036e79
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkConfig.h
@@ -0,0 +1,12 @@
+#ifndef _TKCONFIG
+#define _TKCONFIG
+#define ANSI_SIGNED_CHAR 1
+#define HAS_STDARG 1
+#define HAVE_LIMITS_H 1
+#define LSEEK_TYPE long long
+#define SELECT_MASK Perl_fd_set
+#define USE_NEWSTYLE_REGEXP_STRUCT 1
+#define USE_PREGCOMP_31027 1
+#define USE_PROTOTYPE 1
+#define USE_REGEXP_511 1
+#endif
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.h
new file mode 100644
index 00000000000..ff6c2333573
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.h
@@ -0,0 +1,2277 @@
+/*
+ * tkDecls.h --
+ *
+ * Declarations of functions in the platform independent public Tcl API.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkDecls.h,v 1.23 2002/08/05 04:30:38 dgp Exp $
+ */
+
+#ifndef _TKDECLS
+#define _TKDECLS
+
+#ifdef BUILD_tk
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tk.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+/* 0 */
+EXTERN void Tk_MainLoop _ANSI_ARGS_((void));
+/* 1 */
+EXTERN XColor * Tk_3DBorderColor _ANSI_ARGS_((Tk_3DBorder border));
+/* 2 */
+EXTERN GC Tk_3DBorderGC _ANSI_ARGS_((Tk_Window tkwin,
+ Tk_3DBorder border, int which));
+/* 3 */
+EXTERN void Tk_3DHorizontalBevel _ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height, int leftIn,
+ int rightIn, int topBevel, int relief));
+/* 4 */
+EXTERN void Tk_3DVerticalBevel _ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height, int leftBevel,
+ int relief));
+/* 5 */
+EXTERN void Tk_AddOption _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name, CONST char * value,
+ int priority));
+/* 6 */
+EXTERN void Tk_BindEvent _ANSI_ARGS_((
+ Tk_BindingTable bindingTable,
+ XEvent * eventPtr, Tk_Window tkwin,
+ int numObjects, ClientData * objectPtr));
+/* 7 */
+EXTERN void Tk_CanvasDrawableCoords _ANSI_ARGS_((
+ Tk_Canvas canvas, double x, double y,
+ short * drawableXPtr, short * drawableYPtr));
+/* 8 */
+EXTERN void Tk_CanvasEventuallyRedraw _ANSI_ARGS_((
+ Tk_Canvas canvas, int x1, int y1, int x2,
+ int y2));
+/* 9 */
+EXTERN int Tk_CanvasGetCoord _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Canvas canvas, CONST char * str,
+ double * doublePtr));
+/* 10 */
+EXTERN Tk_CanvasTextInfo * Tk_CanvasGetTextInfo _ANSI_ARGS_((
+ Tk_Canvas canvas));
+/* 11 */
+EXTERN int Tk_CanvasPsBitmap _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Canvas canvas, Pixmap bitmap, int x,
+ int y, int width, int height));
+/* 12 */
+EXTERN int Tk_CanvasPsColor _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Canvas canvas, XColor * colorPtr));
+/* 13 */
+EXTERN int Tk_CanvasPsFont _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Canvas canvas, Tk_Font font));
+/* 14 */
+EXTERN void Tk_CanvasPsPath _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Canvas canvas, double * coordPtr,
+ int numPoints));
+/* 15 */
+EXTERN int Tk_CanvasPsStipple _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Canvas canvas, Pixmap bitmap));
+/* 16 */
+EXTERN double Tk_CanvasPsY _ANSI_ARGS_((Tk_Canvas canvas, double y));
+/* 17 */
+EXTERN void Tk_CanvasSetStippleOrigin _ANSI_ARGS_((
+ Tk_Canvas canvas, GC gc));
+/* 18 */
+EXTERN int Tk_CanvasTagsParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj *value,
+ char * widgRec, int offset));
+/* 19 */
+EXTERN Tcl_Obj * Tk_CanvasTagsPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char * widgRec, int offset,
+ Tcl_FreeProc ** freeProcPtr));
+/* 20 */
+EXTERN Tk_Window Tk_CanvasTkwin _ANSI_ARGS_((Tk_Canvas canvas));
+/* 21 */
+EXTERN void Tk_CanvasWindowCoords _ANSI_ARGS_((Tk_Canvas canvas,
+ double x, double y, short * screenXPtr,
+ short * screenYPtr));
+/* 22 */
+EXTERN void Tk_ChangeWindowAttributes _ANSI_ARGS_((
+ Tk_Window tkwin, unsigned long valueMask,
+ XSetWindowAttributes * attsPtr));
+/* 23 */
+EXTERN int Tk_CharBbox _ANSI_ARGS_((Tk_TextLayout layout,
+ int index, int * xPtr, int * yPtr,
+ int * widthPtr, int * heightPtr));
+/* 24 */
+EXTERN void Tk_ClearSelection _ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection));
+/* 25 */
+EXTERN int Tk_ClipboardAppend _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Atom target, Atom format,
+ char* buffer));
+/* 26 */
+EXTERN int Tk_ClipboardClear _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin));
+/* 27 */
+EXTERN int Tk_ConfigureInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec * specs,
+ char * widgRec, CONST char * argvName,
+ int flags));
+/* 28 */
+EXTERN int Tk_ConfigureValue _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec * specs,
+ char * widgRec, CONST char * argvName,
+ int flags));
+/* 29 */
+EXTERN int Tk_ConfigureWidget _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec * specs,
+ int argc, CONST84 Tcl_Obj *CONST *objv,
+ char * widgRec, int flags));
+/* 30 */
+EXTERN void Tk_ConfigureWindow _ANSI_ARGS_((Tk_Window tkwin,
+ unsigned int valueMask,
+ XWindowChanges * valuePtr));
+/* 31 */
+EXTERN Tk_TextLayout Tk_ComputeTextLayout _ANSI_ARGS_((Tk_Font font,
+ CONST char * str, int numChars,
+ int wrapLength, Tk_Justify justify,
+ int flags, int * widthPtr, int * heightPtr));
+/* 32 */
+EXTERN Tk_Window Tk_CoordsToWindow _ANSI_ARGS_((int rootX, int rootY,
+ Tk_Window tkwin));
+/* 33 */
+EXTERN unsigned long Tk_CreateBinding _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventStr,
+ Tcl_Obj *command, int append));
+/* 34 */
+EXTERN Tk_BindingTable Tk_CreateBindingTable _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 35 */
+EXTERN Tk_ErrorHandler Tk_CreateErrorHandler _ANSI_ARGS_((Display * display,
+ int errNum, int request, int minorCode,
+ Tk_ErrorProc * errorProc,
+ ClientData clientData));
+/* 36 */
+EXTERN void Tk_CreateEventHandler _ANSI_ARGS_((Tk_Window token,
+ unsigned long mask, Tk_EventProc * proc,
+ ClientData clientData));
+/* 37 */
+EXTERN void Tk_CreateGenericHandler _ANSI_ARGS_((
+ Tk_GenericProc * proc, ClientData clientData));
+/* 38 */
+EXTERN void Tk_CreateImageType _ANSI_ARGS_((
+ Tk_ImageType * typePtr));
+/* 39 */
+EXTERN void Tk_CreateItemType _ANSI_ARGS_((Tk_ItemType * typePtr));
+/* 40 */
+EXTERN void Tk_CreatePhotoImageFormat _ANSI_ARGS_((
+ Tk_PhotoImageFormat * formatPtr));
+/* 41 */
+EXTERN void Tk_CreateSelHandler _ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection, Atom target,
+ Tk_SelectionProc * proc,
+ ClientData clientData, Atom format));
+/* 42 */
+EXTERN Tk_Window Tk_CreateWindow _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window parent, CONST char * name,
+ CONST char * screenName));
+/* 43 */
+EXTERN Tk_Window Tk_CreateWindowFromPath _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ CONST char * pathName,
+ CONST char * screenName));
+/* 44 */
+EXTERN int Tk_DefineBitmap _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * source,
+ int width, int height));
+/* 45 */
+EXTERN void Tk_DefineCursor _ANSI_ARGS_((Tk_Window window,
+ Tk_Cursor cursor));
+/* 46 */
+EXTERN void Tk_DeleteAllBindings _ANSI_ARGS_((
+ Tk_BindingTable bindingTable,
+ ClientData object));
+/* 47 */
+EXTERN int Tk_DeleteBinding _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventStr));
+/* 48 */
+EXTERN void Tk_DeleteBindingTable _ANSI_ARGS_((
+ Tk_BindingTable bindingTable));
+/* 49 */
+EXTERN void Tk_DeleteErrorHandler _ANSI_ARGS_((
+ Tk_ErrorHandler handler));
+/* 50 */
+EXTERN void Tk_DeleteEventHandler _ANSI_ARGS_((Tk_Window token,
+ unsigned long mask, Tk_EventProc * proc,
+ ClientData clientData));
+/* 51 */
+EXTERN void Tk_DeleteGenericHandler _ANSI_ARGS_((
+ Tk_GenericProc * proc, ClientData clientData));
+/* 52 */
+EXTERN void Tk_DeleteImage _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name));
+/* 53 */
+EXTERN void Tk_DeleteSelHandler _ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection, Atom target));
+/* 54 */
+EXTERN void Tk_DestroyWindow _ANSI_ARGS_((Tk_Window tkwin));
+/* 55 */
+EXTERN CONST84_RETURN char * Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin));
+/* 56 */
+EXTERN int Tk_DistanceToTextLayout _ANSI_ARGS_((
+ Tk_TextLayout layout, int x, int y));
+/* 57 */
+EXTERN void Tk_Draw3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border,
+ XPoint * pointPtr, int numPoints,
+ int borderWidth, int leftRelief));
+/* 58 */
+EXTERN void Tk_Draw3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height,
+ int borderWidth, int relief));
+/* 59 */
+EXTERN void Tk_DrawChars _ANSI_ARGS_((Display * display,
+ Drawable drawable, GC gc, Tk_Font tkfont,
+ CONST char * source, int numBytes, int x,
+ int y));
+/* 60 */
+EXTERN void Tk_DrawFocusHighlight _ANSI_ARGS_((Tk_Window tkwin,
+ GC gc, int width, Drawable drawable));
+/* 61 */
+EXTERN void Tk_DrawTextLayout _ANSI_ARGS_((Display * display,
+ Drawable drawable, GC gc,
+ Tk_TextLayout layout, int x, int y,
+ int firstChar, int lastChar));
+/* 62 */
+EXTERN void Tk_Fill3DPolygon _ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border,
+ XPoint * pointPtr, int numPoints,
+ int borderWidth, int leftRelief));
+/* 63 */
+EXTERN void Tk_Fill3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height,
+ int borderWidth, int relief));
+/* 64 */
+EXTERN Tk_PhotoHandle Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * imageName));
+/* 65 */
+EXTERN Font Tk_FontId _ANSI_ARGS_((Tk_Font font));
+/* 66 */
+EXTERN void Tk_Free3DBorder _ANSI_ARGS_((Tk_3DBorder border));
+/* 67 */
+EXTERN void Tk_FreeBitmap _ANSI_ARGS_((Display * display,
+ Pixmap bitmap));
+/* 68 */
+EXTERN void Tk_FreeColor _ANSI_ARGS_((XColor * colorPtr));
+/* 69 */
+EXTERN void Tk_FreeColormap _ANSI_ARGS_((Display * display,
+ Colormap colormap));
+/* 70 */
+EXTERN void Tk_FreeCursor _ANSI_ARGS_((Display * display,
+ Tk_Cursor cursor));
+/* 71 */
+EXTERN void Tk_FreeFont _ANSI_ARGS_((Tk_Font f));
+/* 72 */
+EXTERN void Tk_FreeGC _ANSI_ARGS_((Display * display, GC gc));
+/* 73 */
+EXTERN void Tk_FreeImage _ANSI_ARGS_((Tk_Image image));
+/* 74 */
+EXTERN void Tk_FreeOptions _ANSI_ARGS_((Tk_ConfigSpec * specs,
+ char * widgRec, Display * display,
+ int needFlags));
+/* 75 */
+EXTERN void Tk_FreePixmap _ANSI_ARGS_((Display * display,
+ Pixmap pixmap));
+/* 76 */
+EXTERN void Tk_FreeTextLayout _ANSI_ARGS_((
+ Tk_TextLayout textLayout));
+/* 77 */
+EXTERN void Tk_FreeXId _ANSI_ARGS_((Display * display, XID xid));
+/* 78 */
+EXTERN GC Tk_GCForColor _ANSI_ARGS_((XColor * colorPtr,
+ Drawable drawable));
+/* 79 */
+EXTERN void Tk_GeometryRequest _ANSI_ARGS_((Tk_Window tkwin,
+ int reqWidth, int reqHeight));
+/* 80 */
+EXTERN Tk_3DBorder Tk_Get3DBorder _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid colorName));
+/* 81 */
+EXTERN void Tk_GetAllBindings _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object));
+/* 82 */
+EXTERN int Tk_GetAnchor _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, Tk_Anchor * anchorPtr));
+/* 83 */
+EXTERN CONST84_RETURN char * Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin,
+ Atom atom));
+/* 84 */
+EXTERN Tcl_Obj * Tk_GetBinding _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventStr));
+/* 85 */
+EXTERN Pixmap Tk_GetBitmap _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str));
+/* 86 */
+EXTERN Pixmap Tk_GetBitmapFromData _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ CONST char * source, int width, int height));
+/* 87 */
+EXTERN int Tk_GetCapStyle _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * capPtr));
+/* 88 */
+EXTERN XColor * Tk_GetColor _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid name));
+/* 89 */
+EXTERN XColor * Tk_GetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
+ XColor * colorPtr));
+/* 90 */
+EXTERN Colormap Tk_GetColormap _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str));
+/* 91 */
+EXTERN Tk_Cursor Tk_GetCursor _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid str));
+/* 92 */
+EXTERN Tk_Cursor Tk_GetCursorFromData _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ CONST char * source, CONST char * mask,
+ int width, int height, int xHot, int yHot,
+ Tk_Uid fg, Tk_Uid bg));
+/* 93 */
+EXTERN Tk_Font Tk_GetFont _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str));
+/* 94 */
+EXTERN Tk_Font Tk_GetFontFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 95 */
+EXTERN void Tk_GetFontMetrics _ANSI_ARGS_((Tk_Font font,
+ Tk_FontMetrics * fmPtr));
+/* 96 */
+EXTERN GC Tk_GetGC _ANSI_ARGS_((Tk_Window tkwin,
+ unsigned long valueMask,
+ XGCValues * valuePtr));
+/* 97 */
+EXTERN Tk_Image Tk_GetImage _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * name,
+ Tk_ImageChangedProc * changeProc,
+ ClientData clientData));
+/* 98 */
+EXTERN ClientData Tk_GetImageMasterData _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ Tk_ImageType ** typePtrPtr));
+/* 99 */
+EXTERN Tk_ItemType * Tk_GetItemTypes _ANSI_ARGS_((void));
+/* 100 */
+EXTERN int Tk_GetJoinStyle _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * joinPtr));
+/* 101 */
+EXTERN int Tk_GetJustify _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, Tk_Justify * justifyPtr));
+/* 102 */
+EXTERN int Tk_GetNumMainWindows _ANSI_ARGS_((void));
+/* 103 */
+EXTERN Tk_Uid Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name, CONST char * className));
+/* 104 */
+EXTERN int Tk_GetPixels _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str,
+ int * intPtr));
+/* 105 */
+EXTERN Pixmap Tk_GetPixmap _ANSI_ARGS_((Display * display,
+ Drawable d, int width, int height, int depth));
+/* 106 */
+EXTERN int Tk_GetRelief _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, int * reliefPtr));
+/* 107 */
+EXTERN void Tk_GetRootCoords _ANSI_ARGS_((Tk_Window tkwin,
+ int * xPtr, int * yPtr));
+/* 108 */
+EXTERN int Tk_GetScrollInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ int argc, CONST84 Tcl_Obj *CONST *objv,
+ double * dblPtr, int * intPtr));
+/* 109 */
+EXTERN int Tk_GetScreenMM _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str,
+ double * doublePtr));
+/* 110 */
+EXTERN int Tk_GetSelection _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Atom selection, Atom target,
+ Tk_GetSelProc * proc, ClientData clientData));
+/* 111 */
+EXTERN Tk_Uid Tk_GetUid _ANSI_ARGS_((CONST char * str));
+/* 112 */
+EXTERN Visual * Tk_GetVisual _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj *str,
+ int * depthPtr, Colormap * colormapPtr));
+/* 113 */
+EXTERN void Tk_GetVRootGeometry _ANSI_ARGS_((Tk_Window tkwin,
+ int * xPtr, int * yPtr, int * widthPtr,
+ int * heightPtr));
+/* 114 */
+EXTERN int Tk_Grab _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, int grabGlobal));
+/* 115 */
+EXTERN void Tk_HandleEvent _ANSI_ARGS_((XEvent * eventPtr));
+/* 116 */
+EXTERN Tk_Window Tk_IdToWindow _ANSI_ARGS_((Display * display,
+ Window window));
+/* 117 */
+EXTERN void Tk_ImageChanged _ANSI_ARGS_((Tk_ImageMaster master,
+ int x, int y, int width, int height,
+ int imageWidth, int imageHeight));
+/* 118 */
+EXTERN int Tk_Init _ANSI_ARGS_((Tcl_Interp * interp));
+/* 119 */
+EXTERN Atom Tk_InternAtom _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name));
+/* 120 */
+EXTERN int Tk_IntersectTextLayout _ANSI_ARGS_((
+ Tk_TextLayout layout, int x, int y,
+ int width, int height));
+/* 121 */
+EXTERN void Tk_MaintainGeometry _ANSI_ARGS_((Tk_Window slave,
+ Tk_Window master, int x, int y, int width,
+ int height));
+/* 122 */
+EXTERN Tk_Window Tk_MainWindow _ANSI_ARGS_((Tcl_Interp * interp));
+/* 123 */
+EXTERN void Tk_MakeWindowExist _ANSI_ARGS_((Tk_Window tkwin));
+/* 124 */
+EXTERN void Tk_ManageGeometry _ANSI_ARGS_((Tk_Window tkwin,
+ Tk_GeomMgr * mgrPtr, ClientData clientData));
+/* 125 */
+EXTERN void Tk_MapWindow _ANSI_ARGS_((Tk_Window tkwin));
+/* 126 */
+EXTERN int Tk_MeasureChars _ANSI_ARGS_((Tk_Font tkfont,
+ CONST char * source, int numBytes,
+ int maxPixels, int flags, int * lengthPtr));
+/* 127 */
+EXTERN void Tk_MoveResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y, int width, int height));
+/* 128 */
+EXTERN void Tk_MoveWindow _ANSI_ARGS_((Tk_Window tkwin, int x,
+ int y));
+/* 129 */
+EXTERN void Tk_MoveToplevelWindow _ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y));
+/* 130 */
+EXTERN CONST84_RETURN char * Tk_NameOf3DBorder _ANSI_ARGS_((
+ Tk_3DBorder border));
+/* 131 */
+EXTERN CONST84_RETURN char * Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor));
+/* 132 */
+EXTERN CONST84_RETURN char * Tk_NameOfBitmap _ANSI_ARGS_((Display * display,
+ Pixmap bitmap));
+/* 133 */
+EXTERN CONST84_RETURN char * Tk_NameOfCapStyle _ANSI_ARGS_((int cap));
+/* 134 */
+EXTERN CONST84_RETURN char * Tk_NameOfColor _ANSI_ARGS_((XColor * colorPtr));
+/* 135 */
+EXTERN CONST84_RETURN char * Tk_NameOfCursor _ANSI_ARGS_((Display * display,
+ Tk_Cursor cursor));
+/* 136 */
+EXTERN CONST84_RETURN char * Tk_NameOfFont _ANSI_ARGS_((Tk_Font font));
+/* 137 */
+EXTERN CONST84_RETURN char * Tk_NameOfImage _ANSI_ARGS_((
+ Tk_ImageMaster imageMaster));
+/* 138 */
+EXTERN CONST84_RETURN char * Tk_NameOfJoinStyle _ANSI_ARGS_((int join));
+/* 139 */
+EXTERN CONST84_RETURN char * Tk_NameOfJustify _ANSI_ARGS_((
+ Tk_Justify justify));
+/* 140 */
+EXTERN CONST84_RETURN char * Tk_NameOfRelief _ANSI_ARGS_((int relief));
+/* 141 */
+EXTERN Tk_Window Tk_NameToWindow _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * pathName, Tk_Window tkwin));
+/* 142 */
+EXTERN void Tk_OwnSelection _ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection, Tk_LostSelProc * proc,
+ ClientData clientData));
+/* 143 */
+EXTERN int Tk_ParseArgv _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, int * argcPtr,
+ CONST84 Tcl_Obj *CONST *objv, Tk_ArgvInfo * argTable,
+ int flags));
+/* 144 */
+EXTERN void Tk_PhotoPutBlock_NoComposite _ANSI_ARGS_((
+ Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock * blockPtr, int x, int y,
+ int width, int height));
+/* 145 */
+EXTERN void Tk_PhotoPutZoomedBlock_NoComposite _ANSI_ARGS_((
+ Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock * blockPtr, int x, int y,
+ int width, int height, int zoomX, int zoomY,
+ int subsampleX, int subsampleY));
+/* 146 */
+EXTERN int Tk_PhotoGetImage _ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock * blockPtr));
+/* 147 */
+EXTERN void Tk_PhotoBlank _ANSI_ARGS_((Tk_PhotoHandle handle));
+/* 148 */
+EXTERN void Tk_PhotoExpand _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int width, int height));
+/* 149 */
+EXTERN void Tk_PhotoGetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int * widthPtr, int * heightPtr));
+/* 150 */
+EXTERN void Tk_PhotoSetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int width, int height));
+/* 151 */
+EXTERN int Tk_PointToChar _ANSI_ARGS_((Tk_TextLayout layout,
+ int x, int y));
+/* 152 */
+EXTERN int Tk_PostscriptFontName _ANSI_ARGS_((Tk_Font tkfont,
+ Tcl_DString * dsPtr));
+/* 153 */
+EXTERN void Tk_PreserveColormap _ANSI_ARGS_((Display * display,
+ Colormap colormap));
+/* 154 */
+EXTERN void Tk_QueueWindowEvent _ANSI_ARGS_((XEvent * eventPtr,
+ Tcl_QueuePosition position));
+/* 155 */
+EXTERN void Tk_RedrawImage _ANSI_ARGS_((Tk_Image image,
+ int imageX, int imageY, int width,
+ int height, Drawable drawable, int drawableX,
+ int drawableY));
+/* 156 */
+EXTERN void Tk_ResizeWindow _ANSI_ARGS_((Tk_Window tkwin,
+ int width, int height));
+/* 157 */
+EXTERN int Tk_RestackWindow _ANSI_ARGS_((Tk_Window tkwin,
+ int aboveBelow, Tk_Window other));
+/* 158 */
+EXTERN Tk_RestrictProc * Tk_RestrictEvents _ANSI_ARGS_((
+ Tk_RestrictProc * proc, ClientData arg,
+ ClientData * prevArgPtr));
+/* 159 */
+EXTERN int Tk_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
+/* 160 */
+EXTERN CONST char * Tk_SetAppName _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name));
+/* 161 */
+EXTERN void Tk_SetBackgroundFromBorder _ANSI_ARGS_((
+ Tk_Window tkwin, Tk_3DBorder border));
+/* 162 */
+EXTERN void Tk_SetClass _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * className));
+/* 163 */
+EXTERN void Tk_SetGrid _ANSI_ARGS_((Tk_Window tkwin,
+ int reqWidth, int reqHeight, int gridWidth,
+ int gridHeight));
+/* 164 */
+EXTERN void Tk_SetInternalBorder _ANSI_ARGS_((Tk_Window tkwin,
+ int width));
+/* 165 */
+EXTERN void Tk_SetWindowBackground _ANSI_ARGS_((Tk_Window tkwin,
+ unsigned long pixel));
+/* 166 */
+EXTERN void Tk_SetWindowBackgroundPixmap _ANSI_ARGS_((
+ Tk_Window tkwin, Pixmap pixmap));
+/* 167 */
+EXTERN void Tk_SetWindowBorder _ANSI_ARGS_((Tk_Window tkwin,
+ unsigned long pixel));
+/* 168 */
+EXTERN void Tk_SetWindowBorderWidth _ANSI_ARGS_((Tk_Window tkwin,
+ int width));
+/* 169 */
+EXTERN void Tk_SetWindowBorderPixmap _ANSI_ARGS_((
+ Tk_Window tkwin, Pixmap pixmap));
+/* 170 */
+EXTERN void Tk_SetWindowColormap _ANSI_ARGS_((Tk_Window tkwin,
+ Colormap colormap));
+/* 171 */
+EXTERN int Tk_SetWindowVisual _ANSI_ARGS_((Tk_Window tkwin,
+ Visual * visual, int depth,
+ Colormap colormap));
+/* 172 */
+EXTERN void Tk_SizeOfBitmap _ANSI_ARGS_((Display * display,
+ Pixmap bitmap, int * widthPtr,
+ int * heightPtr));
+/* 173 */
+EXTERN void Tk_SizeOfImage _ANSI_ARGS_((Tk_Image image,
+ int * widthPtr, int * heightPtr));
+/* 174 */
+EXTERN int Tk_StrictMotif _ANSI_ARGS_((Tk_Window tkwin));
+/* 175 */
+EXTERN void Tk_TextLayoutToPostscript _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_TextLayout layout));
+/* 176 */
+EXTERN int Tk_TextWidth _ANSI_ARGS_((Tk_Font font,
+ CONST char * str, int numBytes));
+/* 177 */
+EXTERN void Tk_UndefineCursor _ANSI_ARGS_((Tk_Window window));
+/* 178 */
+EXTERN void Tk_UnderlineChars _ANSI_ARGS_((Display * display,
+ Drawable drawable, GC gc, Tk_Font tkfont,
+ CONST char * source, int x, int y,
+ int firstByte, int lastByte));
+/* 179 */
+EXTERN void Tk_UnderlineTextLayout _ANSI_ARGS_((
+ Display * display, Drawable drawable, GC gc,
+ Tk_TextLayout layout, int x, int y,
+ int underline));
+/* 180 */
+EXTERN void Tk_Ungrab _ANSI_ARGS_((Tk_Window tkwin));
+/* 181 */
+EXTERN void Tk_UnmaintainGeometry _ANSI_ARGS_((Tk_Window slave,
+ Tk_Window master));
+/* 182 */
+EXTERN void Tk_UnmapWindow _ANSI_ARGS_((Tk_Window tkwin));
+/* 183 */
+EXTERN void Tk_UnsetGrid _ANSI_ARGS_((Tk_Window tkwin));
+/* 184 */
+EXTERN void Tk_UpdatePointer _ANSI_ARGS_((Tk_Window tkwin, int x,
+ int y, int state));
+/* 185 */
+EXTERN Pixmap Tk_AllocBitmapFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 186 */
+EXTERN Tk_3DBorder Tk_Alloc3DBorderFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 187 */
+EXTERN XColor * Tk_AllocColorFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 188 */
+EXTERN Tk_Cursor Tk_AllocCursorFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 189 */
+EXTERN Tk_Font Tk_AllocFontFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr));
+/* 190 */
+EXTERN Tk_OptionTable Tk_CreateOptionTable _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ CONST Tk_OptionSpec * templatePtr));
+/* 191 */
+EXTERN void Tk_DeleteOptionTable _ANSI_ARGS_((
+ Tk_OptionTable optionTable));
+/* 192 */
+EXTERN void Tk_Free3DBorderFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 193 */
+EXTERN void Tk_FreeBitmapFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 194 */
+EXTERN void Tk_FreeColorFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 195 */
+EXTERN void Tk_FreeConfigOptions _ANSI_ARGS_((char * recordPtr,
+ Tk_OptionTable optionToken, Tk_Window tkwin));
+/* 196 */
+EXTERN void Tk_FreeSavedOptions _ANSI_ARGS_((
+ Tk_SavedOptions * savePtr));
+/* 197 */
+EXTERN void Tk_FreeCursorFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 198 */
+EXTERN void Tk_FreeFontFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 199 */
+EXTERN Tk_3DBorder Tk_Get3DBorderFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 200 */
+EXTERN int Tk_GetAnchorFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, Tk_Anchor * anchorPtr));
+/* 201 */
+EXTERN Pixmap Tk_GetBitmapFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 202 */
+EXTERN XColor * Tk_GetColorFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 203 */
+EXTERN Tk_Cursor Tk_GetCursorFromObj _ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr));
+/* 204 */
+EXTERN Tcl_Obj * Tk_GetOptionInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionTable,
+ Tcl_Obj * namePtr, Tk_Window tkwin));
+/* 205 */
+EXTERN Tcl_Obj * Tk_GetOptionValue _ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionTable,
+ Tcl_Obj * namePtr, Tk_Window tkwin));
+/* 206 */
+EXTERN int Tk_GetJustifyFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ Tk_Justify * justifyPtr));
+/* 207 */
+EXTERN int Tk_GetMMFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr,
+ double * doublePtr));
+/* 208 */
+EXTERN int Tk_GetPixelsFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr,
+ int * intPtr));
+/* 209 */
+EXTERN int Tk_GetReliefFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int * resultPtr));
+/* 210 */
+EXTERN int Tk_GetScrollInfoObj _ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[],
+ double * dblPtr, int * intPtr));
+/* 211 */
+EXTERN int Tk_InitOptions _ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionToken,
+ Tk_Window tkwin));
+/* 212 */
+EXTERN void Tk_MainEx _ANSI_ARGS_((int argc, Tcl_Obj *CONST *objv,
+ Tcl_AppInitProc * appInitProc,
+ Tcl_Interp * interp));
+/* 213 */
+EXTERN void Tk_RestoreSavedOptions _ANSI_ARGS_((
+ Tk_SavedOptions * savePtr));
+/* 214 */
+EXTERN int Tk_SetOptions _ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionTable,
+ int objc, Tcl_Obj *CONST objv[],
+ Tk_Window tkwin, Tk_SavedOptions * savePtr,
+ int * maskPtr));
+/* 215 */
+EXTERN void Tk_InitConsoleChannels _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 216 */
+EXTERN int Tk_CreateConsoleWindow _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 217 */
+EXTERN void Tk_CreateSmoothMethod _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tk_SmoothMethod * method));
+/* Slot 218 is reserved */
+/* Slot 219 is reserved */
+/* 220 */
+EXTERN int Tk_GetDash _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj *value, Tk_Dash * dash));
+/* 221 */
+EXTERN void Tk_CreateOutline _ANSI_ARGS_((Tk_Outline * outline));
+/* 222 */
+EXTERN void Tk_DeleteOutline _ANSI_ARGS_((Display * display,
+ Tk_Outline * outline));
+/* 223 */
+EXTERN int Tk_ConfigOutlineGC _ANSI_ARGS_((XGCValues * gcValues,
+ Tk_Canvas canvas, Tk_Item * item,
+ Tk_Outline * outline));
+/* 224 */
+EXTERN int Tk_ChangeOutlineGC _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item * item, Tk_Outline * outline));
+/* 225 */
+EXTERN int Tk_ResetOutlineGC _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item * item, Tk_Outline * outline));
+/* 226 */
+EXTERN int Tk_CanvasPsOutline _ANSI_ARGS_((Tk_Canvas canvas,
+ Tk_Item * item, Tk_Outline * outline));
+/* 227 */
+EXTERN void Tk_SetTSOrigin _ANSI_ARGS_((Tk_Window tkwin, GC gc,
+ int x, int y));
+/* 228 */
+EXTERN int Tk_CanvasGetCoordFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Canvas canvas,
+ Tcl_Obj * obj, double * doublePtr));
+/* 229 */
+EXTERN void Tk_CanvasSetOffset _ANSI_ARGS_((Tk_Canvas canvas,
+ GC gc, Tk_TSOffset * offset));
+/* 230 */
+EXTERN void Tk_DitherPhoto _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int x, int y, int width, int height));
+/* 231 */
+EXTERN int Tk_PostscriptBitmap _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_PostscriptInfo psInfo,
+ Pixmap bitmap, int startX, int startY,
+ int width, int height));
+/* 232 */
+EXTERN int Tk_PostscriptColor _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PostscriptInfo psInfo, XColor * colorPtr));
+/* 233 */
+EXTERN int Tk_PostscriptFont _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PostscriptInfo psInfo, Tk_Font font));
+/* 234 */
+EXTERN int Tk_PostscriptImage _ANSI_ARGS_((Tk_Image image,
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tk_PostscriptInfo psinfo, int x, int y,
+ int width, int height, int prepass));
+/* 235 */
+EXTERN void Tk_PostscriptPath _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PostscriptInfo psInfo, double * coordPtr,
+ int numPoints));
+/* 236 */
+EXTERN int Tk_PostscriptStipple _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tk_PostscriptInfo psInfo, Pixmap bitmap));
+/* 237 */
+EXTERN double Tk_PostscriptY _ANSI_ARGS_((double y,
+ Tk_PostscriptInfo psInfo));
+/* 238 */
+EXTERN int Tk_PostscriptPhoto _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PhotoImageBlock * blockPtr,
+ Tk_PostscriptInfo psInfo, int width,
+ int height));
+/* 239 */
+EXTERN void Tk_CreateClientMessageHandler _ANSI_ARGS_((
+ Tk_ClientMessageProc * proc));
+/* 240 */
+EXTERN void Tk_DeleteClientMessageHandler _ANSI_ARGS_((
+ Tk_ClientMessageProc * proc));
+/* 241 */
+EXTERN Tk_Window Tk_CreateAnonymousWindow _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window parent,
+ CONST char * screenName));
+/* 242 */
+EXTERN void Tk_SetClassProcs _ANSI_ARGS_((Tk_Window tkwin,
+ Tk_ClassProcs * procs,
+ ClientData instanceData));
+/* 243 */
+EXTERN void Tk_SetInternalBorderEx _ANSI_ARGS_((Tk_Window tkwin,
+ int left, int right, int top, int bottom));
+/* 244 */
+EXTERN void Tk_SetMinimumRequestSize _ANSI_ARGS_((
+ Tk_Window tkwin, int minWidth, int minHeight));
+/* 245 */
+EXTERN void Tk_SetCaretPos _ANSI_ARGS_((Tk_Window tkwin, int x,
+ int y, int height));
+/* 246 */
+EXTERN void Tk_PhotoPutBlock _ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock * blockPtr, int x, int y,
+ int width, int height, int compRule));
+/* 247 */
+EXTERN void Tk_PhotoPutZoomedBlock _ANSI_ARGS_((
+ Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock * blockPtr, int x, int y,
+ int width, int height, int zoomX, int zoomY,
+ int subsampleX, int subsampleY, int compRule));
+/* 248 */
+EXTERN int Tk_CollapseMotionEvents _ANSI_ARGS_((
+ Display * display, int collapse));
+/* 249 */
+EXTERN Tk_StyleEngine Tk_RegisterStyleEngine _ANSI_ARGS_((
+ CONST char * name, Tk_StyleEngine parent));
+/* 250 */
+EXTERN Tk_StyleEngine Tk_GetStyleEngine _ANSI_ARGS_((CONST char * name));
+/* 251 */
+EXTERN int Tk_RegisterStyledElement _ANSI_ARGS_((
+ Tk_StyleEngine engine,
+ Tk_ElementSpec * templatePtr));
+/* 252 */
+EXTERN int Tk_GetElementId _ANSI_ARGS_((CONST char * name));
+/* 253 */
+EXTERN Tk_Style Tk_CreateStyle _ANSI_ARGS_((CONST char * name,
+ Tk_StyleEngine engine, ClientData clientData));
+/* 254 */
+EXTERN Tk_Style Tk_GetStyle _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name));
+/* 255 */
+EXTERN void Tk_FreeStyle _ANSI_ARGS_((Tk_Style style));
+/* 256 */
+EXTERN CONST char * Tk_NameOfStyle _ANSI_ARGS_((Tk_Style style));
+/* 257 */
+EXTERN Tk_Style Tk_AllocStyleFromObj _ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr));
+/* 258 */
+EXTERN Tk_Style Tk_GetStyleFromObj _ANSI_ARGS_((Tcl_Obj * objPtr));
+/* 259 */
+EXTERN void Tk_FreeStyleFromObj _ANSI_ARGS_((Tcl_Obj * objPtr));
+/* 260 */
+EXTERN Tk_StyledElement Tk_GetStyledElement _ANSI_ARGS_((Tk_Style style,
+ int elementId, Tk_OptionTable optionTable));
+/* 261 */
+EXTERN void Tk_GetElementSize _ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin, int width, int height,
+ int inner, int * widthPtr, int * heightPtr));
+/* 262 */
+EXTERN void Tk_GetElementBox _ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin, int x, int y, int width,
+ int height, int inner, int * xPtr,
+ int * yPtr, int * widthPtr, int * heightPtr));
+/* 263 */
+EXTERN int Tk_GetElementBorderWidth _ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin));
+/* 264 */
+EXTERN void Tk_DrawElement _ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin, Drawable d, int x, int y,
+ int width, int height, int state));
+
+typedef struct TkStubHooks {
+ struct TkPlatStubs *tkPlatStubs;
+ struct TkIntStubs *tkIntStubs;
+ struct TkIntPlatStubs *tkIntPlatStubs;
+ struct TkIntXlibStubs *tkIntXlibStubs;
+} TkStubHooks;
+
+typedef struct TkStubs {
+ int magic;
+ struct TkStubHooks *hooks;
+
+ void (*tk_MainLoop) _ANSI_ARGS_((void)); /* 0 */
+ XColor * (*tk_3DBorderColor) _ANSI_ARGS_((Tk_3DBorder border)); /* 1 */
+ GC (*tk_3DBorderGC) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int which)); /* 2 */
+ void (*tk_3DHorizontalBevel) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int leftIn, int rightIn, int topBevel, int relief)); /* 3 */
+ void (*tk_3DVerticalBevel) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int leftBevel, int relief)); /* 4 */
+ void (*tk_AddOption) _ANSI_ARGS_((Tk_Window tkwin, CONST char * name, CONST char * value, int priority)); /* 5 */
+ void (*tk_BindEvent) _ANSI_ARGS_((Tk_BindingTable bindingTable, XEvent * eventPtr, Tk_Window tkwin, int numObjects, ClientData * objectPtr)); /* 6 */
+ void (*tk_CanvasDrawableCoords) _ANSI_ARGS_((Tk_Canvas canvas, double x, double y, short * drawableXPtr, short * drawableYPtr)); /* 7 */
+ void (*tk_CanvasEventuallyRedraw) _ANSI_ARGS_((Tk_Canvas canvas, int x1, int y1, int x2, int y2)); /* 8 */
+ int (*tk_CanvasGetCoord) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, CONST char * str, double * doublePtr)); /* 9 */
+ Tk_CanvasTextInfo * (*tk_CanvasGetTextInfo) _ANSI_ARGS_((Tk_Canvas canvas)); /* 10 */
+ int (*tk_CanvasPsBitmap) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, Pixmap bitmap, int x, int y, int width, int height)); /* 11 */
+ int (*tk_CanvasPsColor) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, XColor * colorPtr)); /* 12 */
+ int (*tk_CanvasPsFont) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, Tk_Font font)); /* 13 */
+ void (*tk_CanvasPsPath) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, double * coordPtr, int numPoints)); /* 14 */
+ int (*tk_CanvasPsStipple) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, Pixmap bitmap)); /* 15 */
+ double (*tk_CanvasPsY) _ANSI_ARGS_((Tk_Canvas canvas, double y)); /* 16 */
+ void (*tk_CanvasSetStippleOrigin) _ANSI_ARGS_((Tk_Canvas canvas, GC gc)); /* 17 */
+ int (*tk_CanvasTagsParseProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj *value, char * widgRec, int offset)); /* 18 */
+ Tcl_Obj * (*tk_CanvasTagsPrintProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin, char * widgRec, int offset, Tcl_FreeProc ** freeProcPtr)); /* 19 */
+ Tk_Window (*tk_CanvasTkwin) _ANSI_ARGS_((Tk_Canvas canvas)); /* 20 */
+ void (*tk_CanvasWindowCoords) _ANSI_ARGS_((Tk_Canvas canvas, double x, double y, short * screenXPtr, short * screenYPtr)); /* 21 */
+ void (*tk_ChangeWindowAttributes) _ANSI_ARGS_((Tk_Window tkwin, unsigned long valueMask, XSetWindowAttributes * attsPtr)); /* 22 */
+ int (*tk_CharBbox) _ANSI_ARGS_((Tk_TextLayout layout, int index, int * xPtr, int * yPtr, int * widthPtr, int * heightPtr)); /* 23 */
+ void (*tk_ClearSelection) _ANSI_ARGS_((Tk_Window tkwin, Atom selection)); /* 24 */
+ int (*tk_ClipboardAppend) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Atom target, Atom format, char* buffer)); /* 25 */
+ int (*tk_ClipboardClear) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin)); /* 26 */
+ int (*tk_ConfigureInfo) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, CONST char * argvName, int flags)); /* 27 */
+ int (*tk_ConfigureValue) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, CONST char * argvName, int flags)); /* 28 */
+ int (*tk_ConfigureWidget) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, int argc, CONST84 Tcl_Obj *CONST *objv, char * widgRec, int flags)); /* 29 */
+ void (*tk_ConfigureWindow) _ANSI_ARGS_((Tk_Window tkwin, unsigned int valueMask, XWindowChanges * valuePtr)); /* 30 */
+ Tk_TextLayout (*tk_ComputeTextLayout) _ANSI_ARGS_((Tk_Font font, CONST char * str, int numChars, int wrapLength, Tk_Justify justify, int flags, int * widthPtr, int * heightPtr)); /* 31 */
+ Tk_Window (*tk_CoordsToWindow) _ANSI_ARGS_((int rootX, int rootY, Tk_Window tkwin)); /* 32 */
+ unsigned long (*tk_CreateBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr, CONST char * command, int append)); /* 33 */
+ Tk_BindingTable (*tk_CreateBindingTable) _ANSI_ARGS_((Tcl_Interp * interp)); /* 34 */
+ Tk_ErrorHandler (*tk_CreateErrorHandler) _ANSI_ARGS_((Display * display, int errNum, int request, int minorCode, Tk_ErrorProc * errorProc, ClientData clientData)); /* 35 */
+ void (*tk_CreateEventHandler) _ANSI_ARGS_((Tk_Window token, unsigned long mask, Tk_EventProc * proc, ClientData clientData)); /* 36 */
+ void (*tk_CreateGenericHandler) _ANSI_ARGS_((Tk_GenericProc * proc, ClientData clientData)); /* 37 */
+ void (*tk_CreateImageType) _ANSI_ARGS_((Tk_ImageType * typePtr)); /* 38 */
+ void (*tk_CreateItemType) _ANSI_ARGS_((Tk_ItemType * typePtr)); /* 39 */
+ void (*tk_CreatePhotoImageFormat) _ANSI_ARGS_((Tk_PhotoImageFormat * formatPtr)); /* 40 */
+ void (*tk_CreateSelHandler) _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Atom target, Tk_SelectionProc * proc, ClientData clientData, Atom format)); /* 41 */
+ Tk_Window (*tk_CreateWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window parent, CONST char * name, CONST char * screenName)); /* 42 */
+ Tk_Window (*tk_CreateWindowFromPath) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * pathName, CONST char * screenName)); /* 43 */
+ int (*tk_DefineBitmap) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * source, int width, int height)); /* 44 */
+ void (*tk_DefineCursor) _ANSI_ARGS_((Tk_Window window, Tk_Cursor cursor)); /* 45 */
+ void (*tk_DeleteAllBindings) _ANSI_ARGS_((Tk_BindingTable bindingTable, ClientData object)); /* 46 */
+ int (*tk_DeleteBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr)); /* 47 */
+ void (*tk_DeleteBindingTable) _ANSI_ARGS_((Tk_BindingTable bindingTable)); /* 48 */
+ void (*tk_DeleteErrorHandler) _ANSI_ARGS_((Tk_ErrorHandler handler)); /* 49 */
+ void (*tk_DeleteEventHandler) _ANSI_ARGS_((Tk_Window token, unsigned long mask, Tk_EventProc * proc, ClientData clientData)); /* 50 */
+ void (*tk_DeleteGenericHandler) _ANSI_ARGS_((Tk_GenericProc * proc, ClientData clientData)); /* 51 */
+ void (*tk_DeleteImage) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 52 */
+ void (*tk_DeleteSelHandler) _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Atom target)); /* 53 */
+ void (*tk_DestroyWindow) _ANSI_ARGS_((Tk_Window tkwin)); /* 54 */
+ CONST84_RETURN char * (*tk_DisplayName) _ANSI_ARGS_((Tk_Window tkwin)); /* 55 */
+ int (*tk_DistanceToTextLayout) _ANSI_ARGS_((Tk_TextLayout layout, int x, int y)); /* 56 */
+ void (*tk_Draw3DPolygon) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint * pointPtr, int numPoints, int borderWidth, int leftRelief)); /* 57 */
+ void (*tk_Draw3DRectangle) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief)); /* 58 */
+ void (*tk_DrawChars) _ANSI_ARGS_((Display * display, Drawable drawable, GC gc, Tk_Font tkfont, CONST char * source, int numBytes, int x, int y)); /* 59 */
+ void (*tk_DrawFocusHighlight) _ANSI_ARGS_((Tk_Window tkwin, GC gc, int width, Drawable drawable)); /* 60 */
+ void (*tk_DrawTextLayout) _ANSI_ARGS_((Display * display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, int firstChar, int lastChar)); /* 61 */
+ void (*tk_Fill3DPolygon) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint * pointPtr, int numPoints, int borderWidth, int leftRelief)); /* 62 */
+ void (*tk_Fill3DRectangle) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief)); /* 63 */
+ Tk_PhotoHandle (*tk_FindPhoto) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * imageName)); /* 64 */
+ Font (*tk_FontId) _ANSI_ARGS_((Tk_Font font)); /* 65 */
+ void (*tk_Free3DBorder) _ANSI_ARGS_((Tk_3DBorder border)); /* 66 */
+ void (*tk_FreeBitmap) _ANSI_ARGS_((Display * display, Pixmap bitmap)); /* 67 */
+ void (*tk_FreeColor) _ANSI_ARGS_((XColor * colorPtr)); /* 68 */
+ void (*tk_FreeColormap) _ANSI_ARGS_((Display * display, Colormap colormap)); /* 69 */
+ void (*tk_FreeCursor) _ANSI_ARGS_((Display * display, Tk_Cursor cursor)); /* 70 */
+ void (*tk_FreeFont) _ANSI_ARGS_((Tk_Font f)); /* 71 */
+ void (*tk_FreeGC) _ANSI_ARGS_((Display * display, GC gc)); /* 72 */
+ void (*tk_FreeImage) _ANSI_ARGS_((Tk_Image image)); /* 73 */
+ void (*tk_FreeOptions) _ANSI_ARGS_((Tk_ConfigSpec * specs, char * widgRec, Display * display, int needFlags)); /* 74 */
+ void (*tk_FreePixmap) _ANSI_ARGS_((Display * display, Pixmap pixmap)); /* 75 */
+ void (*tk_FreeTextLayout) _ANSI_ARGS_((Tk_TextLayout textLayout)); /* 76 */
+ void (*tk_FreeXId) _ANSI_ARGS_((Display * display, XID xid)); /* 77 */
+ GC (*tk_GCForColor) _ANSI_ARGS_((XColor * colorPtr, Drawable drawable)); /* 78 */
+ void (*tk_GeometryRequest) _ANSI_ARGS_((Tk_Window tkwin, int reqWidth, int reqHeight)); /* 79 */
+ Tk_3DBorder (*tk_Get3DBorder) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid colorName)); /* 80 */
+ void (*tk_GetAllBindings) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object)); /* 81 */
+ int (*tk_GetAnchor) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, Tk_Anchor * anchorPtr)); /* 82 */
+ CONST84_RETURN char * (*tk_GetAtomName) _ANSI_ARGS_((Tk_Window tkwin, Atom atom)); /* 83 */
+ CONST84_RETURN char * (*tk_GetBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr)); /* 84 */
+ Pixmap (*tk_GetBitmap) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str)); /* 85 */
+ Pixmap (*tk_GetBitmapFromData) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * source, int width, int height)); /* 86 */
+ int (*tk_GetCapStyle) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * capPtr)); /* 87 */
+ XColor * (*tk_GetColor) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid name)); /* 88 */
+ XColor * (*tk_GetColorByValue) _ANSI_ARGS_((Tk_Window tkwin, XColor * colorPtr)); /* 89 */
+ Colormap (*tk_GetColormap) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str)); /* 90 */
+ Tk_Cursor (*tk_GetCursor) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid str)); /* 91 */
+ Tk_Cursor (*tk_GetCursorFromData) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * source, CONST char * mask, int width, int height, int xHot, int yHot, Tk_Uid fg, Tk_Uid bg)); /* 92 */
+ Tk_Font (*tk_GetFont) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str)); /* 93 */
+ Tk_Font (*tk_GetFontFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 94 */
+ void (*tk_GetFontMetrics) _ANSI_ARGS_((Tk_Font font, Tk_FontMetrics * fmPtr)); /* 95 */
+ GC (*tk_GetGC) _ANSI_ARGS_((Tk_Window tkwin, unsigned long valueMask, XGCValues * valuePtr)); /* 96 */
+ Tk_Image (*tk_GetImage) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * name, Tk_ImageChangedProc * changeProc, ClientData clientData)); /* 97 */
+ ClientData (*tk_GetImageMasterData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tk_ImageType ** typePtrPtr)); /* 98 */
+ Tk_ItemType * (*tk_GetItemTypes) _ANSI_ARGS_((void)); /* 99 */
+ int (*tk_GetJoinStyle) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * joinPtr)); /* 100 */
+ int (*tk_GetJustify) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, Tk_Justify * justifyPtr)); /* 101 */
+ int (*tk_GetNumMainWindows) _ANSI_ARGS_((void)); /* 102 */
+ Tk_Uid (*tk_GetOption) _ANSI_ARGS_((Tk_Window tkwin, CONST char * name, CONST char * className)); /* 103 */
+ int (*tk_GetPixels) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, int * intPtr)); /* 104 */
+ Pixmap (*tk_GetPixmap) _ANSI_ARGS_((Display * display, Drawable d, int width, int height, int depth)); /* 105 */
+ int (*tk_GetRelief) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, int * reliefPtr)); /* 106 */
+ void (*tk_GetRootCoords) _ANSI_ARGS_((Tk_Window tkwin, int * xPtr, int * yPtr)); /* 107 */
+ int (*tk_GetScrollInfo) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 Tcl_Obj *CONST *objv, double * dblPtr, int * intPtr)); /* 108 */
+ int (*tk_GetScreenMM) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, double * doublePtr)); /* 109 */
+ int (*tk_GetSelection) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc * proc, ClientData clientData)); /* 110 */
+ Tk_Uid (*tk_GetUid) _ANSI_ARGS_((CONST char * str)); /* 111 */
+ Visual * (*tk_GetVisual) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, int * depthPtr, Colormap * colormapPtr)); /* 112 */
+ void (*tk_GetVRootGeometry) _ANSI_ARGS_((Tk_Window tkwin, int * xPtr, int * yPtr, int * widthPtr, int * heightPtr)); /* 113 */
+ int (*tk_Grab) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, int grabGlobal)); /* 114 */
+ void (*tk_HandleEvent) _ANSI_ARGS_((XEvent * eventPtr)); /* 115 */
+ Tk_Window (*tk_IdToWindow) _ANSI_ARGS_((Display * display, Window window)); /* 116 */
+ void (*tk_ImageChanged) _ANSI_ARGS_((Tk_ImageMaster master, int x, int y, int width, int height, int imageWidth, int imageHeight)); /* 117 */
+ int (*tk_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 118 */
+ Atom (*tk_InternAtom) _ANSI_ARGS_((Tk_Window tkwin, CONST char * name)); /* 119 */
+ int (*tk_IntersectTextLayout) _ANSI_ARGS_((Tk_TextLayout layout, int x, int y, int width, int height)); /* 120 */
+ void (*tk_MaintainGeometry) _ANSI_ARGS_((Tk_Window slave, Tk_Window master, int x, int y, int width, int height)); /* 121 */
+ Tk_Window (*tk_MainWindow) _ANSI_ARGS_((Tcl_Interp * interp)); /* 122 */
+ void (*tk_MakeWindowExist) _ANSI_ARGS_((Tk_Window tkwin)); /* 123 */
+ void (*tk_ManageGeometry) _ANSI_ARGS_((Tk_Window tkwin, Tk_GeomMgr * mgrPtr, ClientData clientData)); /* 124 */
+ void (*tk_MapWindow) _ANSI_ARGS_((Tk_Window tkwin)); /* 125 */
+ int (*tk_MeasureChars) _ANSI_ARGS_((Tk_Font tkfont, CONST char * source, int numBytes, int maxPixels, int flags, int * lengthPtr)); /* 126 */
+ void (*tk_MoveResizeWindow) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height)); /* 127 */
+ void (*tk_MoveWindow) _ANSI_ARGS_((Tk_Window tkwin, int x, int y)); /* 128 */
+ void (*tk_MoveToplevelWindow) _ANSI_ARGS_((Tk_Window tkwin, int x, int y)); /* 129 */
+ CONST84_RETURN char * (*tk_NameOf3DBorder) _ANSI_ARGS_((Tk_3DBorder border)); /* 130 */
+ CONST84_RETURN char * (*tk_NameOfAnchor) _ANSI_ARGS_((Tk_Anchor anchor)); /* 131 */
+ CONST84_RETURN char * (*tk_NameOfBitmap) _ANSI_ARGS_((Display * display, Pixmap bitmap)); /* 132 */
+ CONST84_RETURN char * (*tk_NameOfCapStyle) _ANSI_ARGS_((int cap)); /* 133 */
+ CONST84_RETURN char * (*tk_NameOfColor) _ANSI_ARGS_((XColor * colorPtr)); /* 134 */
+ CONST84_RETURN char * (*tk_NameOfCursor) _ANSI_ARGS_((Display * display, Tk_Cursor cursor)); /* 135 */
+ CONST84_RETURN char * (*tk_NameOfFont) _ANSI_ARGS_((Tk_Font font)); /* 136 */
+ CONST84_RETURN char * (*tk_NameOfImage) _ANSI_ARGS_((Tk_ImageMaster imageMaster)); /* 137 */
+ CONST84_RETURN char * (*tk_NameOfJoinStyle) _ANSI_ARGS_((int join)); /* 138 */
+ CONST84_RETURN char * (*tk_NameOfJustify) _ANSI_ARGS_((Tk_Justify justify)); /* 139 */
+ CONST84_RETURN char * (*tk_NameOfRelief) _ANSI_ARGS_((int relief)); /* 140 */
+ Tk_Window (*tk_NameToWindow) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * pathName, Tk_Window tkwin)); /* 141 */
+ void (*tk_OwnSelection) _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Tk_LostSelProc * proc, ClientData clientData)); /* 142 */
+ int (*tk_ParseArgv) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, int * argcPtr, CONST84 Tcl_Obj *CONST *objv, Tk_ArgvInfo * argTable, int flags)); /* 143 */
+ void (*tk_PhotoPutBlock_NoComposite) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height)); /* 144 */
+ void (*tk_PhotoPutZoomedBlock_NoComposite) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY)); /* 145 */
+ int (*tk_PhotoGetImage) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr)); /* 146 */
+ void (*tk_PhotoBlank) _ANSI_ARGS_((Tk_PhotoHandle handle)); /* 147 */
+ void (*tk_PhotoExpand) _ANSI_ARGS_((Tk_PhotoHandle handle, int width, int height)); /* 148 */
+ void (*tk_PhotoGetSize) _ANSI_ARGS_((Tk_PhotoHandle handle, int * widthPtr, int * heightPtr)); /* 149 */
+ void (*tk_PhotoSetSize) _ANSI_ARGS_((Tk_PhotoHandle handle, int width, int height)); /* 150 */
+ int (*tk_PointToChar) _ANSI_ARGS_((Tk_TextLayout layout, int x, int y)); /* 151 */
+ int (*tk_PostscriptFontName) _ANSI_ARGS_((Tk_Font tkfont, Tcl_DString * dsPtr)); /* 152 */
+ void (*tk_PreserveColormap) _ANSI_ARGS_((Display * display, Colormap colormap)); /* 153 */
+ void (*tk_QueueWindowEvent) _ANSI_ARGS_((XEvent * eventPtr, Tcl_QueuePosition position)); /* 154 */
+ void (*tk_RedrawImage) _ANSI_ARGS_((Tk_Image image, int imageX, int imageY, int width, int height, Drawable drawable, int drawableX, int drawableY)); /* 155 */
+ void (*tk_ResizeWindow) _ANSI_ARGS_((Tk_Window tkwin, int width, int height)); /* 156 */
+ int (*tk_RestackWindow) _ANSI_ARGS_((Tk_Window tkwin, int aboveBelow, Tk_Window other)); /* 157 */
+ Tk_RestrictProc * (*tk_RestrictEvents) _ANSI_ARGS_((Tk_RestrictProc * proc, ClientData arg, ClientData * prevArgPtr)); /* 158 */
+ int (*tk_SafeInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 159 */
+ CONST char * (*tk_SetAppName) _ANSI_ARGS_((Tk_Window tkwin, CONST char * name)); /* 160 */
+ void (*tk_SetBackgroundFromBorder) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border)); /* 161 */
+ void (*tk_SetClass) _ANSI_ARGS_((Tk_Window tkwin, CONST char * className)); /* 162 */
+ void (*tk_SetGrid) _ANSI_ARGS_((Tk_Window tkwin, int reqWidth, int reqHeight, int gridWidth, int gridHeight)); /* 163 */
+ void (*tk_SetInternalBorder) _ANSI_ARGS_((Tk_Window tkwin, int width)); /* 164 */
+ void (*tk_SetWindowBackground) _ANSI_ARGS_((Tk_Window tkwin, unsigned long pixel)); /* 165 */
+ void (*tk_SetWindowBackgroundPixmap) _ANSI_ARGS_((Tk_Window tkwin, Pixmap pixmap)); /* 166 */
+ void (*tk_SetWindowBorder) _ANSI_ARGS_((Tk_Window tkwin, unsigned long pixel)); /* 167 */
+ void (*tk_SetWindowBorderWidth) _ANSI_ARGS_((Tk_Window tkwin, int width)); /* 168 */
+ void (*tk_SetWindowBorderPixmap) _ANSI_ARGS_((Tk_Window tkwin, Pixmap pixmap)); /* 169 */
+ void (*tk_SetWindowColormap) _ANSI_ARGS_((Tk_Window tkwin, Colormap colormap)); /* 170 */
+ int (*tk_SetWindowVisual) _ANSI_ARGS_((Tk_Window tkwin, Visual * visual, int depth, Colormap colormap)); /* 171 */
+ void (*tk_SizeOfBitmap) _ANSI_ARGS_((Display * display, Pixmap bitmap, int * widthPtr, int * heightPtr)); /* 172 */
+ void (*tk_SizeOfImage) _ANSI_ARGS_((Tk_Image image, int * widthPtr, int * heightPtr)); /* 173 */
+ int (*tk_StrictMotif) _ANSI_ARGS_((Tk_Window tkwin)); /* 174 */
+ void (*tk_TextLayoutToPostscript) _ANSI_ARGS_((Tcl_Interp * interp, Tk_TextLayout layout)); /* 175 */
+ int (*tk_TextWidth) _ANSI_ARGS_((Tk_Font font, CONST char * str, int numBytes)); /* 176 */
+ void (*tk_UndefineCursor) _ANSI_ARGS_((Tk_Window window)); /* 177 */
+ void (*tk_UnderlineChars) _ANSI_ARGS_((Display * display, Drawable drawable, GC gc, Tk_Font tkfont, CONST char * source, int x, int y, int firstByte, int lastByte)); /* 178 */
+ void (*tk_UnderlineTextLayout) _ANSI_ARGS_((Display * display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, int underline)); /* 179 */
+ void (*tk_Ungrab) _ANSI_ARGS_((Tk_Window tkwin)); /* 180 */
+ void (*tk_UnmaintainGeometry) _ANSI_ARGS_((Tk_Window slave, Tk_Window master)); /* 181 */
+ void (*tk_UnmapWindow) _ANSI_ARGS_((Tk_Window tkwin)); /* 182 */
+ void (*tk_UnsetGrid) _ANSI_ARGS_((Tk_Window tkwin)); /* 183 */
+ void (*tk_UpdatePointer) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int state)); /* 184 */
+ Pixmap (*tk_AllocBitmapFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr)); /* 185 */
+ Tk_3DBorder (*tk_Alloc3DBorderFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr)); /* 186 */
+ XColor * (*tk_AllocColorFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr)); /* 187 */
+ Tk_Cursor (*tk_AllocCursorFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr)); /* 188 */
+ Tk_Font (*tk_AllocFontFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr)); /* 189 */
+ Tk_OptionTable (*tk_CreateOptionTable) _ANSI_ARGS_((Tcl_Interp * interp, CONST Tk_OptionSpec * templatePtr)); /* 190 */
+ void (*tk_DeleteOptionTable) _ANSI_ARGS_((Tk_OptionTable optionTable)); /* 191 */
+ void (*tk_Free3DBorderFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 192 */
+ void (*tk_FreeBitmapFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 193 */
+ void (*tk_FreeColorFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 194 */
+ void (*tk_FreeConfigOptions) _ANSI_ARGS_((char * recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin)); /* 195 */
+ void (*tk_FreeSavedOptions) _ANSI_ARGS_((Tk_SavedOptions * savePtr)); /* 196 */
+ void (*tk_FreeCursorFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 197 */
+ void (*tk_FreeFontFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 198 */
+ Tk_3DBorder (*tk_Get3DBorderFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 199 */
+ int (*tk_GetAnchorFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, Tk_Anchor * anchorPtr)); /* 200 */
+ Pixmap (*tk_GetBitmapFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 201 */
+ XColor * (*tk_GetColorFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 202 */
+ Tk_Cursor (*tk_GetCursorFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 203 */
+ Tcl_Obj * (*tk_GetOptionInfo) _ANSI_ARGS_((Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionTable, Tcl_Obj * namePtr, Tk_Window tkwin)); /* 204 */
+ Tcl_Obj * (*tk_GetOptionValue) _ANSI_ARGS_((Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionTable, Tcl_Obj * namePtr, Tk_Window tkwin)); /* 205 */
+ int (*tk_GetJustifyFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, Tk_Justify * justifyPtr)); /* 206 */
+ int (*tk_GetMMFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr, double * doublePtr)); /* 207 */
+ int (*tk_GetPixelsFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr, int * intPtr)); /* 208 */
+ int (*tk_GetReliefFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * resultPtr)); /* 209 */
+ int (*tk_GetScrollInfoObj) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], double * dblPtr, int * intPtr)); /* 210 */
+ int (*tk_InitOptions) _ANSI_ARGS_((Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin)); /* 211 */
+ void (*tk_MainEx) _ANSI_ARGS_((int argc, Tcl_Obj *CONST *objv, Tcl_AppInitProc * appInitProc, Tcl_Interp * interp)); /* 212 */
+ void (*tk_RestoreSavedOptions) _ANSI_ARGS_((Tk_SavedOptions * savePtr)); /* 213 */
+ int (*tk_SetOptions) _ANSI_ARGS_((Tcl_Interp * interp, char * recordPtr, Tk_OptionTable optionTable, int objc, Tcl_Obj *CONST objv[], Tk_Window tkwin, Tk_SavedOptions * savePtr, int * maskPtr)); /* 214 */
+ void (*tk_InitConsoleChannels) _ANSI_ARGS_((Tcl_Interp * interp)); /* 215 */
+ int (*tk_CreateConsoleWindow) _ANSI_ARGS_((Tcl_Interp * interp)); /* 216 */
+ void (*tk_CreateSmoothMethod) _ANSI_ARGS_((Tcl_Interp * interp, Tk_SmoothMethod * method)); /* 217 */
+ void *reserved218;
+ void *reserved219;
+ int (*tk_GetDash) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * value, Tk_Dash * dash)); /* 220 */
+ void (*tk_CreateOutline) _ANSI_ARGS_((Tk_Outline * outline)); /* 221 */
+ void (*tk_DeleteOutline) _ANSI_ARGS_((Display * display, Tk_Outline * outline)); /* 222 */
+ int (*tk_ConfigOutlineGC) _ANSI_ARGS_((XGCValues * gcValues, Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline)); /* 223 */
+ int (*tk_ChangeOutlineGC) _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline)); /* 224 */
+ int (*tk_ResetOutlineGC) _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline)); /* 225 */
+ int (*tk_CanvasPsOutline) _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item * item, Tk_Outline * outline)); /* 226 */
+ void (*tk_SetTSOrigin) _ANSI_ARGS_((Tk_Window tkwin, GC gc, int x, int y)); /* 227 */
+ int (*tk_CanvasGetCoordFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, Tcl_Obj * obj, double * doublePtr)); /* 228 */
+ void (*tk_CanvasSetOffset) _ANSI_ARGS_((Tk_Canvas canvas, GC gc, Tk_TSOffset * offset)); /* 229 */
+ void (*tk_DitherPhoto) _ANSI_ARGS_((Tk_PhotoHandle handle, int x, int y, int width, int height)); /* 230 */
+ int (*tk_PostscriptBitmap) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_PostscriptInfo psInfo, Pixmap bitmap, int startX, int startY, int width, int height)); /* 231 */
+ int (*tk_PostscriptColor) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PostscriptInfo psInfo, XColor * colorPtr)); /* 232 */
+ int (*tk_PostscriptFont) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PostscriptInfo psInfo, Tk_Font font)); /* 233 */
+ int (*tk_PostscriptImage) _ANSI_ARGS_((Tk_Image image, Tcl_Interp * interp, Tk_Window tkwin, Tk_PostscriptInfo psinfo, int x, int y, int width, int height, int prepass)); /* 234 */
+ void (*tk_PostscriptPath) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PostscriptInfo psInfo, double * coordPtr, int numPoints)); /* 235 */
+ int (*tk_PostscriptStipple) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_PostscriptInfo psInfo, Pixmap bitmap)); /* 236 */
+ double (*tk_PostscriptY) _ANSI_ARGS_((double y, Tk_PostscriptInfo psInfo)); /* 237 */
+ int (*tk_PostscriptPhoto) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PhotoImageBlock * blockPtr, Tk_PostscriptInfo psInfo, int width, int height)); /* 238 */
+ void (*tk_CreateClientMessageHandler) _ANSI_ARGS_((Tk_ClientMessageProc * proc)); /* 239 */
+ void (*tk_DeleteClientMessageHandler) _ANSI_ARGS_((Tk_ClientMessageProc * proc)); /* 240 */
+ Tk_Window (*tk_CreateAnonymousWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window parent, CONST char * screenName)); /* 241 */
+ void (*tk_SetClassProcs) _ANSI_ARGS_((Tk_Window tkwin, Tk_ClassProcs * procs, ClientData instanceData)); /* 242 */
+ void (*tk_SetInternalBorderEx) _ANSI_ARGS_((Tk_Window tkwin, int left, int right, int top, int bottom)); /* 243 */
+ void (*tk_SetMinimumRequestSize) _ANSI_ARGS_((Tk_Window tkwin, int minWidth, int minHeight)); /* 244 */
+ void (*tk_SetCaretPos) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int height)); /* 245 */
+ void (*tk_PhotoPutBlock) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int compRule)); /* 246 */
+ void (*tk_PhotoPutZoomedBlock) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule)); /* 247 */
+ int (*tk_CollapseMotionEvents) _ANSI_ARGS_((Display * display, int collapse)); /* 248 */
+ Tk_StyleEngine (*tk_RegisterStyleEngine) _ANSI_ARGS_((CONST char * name, Tk_StyleEngine parent)); /* 249 */
+ Tk_StyleEngine (*tk_GetStyleEngine) _ANSI_ARGS_((CONST char * name)); /* 250 */
+ int (*tk_RegisterStyledElement) _ANSI_ARGS_((Tk_StyleEngine engine, Tk_ElementSpec * templatePtr)); /* 251 */
+ int (*tk_GetElementId) _ANSI_ARGS_((CONST char * name)); /* 252 */
+ Tk_Style (*tk_CreateStyle) _ANSI_ARGS_((CONST char * name, Tk_StyleEngine engine, ClientData clientData)); /* 253 */
+ Tk_Style (*tk_GetStyle) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 254 */
+ void (*tk_FreeStyle) _ANSI_ARGS_((Tk_Style style)); /* 255 */
+ CONST char * (*tk_NameOfStyle) _ANSI_ARGS_((Tk_Style style)); /* 256 */
+ Tk_Style (*tk_AllocStyleFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 257 */
+ Tk_Style (*tk_GetStyleFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 258 */
+ void (*tk_FreeStyleFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 259 */
+ Tk_StyledElement (*tk_GetStyledElement) _ANSI_ARGS_((Tk_Style style, int elementId, Tk_OptionTable optionTable)); /* 260 */
+ void (*tk_GetElementSize) _ANSI_ARGS_((Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin, int width, int height, int inner, int * widthPtr, int * heightPtr)); /* 261 */
+ void (*tk_GetElementBox) _ANSI_ARGS_((Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin, int x, int y, int width, int height, int inner, int * xPtr, int * yPtr, int * widthPtr, int * heightPtr)); /* 262 */
+ int (*tk_GetElementBorderWidth) _ANSI_ARGS_((Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin)); /* 263 */
+ void (*tk_DrawElement) _ANSI_ARGS_((Tk_Style style, Tk_StyledElement element, char * recordPtr, Tk_Window tkwin, Drawable d, int x, int y, int width, int height, int state)); /* 264 */
+} TkStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TkStubs *tkStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifndef Tk_MainLoop
+#define Tk_MainLoop \
+ (tkStubsPtr->tk_MainLoop) /* 0 */
+#endif
+#ifndef Tk_3DBorderColor
+#define Tk_3DBorderColor \
+ (tkStubsPtr->tk_3DBorderColor) /* 1 */
+#endif
+#ifndef Tk_3DBorderGC
+#define Tk_3DBorderGC \
+ (tkStubsPtr->tk_3DBorderGC) /* 2 */
+#endif
+#ifndef Tk_3DHorizontalBevel
+#define Tk_3DHorizontalBevel \
+ (tkStubsPtr->tk_3DHorizontalBevel) /* 3 */
+#endif
+#ifndef Tk_3DVerticalBevel
+#define Tk_3DVerticalBevel \
+ (tkStubsPtr->tk_3DVerticalBevel) /* 4 */
+#endif
+#ifndef Tk_AddOption
+#define Tk_AddOption \
+ (tkStubsPtr->tk_AddOption) /* 5 */
+#endif
+#ifndef Tk_BindEvent
+#define Tk_BindEvent \
+ (tkStubsPtr->tk_BindEvent) /* 6 */
+#endif
+#ifndef Tk_CanvasDrawableCoords
+#define Tk_CanvasDrawableCoords \
+ (tkStubsPtr->tk_CanvasDrawableCoords) /* 7 */
+#endif
+#ifndef Tk_CanvasEventuallyRedraw
+#define Tk_CanvasEventuallyRedraw \
+ (tkStubsPtr->tk_CanvasEventuallyRedraw) /* 8 */
+#endif
+#ifndef Tk_CanvasGetCoord
+#define Tk_CanvasGetCoord \
+ (tkStubsPtr->tk_CanvasGetCoord) /* 9 */
+#endif
+#ifndef Tk_CanvasGetTextInfo
+#define Tk_CanvasGetTextInfo \
+ (tkStubsPtr->tk_CanvasGetTextInfo) /* 10 */
+#endif
+#ifndef Tk_CanvasPsBitmap
+#define Tk_CanvasPsBitmap \
+ (tkStubsPtr->tk_CanvasPsBitmap) /* 11 */
+#endif
+#ifndef Tk_CanvasPsColor
+#define Tk_CanvasPsColor \
+ (tkStubsPtr->tk_CanvasPsColor) /* 12 */
+#endif
+#ifndef Tk_CanvasPsFont
+#define Tk_CanvasPsFont \
+ (tkStubsPtr->tk_CanvasPsFont) /* 13 */
+#endif
+#ifndef Tk_CanvasPsPath
+#define Tk_CanvasPsPath \
+ (tkStubsPtr->tk_CanvasPsPath) /* 14 */
+#endif
+#ifndef Tk_CanvasPsStipple
+#define Tk_CanvasPsStipple \
+ (tkStubsPtr->tk_CanvasPsStipple) /* 15 */
+#endif
+#ifndef Tk_CanvasPsY
+#define Tk_CanvasPsY \
+ (tkStubsPtr->tk_CanvasPsY) /* 16 */
+#endif
+#ifndef Tk_CanvasSetStippleOrigin
+#define Tk_CanvasSetStippleOrigin \
+ (tkStubsPtr->tk_CanvasSetStippleOrigin) /* 17 */
+#endif
+#ifndef Tk_CanvasTagsParseProc
+#define Tk_CanvasTagsParseProc \
+ (tkStubsPtr->tk_CanvasTagsParseProc) /* 18 */
+#endif
+#ifndef Tk_CanvasTagsPrintProc
+#define Tk_CanvasTagsPrintProc \
+ (tkStubsPtr->tk_CanvasTagsPrintProc) /* 19 */
+#endif
+#ifndef Tk_CanvasTkwin
+#define Tk_CanvasTkwin \
+ (tkStubsPtr->tk_CanvasTkwin) /* 20 */
+#endif
+#ifndef Tk_CanvasWindowCoords
+#define Tk_CanvasWindowCoords \
+ (tkStubsPtr->tk_CanvasWindowCoords) /* 21 */
+#endif
+#ifndef Tk_ChangeWindowAttributes
+#define Tk_ChangeWindowAttributes \
+ (tkStubsPtr->tk_ChangeWindowAttributes) /* 22 */
+#endif
+#ifndef Tk_CharBbox
+#define Tk_CharBbox \
+ (tkStubsPtr->tk_CharBbox) /* 23 */
+#endif
+#ifndef Tk_ClearSelection
+#define Tk_ClearSelection \
+ (tkStubsPtr->tk_ClearSelection) /* 24 */
+#endif
+#ifndef Tk_ClipboardAppend
+#define Tk_ClipboardAppend \
+ (tkStubsPtr->tk_ClipboardAppend) /* 25 */
+#endif
+#ifndef Tk_ClipboardClear
+#define Tk_ClipboardClear \
+ (tkStubsPtr->tk_ClipboardClear) /* 26 */
+#endif
+#ifndef Tk_ConfigureInfo
+#define Tk_ConfigureInfo \
+ (tkStubsPtr->tk_ConfigureInfo) /* 27 */
+#endif
+#ifndef Tk_ConfigureValue
+#define Tk_ConfigureValue \
+ (tkStubsPtr->tk_ConfigureValue) /* 28 */
+#endif
+#ifndef Tk_ConfigureWidget
+#define Tk_ConfigureWidget \
+ (tkStubsPtr->tk_ConfigureWidget) /* 29 */
+#endif
+#ifndef Tk_ConfigureWindow
+#define Tk_ConfigureWindow \
+ (tkStubsPtr->tk_ConfigureWindow) /* 30 */
+#endif
+#ifndef Tk_ComputeTextLayout
+#define Tk_ComputeTextLayout \
+ (tkStubsPtr->tk_ComputeTextLayout) /* 31 */
+#endif
+#ifndef Tk_CoordsToWindow
+#define Tk_CoordsToWindow \
+ (tkStubsPtr->tk_CoordsToWindow) /* 32 */
+#endif
+#ifndef Tk_CreateBinding
+#define Tk_CreateBinding \
+ (tkStubsPtr->tk_CreateBinding) /* 33 */
+#endif
+#ifndef Tk_CreateBindingTable
+#define Tk_CreateBindingTable \
+ (tkStubsPtr->tk_CreateBindingTable) /* 34 */
+#endif
+#ifndef Tk_CreateErrorHandler
+#define Tk_CreateErrorHandler \
+ (tkStubsPtr->tk_CreateErrorHandler) /* 35 */
+#endif
+#ifndef Tk_CreateEventHandler
+#define Tk_CreateEventHandler \
+ (tkStubsPtr->tk_CreateEventHandler) /* 36 */
+#endif
+#ifndef Tk_CreateGenericHandler
+#define Tk_CreateGenericHandler \
+ (tkStubsPtr->tk_CreateGenericHandler) /* 37 */
+#endif
+#ifndef Tk_CreateImageType
+#define Tk_CreateImageType \
+ (tkStubsPtr->tk_CreateImageType) /* 38 */
+#endif
+#ifndef Tk_CreateItemType
+#define Tk_CreateItemType \
+ (tkStubsPtr->tk_CreateItemType) /* 39 */
+#endif
+#ifndef Tk_CreatePhotoImageFormat
+#define Tk_CreatePhotoImageFormat \
+ (tkStubsPtr->tk_CreatePhotoImageFormat) /* 40 */
+#endif
+#ifndef Tk_CreateSelHandler
+#define Tk_CreateSelHandler \
+ (tkStubsPtr->tk_CreateSelHandler) /* 41 */
+#endif
+#ifndef Tk_CreateWindow
+#define Tk_CreateWindow \
+ (tkStubsPtr->tk_CreateWindow) /* 42 */
+#endif
+#ifndef Tk_CreateWindowFromPath
+#define Tk_CreateWindowFromPath \
+ (tkStubsPtr->tk_CreateWindowFromPath) /* 43 */
+#endif
+#ifndef Tk_DefineBitmap
+#define Tk_DefineBitmap \
+ (tkStubsPtr->tk_DefineBitmap) /* 44 */
+#endif
+#ifndef Tk_DefineCursor
+#define Tk_DefineCursor \
+ (tkStubsPtr->tk_DefineCursor) /* 45 */
+#endif
+#ifndef Tk_DeleteAllBindings
+#define Tk_DeleteAllBindings \
+ (tkStubsPtr->tk_DeleteAllBindings) /* 46 */
+#endif
+#ifndef Tk_DeleteBinding
+#define Tk_DeleteBinding \
+ (tkStubsPtr->tk_DeleteBinding) /* 47 */
+#endif
+#ifndef Tk_DeleteBindingTable
+#define Tk_DeleteBindingTable \
+ (tkStubsPtr->tk_DeleteBindingTable) /* 48 */
+#endif
+#ifndef Tk_DeleteErrorHandler
+#define Tk_DeleteErrorHandler \
+ (tkStubsPtr->tk_DeleteErrorHandler) /* 49 */
+#endif
+#ifndef Tk_DeleteEventHandler
+#define Tk_DeleteEventHandler \
+ (tkStubsPtr->tk_DeleteEventHandler) /* 50 */
+#endif
+#ifndef Tk_DeleteGenericHandler
+#define Tk_DeleteGenericHandler \
+ (tkStubsPtr->tk_DeleteGenericHandler) /* 51 */
+#endif
+#ifndef Tk_DeleteImage
+#define Tk_DeleteImage \
+ (tkStubsPtr->tk_DeleteImage) /* 52 */
+#endif
+#ifndef Tk_DeleteSelHandler
+#define Tk_DeleteSelHandler \
+ (tkStubsPtr->tk_DeleteSelHandler) /* 53 */
+#endif
+#ifndef Tk_DestroyWindow
+#define Tk_DestroyWindow \
+ (tkStubsPtr->tk_DestroyWindow) /* 54 */
+#endif
+#ifndef Tk_DisplayName
+#define Tk_DisplayName \
+ (tkStubsPtr->tk_DisplayName) /* 55 */
+#endif
+#ifndef Tk_DistanceToTextLayout
+#define Tk_DistanceToTextLayout \
+ (tkStubsPtr->tk_DistanceToTextLayout) /* 56 */
+#endif
+#ifndef Tk_Draw3DPolygon
+#define Tk_Draw3DPolygon \
+ (tkStubsPtr->tk_Draw3DPolygon) /* 57 */
+#endif
+#ifndef Tk_Draw3DRectangle
+#define Tk_Draw3DRectangle \
+ (tkStubsPtr->tk_Draw3DRectangle) /* 58 */
+#endif
+#ifndef Tk_DrawChars
+#define Tk_DrawChars \
+ (tkStubsPtr->tk_DrawChars) /* 59 */
+#endif
+#ifndef Tk_DrawFocusHighlight
+#define Tk_DrawFocusHighlight \
+ (tkStubsPtr->tk_DrawFocusHighlight) /* 60 */
+#endif
+#ifndef Tk_DrawTextLayout
+#define Tk_DrawTextLayout \
+ (tkStubsPtr->tk_DrawTextLayout) /* 61 */
+#endif
+#ifndef Tk_Fill3DPolygon
+#define Tk_Fill3DPolygon \
+ (tkStubsPtr->tk_Fill3DPolygon) /* 62 */
+#endif
+#ifndef Tk_Fill3DRectangle
+#define Tk_Fill3DRectangle \
+ (tkStubsPtr->tk_Fill3DRectangle) /* 63 */
+#endif
+#ifndef Tk_FindPhoto
+#define Tk_FindPhoto \
+ (tkStubsPtr->tk_FindPhoto) /* 64 */
+#endif
+#ifndef Tk_FontId
+#define Tk_FontId \
+ (tkStubsPtr->tk_FontId) /* 65 */
+#endif
+#ifndef Tk_Free3DBorder
+#define Tk_Free3DBorder \
+ (tkStubsPtr->tk_Free3DBorder) /* 66 */
+#endif
+#ifndef Tk_FreeBitmap
+#define Tk_FreeBitmap \
+ (tkStubsPtr->tk_FreeBitmap) /* 67 */
+#endif
+#ifndef Tk_FreeColor
+#define Tk_FreeColor \
+ (tkStubsPtr->tk_FreeColor) /* 68 */
+#endif
+#ifndef Tk_FreeColormap
+#define Tk_FreeColormap \
+ (tkStubsPtr->tk_FreeColormap) /* 69 */
+#endif
+#ifndef Tk_FreeCursor
+#define Tk_FreeCursor \
+ (tkStubsPtr->tk_FreeCursor) /* 70 */
+#endif
+#ifndef Tk_FreeFont
+#define Tk_FreeFont \
+ (tkStubsPtr->tk_FreeFont) /* 71 */
+#endif
+#ifndef Tk_FreeGC
+#define Tk_FreeGC \
+ (tkStubsPtr->tk_FreeGC) /* 72 */
+#endif
+#ifndef Tk_FreeImage
+#define Tk_FreeImage \
+ (tkStubsPtr->tk_FreeImage) /* 73 */
+#endif
+#ifndef Tk_FreeOptions
+#define Tk_FreeOptions \
+ (tkStubsPtr->tk_FreeOptions) /* 74 */
+#endif
+#ifndef Tk_FreePixmap
+#define Tk_FreePixmap \
+ (tkStubsPtr->tk_FreePixmap) /* 75 */
+#endif
+#ifndef Tk_FreeTextLayout
+#define Tk_FreeTextLayout \
+ (tkStubsPtr->tk_FreeTextLayout) /* 76 */
+#endif
+#ifndef Tk_FreeXId
+#define Tk_FreeXId \
+ (tkStubsPtr->tk_FreeXId) /* 77 */
+#endif
+#ifndef Tk_GCForColor
+#define Tk_GCForColor \
+ (tkStubsPtr->tk_GCForColor) /* 78 */
+#endif
+#ifndef Tk_GeometryRequest
+#define Tk_GeometryRequest \
+ (tkStubsPtr->tk_GeometryRequest) /* 79 */
+#endif
+#ifndef Tk_Get3DBorder
+#define Tk_Get3DBorder \
+ (tkStubsPtr->tk_Get3DBorder) /* 80 */
+#endif
+#ifndef Tk_GetAllBindings
+#define Tk_GetAllBindings \
+ (tkStubsPtr->tk_GetAllBindings) /* 81 */
+#endif
+#ifndef Tk_GetAnchor
+#define Tk_GetAnchor \
+ (tkStubsPtr->tk_GetAnchor) /* 82 */
+#endif
+#ifndef Tk_GetAtomName
+#define Tk_GetAtomName \
+ (tkStubsPtr->tk_GetAtomName) /* 83 */
+#endif
+#ifndef Tk_GetBinding
+#define Tk_GetBinding \
+ (tkStubsPtr->tk_GetBinding) /* 84 */
+#endif
+#ifndef Tk_GetBitmap
+#define Tk_GetBitmap \
+ (tkStubsPtr->tk_GetBitmap) /* 85 */
+#endif
+#ifndef Tk_GetBitmapFromData
+#define Tk_GetBitmapFromData \
+ (tkStubsPtr->tk_GetBitmapFromData) /* 86 */
+#endif
+#ifndef Tk_GetCapStyle
+#define Tk_GetCapStyle \
+ (tkStubsPtr->tk_GetCapStyle) /* 87 */
+#endif
+#ifndef Tk_GetColor
+#define Tk_GetColor \
+ (tkStubsPtr->tk_GetColor) /* 88 */
+#endif
+#ifndef Tk_GetColorByValue
+#define Tk_GetColorByValue \
+ (tkStubsPtr->tk_GetColorByValue) /* 89 */
+#endif
+#ifndef Tk_GetColormap
+#define Tk_GetColormap \
+ (tkStubsPtr->tk_GetColormap) /* 90 */
+#endif
+#ifndef Tk_GetCursor
+#define Tk_GetCursor \
+ (tkStubsPtr->tk_GetCursor) /* 91 */
+#endif
+#ifndef Tk_GetCursorFromData
+#define Tk_GetCursorFromData \
+ (tkStubsPtr->tk_GetCursorFromData) /* 92 */
+#endif
+#ifndef Tk_GetFont
+#define Tk_GetFont \
+ (tkStubsPtr->tk_GetFont) /* 93 */
+#endif
+#ifndef Tk_GetFontFromObj
+#define Tk_GetFontFromObj \
+ (tkStubsPtr->tk_GetFontFromObj) /* 94 */
+#endif
+#ifndef Tk_GetFontMetrics
+#define Tk_GetFontMetrics \
+ (tkStubsPtr->tk_GetFontMetrics) /* 95 */
+#endif
+#ifndef Tk_GetGC
+#define Tk_GetGC \
+ (tkStubsPtr->tk_GetGC) /* 96 */
+#endif
+#ifndef Tk_GetImage
+#define Tk_GetImage \
+ (tkStubsPtr->tk_GetImage) /* 97 */
+#endif
+#ifndef Tk_GetImageMasterData
+#define Tk_GetImageMasterData \
+ (tkStubsPtr->tk_GetImageMasterData) /* 98 */
+#endif
+#ifndef Tk_GetItemTypes
+#define Tk_GetItemTypes \
+ (tkStubsPtr->tk_GetItemTypes) /* 99 */
+#endif
+#ifndef Tk_GetJoinStyle
+#define Tk_GetJoinStyle \
+ (tkStubsPtr->tk_GetJoinStyle) /* 100 */
+#endif
+#ifndef Tk_GetJustify
+#define Tk_GetJustify \
+ (tkStubsPtr->tk_GetJustify) /* 101 */
+#endif
+#ifndef Tk_GetNumMainWindows
+#define Tk_GetNumMainWindows \
+ (tkStubsPtr->tk_GetNumMainWindows) /* 102 */
+#endif
+#ifndef Tk_GetOption
+#define Tk_GetOption \
+ (tkStubsPtr->tk_GetOption) /* 103 */
+#endif
+#ifndef Tk_GetPixels
+#define Tk_GetPixels \
+ (tkStubsPtr->tk_GetPixels) /* 104 */
+#endif
+#ifndef Tk_GetPixmap
+#define Tk_GetPixmap \
+ (tkStubsPtr->tk_GetPixmap) /* 105 */
+#endif
+#ifndef Tk_GetRelief
+#define Tk_GetRelief \
+ (tkStubsPtr->tk_GetRelief) /* 106 */
+#endif
+#ifndef Tk_GetRootCoords
+#define Tk_GetRootCoords \
+ (tkStubsPtr->tk_GetRootCoords) /* 107 */
+#endif
+#ifndef Tk_GetScrollInfo
+#define Tk_GetScrollInfo \
+ (tkStubsPtr->tk_GetScrollInfo) /* 108 */
+#endif
+#ifndef Tk_GetScreenMM
+#define Tk_GetScreenMM \
+ (tkStubsPtr->tk_GetScreenMM) /* 109 */
+#endif
+#ifndef Tk_GetSelection
+#define Tk_GetSelection \
+ (tkStubsPtr->tk_GetSelection) /* 110 */
+#endif
+#ifndef Tk_GetUid
+#define Tk_GetUid \
+ (tkStubsPtr->tk_GetUid) /* 111 */
+#endif
+#ifndef Tk_GetVisual
+#define Tk_GetVisual \
+ (tkStubsPtr->tk_GetVisual) /* 112 */
+#endif
+#ifndef Tk_GetVRootGeometry
+#define Tk_GetVRootGeometry \
+ (tkStubsPtr->tk_GetVRootGeometry) /* 113 */
+#endif
+#ifndef Tk_Grab
+#define Tk_Grab \
+ (tkStubsPtr->tk_Grab) /* 114 */
+#endif
+#ifndef Tk_HandleEvent
+#define Tk_HandleEvent \
+ (tkStubsPtr->tk_HandleEvent) /* 115 */
+#endif
+#ifndef Tk_IdToWindow
+#define Tk_IdToWindow \
+ (tkStubsPtr->tk_IdToWindow) /* 116 */
+#endif
+#ifndef Tk_ImageChanged
+#define Tk_ImageChanged \
+ (tkStubsPtr->tk_ImageChanged) /* 117 */
+#endif
+#ifndef Tk_Init
+#define Tk_Init \
+ (tkStubsPtr->tk_Init) /* 118 */
+#endif
+#ifndef Tk_InternAtom
+#define Tk_InternAtom \
+ (tkStubsPtr->tk_InternAtom) /* 119 */
+#endif
+#ifndef Tk_IntersectTextLayout
+#define Tk_IntersectTextLayout \
+ (tkStubsPtr->tk_IntersectTextLayout) /* 120 */
+#endif
+#ifndef Tk_MaintainGeometry
+#define Tk_MaintainGeometry \
+ (tkStubsPtr->tk_MaintainGeometry) /* 121 */
+#endif
+#ifndef Tk_MainWindow
+#define Tk_MainWindow \
+ (tkStubsPtr->tk_MainWindow) /* 122 */
+#endif
+#ifndef Tk_MakeWindowExist
+#define Tk_MakeWindowExist \
+ (tkStubsPtr->tk_MakeWindowExist) /* 123 */
+#endif
+#ifndef Tk_ManageGeometry
+#define Tk_ManageGeometry \
+ (tkStubsPtr->tk_ManageGeometry) /* 124 */
+#endif
+#ifndef Tk_MapWindow
+#define Tk_MapWindow \
+ (tkStubsPtr->tk_MapWindow) /* 125 */
+#endif
+#ifndef Tk_MeasureChars
+#define Tk_MeasureChars \
+ (tkStubsPtr->tk_MeasureChars) /* 126 */
+#endif
+#ifndef Tk_MoveResizeWindow
+#define Tk_MoveResizeWindow \
+ (tkStubsPtr->tk_MoveResizeWindow) /* 127 */
+#endif
+#ifndef Tk_MoveWindow
+#define Tk_MoveWindow \
+ (tkStubsPtr->tk_MoveWindow) /* 128 */
+#endif
+#ifndef Tk_MoveToplevelWindow
+#define Tk_MoveToplevelWindow \
+ (tkStubsPtr->tk_MoveToplevelWindow) /* 129 */
+#endif
+#ifndef Tk_NameOf3DBorder
+#define Tk_NameOf3DBorder \
+ (tkStubsPtr->tk_NameOf3DBorder) /* 130 */
+#endif
+#ifndef Tk_NameOfAnchor
+#define Tk_NameOfAnchor \
+ (tkStubsPtr->tk_NameOfAnchor) /* 131 */
+#endif
+#ifndef Tk_NameOfBitmap
+#define Tk_NameOfBitmap \
+ (tkStubsPtr->tk_NameOfBitmap) /* 132 */
+#endif
+#ifndef Tk_NameOfCapStyle
+#define Tk_NameOfCapStyle \
+ (tkStubsPtr->tk_NameOfCapStyle) /* 133 */
+#endif
+#ifndef Tk_NameOfColor
+#define Tk_NameOfColor \
+ (tkStubsPtr->tk_NameOfColor) /* 134 */
+#endif
+#ifndef Tk_NameOfCursor
+#define Tk_NameOfCursor \
+ (tkStubsPtr->tk_NameOfCursor) /* 135 */
+#endif
+#ifndef Tk_NameOfFont
+#define Tk_NameOfFont \
+ (tkStubsPtr->tk_NameOfFont) /* 136 */
+#endif
+#ifndef Tk_NameOfImage
+#define Tk_NameOfImage \
+ (tkStubsPtr->tk_NameOfImage) /* 137 */
+#endif
+#ifndef Tk_NameOfJoinStyle
+#define Tk_NameOfJoinStyle \
+ (tkStubsPtr->tk_NameOfJoinStyle) /* 138 */
+#endif
+#ifndef Tk_NameOfJustify
+#define Tk_NameOfJustify \
+ (tkStubsPtr->tk_NameOfJustify) /* 139 */
+#endif
+#ifndef Tk_NameOfRelief
+#define Tk_NameOfRelief \
+ (tkStubsPtr->tk_NameOfRelief) /* 140 */
+#endif
+#ifndef Tk_NameToWindow
+#define Tk_NameToWindow \
+ (tkStubsPtr->tk_NameToWindow) /* 141 */
+#endif
+#ifndef Tk_OwnSelection
+#define Tk_OwnSelection \
+ (tkStubsPtr->tk_OwnSelection) /* 142 */
+#endif
+#ifndef Tk_ParseArgv
+#define Tk_ParseArgv \
+ (tkStubsPtr->tk_ParseArgv) /* 143 */
+#endif
+#ifndef Tk_PhotoPutBlock_NoComposite
+#define Tk_PhotoPutBlock_NoComposite \
+ (tkStubsPtr->tk_PhotoPutBlock_NoComposite) /* 144 */
+#endif
+#ifndef Tk_PhotoPutZoomedBlock_NoComposite
+#define Tk_PhotoPutZoomedBlock_NoComposite \
+ (tkStubsPtr->tk_PhotoPutZoomedBlock_NoComposite) /* 145 */
+#endif
+#ifndef Tk_PhotoGetImage
+#define Tk_PhotoGetImage \
+ (tkStubsPtr->tk_PhotoGetImage) /* 146 */
+#endif
+#ifndef Tk_PhotoBlank
+#define Tk_PhotoBlank \
+ (tkStubsPtr->tk_PhotoBlank) /* 147 */
+#endif
+#ifndef Tk_PhotoExpand
+#define Tk_PhotoExpand \
+ (tkStubsPtr->tk_PhotoExpand) /* 148 */
+#endif
+#ifndef Tk_PhotoGetSize
+#define Tk_PhotoGetSize \
+ (tkStubsPtr->tk_PhotoGetSize) /* 149 */
+#endif
+#ifndef Tk_PhotoSetSize
+#define Tk_PhotoSetSize \
+ (tkStubsPtr->tk_PhotoSetSize) /* 150 */
+#endif
+#ifndef Tk_PointToChar
+#define Tk_PointToChar \
+ (tkStubsPtr->tk_PointToChar) /* 151 */
+#endif
+#ifndef Tk_PostscriptFontName
+#define Tk_PostscriptFontName \
+ (tkStubsPtr->tk_PostscriptFontName) /* 152 */
+#endif
+#ifndef Tk_PreserveColormap
+#define Tk_PreserveColormap \
+ (tkStubsPtr->tk_PreserveColormap) /* 153 */
+#endif
+#ifndef Tk_QueueWindowEvent
+#define Tk_QueueWindowEvent \
+ (tkStubsPtr->tk_QueueWindowEvent) /* 154 */
+#endif
+#ifndef Tk_RedrawImage
+#define Tk_RedrawImage \
+ (tkStubsPtr->tk_RedrawImage) /* 155 */
+#endif
+#ifndef Tk_ResizeWindow
+#define Tk_ResizeWindow \
+ (tkStubsPtr->tk_ResizeWindow) /* 156 */
+#endif
+#ifndef Tk_RestackWindow
+#define Tk_RestackWindow \
+ (tkStubsPtr->tk_RestackWindow) /* 157 */
+#endif
+#ifndef Tk_RestrictEvents
+#define Tk_RestrictEvents \
+ (tkStubsPtr->tk_RestrictEvents) /* 158 */
+#endif
+#ifndef Tk_SafeInit
+#define Tk_SafeInit \
+ (tkStubsPtr->tk_SafeInit) /* 159 */
+#endif
+#ifndef Tk_SetAppName
+#define Tk_SetAppName \
+ (tkStubsPtr->tk_SetAppName) /* 160 */
+#endif
+#ifndef Tk_SetBackgroundFromBorder
+#define Tk_SetBackgroundFromBorder \
+ (tkStubsPtr->tk_SetBackgroundFromBorder) /* 161 */
+#endif
+#ifndef Tk_SetClass
+#define Tk_SetClass \
+ (tkStubsPtr->tk_SetClass) /* 162 */
+#endif
+#ifndef Tk_SetGrid
+#define Tk_SetGrid \
+ (tkStubsPtr->tk_SetGrid) /* 163 */
+#endif
+#ifndef Tk_SetInternalBorder
+#define Tk_SetInternalBorder \
+ (tkStubsPtr->tk_SetInternalBorder) /* 164 */
+#endif
+#ifndef Tk_SetWindowBackground
+#define Tk_SetWindowBackground \
+ (tkStubsPtr->tk_SetWindowBackground) /* 165 */
+#endif
+#ifndef Tk_SetWindowBackgroundPixmap
+#define Tk_SetWindowBackgroundPixmap \
+ (tkStubsPtr->tk_SetWindowBackgroundPixmap) /* 166 */
+#endif
+#ifndef Tk_SetWindowBorder
+#define Tk_SetWindowBorder \
+ (tkStubsPtr->tk_SetWindowBorder) /* 167 */
+#endif
+#ifndef Tk_SetWindowBorderWidth
+#define Tk_SetWindowBorderWidth \
+ (tkStubsPtr->tk_SetWindowBorderWidth) /* 168 */
+#endif
+#ifndef Tk_SetWindowBorderPixmap
+#define Tk_SetWindowBorderPixmap \
+ (tkStubsPtr->tk_SetWindowBorderPixmap) /* 169 */
+#endif
+#ifndef Tk_SetWindowColormap
+#define Tk_SetWindowColormap \
+ (tkStubsPtr->tk_SetWindowColormap) /* 170 */
+#endif
+#ifndef Tk_SetWindowVisual
+#define Tk_SetWindowVisual \
+ (tkStubsPtr->tk_SetWindowVisual) /* 171 */
+#endif
+#ifndef Tk_SizeOfBitmap
+#define Tk_SizeOfBitmap \
+ (tkStubsPtr->tk_SizeOfBitmap) /* 172 */
+#endif
+#ifndef Tk_SizeOfImage
+#define Tk_SizeOfImage \
+ (tkStubsPtr->tk_SizeOfImage) /* 173 */
+#endif
+#ifndef Tk_StrictMotif
+#define Tk_StrictMotif \
+ (tkStubsPtr->tk_StrictMotif) /* 174 */
+#endif
+#ifndef Tk_TextLayoutToPostscript
+#define Tk_TextLayoutToPostscript \
+ (tkStubsPtr->tk_TextLayoutToPostscript) /* 175 */
+#endif
+#ifndef Tk_TextWidth
+#define Tk_TextWidth \
+ (tkStubsPtr->tk_TextWidth) /* 176 */
+#endif
+#ifndef Tk_UndefineCursor
+#define Tk_UndefineCursor \
+ (tkStubsPtr->tk_UndefineCursor) /* 177 */
+#endif
+#ifndef Tk_UnderlineChars
+#define Tk_UnderlineChars \
+ (tkStubsPtr->tk_UnderlineChars) /* 178 */
+#endif
+#ifndef Tk_UnderlineTextLayout
+#define Tk_UnderlineTextLayout \
+ (tkStubsPtr->tk_UnderlineTextLayout) /* 179 */
+#endif
+#ifndef Tk_Ungrab
+#define Tk_Ungrab \
+ (tkStubsPtr->tk_Ungrab) /* 180 */
+#endif
+#ifndef Tk_UnmaintainGeometry
+#define Tk_UnmaintainGeometry \
+ (tkStubsPtr->tk_UnmaintainGeometry) /* 181 */
+#endif
+#ifndef Tk_UnmapWindow
+#define Tk_UnmapWindow \
+ (tkStubsPtr->tk_UnmapWindow) /* 182 */
+#endif
+#ifndef Tk_UnsetGrid
+#define Tk_UnsetGrid \
+ (tkStubsPtr->tk_UnsetGrid) /* 183 */
+#endif
+#ifndef Tk_UpdatePointer
+#define Tk_UpdatePointer \
+ (tkStubsPtr->tk_UpdatePointer) /* 184 */
+#endif
+#ifndef Tk_AllocBitmapFromObj
+#define Tk_AllocBitmapFromObj \
+ (tkStubsPtr->tk_AllocBitmapFromObj) /* 185 */
+#endif
+#ifndef Tk_Alloc3DBorderFromObj
+#define Tk_Alloc3DBorderFromObj \
+ (tkStubsPtr->tk_Alloc3DBorderFromObj) /* 186 */
+#endif
+#ifndef Tk_AllocColorFromObj
+#define Tk_AllocColorFromObj \
+ (tkStubsPtr->tk_AllocColorFromObj) /* 187 */
+#endif
+#ifndef Tk_AllocCursorFromObj
+#define Tk_AllocCursorFromObj \
+ (tkStubsPtr->tk_AllocCursorFromObj) /* 188 */
+#endif
+#ifndef Tk_AllocFontFromObj
+#define Tk_AllocFontFromObj \
+ (tkStubsPtr->tk_AllocFontFromObj) /* 189 */
+#endif
+#ifndef Tk_CreateOptionTable
+#define Tk_CreateOptionTable \
+ (tkStubsPtr->tk_CreateOptionTable) /* 190 */
+#endif
+#ifndef Tk_DeleteOptionTable
+#define Tk_DeleteOptionTable \
+ (tkStubsPtr->tk_DeleteOptionTable) /* 191 */
+#endif
+#ifndef Tk_Free3DBorderFromObj
+#define Tk_Free3DBorderFromObj \
+ (tkStubsPtr->tk_Free3DBorderFromObj) /* 192 */
+#endif
+#ifndef Tk_FreeBitmapFromObj
+#define Tk_FreeBitmapFromObj \
+ (tkStubsPtr->tk_FreeBitmapFromObj) /* 193 */
+#endif
+#ifndef Tk_FreeColorFromObj
+#define Tk_FreeColorFromObj \
+ (tkStubsPtr->tk_FreeColorFromObj) /* 194 */
+#endif
+#ifndef Tk_FreeConfigOptions
+#define Tk_FreeConfigOptions \
+ (tkStubsPtr->tk_FreeConfigOptions) /* 195 */
+#endif
+#ifndef Tk_FreeSavedOptions
+#define Tk_FreeSavedOptions \
+ (tkStubsPtr->tk_FreeSavedOptions) /* 196 */
+#endif
+#ifndef Tk_FreeCursorFromObj
+#define Tk_FreeCursorFromObj \
+ (tkStubsPtr->tk_FreeCursorFromObj) /* 197 */
+#endif
+#ifndef Tk_FreeFontFromObj
+#define Tk_FreeFontFromObj \
+ (tkStubsPtr->tk_FreeFontFromObj) /* 198 */
+#endif
+#ifndef Tk_Get3DBorderFromObj
+#define Tk_Get3DBorderFromObj \
+ (tkStubsPtr->tk_Get3DBorderFromObj) /* 199 */
+#endif
+#ifndef Tk_GetAnchorFromObj
+#define Tk_GetAnchorFromObj \
+ (tkStubsPtr->tk_GetAnchorFromObj) /* 200 */
+#endif
+#ifndef Tk_GetBitmapFromObj
+#define Tk_GetBitmapFromObj \
+ (tkStubsPtr->tk_GetBitmapFromObj) /* 201 */
+#endif
+#ifndef Tk_GetColorFromObj
+#define Tk_GetColorFromObj \
+ (tkStubsPtr->tk_GetColorFromObj) /* 202 */
+#endif
+#ifndef Tk_GetCursorFromObj
+#define Tk_GetCursorFromObj \
+ (tkStubsPtr->tk_GetCursorFromObj) /* 203 */
+#endif
+#ifndef Tk_GetOptionInfo
+#define Tk_GetOptionInfo \
+ (tkStubsPtr->tk_GetOptionInfo) /* 204 */
+#endif
+#ifndef Tk_GetOptionValue
+#define Tk_GetOptionValue \
+ (tkStubsPtr->tk_GetOptionValue) /* 205 */
+#endif
+#ifndef Tk_GetJustifyFromObj
+#define Tk_GetJustifyFromObj \
+ (tkStubsPtr->tk_GetJustifyFromObj) /* 206 */
+#endif
+#ifndef Tk_GetMMFromObj
+#define Tk_GetMMFromObj \
+ (tkStubsPtr->tk_GetMMFromObj) /* 207 */
+#endif
+#ifndef Tk_GetPixelsFromObj
+#define Tk_GetPixelsFromObj \
+ (tkStubsPtr->tk_GetPixelsFromObj) /* 208 */
+#endif
+#ifndef Tk_GetReliefFromObj
+#define Tk_GetReliefFromObj \
+ (tkStubsPtr->tk_GetReliefFromObj) /* 209 */
+#endif
+#ifndef Tk_GetScrollInfoObj
+#define Tk_GetScrollInfoObj \
+ (tkStubsPtr->tk_GetScrollInfoObj) /* 210 */
+#endif
+#ifndef Tk_InitOptions
+#define Tk_InitOptions \
+ (tkStubsPtr->tk_InitOptions) /* 211 */
+#endif
+#ifndef Tk_MainEx
+#define Tk_MainEx \
+ (tkStubsPtr->tk_MainEx) /* 212 */
+#endif
+#ifndef Tk_RestoreSavedOptions
+#define Tk_RestoreSavedOptions \
+ (tkStubsPtr->tk_RestoreSavedOptions) /* 213 */
+#endif
+#ifndef Tk_SetOptions
+#define Tk_SetOptions \
+ (tkStubsPtr->tk_SetOptions) /* 214 */
+#endif
+#ifndef Tk_InitConsoleChannels
+#define Tk_InitConsoleChannels \
+ (tkStubsPtr->tk_InitConsoleChannels) /* 215 */
+#endif
+#ifndef Tk_CreateConsoleWindow
+#define Tk_CreateConsoleWindow \
+ (tkStubsPtr->tk_CreateConsoleWindow) /* 216 */
+#endif
+#ifndef Tk_CreateSmoothMethod
+#define Tk_CreateSmoothMethod \
+ (tkStubsPtr->tk_CreateSmoothMethod) /* 217 */
+#endif
+/* Slot 218 is reserved */
+/* Slot 219 is reserved */
+#ifndef Tk_GetDash
+#define Tk_GetDash \
+ (tkStubsPtr->tk_GetDash) /* 220 */
+#endif
+#ifndef Tk_CreateOutline
+#define Tk_CreateOutline \
+ (tkStubsPtr->tk_CreateOutline) /* 221 */
+#endif
+#ifndef Tk_DeleteOutline
+#define Tk_DeleteOutline \
+ (tkStubsPtr->tk_DeleteOutline) /* 222 */
+#endif
+#ifndef Tk_ConfigOutlineGC
+#define Tk_ConfigOutlineGC \
+ (tkStubsPtr->tk_ConfigOutlineGC) /* 223 */
+#endif
+#ifndef Tk_ChangeOutlineGC
+#define Tk_ChangeOutlineGC \
+ (tkStubsPtr->tk_ChangeOutlineGC) /* 224 */
+#endif
+#ifndef Tk_ResetOutlineGC
+#define Tk_ResetOutlineGC \
+ (tkStubsPtr->tk_ResetOutlineGC) /* 225 */
+#endif
+#ifndef Tk_CanvasPsOutline
+#define Tk_CanvasPsOutline \
+ (tkStubsPtr->tk_CanvasPsOutline) /* 226 */
+#endif
+#ifndef Tk_SetTSOrigin
+#define Tk_SetTSOrigin \
+ (tkStubsPtr->tk_SetTSOrigin) /* 227 */
+#endif
+#ifndef Tk_CanvasGetCoordFromObj
+#define Tk_CanvasGetCoordFromObj \
+ (tkStubsPtr->tk_CanvasGetCoordFromObj) /* 228 */
+#endif
+#ifndef Tk_CanvasSetOffset
+#define Tk_CanvasSetOffset \
+ (tkStubsPtr->tk_CanvasSetOffset) /* 229 */
+#endif
+#ifndef Tk_DitherPhoto
+#define Tk_DitherPhoto \
+ (tkStubsPtr->tk_DitherPhoto) /* 230 */
+#endif
+#ifndef Tk_PostscriptBitmap
+#define Tk_PostscriptBitmap \
+ (tkStubsPtr->tk_PostscriptBitmap) /* 231 */
+#endif
+#ifndef Tk_PostscriptColor
+#define Tk_PostscriptColor \
+ (tkStubsPtr->tk_PostscriptColor) /* 232 */
+#endif
+#ifndef Tk_PostscriptFont
+#define Tk_PostscriptFont \
+ (tkStubsPtr->tk_PostscriptFont) /* 233 */
+#endif
+#ifndef Tk_PostscriptImage
+#define Tk_PostscriptImage \
+ (tkStubsPtr->tk_PostscriptImage) /* 234 */
+#endif
+#ifndef Tk_PostscriptPath
+#define Tk_PostscriptPath \
+ (tkStubsPtr->tk_PostscriptPath) /* 235 */
+#endif
+#ifndef Tk_PostscriptStipple
+#define Tk_PostscriptStipple \
+ (tkStubsPtr->tk_PostscriptStipple) /* 236 */
+#endif
+#ifndef Tk_PostscriptY
+#define Tk_PostscriptY \
+ (tkStubsPtr->tk_PostscriptY) /* 237 */
+#endif
+#ifndef Tk_PostscriptPhoto
+#define Tk_PostscriptPhoto \
+ (tkStubsPtr->tk_PostscriptPhoto) /* 238 */
+#endif
+#ifndef Tk_CreateClientMessageHandler
+#define Tk_CreateClientMessageHandler \
+ (tkStubsPtr->tk_CreateClientMessageHandler) /* 239 */
+#endif
+#ifndef Tk_DeleteClientMessageHandler
+#define Tk_DeleteClientMessageHandler \
+ (tkStubsPtr->tk_DeleteClientMessageHandler) /* 240 */
+#endif
+#ifndef Tk_CreateAnonymousWindow
+#define Tk_CreateAnonymousWindow \
+ (tkStubsPtr->tk_CreateAnonymousWindow) /* 241 */
+#endif
+#ifndef Tk_SetClassProcs
+#define Tk_SetClassProcs \
+ (tkStubsPtr->tk_SetClassProcs) /* 242 */
+#endif
+#ifndef Tk_SetInternalBorderEx
+#define Tk_SetInternalBorderEx \
+ (tkStubsPtr->tk_SetInternalBorderEx) /* 243 */
+#endif
+#ifndef Tk_SetMinimumRequestSize
+#define Tk_SetMinimumRequestSize \
+ (tkStubsPtr->tk_SetMinimumRequestSize) /* 244 */
+#endif
+#ifndef Tk_SetCaretPos
+#define Tk_SetCaretPos \
+ (tkStubsPtr->tk_SetCaretPos) /* 245 */
+#endif
+#ifndef Tk_PhotoPutBlock
+#define Tk_PhotoPutBlock \
+ (tkStubsPtr->tk_PhotoPutBlock) /* 246 */
+#endif
+#ifndef Tk_PhotoPutZoomedBlock
+#define Tk_PhotoPutZoomedBlock \
+ (tkStubsPtr->tk_PhotoPutZoomedBlock) /* 247 */
+#endif
+#ifndef Tk_CollapseMotionEvents
+#define Tk_CollapseMotionEvents \
+ (tkStubsPtr->tk_CollapseMotionEvents) /* 248 */
+#endif
+#ifndef Tk_RegisterStyleEngine
+#define Tk_RegisterStyleEngine \
+ (tkStubsPtr->tk_RegisterStyleEngine) /* 249 */
+#endif
+#ifndef Tk_GetStyleEngine
+#define Tk_GetStyleEngine \
+ (tkStubsPtr->tk_GetStyleEngine) /* 250 */
+#endif
+#ifndef Tk_RegisterStyledElement
+#define Tk_RegisterStyledElement \
+ (tkStubsPtr->tk_RegisterStyledElement) /* 251 */
+#endif
+#ifndef Tk_GetElementId
+#define Tk_GetElementId \
+ (tkStubsPtr->tk_GetElementId) /* 252 */
+#endif
+#ifndef Tk_CreateStyle
+#define Tk_CreateStyle \
+ (tkStubsPtr->tk_CreateStyle) /* 253 */
+#endif
+#ifndef Tk_GetStyle
+#define Tk_GetStyle \
+ (tkStubsPtr->tk_GetStyle) /* 254 */
+#endif
+#ifndef Tk_FreeStyle
+#define Tk_FreeStyle \
+ (tkStubsPtr->tk_FreeStyle) /* 255 */
+#endif
+#ifndef Tk_NameOfStyle
+#define Tk_NameOfStyle \
+ (tkStubsPtr->tk_NameOfStyle) /* 256 */
+#endif
+#ifndef Tk_AllocStyleFromObj
+#define Tk_AllocStyleFromObj \
+ (tkStubsPtr->tk_AllocStyleFromObj) /* 257 */
+#endif
+#ifndef Tk_GetStyleFromObj
+#define Tk_GetStyleFromObj \
+ (tkStubsPtr->tk_GetStyleFromObj) /* 258 */
+#endif
+#ifndef Tk_FreeStyleFromObj
+#define Tk_FreeStyleFromObj \
+ (tkStubsPtr->tk_FreeStyleFromObj) /* 259 */
+#endif
+#ifndef Tk_GetStyledElement
+#define Tk_GetStyledElement \
+ (tkStubsPtr->tk_GetStyledElement) /* 260 */
+#endif
+#ifndef Tk_GetElementSize
+#define Tk_GetElementSize \
+ (tkStubsPtr->tk_GetElementSize) /* 261 */
+#endif
+#ifndef Tk_GetElementBox
+#define Tk_GetElementBox \
+ (tkStubsPtr->tk_GetElementBox) /* 262 */
+#endif
+#ifndef Tk_GetElementBorderWidth
+#define Tk_GetElementBorderWidth \
+ (tkStubsPtr->tk_GetElementBorderWidth) /* 263 */
+#endif
+#ifndef Tk_DrawElement
+#define Tk_DrawElement \
+ (tkStubsPtr->tk_DrawElement) /* 264 */
+#endif
+
+#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKDECLS */
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.m
new file mode 100644
index 00000000000..02da549ab28
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.m
@@ -0,0 +1,870 @@
+#ifndef _TKDECLS_VM
+#define _TKDECLS_VM
+#include "tkDecls_f.h"
+#ifndef NO_VTABLES
+#ifndef Tk_3DBorderColor
+# define Tk_3DBorderColor (*TkdeclsVptr->V_Tk_3DBorderColor)
+#endif
+
+#ifndef Tk_3DBorderGC
+# define Tk_3DBorderGC (*TkdeclsVptr->V_Tk_3DBorderGC)
+#endif
+
+#ifndef Tk_3DHorizontalBevel
+# define Tk_3DHorizontalBevel (*TkdeclsVptr->V_Tk_3DHorizontalBevel)
+#endif
+
+#ifndef Tk_3DVerticalBevel
+# define Tk_3DVerticalBevel (*TkdeclsVptr->V_Tk_3DVerticalBevel)
+#endif
+
+#ifndef Tk_Alloc3DBorderFromObj
+# define Tk_Alloc3DBorderFromObj (*TkdeclsVptr->V_Tk_Alloc3DBorderFromObj)
+#endif
+
+#ifndef Tk_AllocBitmapFromObj
+# define Tk_AllocBitmapFromObj (*TkdeclsVptr->V_Tk_AllocBitmapFromObj)
+#endif
+
+#ifndef Tk_AllocColorFromObj
+# define Tk_AllocColorFromObj (*TkdeclsVptr->V_Tk_AllocColorFromObj)
+#endif
+
+#ifndef Tk_AllocCursorFromObj
+# define Tk_AllocCursorFromObj (*TkdeclsVptr->V_Tk_AllocCursorFromObj)
+#endif
+
+#ifndef Tk_AllocFontFromObj
+# define Tk_AllocFontFromObj (*TkdeclsVptr->V_Tk_AllocFontFromObj)
+#endif
+
+#ifndef Tk_AllocStyleFromObj
+# define Tk_AllocStyleFromObj (*TkdeclsVptr->V_Tk_AllocStyleFromObj)
+#endif
+
+#ifndef Tk_BindEvent
+# define Tk_BindEvent (*TkdeclsVptr->V_Tk_BindEvent)
+#endif
+
+#ifndef Tk_ChangeWindowAttributes
+# define Tk_ChangeWindowAttributes (*TkdeclsVptr->V_Tk_ChangeWindowAttributes)
+#endif
+
+#ifndef Tk_CharBbox
+# define Tk_CharBbox (*TkdeclsVptr->V_Tk_CharBbox)
+#endif
+
+#ifndef Tk_ClearSelection
+# define Tk_ClearSelection (*TkdeclsVptr->V_Tk_ClearSelection)
+#endif
+
+#ifndef Tk_ClipboardAppend
+# define Tk_ClipboardAppend (*TkdeclsVptr->V_Tk_ClipboardAppend)
+#endif
+
+#ifndef Tk_ClipboardClear
+# define Tk_ClipboardClear (*TkdeclsVptr->V_Tk_ClipboardClear)
+#endif
+
+#ifndef Tk_CollapseMotionEvents
+# define Tk_CollapseMotionEvents (*TkdeclsVptr->V_Tk_CollapseMotionEvents)
+#endif
+
+#ifndef Tk_ComputeTextLayout
+# define Tk_ComputeTextLayout (*TkdeclsVptr->V_Tk_ComputeTextLayout)
+#endif
+
+#ifndef Tk_ConfigureInfo
+# define Tk_ConfigureInfo (*TkdeclsVptr->V_Tk_ConfigureInfo)
+#endif
+
+#ifndef Tk_ConfigureValue
+# define Tk_ConfigureValue (*TkdeclsVptr->V_Tk_ConfigureValue)
+#endif
+
+#ifndef Tk_ConfigureWidget
+# define Tk_ConfigureWidget (*TkdeclsVptr->V_Tk_ConfigureWidget)
+#endif
+
+#ifndef Tk_ConfigureWindow
+# define Tk_ConfigureWindow (*TkdeclsVptr->V_Tk_ConfigureWindow)
+#endif
+
+#ifndef Tk_CoordsToWindow
+# define Tk_CoordsToWindow (*TkdeclsVptr->V_Tk_CoordsToWindow)
+#endif
+
+#ifndef Tk_CreateAnonymousWindow
+# define Tk_CreateAnonymousWindow (*TkdeclsVptr->V_Tk_CreateAnonymousWindow)
+#endif
+
+#ifndef Tk_CreateBinding
+# define Tk_CreateBinding (*TkdeclsVptr->V_Tk_CreateBinding)
+#endif
+
+#ifndef Tk_CreateBindingTable
+# define Tk_CreateBindingTable (*TkdeclsVptr->V_Tk_CreateBindingTable)
+#endif
+
+#ifndef Tk_CreateClientMessageHandler
+# define Tk_CreateClientMessageHandler (*TkdeclsVptr->V_Tk_CreateClientMessageHandler)
+#endif
+
+#ifndef Tk_CreateErrorHandler
+# define Tk_CreateErrorHandler (*TkdeclsVptr->V_Tk_CreateErrorHandler)
+#endif
+
+#ifndef Tk_CreateEventHandler
+# define Tk_CreateEventHandler (*TkdeclsVptr->V_Tk_CreateEventHandler)
+#endif
+
+#ifndef Tk_CreateGenericHandler
+# define Tk_CreateGenericHandler (*TkdeclsVptr->V_Tk_CreateGenericHandler)
+#endif
+
+#ifndef Tk_CreateImageType
+# define Tk_CreateImageType (*TkdeclsVptr->V_Tk_CreateImageType)
+#endif
+
+#ifndef Tk_CreateOptionTable
+# define Tk_CreateOptionTable (*TkdeclsVptr->V_Tk_CreateOptionTable)
+#endif
+
+#ifndef Tk_CreateSelHandler
+# define Tk_CreateSelHandler (*TkdeclsVptr->V_Tk_CreateSelHandler)
+#endif
+
+#ifndef Tk_CreateStyle
+# define Tk_CreateStyle (*TkdeclsVptr->V_Tk_CreateStyle)
+#endif
+
+#ifndef Tk_CreateWindow
+# define Tk_CreateWindow (*TkdeclsVptr->V_Tk_CreateWindow)
+#endif
+
+#ifndef Tk_CreateWindowFromPath
+# define Tk_CreateWindowFromPath (*TkdeclsVptr->V_Tk_CreateWindowFromPath)
+#endif
+
+#ifndef Tk_DefineBitmap
+# define Tk_DefineBitmap (*TkdeclsVptr->V_Tk_DefineBitmap)
+#endif
+
+#ifndef Tk_DefineCursor
+# define Tk_DefineCursor (*TkdeclsVptr->V_Tk_DefineCursor)
+#endif
+
+#ifndef Tk_DeleteAllBindings
+# define Tk_DeleteAllBindings (*TkdeclsVptr->V_Tk_DeleteAllBindings)
+#endif
+
+#ifndef Tk_DeleteBinding
+# define Tk_DeleteBinding (*TkdeclsVptr->V_Tk_DeleteBinding)
+#endif
+
+#ifndef Tk_DeleteBindingTable
+# define Tk_DeleteBindingTable (*TkdeclsVptr->V_Tk_DeleteBindingTable)
+#endif
+
+#ifndef Tk_DeleteClientMessageHandler
+# define Tk_DeleteClientMessageHandler (*TkdeclsVptr->V_Tk_DeleteClientMessageHandler)
+#endif
+
+#ifndef Tk_DeleteErrorHandler
+# define Tk_DeleteErrorHandler (*TkdeclsVptr->V_Tk_DeleteErrorHandler)
+#endif
+
+#ifndef Tk_DeleteEventHandler
+# define Tk_DeleteEventHandler (*TkdeclsVptr->V_Tk_DeleteEventHandler)
+#endif
+
+#ifndef Tk_DeleteGenericHandler
+# define Tk_DeleteGenericHandler (*TkdeclsVptr->V_Tk_DeleteGenericHandler)
+#endif
+
+#ifndef Tk_DeleteImage
+# define Tk_DeleteImage (*TkdeclsVptr->V_Tk_DeleteImage)
+#endif
+
+#ifndef Tk_DeleteOptionTable
+# define Tk_DeleteOptionTable (*TkdeclsVptr->V_Tk_DeleteOptionTable)
+#endif
+
+#ifndef Tk_DeleteSelHandler
+# define Tk_DeleteSelHandler (*TkdeclsVptr->V_Tk_DeleteSelHandler)
+#endif
+
+#ifndef Tk_DestroyWindow
+# define Tk_DestroyWindow (*TkdeclsVptr->V_Tk_DestroyWindow)
+#endif
+
+#ifndef Tk_DisplayName
+# define Tk_DisplayName (*TkdeclsVptr->V_Tk_DisplayName)
+#endif
+
+#ifndef Tk_DistanceToTextLayout
+# define Tk_DistanceToTextLayout (*TkdeclsVptr->V_Tk_DistanceToTextLayout)
+#endif
+
+#ifndef Tk_Draw3DPolygon
+# define Tk_Draw3DPolygon (*TkdeclsVptr->V_Tk_Draw3DPolygon)
+#endif
+
+#ifndef Tk_Draw3DRectangle
+# define Tk_Draw3DRectangle (*TkdeclsVptr->V_Tk_Draw3DRectangle)
+#endif
+
+#ifndef Tk_DrawChars
+# define Tk_DrawChars (*TkdeclsVptr->V_Tk_DrawChars)
+#endif
+
+#ifndef Tk_DrawElement
+# define Tk_DrawElement (*TkdeclsVptr->V_Tk_DrawElement)
+#endif
+
+#ifndef Tk_DrawFocusHighlight
+# define Tk_DrawFocusHighlight (*TkdeclsVptr->V_Tk_DrawFocusHighlight)
+#endif
+
+#ifndef Tk_DrawTextLayout
+# define Tk_DrawTextLayout (*TkdeclsVptr->V_Tk_DrawTextLayout)
+#endif
+
+#ifndef Tk_Fill3DPolygon
+# define Tk_Fill3DPolygon (*TkdeclsVptr->V_Tk_Fill3DPolygon)
+#endif
+
+#ifndef Tk_Fill3DRectangle
+# define Tk_Fill3DRectangle (*TkdeclsVptr->V_Tk_Fill3DRectangle)
+#endif
+
+#ifndef Tk_FontId
+# define Tk_FontId (*TkdeclsVptr->V_Tk_FontId)
+#endif
+
+#ifndef Tk_Free3DBorder
+# define Tk_Free3DBorder (*TkdeclsVptr->V_Tk_Free3DBorder)
+#endif
+
+#ifndef Tk_Free3DBorderFromObj
+# define Tk_Free3DBorderFromObj (*TkdeclsVptr->V_Tk_Free3DBorderFromObj)
+#endif
+
+#ifndef Tk_FreeBitmap
+# define Tk_FreeBitmap (*TkdeclsVptr->V_Tk_FreeBitmap)
+#endif
+
+#ifndef Tk_FreeBitmapFromObj
+# define Tk_FreeBitmapFromObj (*TkdeclsVptr->V_Tk_FreeBitmapFromObj)
+#endif
+
+#ifndef Tk_FreeColor
+# define Tk_FreeColor (*TkdeclsVptr->V_Tk_FreeColor)
+#endif
+
+#ifndef Tk_FreeColorFromObj
+# define Tk_FreeColorFromObj (*TkdeclsVptr->V_Tk_FreeColorFromObj)
+#endif
+
+#ifndef Tk_FreeColormap
+# define Tk_FreeColormap (*TkdeclsVptr->V_Tk_FreeColormap)
+#endif
+
+#ifndef Tk_FreeConfigOptions
+# define Tk_FreeConfigOptions (*TkdeclsVptr->V_Tk_FreeConfigOptions)
+#endif
+
+#ifndef Tk_FreeCursor
+# define Tk_FreeCursor (*TkdeclsVptr->V_Tk_FreeCursor)
+#endif
+
+#ifndef Tk_FreeCursorFromObj
+# define Tk_FreeCursorFromObj (*TkdeclsVptr->V_Tk_FreeCursorFromObj)
+#endif
+
+#ifndef Tk_FreeFont
+# define Tk_FreeFont (*TkdeclsVptr->V_Tk_FreeFont)
+#endif
+
+#ifndef Tk_FreeFontFromObj
+# define Tk_FreeFontFromObj (*TkdeclsVptr->V_Tk_FreeFontFromObj)
+#endif
+
+#ifndef Tk_FreeGC
+# define Tk_FreeGC (*TkdeclsVptr->V_Tk_FreeGC)
+#endif
+
+#ifndef Tk_FreeImage
+# define Tk_FreeImage (*TkdeclsVptr->V_Tk_FreeImage)
+#endif
+
+#ifndef Tk_FreeOptions
+# define Tk_FreeOptions (*TkdeclsVptr->V_Tk_FreeOptions)
+#endif
+
+#ifndef Tk_FreePixmap
+# define Tk_FreePixmap (*TkdeclsVptr->V_Tk_FreePixmap)
+#endif
+
+#ifndef Tk_FreeSavedOptions
+# define Tk_FreeSavedOptions (*TkdeclsVptr->V_Tk_FreeSavedOptions)
+#endif
+
+#ifndef Tk_FreeStyle
+# define Tk_FreeStyle (*TkdeclsVptr->V_Tk_FreeStyle)
+#endif
+
+#ifndef Tk_FreeStyleFromObj
+# define Tk_FreeStyleFromObj (*TkdeclsVptr->V_Tk_FreeStyleFromObj)
+#endif
+
+#ifndef Tk_FreeTextLayout
+# define Tk_FreeTextLayout (*TkdeclsVptr->V_Tk_FreeTextLayout)
+#endif
+
+#ifndef Tk_FreeXId
+# define Tk_FreeXId (*TkdeclsVptr->V_Tk_FreeXId)
+#endif
+
+#ifndef Tk_GCForColor
+# define Tk_GCForColor (*TkdeclsVptr->V_Tk_GCForColor)
+#endif
+
+#ifndef Tk_GeometryRequest
+# define Tk_GeometryRequest (*TkdeclsVptr->V_Tk_GeometryRequest)
+#endif
+
+#ifndef Tk_Get3DBorder
+# define Tk_Get3DBorder (*TkdeclsVptr->V_Tk_Get3DBorder)
+#endif
+
+#ifndef Tk_Get3DBorderFromObj
+# define Tk_Get3DBorderFromObj (*TkdeclsVptr->V_Tk_Get3DBorderFromObj)
+#endif
+
+#ifndef Tk_GetAllBindings
+# define Tk_GetAllBindings (*TkdeclsVptr->V_Tk_GetAllBindings)
+#endif
+
+#ifndef Tk_GetAnchor
+# define Tk_GetAnchor (*TkdeclsVptr->V_Tk_GetAnchor)
+#endif
+
+#ifndef Tk_GetAnchorFromObj
+# define Tk_GetAnchorFromObj (*TkdeclsVptr->V_Tk_GetAnchorFromObj)
+#endif
+
+#ifndef Tk_GetAtomName
+# define Tk_GetAtomName (*TkdeclsVptr->V_Tk_GetAtomName)
+#endif
+
+#ifndef Tk_GetBinding
+# define Tk_GetBinding (*TkdeclsVptr->V_Tk_GetBinding)
+#endif
+
+#ifndef Tk_GetBitmap
+# define Tk_GetBitmap (*TkdeclsVptr->V_Tk_GetBitmap)
+#endif
+
+#ifndef Tk_GetBitmapFromData
+# define Tk_GetBitmapFromData (*TkdeclsVptr->V_Tk_GetBitmapFromData)
+#endif
+
+#ifndef Tk_GetBitmapFromObj
+# define Tk_GetBitmapFromObj (*TkdeclsVptr->V_Tk_GetBitmapFromObj)
+#endif
+
+#ifndef Tk_GetCapStyle
+# define Tk_GetCapStyle (*TkdeclsVptr->V_Tk_GetCapStyle)
+#endif
+
+#ifndef Tk_GetColor
+# define Tk_GetColor (*TkdeclsVptr->V_Tk_GetColor)
+#endif
+
+#ifndef Tk_GetColorByValue
+# define Tk_GetColorByValue (*TkdeclsVptr->V_Tk_GetColorByValue)
+#endif
+
+#ifndef Tk_GetColorFromObj
+# define Tk_GetColorFromObj (*TkdeclsVptr->V_Tk_GetColorFromObj)
+#endif
+
+#ifndef Tk_GetColormap
+# define Tk_GetColormap (*TkdeclsVptr->V_Tk_GetColormap)
+#endif
+
+#ifndef Tk_GetCursor
+# define Tk_GetCursor (*TkdeclsVptr->V_Tk_GetCursor)
+#endif
+
+#ifndef Tk_GetCursorFromData
+# define Tk_GetCursorFromData (*TkdeclsVptr->V_Tk_GetCursorFromData)
+#endif
+
+#ifndef Tk_GetCursorFromObj
+# define Tk_GetCursorFromObj (*TkdeclsVptr->V_Tk_GetCursorFromObj)
+#endif
+
+#ifndef Tk_GetElementBorderWidth
+# define Tk_GetElementBorderWidth (*TkdeclsVptr->V_Tk_GetElementBorderWidth)
+#endif
+
+#ifndef Tk_GetElementBox
+# define Tk_GetElementBox (*TkdeclsVptr->V_Tk_GetElementBox)
+#endif
+
+#ifndef Tk_GetElementId
+# define Tk_GetElementId (*TkdeclsVptr->V_Tk_GetElementId)
+#endif
+
+#ifndef Tk_GetElementSize
+# define Tk_GetElementSize (*TkdeclsVptr->V_Tk_GetElementSize)
+#endif
+
+#ifndef Tk_GetFont
+# define Tk_GetFont (*TkdeclsVptr->V_Tk_GetFont)
+#endif
+
+#ifndef Tk_GetFontFromObj
+# define Tk_GetFontFromObj (*TkdeclsVptr->V_Tk_GetFontFromObj)
+#endif
+
+#ifndef Tk_GetFontMetrics
+# define Tk_GetFontMetrics (*TkdeclsVptr->V_Tk_GetFontMetrics)
+#endif
+
+#ifndef Tk_GetGC
+# define Tk_GetGC (*TkdeclsVptr->V_Tk_GetGC)
+#endif
+
+#ifndef Tk_GetImage
+# define Tk_GetImage (*TkdeclsVptr->V_Tk_GetImage)
+#endif
+
+#ifndef Tk_GetImageMasterData
+# define Tk_GetImageMasterData (*TkdeclsVptr->V_Tk_GetImageMasterData)
+#endif
+
+#ifndef Tk_GetJoinStyle
+# define Tk_GetJoinStyle (*TkdeclsVptr->V_Tk_GetJoinStyle)
+#endif
+
+#ifndef Tk_GetJustify
+# define Tk_GetJustify (*TkdeclsVptr->V_Tk_GetJustify)
+#endif
+
+#ifndef Tk_GetJustifyFromObj
+# define Tk_GetJustifyFromObj (*TkdeclsVptr->V_Tk_GetJustifyFromObj)
+#endif
+
+#ifndef Tk_GetMMFromObj
+# define Tk_GetMMFromObj (*TkdeclsVptr->V_Tk_GetMMFromObj)
+#endif
+
+#ifndef Tk_GetNumMainWindows
+# define Tk_GetNumMainWindows (*TkdeclsVptr->V_Tk_GetNumMainWindows)
+#endif
+
+#ifndef Tk_GetOptionInfo
+# define Tk_GetOptionInfo (*TkdeclsVptr->V_Tk_GetOptionInfo)
+#endif
+
+#ifndef Tk_GetOptionValue
+# define Tk_GetOptionValue (*TkdeclsVptr->V_Tk_GetOptionValue)
+#endif
+
+#ifndef Tk_GetPixels
+# define Tk_GetPixels (*TkdeclsVptr->V_Tk_GetPixels)
+#endif
+
+#ifndef Tk_GetPixelsFromObj
+# define Tk_GetPixelsFromObj (*TkdeclsVptr->V_Tk_GetPixelsFromObj)
+#endif
+
+#ifndef Tk_GetPixmap
+# define Tk_GetPixmap (*TkdeclsVptr->V_Tk_GetPixmap)
+#endif
+
+#ifndef Tk_GetRelief
+# define Tk_GetRelief (*TkdeclsVptr->V_Tk_GetRelief)
+#endif
+
+#ifndef Tk_GetReliefFromObj
+# define Tk_GetReliefFromObj (*TkdeclsVptr->V_Tk_GetReliefFromObj)
+#endif
+
+#ifndef Tk_GetRootCoords
+# define Tk_GetRootCoords (*TkdeclsVptr->V_Tk_GetRootCoords)
+#endif
+
+#ifndef Tk_GetScreenMM
+# define Tk_GetScreenMM (*TkdeclsVptr->V_Tk_GetScreenMM)
+#endif
+
+#ifndef Tk_GetScrollInfo
+# define Tk_GetScrollInfo (*TkdeclsVptr->V_Tk_GetScrollInfo)
+#endif
+
+#ifndef Tk_GetScrollInfoObj
+# define Tk_GetScrollInfoObj (*TkdeclsVptr->V_Tk_GetScrollInfoObj)
+#endif
+
+#ifndef Tk_GetSelection
+# define Tk_GetSelection (*TkdeclsVptr->V_Tk_GetSelection)
+#endif
+
+#ifndef Tk_GetStyle
+# define Tk_GetStyle (*TkdeclsVptr->V_Tk_GetStyle)
+#endif
+
+#ifndef Tk_GetStyleEngine
+# define Tk_GetStyleEngine (*TkdeclsVptr->V_Tk_GetStyleEngine)
+#endif
+
+#ifndef Tk_GetStyleFromObj
+# define Tk_GetStyleFromObj (*TkdeclsVptr->V_Tk_GetStyleFromObj)
+#endif
+
+#ifndef Tk_GetStyledElement
+# define Tk_GetStyledElement (*TkdeclsVptr->V_Tk_GetStyledElement)
+#endif
+
+#ifndef Tk_GetUid
+# define Tk_GetUid (*TkdeclsVptr->V_Tk_GetUid)
+#endif
+
+#ifndef Tk_GetVRootGeometry
+# define Tk_GetVRootGeometry (*TkdeclsVptr->V_Tk_GetVRootGeometry)
+#endif
+
+#ifndef Tk_GetVisual
+# define Tk_GetVisual (*TkdeclsVptr->V_Tk_GetVisual)
+#endif
+
+#ifndef Tk_Grab
+# define Tk_Grab (*TkdeclsVptr->V_Tk_Grab)
+#endif
+
+#ifndef Tk_HandleEvent
+# define Tk_HandleEvent (*TkdeclsVptr->V_Tk_HandleEvent)
+#endif
+
+#ifndef Tk_IdToWindow
+# define Tk_IdToWindow (*TkdeclsVptr->V_Tk_IdToWindow)
+#endif
+
+#ifndef Tk_ImageChanged
+# define Tk_ImageChanged (*TkdeclsVptr->V_Tk_ImageChanged)
+#endif
+
+#ifndef Tk_InitOptions
+# define Tk_InitOptions (*TkdeclsVptr->V_Tk_InitOptions)
+#endif
+
+#ifndef Tk_InternAtom
+# define Tk_InternAtom (*TkdeclsVptr->V_Tk_InternAtom)
+#endif
+
+#ifndef Tk_IntersectTextLayout
+# define Tk_IntersectTextLayout (*TkdeclsVptr->V_Tk_IntersectTextLayout)
+#endif
+
+#ifndef Tk_MainLoop
+# define Tk_MainLoop (*TkdeclsVptr->V_Tk_MainLoop)
+#endif
+
+#ifndef Tk_MainWindow
+# define Tk_MainWindow (*TkdeclsVptr->V_Tk_MainWindow)
+#endif
+
+#ifndef Tk_MaintainGeometry
+# define Tk_MaintainGeometry (*TkdeclsVptr->V_Tk_MaintainGeometry)
+#endif
+
+#ifndef Tk_MakeWindowExist
+# define Tk_MakeWindowExist (*TkdeclsVptr->V_Tk_MakeWindowExist)
+#endif
+
+#ifndef Tk_ManageGeometry
+# define Tk_ManageGeometry (*TkdeclsVptr->V_Tk_ManageGeometry)
+#endif
+
+#ifndef Tk_MapWindow
+# define Tk_MapWindow (*TkdeclsVptr->V_Tk_MapWindow)
+#endif
+
+#ifndef Tk_MeasureChars
+# define Tk_MeasureChars (*TkdeclsVptr->V_Tk_MeasureChars)
+#endif
+
+#ifndef Tk_MoveResizeWindow
+# define Tk_MoveResizeWindow (*TkdeclsVptr->V_Tk_MoveResizeWindow)
+#endif
+
+#ifndef Tk_MoveToplevelWindow
+# define Tk_MoveToplevelWindow (*TkdeclsVptr->V_Tk_MoveToplevelWindow)
+#endif
+
+#ifndef Tk_MoveWindow
+# define Tk_MoveWindow (*TkdeclsVptr->V_Tk_MoveWindow)
+#endif
+
+#ifndef Tk_NameOf3DBorder
+# define Tk_NameOf3DBorder (*TkdeclsVptr->V_Tk_NameOf3DBorder)
+#endif
+
+#ifndef Tk_NameOfAnchor
+# define Tk_NameOfAnchor (*TkdeclsVptr->V_Tk_NameOfAnchor)
+#endif
+
+#ifndef Tk_NameOfBitmap
+# define Tk_NameOfBitmap (*TkdeclsVptr->V_Tk_NameOfBitmap)
+#endif
+
+#ifndef Tk_NameOfCapStyle
+# define Tk_NameOfCapStyle (*TkdeclsVptr->V_Tk_NameOfCapStyle)
+#endif
+
+#ifndef Tk_NameOfColor
+# define Tk_NameOfColor (*TkdeclsVptr->V_Tk_NameOfColor)
+#endif
+
+#ifndef Tk_NameOfCursor
+# define Tk_NameOfCursor (*TkdeclsVptr->V_Tk_NameOfCursor)
+#endif
+
+#ifndef Tk_NameOfFont
+# define Tk_NameOfFont (*TkdeclsVptr->V_Tk_NameOfFont)
+#endif
+
+#ifndef Tk_NameOfImage
+# define Tk_NameOfImage (*TkdeclsVptr->V_Tk_NameOfImage)
+#endif
+
+#ifndef Tk_NameOfJoinStyle
+# define Tk_NameOfJoinStyle (*TkdeclsVptr->V_Tk_NameOfJoinStyle)
+#endif
+
+#ifndef Tk_NameOfJustify
+# define Tk_NameOfJustify (*TkdeclsVptr->V_Tk_NameOfJustify)
+#endif
+
+#ifndef Tk_NameOfRelief
+# define Tk_NameOfRelief (*TkdeclsVptr->V_Tk_NameOfRelief)
+#endif
+
+#ifndef Tk_NameOfStyle
+# define Tk_NameOfStyle (*TkdeclsVptr->V_Tk_NameOfStyle)
+#endif
+
+#ifndef Tk_NameToWindow
+# define Tk_NameToWindow (*TkdeclsVptr->V_Tk_NameToWindow)
+#endif
+
+#ifndef Tk_OwnSelection
+# define Tk_OwnSelection (*TkdeclsVptr->V_Tk_OwnSelection)
+#endif
+
+#ifndef Tk_PointToChar
+# define Tk_PointToChar (*TkdeclsVptr->V_Tk_PointToChar)
+#endif
+
+#ifndef Tk_PostscriptBitmap
+# define Tk_PostscriptBitmap (*TkdeclsVptr->V_Tk_PostscriptBitmap)
+#endif
+
+#ifndef Tk_PostscriptColor
+# define Tk_PostscriptColor (*TkdeclsVptr->V_Tk_PostscriptColor)
+#endif
+
+#ifndef Tk_PostscriptFont
+# define Tk_PostscriptFont (*TkdeclsVptr->V_Tk_PostscriptFont)
+#endif
+
+#ifndef Tk_PostscriptFontName
+# define Tk_PostscriptFontName (*TkdeclsVptr->V_Tk_PostscriptFontName)
+#endif
+
+#ifndef Tk_PostscriptImage
+# define Tk_PostscriptImage (*TkdeclsVptr->V_Tk_PostscriptImage)
+#endif
+
+#ifndef Tk_PostscriptPath
+# define Tk_PostscriptPath (*TkdeclsVptr->V_Tk_PostscriptPath)
+#endif
+
+#ifndef Tk_PostscriptPhoto
+# define Tk_PostscriptPhoto (*TkdeclsVptr->V_Tk_PostscriptPhoto)
+#endif
+
+#ifndef Tk_PostscriptStipple
+# define Tk_PostscriptStipple (*TkdeclsVptr->V_Tk_PostscriptStipple)
+#endif
+
+#ifndef Tk_PostscriptY
+# define Tk_PostscriptY (*TkdeclsVptr->V_Tk_PostscriptY)
+#endif
+
+#ifndef Tk_PreserveColormap
+# define Tk_PreserveColormap (*TkdeclsVptr->V_Tk_PreserveColormap)
+#endif
+
+#ifndef Tk_QueueWindowEvent
+# define Tk_QueueWindowEvent (*TkdeclsVptr->V_Tk_QueueWindowEvent)
+#endif
+
+#ifndef Tk_RedrawImage
+# define Tk_RedrawImage (*TkdeclsVptr->V_Tk_RedrawImage)
+#endif
+
+#ifndef Tk_RegisterStyleEngine
+# define Tk_RegisterStyleEngine (*TkdeclsVptr->V_Tk_RegisterStyleEngine)
+#endif
+
+#ifndef Tk_RegisterStyledElement
+# define Tk_RegisterStyledElement (*TkdeclsVptr->V_Tk_RegisterStyledElement)
+#endif
+
+#ifndef Tk_ResizeWindow
+# define Tk_ResizeWindow (*TkdeclsVptr->V_Tk_ResizeWindow)
+#endif
+
+#ifndef Tk_RestackWindow
+# define Tk_RestackWindow (*TkdeclsVptr->V_Tk_RestackWindow)
+#endif
+
+#ifndef Tk_RestoreSavedOptions
+# define Tk_RestoreSavedOptions (*TkdeclsVptr->V_Tk_RestoreSavedOptions)
+#endif
+
+#ifndef Tk_RestrictEvents
+# define Tk_RestrictEvents (*TkdeclsVptr->V_Tk_RestrictEvents)
+#endif
+
+#ifndef Tk_SetAppName
+# define Tk_SetAppName (*TkdeclsVptr->V_Tk_SetAppName)
+#endif
+
+#ifndef Tk_SetBackgroundFromBorder
+# define Tk_SetBackgroundFromBorder (*TkdeclsVptr->V_Tk_SetBackgroundFromBorder)
+#endif
+
+#ifndef Tk_SetCaretPos
+# define Tk_SetCaretPos (*TkdeclsVptr->V_Tk_SetCaretPos)
+#endif
+
+#ifndef Tk_SetClass
+# define Tk_SetClass (*TkdeclsVptr->V_Tk_SetClass)
+#endif
+
+#ifndef Tk_SetClassProcs
+# define Tk_SetClassProcs (*TkdeclsVptr->V_Tk_SetClassProcs)
+#endif
+
+#ifndef Tk_SetGrid
+# define Tk_SetGrid (*TkdeclsVptr->V_Tk_SetGrid)
+#endif
+
+#ifndef Tk_SetInternalBorder
+# define Tk_SetInternalBorder (*TkdeclsVptr->V_Tk_SetInternalBorder)
+#endif
+
+#ifndef Tk_SetInternalBorderEx
+# define Tk_SetInternalBorderEx (*TkdeclsVptr->V_Tk_SetInternalBorderEx)
+#endif
+
+#ifndef Tk_SetMinimumRequestSize
+# define Tk_SetMinimumRequestSize (*TkdeclsVptr->V_Tk_SetMinimumRequestSize)
+#endif
+
+#ifndef Tk_SetOptions
+# define Tk_SetOptions (*TkdeclsVptr->V_Tk_SetOptions)
+#endif
+
+#ifndef Tk_SetTSOrigin
+# define Tk_SetTSOrigin (*TkdeclsVptr->V_Tk_SetTSOrigin)
+#endif
+
+#ifndef Tk_SetWindowBackground
+# define Tk_SetWindowBackground (*TkdeclsVptr->V_Tk_SetWindowBackground)
+#endif
+
+#ifndef Tk_SetWindowBackgroundPixmap
+# define Tk_SetWindowBackgroundPixmap (*TkdeclsVptr->V_Tk_SetWindowBackgroundPixmap)
+#endif
+
+#ifndef Tk_SetWindowBorder
+# define Tk_SetWindowBorder (*TkdeclsVptr->V_Tk_SetWindowBorder)
+#endif
+
+#ifndef Tk_SetWindowBorderPixmap
+# define Tk_SetWindowBorderPixmap (*TkdeclsVptr->V_Tk_SetWindowBorderPixmap)
+#endif
+
+#ifndef Tk_SetWindowBorderWidth
+# define Tk_SetWindowBorderWidth (*TkdeclsVptr->V_Tk_SetWindowBorderWidth)
+#endif
+
+#ifndef Tk_SetWindowColormap
+# define Tk_SetWindowColormap (*TkdeclsVptr->V_Tk_SetWindowColormap)
+#endif
+
+#ifndef Tk_SetWindowVisual
+# define Tk_SetWindowVisual (*TkdeclsVptr->V_Tk_SetWindowVisual)
+#endif
+
+#ifndef Tk_SizeOfBitmap
+# define Tk_SizeOfBitmap (*TkdeclsVptr->V_Tk_SizeOfBitmap)
+#endif
+
+#ifndef Tk_SizeOfImage
+# define Tk_SizeOfImage (*TkdeclsVptr->V_Tk_SizeOfImage)
+#endif
+
+#ifndef Tk_StrictMotif
+# define Tk_StrictMotif (*TkdeclsVptr->V_Tk_StrictMotif)
+#endif
+
+#ifndef Tk_TextLayoutToPostscript
+# define Tk_TextLayoutToPostscript (*TkdeclsVptr->V_Tk_TextLayoutToPostscript)
+#endif
+
+#ifndef Tk_TextWidth
+# define Tk_TextWidth (*TkdeclsVptr->V_Tk_TextWidth)
+#endif
+
+#ifndef Tk_UndefineCursor
+# define Tk_UndefineCursor (*TkdeclsVptr->V_Tk_UndefineCursor)
+#endif
+
+#ifndef Tk_UnderlineChars
+# define Tk_UnderlineChars (*TkdeclsVptr->V_Tk_UnderlineChars)
+#endif
+
+#ifndef Tk_UnderlineTextLayout
+# define Tk_UnderlineTextLayout (*TkdeclsVptr->V_Tk_UnderlineTextLayout)
+#endif
+
+#ifndef Tk_Ungrab
+# define Tk_Ungrab (*TkdeclsVptr->V_Tk_Ungrab)
+#endif
+
+#ifndef Tk_UnmaintainGeometry
+# define Tk_UnmaintainGeometry (*TkdeclsVptr->V_Tk_UnmaintainGeometry)
+#endif
+
+#ifndef Tk_UnmapWindow
+# define Tk_UnmapWindow (*TkdeclsVptr->V_Tk_UnmapWindow)
+#endif
+
+#ifndef Tk_UnsetGrid
+# define Tk_UnsetGrid (*TkdeclsVptr->V_Tk_UnsetGrid)
+#endif
+
+#ifndef Tk_UpdatePointer
+# define Tk_UpdatePointer (*TkdeclsVptr->V_Tk_UpdatePointer)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKDECLS_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.t
new file mode 100644
index 00000000000..f112ff449de
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls.t
@@ -0,0 +1,1158 @@
+#ifdef _TKDECLS
+#ifndef Tk_3DBorderColor
+VFUNC(XColor *,Tk_3DBorderColor,V_Tk_3DBorderColor,_ANSI_ARGS_((Tk_3DBorder border)))
+#endif /* #ifndef Tk_3DBorderColor */
+
+#ifndef Tk_3DBorderGC
+VFUNC(GC,Tk_3DBorderGC,V_Tk_3DBorderGC,_ANSI_ARGS_((Tk_Window tkwin,
+ Tk_3DBorder border, int which)))
+#endif /* #ifndef Tk_3DBorderGC */
+
+#ifndef Tk_3DHorizontalBevel
+VFUNC(void,Tk_3DHorizontalBevel,V_Tk_3DHorizontalBevel,_ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height, int leftIn,
+ int rightIn, int topBevel, int relief)))
+#endif /* #ifndef Tk_3DHorizontalBevel */
+
+#ifndef Tk_3DVerticalBevel
+VFUNC(void,Tk_3DVerticalBevel,V_Tk_3DVerticalBevel,_ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height, int leftBevel,
+ int relief)))
+#endif /* #ifndef Tk_3DVerticalBevel */
+
+#ifndef Tk_Alloc3DBorderFromObj
+VFUNC(Tk_3DBorder,Tk_Alloc3DBorderFromObj,V_Tk_Alloc3DBorderFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_Alloc3DBorderFromObj */
+
+#ifndef Tk_AllocBitmapFromObj
+VFUNC(Pixmap,Tk_AllocBitmapFromObj,V_Tk_AllocBitmapFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_AllocBitmapFromObj */
+
+#ifndef Tk_AllocColorFromObj
+VFUNC(XColor *,Tk_AllocColorFromObj,V_Tk_AllocColorFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_AllocColorFromObj */
+
+#ifndef Tk_AllocCursorFromObj
+VFUNC(Tk_Cursor,Tk_AllocCursorFromObj,V_Tk_AllocCursorFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_AllocCursorFromObj */
+
+#ifndef Tk_AllocFontFromObj
+VFUNC(Tk_Font,Tk_AllocFontFromObj,V_Tk_AllocFontFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_AllocFontFromObj */
+
+#ifndef Tk_AllocStyleFromObj
+VFUNC(Tk_Style,Tk_AllocStyleFromObj,V_Tk_AllocStyleFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_AllocStyleFromObj */
+
+#ifndef Tk_BindEvent
+VFUNC(void,Tk_BindEvent,V_Tk_BindEvent,_ANSI_ARGS_((
+ Tk_BindingTable bindingTable,
+ XEvent * eventPtr, Tk_Window tkwin,
+ int numObjects, ClientData * objectPtr)))
+#endif /* #ifndef Tk_BindEvent */
+
+#ifndef Tk_ChangeWindowAttributes
+VFUNC(void,Tk_ChangeWindowAttributes,V_Tk_ChangeWindowAttributes,_ANSI_ARGS_((
+ Tk_Window tkwin, unsigned long valueMask,
+ XSetWindowAttributes * attsPtr)))
+#endif /* #ifndef Tk_ChangeWindowAttributes */
+
+#ifndef Tk_CharBbox
+VFUNC(int,Tk_CharBbox,V_Tk_CharBbox,_ANSI_ARGS_((Tk_TextLayout layout,
+ int index, int * xPtr, int * yPtr,
+ int * widthPtr, int * heightPtr)))
+#endif /* #ifndef Tk_CharBbox */
+
+#ifndef Tk_ClearSelection
+VFUNC(void,Tk_ClearSelection,V_Tk_ClearSelection,_ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection)))
+#endif /* #ifndef Tk_ClearSelection */
+
+#ifndef Tk_ClipboardAppend
+VFUNC(int,Tk_ClipboardAppend,V_Tk_ClipboardAppend,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Atom target, Atom format,
+ char* buffer)))
+#endif /* #ifndef Tk_ClipboardAppend */
+
+#ifndef Tk_ClipboardClear
+VFUNC(int,Tk_ClipboardClear,V_Tk_ClipboardClear,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin)))
+#endif /* #ifndef Tk_ClipboardClear */
+
+#ifndef Tk_CollapseMotionEvents
+VFUNC(int,Tk_CollapseMotionEvents,V_Tk_CollapseMotionEvents,_ANSI_ARGS_((
+ Display * display, int collapse)))
+#endif /* #ifndef Tk_CollapseMotionEvents */
+
+#ifndef Tk_ComputeTextLayout
+VFUNC(Tk_TextLayout,Tk_ComputeTextLayout,V_Tk_ComputeTextLayout,_ANSI_ARGS_((Tk_Font font,
+ CONST char * str, int numChars,
+ int wrapLength, Tk_Justify justify,
+ int flags, int * widthPtr, int * heightPtr)))
+#endif /* #ifndef Tk_ComputeTextLayout */
+
+#ifndef Tk_ConfigureInfo
+VFUNC(int,Tk_ConfigureInfo,V_Tk_ConfigureInfo,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec * specs,
+ char * widgRec, CONST char * argvName,
+ int flags)))
+#endif /* #ifndef Tk_ConfigureInfo */
+
+#ifndef Tk_ConfigureValue
+VFUNC(int,Tk_ConfigureValue,V_Tk_ConfigureValue,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec * specs,
+ char * widgRec, CONST char * argvName,
+ int flags)))
+#endif /* #ifndef Tk_ConfigureValue */
+
+#ifndef Tk_ConfigureWidget
+VFUNC(int,Tk_ConfigureWidget,V_Tk_ConfigureWidget,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec * specs,
+ int argc, CONST84 Tcl_Obj *CONST *objv,
+ char * widgRec, int flags)))
+#endif /* #ifndef Tk_ConfigureWidget */
+
+#ifndef Tk_ConfigureWindow
+VFUNC(void,Tk_ConfigureWindow,V_Tk_ConfigureWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ unsigned int valueMask,
+ XWindowChanges * valuePtr)))
+#endif /* #ifndef Tk_ConfigureWindow */
+
+#ifndef Tk_CoordsToWindow
+VFUNC(Tk_Window,Tk_CoordsToWindow,V_Tk_CoordsToWindow,_ANSI_ARGS_((int rootX, int rootY,
+ Tk_Window tkwin)))
+#endif /* #ifndef Tk_CoordsToWindow */
+
+#ifndef Tk_CreateAnonymousWindow
+VFUNC(Tk_Window,Tk_CreateAnonymousWindow,V_Tk_CreateAnonymousWindow,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window parent,
+ CONST char * screenName)))
+#endif /* #ifndef Tk_CreateAnonymousWindow */
+
+#ifndef Tk_CreateBinding
+VFUNC(unsigned long,Tk_CreateBinding,V_Tk_CreateBinding,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventStr,
+ Tcl_Obj *command, int append)))
+#endif /* #ifndef Tk_CreateBinding */
+
+#ifndef Tk_CreateBindingTable
+VFUNC(Tk_BindingTable,Tk_CreateBindingTable,V_Tk_CreateBindingTable,_ANSI_ARGS_((
+ Tcl_Interp * interp)))
+#endif /* #ifndef Tk_CreateBindingTable */
+
+#ifndef Tk_CreateClientMessageHandler
+VFUNC(void,Tk_CreateClientMessageHandler,V_Tk_CreateClientMessageHandler,_ANSI_ARGS_((
+ Tk_ClientMessageProc * proc)))
+#endif /* #ifndef Tk_CreateClientMessageHandler */
+
+#ifndef Tk_CreateErrorHandler
+VFUNC(Tk_ErrorHandler,Tk_CreateErrorHandler,V_Tk_CreateErrorHandler,_ANSI_ARGS_((Display * display,
+ int errNum, int request, int minorCode,
+ Tk_ErrorProc * errorProc,
+ ClientData clientData)))
+#endif /* #ifndef Tk_CreateErrorHandler */
+
+#ifndef Tk_CreateEventHandler
+VFUNC(void,Tk_CreateEventHandler,V_Tk_CreateEventHandler,_ANSI_ARGS_((Tk_Window token,
+ unsigned long mask, Tk_EventProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tk_CreateEventHandler */
+
+#ifndef Tk_CreateGenericHandler
+VFUNC(void,Tk_CreateGenericHandler,V_Tk_CreateGenericHandler,_ANSI_ARGS_((
+ Tk_GenericProc * proc, ClientData clientData)))
+#endif /* #ifndef Tk_CreateGenericHandler */
+
+#ifndef Tk_CreateImageType
+VFUNC(void,Tk_CreateImageType,V_Tk_CreateImageType,_ANSI_ARGS_((
+ Tk_ImageType * typePtr)))
+#endif /* #ifndef Tk_CreateImageType */
+
+#ifndef Tk_CreateOptionTable
+VFUNC(Tk_OptionTable,Tk_CreateOptionTable,V_Tk_CreateOptionTable,_ANSI_ARGS_((
+ Tcl_Interp * interp,
+ CONST Tk_OptionSpec * templatePtr)))
+#endif /* #ifndef Tk_CreateOptionTable */
+
+#ifndef Tk_CreateSelHandler
+VFUNC(void,Tk_CreateSelHandler,V_Tk_CreateSelHandler,_ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection, Atom target,
+ Tk_SelectionProc * proc,
+ ClientData clientData, Atom format)))
+#endif /* #ifndef Tk_CreateSelHandler */
+
+#ifndef Tk_CreateStyle
+VFUNC(Tk_Style,Tk_CreateStyle,V_Tk_CreateStyle,_ANSI_ARGS_((CONST char * name,
+ Tk_StyleEngine engine, ClientData clientData)))
+#endif /* #ifndef Tk_CreateStyle */
+
+#ifndef Tk_CreateWindow
+VFUNC(Tk_Window,Tk_CreateWindow,V_Tk_CreateWindow,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window parent, CONST char * name,
+ CONST char * screenName)))
+#endif /* #ifndef Tk_CreateWindow */
+
+#ifndef Tk_CreateWindowFromPath
+VFUNC(Tk_Window,Tk_CreateWindowFromPath,V_Tk_CreateWindowFromPath,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ CONST char * pathName,
+ CONST char * screenName)))
+#endif /* #ifndef Tk_CreateWindowFromPath */
+
+#ifndef Tk_DefineBitmap
+VFUNC(int,Tk_DefineBitmap,V_Tk_DefineBitmap,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * source,
+ int width, int height)))
+#endif /* #ifndef Tk_DefineBitmap */
+
+#ifndef Tk_DefineCursor
+VFUNC(void,Tk_DefineCursor,V_Tk_DefineCursor,_ANSI_ARGS_((Tk_Window window,
+ Tk_Cursor cursor)))
+#endif /* #ifndef Tk_DefineCursor */
+
+#ifndef Tk_DeleteAllBindings
+VFUNC(void,Tk_DeleteAllBindings,V_Tk_DeleteAllBindings,_ANSI_ARGS_((
+ Tk_BindingTable bindingTable,
+ ClientData object)))
+#endif /* #ifndef Tk_DeleteAllBindings */
+
+#ifndef Tk_DeleteBinding
+VFUNC(int,Tk_DeleteBinding,V_Tk_DeleteBinding,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventStr)))
+#endif /* #ifndef Tk_DeleteBinding */
+
+#ifndef Tk_DeleteBindingTable
+VFUNC(void,Tk_DeleteBindingTable,V_Tk_DeleteBindingTable,_ANSI_ARGS_((
+ Tk_BindingTable bindingTable)))
+#endif /* #ifndef Tk_DeleteBindingTable */
+
+#ifndef Tk_DeleteClientMessageHandler
+VFUNC(void,Tk_DeleteClientMessageHandler,V_Tk_DeleteClientMessageHandler,_ANSI_ARGS_((
+ Tk_ClientMessageProc * proc)))
+#endif /* #ifndef Tk_DeleteClientMessageHandler */
+
+#ifndef Tk_DeleteErrorHandler
+VFUNC(void,Tk_DeleteErrorHandler,V_Tk_DeleteErrorHandler,_ANSI_ARGS_((
+ Tk_ErrorHandler handler)))
+#endif /* #ifndef Tk_DeleteErrorHandler */
+
+#ifndef Tk_DeleteEventHandler
+VFUNC(void,Tk_DeleteEventHandler,V_Tk_DeleteEventHandler,_ANSI_ARGS_((Tk_Window token,
+ unsigned long mask, Tk_EventProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tk_DeleteEventHandler */
+
+#ifndef Tk_DeleteGenericHandler
+VFUNC(void,Tk_DeleteGenericHandler,V_Tk_DeleteGenericHandler,_ANSI_ARGS_((
+ Tk_GenericProc * proc, ClientData clientData)))
+#endif /* #ifndef Tk_DeleteGenericHandler */
+
+#ifndef Tk_DeleteImage
+VFUNC(void,Tk_DeleteImage,V_Tk_DeleteImage,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name)))
+#endif /* #ifndef Tk_DeleteImage */
+
+#ifndef Tk_DeleteOptionTable
+VFUNC(void,Tk_DeleteOptionTable,V_Tk_DeleteOptionTable,_ANSI_ARGS_((
+ Tk_OptionTable optionTable)))
+#endif /* #ifndef Tk_DeleteOptionTable */
+
+#ifndef Tk_DeleteSelHandler
+VFUNC(void,Tk_DeleteSelHandler,V_Tk_DeleteSelHandler,_ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection, Atom target)))
+#endif /* #ifndef Tk_DeleteSelHandler */
+
+#ifndef Tk_DestroyWindow
+VFUNC(void,Tk_DestroyWindow,V_Tk_DestroyWindow,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_DestroyWindow */
+
+#ifndef Tk_DisplayName
+VFUNC(CONST84_RETURN char *,Tk_DisplayName,V_Tk_DisplayName,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_DisplayName */
+
+#ifndef Tk_DistanceToTextLayout
+VFUNC(int,Tk_DistanceToTextLayout,V_Tk_DistanceToTextLayout,_ANSI_ARGS_((
+ Tk_TextLayout layout, int x, int y)))
+#endif /* #ifndef Tk_DistanceToTextLayout */
+
+#ifndef Tk_Draw3DPolygon
+VFUNC(void,Tk_Draw3DPolygon,V_Tk_Draw3DPolygon,_ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border,
+ XPoint * pointPtr, int numPoints,
+ int borderWidth, int leftRelief)))
+#endif /* #ifndef Tk_Draw3DPolygon */
+
+#ifndef Tk_Draw3DRectangle
+VFUNC(void,Tk_Draw3DRectangle,V_Tk_Draw3DRectangle,_ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height,
+ int borderWidth, int relief)))
+#endif /* #ifndef Tk_Draw3DRectangle */
+
+#ifndef Tk_DrawChars
+VFUNC(void,Tk_DrawChars,V_Tk_DrawChars,_ANSI_ARGS_((Display * display,
+ Drawable drawable, GC gc, Tk_Font tkfont,
+ CONST char * source, int numBytes, int x,
+ int y)))
+#endif /* #ifndef Tk_DrawChars */
+
+#ifndef Tk_DrawElement
+VFUNC(void,Tk_DrawElement,V_Tk_DrawElement,_ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin, Drawable d, int x, int y,
+ int width, int height, int state)))
+#endif /* #ifndef Tk_DrawElement */
+
+#ifndef Tk_DrawFocusHighlight
+VFUNC(void,Tk_DrawFocusHighlight,V_Tk_DrawFocusHighlight,_ANSI_ARGS_((Tk_Window tkwin,
+ GC gc, int width, Drawable drawable)))
+#endif /* #ifndef Tk_DrawFocusHighlight */
+
+#ifndef Tk_DrawTextLayout
+VFUNC(void,Tk_DrawTextLayout,V_Tk_DrawTextLayout,_ANSI_ARGS_((Display * display,
+ Drawable drawable, GC gc,
+ Tk_TextLayout layout, int x, int y,
+ int firstChar, int lastChar)))
+#endif /* #ifndef Tk_DrawTextLayout */
+
+#ifndef Tk_Fill3DPolygon
+VFUNC(void,Tk_Fill3DPolygon,V_Tk_Fill3DPolygon,_ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border,
+ XPoint * pointPtr, int numPoints,
+ int borderWidth, int leftRelief)))
+#endif /* #ifndef Tk_Fill3DPolygon */
+
+#ifndef Tk_Fill3DRectangle
+VFUNC(void,Tk_Fill3DRectangle,V_Tk_Fill3DRectangle,_ANSI_ARGS_((Tk_Window tkwin,
+ Drawable drawable, Tk_3DBorder border, int x,
+ int y, int width, int height,
+ int borderWidth, int relief)))
+#endif /* #ifndef Tk_Fill3DRectangle */
+
+#ifndef Tk_FontId
+VFUNC(Font,Tk_FontId,V_Tk_FontId,_ANSI_ARGS_((Tk_Font font)))
+#endif /* #ifndef Tk_FontId */
+
+#ifndef Tk_Free3DBorder
+VFUNC(void,Tk_Free3DBorder,V_Tk_Free3DBorder,_ANSI_ARGS_((Tk_3DBorder border)))
+#endif /* #ifndef Tk_Free3DBorder */
+
+#ifndef Tk_Free3DBorderFromObj
+VFUNC(void,Tk_Free3DBorderFromObj,V_Tk_Free3DBorderFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_Free3DBorderFromObj */
+
+#ifndef Tk_FreeBitmap
+VFUNC(void,Tk_FreeBitmap,V_Tk_FreeBitmap,_ANSI_ARGS_((Display * display,
+ Pixmap bitmap)))
+#endif /* #ifndef Tk_FreeBitmap */
+
+#ifndef Tk_FreeBitmapFromObj
+VFUNC(void,Tk_FreeBitmapFromObj,V_Tk_FreeBitmapFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_FreeBitmapFromObj */
+
+#ifndef Tk_FreeColor
+VFUNC(void,Tk_FreeColor,V_Tk_FreeColor,_ANSI_ARGS_((XColor * colorPtr)))
+#endif /* #ifndef Tk_FreeColor */
+
+#ifndef Tk_FreeColorFromObj
+VFUNC(void,Tk_FreeColorFromObj,V_Tk_FreeColorFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_FreeColorFromObj */
+
+#ifndef Tk_FreeColormap
+VFUNC(void,Tk_FreeColormap,V_Tk_FreeColormap,_ANSI_ARGS_((Display * display,
+ Colormap colormap)))
+#endif /* #ifndef Tk_FreeColormap */
+
+#ifndef Tk_FreeConfigOptions
+VFUNC(void,Tk_FreeConfigOptions,V_Tk_FreeConfigOptions,_ANSI_ARGS_((char * recordPtr,
+ Tk_OptionTable optionToken, Tk_Window tkwin)))
+#endif /* #ifndef Tk_FreeConfigOptions */
+
+#ifndef Tk_FreeCursor
+VFUNC(void,Tk_FreeCursor,V_Tk_FreeCursor,_ANSI_ARGS_((Display * display,
+ Tk_Cursor cursor)))
+#endif /* #ifndef Tk_FreeCursor */
+
+#ifndef Tk_FreeCursorFromObj
+VFUNC(void,Tk_FreeCursorFromObj,V_Tk_FreeCursorFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_FreeCursorFromObj */
+
+#ifndef Tk_FreeFont
+VFUNC(void,Tk_FreeFont,V_Tk_FreeFont,_ANSI_ARGS_((Tk_Font f)))
+#endif /* #ifndef Tk_FreeFont */
+
+#ifndef Tk_FreeFontFromObj
+VFUNC(void,Tk_FreeFontFromObj,V_Tk_FreeFontFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_FreeFontFromObj */
+
+#ifndef Tk_FreeGC
+VFUNC(void,Tk_FreeGC,V_Tk_FreeGC,_ANSI_ARGS_((Display * display, GC gc)))
+#endif /* #ifndef Tk_FreeGC */
+
+#ifndef Tk_FreeImage
+VFUNC(void,Tk_FreeImage,V_Tk_FreeImage,_ANSI_ARGS_((Tk_Image image)))
+#endif /* #ifndef Tk_FreeImage */
+
+#ifndef Tk_FreeOptions
+VFUNC(void,Tk_FreeOptions,V_Tk_FreeOptions,_ANSI_ARGS_((Tk_ConfigSpec * specs,
+ char * widgRec, Display * display,
+ int needFlags)))
+#endif /* #ifndef Tk_FreeOptions */
+
+#ifndef Tk_FreePixmap
+VFUNC(void,Tk_FreePixmap,V_Tk_FreePixmap,_ANSI_ARGS_((Display * display,
+ Pixmap pixmap)))
+#endif /* #ifndef Tk_FreePixmap */
+
+#ifndef Tk_FreeSavedOptions
+VFUNC(void,Tk_FreeSavedOptions,V_Tk_FreeSavedOptions,_ANSI_ARGS_((
+ Tk_SavedOptions * savePtr)))
+#endif /* #ifndef Tk_FreeSavedOptions */
+
+#ifndef Tk_FreeStyle
+VFUNC(void,Tk_FreeStyle,V_Tk_FreeStyle,_ANSI_ARGS_((Tk_Style style)))
+#endif /* #ifndef Tk_FreeStyle */
+
+#ifndef Tk_FreeStyleFromObj
+VFUNC(void,Tk_FreeStyleFromObj,V_Tk_FreeStyleFromObj,_ANSI_ARGS_((Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_FreeStyleFromObj */
+
+#ifndef Tk_FreeTextLayout
+VFUNC(void,Tk_FreeTextLayout,V_Tk_FreeTextLayout,_ANSI_ARGS_((
+ Tk_TextLayout textLayout)))
+#endif /* #ifndef Tk_FreeTextLayout */
+
+#ifndef Tk_FreeXId
+VFUNC(void,Tk_FreeXId,V_Tk_FreeXId,_ANSI_ARGS_((Display * display, XID xid)))
+#endif /* #ifndef Tk_FreeXId */
+
+#ifndef Tk_GCForColor
+VFUNC(GC,Tk_GCForColor,V_Tk_GCForColor,_ANSI_ARGS_((XColor * colorPtr,
+ Drawable drawable)))
+#endif /* #ifndef Tk_GCForColor */
+
+#ifndef Tk_GeometryRequest
+VFUNC(void,Tk_GeometryRequest,V_Tk_GeometryRequest,_ANSI_ARGS_((Tk_Window tkwin,
+ int reqWidth, int reqHeight)))
+#endif /* #ifndef Tk_GeometryRequest */
+
+#ifndef Tk_Get3DBorder
+VFUNC(Tk_3DBorder,Tk_Get3DBorder,V_Tk_Get3DBorder,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid colorName)))
+#endif /* #ifndef Tk_Get3DBorder */
+
+#ifndef Tk_Get3DBorderFromObj
+VFUNC(Tk_3DBorder,Tk_Get3DBorderFromObj,V_Tk_Get3DBorderFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_Get3DBorderFromObj */
+
+#ifndef Tk_GetAllBindings
+VFUNC(void,Tk_GetAllBindings,V_Tk_GetAllBindings,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object)))
+#endif /* #ifndef Tk_GetAllBindings */
+
+#ifndef Tk_GetAnchor
+VFUNC(int,Tk_GetAnchor,V_Tk_GetAnchor,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, Tk_Anchor * anchorPtr)))
+#endif /* #ifndef Tk_GetAnchor */
+
+#ifndef Tk_GetAnchorFromObj
+VFUNC(int,Tk_GetAnchorFromObj,V_Tk_GetAnchorFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, Tk_Anchor * anchorPtr)))
+#endif /* #ifndef Tk_GetAnchorFromObj */
+
+#ifndef Tk_GetAtomName
+VFUNC(CONST84_RETURN char *,Tk_GetAtomName,V_Tk_GetAtomName,_ANSI_ARGS_((Tk_Window tkwin,
+ Atom atom)))
+#endif /* #ifndef Tk_GetAtomName */
+
+#ifndef Tk_GetBinding
+VFUNC(Tcl_Obj *,Tk_GetBinding,V_Tk_GetBinding,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventStr)))
+#endif /* #ifndef Tk_GetBinding */
+
+#ifndef Tk_GetBitmap
+VFUNC(Pixmap,Tk_GetBitmap,V_Tk_GetBitmap,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str)))
+#endif /* #ifndef Tk_GetBitmap */
+
+#ifndef Tk_GetBitmapFromData
+VFUNC(Pixmap,Tk_GetBitmapFromData,V_Tk_GetBitmapFromData,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ CONST char * source, int width, int height)))
+#endif /* #ifndef Tk_GetBitmapFromData */
+
+#ifndef Tk_GetBitmapFromObj
+VFUNC(Pixmap,Tk_GetBitmapFromObj,V_Tk_GetBitmapFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_GetBitmapFromObj */
+
+#ifndef Tk_GetCapStyle
+VFUNC(int,Tk_GetCapStyle,V_Tk_GetCapStyle,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * capPtr)))
+#endif /* #ifndef Tk_GetCapStyle */
+
+#ifndef Tk_GetColor
+VFUNC(XColor *,Tk_GetColor,V_Tk_GetColor,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid name)))
+#endif /* #ifndef Tk_GetColor */
+
+#ifndef Tk_GetColorByValue
+VFUNC(XColor *,Tk_GetColorByValue,V_Tk_GetColorByValue,_ANSI_ARGS_((Tk_Window tkwin,
+ XColor * colorPtr)))
+#endif /* #ifndef Tk_GetColorByValue */
+
+#ifndef Tk_GetColorFromObj
+VFUNC(XColor *,Tk_GetColorFromObj,V_Tk_GetColorFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_GetColorFromObj */
+
+#ifndef Tk_GetColormap
+VFUNC(Colormap,Tk_GetColormap,V_Tk_GetColormap,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str)))
+#endif /* #ifndef Tk_GetColormap */
+
+#ifndef Tk_GetCursor
+VFUNC(Tk_Cursor,Tk_GetCursor,V_Tk_GetCursor,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid str)))
+#endif /* #ifndef Tk_GetCursor */
+
+#ifndef Tk_GetCursorFromData
+VFUNC(Tk_Cursor,Tk_GetCursorFromData,V_Tk_GetCursorFromData,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ CONST char * source, CONST char * mask,
+ int width, int height, int xHot, int yHot,
+ Tk_Uid fg, Tk_Uid bg)))
+#endif /* #ifndef Tk_GetCursorFromData */
+
+#ifndef Tk_GetCursorFromObj
+VFUNC(Tk_Cursor,Tk_GetCursorFromObj,V_Tk_GetCursorFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_GetCursorFromObj */
+
+#ifndef Tk_GetElementBorderWidth
+VFUNC(int,Tk_GetElementBorderWidth,V_Tk_GetElementBorderWidth,_ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin)))
+#endif /* #ifndef Tk_GetElementBorderWidth */
+
+#ifndef Tk_GetElementBox
+VFUNC(void,Tk_GetElementBox,V_Tk_GetElementBox,_ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin, int x, int y, int width,
+ int height, int inner, int * xPtr,
+ int * yPtr, int * widthPtr, int * heightPtr)))
+#endif /* #ifndef Tk_GetElementBox */
+
+#ifndef Tk_GetElementId
+VFUNC(int,Tk_GetElementId,V_Tk_GetElementId,_ANSI_ARGS_((CONST char * name)))
+#endif /* #ifndef Tk_GetElementId */
+
+#ifndef Tk_GetElementSize
+VFUNC(void,Tk_GetElementSize,V_Tk_GetElementSize,_ANSI_ARGS_((Tk_Style style,
+ Tk_StyledElement element, char * recordPtr,
+ Tk_Window tkwin, int width, int height,
+ int inner, int * widthPtr, int * heightPtr)))
+#endif /* #ifndef Tk_GetElementSize */
+
+#ifndef Tk_GetFont
+VFUNC(Tk_Font,Tk_GetFont,V_Tk_GetFont,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str)))
+#endif /* #ifndef Tk_GetFont */
+
+#ifndef Tk_GetFontFromObj
+VFUNC(Tk_Font,Tk_GetFontFromObj,V_Tk_GetFontFromObj,_ANSI_ARGS_((Tk_Window tkwin,
+ Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_GetFontFromObj */
+
+#ifndef Tk_GetFontMetrics
+VFUNC(void,Tk_GetFontMetrics,V_Tk_GetFontMetrics,_ANSI_ARGS_((Tk_Font font,
+ Tk_FontMetrics * fmPtr)))
+#endif /* #ifndef Tk_GetFontMetrics */
+
+#ifndef Tk_GetGC
+VFUNC(GC,Tk_GetGC,V_Tk_GetGC,_ANSI_ARGS_((Tk_Window tkwin,
+ unsigned long valueMask,
+ XGCValues * valuePtr)))
+#endif /* #ifndef Tk_GetGC */
+
+#ifndef Tk_GetImage
+VFUNC(Tk_Image,Tk_GetImage,V_Tk_GetImage,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * name,
+ Tk_ImageChangedProc * changeProc,
+ ClientData clientData)))
+#endif /* #ifndef Tk_GetImage */
+
+#ifndef Tk_GetImageMasterData
+VFUNC(ClientData,Tk_GetImageMasterData,V_Tk_GetImageMasterData,_ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * name,
+ Tk_ImageType ** typePtrPtr)))
+#endif /* #ifndef Tk_GetImageMasterData */
+
+#ifndef Tk_GetJoinStyle
+VFUNC(int,Tk_GetJoinStyle,V_Tk_GetJoinStyle,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, int * joinPtr)))
+#endif /* #ifndef Tk_GetJoinStyle */
+
+#ifndef Tk_GetJustify
+VFUNC(int,Tk_GetJustify,V_Tk_GetJustify,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * str, Tk_Justify * justifyPtr)))
+#endif /* #ifndef Tk_GetJustify */
+
+#ifndef Tk_GetJustifyFromObj
+VFUNC(int,Tk_GetJustifyFromObj,V_Tk_GetJustifyFromObj,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tcl_Obj * objPtr,
+ Tk_Justify * justifyPtr)))
+#endif /* #ifndef Tk_GetJustifyFromObj */
+
+#ifndef Tk_GetMMFromObj
+VFUNC(int,Tk_GetMMFromObj,V_Tk_GetMMFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr,
+ double * doublePtr)))
+#endif /* #ifndef Tk_GetMMFromObj */
+
+#ifndef Tk_GetNumMainWindows
+VFUNC(int,Tk_GetNumMainWindows,V_Tk_GetNumMainWindows,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tk_GetNumMainWindows */
+
+#ifndef Tk_GetOptionInfo
+VFUNC(Tcl_Obj *,Tk_GetOptionInfo,V_Tk_GetOptionInfo,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionTable,
+ Tcl_Obj * namePtr, Tk_Window tkwin)))
+#endif /* #ifndef Tk_GetOptionInfo */
+
+#ifndef Tk_GetOptionValue
+VFUNC(Tcl_Obj *,Tk_GetOptionValue,V_Tk_GetOptionValue,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionTable,
+ Tcl_Obj * namePtr, Tk_Window tkwin)))
+#endif /* #ifndef Tk_GetOptionValue */
+
+#ifndef Tk_GetPixels
+VFUNC(int,Tk_GetPixels,V_Tk_GetPixels,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str,
+ int * intPtr)))
+#endif /* #ifndef Tk_GetPixels */
+
+#ifndef Tk_GetPixelsFromObj
+VFUNC(int,Tk_GetPixelsFromObj,V_Tk_GetPixelsFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr,
+ int * intPtr)))
+#endif /* #ifndef Tk_GetPixelsFromObj */
+
+#ifndef Tk_GetPixmap
+VFUNC(Pixmap,Tk_GetPixmap,V_Tk_GetPixmap,_ANSI_ARGS_((Display * display,
+ Drawable d, int width, int height, int depth)))
+#endif /* #ifndef Tk_GetPixmap */
+
+#ifndef Tk_GetRelief
+VFUNC(int,Tk_GetRelief,V_Tk_GetRelief,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, int * reliefPtr)))
+#endif /* #ifndef Tk_GetRelief */
+
+#ifndef Tk_GetReliefFromObj
+VFUNC(int,Tk_GetReliefFromObj,V_Tk_GetReliefFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * objPtr, int * resultPtr)))
+#endif /* #ifndef Tk_GetReliefFromObj */
+
+#ifndef Tk_GetRootCoords
+VFUNC(void,Tk_GetRootCoords,V_Tk_GetRootCoords,_ANSI_ARGS_((Tk_Window tkwin,
+ int * xPtr, int * yPtr)))
+#endif /* #ifndef Tk_GetRootCoords */
+
+#ifndef Tk_GetScreenMM
+VFUNC(int,Tk_GetScreenMM,V_Tk_GetScreenMM,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, CONST char * str,
+ double * doublePtr)))
+#endif /* #ifndef Tk_GetScreenMM */
+
+#ifndef Tk_GetScrollInfo
+VFUNC(int,Tk_GetScrollInfo,V_Tk_GetScrollInfo,_ANSI_ARGS_((Tcl_Interp * interp,
+ int argc, CONST84 Tcl_Obj *CONST *objv,
+ double * dblPtr, int * intPtr)))
+#endif /* #ifndef Tk_GetScrollInfo */
+
+#ifndef Tk_GetScrollInfoObj
+VFUNC(int,Tk_GetScrollInfoObj,V_Tk_GetScrollInfoObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[],
+ double * dblPtr, int * intPtr)))
+#endif /* #ifndef Tk_GetScrollInfoObj */
+
+#ifndef Tk_GetSelection
+VFUNC(int,Tk_GetSelection,V_Tk_GetSelection,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Atom selection, Atom target,
+ Tk_GetSelProc * proc, ClientData clientData)))
+#endif /* #ifndef Tk_GetSelection */
+
+#ifndef Tk_GetStyle
+VFUNC(Tk_Style,Tk_GetStyle,V_Tk_GetStyle,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name)))
+#endif /* #ifndef Tk_GetStyle */
+
+#ifndef Tk_GetStyleEngine
+VFUNC(Tk_StyleEngine,Tk_GetStyleEngine,V_Tk_GetStyleEngine,_ANSI_ARGS_((CONST char * name)))
+#endif /* #ifndef Tk_GetStyleEngine */
+
+#ifndef Tk_GetStyleFromObj
+VFUNC(Tk_Style,Tk_GetStyleFromObj,V_Tk_GetStyleFromObj,_ANSI_ARGS_((Tcl_Obj * objPtr)))
+#endif /* #ifndef Tk_GetStyleFromObj */
+
+#ifndef Tk_GetStyledElement
+VFUNC(Tk_StyledElement,Tk_GetStyledElement,V_Tk_GetStyledElement,_ANSI_ARGS_((Tk_Style style,
+ int elementId, Tk_OptionTable optionTable)))
+#endif /* #ifndef Tk_GetStyledElement */
+
+#ifndef Tk_GetUid
+VFUNC(Tk_Uid,Tk_GetUid,V_Tk_GetUid,_ANSI_ARGS_((CONST char * str)))
+#endif /* #ifndef Tk_GetUid */
+
+#ifndef Tk_GetVRootGeometry
+VFUNC(void,Tk_GetVRootGeometry,V_Tk_GetVRootGeometry,_ANSI_ARGS_((Tk_Window tkwin,
+ int * xPtr, int * yPtr, int * widthPtr,
+ int * heightPtr)))
+#endif /* #ifndef Tk_GetVRootGeometry */
+
+#ifndef Tk_GetVisual
+VFUNC(Visual *,Tk_GetVisual,V_Tk_GetVisual,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj *str,
+ int * depthPtr, Colormap * colormapPtr)))
+#endif /* #ifndef Tk_GetVisual */
+
+#ifndef Tk_Grab
+VFUNC(int,Tk_Grab,V_Tk_Grab,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, int grabGlobal)))
+#endif /* #ifndef Tk_Grab */
+
+#ifndef Tk_HandleEvent
+VFUNC(void,Tk_HandleEvent,V_Tk_HandleEvent,_ANSI_ARGS_((XEvent * eventPtr)))
+#endif /* #ifndef Tk_HandleEvent */
+
+#ifndef Tk_IdToWindow
+VFUNC(Tk_Window,Tk_IdToWindow,V_Tk_IdToWindow,_ANSI_ARGS_((Display * display,
+ Window window)))
+#endif /* #ifndef Tk_IdToWindow */
+
+#ifndef Tk_ImageChanged
+VFUNC(void,Tk_ImageChanged,V_Tk_ImageChanged,_ANSI_ARGS_((Tk_ImageMaster master,
+ int x, int y, int width, int height,
+ int imageWidth, int imageHeight)))
+#endif /* #ifndef Tk_ImageChanged */
+
+#ifndef Tk_InitOptions
+VFUNC(int,Tk_InitOptions,V_Tk_InitOptions,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionToken,
+ Tk_Window tkwin)))
+#endif /* #ifndef Tk_InitOptions */
+
+#ifndef Tk_InternAtom
+VFUNC(Atom,Tk_InternAtom,V_Tk_InternAtom,_ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name)))
+#endif /* #ifndef Tk_InternAtom */
+
+#ifndef Tk_IntersectTextLayout
+VFUNC(int,Tk_IntersectTextLayout,V_Tk_IntersectTextLayout,_ANSI_ARGS_((
+ Tk_TextLayout layout, int x, int y,
+ int width, int height)))
+#endif /* #ifndef Tk_IntersectTextLayout */
+
+#ifndef Tk_MainLoop
+VFUNC(void,Tk_MainLoop,V_Tk_MainLoop,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tk_MainLoop */
+
+#ifndef Tk_MainWindow
+VFUNC(Tk_Window,Tk_MainWindow,V_Tk_MainWindow,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifndef Tk_MainWindow */
+
+#ifndef Tk_MaintainGeometry
+VFUNC(void,Tk_MaintainGeometry,V_Tk_MaintainGeometry,_ANSI_ARGS_((Tk_Window slave,
+ Tk_Window master, int x, int y, int width,
+ int height)))
+#endif /* #ifndef Tk_MaintainGeometry */
+
+#ifndef Tk_MakeWindowExist
+VFUNC(void,Tk_MakeWindowExist,V_Tk_MakeWindowExist,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_MakeWindowExist */
+
+#ifndef Tk_ManageGeometry
+VFUNC(void,Tk_ManageGeometry,V_Tk_ManageGeometry,_ANSI_ARGS_((Tk_Window tkwin,
+ Tk_GeomMgr * mgrPtr, ClientData clientData)))
+#endif /* #ifndef Tk_ManageGeometry */
+
+#ifndef Tk_MapWindow
+VFUNC(void,Tk_MapWindow,V_Tk_MapWindow,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_MapWindow */
+
+#ifndef Tk_MeasureChars
+VFUNC(int,Tk_MeasureChars,V_Tk_MeasureChars,_ANSI_ARGS_((Tk_Font tkfont,
+ CONST char * source, int numBytes,
+ int maxPixels, int flags, int * lengthPtr)))
+#endif /* #ifndef Tk_MeasureChars */
+
+#ifndef Tk_MoveResizeWindow
+VFUNC(void,Tk_MoveResizeWindow,V_Tk_MoveResizeWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y, int width, int height)))
+#endif /* #ifndef Tk_MoveResizeWindow */
+
+#ifndef Tk_MoveToplevelWindow
+VFUNC(void,Tk_MoveToplevelWindow,V_Tk_MoveToplevelWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y)))
+#endif /* #ifndef Tk_MoveToplevelWindow */
+
+#ifndef Tk_MoveWindow
+VFUNC(void,Tk_MoveWindow,V_Tk_MoveWindow,_ANSI_ARGS_((Tk_Window tkwin, int x,
+ int y)))
+#endif /* #ifndef Tk_MoveWindow */
+
+#ifndef Tk_NameOf3DBorder
+VFUNC(CONST84_RETURN char *,Tk_NameOf3DBorder,V_Tk_NameOf3DBorder,_ANSI_ARGS_((
+ Tk_3DBorder border)))
+#endif /* #ifndef Tk_NameOf3DBorder */
+
+#ifndef Tk_NameOfAnchor
+VFUNC(CONST84_RETURN char *,Tk_NameOfAnchor,V_Tk_NameOfAnchor,_ANSI_ARGS_((Tk_Anchor anchor)))
+#endif /* #ifndef Tk_NameOfAnchor */
+
+#ifndef Tk_NameOfBitmap
+VFUNC(CONST84_RETURN char *,Tk_NameOfBitmap,V_Tk_NameOfBitmap,_ANSI_ARGS_((Display * display,
+ Pixmap bitmap)))
+#endif /* #ifndef Tk_NameOfBitmap */
+
+#ifndef Tk_NameOfCapStyle
+VFUNC(CONST84_RETURN char *,Tk_NameOfCapStyle,V_Tk_NameOfCapStyle,_ANSI_ARGS_((int cap)))
+#endif /* #ifndef Tk_NameOfCapStyle */
+
+#ifndef Tk_NameOfColor
+VFUNC(CONST84_RETURN char *,Tk_NameOfColor,V_Tk_NameOfColor,_ANSI_ARGS_((XColor * colorPtr)))
+#endif /* #ifndef Tk_NameOfColor */
+
+#ifndef Tk_NameOfCursor
+VFUNC(CONST84_RETURN char *,Tk_NameOfCursor,V_Tk_NameOfCursor,_ANSI_ARGS_((Display * display,
+ Tk_Cursor cursor)))
+#endif /* #ifndef Tk_NameOfCursor */
+
+#ifndef Tk_NameOfFont
+VFUNC(CONST84_RETURN char *,Tk_NameOfFont,V_Tk_NameOfFont,_ANSI_ARGS_((Tk_Font font)))
+#endif /* #ifndef Tk_NameOfFont */
+
+#ifndef Tk_NameOfImage
+VFUNC(CONST84_RETURN char *,Tk_NameOfImage,V_Tk_NameOfImage,_ANSI_ARGS_((
+ Tk_ImageMaster imageMaster)))
+#endif /* #ifndef Tk_NameOfImage */
+
+#ifndef Tk_NameOfJoinStyle
+VFUNC(CONST84_RETURN char *,Tk_NameOfJoinStyle,V_Tk_NameOfJoinStyle,_ANSI_ARGS_((int join)))
+#endif /* #ifndef Tk_NameOfJoinStyle */
+
+#ifndef Tk_NameOfJustify
+VFUNC(CONST84_RETURN char *,Tk_NameOfJustify,V_Tk_NameOfJustify,_ANSI_ARGS_((
+ Tk_Justify justify)))
+#endif /* #ifndef Tk_NameOfJustify */
+
+#ifndef Tk_NameOfRelief
+VFUNC(CONST84_RETURN char *,Tk_NameOfRelief,V_Tk_NameOfRelief,_ANSI_ARGS_((int relief)))
+#endif /* #ifndef Tk_NameOfRelief */
+
+#ifndef Tk_NameOfStyle
+VFUNC(CONST char *,Tk_NameOfStyle,V_Tk_NameOfStyle,_ANSI_ARGS_((Tk_Style style)))
+#endif /* #ifndef Tk_NameOfStyle */
+
+#ifndef Tk_NameToWindow
+VFUNC(Tk_Window,Tk_NameToWindow,V_Tk_NameToWindow,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * pathName, Tk_Window tkwin)))
+#endif /* #ifndef Tk_NameToWindow */
+
+#ifndef Tk_OwnSelection
+VFUNC(void,Tk_OwnSelection,V_Tk_OwnSelection,_ANSI_ARGS_((Tk_Window tkwin,
+ Atom selection, Tk_LostSelProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tk_OwnSelection */
+
+#ifndef Tk_PointToChar
+VFUNC(int,Tk_PointToChar,V_Tk_PointToChar,_ANSI_ARGS_((Tk_TextLayout layout,
+ int x, int y)))
+#endif /* #ifndef Tk_PointToChar */
+
+#ifndef Tk_PostscriptBitmap
+VFUNC(int,Tk_PostscriptBitmap,V_Tk_PostscriptBitmap,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_PostscriptInfo psInfo,
+ Pixmap bitmap, int startX, int startY,
+ int width, int height)))
+#endif /* #ifndef Tk_PostscriptBitmap */
+
+#ifndef Tk_PostscriptColor
+VFUNC(int,Tk_PostscriptColor,V_Tk_PostscriptColor,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PostscriptInfo psInfo, XColor * colorPtr)))
+#endif /* #ifndef Tk_PostscriptColor */
+
+#ifndef Tk_PostscriptFont
+VFUNC(int,Tk_PostscriptFont,V_Tk_PostscriptFont,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PostscriptInfo psInfo, Tk_Font font)))
+#endif /* #ifndef Tk_PostscriptFont */
+
+#ifndef Tk_PostscriptFontName
+VFUNC(int,Tk_PostscriptFontName,V_Tk_PostscriptFontName,_ANSI_ARGS_((Tk_Font tkfont,
+ Tcl_DString * dsPtr)))
+#endif /* #ifndef Tk_PostscriptFontName */
+
+#ifndef Tk_PostscriptImage
+VFUNC(int,Tk_PostscriptImage,V_Tk_PostscriptImage,_ANSI_ARGS_((Tk_Image image,
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tk_PostscriptInfo psinfo, int x, int y,
+ int width, int height, int prepass)))
+#endif /* #ifndef Tk_PostscriptImage */
+
+#ifndef Tk_PostscriptPath
+VFUNC(void,Tk_PostscriptPath,V_Tk_PostscriptPath,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PostscriptInfo psInfo, double * coordPtr,
+ int numPoints)))
+#endif /* #ifndef Tk_PostscriptPath */
+
+#ifndef Tk_PostscriptPhoto
+VFUNC(int,Tk_PostscriptPhoto,V_Tk_PostscriptPhoto,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_PhotoImageBlock * blockPtr,
+ Tk_PostscriptInfo psInfo, int width,
+ int height)))
+#endif /* #ifndef Tk_PostscriptPhoto */
+
+#ifndef Tk_PostscriptStipple
+VFUNC(int,Tk_PostscriptStipple,V_Tk_PostscriptStipple,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Window tkwin,
+ Tk_PostscriptInfo psInfo, Pixmap bitmap)))
+#endif /* #ifndef Tk_PostscriptStipple */
+
+#ifndef Tk_PostscriptY
+VFUNC(double,Tk_PostscriptY,V_Tk_PostscriptY,_ANSI_ARGS_((double y,
+ Tk_PostscriptInfo psInfo)))
+#endif /* #ifndef Tk_PostscriptY */
+
+#ifndef Tk_PreserveColormap
+VFUNC(void,Tk_PreserveColormap,V_Tk_PreserveColormap,_ANSI_ARGS_((Display * display,
+ Colormap colormap)))
+#endif /* #ifndef Tk_PreserveColormap */
+
+#ifndef Tk_QueueWindowEvent
+VFUNC(void,Tk_QueueWindowEvent,V_Tk_QueueWindowEvent,_ANSI_ARGS_((XEvent * eventPtr,
+ Tcl_QueuePosition position)))
+#endif /* #ifndef Tk_QueueWindowEvent */
+
+#ifndef Tk_RedrawImage
+VFUNC(void,Tk_RedrawImage,V_Tk_RedrawImage,_ANSI_ARGS_((Tk_Image image,
+ int imageX, int imageY, int width,
+ int height, Drawable drawable, int drawableX,
+ int drawableY)))
+#endif /* #ifndef Tk_RedrawImage */
+
+#ifndef Tk_RegisterStyleEngine
+VFUNC(Tk_StyleEngine,Tk_RegisterStyleEngine,V_Tk_RegisterStyleEngine,_ANSI_ARGS_((
+ CONST char * name, Tk_StyleEngine parent)))
+#endif /* #ifndef Tk_RegisterStyleEngine */
+
+#ifndef Tk_RegisterStyledElement
+VFUNC(int,Tk_RegisterStyledElement,V_Tk_RegisterStyledElement,_ANSI_ARGS_((
+ Tk_StyleEngine engine,
+ Tk_ElementSpec * templatePtr)))
+#endif /* #ifndef Tk_RegisterStyledElement */
+
+#ifndef Tk_ResizeWindow
+VFUNC(void,Tk_ResizeWindow,V_Tk_ResizeWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ int width, int height)))
+#endif /* #ifndef Tk_ResizeWindow */
+
+#ifndef Tk_RestackWindow
+VFUNC(int,Tk_RestackWindow,V_Tk_RestackWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ int aboveBelow, Tk_Window other)))
+#endif /* #ifndef Tk_RestackWindow */
+
+#ifndef Tk_RestoreSavedOptions
+VFUNC(void,Tk_RestoreSavedOptions,V_Tk_RestoreSavedOptions,_ANSI_ARGS_((
+ Tk_SavedOptions * savePtr)))
+#endif /* #ifndef Tk_RestoreSavedOptions */
+
+#ifndef Tk_RestrictEvents
+VFUNC(Tk_RestrictProc *,Tk_RestrictEvents,V_Tk_RestrictEvents,_ANSI_ARGS_((
+ Tk_RestrictProc * proc, ClientData arg,
+ ClientData * prevArgPtr)))
+#endif /* #ifndef Tk_RestrictEvents */
+
+#ifndef Tk_SetAppName
+VFUNC(CONST char *,Tk_SetAppName,V_Tk_SetAppName,_ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name)))
+#endif /* #ifndef Tk_SetAppName */
+
+#ifndef Tk_SetBackgroundFromBorder
+VFUNC(void,Tk_SetBackgroundFromBorder,V_Tk_SetBackgroundFromBorder,_ANSI_ARGS_((
+ Tk_Window tkwin, Tk_3DBorder border)))
+#endif /* #ifndef Tk_SetBackgroundFromBorder */
+
+#ifndef Tk_SetCaretPos
+VFUNC(void,Tk_SetCaretPos,V_Tk_SetCaretPos,_ANSI_ARGS_((Tk_Window tkwin, int x,
+ int y, int height)))
+#endif /* #ifndef Tk_SetCaretPos */
+
+#ifndef Tk_SetClass
+VFUNC(void,Tk_SetClass,V_Tk_SetClass,_ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * className)))
+#endif /* #ifndef Tk_SetClass */
+
+#ifndef Tk_SetClassProcs
+VFUNC(void,Tk_SetClassProcs,V_Tk_SetClassProcs,_ANSI_ARGS_((Tk_Window tkwin,
+ Tk_ClassProcs * procs,
+ ClientData instanceData)))
+#endif /* #ifndef Tk_SetClassProcs */
+
+#ifndef Tk_SetGrid
+VFUNC(void,Tk_SetGrid,V_Tk_SetGrid,_ANSI_ARGS_((Tk_Window tkwin,
+ int reqWidth, int reqHeight, int gridWidth,
+ int gridHeight)))
+#endif /* #ifndef Tk_SetGrid */
+
+#ifndef Tk_SetInternalBorder
+VFUNC(void,Tk_SetInternalBorder,V_Tk_SetInternalBorder,_ANSI_ARGS_((Tk_Window tkwin,
+ int width)))
+#endif /* #ifndef Tk_SetInternalBorder */
+
+#ifndef Tk_SetInternalBorderEx
+VFUNC(void,Tk_SetInternalBorderEx,V_Tk_SetInternalBorderEx,_ANSI_ARGS_((Tk_Window tkwin,
+ int left, int right, int top, int bottom)))
+#endif /* #ifndef Tk_SetInternalBorderEx */
+
+#ifndef Tk_SetMinimumRequestSize
+VFUNC(void,Tk_SetMinimumRequestSize,V_Tk_SetMinimumRequestSize,_ANSI_ARGS_((
+ Tk_Window tkwin, int minWidth, int minHeight)))
+#endif /* #ifndef Tk_SetMinimumRequestSize */
+
+#ifndef Tk_SetOptions
+VFUNC(int,Tk_SetOptions,V_Tk_SetOptions,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * recordPtr, Tk_OptionTable optionTable,
+ int objc, Tcl_Obj *CONST objv[],
+ Tk_Window tkwin, Tk_SavedOptions * savePtr,
+ int * maskPtr)))
+#endif /* #ifndef Tk_SetOptions */
+
+#ifndef Tk_SetTSOrigin
+VFUNC(void,Tk_SetTSOrigin,V_Tk_SetTSOrigin,_ANSI_ARGS_((Tk_Window tkwin, GC gc,
+ int x, int y)))
+#endif /* #ifndef Tk_SetTSOrigin */
+
+#ifndef Tk_SetWindowBackground
+VFUNC(void,Tk_SetWindowBackground,V_Tk_SetWindowBackground,_ANSI_ARGS_((Tk_Window tkwin,
+ unsigned long pixel)))
+#endif /* #ifndef Tk_SetWindowBackground */
+
+#ifndef Tk_SetWindowBackgroundPixmap
+VFUNC(void,Tk_SetWindowBackgroundPixmap,V_Tk_SetWindowBackgroundPixmap,_ANSI_ARGS_((
+ Tk_Window tkwin, Pixmap pixmap)))
+#endif /* #ifndef Tk_SetWindowBackgroundPixmap */
+
+#ifndef Tk_SetWindowBorder
+VFUNC(void,Tk_SetWindowBorder,V_Tk_SetWindowBorder,_ANSI_ARGS_((Tk_Window tkwin,
+ unsigned long pixel)))
+#endif /* #ifndef Tk_SetWindowBorder */
+
+#ifndef Tk_SetWindowBorderPixmap
+VFUNC(void,Tk_SetWindowBorderPixmap,V_Tk_SetWindowBorderPixmap,_ANSI_ARGS_((
+ Tk_Window tkwin, Pixmap pixmap)))
+#endif /* #ifndef Tk_SetWindowBorderPixmap */
+
+#ifndef Tk_SetWindowBorderWidth
+VFUNC(void,Tk_SetWindowBorderWidth,V_Tk_SetWindowBorderWidth,_ANSI_ARGS_((Tk_Window tkwin,
+ int width)))
+#endif /* #ifndef Tk_SetWindowBorderWidth */
+
+#ifndef Tk_SetWindowColormap
+VFUNC(void,Tk_SetWindowColormap,V_Tk_SetWindowColormap,_ANSI_ARGS_((Tk_Window tkwin,
+ Colormap colormap)))
+#endif /* #ifndef Tk_SetWindowColormap */
+
+#ifndef Tk_SetWindowVisual
+VFUNC(int,Tk_SetWindowVisual,V_Tk_SetWindowVisual,_ANSI_ARGS_((Tk_Window tkwin,
+ Visual * visual, int depth,
+ Colormap colormap)))
+#endif /* #ifndef Tk_SetWindowVisual */
+
+#ifndef Tk_SizeOfBitmap
+VFUNC(void,Tk_SizeOfBitmap,V_Tk_SizeOfBitmap,_ANSI_ARGS_((Display * display,
+ Pixmap bitmap, int * widthPtr,
+ int * heightPtr)))
+#endif /* #ifndef Tk_SizeOfBitmap */
+
+#ifndef Tk_SizeOfImage
+VFUNC(void,Tk_SizeOfImage,V_Tk_SizeOfImage,_ANSI_ARGS_((Tk_Image image,
+ int * widthPtr, int * heightPtr)))
+#endif /* #ifndef Tk_SizeOfImage */
+
+#ifndef Tk_StrictMotif
+VFUNC(int,Tk_StrictMotif,V_Tk_StrictMotif,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_StrictMotif */
+
+#ifndef Tk_TextLayoutToPostscript
+VFUNC(void,Tk_TextLayoutToPostscript,V_Tk_TextLayoutToPostscript,_ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_TextLayout layout)))
+#endif /* #ifndef Tk_TextLayoutToPostscript */
+
+#ifndef Tk_TextWidth
+VFUNC(int,Tk_TextWidth,V_Tk_TextWidth,_ANSI_ARGS_((Tk_Font font,
+ CONST char * str, int numBytes)))
+#endif /* #ifndef Tk_TextWidth */
+
+#ifndef Tk_UndefineCursor
+VFUNC(void,Tk_UndefineCursor,V_Tk_UndefineCursor,_ANSI_ARGS_((Tk_Window window)))
+#endif /* #ifndef Tk_UndefineCursor */
+
+#ifndef Tk_UnderlineChars
+VFUNC(void,Tk_UnderlineChars,V_Tk_UnderlineChars,_ANSI_ARGS_((Display * display,
+ Drawable drawable, GC gc, Tk_Font tkfont,
+ CONST char * source, int x, int y,
+ int firstByte, int lastByte)))
+#endif /* #ifndef Tk_UnderlineChars */
+
+#ifndef Tk_UnderlineTextLayout
+VFUNC(void,Tk_UnderlineTextLayout,V_Tk_UnderlineTextLayout,_ANSI_ARGS_((
+ Display * display, Drawable drawable, GC gc,
+ Tk_TextLayout layout, int x, int y,
+ int underline)))
+#endif /* #ifndef Tk_UnderlineTextLayout */
+
+#ifndef Tk_Ungrab
+VFUNC(void,Tk_Ungrab,V_Tk_Ungrab,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_Ungrab */
+
+#ifndef Tk_UnmaintainGeometry
+VFUNC(void,Tk_UnmaintainGeometry,V_Tk_UnmaintainGeometry,_ANSI_ARGS_((Tk_Window slave,
+ Tk_Window master)))
+#endif /* #ifndef Tk_UnmaintainGeometry */
+
+#ifndef Tk_UnmapWindow
+VFUNC(void,Tk_UnmapWindow,V_Tk_UnmapWindow,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_UnmapWindow */
+
+#ifndef Tk_UnsetGrid
+VFUNC(void,Tk_UnsetGrid,V_Tk_UnsetGrid,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef Tk_UnsetGrid */
+
+#ifndef Tk_UpdatePointer
+VFUNC(void,Tk_UpdatePointer,V_Tk_UpdatePointer,_ANSI_ARGS_((Tk_Window tkwin, int x,
+ int y, int state)))
+#endif /* #ifndef Tk_UpdatePointer */
+
+#endif /* _TKDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls_f.h
new file mode 100644
index 00000000000..262cacb519d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkDecls_f.h
@@ -0,0 +1,14 @@
+#ifndef TKDECLS_VT
+#define TKDECLS_VT
+typedef struct TkdeclsVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkDecls.t"
+#undef VFUNC
+#undef VVAR
+} TkdeclsVtab;
+extern TkdeclsVtab *TkdeclsVptr;
+extern TkdeclsVtab *TkdeclsVGet(void);
+#endif /* TKDECLS_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.h
new file mode 100644
index 00000000000..9787af4425e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.h
@@ -0,0 +1,122 @@
+#ifndef _TKEVENT
+#define _TKEVENT
+
+#define LangCallbackArg(x) LangOldCallbackArg(x,__FILE__,__LINE__)
+
+EXTERN int LangCallCallback _ANSI_ARGS_((LangCallback *cb, int flags));
+EXTERN Tcl_Obj * LangCallbackObj _ANSI_ARGS_((LangCallback *));
+EXTERN int LangCmpCallback _ANSI_ARGS_((LangCallback *a,Tcl_Obj * b));
+EXTERN LangCallback * LangCopyCallback _ANSI_ARGS_((LangCallback *));
+EXTERN void LangDebug _ANSI_ARGS_((CONST char *fmt,...));
+EXTERN void LangAsyncCheck _ANSI_ARGS_((void));
+EXTERN void LangFreeCallback _ANSI_ARGS_((LangCallback *));
+EXTERN LangCallback * LangMakeCallback _ANSI_ARGS_((Tcl_Obj *));
+EXTERN Tcl_Obj * LangOldCallbackArg _ANSI_ARGS_((LangCallback *,char *,int));
+EXTERN void LangPushCallbackArgs _ANSI_ARGS_((LangCallback **svp));
+EXTERN long Lang_OSHandle _ANSI_ARGS_((int fd));
+EXTERN void Tcl_AlertNotifier _ANSI_ARGS_((ClientData clientData));
+EXTERN char * Tcl_Alloc _ANSI_ARGS_((unsigned int size));
+EXTERN Tcl_AsyncHandler Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc * proc,
+ ClientData clientData));
+EXTERN void Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
+EXTERN int Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp * interp,
+ int code));
+EXTERN void Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
+EXTERN int Tcl_AsyncReady _ANSI_ARGS_((void));
+EXTERN void Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
+ ClientData clientData));
+EXTERN void Tcl_CreateEventSource _ANSI_ARGS_((
+ Tcl_EventSetupProc *setupProc,
+ Tcl_EventCheckProc *checkProc,
+ ClientData clientData));
+EXTERN void Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
+ ClientData clientData));
+EXTERN void Tcl_CreateFileHandler _ANSI_ARGS_((
+ int fd, int mask, Tcl_FileProc *proc,
+ ClientData clientData));
+EXTERN void Tcl_CreateThreadExitHandler _ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData));
+EXTERN Tcl_TimerToken Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
+ Tcl_TimerProc *proc, ClientData clientData));
+EXTERN char * Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,CONST char *file,int line));
+EXTERN int Tcl_DbCkfree _ANSI_ARGS_((char * ptr, CONST char * file,
+ int line));
+EXTERN char * Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
+ unsigned int size, CONST char *file,int line));
+EXTERN void Tcl_DeleteEventSource _ANSI_ARGS_((
+ Tcl_EventSetupProc *setupProc,
+ Tcl_EventCheckProc *checkProc,
+ ClientData clientData));
+EXTERN void Tcl_DeleteEvents _ANSI_ARGS_((
+ Tcl_EventDeleteProc * proc,
+ ClientData clientData));
+EXTERN void Tcl_DeleteExitHandler _ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData));
+EXTERN void Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
+EXTERN void Tcl_DeleteThreadExitHandler _ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData));
+EXTERN void Tcl_DeleteTimerHandler _ANSI_ARGS_((
+ Tcl_TimerToken token));
+EXTERN int Tcl_DoOneEvent _ANSI_ARGS_((int flags));
+EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
+ ClientData clientData));
+EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_((CONST char * fileName));
+EXTERN void Tcl_Exit _ANSI_ARGS_((int status));
+EXTERN void Tcl_Finalize _ANSI_ARGS_((void));
+EXTERN void Tcl_FinalizeNotifier _ANSI_ARGS_((
+ ClientData clientData));
+EXTERN void Tcl_FinalizeThread _ANSI_ARGS_((void));
+EXTERN void Tcl_Free _ANSI_ARGS_((char *ptr));
+EXTERN Tcl_ThreadId Tcl_GetCurrentThread _ANSI_ARGS_((void));
+EXTERN int Tcl_GetServiceMode _ANSI_ARGS_((void));
+EXTERN VOID * Tcl_GetThreadData _ANSI_ARGS_((
+ Tcl_ThreadDataKey * keyPtr, int size));
+EXTERN ClientData Tcl_InitNotifier _ANSI_ARGS_((void));
+EXTERN void Tcl_Panic _ANSI_ARGS_((CONST char *,...));
+EXTERN void Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
+ Tcl_QueuePosition position));
+EXTERN void Tcl_QueueProcEvent _ANSI_ARGS_((Tcl_EventProc *proc,
+ Tcl_Event *evPtr,
+ Tcl_QueuePosition position));
+EXTERN char * Tcl_Realloc _ANSI_ARGS_((char *ptr,
+ unsigned int size));
+EXTERN int Tcl_ServiceAll _ANSI_ARGS_((void));
+EXTERN int Tcl_ServiceEvent _ANSI_ARGS_((int flags));
+EXTERN void Tcl_ServiceModeHook _ANSI_ARGS_((int mode));
+EXTERN void Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
+EXTERN void Tcl_SetNotifier _ANSI_ARGS_((
+ Tcl_NotifierProcs * notifierProcPtr));
+EXTERN int Tcl_SetServiceMode _ANSI_ARGS_((int mode));
+EXTERN void Tcl_SetTimer _ANSI_ARGS_((Tcl_Time * timePtr));
+EXTERN void Tcl_Sleep _ANSI_ARGS_((int ms));
+EXTERN void Tcl_ThreadAlert _ANSI_ARGS_((Tcl_ThreadId threadId));
+EXTERN void Tcl_ThreadQueueEvent _ANSI_ARGS_((
+ Tcl_ThreadId threadId, Tcl_Event* evPtr,
+ Tcl_QueuePosition position));
+EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((CONST char * file,
+ int line));
+EXTERN int Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time * timePtr));
+EXTERN void TclpAsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
+EXTERN void Tcl_GetTime _ANSI_ARGS_((Tcl_Time *time));
+EXTERN void * TkInitTimer _ANSI_ARGS_((void));
+EXTERN void Lang_NoteOwner _ANSI_ARGS_((void *owner,void *packet,
+ CONST char *file, int line));
+EXTERN char * Tcl_AttemptDbCkalloc _ANSI_ARGS_((unsigned int size,
+ CONST char * file, int line));
+EXTERN void TclpExit _ANSI_ARGS_((int status));
+
+#ifdef TCL_MEM_DEBUG
+#define LangNoteOwner(owner,packet) Lang_NoteOwner(owner,packet,__FILE__,__LINE__)
+#else
+#define LangNoteOwner(owner,packet)
+#endif
+
+#ifndef TCL_TSD_INIT
+#define TCL_TSD_INIT(keyPtr) (ThreadSpecificData *)Tcl_GetThreadData((keyPtr), sizeof(ThreadSpecificData))
+#endif
+
+
+#endif /* _TKEVENT */
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.m
new file mode 100644
index 00000000000..75219487d2f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.m
@@ -0,0 +1,274 @@
+#ifndef _TKEVENT_VM
+#define _TKEVENT_VM
+#include "tkEvent_f.h"
+#ifndef NO_VTABLES
+#ifndef LangAsyncCheck
+# define LangAsyncCheck (*TkeventVptr->V_LangAsyncCheck)
+#endif
+
+#ifndef LangCallCallback
+# define LangCallCallback (*TkeventVptr->V_LangCallCallback)
+#endif
+
+#ifndef LangCallbackObj
+# define LangCallbackObj (*TkeventVptr->V_LangCallbackObj)
+#endif
+
+#ifndef LangCmpCallback
+# define LangCmpCallback (*TkeventVptr->V_LangCmpCallback)
+#endif
+
+#ifndef LangCopyCallback
+# define LangCopyCallback (*TkeventVptr->V_LangCopyCallback)
+#endif
+
+#ifndef LangDebug
+# define LangDebug (*TkeventVptr->V_LangDebug)
+#endif
+
+#ifndef LangFreeCallback
+# define LangFreeCallback (*TkeventVptr->V_LangFreeCallback)
+#endif
+
+#ifndef LangMakeCallback
+# define LangMakeCallback (*TkeventVptr->V_LangMakeCallback)
+#endif
+
+#ifndef LangOldCallbackArg
+# define LangOldCallbackArg (*TkeventVptr->V_LangOldCallbackArg)
+#endif
+
+#ifndef LangPushCallbackArgs
+# define LangPushCallbackArgs (*TkeventVptr->V_LangPushCallbackArgs)
+#endif
+
+#ifndef Lang_NoteOwner
+# define Lang_NoteOwner (*TkeventVptr->V_Lang_NoteOwner)
+#endif
+
+#ifndef Lang_OSHandle
+# define Lang_OSHandle (*TkeventVptr->V_Lang_OSHandle)
+#endif
+
+#ifndef Tcl_AlertNotifier
+# define Tcl_AlertNotifier (*TkeventVptr->V_Tcl_AlertNotifier)
+#endif
+
+#ifndef Tcl_Alloc
+# define Tcl_Alloc (*TkeventVptr->V_Tcl_Alloc)
+#endif
+
+#ifndef Tcl_AsyncCreate
+# define Tcl_AsyncCreate (*TkeventVptr->V_Tcl_AsyncCreate)
+#endif
+
+#ifndef Tcl_AsyncDelete
+# define Tcl_AsyncDelete (*TkeventVptr->V_Tcl_AsyncDelete)
+#endif
+
+#ifndef Tcl_AsyncInvoke
+# define Tcl_AsyncInvoke (*TkeventVptr->V_Tcl_AsyncInvoke)
+#endif
+
+#ifndef Tcl_AsyncMark
+# define Tcl_AsyncMark (*TkeventVptr->V_Tcl_AsyncMark)
+#endif
+
+#ifndef Tcl_AsyncReady
+# define Tcl_AsyncReady (*TkeventVptr->V_Tcl_AsyncReady)
+#endif
+
+#ifndef Tcl_AttemptDbCkalloc
+# define Tcl_AttemptDbCkalloc (*TkeventVptr->V_Tcl_AttemptDbCkalloc)
+#endif
+
+#ifndef Tcl_CancelIdleCall
+# define Tcl_CancelIdleCall (*TkeventVptr->V_Tcl_CancelIdleCall)
+#endif
+
+#ifndef Tcl_CreateEventSource
+# define Tcl_CreateEventSource (*TkeventVptr->V_Tcl_CreateEventSource)
+#endif
+
+#ifndef Tcl_CreateExitHandler
+# define Tcl_CreateExitHandler (*TkeventVptr->V_Tcl_CreateExitHandler)
+#endif
+
+#ifndef Tcl_CreateFileHandler
+# define Tcl_CreateFileHandler (*TkeventVptr->V_Tcl_CreateFileHandler)
+#endif
+
+#ifndef Tcl_CreateThreadExitHandler
+# define Tcl_CreateThreadExitHandler (*TkeventVptr->V_Tcl_CreateThreadExitHandler)
+#endif
+
+#ifndef Tcl_CreateTimerHandler
+# define Tcl_CreateTimerHandler (*TkeventVptr->V_Tcl_CreateTimerHandler)
+#endif
+
+#ifndef Tcl_DbCkalloc
+# define Tcl_DbCkalloc (*TkeventVptr->V_Tcl_DbCkalloc)
+#endif
+
+#ifndef Tcl_DbCkfree
+# define Tcl_DbCkfree (*TkeventVptr->V_Tcl_DbCkfree)
+#endif
+
+#ifndef Tcl_DbCkrealloc
+# define Tcl_DbCkrealloc (*TkeventVptr->V_Tcl_DbCkrealloc)
+#endif
+
+#ifndef Tcl_DeleteEventSource
+# define Tcl_DeleteEventSource (*TkeventVptr->V_Tcl_DeleteEventSource)
+#endif
+
+#ifndef Tcl_DeleteEvents
+# define Tcl_DeleteEvents (*TkeventVptr->V_Tcl_DeleteEvents)
+#endif
+
+#ifndef Tcl_DeleteExitHandler
+# define Tcl_DeleteExitHandler (*TkeventVptr->V_Tcl_DeleteExitHandler)
+#endif
+
+#ifndef Tcl_DeleteFileHandler
+# define Tcl_DeleteFileHandler (*TkeventVptr->V_Tcl_DeleteFileHandler)
+#endif
+
+#ifndef Tcl_DeleteThreadExitHandler
+# define Tcl_DeleteThreadExitHandler (*TkeventVptr->V_Tcl_DeleteThreadExitHandler)
+#endif
+
+#ifndef Tcl_DeleteTimerHandler
+# define Tcl_DeleteTimerHandler (*TkeventVptr->V_Tcl_DeleteTimerHandler)
+#endif
+
+#ifndef Tcl_DoOneEvent
+# define Tcl_DoOneEvent (*TkeventVptr->V_Tcl_DoOneEvent)
+#endif
+
+#ifndef Tcl_DoWhenIdle
+# define Tcl_DoWhenIdle (*TkeventVptr->V_Tcl_DoWhenIdle)
+#endif
+
+#ifndef Tcl_DumpActiveMemory
+# define Tcl_DumpActiveMemory (*TkeventVptr->V_Tcl_DumpActiveMemory)
+#endif
+
+#ifndef Tcl_Exit
+# define Tcl_Exit (*TkeventVptr->V_Tcl_Exit)
+#endif
+
+#ifndef Tcl_Finalize
+# define Tcl_Finalize (*TkeventVptr->V_Tcl_Finalize)
+#endif
+
+#ifndef Tcl_FinalizeNotifier
+# define Tcl_FinalizeNotifier (*TkeventVptr->V_Tcl_FinalizeNotifier)
+#endif
+
+#ifndef Tcl_FinalizeThread
+# define Tcl_FinalizeThread (*TkeventVptr->V_Tcl_FinalizeThread)
+#endif
+
+#ifndef Tcl_Free
+# define Tcl_Free (*TkeventVptr->V_Tcl_Free)
+#endif
+
+#ifndef Tcl_GetCurrentThread
+# define Tcl_GetCurrentThread (*TkeventVptr->V_Tcl_GetCurrentThread)
+#endif
+
+#ifndef Tcl_GetServiceMode
+# define Tcl_GetServiceMode (*TkeventVptr->V_Tcl_GetServiceMode)
+#endif
+
+#ifndef Tcl_GetThreadData
+# define Tcl_GetThreadData (*TkeventVptr->V_Tcl_GetThreadData)
+#endif
+
+#ifndef Tcl_GetTime
+# define Tcl_GetTime (*TkeventVptr->V_Tcl_GetTime)
+#endif
+
+#ifndef Tcl_InitNotifier
+# define Tcl_InitNotifier (*TkeventVptr->V_Tcl_InitNotifier)
+#endif
+
+#ifndef Tcl_Panic
+# define Tcl_Panic (*TkeventVptr->V_Tcl_Panic)
+#endif
+
+#ifndef Tcl_QueueEvent
+# define Tcl_QueueEvent (*TkeventVptr->V_Tcl_QueueEvent)
+#endif
+
+#ifndef Tcl_QueueProcEvent
+# define Tcl_QueueProcEvent (*TkeventVptr->V_Tcl_QueueProcEvent)
+#endif
+
+#ifndef Tcl_Realloc
+# define Tcl_Realloc (*TkeventVptr->V_Tcl_Realloc)
+#endif
+
+#ifndef Tcl_ServiceAll
+# define Tcl_ServiceAll (*TkeventVptr->V_Tcl_ServiceAll)
+#endif
+
+#ifndef Tcl_ServiceEvent
+# define Tcl_ServiceEvent (*TkeventVptr->V_Tcl_ServiceEvent)
+#endif
+
+#ifndef Tcl_ServiceModeHook
+# define Tcl_ServiceModeHook (*TkeventVptr->V_Tcl_ServiceModeHook)
+#endif
+
+#ifndef Tcl_SetMaxBlockTime
+# define Tcl_SetMaxBlockTime (*TkeventVptr->V_Tcl_SetMaxBlockTime)
+#endif
+
+#ifndef Tcl_SetNotifier
+# define Tcl_SetNotifier (*TkeventVptr->V_Tcl_SetNotifier)
+#endif
+
+#ifndef Tcl_SetServiceMode
+# define Tcl_SetServiceMode (*TkeventVptr->V_Tcl_SetServiceMode)
+#endif
+
+#ifndef Tcl_SetTimer
+# define Tcl_SetTimer (*TkeventVptr->V_Tcl_SetTimer)
+#endif
+
+#ifndef Tcl_Sleep
+# define Tcl_Sleep (*TkeventVptr->V_Tcl_Sleep)
+#endif
+
+#ifndef Tcl_ThreadAlert
+# define Tcl_ThreadAlert (*TkeventVptr->V_Tcl_ThreadAlert)
+#endif
+
+#ifndef Tcl_ThreadQueueEvent
+# define Tcl_ThreadQueueEvent (*TkeventVptr->V_Tcl_ThreadQueueEvent)
+#endif
+
+#ifndef Tcl_ValidateAllMemory
+# define Tcl_ValidateAllMemory (*TkeventVptr->V_Tcl_ValidateAllMemory)
+#endif
+
+#ifndef Tcl_WaitForEvent
+# define Tcl_WaitForEvent (*TkeventVptr->V_Tcl_WaitForEvent)
+#endif
+
+#ifndef TclpAsyncMark
+# define TclpAsyncMark (*TkeventVptr->V_TclpAsyncMark)
+#endif
+
+#ifndef TclpExit
+# define TclpExit (*TkeventVptr->V_TclpExit)
+#endif
+
+#ifndef TkInitTimer
+# define TkInitTimer (*TkeventVptr->V_TkInitTimer)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKEVENT_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.t
new file mode 100644
index 00000000000..c09210729f5
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent.t
@@ -0,0 +1,304 @@
+#ifdef _TKEVENT
+#ifndef LangAsyncCheck
+VFUNC(void,LangAsyncCheck,V_LangAsyncCheck,_ANSI_ARGS_((void)))
+#endif /* #ifndef LangAsyncCheck */
+
+#ifndef LangCallCallback
+VFUNC(int,LangCallCallback,V_LangCallCallback,_ANSI_ARGS_((LangCallback *cb, int flags)))
+#endif /* #ifndef LangCallCallback */
+
+#ifndef LangCallbackObj
+VFUNC(Tcl_Obj *,LangCallbackObj,V_LangCallbackObj,_ANSI_ARGS_((LangCallback *)))
+#endif /* #ifndef LangCallbackObj */
+
+#ifndef LangCmpCallback
+VFUNC(int,LangCmpCallback,V_LangCmpCallback,_ANSI_ARGS_((LangCallback *a,Tcl_Obj * b)))
+#endif /* #ifndef LangCmpCallback */
+
+#ifndef LangCopyCallback
+VFUNC(LangCallback *,LangCopyCallback,V_LangCopyCallback,_ANSI_ARGS_((LangCallback *)))
+#endif /* #ifndef LangCopyCallback */
+
+#ifndef LangDebug
+VFUNC(void,LangDebug,V_LangDebug,_ANSI_ARGS_((CONST char *fmt,...)))
+#endif /* #ifndef LangDebug */
+
+#ifndef LangFreeCallback
+VFUNC(void,LangFreeCallback,V_LangFreeCallback,_ANSI_ARGS_((LangCallback *)))
+#endif /* #ifndef LangFreeCallback */
+
+#ifndef LangMakeCallback
+VFUNC(LangCallback *,LangMakeCallback,V_LangMakeCallback,_ANSI_ARGS_((Tcl_Obj *)))
+#endif /* #ifndef LangMakeCallback */
+
+#ifndef LangOldCallbackArg
+VFUNC(Tcl_Obj *,LangOldCallbackArg,V_LangOldCallbackArg,_ANSI_ARGS_((LangCallback *,char *,int)))
+#endif /* #ifndef LangOldCallbackArg */
+
+#ifndef LangPushCallbackArgs
+VFUNC(void,LangPushCallbackArgs,V_LangPushCallbackArgs,_ANSI_ARGS_((LangCallback **svp)))
+#endif /* #ifndef LangPushCallbackArgs */
+
+#ifndef Lang_NoteOwner
+VFUNC(void,Lang_NoteOwner,V_Lang_NoteOwner,_ANSI_ARGS_((void *owner,void *packet,
+ CONST char *file, int line)))
+#endif /* #ifndef Lang_NoteOwner */
+
+#ifndef Lang_OSHandle
+VFUNC(long,Lang_OSHandle,V_Lang_OSHandle,_ANSI_ARGS_((int fd)))
+#endif /* #ifndef Lang_OSHandle */
+
+#ifndef Tcl_AlertNotifier
+VFUNC(void,Tcl_AlertNotifier,V_Tcl_AlertNotifier,_ANSI_ARGS_((ClientData clientData)))
+#endif /* #ifndef Tcl_AlertNotifier */
+
+#ifndef Tcl_Alloc
+VFUNC(char *,Tcl_Alloc,V_Tcl_Alloc,_ANSI_ARGS_((unsigned int size)))
+#endif /* #ifndef Tcl_Alloc */
+
+#ifndef Tcl_AsyncCreate
+VFUNC(Tcl_AsyncHandler,Tcl_AsyncCreate,V_Tcl_AsyncCreate,_ANSI_ARGS_((Tcl_AsyncProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_AsyncCreate */
+
+#ifndef Tcl_AsyncDelete
+VFUNC(void,Tcl_AsyncDelete,V_Tcl_AsyncDelete,_ANSI_ARGS_((Tcl_AsyncHandler async)))
+#endif /* #ifndef Tcl_AsyncDelete */
+
+#ifndef Tcl_AsyncInvoke
+VFUNC(int,Tcl_AsyncInvoke,V_Tcl_AsyncInvoke,_ANSI_ARGS_((Tcl_Interp * interp,
+ int code)))
+#endif /* #ifndef Tcl_AsyncInvoke */
+
+#ifndef Tcl_AsyncMark
+VFUNC(void,Tcl_AsyncMark,V_Tcl_AsyncMark,_ANSI_ARGS_((Tcl_AsyncHandler async)))
+#endif /* #ifndef Tcl_AsyncMark */
+
+#ifndef Tcl_AsyncReady
+VFUNC(int,Tcl_AsyncReady,V_Tcl_AsyncReady,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_AsyncReady */
+
+#ifndef Tcl_AttemptDbCkalloc
+VFUNC(char *,Tcl_AttemptDbCkalloc,V_Tcl_AttemptDbCkalloc,_ANSI_ARGS_((unsigned int size,
+ CONST char * file, int line)))
+#endif /* #ifndef Tcl_AttemptDbCkalloc */
+
+#ifndef Tcl_CancelIdleCall
+VFUNC(void,Tcl_CancelIdleCall,V_Tcl_CancelIdleCall,_ANSI_ARGS_((Tcl_IdleProc *idleProc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_CancelIdleCall */
+
+#ifndef Tcl_CreateEventSource
+VFUNC(void,Tcl_CreateEventSource,V_Tcl_CreateEventSource,_ANSI_ARGS_((
+ Tcl_EventSetupProc *setupProc,
+ Tcl_EventCheckProc *checkProc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_CreateEventSource */
+
+#ifndef Tcl_CreateExitHandler
+VFUNC(void,Tcl_CreateExitHandler,V_Tcl_CreateExitHandler,_ANSI_ARGS_((Tcl_ExitProc *proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_CreateExitHandler */
+
+#ifndef Tcl_CreateFileHandler
+VFUNC(void,Tcl_CreateFileHandler,V_Tcl_CreateFileHandler,_ANSI_ARGS_((
+ int fd, int mask, Tcl_FileProc *proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_CreateFileHandler */
+
+#ifndef Tcl_CreateThreadExitHandler
+VFUNC(void,Tcl_CreateThreadExitHandler,V_Tcl_CreateThreadExitHandler,_ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData)))
+#endif /* #ifndef Tcl_CreateThreadExitHandler */
+
+#ifndef Tcl_CreateTimerHandler
+VFUNC(Tcl_TimerToken,Tcl_CreateTimerHandler,V_Tcl_CreateTimerHandler,_ANSI_ARGS_((int milliseconds,
+ Tcl_TimerProc *proc, ClientData clientData)))
+#endif /* #ifndef Tcl_CreateTimerHandler */
+
+#ifndef Tcl_DbCkalloc
+VFUNC(char *,Tcl_DbCkalloc,V_Tcl_DbCkalloc,_ANSI_ARGS_((unsigned int size,CONST char *file,int line)))
+#endif /* #ifndef Tcl_DbCkalloc */
+
+#ifndef Tcl_DbCkfree
+VFUNC(int,Tcl_DbCkfree,V_Tcl_DbCkfree,_ANSI_ARGS_((char * ptr, CONST char * file,
+ int line)))
+#endif /* #ifndef Tcl_DbCkfree */
+
+#ifndef Tcl_DbCkrealloc
+VFUNC(char *,Tcl_DbCkrealloc,V_Tcl_DbCkrealloc,_ANSI_ARGS_((char *ptr,
+ unsigned int size, CONST char *file,int line)))
+#endif /* #ifndef Tcl_DbCkrealloc */
+
+#ifndef Tcl_DeleteEventSource
+VFUNC(void,Tcl_DeleteEventSource,V_Tcl_DeleteEventSource,_ANSI_ARGS_((
+ Tcl_EventSetupProc *setupProc,
+ Tcl_EventCheckProc *checkProc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_DeleteEventSource */
+
+#ifndef Tcl_DeleteEvents
+VFUNC(void,Tcl_DeleteEvents,V_Tcl_DeleteEvents,_ANSI_ARGS_((
+ Tcl_EventDeleteProc * proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_DeleteEvents */
+
+#ifndef Tcl_DeleteExitHandler
+VFUNC(void,Tcl_DeleteExitHandler,V_Tcl_DeleteExitHandler,_ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData)))
+#endif /* #ifndef Tcl_DeleteExitHandler */
+
+#ifndef Tcl_DeleteFileHandler
+VFUNC(void,Tcl_DeleteFileHandler,V_Tcl_DeleteFileHandler,_ANSI_ARGS_((int fd)))
+#endif /* #ifndef Tcl_DeleteFileHandler */
+
+#ifndef Tcl_DeleteThreadExitHandler
+VFUNC(void,Tcl_DeleteThreadExitHandler,V_Tcl_DeleteThreadExitHandler,_ANSI_ARGS_((
+ Tcl_ExitProc * proc, ClientData clientData)))
+#endif /* #ifndef Tcl_DeleteThreadExitHandler */
+
+#ifndef Tcl_DeleteTimerHandler
+VFUNC(void,Tcl_DeleteTimerHandler,V_Tcl_DeleteTimerHandler,_ANSI_ARGS_((
+ Tcl_TimerToken token)))
+#endif /* #ifndef Tcl_DeleteTimerHandler */
+
+#ifndef Tcl_DoOneEvent
+VFUNC(int,Tcl_DoOneEvent,V_Tcl_DoOneEvent,_ANSI_ARGS_((int flags)))
+#endif /* #ifndef Tcl_DoOneEvent */
+
+#ifndef Tcl_DoWhenIdle
+VFUNC(void,Tcl_DoWhenIdle,V_Tcl_DoWhenIdle,_ANSI_ARGS_((Tcl_IdleProc *proc,
+ ClientData clientData)))
+#endif /* #ifndef Tcl_DoWhenIdle */
+
+#ifndef Tcl_DumpActiveMemory
+VFUNC(int,Tcl_DumpActiveMemory,V_Tcl_DumpActiveMemory,_ANSI_ARGS_((CONST char * fileName)))
+#endif /* #ifndef Tcl_DumpActiveMemory */
+
+#ifndef Tcl_Exit
+VFUNC(void,Tcl_Exit,V_Tcl_Exit,_ANSI_ARGS_((int status)))
+#endif /* #ifndef Tcl_Exit */
+
+#ifndef Tcl_Finalize
+VFUNC(void,Tcl_Finalize,V_Tcl_Finalize,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_Finalize */
+
+#ifndef Tcl_FinalizeNotifier
+VFUNC(void,Tcl_FinalizeNotifier,V_Tcl_FinalizeNotifier,_ANSI_ARGS_((
+ ClientData clientData)))
+#endif /* #ifndef Tcl_FinalizeNotifier */
+
+#ifndef Tcl_FinalizeThread
+VFUNC(void,Tcl_FinalizeThread,V_Tcl_FinalizeThread,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_FinalizeThread */
+
+#ifndef Tcl_Free
+VFUNC(void,Tcl_Free,V_Tcl_Free,_ANSI_ARGS_((char *ptr)))
+#endif /* #ifndef Tcl_Free */
+
+#ifndef Tcl_GetCurrentThread
+VFUNC(Tcl_ThreadId,Tcl_GetCurrentThread,V_Tcl_GetCurrentThread,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_GetCurrentThread */
+
+#ifndef Tcl_GetServiceMode
+VFUNC(int,Tcl_GetServiceMode,V_Tcl_GetServiceMode,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_GetServiceMode */
+
+#ifndef Tcl_GetThreadData
+VFUNC(VOID *,Tcl_GetThreadData,V_Tcl_GetThreadData,_ANSI_ARGS_((
+ Tcl_ThreadDataKey * keyPtr, int size)))
+#endif /* #ifndef Tcl_GetThreadData */
+
+#ifndef Tcl_GetTime
+VFUNC(void,Tcl_GetTime,V_Tcl_GetTime,_ANSI_ARGS_((Tcl_Time *time)))
+#endif /* #ifndef Tcl_GetTime */
+
+#ifndef Tcl_InitNotifier
+VFUNC(ClientData,Tcl_InitNotifier,V_Tcl_InitNotifier,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_InitNotifier */
+
+#ifndef Tcl_Panic
+VFUNC(void,Tcl_Panic,V_Tcl_Panic,_ANSI_ARGS_((CONST char *,...)))
+#endif /* #ifndef Tcl_Panic */
+
+#ifndef Tcl_QueueEvent
+VFUNC(void,Tcl_QueueEvent,V_Tcl_QueueEvent,_ANSI_ARGS_((Tcl_Event *evPtr,
+ Tcl_QueuePosition position)))
+#endif /* #ifndef Tcl_QueueEvent */
+
+#ifndef Tcl_QueueProcEvent
+VFUNC(void,Tcl_QueueProcEvent,V_Tcl_QueueProcEvent,_ANSI_ARGS_((Tcl_EventProc *proc,
+ Tcl_Event *evPtr,
+ Tcl_QueuePosition position)))
+#endif /* #ifndef Tcl_QueueProcEvent */
+
+#ifndef Tcl_Realloc
+VFUNC(char *,Tcl_Realloc,V_Tcl_Realloc,_ANSI_ARGS_((char *ptr,
+ unsigned int size)))
+#endif /* #ifndef Tcl_Realloc */
+
+#ifndef Tcl_ServiceAll
+VFUNC(int,Tcl_ServiceAll,V_Tcl_ServiceAll,_ANSI_ARGS_((void)))
+#endif /* #ifndef Tcl_ServiceAll */
+
+#ifndef Tcl_ServiceEvent
+VFUNC(int,Tcl_ServiceEvent,V_Tcl_ServiceEvent,_ANSI_ARGS_((int flags)))
+#endif /* #ifndef Tcl_ServiceEvent */
+
+#ifndef Tcl_ServiceModeHook
+VFUNC(void,Tcl_ServiceModeHook,V_Tcl_ServiceModeHook,_ANSI_ARGS_((int mode)))
+#endif /* #ifndef Tcl_ServiceModeHook */
+
+#ifndef Tcl_SetMaxBlockTime
+VFUNC(void,Tcl_SetMaxBlockTime,V_Tcl_SetMaxBlockTime,_ANSI_ARGS_((Tcl_Time *timePtr)))
+#endif /* #ifndef Tcl_SetMaxBlockTime */
+
+#ifndef Tcl_SetNotifier
+VFUNC(void,Tcl_SetNotifier,V_Tcl_SetNotifier,_ANSI_ARGS_((
+ Tcl_NotifierProcs * notifierProcPtr)))
+#endif /* #ifndef Tcl_SetNotifier */
+
+#ifndef Tcl_SetServiceMode
+VFUNC(int,Tcl_SetServiceMode,V_Tcl_SetServiceMode,_ANSI_ARGS_((int mode)))
+#endif /* #ifndef Tcl_SetServiceMode */
+
+#ifndef Tcl_SetTimer
+VFUNC(void,Tcl_SetTimer,V_Tcl_SetTimer,_ANSI_ARGS_((Tcl_Time * timePtr)))
+#endif /* #ifndef Tcl_SetTimer */
+
+#ifndef Tcl_Sleep
+VFUNC(void,Tcl_Sleep,V_Tcl_Sleep,_ANSI_ARGS_((int ms)))
+#endif /* #ifndef Tcl_Sleep */
+
+#ifndef Tcl_ThreadAlert
+VFUNC(void,Tcl_ThreadAlert,V_Tcl_ThreadAlert,_ANSI_ARGS_((Tcl_ThreadId threadId)))
+#endif /* #ifndef Tcl_ThreadAlert */
+
+#ifndef Tcl_ThreadQueueEvent
+VFUNC(void,Tcl_ThreadQueueEvent,V_Tcl_ThreadQueueEvent,_ANSI_ARGS_((
+ Tcl_ThreadId threadId, Tcl_Event* evPtr,
+ Tcl_QueuePosition position)))
+#endif /* #ifndef Tcl_ThreadQueueEvent */
+
+#ifndef Tcl_ValidateAllMemory
+VFUNC(void,Tcl_ValidateAllMemory,V_Tcl_ValidateAllMemory,_ANSI_ARGS_((CONST char * file,
+ int line)))
+#endif /* #ifndef Tcl_ValidateAllMemory */
+
+#ifndef Tcl_WaitForEvent
+VFUNC(int,Tcl_WaitForEvent,V_Tcl_WaitForEvent,_ANSI_ARGS_((Tcl_Time * timePtr)))
+#endif /* #ifndef Tcl_WaitForEvent */
+
+#ifndef TclpAsyncMark
+VFUNC(void,TclpAsyncMark,V_TclpAsyncMark,_ANSI_ARGS_((Tcl_AsyncHandler async)))
+#endif /* #ifndef TclpAsyncMark */
+
+#ifndef TclpExit
+VFUNC(void,TclpExit,V_TclpExit,_ANSI_ARGS_((int status)))
+#endif /* #ifndef TclpExit */
+
+#ifndef TkInitTimer
+VFUNC(void *,TkInitTimer,V_TkInitTimer,_ANSI_ARGS_((void)))
+#endif /* #ifndef TkInitTimer */
+
+#endif /* _TKEVENT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent_f.h
new file mode 100644
index 00000000000..f00d4002b13
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkEvent_f.h
@@ -0,0 +1,14 @@
+#ifndef TKEVENT_VT
+#define TKEVENT_VT
+typedef struct TkeventVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkEvent.t"
+#undef VFUNC
+#undef VVAR
+} TkeventVtab;
+extern TkeventVtab *TkeventVptr;
+extern TkeventVtab *TkeventVGet(void);
+#endif /* TKEVENT_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkFileFilter.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkFileFilter.h
new file mode 100644
index 00000000000..886f1426cf3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkFileFilter.h
@@ -0,0 +1,92 @@
+/*
+ * tkFileFilter.h --
+ *
+ * Declarations for the file filter processing routines needed by
+ * the file selection dialogs.
+ *
+ * Copyright (c) 1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkFileFilter.h,v 1.4 1998/09/14 18:23:10 stanton Exp $
+ *
+ */
+
+#ifndef _TK_FILE_FILTER
+#define _TK_FILE_FILTER
+
+#ifdef MAC_TCL
+#include <StandardFile.h>
+#else
+#define OSType long
+#endif
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+typedef struct GlobPattern {
+ struct GlobPattern * next; /* Chains to the next glob pattern
+ * in a glob pattern list */
+ char * pattern; /* String value of the pattern, such
+ * as "*.txt" or "*.*"
+ */
+} GlobPattern;
+
+typedef struct MacFileType {
+ struct MacFileType * next; /* Chains to the next mac file type
+ * in a mac file type list */
+ OSType type; /* Mac file type, such as 'TEXT' or
+ * 'GIFF' */
+} MacFileType;
+
+typedef struct FileFilterClause {
+ struct FileFilterClause * next; /* Chains to the next clause in
+ * a clause list */
+ GlobPattern * patterns; /* Head of glob pattern type list */
+ GlobPattern * patternsTail; /* Tail of glob pattern type list */
+ MacFileType * macTypes; /* Head of mac file type list */
+ MacFileType * macTypesTail; /* Tail of mac file type list */
+} FileFilterClause;
+
+typedef struct FileFilter {
+ struct FileFilter * next; /* Chains to the next filter
+ * in a filter list */
+ char * name; /* Name of the file filter,
+ * such as "Text Documents" */
+ FileFilterClause * clauses; /* Head of the clauses list */
+ FileFilterClause * clausesTail; /* Tail of the clauses list */
+} FileFilter;
+
+/*----------------------------------------------------------------------
+ * FileFilterList --
+ *
+ * The routine TkGetFileFilters() translates the string value of the
+ * -filefilters option into a FileFilterList structure, which consists
+ * of a list of file filters.
+ *
+ * Each file filter consists of one or more clauses. Each clause has
+ * one or more glob patterns and/or one or more Mac file types
+ *----------------------------------------------------------------------
+ */
+
+typedef struct FileFilterList {
+ FileFilter * filters; /* Head of the filter list */
+ FileFilter * filtersTail; /* Tail of the filter list */
+ int numFilters; /* number of filters in the list */
+} FileFilterList;
+
+EXTERN void TkFreeFileFilters _ANSI_ARGS_((
+ FileFilterList * flistPtr));
+EXTERN void TkInitFileFilters _ANSI_ARGS_((
+ FileFilterList * flistPtr));
+EXTERN int TkGetFileFilters _ANSI_ARGS_ ((Tcl_Interp *interp,
+ FileFilterList * flistPtr, Tcl_Obj * arg,
+ int isWindows));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkFont.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkFont.h
new file mode 100644
index 00000000000..fe633a1d87a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkFont.h
@@ -0,0 +1,226 @@
+/*
+ * tkFont.h --
+ *
+ * Declarations for interfaces between the generic and platform-
+ * specific parts of the font package. This information is not
+ * visible outside of the font package.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkFont.h,v 1.5 1999/04/16 01:51:14 stanton Exp $
+ */
+
+#ifndef _TKFONT
+#define _TKFONT
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * The following structure keeps track of the attributes of a font. It can
+ * be used to keep track of either the desired attributes or the actual
+ * attributes gotten when the font was instantiated.
+ */
+
+typedef struct TkFontAttributes {
+ Tk_Uid family; /* Font family, or NULL to represent
+ * plaform-specific default system font. */
+ int size; /* Pointsize of font, 0 for default size, or
+ * negative number meaning pixel size. */
+ int weight; /* Weight flag; see below for def'n. */
+ int slant; /* Slant flag; see below for def'n. */
+ int underline; /* Non-zero for underline font. */
+ int overstrike; /* Non-zero for overstrike font. */
+} TkFontAttributes;
+
+/*
+ * Possible values for the "weight" field in a TkFontAttributes structure.
+ * Weight is a subjective term and depends on what the company that created
+ * the font considers bold.
+ */
+
+#define TK_FW_NORMAL 0
+#define TK_FW_BOLD 1
+
+#define TK_FW_UNKNOWN -1 /* Unknown weight. This value is used for
+ * error checking and is never actually stored
+ * in the weight field. */
+
+/*
+ * Possible values for the "slant" field in a TkFontAttributes structure.
+ */
+
+#define TK_FS_ROMAN 0
+#define TK_FS_ITALIC 1
+#define TK_FS_OBLIQUE 2 /* This value is only used when parsing X
+ * font names to determine the closest
+ * match. It is only stored in the
+ * XLFDAttributes structure, never in the
+ * slant field of the TkFontAttributes. */
+
+#define TK_FS_UNKNOWN -1 /* Unknown slant. This value is used for
+ * error checking and is never actually stored
+ * in the slant field. */
+
+/*
+ * The following structure keeps track of the metrics for an instantiated
+ * font. The metrics are the physical properties of the font itself.
+ */
+
+typedef struct TkFontMetrics {
+ int ascent; /* From baseline to top of font. */
+ int descent; /* From baseline to bottom of font. */
+ int maxWidth; /* Width of widest character in font. */
+ int fixed; /* Non-zero if this is a fixed-width font,
+ * 0 otherwise. */
+} TkFontMetrics;
+
+/*
+ * The following structure is used to keep track of the generic information
+ * about a font. Each platform-specific font is represented by a structure
+ * with the following structure at its beginning, plus any platform-
+ * specific stuff after that.
+ */
+
+typedef struct TkFont {
+ /*
+ * Fields used and maintained exclusively by generic code.
+ */
+
+ int resourceRefCount; /* Number of active uses of this font (each
+ * active use corresponds to a call to
+ * Tk_AllocFontFromTable or Tk_GetFont).
+ * If this count is 0, then this TkFont
+ * structure is no longer valid and it isn't
+ * present in a hash table: it is being
+ * kept around only because there are objects
+ * referring to it. The structure is freed
+ * when resourceRefCount and objRefCount
+ * are both 0. */
+ int objRefCount; /* The number of Tcl objects that reference
+ * this structure. */
+ Tcl_HashEntry *cacheHashPtr;/* Entry in font cache for this structure,
+ * used when deleting it. */
+ Tcl_HashEntry *namedHashPtr;/* Pointer to hash table entry that
+ * corresponds to the named font that the
+ * tkfont was based on, or NULL if the tkfont
+ * was not based on a named font. */
+ Screen *screen; /* The screen where this font is valid. */
+ int tabWidth; /* Width of tabs in this font (pixels). */
+ int underlinePos; /* Offset from baseline to origin of
+ * underline bar (used for drawing underlines
+ * on a non-underlined font). */
+ int underlineHeight; /* Height of underline bar (used for drawing
+ * underlines on a non-underlined font). */
+
+ /*
+ * Fields used in the generic code that are filled in by
+ * platform-specific code.
+ */
+
+ Font fid; /* For backwards compatibility with XGCValues
+ * structures. Remove when TkGCValues is
+ * implemented. */
+ TkFontAttributes fa; /* Actual font attributes obtained when the
+ * the font was created, as opposed to the
+ * desired attributes passed in to
+ * TkpGetFontFromAttributes(). The desired
+ * metrics can be determined from the string
+ * that was used to create this font. */
+ TkFontMetrics fm; /* Font metrics determined when font was
+ * created. */
+ struct TkFont *nextPtr; /* Points to the next TkFont structure with
+ * the same name. All fonts with the
+ * same name (but different displays) are
+ * chained together off a single entry in
+ * a hash table. */
+} TkFont;
+
+/*
+ * The following structure is used to return attributes when parsing an
+ * XLFD. The extra information is of interest to the Unix-specific code
+ * when attempting to find the closest matching font.
+ */
+
+typedef struct TkXLFDAttributes {
+ Tk_Uid foundry; /* The foundry of the font. */
+ int slant; /* The tristate value for the slant, which
+ * is significant under X. */
+ int setwidth; /* The proportionate width, see below for
+ * definition. */
+ Tk_Uid charset; /* The actual charset string. */
+} TkXLFDAttributes;
+
+/*
+ * Possible values for the "setwidth" field in a TkXLFDAttributes structure.
+ * The setwidth is whether characters are considered wider or narrower than
+ * normal.
+ */
+
+#define TK_SW_NORMAL 0
+#define TK_SW_CONDENSE 1
+#define TK_SW_EXPAND 2
+#define TK_SW_UNKNOWN 3 /* Unknown setwidth. This value may be
+ * stored in the setwidth field. */
+
+/*
+ * The following defines specify the meaning of the fields in a fully
+ * qualified XLFD.
+ */
+
+#define XLFD_FOUNDRY 0
+#define XLFD_FAMILY 1
+#define XLFD_WEIGHT 2
+#define XLFD_SLANT 3
+#define XLFD_SETWIDTH 4
+#define XLFD_ADD_STYLE 5
+#define XLFD_PIXEL_SIZE 6
+#define XLFD_POINT_SIZE 7
+#define XLFD_RESOLUTION_X 8
+#define XLFD_RESOLUTION_Y 9
+#define XLFD_SPACING 10
+#define XLFD_AVERAGE_WIDTH 11
+#define XLFD_CHARSET 12
+#define XLFD_NUMFIELDS 13 /* Number of fields in XLFD. */
+
+/*
+ * Low-level API exported by generic code to platform-specific code.
+ */
+
+#define TkInitFontAttributes(fa) memset((fa), 0, sizeof(TkFontAttributes));
+#define TkInitXLFDAttributes(xa) memset((xa), 0, sizeof(TkXLFDAttributes));
+
+EXTERN int TkFontParseXLFD _ANSI_ARGS_((CONST char *string,
+ TkFontAttributes *faPtr, TkXLFDAttributes *xaPtr));
+EXTERN char ** TkFontGetAliasList _ANSI_ARGS_((CONST char *faceName));
+EXTERN char *** TkFontGetFallbacks _ANSI_ARGS_((void));
+EXTERN int TkFontGetPixels _ANSI_ARGS_((Screen *screen,
+ int size));
+EXTERN int TkFontGetPoints _ANSI_ARGS_((Screen *screen,
+ int size));
+EXTERN char ** TkFontGetGlobalClass _ANSI_ARGS_((void));
+EXTERN char ** TkFontGetSymbolClass _ANSI_ARGS_((void));
+
+/*
+ * Low-level API exported by platform-specific code to generic code.
+ */
+
+EXTERN void TkpDeleteFont _ANSI_ARGS_((TkFont *tkFontPtr));
+EXTERN void TkpFontPkgInit _ANSI_ARGS_((TkMainInfo *mainPtr));
+EXTERN TkFont * TkpGetFontFromAttributes _ANSI_ARGS_((
+ TkFont *tkFontPtr, Tk_Window tkwin,
+ CONST TkFontAttributes *faPtr));
+EXTERN void TkpGetFontFamilies _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin));
+EXTERN TkFont * TkpGetNativeFont _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char *name));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKFONT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.h
new file mode 100644
index 00000000000..bb744a46421
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.h
@@ -0,0 +1,36 @@
+#ifndef _TKIMGPHOTO
+#define _TKIMGPHOTO
+
+
+EXTERN void Tk_CreateOldPhotoImageFormat _ANSI_ARGS_((
+ Tk_PhotoImageFormat *formatPtr));
+EXTERN void Tk_CreatePhotoImageFormat _ANSI_ARGS_((
+ Tk_PhotoImageFormat *formatPtr));
+EXTERN void Tk_DitherPhoto _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int x, int y, int width, int height));
+EXTERN Tk_PhotoHandle Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *imageName));
+EXTERN void Tk_PhotoBlank _ANSI_ARGS_((Tk_PhotoHandle handle));
+EXTERN void Tk_PhotoExpand _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int width, int height ));
+EXTERN char * Tk_PhotoFormatName _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *formatString));
+EXTERN int Tk_PhotoGetImage _ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr));
+EXTERN void Tk_PhotoGetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int *widthPtr, int *heightPtr));
+EXTERN void Tk_PhotoPutBlock _ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr, int x, int y,
+ int width, int height, int compRule));
+EXTERN void Tk_PhotoPutZoomedBlock _ANSI_ARGS_((
+ Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr, int x, int y,
+ int width, int height, int zoomX, int zoomY,
+ int subsampleX, int subsampleY, int compRule));
+EXTERN void Tk_PhotoSetSize _ANSI_ARGS_((Tk_PhotoHandle handle,
+ int width, int height));
+extern Tk_PhotoImageFormat tkImgFmtGIF;
+extern Tk_PhotoImageFormat tkImgFmtPPM;
+#endif /* _TKIMGPHOTO */
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.m
new file mode 100644
index 00000000000..1e1e302a6c6
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.m
@@ -0,0 +1,55 @@
+#ifndef _TKIMGPHOTO_VM
+#define _TKIMGPHOTO_VM
+#include "tkImgPhoto_f.h"
+#ifndef NO_VTABLES
+#define tkImgFmtPPM (*TkimgphotoVptr->V_tkImgFmtPPM)
+#ifndef Tk_CreateOldPhotoImageFormat
+# define Tk_CreateOldPhotoImageFormat (*TkimgphotoVptr->V_Tk_CreateOldPhotoImageFormat)
+#endif
+
+#ifndef Tk_CreatePhotoImageFormat
+# define Tk_CreatePhotoImageFormat (*TkimgphotoVptr->V_Tk_CreatePhotoImageFormat)
+#endif
+
+#ifndef Tk_DitherPhoto
+# define Tk_DitherPhoto (*TkimgphotoVptr->V_Tk_DitherPhoto)
+#endif
+
+#ifndef Tk_FindPhoto
+# define Tk_FindPhoto (*TkimgphotoVptr->V_Tk_FindPhoto)
+#endif
+
+#ifndef Tk_PhotoBlank
+# define Tk_PhotoBlank (*TkimgphotoVptr->V_Tk_PhotoBlank)
+#endif
+
+#ifndef Tk_PhotoExpand
+# define Tk_PhotoExpand (*TkimgphotoVptr->V_Tk_PhotoExpand)
+#endif
+
+#ifndef Tk_PhotoFormatName
+# define Tk_PhotoFormatName (*TkimgphotoVptr->V_Tk_PhotoFormatName)
+#endif
+
+#ifndef Tk_PhotoGetImage
+# define Tk_PhotoGetImage (*TkimgphotoVptr->V_Tk_PhotoGetImage)
+#endif
+
+#ifndef Tk_PhotoGetSize
+# define Tk_PhotoGetSize (*TkimgphotoVptr->V_Tk_PhotoGetSize)
+#endif
+
+#ifndef Tk_PhotoPutBlock
+# define Tk_PhotoPutBlock (*TkimgphotoVptr->V_Tk_PhotoPutBlock)
+#endif
+
+#ifndef Tk_PhotoPutZoomedBlock
+# define Tk_PhotoPutZoomedBlock (*TkimgphotoVptr->V_Tk_PhotoPutZoomedBlock)
+#endif
+
+#ifndef Tk_PhotoSetSize
+# define Tk_PhotoSetSize (*TkimgphotoVptr->V_Tk_PhotoSetSize)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKIMGPHOTO_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.t
new file mode 100644
index 00000000000..9e3d2175db0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto.t
@@ -0,0 +1,66 @@
+#ifdef _TKIMGPHOTO
+VVAR(Tk_PhotoImageFormat,tkImgFmtPPM,V_tkImgFmtPPM)
+#ifndef Tk_CreateOldPhotoImageFormat
+VFUNC(void,Tk_CreateOldPhotoImageFormat,V_Tk_CreateOldPhotoImageFormat,_ANSI_ARGS_((
+ Tk_PhotoImageFormat *formatPtr)))
+#endif /* #ifndef Tk_CreateOldPhotoImageFormat */
+
+#ifndef Tk_CreatePhotoImageFormat
+VFUNC(void,Tk_CreatePhotoImageFormat,V_Tk_CreatePhotoImageFormat,_ANSI_ARGS_((
+ Tk_PhotoImageFormat *formatPtr)))
+#endif /* #ifndef Tk_CreatePhotoImageFormat */
+
+#ifndef Tk_DitherPhoto
+VFUNC(void,Tk_DitherPhoto,V_Tk_DitherPhoto,_ANSI_ARGS_((Tk_PhotoHandle handle,
+ int x, int y, int width, int height)))
+#endif /* #ifndef Tk_DitherPhoto */
+
+#ifndef Tk_FindPhoto
+VFUNC(Tk_PhotoHandle,Tk_FindPhoto,V_Tk_FindPhoto,_ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *imageName)))
+#endif /* #ifndef Tk_FindPhoto */
+
+#ifndef Tk_PhotoBlank
+VFUNC(void,Tk_PhotoBlank,V_Tk_PhotoBlank,_ANSI_ARGS_((Tk_PhotoHandle handle)))
+#endif /* #ifndef Tk_PhotoBlank */
+
+#ifndef Tk_PhotoExpand
+VFUNC(void,Tk_PhotoExpand,V_Tk_PhotoExpand,_ANSI_ARGS_((Tk_PhotoHandle handle,
+ int width, int height )))
+#endif /* #ifndef Tk_PhotoExpand */
+
+#ifndef Tk_PhotoFormatName
+VFUNC(char *,Tk_PhotoFormatName,V_Tk_PhotoFormatName,_ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *formatString)))
+#endif /* #ifndef Tk_PhotoFormatName */
+
+#ifndef Tk_PhotoGetImage
+VFUNC(int,Tk_PhotoGetImage,V_Tk_PhotoGetImage,_ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr)))
+#endif /* #ifndef Tk_PhotoGetImage */
+
+#ifndef Tk_PhotoGetSize
+VFUNC(void,Tk_PhotoGetSize,V_Tk_PhotoGetSize,_ANSI_ARGS_((Tk_PhotoHandle handle,
+ int *widthPtr, int *heightPtr)))
+#endif /* #ifndef Tk_PhotoGetSize */
+
+#ifndef Tk_PhotoPutBlock
+VFUNC(void,Tk_PhotoPutBlock,V_Tk_PhotoPutBlock,_ANSI_ARGS_((Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr, int x, int y,
+ int width, int height, int compRule)))
+#endif /* #ifndef Tk_PhotoPutBlock */
+
+#ifndef Tk_PhotoPutZoomedBlock
+VFUNC(void,Tk_PhotoPutZoomedBlock,V_Tk_PhotoPutZoomedBlock,_ANSI_ARGS_((
+ Tk_PhotoHandle handle,
+ Tk_PhotoImageBlock *blockPtr, int x, int y,
+ int width, int height, int zoomX, int zoomY,
+ int subsampleX, int subsampleY, int compRule)))
+#endif /* #ifndef Tk_PhotoPutZoomedBlock */
+
+#ifndef Tk_PhotoSetSize
+VFUNC(void,Tk_PhotoSetSize,V_Tk_PhotoSetSize,_ANSI_ARGS_((Tk_PhotoHandle handle,
+ int width, int height)))
+#endif /* #ifndef Tk_PhotoSetSize */
+
+#endif /* _TKIMGPHOTO */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto_f.h
new file mode 100644
index 00000000000..594cebf81b6
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkImgPhoto_f.h
@@ -0,0 +1,14 @@
+#ifndef TKIMGPHOTO_VT
+#define TKIMGPHOTO_VT
+typedef struct TkimgphotoVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkImgPhoto.t"
+#undef VFUNC
+#undef VVAR
+} TkimgphotoVtab;
+extern TkimgphotoVtab *TkimgphotoVptr;
+extern TkimgphotoVtab *TkimgphotoVGet(void);
+#endif /* TKIMGPHOTO_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkInitScript.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInitScript.h
new file mode 100644
index 00000000000..2e2b2343c32
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInitScript.h
@@ -0,0 +1,58 @@
+/*
+ * tkInitScript.h --
+ *
+ * This file contains Unix & Windows common init script
+ * It is not used on the Mac. (the mac init script is in tkMacInit.c)
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkInitScript.h,v 1.8 1999/04/16 01:51:15 stanton Exp $
+ */
+
+
+
+/*
+ * In order to find tk.tcl during initialization, the following script
+ * is invoked by Tk_Init(). It looks in several different directories:
+ *
+ * $tk_library - can specify a primary location, if set
+ * no other locations will be checked
+ *
+ * $env(TK_LIBRARY) - highest priority so user can always override
+ * the search path unless the application has
+ * specified an exact directory above
+ *
+ * $tcl_library/../tk$tk_version
+ * - look relative to init.tcl in an installed
+ * lib directory (e.g. /usr/local)
+ *
+ * <executable directory>/../lib/tk$tk_version
+ * - look for a lib/tk<ver> in a sibling of
+ * the bin directory (e.g. /usr/local)
+ *
+ * <executable directory>/../library
+ * - look in Tk build directory
+ *
+ * <executable directory>/../../tk$tk_patchLevel/library
+ * - look for Tk build directory relative
+ * to a parallel build directory
+ *
+ * The first directory on this path that contains a valid tk.tcl script
+ * will be set ast the value of tk_library.
+ *
+ * Note that this entire search mechanism can be bypassed by defining an
+ * alternate tkInit procedure before calling Tk_Init().
+ */
+
+static char initScript[] = "if {[info proc tkInit]==\"\"} {\n\
+ proc tkInit {} {\n\
+ global tk_library tk_version tk_patchLevel\n\
+ rename tkInit {}\n\
+ tcl_findLibrary tk $tk_version $tk_patchLevel tk.tcl TK_LIBRARY tk_library\n\
+ }\n\
+}\n\
+tkInit";
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.h
new file mode 100644
index 00000000000..a1925bdda5d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.h
@@ -0,0 +1,1200 @@
+/*
+ * tkInt.h --
+ *
+ * Declarations for things used internally by the Tk
+ * procedures but not exported outside the module.
+ *
+ * Copyright (c) 1990-1994 The Regents of the University of California.
+ * Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ * Copyright (c) 1998 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: $Id: tkInt.h,v 1.56.2.1 2003/10/13 03:30:05 hobbs Exp $
+ */
+
+#ifndef _TKINT
+#define _TKINT
+
+#ifndef _TK
+#include "tk.h"
+#endif
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Opaque type declarations:
+ */
+
+typedef struct TkColormap TkColormap;
+typedef struct TkGrabEvent TkGrabEvent;
+typedef struct TkpCursor_ *TkpCursor;
+typedef struct TkRegion_ *TkRegion;
+typedef struct TkStressedCmap TkStressedCmap;
+typedef struct TkBindInfo_ *TkBindInfo;
+
+/*
+ * Procedure types.
+ */
+
+typedef int (TkBindEvalProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, XEvent *eventPtr, Tk_Window tkwin,
+ KeySym keySym));
+typedef void (TkBindFreeProc) _ANSI_ARGS_((ClientData clientData));
+
+/*
+ * One of the following structures is maintained for each cursor in
+ * use in the system. This structure is used by tkCursor.c and the
+ * various system specific cursor files.
+ */
+
+typedef struct TkCursor {
+ Tk_Cursor cursor; /* System specific identifier for cursor. */
+ Display *display; /* Display containing cursor. Needed for
+ * disposal and retrieval of cursors. */
+ int resourceRefCount; /* Number of active uses of this cursor (each
+ * active use corresponds to a call to
+ * Tk_AllocPreserveFromObj or Tk_Preserve).
+ * If this count is 0, then this structure
+ * is no longer valid and it isn't present
+ * in a hash table: it is being kept around
+ * only because there are objects referring
+ * to it. The structure is freed when
+ * resourceRefCount and objRefCount are
+ * both 0. */
+ int objRefCount; /* Number of Tcl objects that reference
+ * this structure.. */
+ Tcl_HashTable *otherTable; /* Second table (other than idTable) used
+ * to index this entry. */
+ Tcl_HashEntry *hashPtr; /* Entry in otherTable for this structure
+ * (needed when deleting). */
+ Tcl_HashEntry *idHashPtr; /* Entry in idTable for this structure
+ * (needed when deleting). */
+ struct TkCursor *nextPtr; /* Points to the next TkCursor structure with
+ * the same name. Cursors with the same
+ * name but different displays are chained
+ * together off a single hash table entry. */
+} TkCursor;
+
+/*
+ * This defines whether we should try to use XIM over-the-spot style
+ * input. Allow users to override it. It is a much more elegant use
+ * of XIM, but uses a bit more memory.
+ */
+
+#ifndef TK_XIM_SPOT
+# define TK_XIM_SPOT 1
+#endif
+
+/*
+ * The following structure is kept one-per-TkDisplay to maintain information
+ * about the caret (cursor location) on this display. This is used to
+ * dictate global focus location (Windows Accessibility guidelines) and to
+ * position the IME or XIM over-the-spot window.
+ */
+
+typedef struct TkCaret {
+ struct TkWindow *winPtr; /* the window on which we requested caret
+ * placement */
+ int x; /* relative x coord of the caret */
+ int y; /* relative y coord of the caret */
+ int height; /* specified height of the window */
+} TkCaret;
+
+/*
+ * One of the following structures is maintained for each display
+ * containing a window managed by Tk. In part, the structure is
+ * used to store thread-specific data, since each thread will have
+ * its own TkDisplay structure.
+ */
+
+typedef struct TkDisplay {
+ Display *display; /* Xlib's info about display. */
+ struct TkDisplay *nextPtr; /* Next in list of all displays. */
+ char *name; /* Name of display (with any screen
+ * identifier removed). Malloc-ed. */
+ Time lastEventTime; /* Time of last event received for this
+ * display. */
+
+ /*
+ * Information used primarily by tk3d.c:
+ */
+
+ int borderInit; /* 0 means borderTable needs initializing. */
+ Tcl_HashTable borderTable; /* Maps from color name to TkBorder
+ * structure. */
+
+ /*
+ * Information used by tkAtom.c only:
+ */
+
+ int atomInit; /* 0 means stuff below hasn't been
+ * initialized yet. */
+ Tcl_HashTable nameTable; /* Maps from names to Atom's. */
+ Tcl_HashTable atomTable; /* Maps from Atom's back to names. */
+
+ /*
+ * Information used primarily by tkBind.c:
+ */
+
+ int bindInfoStale; /* Non-zero means the variables in this
+ * part of the structure are potentially
+ * incorrect and should be recomputed. */
+ unsigned int modeModMask; /* Has one bit set to indicate the modifier
+ * corresponding to "mode shift". If no
+ * such modifier, than this is zero. */
+ unsigned int metaModMask; /* Has one bit set to indicate the modifier
+ * corresponding to the "Meta" key. If no
+ * such modifier, then this is zero. */
+ unsigned int altModMask; /* Has one bit set to indicate the modifier
+ * corresponding to the "Meta" key. If no
+ * such modifier, then this is zero. */
+ enum {LU_IGNORE, LU_CAPS, LU_SHIFT} lockUsage;
+ /* Indicates how to interpret lock modifier. */
+ int numModKeyCodes; /* Number of entries in modKeyCodes array
+ * below. */
+ KeyCode *modKeyCodes; /* Pointer to an array giving keycodes for
+ * all of the keys that have modifiers
+ * associated with them. Malloc'ed, but
+ * may be NULL. */
+
+ /*
+ * Information used by tkBitmap.c only:
+ */
+
+ int bitmapInit; /* 0 means tables above need initializing. */
+ int bitmapAutoNumber; /* Used to number bitmaps. */
+ Tcl_HashTable bitmapNameTable;
+ /* Maps from name of bitmap to the first
+ * TkBitmap record for that name. */
+ Tcl_HashTable bitmapIdTable;/* Maps from bitmap id to the TkBitmap
+ * structure for the bitmap. */
+ Tcl_HashTable bitmapDataTable;
+ /* Used by Tk_GetBitmapFromData to map from
+ * a collection of in-core data about a
+ * bitmap to a reference giving an auto-
+ * matically-generated name for the bitmap. */
+
+ /*
+ * Information used by tkCanvas.c only:
+ */
+
+ int numIdSearches;
+ int numSlowSearches;
+
+ /*
+ * Used by tkColor.c only:
+ */
+
+ int colorInit; /* 0 means color module needs initializing. */
+ TkStressedCmap *stressPtr; /* First in list of colormaps that have
+ * filled up, so we have to pick an
+ * approximate color. */
+ Tcl_HashTable colorNameTable;
+ /* Maps from color name to TkColor structure
+ * for that color. */
+ Tcl_HashTable colorValueTable;
+ /* Maps from integer RGB values to TkColor
+ * structures. */
+
+ /*
+ * Used by tkCursor.c only:
+ */
+
+ int cursorInit; /* 0 means cursor module need initializing. */
+ Tcl_HashTable cursorNameTable;
+ /* Maps from a string name to a cursor to the
+ * TkCursor record for the cursor. */
+ Tcl_HashTable cursorDataTable;
+ /* Maps from a collection of in-core data
+ * about a cursor to a TkCursor structure. */
+ Tcl_HashTable cursorIdTable;
+ /* Maps from a cursor id to the TkCursor
+ * structure for the cursor. */
+ char cursorString[20]; /* Used to store a cursor id string. */
+ Font cursorFont; /* Font to use for standard cursors.
+ * None means font not loaded yet. */
+
+ /*
+ * Information used by tkError.c only:
+ */
+
+ struct TkErrorHandler *errorPtr;
+ /* First in list of error handlers
+ * for this display. NULL means
+ * no handlers exist at present. */
+ int deleteCount; /* Counts # of handlers deleted since
+ * last time inactive handlers were
+ * garbage-collected. When this number
+ * gets big, handlers get cleaned up. */
+
+ /*
+ * Used by tkEvent.c only:
+ */
+
+ struct TkWindowEvent *delayedMotionPtr;
+ /* Points to a malloc-ed motion event
+ * whose processing has been delayed in
+ * the hopes that another motion event
+ * will come along right away and we can
+ * merge the two of them together. NULL
+ * means that there is no delayed motion
+ * event. */
+
+ /*
+ * Information used by tkFocus.c only:
+ */
+
+ int focusDebug; /* 1 means collect focus debugging
+ * statistics. */
+ struct TkWindow *implicitWinPtr;
+ /* If the focus arrived at a toplevel window
+ * implicitly via an Enter event (rather
+ * than via a FocusIn event), this points
+ * to the toplevel window. Otherwise it is
+ * NULL. */
+ struct TkWindow *focusPtr; /* Points to the window on this display that
+ * should be receiving keyboard events. When
+ * multiple applications on the display have
+ * the focus, this will refer to the
+ * innermost window in the innermost
+ * application. This information isn't used
+ * under Unix or Windows, but it's needed on
+ * the Macintosh. */
+
+ /*
+ * Information used by tkGC.c only:
+ */
+
+ Tcl_HashTable gcValueTable; /* Maps from a GC's values to a TkGC structure
+ * describing a GC with those values. */
+ Tcl_HashTable gcIdTable; /* Maps from a GC to a TkGC. */
+ int gcInit; /* 0 means the tables below need
+ * initializing. */
+
+ /*
+ * Information used by tkGeometry.c only:
+ */
+
+ Tcl_HashTable maintainHashTable;
+ /* Hash table that maps from a master's
+ * Tk_Window token to a list of slaves
+ * managed by that master. */
+ int geomInit;
+
+ /*
+ * Information used by tkGet.c only:
+ */
+
+ Tcl_HashTable uidTable; /* Stores all Tk_Uid used in a thread. */
+ int uidInit; /* 0 means uidTable needs initializing. */
+
+ /*
+ * Information used by tkGrab.c only:
+ */
+
+ struct TkWindow *grabWinPtr;
+ /* Window in which the pointer is currently
+ * grabbed, or NULL if none. */
+ struct TkWindow *eventualGrabWinPtr;
+ /* Value that grabWinPtr will have once the
+ * grab event queue (below) has been
+ * completely emptied. */
+ struct TkWindow *buttonWinPtr;
+ /* Window in which first mouse button was
+ * pressed while grab was in effect, or NULL
+ * if no such press in effect. */
+ struct TkWindow *serverWinPtr;
+ /* If no application contains the pointer then
+ * this is NULL. Otherwise it contains the
+ * last window for which we've gotten an
+ * Enter or Leave event from the server (i.e.
+ * the last window known to have contained
+ * the pointer). Doesn't reflect events
+ * that were synthesized in tkGrab.c. */
+ TkGrabEvent *firstGrabEventPtr;
+ /* First in list of enter/leave events
+ * synthesized by grab code. These events
+ * must be processed in order before any other
+ * events are processed. NULL means no such
+ * events. */
+ TkGrabEvent *lastGrabEventPtr;
+ /* Last in list of synthesized events, or NULL
+ * if list is empty. */
+ int grabFlags; /* Miscellaneous flag values. See definitions
+ * in tkGrab.c. */
+
+ /*
+ * Information used by tkGrid.c only:
+ */
+
+ int gridInit; /* 0 means table below needs initializing. */
+ Tcl_HashTable gridHashTable;/* Maps from Tk_Window tokens to
+ * corresponding Grid structures. */
+
+ /*
+ * Information used by tkImage.c only:
+ */
+
+ int imageId; /* Value used to number image ids. */
+
+ /*
+ * Information used by tkMacWinMenu.c only:
+ */
+
+ int postCommandGeneration;
+
+ /*
+ * Information used by tkOption.c only.
+ */
+
+
+
+ /*
+ * Information used by tkPack.c only.
+ */
+
+ int packInit; /* 0 means table below needs initializing. */
+ Tcl_HashTable packerHashTable;
+ /* Maps from Tk_Window tokens to
+ * corresponding Packer structures. */
+
+
+ /*
+ * Information used by tkPlace.c only.
+ */
+
+ int placeInit; /* 0 means tables below need initializing. */
+ Tcl_HashTable masterTable; /* Maps from Tk_Window toke to the Master
+ * structure for the window, if it exists. */
+ Tcl_HashTable slaveTable; /* Maps from Tk_Window toke to the Slave
+ * structure for the window, if it exists. */
+
+ /*
+ * Information used by tkSelect.c and tkClipboard.c only:
+ */
+
+ struct TkSelectionInfo *selectionInfoPtr;
+ /* First in list of selection information
+ * records. Each entry contains information
+ * about the current owner of a particular
+ * selection on this display. */
+ Atom multipleAtom; /* Atom for MULTIPLE. None means
+ * selection stuff isn't initialized. */
+ Atom incrAtom; /* Atom for INCR. */
+ Atom targetsAtom; /* Atom for TARGETS. */
+ Atom timestampAtom; /* Atom for TIMESTAMP. */
+ Atom textAtom; /* Atom for TEXT. */
+ Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */
+ Atom applicationAtom; /* Atom for TK_APPLICATION. */
+ Atom windowAtom; /* Atom for TK_WINDOW. */
+ Atom clipboardAtom; /* Atom for CLIPBOARD. */
+ Atom utf8Atom; /* Atom for UTF8_STRING. */
+
+ Tk_Window clipWindow; /* Window used for clipboard ownership and to
+ * retrieve selections between processes. NULL
+ * means clipboard info hasn't been
+ * initialized. */
+ int clipboardActive; /* 1 means we currently own the clipboard
+ * selection, 0 means we don't. */
+ struct TkMainInfo *clipboardAppPtr;
+ /* Last application that owned clipboard. */
+ struct TkClipboardTarget *clipTargetPtr;
+ /* First in list of clipboard type information
+ * records. Each entry contains information
+ * about the buffers for a given selection
+ * target. */
+
+ /*
+ * Information used by tkSend.c only:
+ */
+
+ Tk_Window commTkwin; /* Window used for communication
+ * between interpreters during "send"
+ * commands. NULL means send info hasn't
+ * been initialized yet. */
+ Atom commProperty; /* X's name for comm property. */
+ Atom registryProperty; /* X's name for property containing
+ * registry of interpreter names. */
+ Atom appNameProperty; /* X's name for property used to hold the
+ * application name on each comm window. */
+
+ /*
+ * Information used by tkXId.c only:
+ */
+
+ struct TkIdStack *idStackPtr;
+ /* First in list of chunks of free resource
+ * identifiers, or NULL if there are no free
+ * resources. */
+ XID (*defaultAllocProc) _ANSI_ARGS_((Display *display));
+ /* Default resource allocator for display. */
+ struct TkIdStack *windowStackPtr;
+ /* First in list of chunks of window
+ * identifers that can't be reused right
+ * now. */
+ Tcl_TimerToken idCleanupScheduled;
+ /* If set, it means a call to WindowIdCleanup
+ * has already been scheduled, 0 means it
+ * hasn't. */
+
+ /*
+ * Information used by tkUnixWm.c and tkWinWm.c only:
+ */
+
+ struct TkWmInfo *firstWmPtr; /* Points to first top-level window. */
+ struct TkWmInfo *foregroundWmPtr;
+ /* Points to the foreground window. */
+
+ /*
+ * Information maintained by tkWindow.c for use later on by tkXId.c:
+ */
+
+
+ int destroyCount; /* Number of Tk_DestroyWindow operations
+ * in progress. */
+ unsigned long lastDestroyRequest;
+ /* Id of most recent XDestroyWindow request;
+ * can re-use ids in windowStackPtr when
+ * server has seen this request and event
+ * queue is empty. */
+
+ /*
+ * Information used by tkVisual.c only:
+ */
+
+ TkColormap *cmapPtr; /* First in list of all non-default colormaps
+ * allocated for this display. */
+
+ /*
+ * Miscellaneous information:
+ */
+
+#ifdef TK_USE_INPUT_METHODS
+ XIM inputMethod; /* Input method for this display */
+#if TK_XIM_SPOT
+ XFontSet inputXfs; /* XFontSet cached for over-the-spot XIM. */
+#endif
+#endif /* TK_USE_INPUT_METHODS */
+ Tcl_HashTable winTable; /* Maps from X window ids to TkWindow ptrs. */
+
+ int refCount; /* Reference count of how many Tk applications
+ * are using this display. Used to clean up
+ * the display when we no longer have any
+ * Tk applications using it.
+ */
+ /*
+ * The following field were all added for Tk8.3
+ */
+ int mouseButtonState; /* current mouse button state for this
+ * display */
+ Window mouseButtonWindow; /* Window the button state was set in,
+ * added in Tk 8.4. */
+ Window warpWindow;
+ int warpX;
+ int warpY;
+
+ /*
+ * The following field(s) were all added for Tk8.4
+ */
+ unsigned int flags; /* Various flag values: these are all
+ * defined in below. */
+ TkCaret caret; /* information about the caret for this
+ * display. This is not a pointer. */
+ int iconDataSize; /* Size of default iconphoto image data */
+ unsigned char *iconDataPtr; /* Default iconphoto image data, if set */
+} TkDisplay;
+
+/*
+ * Flag values for TkDisplay flags.
+ * TK_DISPLAY_COLLAPSE_MOTION_EVENTS: (default on)
+ * Indicates that we should collapse motion events on this display
+ * TK_DISPLAY_USE_IM: (default on, set via tk.tcl)
+ * Whether to use input methods for this display
+ * TK_DISPLAY_XIM_SPOT: (default off)
+ * Indicates that we should use over-the-spot XIM on this display
+ * TK_DISPLAY_WM_TRACING: (default off)
+ * Whether we should do wm tracing on this display.
+ * TK_DISPLAY_IN_WARP: (default off)
+ * Indicates that we are in a pointer warp
+ */
+
+#define TK_DISPLAY_COLLAPSE_MOTION_EVENTS (1 << 0)
+#define TK_DISPLAY_USE_IM (1 << 1)
+#define TK_DISPLAY_XIM_SPOT (1 << 2)
+#define TK_DISPLAY_WM_TRACING (1 << 3)
+#define TK_DISPLAY_IN_WARP (1 << 4)
+
+/*
+ * One of the following structures exists for each error handler
+ * created by a call to Tk_CreateErrorHandler. The structure
+ * is managed by tkError.c.
+ */
+
+typedef struct TkErrorHandler {
+ TkDisplay *dispPtr; /* Display to which handler applies. */
+ unsigned long firstRequest; /* Only errors with serial numbers
+ * >= to this are considered. */
+ unsigned long lastRequest; /* Only errors with serial numbers
+ * <= to this are considered. This
+ * field is filled in when XUnhandle
+ * is called. -1 means XUnhandle
+ * hasn't been called yet. */
+ int error; /* Consider only errors with this
+ * error_code (-1 means consider
+ * all errors). */
+ int request; /* Consider only errors with this
+ * major request code (-1 means
+ * consider all major codes). */
+ int minorCode; /* Consider only errors with this
+ * minor request code (-1 means
+ * consider all minor codes). */
+ Tk_ErrorProc *errorProc; /* Procedure to invoke when a matching
+ * error occurs. NULL means just ignore
+ * errors. */
+ ClientData clientData; /* Arbitrary value to pass to
+ * errorProc. */
+ struct TkErrorHandler *nextPtr;
+ /* Pointer to next older handler for
+ * this display, or NULL for end of
+ * list. */
+} TkErrorHandler;
+
+
+/*
+ * One of the following structures exists for each event handler
+ * created by calling Tk_CreateEventHandler. This information
+ * is used by tkEvent.c only.
+ */
+
+typedef struct TkEventHandler {
+ unsigned long mask; /* Events for which to invoke
+ * proc. */
+ Tk_EventProc *proc; /* Procedure to invoke when an event
+ * in mask occurs. */
+ ClientData clientData; /* Argument to pass to proc. */
+ struct TkEventHandler *nextPtr;
+ /* Next in list of handlers
+ * associated with window (NULL means
+ * end of list). */
+} TkEventHandler;
+
+/*
+ * Tk keeps one of the following data structures for each main
+ * window (created by a call to TkCreateMainWindow). It stores
+ * information that is shared by all of the windows associated
+ * with a particular main window.
+ */
+
+typedef struct TkMainInfo {
+ int refCount; /* Number of windows whose "mainPtr" fields
+ * point here. When this becomes zero, can
+ * free up the structure (the reference
+ * count is zero because windows can get
+ * deleted in almost any order; the main
+ * window isn't necessarily the last one
+ * deleted). */
+ struct TkWindow *winPtr; /* Pointer to main window. */
+ Tcl_Interp *interp; /* Interpreter associated with application. */
+ Tcl_HashTable nameTable; /* Hash table mapping path names to TkWindow
+ * structs for all windows related to this
+ * main window. Managed by tkWindow.c. */
+ long deletionEpoch; /* Incremented by window deletions */
+ Tk_BindingTable bindingTable;
+ /* Used in conjunction with "bind" command
+ * to bind events to Tcl commands. */
+ TkBindInfo bindInfo; /* Information used by tkBind.c on a per
+ * application basis. */
+ struct TkFontInfo *fontInfoPtr;
+ /* Information used by tkFont.c on a per
+ * application basis. */
+
+ /*
+ * Information used only by tkFocus.c and tk*Embed.c:
+ */
+
+ struct TkToplevelFocusInfo *tlFocusPtr;
+ /* First in list of records containing focus
+ * information for each top-level in the
+ * application. Used only by tkFocus.c. */
+ struct TkDisplayFocusInfo *displayFocusPtr;
+ /* First in list of records containing focus
+ * information for each display that this
+ * application has ever used. Used only
+ * by tkFocus.c. */
+
+ struct ElArray *optionRootPtr;
+ /* Top level of option hierarchy for this
+ * main window. NULL means uninitialized.
+ * Managed by tkOption.c. */
+ Tcl_HashTable imageTable; /* Maps from image names to Tk_ImageMaster
+ * structures. Managed by tkImage.c. */
+ int strictMotif; /* This is linked to the tk_strictMotif
+ * global variable. */
+ struct TkMainInfo *nextPtr; /* Next in list of all main windows managed by
+ * this process. */
+} TkMainInfo;
+
+/*
+ * Tk keeps the following data structure for each of it's builtin
+ * bitmaps. This structure is only used by tkBitmap.c and other
+ * platform specific bitmap files.
+ */
+
+typedef struct {
+ CONST char *source; /* Bits for bitmap. */
+ int width, height; /* Dimensions of bitmap. */
+ int native; /* 0 means generic (X style) bitmap,
+ * 1 means native style bitmap. */
+} TkPredefBitmap;
+
+/*
+ * Tk keeps one of the following structures for each window.
+ * Some of the information (like size and location) is a shadow
+ * of information managed by the X server, and some is special
+ * information used here, such as event and geometry management
+ * information. This information is (mostly) managed by tkWindow.c.
+ * WARNING: the declaration below must be kept consistent with the
+ * Tk_FakeWin structure in tk.h. If you change one, be sure to
+ * change the other!!
+ */
+
+typedef struct TkWindow {
+
+ /*
+ * Structural information:
+ */
+
+ Display *display; /* Display containing window. */
+ TkDisplay *dispPtr; /* Tk's information about display
+ * for window. */
+ int screenNum; /* Index of screen for window, among all
+ * those for dispPtr. */
+ Visual *visual; /* Visual to use for window. If not default,
+ * MUST be set before X window is created. */
+ int depth; /* Number of bits/pixel. */
+ Window window; /* X's id for window. NULL means window
+ * hasn't actually been created yet, or it's
+ * been deleted. */
+ struct TkWindow *childList; /* First in list of child windows,
+ * or NULL if no children. List is in
+ * stacking order, lowest window first.*/
+ struct TkWindow *lastChildPtr;
+ /* Last in list of child windows (highest
+ * in stacking order), or NULL if no
+ * children. */
+ struct TkWindow *parentPtr; /* Pointer to parent window (logical
+ * parent, not necessarily X parent). NULL
+ * means either this is the main window, or
+ * the window's parent has already been
+ * deleted. */
+ struct TkWindow *nextPtr; /* Next higher sibling (in stacking order)
+ * in list of children with same parent. NULL
+ * means end of list. */
+ TkMainInfo *mainPtr; /* Information shared by all windows
+ * associated with a particular main
+ * window. NULL means this window is
+ * a rogue that isn't associated with
+ * any application (at present, this
+ * only happens for the dummy windows
+ * used for "send" communication). */
+
+ /*
+ * Name and type information for the window:
+ */
+
+ char *pathName; /* Path name of window (concatenation
+ * of all names between this window and
+ * its top-level ancestor). This is a
+ * pointer into an entry in
+ * mainPtr->nameTable. NULL means that
+ * the window hasn't been completely
+ * created yet. */
+ Tk_Uid nameUid; /* Name of the window within its parent
+ * (unique within the parent). */
+ Tk_Uid classUid; /* Class of the window. NULL means window
+ * hasn't been given a class yet. */
+
+ /*
+ * Geometry and other attributes of window. This information
+ * may not be updated on the server immediately; stuff that
+ * hasn't been reflected in the server yet is called "dirty".
+ * At present, information can be dirty only if the window
+ * hasn't yet been created.
+ */
+
+ XWindowChanges changes; /* Geometry and other info about
+ * window. */
+ unsigned int dirtyChanges; /* Bits indicate fields of "changes"
+ * that are dirty. */
+ XSetWindowAttributes atts; /* Current attributes of window. */
+ unsigned long dirtyAtts; /* Bits indicate fields of "atts"
+ * that are dirty. */
+
+ unsigned int flags; /* Various flag values: these are all
+ * defined in tk.h (confusing, but they're
+ * needed there for some query macros). */
+
+ /*
+ * Information kept by the event manager (tkEvent.c):
+ */
+
+ TkEventHandler *handlerList;/* First in list of event handlers
+ * declared for this window, or
+ * NULL if none. */
+#ifdef TK_USE_INPUT_METHODS
+ XIC inputContext; /* XIM input context. */
+#endif /* TK_USE_INPUT_METHODS */
+
+ /*
+ * Information used for event bindings (see "bind" and "bindtags"
+ * commands in tkCmds.c):
+ */
+
+ ClientData *tagPtr; /* Points to array of tags used for bindings
+ * on this window. Each tag is a Tk_Uid.
+ * Malloc'ed. NULL means no tags. */
+ int numTags; /* Number of tags at *tagPtr. */
+
+ /*
+ * Information used by tkOption.c to manage options for the
+ * window.
+ */
+
+ int optionLevel; /* -1 means no option information is
+ * currently cached for this window.
+ * Otherwise this gives the level in
+ * the option stack at which info is
+ * cached. */
+ /*
+ * Information used by tkSelect.c to manage the selection.
+ */
+
+ struct TkSelHandler *selHandlerList;
+ /* First in list of handlers for
+ * returning the selection in various
+ * forms. */
+
+ /*
+ * Information used by tkGeometry.c for geometry management.
+ */
+
+ Tk_GeomMgr *geomMgrPtr; /* Information about geometry manager for
+ * this window. */
+ ClientData geomData; /* Argument for geometry manager procedures. */
+ int reqWidth, reqHeight; /* Arguments from last call to
+ * Tk_GeometryRequest, or 0's if
+ * Tk_GeometryRequest hasn't been
+ * called. */
+ int internalBorderLeft; /* Width of internal border of window
+ * (0 means no internal border). Geometry
+ * managers should not normally place children
+ * on top of the border.
+ * Fields for the other three sides are found
+ * below. */
+
+ /*
+ * Information maintained by tkWm.c for window manager communication.
+ */
+
+ struct TkWmInfo *wmInfoPtr; /* For top-level windows (and also
+ * for special Unix menubar and wrapper
+ * windows), points to structure with
+ * wm-related info (see tkWm.c). For
+ * other windows, this is NULL. */
+
+ /*
+ * Information used by widget classes.
+ */
+
+ Tk_ClassProcs *classProcsPtr;
+ ClientData instanceData;
+
+ /*
+ * Platform specific information private to each port.
+ */
+
+ struct TkWindowPrivate *privatePtr;
+
+ /*
+ * More information used by tkGeometry.c for geometry management.
+ */
+
+ /* The remaining fields of internal border. */
+ int internalBorderRight;
+ int internalBorderTop;
+ int internalBorderBottom;
+
+ int minReqWidth; /* Minimum requested width. */
+ int minReqHeight; /* Minimum requested height. */
+} TkWindow;
+
+/*
+ * The following structure is used as a two way map between integers
+ * and strings, usually to map between an internal C representation
+ * and the strings used in Tcl.
+ */
+
+typedef struct TkStateMap {
+ int numKey; /* Integer representation of a value. */
+ char *strKey; /* String representation of a value. */
+} TkStateMap;
+
+/*
+ * This structure is used by the Mac and Window porting layers as
+ * the internal representation of a clip_mask in a GC.
+ */
+
+typedef struct TkpClipMask {
+ int type; /* One of TKP_CLIP_PIXMAP or TKP_CLIP_REGION */
+ union {
+ Pixmap pixmap;
+ TkRegion region;
+ } value;
+} TkpClipMask;
+
+#define TKP_CLIP_PIXMAP 0
+#define TKP_CLIP_REGION 1
+
+/*
+ * Pointer to first entry in list of all displays currently known.
+ */
+
+extern TkDisplay *tkDisplayList;
+
+/*
+ * Return values from TkGrabState:
+ */
+
+#define TK_GRAB_NONE 0
+#define TK_GRAB_IN_TREE 1
+#define TK_GRAB_ANCESTOR 2
+#define TK_GRAB_EXCLUDED 3
+
+/*
+ * The macro below is used to modify a "char" value (e.g. by casting
+ * it to an unsigned character) so that it can be used safely with
+ * macros such as isspace.
+ */
+
+#define UCHAR(c) ((unsigned char) (c))
+
+/*
+ * The following symbol is used in the mode field of FocusIn events
+ * generated by an embedded application to request the input focus from
+ * its container.
+ */
+
+#define EMBEDDED_APP_WANTS_FOCUS (NotifyNormal + 20)
+
+/*
+ * The following special modifier mask bits are defined, to indicate
+ * logical modifiers such as Meta and Alt that may float among the
+ * actual modifier bits.
+ */
+
+#define META_MASK (AnyModifier<<1)
+#define ALT_MASK (AnyModifier<<2)
+
+/*
+ * Object types not declared in tkObj.c need to be mentioned here so
+ * they can be properly registered with Tcl:
+ */
+
+extern Tcl_ObjType tkBorderObjType;
+extern Tcl_ObjType tkBitmapObjType;
+extern Tcl_ObjType tkColorObjType;
+extern Tcl_ObjType tkCursorObjType;
+extern Tcl_ObjType tkFontObjType;
+extern Tcl_ObjType tkOptionObjType;
+extern Tcl_ObjType tkStateKeyObjType;
+
+/*
+ * Miscellaneous variables shared among Tk modules but not exported
+ * to the outside world:
+ */
+typedef void TkDelayedEventProc _ANSI_ARGS_((void));
+typedef void tkHandleEventProc_t _ANSI_ARGS_((XEvent* eventPtr));
+
+extern Tk_SmoothMethod tkBezierSmoothMethod;
+extern Tk_ImageType tkBitmapImageType;
+extern Tk_PhotoImageFormat tkImgFmtGIF;
+extern void (*tkHandleEventProc) _ANSI_ARGS_((
+ XEvent* eventPtr));
+extern Tk_PhotoImageFormat tkImgFmtPPM;
+extern TkMainInfo *tkMainWindowList;
+extern Tk_ImageType tkPhotoImageType;
+extern Tcl_HashTable tkPredefBitmapTable;
+extern int tkSendSerial;
+
+#include "tkIntDecls.h"
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Internal procedures shared among Tk modules but not exported
+ * to the outside world:
+ */
+
+EXTERN int Tk_BellObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_BindObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_BindtagsObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ButtonObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_CanvasObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_CheckbuttonObjCmd _ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ClipboardObjCmd _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ChooseColorObjCmd _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ChooseDirectoryObjCmd _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ChooseFontObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_DestroyObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_EntryObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_EventObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_FileeventCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_FrameObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_FocusObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_FontObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_GetOpenFileObjCmd _ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_GetSaveFileObjCmd _ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_GrabObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_GridObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ImageObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_LabelObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_LabelframeObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ListboxObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_LowerObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_MenubuttonObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_MessageBoxObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_MessageObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_PanedWindowObjCmd _ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_OptionObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_PackObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_PlaceObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_RadiobuttonObjCmd _ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_RaiseObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ScaleObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));
+EXTERN int Tk_SelectionObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_SendObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_SpinboxObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_TkwaitObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_ToplevelObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_UpdateObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_WinfoObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+EXTERN int Tk_WmObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+
+EXTERN void TkConsolePrint _ANSI_ARGS_((Tcl_Interp *interp,
+ int devId, CONST char *buffer, long size));
+
+EXTERN void TkEventInit _ANSI_ARGS_((void));
+
+EXTERN void TkRegisterObjTypes _ANSI_ARGS_((void));
+
+EXTERN int TkCreateMenuCmd _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN int TkDeadAppCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+
+EXTERN int TkpTestembedCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkCanvasGetCoordObj _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Canvas canvas, Tcl_Obj *obj,
+ double *doublePtr));
+EXTERN int TkCanvasDashParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj * TkCanvasDashPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkGetDoublePixels _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, CONST char *string,
+ double *doublePtr));
+EXTERN int TkOffsetParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj * TkOffsetPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkOrientParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value,
+ char *widgRec, int offset));
+EXTERN Tcl_Obj * TkOrientPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkPixelParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj * TkPixelPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkPostscriptImage _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, Tk_PostscriptInfo psInfo,
+ XImage *ximage, int x, int y, int width,
+ int height));
+EXTERN int TkSmoothParseProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin,
+ Tcl_Obj *value, char *recordPtr, int offset));
+EXTERN Tcl_Obj * TkSmoothPrintProc _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin, char *recordPtr, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkStateParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value,
+ char *widgRec, int offset));
+EXTERN Tcl_Obj * TkStatePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int Tk_StateParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value,
+ char *widgRec, int offset));
+EXTERN Tcl_Obj * Tk_StatePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+EXTERN int TkTileParseProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset));
+EXTERN Tcl_Obj * TkTilePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+
+/*
+ * Unsupported commands.
+ */
+EXTERN int TkUnsupported1Cmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+
+/*
+ * Canvas-related procedures that are shared among Tk modules but not
+ * exported to the outside world:
+ */
+
+struct TkCanvas;
+extern int TkCanvPostscriptCmd _ANSI_ARGS_((struct TkCanvas *canvasPtr,
+ Tcl_Interp *interp, int argc, CONST84 Tcl_Obj *CONST *objv));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKINT */
+
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.m
new file mode 100644
index 00000000000..4713524528e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.m
@@ -0,0 +1,125 @@
+#ifndef _TKINT_VM
+#define _TKINT_VM
+#include "tkInt_f.h"
+#ifndef NO_VTABLES
+#define tkBitmapObjType (*TkintVptr->V_tkBitmapObjType)
+#define tkBorderObjType (*TkintVptr->V_tkBorderObjType)
+#define tkColorObjType (*TkintVptr->V_tkColorObjType)
+#define tkCursorObjType (*TkintVptr->V_tkCursorObjType)
+#define tkFontObjType (*TkintVptr->V_tkFontObjType)
+#define tkOptionObjType (*TkintVptr->V_tkOptionObjType)
+#define tkStateKeyObjType (*TkintVptr->V_tkStateKeyObjType)
+#ifndef TkCanvPostscriptCmd
+# define TkCanvPostscriptCmd (*TkintVptr->V_TkCanvPostscriptCmd)
+#endif
+
+#ifndef TkCreateMenuCmd
+# define TkCreateMenuCmd (*TkintVptr->V_TkCreateMenuCmd)
+#endif
+
+#ifndef TkEventInit
+# define TkEventInit (*TkintVptr->V_TkEventInit)
+#endif
+
+#ifndef TkGetDoublePixels
+# define TkGetDoublePixels (*TkintVptr->V_TkGetDoublePixels)
+#endif
+
+#ifndef TkOffsetParseProc
+# define TkOffsetParseProc (*TkintVptr->V_TkOffsetParseProc)
+#endif
+
+#ifndef TkOffsetPrintProc
+# define TkOffsetPrintProc (*TkintVptr->V_TkOffsetPrintProc)
+#endif
+
+#ifndef TkOrientParseProc
+# define TkOrientParseProc (*TkintVptr->V_TkOrientParseProc)
+#endif
+
+#ifndef TkOrientPrintProc
+# define TkOrientPrintProc (*TkintVptr->V_TkOrientPrintProc)
+#endif
+
+#ifndef TkPixelParseProc
+# define TkPixelParseProc (*TkintVptr->V_TkPixelParseProc)
+#endif
+
+#ifndef TkPixelPrintProc
+# define TkPixelPrintProc (*TkintVptr->V_TkPixelPrintProc)
+#endif
+
+#ifndef TkPostscriptImage
+# define TkPostscriptImage (*TkintVptr->V_TkPostscriptImage)
+#endif
+
+#ifndef TkRegisterObjTypes
+# define TkRegisterObjTypes (*TkintVptr->V_TkRegisterObjTypes)
+#endif
+
+#ifndef TkTileParseProc
+# define TkTileParseProc (*TkintVptr->V_TkTileParseProc)
+#endif
+
+#ifndef TkTilePrintProc
+# define TkTilePrintProc (*TkintVptr->V_TkTilePrintProc)
+#endif
+
+#ifndef Tk_BindObjCmd
+# define Tk_BindObjCmd (*TkintVptr->V_Tk_BindObjCmd)
+#endif
+
+#ifndef Tk_BindtagsObjCmd
+# define Tk_BindtagsObjCmd (*TkintVptr->V_Tk_BindtagsObjCmd)
+#endif
+
+#ifndef Tk_ClipboardObjCmd
+# define Tk_ClipboardObjCmd (*TkintVptr->V_Tk_ClipboardObjCmd)
+#endif
+
+#ifndef Tk_GrabObjCmd
+# define Tk_GrabObjCmd (*TkintVptr->V_Tk_GrabObjCmd)
+#endif
+
+#ifndef Tk_GridObjCmd
+# define Tk_GridObjCmd (*TkintVptr->V_Tk_GridObjCmd)
+#endif
+
+#ifndef Tk_LabelframeObjCmd
+# define Tk_LabelframeObjCmd (*TkintVptr->V_Tk_LabelframeObjCmd)
+#endif
+
+#ifndef Tk_PackObjCmd
+# define Tk_PackObjCmd (*TkintVptr->V_Tk_PackObjCmd)
+#endif
+
+#ifndef Tk_PanedWindowObjCmd
+# define Tk_PanedWindowObjCmd (*TkintVptr->V_Tk_PanedWindowObjCmd)
+#endif
+
+#ifndef Tk_PlaceObjCmd
+# define Tk_PlaceObjCmd (*TkintVptr->V_Tk_PlaceObjCmd)
+#endif
+
+#ifndef Tk_SelectionObjCmd
+# define Tk_SelectionObjCmd (*TkintVptr->V_Tk_SelectionObjCmd)
+#endif
+
+#ifndef Tk_StateParseProc
+# define Tk_StateParseProc (*TkintVptr->V_Tk_StateParseProc)
+#endif
+
+#ifndef Tk_StatePrintProc
+# define Tk_StatePrintProc (*TkintVptr->V_Tk_StatePrintProc)
+#endif
+
+#ifndef Tk_TkwaitObjCmd
+# define Tk_TkwaitObjCmd (*TkintVptr->V_Tk_TkwaitObjCmd)
+#endif
+
+#ifndef Tk_WmObjCmd
+# define Tk_WmObjCmd (*TkintVptr->V_Tk_WmObjCmd)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKINT_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.t
new file mode 100644
index 00000000000..6e2c9d44089
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt.t
@@ -0,0 +1,182 @@
+#ifdef _TKINT
+VVAR(Tcl_ObjType,tkBitmapObjType,V_tkBitmapObjType)
+VVAR(Tcl_ObjType,tkBorderObjType,V_tkBorderObjType)
+VVAR(Tcl_ObjType,tkColorObjType,V_tkColorObjType)
+VVAR(Tcl_ObjType,tkCursorObjType,V_tkCursorObjType)
+VVAR(Tcl_ObjType,tkFontObjType,V_tkFontObjType)
+VVAR(Tcl_ObjType,tkOptionObjType,V_tkOptionObjType)
+VVAR(Tcl_ObjType,tkStateKeyObjType,V_tkStateKeyObjType)
+#ifndef TkCanvPostscriptCmd
+VFUNC(int,TkCanvPostscriptCmd,V_TkCanvPostscriptCmd,_ANSI_ARGS_((struct TkCanvas *canvasPtr,
+ Tcl_Interp *interp, int argc, CONST84 Tcl_Obj *CONST *objv)))
+#endif /* #ifndef TkCanvPostscriptCmd */
+
+#ifndef TkCreateMenuCmd
+VFUNC(int,TkCreateMenuCmd,V_TkCreateMenuCmd,_ANSI_ARGS_((Tcl_Interp *interp)))
+#endif /* #ifndef TkCreateMenuCmd */
+
+#ifndef TkEventInit
+VFUNC(void,TkEventInit,V_TkEventInit,_ANSI_ARGS_((void)))
+#endif /* #ifndef TkEventInit */
+
+#ifndef TkGetDoublePixels
+VFUNC(int,TkGetDoublePixels,V_TkGetDoublePixels,_ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, CONST char *string,
+ double *doublePtr)))
+#endif /* #ifndef TkGetDoublePixels */
+
+#ifndef TkOffsetParseProc
+VFUNC(int,TkOffsetParseProc,V_TkOffsetParseProc,_ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset)))
+#endif /* #ifndef TkOffsetParseProc */
+
+#ifndef TkOffsetPrintProc
+VFUNC(Tcl_Obj *,TkOffsetPrintProc,V_TkOffsetPrintProc,_ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr)))
+#endif /* #ifndef TkOffsetPrintProc */
+
+#ifndef TkOrientParseProc
+VFUNC(int,TkOrientParseProc,V_TkOrientParseProc,_ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value,
+ char *widgRec, int offset)))
+#endif /* #ifndef TkOrientParseProc */
+
+#ifndef TkOrientPrintProc
+VFUNC(Tcl_Obj *,TkOrientPrintProc,V_TkOrientPrintProc,_ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr)))
+#endif /* #ifndef TkOrientPrintProc */
+
+#ifndef TkPixelParseProc
+VFUNC(int,TkPixelParseProc,V_TkPixelParseProc,_ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset)))
+#endif /* #ifndef TkPixelParseProc */
+
+#ifndef TkPixelPrintProc
+VFUNC(Tcl_Obj *,TkPixelPrintProc,V_TkPixelPrintProc,_ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr)))
+#endif /* #ifndef TkPixelPrintProc */
+
+#ifndef TkPostscriptImage
+VFUNC(int,TkPostscriptImage,V_TkPostscriptImage,_ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, Tk_PostscriptInfo psInfo,
+ XImage *ximage, int x, int y, int width,
+ int height)))
+#endif /* #ifndef TkPostscriptImage */
+
+#ifndef TkRegisterObjTypes
+VFUNC(void,TkRegisterObjTypes,V_TkRegisterObjTypes,_ANSI_ARGS_((void)))
+#endif /* #ifndef TkRegisterObjTypes */
+
+#ifndef TkTileParseProc
+VFUNC(int,TkTileParseProc,V_TkTileParseProc,_ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value, char *widgRec,
+ int offset)))
+#endif /* #ifndef TkTileParseProc */
+
+#ifndef TkTilePrintProc
+VFUNC(Tcl_Obj *,TkTilePrintProc,V_TkTilePrintProc,_ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr)))
+#endif /* #ifndef TkTilePrintProc */
+
+#ifndef Tk_BindObjCmd
+VFUNC(int,Tk_BindObjCmd,V_Tk_BindObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_BindObjCmd */
+
+#ifndef Tk_BindtagsObjCmd
+VFUNC(int,Tk_BindtagsObjCmd,V_Tk_BindtagsObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_BindtagsObjCmd */
+
+#ifndef Tk_ClipboardObjCmd
+VFUNC(int,Tk_ClipboardObjCmd,V_Tk_ClipboardObjCmd,_ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ int objc, Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_ClipboardObjCmd */
+
+#ifndef Tk_GrabObjCmd
+VFUNC(int,Tk_GrabObjCmd,V_Tk_GrabObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_GrabObjCmd */
+
+#ifndef Tk_GridObjCmd
+VFUNC(int,Tk_GridObjCmd,V_Tk_GridObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_GridObjCmd */
+
+#ifndef Tk_LabelframeObjCmd
+VFUNC(int,Tk_LabelframeObjCmd,V_Tk_LabelframeObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_LabelframeObjCmd */
+
+#ifndef Tk_PackObjCmd
+VFUNC(int,Tk_PackObjCmd,V_Tk_PackObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_PackObjCmd */
+
+#ifndef Tk_PanedWindowObjCmd
+VFUNC(int,Tk_PanedWindowObjCmd,V_Tk_PanedWindowObjCmd,_ANSI_ARGS_((
+ ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_PanedWindowObjCmd */
+
+#ifndef Tk_PlaceObjCmd
+VFUNC(int,Tk_PlaceObjCmd,V_Tk_PlaceObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_PlaceObjCmd */
+
+#ifndef Tk_SelectionObjCmd
+VFUNC(int,Tk_SelectionObjCmd,V_Tk_SelectionObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_SelectionObjCmd */
+
+#ifndef Tk_StateParseProc
+VFUNC(int,Tk_StateParseProc,V_Tk_StateParseProc,_ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *value,
+ char *widgRec, int offset)))
+#endif /* #ifndef Tk_StateParseProc */
+
+#ifndef Tk_StatePrintProc
+VFUNC(Tcl_Obj *,Tk_StatePrintProc,V_Tk_StatePrintProc,_ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widgRec, int offset,
+ Tcl_FreeProc **freeProcPtr)))
+#endif /* #ifndef Tk_StatePrintProc */
+
+#ifndef Tk_TkwaitObjCmd
+VFUNC(int,Tk_TkwaitObjCmd,V_Tk_TkwaitObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_TkwaitObjCmd */
+
+#ifndef Tk_WmObjCmd
+VFUNC(int,Tk_WmObjCmd,V_Tk_WmObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[])))
+#endif /* #ifndef Tk_WmObjCmd */
+
+#endif /* _TKINT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.h
new file mode 100644
index 00000000000..4116b2174f1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.h
@@ -0,0 +1,1572 @@
+/*
+ * tkIntDecls.h --
+ *
+ * This file contains the declarations for all unsupported
+ * functions that are exported by the Tk library. These
+ * interfaces are not guaranteed to remain the same between
+ * versions. Use at your own risk.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkIntDecls.h,v 1.22.2.1 2003/10/13 03:30:05 hobbs Exp $
+ */
+
+#ifndef _TKINTDECLS
+#define _TKINTDECLS
+
+#ifdef BUILD_tk
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tkInt.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+/* 0 */
+EXTERN TkWindow * TkAllocWindow _ANSI_ARGS_((TkDisplay * dispPtr,
+ int screenNum, TkWindow * parentPtr));
+/* 1 */
+EXTERN void TkBezierPoints _ANSI_ARGS_((double control[],
+ int numSteps, double * coordPtr));
+/* 2 */
+EXTERN void TkBezierScreenPoints _ANSI_ARGS_((Tk_Canvas canvas,
+ double control[], int numSteps,
+ XPoint * xPointPtr));
+/* 3 */
+EXTERN void TkBindDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 4 */
+EXTERN void TkBindEventProc _ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr));
+/* 5 */
+EXTERN void TkBindFree _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 6 */
+EXTERN void TkBindInit _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 7 */
+EXTERN void TkChangeEventWindow _ANSI_ARGS_((XEvent * eventPtr,
+ TkWindow * winPtr));
+/* 8 */
+EXTERN int TkClipInit _ANSI_ARGS_((Tcl_Interp * interp,
+ TkDisplay * dispPtr));
+/* 9 */
+EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor,
+ Tk_Window tkwin, int padX, int padY,
+ int innerWidth, int innerHeight, int * xPtr,
+ int * yPtr));
+/* 10 */
+EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp * interp,
+ char * script));
+/* 11 */
+EXTERN unsigned long TkCreateBindingProcedure _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventString,
+ TkBindEvalProc * evalProc,
+ TkBindFreeProc * freeProc,
+ ClientData clientData));
+/* 12 */
+EXTERN TkCursor * TkCreateCursorFromData _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * source, CONST char * mask,
+ int width, int height, int xHot, int yHot,
+ XColor fg, XColor bg));
+/* 13 */
+EXTERN int TkCreateFrame _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv,
+ int toplevel, char * appName));
+/* 14 */
+EXTERN Tk_Window TkCreateMainWindow _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * screenName, char * baseName));
+/* 15 */
+EXTERN Time TkCurrentTime _ANSI_ARGS_((TkDisplay * dispPtr,
+ int fallbackCurrent));
+/* 16 */
+EXTERN void TkDeleteAllImages _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 17 */
+EXTERN void TkDoConfigureNotify _ANSI_ARGS_((TkWindow * winPtr));
+/* 18 */
+EXTERN void TkDrawInsetFocusHighlight _ANSI_ARGS_((
+ Tk_Window tkwin, GC gc, int width,
+ Drawable drawable, int padding));
+/* 19 */
+EXTERN void TkEventDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 20 */
+EXTERN void TkFillPolygon _ANSI_ARGS_((Tk_Canvas canvas,
+ double * coordPtr, int numPoints,
+ Display * display, Drawable drawable, GC gc,
+ GC outlineGC));
+/* 21 */
+EXTERN int TkFindStateNum _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * option,
+ CONST TkStateMap * mapPtr,
+ CONST char * strKey));
+/* 22 */
+EXTERN char * TkFindStateString _ANSI_ARGS_((
+ CONST TkStateMap * mapPtr, int numKey));
+/* 23 */
+EXTERN void TkFocusDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 24 */
+EXTERN int TkFocusFilterEvent _ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr));
+/* 25 */
+EXTERN TkWindow * TkFocusKeyEvent _ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr));
+/* 26 */
+EXTERN void TkFontPkgInit _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 27 */
+EXTERN void TkFontPkgFree _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 28 */
+EXTERN void TkFreeBindingTags _ANSI_ARGS_((TkWindow * winPtr));
+/* 29 */
+EXTERN void TkpFreeCursor _ANSI_ARGS_((TkCursor * cursorPtr));
+/* 30 */
+EXTERN char * TkGetBitmapData _ANSI_ARGS_((Tcl_Interp * interp,
+ char * string, char * fileName,
+ int * widthPtr, int * heightPtr,
+ int * hotXPtr, int * hotYPtr));
+/* 31 */
+EXTERN void TkGetButtPoints _ANSI_ARGS_((double p1[],
+ double p2[], double width, int project,
+ double m1[], double m2[]));
+/* 32 */
+EXTERN TkCursor * TkGetCursorByName _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid string));
+/* 33 */
+EXTERN CONST84_RETURN char * TkGetDefaultScreenName _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * screenName));
+/* 34 */
+EXTERN TkDisplay * TkGetDisplay _ANSI_ARGS_((Display * display));
+/* 35 */
+EXTERN int TkGetDisplayOf _ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[],
+ Tk_Window * tkwinPtr));
+/* 36 */
+EXTERN TkWindow * TkGetFocusWin _ANSI_ARGS_((TkWindow * winPtr));
+/* 37 */
+EXTERN int TkGetInterpNames _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin));
+/* 38 */
+EXTERN int TkGetMiterPoints _ANSI_ARGS_((double p1[],
+ double p2[], double p3[], double width,
+ double m1[], double m2[]));
+/* 39 */
+EXTERN void TkGetPointerCoords _ANSI_ARGS_((Tk_Window tkwin,
+ int * xPtr, int * yPtr));
+/* 40 */
+EXTERN void TkGetServerInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin));
+/* 41 */
+EXTERN void TkGrabDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 42 */
+EXTERN int TkGrabState _ANSI_ARGS_((TkWindow * winPtr));
+/* 43 */
+EXTERN void TkIncludePoint _ANSI_ARGS_((Tk_Item * itemPtr,
+ double * pointPtr));
+/* 44 */
+EXTERN void TkInOutEvents _ANSI_ARGS_((XEvent * eventPtr,
+ TkWindow * sourcePtr, TkWindow * destPtr,
+ int leaveType, int enterType,
+ Tcl_QueuePosition position));
+/* 45 */
+EXTERN void TkInstallFrameMenu _ANSI_ARGS_((Tk_Window tkwin));
+/* 46 */
+EXTERN char * TkKeysymToString _ANSI_ARGS_((KeySym keysym));
+/* 47 */
+EXTERN int TkLineToArea _ANSI_ARGS_((double end1Ptr[],
+ double end2Ptr[], double rectPtr[]));
+/* 48 */
+EXTERN double TkLineToPoint _ANSI_ARGS_((double end1Ptr[],
+ double end2Ptr[], double pointPtr[]));
+/* 49 */
+EXTERN int TkMakeBezierCurve _ANSI_ARGS_((Tk_Canvas canvas,
+ double * pointPtr, int numPoints,
+ int numSteps, XPoint xPoints[],
+ double dblPoints[]));
+/* 50 */
+EXTERN void TkMakeBezierPostscript _ANSI_ARGS_((
+ Tcl_Interp * interp, Tk_Canvas canvas,
+ double * pointPtr, int numPoints));
+/* 51 */
+#ifndef TkOptionClassChanged
+EXTERN void TkOptionClassChanged _ANSI_ARGS_((TkWindow * winPtr));
+#endif
+/* 52 */
+#ifndef TkOptionDeadWindow
+EXTERN void TkOptionDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+#endif
+/* 53 */
+EXTERN int TkOvalToArea _ANSI_ARGS_((double * ovalPtr,
+ double * rectPtr));
+/* 54 */
+EXTERN double TkOvalToPoint _ANSI_ARGS_((double ovalPtr[],
+ double width, int filled, double pointPtr[]));
+/* 55 */
+EXTERN int TkpChangeFocus _ANSI_ARGS_((TkWindow * winPtr,
+ int force));
+/* 56 */
+EXTERN void TkpCloseDisplay _ANSI_ARGS_((TkDisplay * dispPtr));
+/* 57 */
+EXTERN void TkpClaimFocus _ANSI_ARGS_((TkWindow * topLevelPtr,
+ int force));
+/* 58 */
+EXTERN void TkpDisplayWarning _ANSI_ARGS_((CONST char * msg,
+ CONST char * title));
+/* 59 */
+EXTERN void TkpGetAppName _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_DString * name));
+/* 60 */
+EXTERN TkWindow * TkpGetOtherWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 61 */
+EXTERN TkWindow * TkpGetWrapperWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 62 */
+EXTERN int TkpInit _ANSI_ARGS_((Tcl_Interp * interp));
+/* 63 */
+EXTERN void TkpInitializeMenuBindings _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tk_BindingTable bindingTable));
+/* 64 */
+EXTERN void TkpMakeContainer _ANSI_ARGS_((Tk_Window tkwin));
+/* 65 */
+EXTERN void TkpMakeMenuWindow _ANSI_ARGS_((Tk_Window tkwin,
+ int transient));
+/* 66 */
+EXTERN Window TkpMakeWindow _ANSI_ARGS_((TkWindow * winPtr,
+ Window parent));
+/* 67 */
+EXTERN void TkpMenuNotifyToplevelCreate _ANSI_ARGS_((
+ Tcl_Interp * interp1, char * menuName));
+/* 68 */
+EXTERN TkDisplay * TkpOpenDisplay _ANSI_ARGS_((
+ CONST char * display_name));
+/* 69 */
+EXTERN int TkPointerEvent _ANSI_ARGS_((XEvent * eventPtr,
+ TkWindow * winPtr));
+/* 70 */
+EXTERN int TkPolygonToArea _ANSI_ARGS_((double * polyPtr,
+ int numPoints, double * rectPtr));
+/* 71 */
+EXTERN double TkPolygonToPoint _ANSI_ARGS_((double * polyPtr,
+ int numPoints, double * pointPtr));
+/* 72 */
+EXTERN int TkPositionInTree _ANSI_ARGS_((TkWindow * winPtr,
+ TkWindow * treePtr));
+/* 73 */
+EXTERN void TkpRedirectKeyEvent _ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr));
+/* 74 */
+EXTERN void TkpSetMainMenubar _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, char * menuName));
+/* 75 */
+EXTERN int TkpUseWindow _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj *string));
+/* 76 */
+EXTERN int TkpWindowWasRecentlyDeleted _ANSI_ARGS_((Window win,
+ TkDisplay * dispPtr));
+/* 77 */
+EXTERN void TkQueueEventForAllChildren _ANSI_ARGS_((
+ TkWindow * winPtr, XEvent * eventPtr));
+/* 78 */
+EXTERN int TkReadBitmapFile _ANSI_ARGS_((Tcl_Interp * interp,
+ Display* display,
+ Drawable d, CONST char* filename,
+ unsigned int* width_return,
+ unsigned int* height_return,
+ Pixmap* bitmap_return, int* x_hot_return,
+ int* y_hot_return));
+/* 79 */
+EXTERN int TkScrollWindow _ANSI_ARGS_((Tk_Window tkwin, GC gc,
+ int x, int y, int width, int height, int dx,
+ int dy, TkRegion damageRgn));
+/* 80 */
+EXTERN void TkSelDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 81 */
+EXTERN void TkSelEventProc _ANSI_ARGS_((Tk_Window tkwin,
+ XEvent * eventPtr));
+/* 82 */
+EXTERN void TkSelInit _ANSI_ARGS_((Tk_Window tkwin));
+/* 83 */
+EXTERN void TkSelPropProc _ANSI_ARGS_((XEvent * eventPtr));
+/* Slot 84 is reserved */
+/* 85 */
+EXTERN void TkSetWindowMenuBar _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj *oldMenuName,
+ Tcl_Obj *menuName));
+/* 86 */
+EXTERN KeySym TkStringToKeysym _ANSI_ARGS_((char * name));
+/* 87 */
+EXTERN int TkThickPolyLineToArea _ANSI_ARGS_((double * coordPtr,
+ int numPoints, double width, int capStyle,
+ int joinStyle, double * rectPtr));
+/* 88 */
+EXTERN void TkWmAddToColormapWindows _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 89 */
+EXTERN void TkWmDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 90 */
+EXTERN TkWindow * TkWmFocusToplevel _ANSI_ARGS_((TkWindow * winPtr));
+/* 91 */
+EXTERN void TkWmMapWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 92 */
+EXTERN void TkWmNewWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 93 */
+EXTERN void TkWmProtocolEventProc _ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * evenvPtr));
+/* 94 */
+EXTERN void TkWmRemoveFromColormapWindows _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 95 */
+EXTERN void TkWmRestackToplevel _ANSI_ARGS_((TkWindow * winPtr,
+ int aboveBelow, TkWindow * otherPtr));
+/* 96 */
+EXTERN void TkWmSetClass _ANSI_ARGS_((TkWindow * winPtr));
+/* 97 */
+EXTERN void TkWmUnmapWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 98 */
+EXTERN Tcl_Obj * TkDebugBitmap _ANSI_ARGS_((Tk_Window tkwin,
+ char * name));
+/* 99 */
+EXTERN Tcl_Obj * TkDebugBorder _ANSI_ARGS_((Tk_Window tkwin,
+ char * name));
+/* 100 */
+EXTERN Tcl_Obj * TkDebugCursor _ANSI_ARGS_((Tk_Window tkwin,
+ char * name));
+/* 101 */
+EXTERN Tcl_Obj * TkDebugColor _ANSI_ARGS_((Tk_Window tkwin,
+ char * name));
+/* 102 */
+EXTERN Tcl_Obj * TkDebugConfig _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_OptionTable table));
+/* 103 */
+EXTERN Tcl_Obj * TkDebugFont _ANSI_ARGS_((Tk_Window tkwin,
+ char * name));
+/* 104 */
+EXTERN int TkFindStateNumObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * optionPtr,
+ CONST TkStateMap * mapPtr, Tcl_Obj * keyPtr));
+/* 105 */
+EXTERN Tcl_HashTable * TkGetBitmapPredefTable _ANSI_ARGS_((void));
+/* 106 */
+EXTERN TkDisplay * TkGetDisplayList _ANSI_ARGS_((void));
+/* 107 */
+EXTERN TkMainInfo * TkGetMainInfoList _ANSI_ARGS_((void));
+/* 108 */
+EXTERN int TkGetWindowFromObj _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr,
+ Tk_Window * windowPtr));
+/* 109 */
+EXTERN char * TkpGetString _ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr, Tcl_DString * dsPtr));
+/* 110 */
+EXTERN void TkpGetSubFonts _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Font tkfont));
+/* 111 */
+EXTERN Tcl_Obj * TkpGetSystemDefault _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * dbName, CONST char * className));
+/* 112 */
+EXTERN void TkpMenuThreadInit _ANSI_ARGS_((void));
+#ifdef __WIN32__
+/* 113 */
+EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn,
+ XRectangle* rect_return));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 113 */
+EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn,
+ XRectangle* rect_return));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 113 */
+EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn,
+ XRectangle* rect_return));
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+/* 114 */
+EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 114 */
+EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 114 */
+EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void));
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+/* 115 */
+EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 115 */
+EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 115 */
+EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn));
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+/* 116 */
+EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 116 */
+EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 116 */
+EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return));
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+/* 117 */
+EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn, int x,
+ int y, unsigned int width,
+ unsigned int height));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 117 */
+EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn, int x,
+ int y, unsigned int width,
+ unsigned int height));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 117 */
+EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn, int x,
+ int y, unsigned int width,
+ unsigned int height));
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+/* 118 */
+EXTERN void TkSetRegion _ANSI_ARGS_((Display* display, GC gc,
+ TkRegion rgn));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 118 */
+EXTERN void TkSetRegion _ANSI_ARGS_((Display* display, GC gc,
+ TkRegion rgn));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 118 */
+EXTERN void TkSetRegion _ANSI_ARGS_((Display* display, GC gc,
+ TkRegion rgn));
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+/* 119 */
+EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle* rect,
+ TkRegion src, TkRegion dr_return));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 119 */
+EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle* rect,
+ TkRegion src, TkRegion dr_return));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 119 */
+EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle* rect,
+ TkRegion src, TkRegion dr_return));
+#endif /* MAC_OSX_TK */
+/* Slot 120 is reserved */
+#ifdef MAC_TCL
+/* 121 */
+EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display * display,
+ CONST char * source));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 121 */
+EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display * display,
+ CONST char * source));
+#endif /* MAC_OSX_TK */
+#ifdef MAC_TCL
+/* 122 */
+EXTERN void TkpDefineNativeBitmaps _ANSI_ARGS_((void));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 122 */
+EXTERN void TkpDefineNativeBitmaps _ANSI_ARGS_((void));
+#endif /* MAC_OSX_TK */
+/* Slot 123 is reserved */
+#ifdef MAC_TCL
+/* 124 */
+EXTERN Pixmap TkpGetNativeAppBitmap _ANSI_ARGS_((Display * display,
+ CONST char * name, int * width, int * height));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 124 */
+EXTERN Pixmap TkpGetNativeAppBitmap _ANSI_ARGS_((Display * display,
+ CONST char * name, int * width, int * height));
+#endif /* MAC_OSX_TK */
+/* Slot 125 is reserved */
+/* Slot 126 is reserved */
+/* Slot 127 is reserved */
+/* Slot 128 is reserved */
+/* Slot 129 is reserved */
+/* Slot 130 is reserved */
+/* Slot 131 is reserved */
+/* Slot 132 is reserved */
+/* Slot 133 is reserved */
+/* Slot 134 is reserved */
+/* 135 */
+EXTERN void TkpDrawHighlightBorder _ANSI_ARGS_((Tk_Window tkwin,
+ GC fgGC, GC bgGC, int highlightWidth,
+ Drawable drawable));
+/* 136 */
+EXTERN void TkSetFocusWin _ANSI_ARGS_((TkWindow * winPtr,
+ int force));
+/* 137 */
+EXTERN void TkpSetKeycodeAndState _ANSI_ARGS_((Tk_Window tkwin,
+ KeySym keySym, XEvent * eventPtr));
+/* 138 */
+EXTERN KeySym TkpGetKeySym _ANSI_ARGS_((TkDisplay * dispPtr,
+ XEvent * eventPtr));
+/* 139 */
+EXTERN void TkpInitKeymapInfo _ANSI_ARGS_((TkDisplay * dispPtr));
+/* 140 */
+EXTERN TkRegion TkPhotoGetValidRegion _ANSI_ARGS_((
+ Tk_PhotoHandle handle));
+/* 141 */
+EXTERN TkWindow ** TkWmStackorderToplevel _ANSI_ARGS_((
+ TkWindow * parentPtr));
+/* 142 */
+EXTERN void TkFocusFree _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 143 */
+EXTERN void TkClipCleanup _ANSI_ARGS_((TkDisplay * dispPtr));
+/* 144 */
+EXTERN void TkGCCleanup _ANSI_ARGS_((TkDisplay * dispPtr));
+#ifdef __WIN32__
+/* 145 */
+EXTERN void TkSubtractRegion _ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 145 */
+EXTERN void TkSubtractRegion _ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 145 */
+EXTERN void TkSubtractRegion _ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return));
+#endif /* MAC_OSX_TK */
+/* 146 */
+EXTERN void TkStylePkgInit _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 147 */
+EXTERN void TkStylePkgFree _ANSI_ARGS_((TkMainInfo * mainPtr));
+/* 148 */
+EXTERN Tk_Window TkToplevelWindowForCommand _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * cmdName));
+/* 149 */
+EXTERN CONST Tk_OptionSpec * TkGetOptionSpec _ANSI_ARGS_((CONST char * name,
+ Tk_OptionTable optionTable));
+
+typedef struct TkIntStubs {
+ int magic;
+ struct TkIntStubHooks *hooks;
+
+ TkWindow * (*tkAllocWindow) _ANSI_ARGS_((TkDisplay * dispPtr, int screenNum, TkWindow * parentPtr)); /* 0 */
+ void (*tkBezierPoints) _ANSI_ARGS_((double control[], int numSteps, double * coordPtr)); /* 1 */
+ void (*tkBezierScreenPoints) _ANSI_ARGS_((Tk_Canvas canvas, double control[], int numSteps, XPoint * xPointPtr)); /* 2 */
+ void (*tkBindDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 3 */
+ void (*tkBindEventProc) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr)); /* 4 */
+ void (*tkBindFree) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 5 */
+ void (*tkBindInit) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 6 */
+ void (*tkChangeEventWindow) _ANSI_ARGS_((XEvent * eventPtr, TkWindow * winPtr)); /* 7 */
+ int (*tkClipInit) _ANSI_ARGS_((Tcl_Interp * interp, TkDisplay * dispPtr)); /* 8 */
+ void (*tkComputeAnchor) _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, int padX, int padY, int innerWidth, int innerHeight, int * xPtr, int * yPtr)); /* 9 */
+ int (*tkCopyAndGlobalEval) _ANSI_ARGS_((Tcl_Interp * interp, char * script)); /* 10 */
+ unsigned long (*tkCreateBindingProcedure) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventString, TkBindEvalProc * evalProc, TkBindFreeProc * freeProc, ClientData clientData)); /* 11 */
+ TkCursor * (*tkCreateCursorFromData) _ANSI_ARGS_((Tk_Window tkwin, CONST char * source, CONST char * mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg)); /* 12 */
+ int (*tkCreateFrame) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv, int toplevel, char * appName)); /* 13 */
+ Tk_Window (*tkCreateMainWindow) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * screenName, char * baseName)); /* 14 */
+ Time (*tkCurrentTime) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 15 */
+ void (*tkDeleteAllImages) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 16 */
+ void (*tkDoConfigureNotify) _ANSI_ARGS_((TkWindow * winPtr)); /* 17 */
+ void (*tkDrawInsetFocusHighlight) _ANSI_ARGS_((Tk_Window tkwin, GC gc, int width, Drawable drawable, int padding)); /* 18 */
+ void (*tkEventDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 19 */
+ void (*tkFillPolygon) _ANSI_ARGS_((Tk_Canvas canvas, double * coordPtr, int numPoints, Display * display, Drawable drawable, GC gc, GC outlineGC)); /* 20 */
+ int (*tkFindStateNum) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * option, CONST TkStateMap * mapPtr, CONST char * strKey)); /* 21 */
+ char * (*tkFindStateString) _ANSI_ARGS_((CONST TkStateMap * mapPtr, int numKey)); /* 22 */
+ void (*tkFocusDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 23 */
+ int (*tkFocusFilterEvent) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr)); /* 24 */
+ TkWindow * (*tkFocusKeyEvent) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr)); /* 25 */
+ void (*tkFontPkgInit) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 26 */
+ void (*tkFontPkgFree) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 27 */
+ void (*tkFreeBindingTags) _ANSI_ARGS_((TkWindow * winPtr)); /* 28 */
+ void (*tkpFreeCursor) _ANSI_ARGS_((TkCursor * cursorPtr)); /* 29 */
+ char * (*tkGetBitmapData) _ANSI_ARGS_((Tcl_Interp * interp, char * string, char * fileName, int * widthPtr, int * heightPtr, int * hotXPtr, int * hotYPtr)); /* 30 */
+ void (*tkGetButtPoints) _ANSI_ARGS_((double p1[], double p2[], double width, int project, double m1[], double m2[])); /* 31 */
+ TkCursor * (*tkGetCursorByName) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid string)); /* 32 */
+ CONST84_RETURN char * (*tkGetDefaultScreenName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * screenName)); /* 33 */
+ TkDisplay * (*tkGetDisplay) _ANSI_ARGS_((Display * display)); /* 34 */
+ int (*tkGetDisplayOf) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], Tk_Window * tkwinPtr)); /* 35 */
+ TkWindow * (*tkGetFocusWin) _ANSI_ARGS_((TkWindow * winPtr)); /* 36 */
+ int (*tkGetInterpNames) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin)); /* 37 */
+ int (*tkGetMiterPoints) _ANSI_ARGS_((double p1[], double p2[], double p3[], double width, double m1[], double m2[])); /* 38 */
+ void (*tkGetPointerCoords) _ANSI_ARGS_((Tk_Window tkwin, int * xPtr, int * yPtr)); /* 39 */
+ void (*tkGetServerInfo) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin)); /* 40 */
+ void (*tkGrabDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 41 */
+ int (*tkGrabState) _ANSI_ARGS_((TkWindow * winPtr)); /* 42 */
+ void (*tkIncludePoint) _ANSI_ARGS_((Tk_Item * itemPtr, double * pointPtr)); /* 43 */
+ void (*tkInOutEvents) _ANSI_ARGS_((XEvent * eventPtr, TkWindow * sourcePtr, TkWindow * destPtr, int leaveType, int enterType, Tcl_QueuePosition position)); /* 44 */
+ void (*tkInstallFrameMenu) _ANSI_ARGS_((Tk_Window tkwin)); /* 45 */
+ char * (*tkKeysymToString) _ANSI_ARGS_((KeySym keysym)); /* 46 */
+ int (*tkLineToArea) _ANSI_ARGS_((double end1Ptr[], double end2Ptr[], double rectPtr[])); /* 47 */
+ double (*tkLineToPoint) _ANSI_ARGS_((double end1Ptr[], double end2Ptr[], double pointPtr[])); /* 48 */
+ int (*tkMakeBezierCurve) _ANSI_ARGS_((Tk_Canvas canvas, double * pointPtr, int numPoints, int numSteps, XPoint xPoints[], double dblPoints[])); /* 49 */
+ void (*tkMakeBezierPostscript) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, double * pointPtr, int numPoints)); /* 50 */
+ void (*tkOptionClassChanged) _ANSI_ARGS_((TkWindow * winPtr)); /* 51 */
+ void (*tkOptionDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 52 */
+ int (*tkOvalToArea) _ANSI_ARGS_((double * ovalPtr, double * rectPtr)); /* 53 */
+ double (*tkOvalToPoint) _ANSI_ARGS_((double ovalPtr[], double width, int filled, double pointPtr[])); /* 54 */
+ int (*tkpChangeFocus) _ANSI_ARGS_((TkWindow * winPtr, int force)); /* 55 */
+ void (*tkpCloseDisplay) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 56 */
+ void (*tkpClaimFocus) _ANSI_ARGS_((TkWindow * topLevelPtr, int force)); /* 57 */
+ void (*tkpDisplayWarning) _ANSI_ARGS_((CONST char * msg, CONST char * title)); /* 58 */
+ void (*tkpGetAppName) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * name)); /* 59 */
+ TkWindow * (*tkpGetOtherWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 60 */
+ TkWindow * (*tkpGetWrapperWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 61 */
+ int (*tkpInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 62 */
+ void (*tkpInitializeMenuBindings) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable)); /* 63 */
+ void (*tkpMakeContainer) _ANSI_ARGS_((Tk_Window tkwin)); /* 64 */
+ void (*tkpMakeMenuWindow) _ANSI_ARGS_((Tk_Window tkwin, int transient)); /* 65 */
+ Window (*tkpMakeWindow) _ANSI_ARGS_((TkWindow * winPtr, Window parent)); /* 66 */
+ void (*tkpMenuNotifyToplevelCreate) _ANSI_ARGS_((Tcl_Interp * interp1, char * menuName)); /* 67 */
+ TkDisplay * (*tkpOpenDisplay) _ANSI_ARGS_((CONST char * display_name)); /* 68 */
+ int (*tkPointerEvent) _ANSI_ARGS_((XEvent * eventPtr, TkWindow * winPtr)); /* 69 */
+ int (*tkPolygonToArea) _ANSI_ARGS_((double * polyPtr, int numPoints, double * rectPtr)); /* 70 */
+ double (*tkPolygonToPoint) _ANSI_ARGS_((double * polyPtr, int numPoints, double * pointPtr)); /* 71 */
+ int (*tkPositionInTree) _ANSI_ARGS_((TkWindow * winPtr, TkWindow * treePtr)); /* 72 */
+ void (*tkpRedirectKeyEvent) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr)); /* 73 */
+ void (*tkpSetMainMenubar) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * menuName)); /* 74 */
+ int (*tkpUseWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * string)); /* 75 */
+ int (*tkpWindowWasRecentlyDeleted) _ANSI_ARGS_((Window win, TkDisplay * dispPtr)); /* 76 */
+ void (*tkQueueEventForAllChildren) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr)); /* 77 */
+ int (*tkReadBitmapFile) _ANSI_ARGS_((Display* display, Drawable d, CONST char* filename, unsigned int* width_return, unsigned int* height_return, Pixmap* bitmap_return, int* x_hot_return, int* y_hot_return)); /* 78 */
+ int (*tkScrollWindow) _ANSI_ARGS_((Tk_Window tkwin, GC gc, int x, int y, int width, int height, int dx, int dy, TkRegion damageRgn)); /* 79 */
+ void (*tkSelDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 80 */
+ void (*tkSelEventProc) _ANSI_ARGS_((Tk_Window tkwin, XEvent * eventPtr)); /* 81 */
+ void (*tkSelInit) _ANSI_ARGS_((Tk_Window tkwin)); /* 82 */
+ void (*tkSelPropProc) _ANSI_ARGS_((XEvent * eventPtr)); /* 83 */
+ void *reserved84;
+ void (*tkSetWindowMenuBar) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * oldMenuName, char * menuName)); /* 85 */
+ KeySym (*tkStringToKeysym) _ANSI_ARGS_((char * name)); /* 86 */
+ int (*tkThickPolyLineToArea) _ANSI_ARGS_((double * coordPtr, int numPoints, double width, int capStyle, int joinStyle, double * rectPtr)); /* 87 */
+ void (*tkWmAddToColormapWindows) _ANSI_ARGS_((TkWindow * winPtr)); /* 88 */
+ void (*tkWmDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 89 */
+ TkWindow * (*tkWmFocusToplevel) _ANSI_ARGS_((TkWindow * winPtr)); /* 90 */
+ void (*tkWmMapWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 91 */
+ void (*tkWmNewWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 92 */
+ void (*tkWmProtocolEventProc) _ANSI_ARGS_((TkWindow * winPtr, XEvent * evenvPtr)); /* 93 */
+ void (*tkWmRemoveFromColormapWindows) _ANSI_ARGS_((TkWindow * winPtr)); /* 94 */
+ void (*tkWmRestackToplevel) _ANSI_ARGS_((TkWindow * winPtr, int aboveBelow, TkWindow * otherPtr)); /* 95 */
+ void (*tkWmSetClass) _ANSI_ARGS_((TkWindow * winPtr)); /* 96 */
+ void (*tkWmUnmapWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 97 */
+ Tcl_Obj * (*tkDebugBitmap) _ANSI_ARGS_((Tk_Window tkwin, char * name)); /* 98 */
+ Tcl_Obj * (*tkDebugBorder) _ANSI_ARGS_((Tk_Window tkwin, char * name)); /* 99 */
+ Tcl_Obj * (*tkDebugCursor) _ANSI_ARGS_((Tk_Window tkwin, char * name)); /* 100 */
+ Tcl_Obj * (*tkDebugColor) _ANSI_ARGS_((Tk_Window tkwin, char * name)); /* 101 */
+ Tcl_Obj * (*tkDebugConfig) _ANSI_ARGS_((Tcl_Interp * interp, Tk_OptionTable table)); /* 102 */
+ Tcl_Obj * (*tkDebugFont) _ANSI_ARGS_((Tk_Window tkwin, char * name)); /* 103 */
+ int (*tkFindStateNumObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * optionPtr, CONST TkStateMap * mapPtr, Tcl_Obj * keyPtr)); /* 104 */
+ Tcl_HashTable * (*tkGetBitmapPredefTable) _ANSI_ARGS_((void)); /* 105 */
+ TkDisplay * (*tkGetDisplayList) _ANSI_ARGS_((void)); /* 106 */
+ TkMainInfo * (*tkGetMainInfoList) _ANSI_ARGS_((void)); /* 107 */
+ int (*tkGetWindowFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr, Tk_Window * windowPtr)); /* 108 */
+ char * (*tkpGetString) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr, Tcl_DString * dsPtr)); /* 109 */
+ void (*tkpGetSubFonts) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Font tkfont)); /* 110 */
+ Tcl_Obj * (*tkpGetSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, CONST char * dbName, CONST char * className)); /* 111 */
+ void (*tkpMenuThreadInit) _ANSI_ARGS_((void)); /* 112 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved113;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tkClipBox) _ANSI_ARGS_((TkRegion rgn, XRectangle* rect_return)); /* 113 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkClipBox) _ANSI_ARGS_((TkRegion rgn, XRectangle* rect_return)); /* 113 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkClipBox) _ANSI_ARGS_((TkRegion rgn, XRectangle* rect_return)); /* 113 */
+#endif /* MAC_OSX_TK */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved114;
+#endif /* UNIX */
+#ifdef __WIN32__
+ TkRegion (*tkCreateRegion) _ANSI_ARGS_((void)); /* 114 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ TkRegion (*tkCreateRegion) _ANSI_ARGS_((void)); /* 114 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ TkRegion (*tkCreateRegion) _ANSI_ARGS_((void)); /* 114 */
+#endif /* MAC_OSX_TK */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved115;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tkDestroyRegion) _ANSI_ARGS_((TkRegion rgn)); /* 115 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkDestroyRegion) _ANSI_ARGS_((TkRegion rgn)); /* 115 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkDestroyRegion) _ANSI_ARGS_((TkRegion rgn)); /* 115 */
+#endif /* MAC_OSX_TK */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved116;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tkIntersectRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 116 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkIntersectRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 116 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkIntersectRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 116 */
+#endif /* MAC_OSX_TK */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved117;
+#endif /* UNIX */
+#ifdef __WIN32__
+ int (*tkRectInRegion) _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); /* 117 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ int (*tkRectInRegion) _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); /* 117 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ int (*tkRectInRegion) _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); /* 117 */
+#endif /* MAC_OSX_TK */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved118;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tkSetRegion) _ANSI_ARGS_((Display* display, GC gc, TkRegion rgn)); /* 118 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkSetRegion) _ANSI_ARGS_((Display* display, GC gc, TkRegion rgn)); /* 118 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkSetRegion) _ANSI_ARGS_((Display* display, GC gc, TkRegion rgn)); /* 118 */
+#endif /* MAC_OSX_TK */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved119;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tkUnionRectWithRegion) _ANSI_ARGS_((XRectangle* rect, TkRegion src, TkRegion dr_return)); /* 119 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkUnionRectWithRegion) _ANSI_ARGS_((XRectangle* rect, TkRegion src, TkRegion dr_return)); /* 119 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkUnionRectWithRegion) _ANSI_ARGS_((XRectangle* rect, TkRegion src, TkRegion dr_return)); /* 119 */
+#endif /* MAC_OSX_TK */
+ void *reserved120;
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved121;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void *reserved121;
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display * display, CONST char * source)); /* 121 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display * display, CONST char * source)); /* 121 */
+#endif /* MAC_OSX_TK */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved122;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void *reserved122;
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkpDefineNativeBitmaps) _ANSI_ARGS_((void)); /* 122 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkpDefineNativeBitmaps) _ANSI_ARGS_((void)); /* 122 */
+#endif /* MAC_OSX_TK */
+ void *reserved123;
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved124;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void *reserved124;
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ Pixmap (*tkpGetNativeAppBitmap) _ANSI_ARGS_((Display * display, CONST char * name, int * width, int * height)); /* 124 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ Pixmap (*tkpGetNativeAppBitmap) _ANSI_ARGS_((Display * display, CONST char * name, int * width, int * height)); /* 124 */
+#endif /* MAC_OSX_TK */
+ void *reserved125;
+ void *reserved126;
+ void *reserved127;
+ void *reserved128;
+ void *reserved129;
+ void *reserved130;
+ void *reserved131;
+ void *reserved132;
+ void *reserved133;
+ void *reserved134;
+ void (*tkpDrawHighlightBorder) _ANSI_ARGS_((Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable)); /* 135 */
+ void (*tkSetFocusWin) _ANSI_ARGS_((TkWindow * winPtr, int force)); /* 136 */
+ void (*tkpSetKeycodeAndState) _ANSI_ARGS_((Tk_Window tkwin, KeySym keySym, XEvent * eventPtr)); /* 137 */
+ KeySym (*tkpGetKeySym) _ANSI_ARGS_((TkDisplay * dispPtr, XEvent * eventPtr)); /* 138 */
+ void (*tkpInitKeymapInfo) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 139 */
+ TkRegion (*tkPhotoGetValidRegion) _ANSI_ARGS_((Tk_PhotoHandle handle)); /* 140 */
+ TkWindow ** (*tkWmStackorderToplevel) _ANSI_ARGS_((TkWindow * parentPtr)); /* 141 */
+ void (*tkFocusFree) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 142 */
+ void (*tkClipCleanup) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 143 */
+ void (*tkGCCleanup) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 144 */
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+ void *reserved145;
+#endif /* UNIX */
+#ifdef __WIN32__
+ void (*tkSubtractRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 145 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkSubtractRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 145 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkSubtractRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 145 */
+#endif /* MAC_OSX_TK */
+ void (*tkStylePkgInit) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 146 */
+ void (*tkStylePkgFree) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 147 */
+ Tk_Window (*tkToplevelWindowForCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName)); /* 148 */
+ CONST Tk_OptionSpec * (*tkGetOptionSpec) _ANSI_ARGS_((CONST char * name, Tk_OptionTable optionTable)); /* 149 */
+} TkIntStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TkIntStubs *tkIntStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifndef TkAllocWindow
+#define TkAllocWindow \
+ (tkIntStubsPtr->tkAllocWindow) /* 0 */
+#endif
+#ifndef TkBezierPoints
+#define TkBezierPoints \
+ (tkIntStubsPtr->tkBezierPoints) /* 1 */
+#endif
+#ifndef TkBezierScreenPoints
+#define TkBezierScreenPoints \
+ (tkIntStubsPtr->tkBezierScreenPoints) /* 2 */
+#endif
+#ifndef TkBindDeadWindow
+#define TkBindDeadWindow \
+ (tkIntStubsPtr->tkBindDeadWindow) /* 3 */
+#endif
+#ifndef TkBindEventProc
+#define TkBindEventProc \
+ (tkIntStubsPtr->tkBindEventProc) /* 4 */
+#endif
+#ifndef TkBindFree
+#define TkBindFree \
+ (tkIntStubsPtr->tkBindFree) /* 5 */
+#endif
+#ifndef TkBindInit
+#define TkBindInit \
+ (tkIntStubsPtr->tkBindInit) /* 6 */
+#endif
+#ifndef TkChangeEventWindow
+#define TkChangeEventWindow \
+ (tkIntStubsPtr->tkChangeEventWindow) /* 7 */
+#endif
+#ifndef TkClipInit
+#define TkClipInit \
+ (tkIntStubsPtr->tkClipInit) /* 8 */
+#endif
+#ifndef TkComputeAnchor
+#define TkComputeAnchor \
+ (tkIntStubsPtr->tkComputeAnchor) /* 9 */
+#endif
+#ifndef TkCopyAndGlobalEval
+#define TkCopyAndGlobalEval \
+ (tkIntStubsPtr->tkCopyAndGlobalEval) /* 10 */
+#endif
+#ifndef TkCreateBindingProcedure
+#define TkCreateBindingProcedure \
+ (tkIntStubsPtr->tkCreateBindingProcedure) /* 11 */
+#endif
+#ifndef TkCreateCursorFromData
+#define TkCreateCursorFromData \
+ (tkIntStubsPtr->tkCreateCursorFromData) /* 12 */
+#endif
+#ifndef TkCreateFrame
+#define TkCreateFrame \
+ (tkIntStubsPtr->tkCreateFrame) /* 13 */
+#endif
+#ifndef TkCreateMainWindow
+#define TkCreateMainWindow \
+ (tkIntStubsPtr->tkCreateMainWindow) /* 14 */
+#endif
+#ifndef TkCurrentTime
+#define TkCurrentTime \
+ (tkIntStubsPtr->tkCurrentTime) /* 15 */
+#endif
+#ifndef TkDeleteAllImages
+#define TkDeleteAllImages \
+ (tkIntStubsPtr->tkDeleteAllImages) /* 16 */
+#endif
+#ifndef TkDoConfigureNotify
+#define TkDoConfigureNotify \
+ (tkIntStubsPtr->tkDoConfigureNotify) /* 17 */
+#endif
+#ifndef TkDrawInsetFocusHighlight
+#define TkDrawInsetFocusHighlight \
+ (tkIntStubsPtr->tkDrawInsetFocusHighlight) /* 18 */
+#endif
+#ifndef TkEventDeadWindow
+#define TkEventDeadWindow \
+ (tkIntStubsPtr->tkEventDeadWindow) /* 19 */
+#endif
+#ifndef TkFillPolygon
+#define TkFillPolygon \
+ (tkIntStubsPtr->tkFillPolygon) /* 20 */
+#endif
+#ifndef TkFindStateNum
+#define TkFindStateNum \
+ (tkIntStubsPtr->tkFindStateNum) /* 21 */
+#endif
+#ifndef TkFindStateString
+#define TkFindStateString \
+ (tkIntStubsPtr->tkFindStateString) /* 22 */
+#endif
+#ifndef TkFocusDeadWindow
+#define TkFocusDeadWindow \
+ (tkIntStubsPtr->tkFocusDeadWindow) /* 23 */
+#endif
+#ifndef TkFocusFilterEvent
+#define TkFocusFilterEvent \
+ (tkIntStubsPtr->tkFocusFilterEvent) /* 24 */
+#endif
+#ifndef TkFocusKeyEvent
+#define TkFocusKeyEvent \
+ (tkIntStubsPtr->tkFocusKeyEvent) /* 25 */
+#endif
+#ifndef TkFontPkgInit
+#define TkFontPkgInit \
+ (tkIntStubsPtr->tkFontPkgInit) /* 26 */
+#endif
+#ifndef TkFontPkgFree
+#define TkFontPkgFree \
+ (tkIntStubsPtr->tkFontPkgFree) /* 27 */
+#endif
+#ifndef TkFreeBindingTags
+#define TkFreeBindingTags \
+ (tkIntStubsPtr->tkFreeBindingTags) /* 28 */
+#endif
+#ifndef TkpFreeCursor
+#define TkpFreeCursor \
+ (tkIntStubsPtr->tkpFreeCursor) /* 29 */
+#endif
+#ifndef TkGetBitmapData
+#define TkGetBitmapData \
+ (tkIntStubsPtr->tkGetBitmapData) /* 30 */
+#endif
+#ifndef TkGetButtPoints
+#define TkGetButtPoints \
+ (tkIntStubsPtr->tkGetButtPoints) /* 31 */
+#endif
+#ifndef TkGetCursorByName
+#define TkGetCursorByName \
+ (tkIntStubsPtr->tkGetCursorByName) /* 32 */
+#endif
+#ifndef TkGetDefaultScreenName
+#define TkGetDefaultScreenName \
+ (tkIntStubsPtr->tkGetDefaultScreenName) /* 33 */
+#endif
+#ifndef TkGetDisplay
+#define TkGetDisplay \
+ (tkIntStubsPtr->tkGetDisplay) /* 34 */
+#endif
+#ifndef TkGetDisplayOf
+#define TkGetDisplayOf \
+ (tkIntStubsPtr->tkGetDisplayOf) /* 35 */
+#endif
+#ifndef TkGetFocusWin
+#define TkGetFocusWin \
+ (tkIntStubsPtr->tkGetFocusWin) /* 36 */
+#endif
+#ifndef TkGetInterpNames
+#define TkGetInterpNames \
+ (tkIntStubsPtr->tkGetInterpNames) /* 37 */
+#endif
+#ifndef TkGetMiterPoints
+#define TkGetMiterPoints \
+ (tkIntStubsPtr->tkGetMiterPoints) /* 38 */
+#endif
+#ifndef TkGetPointerCoords
+#define TkGetPointerCoords \
+ (tkIntStubsPtr->tkGetPointerCoords) /* 39 */
+#endif
+#ifndef TkGetServerInfo
+#define TkGetServerInfo \
+ (tkIntStubsPtr->tkGetServerInfo) /* 40 */
+#endif
+#ifndef TkGrabDeadWindow
+#define TkGrabDeadWindow \
+ (tkIntStubsPtr->tkGrabDeadWindow) /* 41 */
+#endif
+#ifndef TkGrabState
+#define TkGrabState \
+ (tkIntStubsPtr->tkGrabState) /* 42 */
+#endif
+#ifndef TkIncludePoint
+#define TkIncludePoint \
+ (tkIntStubsPtr->tkIncludePoint) /* 43 */
+#endif
+#ifndef TkInOutEvents
+#define TkInOutEvents \
+ (tkIntStubsPtr->tkInOutEvents) /* 44 */
+#endif
+#ifndef TkInstallFrameMenu
+#define TkInstallFrameMenu \
+ (tkIntStubsPtr->tkInstallFrameMenu) /* 45 */
+#endif
+#ifndef TkKeysymToString
+#define TkKeysymToString \
+ (tkIntStubsPtr->tkKeysymToString) /* 46 */
+#endif
+#ifndef TkLineToArea
+#define TkLineToArea \
+ (tkIntStubsPtr->tkLineToArea) /* 47 */
+#endif
+#ifndef TkLineToPoint
+#define TkLineToPoint \
+ (tkIntStubsPtr->tkLineToPoint) /* 48 */
+#endif
+#ifndef TkMakeBezierCurve
+#define TkMakeBezierCurve \
+ (tkIntStubsPtr->tkMakeBezierCurve) /* 49 */
+#endif
+#ifndef TkMakeBezierPostscript
+#define TkMakeBezierPostscript \
+ (tkIntStubsPtr->tkMakeBezierPostscript) /* 50 */
+#endif
+#ifndef TkOptionClassChanged
+#define TkOptionClassChanged \
+ (tkIntStubsPtr->tkOptionClassChanged) /* 51 */
+#endif
+#ifndef TkOptionDeadWindow
+#define TkOptionDeadWindow \
+ (tkIntStubsPtr->tkOptionDeadWindow) /* 52 */
+#endif
+#ifndef TkOvalToArea
+#define TkOvalToArea \
+ (tkIntStubsPtr->tkOvalToArea) /* 53 */
+#endif
+#ifndef TkOvalToPoint
+#define TkOvalToPoint \
+ (tkIntStubsPtr->tkOvalToPoint) /* 54 */
+#endif
+#ifndef TkpChangeFocus
+#define TkpChangeFocus \
+ (tkIntStubsPtr->tkpChangeFocus) /* 55 */
+#endif
+#ifndef TkpCloseDisplay
+#define TkpCloseDisplay \
+ (tkIntStubsPtr->tkpCloseDisplay) /* 56 */
+#endif
+#ifndef TkpClaimFocus
+#define TkpClaimFocus \
+ (tkIntStubsPtr->tkpClaimFocus) /* 57 */
+#endif
+#ifndef TkpDisplayWarning
+#define TkpDisplayWarning \
+ (tkIntStubsPtr->tkpDisplayWarning) /* 58 */
+#endif
+#ifndef TkpGetAppName
+#define TkpGetAppName \
+ (tkIntStubsPtr->tkpGetAppName) /* 59 */
+#endif
+#ifndef TkpGetOtherWindow
+#define TkpGetOtherWindow \
+ (tkIntStubsPtr->tkpGetOtherWindow) /* 60 */
+#endif
+#ifndef TkpGetWrapperWindow
+#define TkpGetWrapperWindow \
+ (tkIntStubsPtr->tkpGetWrapperWindow) /* 61 */
+#endif
+#ifndef TkpInit
+#define TkpInit \
+ (tkIntStubsPtr->tkpInit) /* 62 */
+#endif
+#ifndef TkpInitializeMenuBindings
+#define TkpInitializeMenuBindings \
+ (tkIntStubsPtr->tkpInitializeMenuBindings) /* 63 */
+#endif
+#ifndef TkpMakeContainer
+#define TkpMakeContainer \
+ (tkIntStubsPtr->tkpMakeContainer) /* 64 */
+#endif
+#ifndef TkpMakeMenuWindow
+#define TkpMakeMenuWindow \
+ (tkIntStubsPtr->tkpMakeMenuWindow) /* 65 */
+#endif
+#ifndef TkpMakeWindow
+#define TkpMakeWindow \
+ (tkIntStubsPtr->tkpMakeWindow) /* 66 */
+#endif
+#ifndef TkpMenuNotifyToplevelCreate
+#define TkpMenuNotifyToplevelCreate \
+ (tkIntStubsPtr->tkpMenuNotifyToplevelCreate) /* 67 */
+#endif
+#ifndef TkpOpenDisplay
+#define TkpOpenDisplay \
+ (tkIntStubsPtr->tkpOpenDisplay) /* 68 */
+#endif
+#ifndef TkPointerEvent
+#define TkPointerEvent \
+ (tkIntStubsPtr->tkPointerEvent) /* 69 */
+#endif
+#ifndef TkPolygonToArea
+#define TkPolygonToArea \
+ (tkIntStubsPtr->tkPolygonToArea) /* 70 */
+#endif
+#ifndef TkPolygonToPoint
+#define TkPolygonToPoint \
+ (tkIntStubsPtr->tkPolygonToPoint) /* 71 */
+#endif
+#ifndef TkPositionInTree
+#define TkPositionInTree \
+ (tkIntStubsPtr->tkPositionInTree) /* 72 */
+#endif
+#ifndef TkpRedirectKeyEvent
+#define TkpRedirectKeyEvent \
+ (tkIntStubsPtr->tkpRedirectKeyEvent) /* 73 */
+#endif
+#ifndef TkpSetMainMenubar
+#define TkpSetMainMenubar \
+ (tkIntStubsPtr->tkpSetMainMenubar) /* 74 */
+#endif
+#ifndef TkpUseWindow
+#define TkpUseWindow \
+ (tkIntStubsPtr->tkpUseWindow) /* 75 */
+#endif
+#ifndef TkpWindowWasRecentlyDeleted
+#define TkpWindowWasRecentlyDeleted \
+ (tkIntStubsPtr->tkpWindowWasRecentlyDeleted) /* 76 */
+#endif
+#ifndef TkQueueEventForAllChildren
+#define TkQueueEventForAllChildren \
+ (tkIntStubsPtr->tkQueueEventForAllChildren) /* 77 */
+#endif
+#ifndef TkReadBitmapFile
+#define TkReadBitmapFile \
+ (tkIntStubsPtr->tkReadBitmapFile) /* 78 */
+#endif
+#ifndef TkScrollWindow
+#define TkScrollWindow \
+ (tkIntStubsPtr->tkScrollWindow) /* 79 */
+#endif
+#ifndef TkSelDeadWindow
+#define TkSelDeadWindow \
+ (tkIntStubsPtr->tkSelDeadWindow) /* 80 */
+#endif
+#ifndef TkSelEventProc
+#define TkSelEventProc \
+ (tkIntStubsPtr->tkSelEventProc) /* 81 */
+#endif
+#ifndef TkSelInit
+#define TkSelInit \
+ (tkIntStubsPtr->tkSelInit) /* 82 */
+#endif
+#ifndef TkSelPropProc
+#define TkSelPropProc \
+ (tkIntStubsPtr->tkSelPropProc) /* 83 */
+#endif
+/* Slot 84 is reserved */
+#ifndef TkSetWindowMenuBar
+#define TkSetWindowMenuBar \
+ (tkIntStubsPtr->tkSetWindowMenuBar) /* 85 */
+#endif
+#ifndef TkStringToKeysym
+#define TkStringToKeysym \
+ (tkIntStubsPtr->tkStringToKeysym) /* 86 */
+#endif
+#ifndef TkThickPolyLineToArea
+#define TkThickPolyLineToArea \
+ (tkIntStubsPtr->tkThickPolyLineToArea) /* 87 */
+#endif
+#ifndef TkWmAddToColormapWindows
+#define TkWmAddToColormapWindows \
+ (tkIntStubsPtr->tkWmAddToColormapWindows) /* 88 */
+#endif
+#ifndef TkWmDeadWindow
+#define TkWmDeadWindow \
+ (tkIntStubsPtr->tkWmDeadWindow) /* 89 */
+#endif
+#ifndef TkWmFocusToplevel
+#define TkWmFocusToplevel \
+ (tkIntStubsPtr->tkWmFocusToplevel) /* 90 */
+#endif
+#ifndef TkWmMapWindow
+#define TkWmMapWindow \
+ (tkIntStubsPtr->tkWmMapWindow) /* 91 */
+#endif
+#ifndef TkWmNewWindow
+#define TkWmNewWindow \
+ (tkIntStubsPtr->tkWmNewWindow) /* 92 */
+#endif
+#ifndef TkWmProtocolEventProc
+#define TkWmProtocolEventProc \
+ (tkIntStubsPtr->tkWmProtocolEventProc) /* 93 */
+#endif
+#ifndef TkWmRemoveFromColormapWindows
+#define TkWmRemoveFromColormapWindows \
+ (tkIntStubsPtr->tkWmRemoveFromColormapWindows) /* 94 */
+#endif
+#ifndef TkWmRestackToplevel
+#define TkWmRestackToplevel \
+ (tkIntStubsPtr->tkWmRestackToplevel) /* 95 */
+#endif
+#ifndef TkWmSetClass
+#define TkWmSetClass \
+ (tkIntStubsPtr->tkWmSetClass) /* 96 */
+#endif
+#ifndef TkWmUnmapWindow
+#define TkWmUnmapWindow \
+ (tkIntStubsPtr->tkWmUnmapWindow) /* 97 */
+#endif
+#ifndef TkDebugBitmap
+#define TkDebugBitmap \
+ (tkIntStubsPtr->tkDebugBitmap) /* 98 */
+#endif
+#ifndef TkDebugBorder
+#define TkDebugBorder \
+ (tkIntStubsPtr->tkDebugBorder) /* 99 */
+#endif
+#ifndef TkDebugCursor
+#define TkDebugCursor \
+ (tkIntStubsPtr->tkDebugCursor) /* 100 */
+#endif
+#ifndef TkDebugColor
+#define TkDebugColor \
+ (tkIntStubsPtr->tkDebugColor) /* 101 */
+#endif
+#ifndef TkDebugConfig
+#define TkDebugConfig \
+ (tkIntStubsPtr->tkDebugConfig) /* 102 */
+#endif
+#ifndef TkDebugFont
+#define TkDebugFont \
+ (tkIntStubsPtr->tkDebugFont) /* 103 */
+#endif
+#ifndef TkFindStateNumObj
+#define TkFindStateNumObj \
+ (tkIntStubsPtr->tkFindStateNumObj) /* 104 */
+#endif
+#ifndef TkGetBitmapPredefTable
+#define TkGetBitmapPredefTable \
+ (tkIntStubsPtr->tkGetBitmapPredefTable) /* 105 */
+#endif
+#ifndef TkGetDisplayList
+#define TkGetDisplayList \
+ (tkIntStubsPtr->tkGetDisplayList) /* 106 */
+#endif
+#ifndef TkGetMainInfoList
+#define TkGetMainInfoList \
+ (tkIntStubsPtr->tkGetMainInfoList) /* 107 */
+#endif
+#ifndef TkGetWindowFromObj
+#define TkGetWindowFromObj \
+ (tkIntStubsPtr->tkGetWindowFromObj) /* 108 */
+#endif
+#ifndef TkpGetString
+#define TkpGetString \
+ (tkIntStubsPtr->tkpGetString) /* 109 */
+#endif
+#ifndef TkpGetSubFonts
+#define TkpGetSubFonts \
+ (tkIntStubsPtr->tkpGetSubFonts) /* 110 */
+#endif
+#ifndef TkpGetSystemDefault
+#define TkpGetSystemDefault \
+ (tkIntStubsPtr->tkpGetSystemDefault) /* 111 */
+#endif
+#ifndef TkpMenuThreadInit
+#define TkpMenuThreadInit \
+ (tkIntStubsPtr->tkpMenuThreadInit) /* 112 */
+#endif
+#ifdef __WIN32__
+#ifndef TkClipBox
+#define TkClipBox \
+ (tkIntStubsPtr->tkClipBox) /* 113 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkClipBox
+#define TkClipBox \
+ (tkIntStubsPtr->tkClipBox) /* 113 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkClipBox
+#define TkClipBox \
+ (tkIntStubsPtr->tkClipBox) /* 113 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+#ifndef TkCreateRegion
+#define TkCreateRegion \
+ (tkIntStubsPtr->tkCreateRegion) /* 114 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkCreateRegion
+#define TkCreateRegion \
+ (tkIntStubsPtr->tkCreateRegion) /* 114 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkCreateRegion
+#define TkCreateRegion \
+ (tkIntStubsPtr->tkCreateRegion) /* 114 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+#ifndef TkDestroyRegion
+#define TkDestroyRegion \
+ (tkIntStubsPtr->tkDestroyRegion) /* 115 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkDestroyRegion
+#define TkDestroyRegion \
+ (tkIntStubsPtr->tkDestroyRegion) /* 115 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkDestroyRegion
+#define TkDestroyRegion \
+ (tkIntStubsPtr->tkDestroyRegion) /* 115 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+#ifndef TkIntersectRegion
+#define TkIntersectRegion \
+ (tkIntStubsPtr->tkIntersectRegion) /* 116 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkIntersectRegion
+#define TkIntersectRegion \
+ (tkIntStubsPtr->tkIntersectRegion) /* 116 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkIntersectRegion
+#define TkIntersectRegion \
+ (tkIntStubsPtr->tkIntersectRegion) /* 116 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+#ifndef TkRectInRegion
+#define TkRectInRegion \
+ (tkIntStubsPtr->tkRectInRegion) /* 117 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkRectInRegion
+#define TkRectInRegion \
+ (tkIntStubsPtr->tkRectInRegion) /* 117 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkRectInRegion
+#define TkRectInRegion \
+ (tkIntStubsPtr->tkRectInRegion) /* 117 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+#ifndef TkSetRegion
+#define TkSetRegion \
+ (tkIntStubsPtr->tkSetRegion) /* 118 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkSetRegion
+#define TkSetRegion \
+ (tkIntStubsPtr->tkSetRegion) /* 118 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkSetRegion
+#define TkSetRegion \
+ (tkIntStubsPtr->tkSetRegion) /* 118 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifdef __WIN32__
+#ifndef TkUnionRectWithRegion
+#define TkUnionRectWithRegion \
+ (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkUnionRectWithRegion
+#define TkUnionRectWithRegion \
+ (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkUnionRectWithRegion
+#define TkUnionRectWithRegion \
+ (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */
+#endif
+#endif /* MAC_OSX_TK */
+/* Slot 120 is reserved */
+#ifdef MAC_TCL
+#ifndef TkpCreateNativeBitmap
+#define TkpCreateNativeBitmap \
+ (tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkpCreateNativeBitmap
+#define TkpCreateNativeBitmap \
+ (tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifdef MAC_TCL
+#ifndef TkpDefineNativeBitmaps
+#define TkpDefineNativeBitmaps \
+ (tkIntStubsPtr->tkpDefineNativeBitmaps) /* 122 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkpDefineNativeBitmaps
+#define TkpDefineNativeBitmaps \
+ (tkIntStubsPtr->tkpDefineNativeBitmaps) /* 122 */
+#endif
+#endif /* MAC_OSX_TK */
+/* Slot 123 is reserved */
+#ifdef MAC_TCL
+#ifndef TkpGetNativeAppBitmap
+#define TkpGetNativeAppBitmap \
+ (tkIntStubsPtr->tkpGetNativeAppBitmap) /* 124 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkpGetNativeAppBitmap
+#define TkpGetNativeAppBitmap \
+ (tkIntStubsPtr->tkpGetNativeAppBitmap) /* 124 */
+#endif
+#endif /* MAC_OSX_TK */
+/* Slot 125 is reserved */
+/* Slot 126 is reserved */
+/* Slot 127 is reserved */
+/* Slot 128 is reserved */
+/* Slot 129 is reserved */
+/* Slot 130 is reserved */
+/* Slot 131 is reserved */
+/* Slot 132 is reserved */
+/* Slot 133 is reserved */
+/* Slot 134 is reserved */
+#ifndef TkpDrawHighlightBorder
+#define TkpDrawHighlightBorder \
+ (tkIntStubsPtr->tkpDrawHighlightBorder) /* 135 */
+#endif
+#ifndef TkSetFocusWin
+#define TkSetFocusWin \
+ (tkIntStubsPtr->tkSetFocusWin) /* 136 */
+#endif
+#ifndef TkpSetKeycodeAndState
+#define TkpSetKeycodeAndState \
+ (tkIntStubsPtr->tkpSetKeycodeAndState) /* 137 */
+#endif
+#ifndef TkpGetKeySym
+#define TkpGetKeySym \
+ (tkIntStubsPtr->tkpGetKeySym) /* 138 */
+#endif
+#ifndef TkpInitKeymapInfo
+#define TkpInitKeymapInfo \
+ (tkIntStubsPtr->tkpInitKeymapInfo) /* 139 */
+#endif
+#ifndef TkPhotoGetValidRegion
+#define TkPhotoGetValidRegion \
+ (tkIntStubsPtr->tkPhotoGetValidRegion) /* 140 */
+#endif
+#ifndef TkWmStackorderToplevel
+#define TkWmStackorderToplevel \
+ (tkIntStubsPtr->tkWmStackorderToplevel) /* 141 */
+#endif
+#ifndef TkFocusFree
+#define TkFocusFree \
+ (tkIntStubsPtr->tkFocusFree) /* 142 */
+#endif
+#ifndef TkClipCleanup
+#define TkClipCleanup \
+ (tkIntStubsPtr->tkClipCleanup) /* 143 */
+#endif
+#ifndef TkGCCleanup
+#define TkGCCleanup \
+ (tkIntStubsPtr->tkGCCleanup) /* 144 */
+#endif
+#ifdef __WIN32__
+#ifndef TkSubtractRegion
+#define TkSubtractRegion \
+ (tkIntStubsPtr->tkSubtractRegion) /* 145 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkSubtractRegion
+#define TkSubtractRegion \
+ (tkIntStubsPtr->tkSubtractRegion) /* 145 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkSubtractRegion
+#define TkSubtractRegion \
+ (tkIntStubsPtr->tkSubtractRegion) /* 145 */
+#endif
+#endif /* MAC_OSX_TK */
+#ifndef TkStylePkgInit
+#define TkStylePkgInit \
+ (tkIntStubsPtr->tkStylePkgInit) /* 146 */
+#endif
+#ifndef TkStylePkgFree
+#define TkStylePkgFree \
+ (tkIntStubsPtr->tkStylePkgFree) /* 147 */
+#endif
+#ifndef TkToplevelWindowForCommand
+#define TkToplevelWindowForCommand \
+ (tkIntStubsPtr->tkToplevelWindowForCommand) /* 148 */
+#endif
+#ifndef TkGetOptionSpec
+#define TkGetOptionSpec \
+ (tkIntStubsPtr->tkGetOptionSpec) /* 149 */
+#endif
+
+#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKINTDECLS */
+
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.m
new file mode 100644
index 00000000000..61e31a2f65b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.m
@@ -0,0 +1,466 @@
+#ifndef _TKINTDECLS_VM
+#define _TKINTDECLS_VM
+#include "tkIntDecls_f.h"
+#ifndef NO_VTABLES
+#ifndef TkAllocWindow
+# define TkAllocWindow (*TkintdeclsVptr->V_TkAllocWindow)
+#endif
+
+#ifndef TkBindDeadWindow
+# define TkBindDeadWindow (*TkintdeclsVptr->V_TkBindDeadWindow)
+#endif
+
+#ifndef TkBindEventProc
+# define TkBindEventProc (*TkintdeclsVptr->V_TkBindEventProc)
+#endif
+
+#ifndef TkBindFree
+# define TkBindFree (*TkintdeclsVptr->V_TkBindFree)
+#endif
+
+#ifndef TkBindInit
+# define TkBindInit (*TkintdeclsVptr->V_TkBindInit)
+#endif
+
+#ifndef TkChangeEventWindow
+# define TkChangeEventWindow (*TkintdeclsVptr->V_TkChangeEventWindow)
+#endif
+
+#ifndef TkClipBox
+# define TkClipBox (*TkintdeclsVptr->V_TkClipBox)
+#endif
+
+#ifndef TkClipCleanup
+# define TkClipCleanup (*TkintdeclsVptr->V_TkClipCleanup)
+#endif
+
+#ifndef TkClipInit
+# define TkClipInit (*TkintdeclsVptr->V_TkClipInit)
+#endif
+
+#ifndef TkComputeAnchor
+# define TkComputeAnchor (*TkintdeclsVptr->V_TkComputeAnchor)
+#endif
+
+#ifndef TkCopyAndGlobalEval
+# define TkCopyAndGlobalEval (*TkintdeclsVptr->V_TkCopyAndGlobalEval)
+#endif
+
+#ifndef TkCreateBindingProcedure
+# define TkCreateBindingProcedure (*TkintdeclsVptr->V_TkCreateBindingProcedure)
+#endif
+
+#ifndef TkCreateCursorFromData
+# define TkCreateCursorFromData (*TkintdeclsVptr->V_TkCreateCursorFromData)
+#endif
+
+#ifndef TkCreateFrame
+# define TkCreateFrame (*TkintdeclsVptr->V_TkCreateFrame)
+#endif
+
+#ifndef TkCreateMainWindow
+# define TkCreateMainWindow (*TkintdeclsVptr->V_TkCreateMainWindow)
+#endif
+
+#ifndef TkCreateRegion
+# define TkCreateRegion (*TkintdeclsVptr->V_TkCreateRegion)
+#endif
+
+#ifndef TkCurrentTime
+# define TkCurrentTime (*TkintdeclsVptr->V_TkCurrentTime)
+#endif
+
+#ifndef TkDebugBitmap
+# define TkDebugBitmap (*TkintdeclsVptr->V_TkDebugBitmap)
+#endif
+
+#ifndef TkDebugBorder
+# define TkDebugBorder (*TkintdeclsVptr->V_TkDebugBorder)
+#endif
+
+#ifndef TkDebugColor
+# define TkDebugColor (*TkintdeclsVptr->V_TkDebugColor)
+#endif
+
+#ifndef TkDebugConfig
+# define TkDebugConfig (*TkintdeclsVptr->V_TkDebugConfig)
+#endif
+
+#ifndef TkDebugCursor
+# define TkDebugCursor (*TkintdeclsVptr->V_TkDebugCursor)
+#endif
+
+#ifndef TkDebugFont
+# define TkDebugFont (*TkintdeclsVptr->V_TkDebugFont)
+#endif
+
+#ifndef TkDeleteAllImages
+# define TkDeleteAllImages (*TkintdeclsVptr->V_TkDeleteAllImages)
+#endif
+
+#ifndef TkDestroyRegion
+# define TkDestroyRegion (*TkintdeclsVptr->V_TkDestroyRegion)
+#endif
+
+#ifndef TkDoConfigureNotify
+# define TkDoConfigureNotify (*TkintdeclsVptr->V_TkDoConfigureNotify)
+#endif
+
+#ifndef TkDrawInsetFocusHighlight
+# define TkDrawInsetFocusHighlight (*TkintdeclsVptr->V_TkDrawInsetFocusHighlight)
+#endif
+
+#ifndef TkEventDeadWindow
+# define TkEventDeadWindow (*TkintdeclsVptr->V_TkEventDeadWindow)
+#endif
+
+#ifndef TkFindStateNum
+# define TkFindStateNum (*TkintdeclsVptr->V_TkFindStateNum)
+#endif
+
+#ifndef TkFindStateNumObj
+# define TkFindStateNumObj (*TkintdeclsVptr->V_TkFindStateNumObj)
+#endif
+
+#ifndef TkFindStateString
+# define TkFindStateString (*TkintdeclsVptr->V_TkFindStateString)
+#endif
+
+#ifndef TkFocusDeadWindow
+# define TkFocusDeadWindow (*TkintdeclsVptr->V_TkFocusDeadWindow)
+#endif
+
+#ifndef TkFocusFilterEvent
+# define TkFocusFilterEvent (*TkintdeclsVptr->V_TkFocusFilterEvent)
+#endif
+
+#ifndef TkFocusFree
+# define TkFocusFree (*TkintdeclsVptr->V_TkFocusFree)
+#endif
+
+#ifndef TkFocusKeyEvent
+# define TkFocusKeyEvent (*TkintdeclsVptr->V_TkFocusKeyEvent)
+#endif
+
+#ifndef TkFontPkgFree
+# define TkFontPkgFree (*TkintdeclsVptr->V_TkFontPkgFree)
+#endif
+
+#ifndef TkFontPkgInit
+# define TkFontPkgInit (*TkintdeclsVptr->V_TkFontPkgInit)
+#endif
+
+#ifndef TkFreeBindingTags
+# define TkFreeBindingTags (*TkintdeclsVptr->V_TkFreeBindingTags)
+#endif
+
+#ifndef TkGCCleanup
+# define TkGCCleanup (*TkintdeclsVptr->V_TkGCCleanup)
+#endif
+
+#ifndef TkGetBitmapData
+# define TkGetBitmapData (*TkintdeclsVptr->V_TkGetBitmapData)
+#endif
+
+#ifndef TkGetBitmapPredefTable
+# define TkGetBitmapPredefTable (*TkintdeclsVptr->V_TkGetBitmapPredefTable)
+#endif
+
+#ifndef TkGetCursorByName
+# define TkGetCursorByName (*TkintdeclsVptr->V_TkGetCursorByName)
+#endif
+
+#ifndef TkGetDefaultScreenName
+# define TkGetDefaultScreenName (*TkintdeclsVptr->V_TkGetDefaultScreenName)
+#endif
+
+#ifndef TkGetDisplay
+# define TkGetDisplay (*TkintdeclsVptr->V_TkGetDisplay)
+#endif
+
+#ifndef TkGetDisplayList
+# define TkGetDisplayList (*TkintdeclsVptr->V_TkGetDisplayList)
+#endif
+
+#ifndef TkGetDisplayOf
+# define TkGetDisplayOf (*TkintdeclsVptr->V_TkGetDisplayOf)
+#endif
+
+#ifndef TkGetFocusWin
+# define TkGetFocusWin (*TkintdeclsVptr->V_TkGetFocusWin)
+#endif
+
+#ifndef TkGetInterpNames
+# define TkGetInterpNames (*TkintdeclsVptr->V_TkGetInterpNames)
+#endif
+
+#ifndef TkGetMainInfoList
+# define TkGetMainInfoList (*TkintdeclsVptr->V_TkGetMainInfoList)
+#endif
+
+#ifndef TkGetOptionSpec
+# define TkGetOptionSpec (*TkintdeclsVptr->V_TkGetOptionSpec)
+#endif
+
+#ifndef TkGetPointerCoords
+# define TkGetPointerCoords (*TkintdeclsVptr->V_TkGetPointerCoords)
+#endif
+
+#ifndef TkGetServerInfo
+# define TkGetServerInfo (*TkintdeclsVptr->V_TkGetServerInfo)
+#endif
+
+#ifndef TkGetWindowFromObj
+# define TkGetWindowFromObj (*TkintdeclsVptr->V_TkGetWindowFromObj)
+#endif
+
+#ifndef TkGrabDeadWindow
+# define TkGrabDeadWindow (*TkintdeclsVptr->V_TkGrabDeadWindow)
+#endif
+
+#ifndef TkGrabState
+# define TkGrabState (*TkintdeclsVptr->V_TkGrabState)
+#endif
+
+#ifndef TkInOutEvents
+# define TkInOutEvents (*TkintdeclsVptr->V_TkInOutEvents)
+#endif
+
+#ifndef TkInstallFrameMenu
+# define TkInstallFrameMenu (*TkintdeclsVptr->V_TkInstallFrameMenu)
+#endif
+
+#ifndef TkIntersectRegion
+# define TkIntersectRegion (*TkintdeclsVptr->V_TkIntersectRegion)
+#endif
+
+#ifndef TkKeysymToString
+# define TkKeysymToString (*TkintdeclsVptr->V_TkKeysymToString)
+#endif
+
+#ifndef TkPhotoGetValidRegion
+# define TkPhotoGetValidRegion (*TkintdeclsVptr->V_TkPhotoGetValidRegion)
+#endif
+
+#ifndef TkPointerEvent
+# define TkPointerEvent (*TkintdeclsVptr->V_TkPointerEvent)
+#endif
+
+#ifndef TkPositionInTree
+# define TkPositionInTree (*TkintdeclsVptr->V_TkPositionInTree)
+#endif
+
+#ifndef TkQueueEventForAllChildren
+# define TkQueueEventForAllChildren (*TkintdeclsVptr->V_TkQueueEventForAllChildren)
+#endif
+
+#ifndef TkReadBitmapFile
+# define TkReadBitmapFile (*TkintdeclsVptr->V_TkReadBitmapFile)
+#endif
+
+#ifndef TkRectInRegion
+# define TkRectInRegion (*TkintdeclsVptr->V_TkRectInRegion)
+#endif
+
+#ifndef TkScrollWindow
+# define TkScrollWindow (*TkintdeclsVptr->V_TkScrollWindow)
+#endif
+
+#ifndef TkSelDeadWindow
+# define TkSelDeadWindow (*TkintdeclsVptr->V_TkSelDeadWindow)
+#endif
+
+#ifndef TkSelEventProc
+# define TkSelEventProc (*TkintdeclsVptr->V_TkSelEventProc)
+#endif
+
+#ifndef TkSelInit
+# define TkSelInit (*TkintdeclsVptr->V_TkSelInit)
+#endif
+
+#ifndef TkSelPropProc
+# define TkSelPropProc (*TkintdeclsVptr->V_TkSelPropProc)
+#endif
+
+#ifndef TkSetFocusWin
+# define TkSetFocusWin (*TkintdeclsVptr->V_TkSetFocusWin)
+#endif
+
+#ifndef TkSetRegion
+# define TkSetRegion (*TkintdeclsVptr->V_TkSetRegion)
+#endif
+
+#ifndef TkSetWindowMenuBar
+# define TkSetWindowMenuBar (*TkintdeclsVptr->V_TkSetWindowMenuBar)
+#endif
+
+#ifndef TkStringToKeysym
+# define TkStringToKeysym (*TkintdeclsVptr->V_TkStringToKeysym)
+#endif
+
+#ifndef TkStylePkgFree
+# define TkStylePkgFree (*TkintdeclsVptr->V_TkStylePkgFree)
+#endif
+
+#ifndef TkStylePkgInit
+# define TkStylePkgInit (*TkintdeclsVptr->V_TkStylePkgInit)
+#endif
+
+#ifndef TkSubtractRegion
+# define TkSubtractRegion (*TkintdeclsVptr->V_TkSubtractRegion)
+#endif
+
+#ifndef TkToplevelWindowForCommand
+# define TkToplevelWindowForCommand (*TkintdeclsVptr->V_TkToplevelWindowForCommand)
+#endif
+
+#ifndef TkUnionRectWithRegion
+# define TkUnionRectWithRegion (*TkintdeclsVptr->V_TkUnionRectWithRegion)
+#endif
+
+#ifndef TkWmAddToColormapWindows
+# define TkWmAddToColormapWindows (*TkintdeclsVptr->V_TkWmAddToColormapWindows)
+#endif
+
+#ifndef TkWmDeadWindow
+# define TkWmDeadWindow (*TkintdeclsVptr->V_TkWmDeadWindow)
+#endif
+
+#ifndef TkWmFocusToplevel
+# define TkWmFocusToplevel (*TkintdeclsVptr->V_TkWmFocusToplevel)
+#endif
+
+#ifndef TkWmMapWindow
+# define TkWmMapWindow (*TkintdeclsVptr->V_TkWmMapWindow)
+#endif
+
+#ifndef TkWmNewWindow
+# define TkWmNewWindow (*TkintdeclsVptr->V_TkWmNewWindow)
+#endif
+
+#ifndef TkWmProtocolEventProc
+# define TkWmProtocolEventProc (*TkintdeclsVptr->V_TkWmProtocolEventProc)
+#endif
+
+#ifndef TkWmRemoveFromColormapWindows
+# define TkWmRemoveFromColormapWindows (*TkintdeclsVptr->V_TkWmRemoveFromColormapWindows)
+#endif
+
+#ifndef TkWmRestackToplevel
+# define TkWmRestackToplevel (*TkintdeclsVptr->V_TkWmRestackToplevel)
+#endif
+
+#ifndef TkWmSetClass
+# define TkWmSetClass (*TkintdeclsVptr->V_TkWmSetClass)
+#endif
+
+#ifndef TkWmStackorderToplevel
+# define TkWmStackorderToplevel (*TkintdeclsVptr->V_TkWmStackorderToplevel)
+#endif
+
+#ifndef TkWmUnmapWindow
+# define TkWmUnmapWindow (*TkintdeclsVptr->V_TkWmUnmapWindow)
+#endif
+
+#ifndef TkpChangeFocus
+# define TkpChangeFocus (*TkintdeclsVptr->V_TkpChangeFocus)
+#endif
+
+#ifndef TkpClaimFocus
+# define TkpClaimFocus (*TkintdeclsVptr->V_TkpClaimFocus)
+#endif
+
+#ifndef TkpCloseDisplay
+# define TkpCloseDisplay (*TkintdeclsVptr->V_TkpCloseDisplay)
+#endif
+
+#ifndef TkpDisplayWarning
+# define TkpDisplayWarning (*TkintdeclsVptr->V_TkpDisplayWarning)
+#endif
+
+#ifndef TkpDrawHighlightBorder
+# define TkpDrawHighlightBorder (*TkintdeclsVptr->V_TkpDrawHighlightBorder)
+#endif
+
+#ifndef TkpFreeCursor
+# define TkpFreeCursor (*TkintdeclsVptr->V_TkpFreeCursor)
+#endif
+
+#ifndef TkpGetKeySym
+# define TkpGetKeySym (*TkintdeclsVptr->V_TkpGetKeySym)
+#endif
+
+#ifndef TkpGetOtherWindow
+# define TkpGetOtherWindow (*TkintdeclsVptr->V_TkpGetOtherWindow)
+#endif
+
+#ifndef TkpGetString
+# define TkpGetString (*TkintdeclsVptr->V_TkpGetString)
+#endif
+
+#ifndef TkpGetSubFonts
+# define TkpGetSubFonts (*TkintdeclsVptr->V_TkpGetSubFonts)
+#endif
+
+#ifndef TkpGetSystemDefault
+# define TkpGetSystemDefault (*TkintdeclsVptr->V_TkpGetSystemDefault)
+#endif
+
+#ifndef TkpGetWrapperWindow
+# define TkpGetWrapperWindow (*TkintdeclsVptr->V_TkpGetWrapperWindow)
+#endif
+
+#ifndef TkpInitKeymapInfo
+# define TkpInitKeymapInfo (*TkintdeclsVptr->V_TkpInitKeymapInfo)
+#endif
+
+#ifndef TkpInitializeMenuBindings
+# define TkpInitializeMenuBindings (*TkintdeclsVptr->V_TkpInitializeMenuBindings)
+#endif
+
+#ifndef TkpMakeContainer
+# define TkpMakeContainer (*TkintdeclsVptr->V_TkpMakeContainer)
+#endif
+
+#ifndef TkpMakeMenuWindow
+# define TkpMakeMenuWindow (*TkintdeclsVptr->V_TkpMakeMenuWindow)
+#endif
+
+#ifndef TkpMakeWindow
+# define TkpMakeWindow (*TkintdeclsVptr->V_TkpMakeWindow)
+#endif
+
+#ifndef TkpMenuNotifyToplevelCreate
+# define TkpMenuNotifyToplevelCreate (*TkintdeclsVptr->V_TkpMenuNotifyToplevelCreate)
+#endif
+
+#ifndef TkpMenuThreadInit
+# define TkpMenuThreadInit (*TkintdeclsVptr->V_TkpMenuThreadInit)
+#endif
+
+#ifndef TkpOpenDisplay
+# define TkpOpenDisplay (*TkintdeclsVptr->V_TkpOpenDisplay)
+#endif
+
+#ifndef TkpRedirectKeyEvent
+# define TkpRedirectKeyEvent (*TkintdeclsVptr->V_TkpRedirectKeyEvent)
+#endif
+
+#ifndef TkpSetKeycodeAndState
+# define TkpSetKeycodeAndState (*TkintdeclsVptr->V_TkpSetKeycodeAndState)
+#endif
+
+#ifndef TkpSetMainMenubar
+# define TkpSetMainMenubar (*TkintdeclsVptr->V_TkpSetMainMenubar)
+#endif
+
+#ifndef TkpUseWindow
+# define TkpUseWindow (*TkintdeclsVptr->V_TkpUseWindow)
+#endif
+
+#ifndef TkpWindowWasRecentlyDeleted
+# define TkpWindowWasRecentlyDeleted (*TkintdeclsVptr->V_TkpWindowWasRecentlyDeleted)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKINTDECLS_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.t
new file mode 100644
index 00000000000..b2a83a8f4fb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls.t
@@ -0,0 +1,642 @@
+#ifdef _TKINTDECLS
+#ifndef TkAllocWindow
+VFUNC(TkWindow *,TkAllocWindow,V_TkAllocWindow,_ANSI_ARGS_((TkDisplay * dispPtr,
+ int screenNum, TkWindow * parentPtr)))
+#endif /* #ifndef TkAllocWindow */
+
+#ifndef TkBindDeadWindow
+VFUNC(void,TkBindDeadWindow,V_TkBindDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkBindDeadWindow */
+
+#ifndef TkBindEventProc
+VFUNC(void,TkBindEventProc,V_TkBindEventProc,_ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr)))
+#endif /* #ifndef TkBindEventProc */
+
+#ifndef TkBindFree
+VFUNC(void,TkBindFree,V_TkBindFree,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkBindFree */
+
+#ifndef TkBindInit
+VFUNC(void,TkBindInit,V_TkBindInit,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkBindInit */
+
+#ifndef TkChangeEventWindow
+VFUNC(void,TkChangeEventWindow,V_TkChangeEventWindow,_ANSI_ARGS_((XEvent * eventPtr,
+ TkWindow * winPtr)))
+#endif /* #ifndef TkChangeEventWindow */
+
+#ifndef TkClipBox
+#ifdef MAC_OSX_TK
+VFUNC(void,TkClipBox,V_TkClipBox,_ANSI_ARGS_((TkRegion rgn,
+ XRectangle* rect_return)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkClipBox,V_TkClipBox,_ANSI_ARGS_((TkRegion rgn,
+ XRectangle* rect_return)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkClipBox,V_TkClipBox,_ANSI_ARGS_((TkRegion rgn,
+ XRectangle* rect_return)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkClipBox */
+
+#ifndef TkClipCleanup
+VFUNC(void,TkClipCleanup,V_TkClipCleanup,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #ifndef TkClipCleanup */
+
+#ifndef TkClipInit
+VFUNC(int,TkClipInit,V_TkClipInit,_ANSI_ARGS_((Tcl_Interp * interp,
+ TkDisplay * dispPtr)))
+#endif /* #ifndef TkClipInit */
+
+#ifndef TkComputeAnchor
+VFUNC(void,TkComputeAnchor,V_TkComputeAnchor,_ANSI_ARGS_((Tk_Anchor anchor,
+ Tk_Window tkwin, int padX, int padY,
+ int innerWidth, int innerHeight, int * xPtr,
+ int * yPtr)))
+#endif /* #ifndef TkComputeAnchor */
+
+#ifndef TkCopyAndGlobalEval
+VFUNC(int,TkCopyAndGlobalEval,V_TkCopyAndGlobalEval,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * script)))
+#endif /* #ifndef TkCopyAndGlobalEval */
+
+#ifndef TkCreateBindingProcedure
+VFUNC(unsigned long,TkCreateBindingProcedure,V_TkCreateBindingProcedure,_ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tk_BindingTable bindingTable,
+ ClientData object, CONST char * eventString,
+ TkBindEvalProc * evalProc,
+ TkBindFreeProc * freeProc,
+ ClientData clientData)))
+#endif /* #ifndef TkCreateBindingProcedure */
+
+#ifndef TkCreateCursorFromData
+VFUNC(TkCursor *,TkCreateCursorFromData,V_TkCreateCursorFromData,_ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * source, CONST char * mask,
+ int width, int height, int xHot, int yHot,
+ XColor fg, XColor bg)))
+#endif /* #ifndef TkCreateCursorFromData */
+
+#ifndef TkCreateFrame
+VFUNC(int,TkCreateFrame,V_TkCreateFrame,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp, int argc, Tcl_Obj *CONST *objv,
+ int toplevel, char * appName)))
+#endif /* #ifndef TkCreateFrame */
+
+#ifndef TkCreateMainWindow
+VFUNC(Tk_Window,TkCreateMainWindow,V_TkCreateMainWindow,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * screenName, char * baseName)))
+#endif /* #ifndef TkCreateMainWindow */
+
+#ifndef TkCreateRegion
+#ifdef MAC_OSX_TK
+VFUNC(TkRegion,TkCreateRegion,V_TkCreateRegion,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(TkRegion,TkCreateRegion,V_TkCreateRegion,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(TkRegion,TkCreateRegion,V_TkCreateRegion,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkCreateRegion */
+
+#ifndef TkCurrentTime
+VFUNC(Time,TkCurrentTime,V_TkCurrentTime,_ANSI_ARGS_((TkDisplay * dispPtr,
+ int fallbackCurrent)))
+#endif /* #ifndef TkCurrentTime */
+
+#ifndef TkDebugBitmap
+VFUNC(Tcl_Obj *,TkDebugBitmap,V_TkDebugBitmap,_ANSI_ARGS_((Tk_Window tkwin,
+ char * name)))
+#endif /* #ifndef TkDebugBitmap */
+
+#ifndef TkDebugBorder
+VFUNC(Tcl_Obj *,TkDebugBorder,V_TkDebugBorder,_ANSI_ARGS_((Tk_Window tkwin,
+ char * name)))
+#endif /* #ifndef TkDebugBorder */
+
+#ifndef TkDebugColor
+VFUNC(Tcl_Obj *,TkDebugColor,V_TkDebugColor,_ANSI_ARGS_((Tk_Window tkwin,
+ char * name)))
+#endif /* #ifndef TkDebugColor */
+
+#ifndef TkDebugConfig
+VFUNC(Tcl_Obj *,TkDebugConfig,V_TkDebugConfig,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_OptionTable table)))
+#endif /* #ifndef TkDebugConfig */
+
+#ifndef TkDebugCursor
+VFUNC(Tcl_Obj *,TkDebugCursor,V_TkDebugCursor,_ANSI_ARGS_((Tk_Window tkwin,
+ char * name)))
+#endif /* #ifndef TkDebugCursor */
+
+#ifndef TkDebugFont
+VFUNC(Tcl_Obj *,TkDebugFont,V_TkDebugFont,_ANSI_ARGS_((Tk_Window tkwin,
+ char * name)))
+#endif /* #ifndef TkDebugFont */
+
+#ifndef TkDeleteAllImages
+VFUNC(void,TkDeleteAllImages,V_TkDeleteAllImages,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkDeleteAllImages */
+
+#ifndef TkDestroyRegion
+#ifdef MAC_OSX_TK
+VFUNC(void,TkDestroyRegion,V_TkDestroyRegion,_ANSI_ARGS_((TkRegion rgn)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkDestroyRegion,V_TkDestroyRegion,_ANSI_ARGS_((TkRegion rgn)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkDestroyRegion,V_TkDestroyRegion,_ANSI_ARGS_((TkRegion rgn)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkDestroyRegion */
+
+#ifndef TkDoConfigureNotify
+VFUNC(void,TkDoConfigureNotify,V_TkDoConfigureNotify,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkDoConfigureNotify */
+
+#ifndef TkDrawInsetFocusHighlight
+VFUNC(void,TkDrawInsetFocusHighlight,V_TkDrawInsetFocusHighlight,_ANSI_ARGS_((
+ Tk_Window tkwin, GC gc, int width,
+ Drawable drawable, int padding)))
+#endif /* #ifndef TkDrawInsetFocusHighlight */
+
+#ifndef TkEventDeadWindow
+VFUNC(void,TkEventDeadWindow,V_TkEventDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkEventDeadWindow */
+
+#ifndef TkFindStateNum
+VFUNC(int,TkFindStateNum,V_TkFindStateNum,_ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * option,
+ CONST TkStateMap * mapPtr,
+ CONST char * strKey)))
+#endif /* #ifndef TkFindStateNum */
+
+#ifndef TkFindStateNumObj
+VFUNC(int,TkFindStateNumObj,V_TkFindStateNumObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * optionPtr,
+ CONST TkStateMap * mapPtr, Tcl_Obj * keyPtr)))
+#endif /* #ifndef TkFindStateNumObj */
+
+#ifndef TkFindStateString
+VFUNC(char *,TkFindStateString,V_TkFindStateString,_ANSI_ARGS_((
+ CONST TkStateMap * mapPtr, int numKey)))
+#endif /* #ifndef TkFindStateString */
+
+#ifndef TkFocusDeadWindow
+VFUNC(void,TkFocusDeadWindow,V_TkFocusDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkFocusDeadWindow */
+
+#ifndef TkFocusFilterEvent
+VFUNC(int,TkFocusFilterEvent,V_TkFocusFilterEvent,_ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr)))
+#endif /* #ifndef TkFocusFilterEvent */
+
+#ifndef TkFocusFree
+VFUNC(void,TkFocusFree,V_TkFocusFree,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkFocusFree */
+
+#ifndef TkFocusKeyEvent
+VFUNC(TkWindow *,TkFocusKeyEvent,V_TkFocusKeyEvent,_ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr)))
+#endif /* #ifndef TkFocusKeyEvent */
+
+#ifndef TkFontPkgFree
+VFUNC(void,TkFontPkgFree,V_TkFontPkgFree,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkFontPkgFree */
+
+#ifndef TkFontPkgInit
+VFUNC(void,TkFontPkgInit,V_TkFontPkgInit,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkFontPkgInit */
+
+#ifndef TkFreeBindingTags
+VFUNC(void,TkFreeBindingTags,V_TkFreeBindingTags,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkFreeBindingTags */
+
+#ifndef TkGCCleanup
+VFUNC(void,TkGCCleanup,V_TkGCCleanup,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #ifndef TkGCCleanup */
+
+#ifndef TkGetBitmapData
+VFUNC(char *,TkGetBitmapData,V_TkGetBitmapData,_ANSI_ARGS_((Tcl_Interp * interp,
+ char * string, char * fileName,
+ int * widthPtr, int * heightPtr,
+ int * hotXPtr, int * hotYPtr)))
+#endif /* #ifndef TkGetBitmapData */
+
+#ifndef TkGetBitmapPredefTable
+VFUNC(Tcl_HashTable *,TkGetBitmapPredefTable,V_TkGetBitmapPredefTable,_ANSI_ARGS_((void)))
+#endif /* #ifndef TkGetBitmapPredefTable */
+
+#ifndef TkGetCursorByName
+VFUNC(TkCursor *,TkGetCursorByName,V_TkGetCursorByName,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Uid string)))
+#endif /* #ifndef TkGetCursorByName */
+
+#ifndef TkGetDefaultScreenName
+VFUNC(CONST84_RETURN char *,TkGetDefaultScreenName,V_TkGetDefaultScreenName,_ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * screenName)))
+#endif /* #ifndef TkGetDefaultScreenName */
+
+#ifndef TkGetDisplay
+VFUNC(TkDisplay *,TkGetDisplay,V_TkGetDisplay,_ANSI_ARGS_((Display * display)))
+#endif /* #ifndef TkGetDisplay */
+
+#ifndef TkGetDisplayList
+VFUNC(TkDisplay *,TkGetDisplayList,V_TkGetDisplayList,_ANSI_ARGS_((void)))
+#endif /* #ifndef TkGetDisplayList */
+
+#ifndef TkGetDisplayOf
+VFUNC(int,TkGetDisplayOf,V_TkGetDisplayOf,_ANSI_ARGS_((Tcl_Interp * interp,
+ int objc, Tcl_Obj *CONST objv[],
+ Tk_Window * tkwinPtr)))
+#endif /* #ifndef TkGetDisplayOf */
+
+#ifndef TkGetFocusWin
+VFUNC(TkWindow *,TkGetFocusWin,V_TkGetFocusWin,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkGetFocusWin */
+
+#ifndef TkGetInterpNames
+VFUNC(int,TkGetInterpNames,V_TkGetInterpNames,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin)))
+#endif /* #ifndef TkGetInterpNames */
+
+#ifndef TkGetMainInfoList
+VFUNC(TkMainInfo *,TkGetMainInfoList,V_TkGetMainInfoList,_ANSI_ARGS_((void)))
+#endif /* #ifndef TkGetMainInfoList */
+
+#ifndef TkGetOptionSpec
+VFUNC(CONST Tk_OptionSpec *,TkGetOptionSpec,V_TkGetOptionSpec,_ANSI_ARGS_((CONST char * name,
+ Tk_OptionTable optionTable)))
+#endif /* #ifndef TkGetOptionSpec */
+
+#ifndef TkGetPointerCoords
+VFUNC(void,TkGetPointerCoords,V_TkGetPointerCoords,_ANSI_ARGS_((Tk_Window tkwin,
+ int * xPtr, int * yPtr)))
+#endif /* #ifndef TkGetPointerCoords */
+
+#ifndef TkGetServerInfo
+VFUNC(void,TkGetServerInfo,V_TkGetServerInfo,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin)))
+#endif /* #ifndef TkGetServerInfo */
+
+#ifndef TkGetWindowFromObj
+VFUNC(int,TkGetWindowFromObj,V_TkGetWindowFromObj,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj * objPtr,
+ Tk_Window * windowPtr)))
+#endif /* #ifndef TkGetWindowFromObj */
+
+#ifndef TkGrabDeadWindow
+VFUNC(void,TkGrabDeadWindow,V_TkGrabDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkGrabDeadWindow */
+
+#ifndef TkGrabState
+VFUNC(int,TkGrabState,V_TkGrabState,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkGrabState */
+
+#ifndef TkInOutEvents
+VFUNC(void,TkInOutEvents,V_TkInOutEvents,_ANSI_ARGS_((XEvent * eventPtr,
+ TkWindow * sourcePtr, TkWindow * destPtr,
+ int leaveType, int enterType,
+ Tcl_QueuePosition position)))
+#endif /* #ifndef TkInOutEvents */
+
+#ifndef TkInstallFrameMenu
+VFUNC(void,TkInstallFrameMenu,V_TkInstallFrameMenu,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef TkInstallFrameMenu */
+
+#ifndef TkIntersectRegion
+#ifdef MAC_OSX_TK
+VFUNC(void,TkIntersectRegion,V_TkIntersectRegion,_ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkIntersectRegion,V_TkIntersectRegion,_ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkIntersectRegion,V_TkIntersectRegion,_ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkIntersectRegion */
+
+#ifndef TkKeysymToString
+VFUNC(char *,TkKeysymToString,V_TkKeysymToString,_ANSI_ARGS_((KeySym keysym)))
+#endif /* #ifndef TkKeysymToString */
+
+#ifndef TkPhotoGetValidRegion
+VFUNC(TkRegion,TkPhotoGetValidRegion,V_TkPhotoGetValidRegion,_ANSI_ARGS_((
+ Tk_PhotoHandle handle)))
+#endif /* #ifndef TkPhotoGetValidRegion */
+
+#ifndef TkPointerEvent
+VFUNC(int,TkPointerEvent,V_TkPointerEvent,_ANSI_ARGS_((XEvent * eventPtr,
+ TkWindow * winPtr)))
+#endif /* #ifndef TkPointerEvent */
+
+#ifndef TkPositionInTree
+VFUNC(int,TkPositionInTree,V_TkPositionInTree,_ANSI_ARGS_((TkWindow * winPtr,
+ TkWindow * treePtr)))
+#endif /* #ifndef TkPositionInTree */
+
+#ifndef TkQueueEventForAllChildren
+VFUNC(void,TkQueueEventForAllChildren,V_TkQueueEventForAllChildren,_ANSI_ARGS_((
+ TkWindow * winPtr, XEvent * eventPtr)))
+#endif /* #ifndef TkQueueEventForAllChildren */
+
+#ifndef TkReadBitmapFile
+VFUNC(int,TkReadBitmapFile,V_TkReadBitmapFile,_ANSI_ARGS_((Tcl_Interp * interp,
+ Display* display,
+ Drawable d, CONST char* filename,
+ unsigned int* width_return,
+ unsigned int* height_return,
+ Pixmap* bitmap_return, int* x_hot_return,
+ int* y_hot_return)))
+#endif /* #ifndef TkReadBitmapFile */
+
+#ifndef TkRectInRegion
+#ifdef MAC_OSX_TK
+VFUNC(int,TkRectInRegion,V_TkRectInRegion,_ANSI_ARGS_((TkRegion rgn, int x,
+ int y, unsigned int width,
+ unsigned int height)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,TkRectInRegion,V_TkRectInRegion,_ANSI_ARGS_((TkRegion rgn, int x,
+ int y, unsigned int width,
+ unsigned int height)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(int,TkRectInRegion,V_TkRectInRegion,_ANSI_ARGS_((TkRegion rgn, int x,
+ int y, unsigned int width,
+ unsigned int height)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkRectInRegion */
+
+#ifndef TkScrollWindow
+VFUNC(int,TkScrollWindow,V_TkScrollWindow,_ANSI_ARGS_((Tk_Window tkwin, GC gc,
+ int x, int y, int width, int height, int dx,
+ int dy, TkRegion damageRgn)))
+#endif /* #ifndef TkScrollWindow */
+
+#ifndef TkSelDeadWindow
+VFUNC(void,TkSelDeadWindow,V_TkSelDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkSelDeadWindow */
+
+#ifndef TkSelEventProc
+VFUNC(void,TkSelEventProc,V_TkSelEventProc,_ANSI_ARGS_((Tk_Window tkwin,
+ XEvent * eventPtr)))
+#endif /* #ifndef TkSelEventProc */
+
+#ifndef TkSelInit
+VFUNC(void,TkSelInit,V_TkSelInit,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef TkSelInit */
+
+#ifndef TkSelPropProc
+VFUNC(void,TkSelPropProc,V_TkSelPropProc,_ANSI_ARGS_((XEvent * eventPtr)))
+#endif /* #ifndef TkSelPropProc */
+
+#ifndef TkSetFocusWin
+VFUNC(void,TkSetFocusWin,V_TkSetFocusWin,_ANSI_ARGS_((TkWindow * winPtr,
+ int force)))
+#endif /* #ifndef TkSetFocusWin */
+
+#ifndef TkSetRegion
+#ifdef MAC_OSX_TK
+VFUNC(void,TkSetRegion,V_TkSetRegion,_ANSI_ARGS_((Display* display, GC gc,
+ TkRegion rgn)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkSetRegion,V_TkSetRegion,_ANSI_ARGS_((Display* display, GC gc,
+ TkRegion rgn)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkSetRegion,V_TkSetRegion,_ANSI_ARGS_((Display* display, GC gc,
+ TkRegion rgn)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkSetRegion */
+
+#ifndef TkSetWindowMenuBar
+VFUNC(void,TkSetWindowMenuBar,V_TkSetWindowMenuBar,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj *oldMenuName,
+ Tcl_Obj *menuName)))
+#endif /* #ifndef TkSetWindowMenuBar */
+
+#ifndef TkStringToKeysym
+VFUNC(KeySym,TkStringToKeysym,V_TkStringToKeysym,_ANSI_ARGS_((char * name)))
+#endif /* #ifndef TkStringToKeysym */
+
+#ifndef TkStylePkgFree
+VFUNC(void,TkStylePkgFree,V_TkStylePkgFree,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkStylePkgFree */
+
+#ifndef TkStylePkgInit
+VFUNC(void,TkStylePkgInit,V_TkStylePkgInit,_ANSI_ARGS_((TkMainInfo * mainPtr)))
+#endif /* #ifndef TkStylePkgInit */
+
+#ifndef TkSubtractRegion
+#ifdef MAC_OSX_TK
+VFUNC(void,TkSubtractRegion,V_TkSubtractRegion,_ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkSubtractRegion,V_TkSubtractRegion,_ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkSubtractRegion,V_TkSubtractRegion,_ANSI_ARGS_((TkRegion sra,
+ TkRegion srcb, TkRegion dr_return)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkSubtractRegion */
+
+#ifndef TkToplevelWindowForCommand
+VFUNC(Tk_Window,TkToplevelWindowForCommand,V_TkToplevelWindowForCommand,_ANSI_ARGS_((
+ Tcl_Interp * interp, CONST char * cmdName)))
+#endif /* #ifndef TkToplevelWindowForCommand */
+
+#ifndef TkUnionRectWithRegion
+#ifdef MAC_OSX_TK
+VFUNC(void,TkUnionRectWithRegion,V_TkUnionRectWithRegion,_ANSI_ARGS_((XRectangle* rect,
+ TkRegion src, TkRegion dr_return)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkUnionRectWithRegion,V_TkUnionRectWithRegion,_ANSI_ARGS_((XRectangle* rect,
+ TkRegion src, TkRegion dr_return)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkUnionRectWithRegion,V_TkUnionRectWithRegion,_ANSI_ARGS_((XRectangle* rect,
+ TkRegion src, TkRegion dr_return)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkUnionRectWithRegion */
+
+#ifndef TkWmAddToColormapWindows
+VFUNC(void,TkWmAddToColormapWindows,V_TkWmAddToColormapWindows,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifndef TkWmAddToColormapWindows */
+
+#ifndef TkWmDeadWindow
+VFUNC(void,TkWmDeadWindow,V_TkWmDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkWmDeadWindow */
+
+#ifndef TkWmFocusToplevel
+VFUNC(TkWindow *,TkWmFocusToplevel,V_TkWmFocusToplevel,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkWmFocusToplevel */
+
+#ifndef TkWmMapWindow
+VFUNC(void,TkWmMapWindow,V_TkWmMapWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkWmMapWindow */
+
+#ifndef TkWmNewWindow
+VFUNC(void,TkWmNewWindow,V_TkWmNewWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkWmNewWindow */
+
+#ifndef TkWmProtocolEventProc
+VFUNC(void,TkWmProtocolEventProc,V_TkWmProtocolEventProc,_ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * evenvPtr)))
+#endif /* #ifndef TkWmProtocolEventProc */
+
+#ifndef TkWmRemoveFromColormapWindows
+VFUNC(void,TkWmRemoveFromColormapWindows,V_TkWmRemoveFromColormapWindows,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifndef TkWmRemoveFromColormapWindows */
+
+#ifndef TkWmRestackToplevel
+VFUNC(void,TkWmRestackToplevel,V_TkWmRestackToplevel,_ANSI_ARGS_((TkWindow * winPtr,
+ int aboveBelow, TkWindow * otherPtr)))
+#endif /* #ifndef TkWmRestackToplevel */
+
+#ifndef TkWmSetClass
+VFUNC(void,TkWmSetClass,V_TkWmSetClass,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkWmSetClass */
+
+#ifndef TkWmStackorderToplevel
+VFUNC(TkWindow **,TkWmStackorderToplevel,V_TkWmStackorderToplevel,_ANSI_ARGS_((
+ TkWindow * parentPtr)))
+#endif /* #ifndef TkWmStackorderToplevel */
+
+#ifndef TkWmUnmapWindow
+VFUNC(void,TkWmUnmapWindow,V_TkWmUnmapWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkWmUnmapWindow */
+
+#ifndef TkpChangeFocus
+VFUNC(int,TkpChangeFocus,V_TkpChangeFocus,_ANSI_ARGS_((TkWindow * winPtr,
+ int force)))
+#endif /* #ifndef TkpChangeFocus */
+
+#ifndef TkpClaimFocus
+VFUNC(void,TkpClaimFocus,V_TkpClaimFocus,_ANSI_ARGS_((TkWindow * topLevelPtr,
+ int force)))
+#endif /* #ifndef TkpClaimFocus */
+
+#ifndef TkpCloseDisplay
+VFUNC(void,TkpCloseDisplay,V_TkpCloseDisplay,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #ifndef TkpCloseDisplay */
+
+#ifndef TkpDisplayWarning
+VFUNC(void,TkpDisplayWarning,V_TkpDisplayWarning,_ANSI_ARGS_((CONST char * msg,
+ CONST char * title)))
+#endif /* #ifndef TkpDisplayWarning */
+
+#ifndef TkpDrawHighlightBorder
+VFUNC(void,TkpDrawHighlightBorder,V_TkpDrawHighlightBorder,_ANSI_ARGS_((Tk_Window tkwin,
+ GC fgGC, GC bgGC, int highlightWidth,
+ Drawable drawable)))
+#endif /* #ifndef TkpDrawHighlightBorder */
+
+#ifndef TkpFreeCursor
+VFUNC(void,TkpFreeCursor,V_TkpFreeCursor,_ANSI_ARGS_((TkCursor * cursorPtr)))
+#endif /* #ifndef TkpFreeCursor */
+
+#ifndef TkpGetKeySym
+VFUNC(KeySym,TkpGetKeySym,V_TkpGetKeySym,_ANSI_ARGS_((TkDisplay * dispPtr,
+ XEvent * eventPtr)))
+#endif /* #ifndef TkpGetKeySym */
+
+#ifndef TkpGetOtherWindow
+VFUNC(TkWindow *,TkpGetOtherWindow,V_TkpGetOtherWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkpGetOtherWindow */
+
+#ifndef TkpGetString
+VFUNC(char *,TkpGetString,V_TkpGetString,_ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr, Tcl_DString * dsPtr)))
+#endif /* #ifndef TkpGetString */
+
+#ifndef TkpGetSubFonts
+VFUNC(void,TkpGetSubFonts,V_TkpGetSubFonts,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Font tkfont)))
+#endif /* #ifndef TkpGetSubFonts */
+
+#ifndef TkpGetSystemDefault
+VFUNC(Tcl_Obj *,TkpGetSystemDefault,V_TkpGetSystemDefault,_ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * dbName, CONST char * className)))
+#endif /* #ifndef TkpGetSystemDefault */
+
+#ifndef TkpGetWrapperWindow
+VFUNC(TkWindow *,TkpGetWrapperWindow,V_TkpGetWrapperWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifndef TkpGetWrapperWindow */
+
+#ifndef TkpInitKeymapInfo
+VFUNC(void,TkpInitKeymapInfo,V_TkpInitKeymapInfo,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #ifndef TkpInitKeymapInfo */
+
+#ifndef TkpInitializeMenuBindings
+VFUNC(void,TkpInitializeMenuBindings,V_TkpInitializeMenuBindings,_ANSI_ARGS_((
+ Tcl_Interp * interp,
+ Tk_BindingTable bindingTable)))
+#endif /* #ifndef TkpInitializeMenuBindings */
+
+#ifndef TkpMakeContainer
+VFUNC(void,TkpMakeContainer,V_TkpMakeContainer,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef TkpMakeContainer */
+
+#ifndef TkpMakeMenuWindow
+VFUNC(void,TkpMakeMenuWindow,V_TkpMakeMenuWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ int transient)))
+#endif /* #ifndef TkpMakeMenuWindow */
+
+#ifndef TkpMakeWindow
+VFUNC(Window,TkpMakeWindow,V_TkpMakeWindow,_ANSI_ARGS_((TkWindow * winPtr,
+ Window parent)))
+#endif /* #ifndef TkpMakeWindow */
+
+#ifndef TkpMenuNotifyToplevelCreate
+VFUNC(void,TkpMenuNotifyToplevelCreate,V_TkpMenuNotifyToplevelCreate,_ANSI_ARGS_((
+ Tcl_Interp * interp1, char * menuName)))
+#endif /* #ifndef TkpMenuNotifyToplevelCreate */
+
+#ifndef TkpMenuThreadInit
+VFUNC(void,TkpMenuThreadInit,V_TkpMenuThreadInit,_ANSI_ARGS_((void)))
+#endif /* #ifndef TkpMenuThreadInit */
+
+#ifndef TkpOpenDisplay
+VFUNC(TkDisplay *,TkpOpenDisplay,V_TkpOpenDisplay,_ANSI_ARGS_((
+ CONST char * display_name)))
+#endif /* #ifndef TkpOpenDisplay */
+
+#ifndef TkpRedirectKeyEvent
+VFUNC(void,TkpRedirectKeyEvent,V_TkpRedirectKeyEvent,_ANSI_ARGS_((TkWindow * winPtr,
+ XEvent * eventPtr)))
+#endif /* #ifndef TkpRedirectKeyEvent */
+
+#ifndef TkpSetKeycodeAndState
+VFUNC(void,TkpSetKeycodeAndState,V_TkpSetKeycodeAndState,_ANSI_ARGS_((Tk_Window tkwin,
+ KeySym keySym, XEvent * eventPtr)))
+#endif /* #ifndef TkpSetKeycodeAndState */
+
+#ifndef TkpSetMainMenubar
+VFUNC(void,TkpSetMainMenubar,V_TkpSetMainMenubar,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, char * menuName)))
+#endif /* #ifndef TkpSetMainMenubar */
+
+#ifndef TkpUseWindow
+VFUNC(int,TkpUseWindow,V_TkpUseWindow,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Window tkwin, Tcl_Obj *string)))
+#endif /* #ifndef TkpUseWindow */
+
+#ifndef TkpWindowWasRecentlyDeleted
+VFUNC(int,TkpWindowWasRecentlyDeleted,V_TkpWindowWasRecentlyDeleted,_ANSI_ARGS_((Window win,
+ TkDisplay * dispPtr)))
+#endif /* #ifndef TkpWindowWasRecentlyDeleted */
+
+#endif /* _TKINTDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls_f.h
new file mode 100644
index 00000000000..3300cb56427
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntDecls_f.h
@@ -0,0 +1,14 @@
+#ifndef TKINTDECLS_VT
+#define TKINTDECLS_VT
+typedef struct TkintdeclsVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkIntDecls.t"
+#undef VFUNC
+#undef VVAR
+} TkintdeclsVtab;
+extern TkintdeclsVtab *TkintdeclsVptr;
+extern TkintdeclsVtab *TkintdeclsVGet(void);
+#endif /* TKINTDECLS_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.h
new file mode 100644
index 00000000000..9636f05867b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.h
@@ -0,0 +1,1227 @@
+/*
+ * tkIntPlatDecls.h --
+ *
+ * This file contains the declarations for all platform dependent
+ * unsupported functions that are exported by the Tk library. These
+ * interfaces are not guaranteed to remain the same between
+ * versions. Use at your own risk.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * All rights reserved.
+ *
+ * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.15 2002/12/08 00:46:51 hobbs Exp $
+ */
+
+#ifndef _TKINTPLATDECLS
+#define _TKINTPLATDECLS
+
+#ifdef BUILD_tk
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tkInt.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+#ifdef __WIN32__
+/* 0 */
+EXTERN char * TkAlignImageData _ANSI_ARGS_((XImage * image,
+ int alignment, int bitOrder));
+/* Slot 1 is reserved */
+/* 2 */
+EXTERN void TkGenerateActivateEvents _ANSI_ARGS_((
+ TkWindow * winPtr, int active));
+/* 3 */
+EXTERN unsigned long TkpGetMS _ANSI_ARGS_((void));
+/* 4 */
+EXTERN void TkPointerDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 5 */
+EXTERN void TkpPrintWindowId _ANSI_ARGS_((char * buf,
+ Window window));
+/* 6 */
+EXTERN int TkpScanWindowId _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * string, Window * idPtr));
+/* 7 */
+EXTERN void TkpSetCapture _ANSI_ARGS_((TkWindow * winPtr));
+/* 8 */
+EXTERN void TkpSetCursor _ANSI_ARGS_((TkpCursor cursor));
+/* 9 */
+EXTERN void TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr,
+ int state));
+/* 10 */
+EXTERN void TkSetPixmapColormap _ANSI_ARGS_((Pixmap pixmap,
+ Colormap colormap));
+/* 11 */
+EXTERN void TkWinCancelMouseTimer _ANSI_ARGS_((void));
+/* 12 */
+EXTERN void TkWinClipboardRender _ANSI_ARGS_((
+ TkDisplay * dispPtr, UINT format));
+/* 13 */
+EXTERN LRESULT TkWinEmbeddedEventProc _ANSI_ARGS_((HWND hwnd,
+ UINT message, WPARAM wParam, LPARAM lParam));
+/* 14 */
+EXTERN void TkWinFillRect _ANSI_ARGS_((HDC dc, int x, int y,
+ int width, int height, int pixel));
+/* 15 */
+EXTERN COLORREF TkWinGetBorderPixels _ANSI_ARGS_((Tk_Window tkwin,
+ Tk_3DBorder border, int which));
+/* 16 */
+EXTERN HDC TkWinGetDrawableDC _ANSI_ARGS_((Display * display,
+ Drawable d, TkWinDCState* state));
+/* 17 */
+EXTERN int TkWinGetModifierState _ANSI_ARGS_((void));
+/* 18 */
+EXTERN HPALETTE TkWinGetSystemPalette _ANSI_ARGS_((void));
+/* 19 */
+EXTERN HWND TkWinGetWrapperWindow _ANSI_ARGS_((Tk_Window tkwin));
+/* 20 */
+EXTERN int TkWinHandleMenuEvent _ANSI_ARGS_((HWND * phwnd,
+ UINT * pMessage, WPARAM * pwParam,
+ LPARAM * plParam, LRESULT * plResult));
+/* 21 */
+EXTERN int TkWinIndexOfColor _ANSI_ARGS_((XColor * colorPtr));
+/* 22 */
+EXTERN void TkWinReleaseDrawableDC _ANSI_ARGS_((Drawable d,
+ HDC hdc, TkWinDCState* state));
+/* 23 */
+EXTERN LRESULT TkWinResendEvent _ANSI_ARGS_((WNDPROC wndproc,
+ HWND hwnd, XEvent * eventPtr));
+/* 24 */
+EXTERN HPALETTE TkWinSelectPalette _ANSI_ARGS_((HDC dc,
+ Colormap colormap));
+/* 25 */
+EXTERN void TkWinSetMenu _ANSI_ARGS_((Tk_Window tkwin,
+ HMENU hMenu));
+/* 26 */
+EXTERN void TkWinSetWindowPos _ANSI_ARGS_((HWND hwnd,
+ HWND siblingHwnd, int pos));
+/* 27 */
+EXTERN void TkWinWmCleanup _ANSI_ARGS_((HINSTANCE hInstance));
+/* 28 */
+EXTERN void TkWinXCleanup _ANSI_ARGS_((HINSTANCE hInstance));
+/* 29 */
+EXTERN void TkWinXInit _ANSI_ARGS_((HINSTANCE hInstance));
+/* 30 */
+EXTERN void TkWinSetForegroundWindow _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 31 */
+EXTERN void TkWinDialogDebug _ANSI_ARGS_((int debug));
+/* 32 */
+EXTERN Tcl_Obj * TkWinGetMenuSystemDefault _ANSI_ARGS_((
+ Tk_Window tkwin, CONST char * dbName,
+ CONST char * className));
+/* 33 */
+EXTERN int TkWinGetPlatformId _ANSI_ARGS_((void));
+/* 34 */
+EXTERN void TkWinSetHINSTANCE _ANSI_ARGS_((HINSTANCE hInstance));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 0 */
+EXTERN void TkGenerateActivateEvents _ANSI_ARGS_((
+ TkWindow * winPtr, int active));
+/* Slot 1 is reserved */
+/* Slot 2 is reserved */
+/* 3 */
+EXTERN unsigned long TkpGetMS _ANSI_ARGS_((void));
+/* Slot 4 is reserved */
+/* 5 */
+EXTERN void TkPointerDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 6 */
+EXTERN void TkpSetCapture _ANSI_ARGS_((TkWindow * winPtr));
+/* 7 */
+EXTERN void TkpSetCursor _ANSI_ARGS_((TkpCursor cursor));
+/* 8 */
+EXTERN void TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr,
+ int state));
+/* Slot 9 is reserved */
+/* 10 */
+EXTERN void TkAboutDlg _ANSI_ARGS_((void));
+/* Slot 11 is reserved */
+/* Slot 12 is reserved */
+/* 13 */
+EXTERN Window TkGetTransientMaster _ANSI_ARGS_((TkWindow * winPtr));
+/* 14 */
+EXTERN int TkGenerateButtonEvent _ANSI_ARGS_((int x, int y,
+ Window window, unsigned int state));
+/* Slot 15 is reserved */
+/* 16 */
+EXTERN void TkGenWMDestroyEvent _ANSI_ARGS_((Tk_Window tkwin));
+/* Slot 17 is reserved */
+/* 18 */
+EXTERN unsigned int TkMacButtonKeyState _ANSI_ARGS_((void));
+/* 19 */
+EXTERN void TkMacClearMenubarActive _ANSI_ARGS_((void));
+/* Slot 20 is reserved */
+/* 21 */
+EXTERN int TkMacDispatchMenuEvent _ANSI_ARGS_((int menuID,
+ int index));
+/* 22 */
+EXTERN void TkMacInstallCursor _ANSI_ARGS_((int resizeOverride));
+/* Slot 23 is reserved */
+/* 24 */
+EXTERN void TkMacHandleTearoffMenu _ANSI_ARGS_((void));
+/* Slot 25 is reserved */
+/* Slot 26 is reserved */
+/* 27 */
+EXTERN void TkMacDoHLEvent _ANSI_ARGS_((EventRecord * theEvent));
+/* Slot 28 is reserved */
+/* 29 */
+EXTERN Time TkMacGenerateTime _ANSI_ARGS_((void));
+/* Slot 30 is reserved */
+/* 31 */
+EXTERN TkWindow * TkMacGetScrollbarGrowWindow _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 32 */
+EXTERN Window TkMacGetXWindow _ANSI_ARGS_((WindowRef macWinPtr));
+/* 33 */
+EXTERN int TkMacGrowToplevel _ANSI_ARGS_((WindowRef whichWindow,
+ Point start));
+/* 34 */
+EXTERN void TkMacHandleMenuSelect _ANSI_ARGS_((long mResult,
+ int optionKeyPressed));
+/* Slot 35 is reserved */
+/* Slot 36 is reserved */
+/* Slot 37 is reserved */
+/* 38 */
+EXTERN void TkMacInvalidateWindow _ANSI_ARGS_((
+ MacDrawable * macWin, int flag));
+/* 39 */
+EXTERN int TkMacIsCharacterMissing _ANSI_ARGS_((Tk_Font tkfont,
+ unsigned int searchChar));
+/* 40 */
+EXTERN void TkMacMakeRealWindowExist _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 41 */
+EXTERN BitMapPtr TkMacMakeStippleMap _ANSI_ARGS_((Drawable d1,
+ Drawable d2));
+/* 42 */
+EXTERN void TkMacMenuClick _ANSI_ARGS_((void));
+/* 43 */
+EXTERN void TkMacRegisterOffScreenWindow _ANSI_ARGS_((
+ Window window, GWorldPtr portPtr));
+/* 44 */
+EXTERN int TkMacResizable _ANSI_ARGS_((TkWindow * winPtr));
+/* Slot 45 is reserved */
+/* 46 */
+EXTERN void TkMacSetHelpMenuItemCount _ANSI_ARGS_((void));
+/* 47 */
+EXTERN void TkMacSetScrollbarGrow _ANSI_ARGS_((TkWindow * winPtr,
+ int flag));
+/* 48 */
+EXTERN void TkMacSetUpClippingRgn _ANSI_ARGS_((Drawable drawable));
+/* 49 */
+EXTERN void TkMacSetUpGraphicsPort _ANSI_ARGS_((GC gc));
+/* 50 */
+EXTERN void TkMacUpdateClipRgn _ANSI_ARGS_((TkWindow * winPtr));
+/* 51 */
+EXTERN void TkMacUnregisterMacWindow _ANSI_ARGS_((
+ GWorldPtr portPtr));
+/* 52 */
+EXTERN int TkMacUseMenuID _ANSI_ARGS_((short macID));
+/* 53 */
+EXTERN RgnHandle TkMacVisableClipRgn _ANSI_ARGS_((TkWindow * winPtr));
+/* 54 */
+EXTERN void TkMacWinBounds _ANSI_ARGS_((TkWindow * winPtr,
+ Rect * geometry));
+/* 55 */
+EXTERN void TkMacWindowOffset _ANSI_ARGS_((WindowRef wRef,
+ int * xOffset, int * yOffset));
+/* Slot 56 is reserved */
+/* 57 */
+EXTERN int TkSetMacColor _ANSI_ARGS_((unsigned long pixel,
+ RGBColor * macColor));
+/* 58 */
+EXTERN void TkSetWMName _ANSI_ARGS_((TkWindow * winPtr,
+ Tk_Uid titleUid));
+/* 59 */
+EXTERN void TkSuspendClipboard _ANSI_ARGS_((void));
+/* Slot 60 is reserved */
+/* 61 */
+EXTERN int TkMacZoomToplevel _ANSI_ARGS_((WindowPtr whichWindow,
+ Point where, short zoomPart));
+/* 62 */
+EXTERN Tk_Window Tk_TopCoordsToWindow _ANSI_ARGS_((Tk_Window tkwin,
+ int rootX, int rootY, int * newX, int * newY));
+/* 63 */
+EXTERN MacDrawable * TkMacContainerId _ANSI_ARGS_((TkWindow * winPtr));
+/* 64 */
+EXTERN MacDrawable * TkMacGetHostToplevel _ANSI_ARGS_((TkWindow * winPtr));
+/* 65 */
+EXTERN void TkMacPreprocessMenu _ANSI_ARGS_((void));
+/* 66 */
+EXTERN int TkpIsWindowFloating _ANSI_ARGS_((WindowRef window));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 0 */
+EXTERN void TkGenerateActivateEvents _ANSI_ARGS_((
+ TkWindow * winPtr, int active));
+/* Slot 1 is reserved */
+/* Slot 2 is reserved */
+/* 3 */
+EXTERN void TkPointerDeadWindow _ANSI_ARGS_((TkWindow * winPtr));
+/* 4 */
+EXTERN void TkpSetCapture _ANSI_ARGS_((TkWindow * winPtr));
+/* 5 */
+EXTERN void TkpSetCursor _ANSI_ARGS_((TkpCursor cursor));
+/* 6 */
+EXTERN void TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr,
+ int state));
+/* 7 */
+EXTERN void TkAboutDlg _ANSI_ARGS_((void));
+/* 8 */
+EXTERN unsigned int TkMacOSXButtonKeyState _ANSI_ARGS_((void));
+/* 9 */
+EXTERN void TkMacOSXClearMenubarActive _ANSI_ARGS_((void));
+/* 10 */
+EXTERN int TkMacOSXDispatchMenuEvent _ANSI_ARGS_((int menuID,
+ int index));
+/* 11 */
+EXTERN void TkMacOSXInstallCursor _ANSI_ARGS_((
+ int resizeOverride));
+/* 12 */
+EXTERN void TkMacOSXHandleTearoffMenu _ANSI_ARGS_((void));
+/* Slot 13 is reserved */
+/* 14 */
+EXTERN int TkMacOSXDoHLEvent _ANSI_ARGS_((
+ EventRecord * theEvent));
+/* Slot 15 is reserved */
+/* 16 */
+EXTERN Window TkMacOSXGetXWindow _ANSI_ARGS_((WindowRef macWinPtr));
+/* 17 */
+EXTERN int TkMacOSXGrowToplevel _ANSI_ARGS_((
+ WindowRef whichWindow, Point start));
+/* 18 */
+EXTERN void TkMacOSXHandleMenuSelect _ANSI_ARGS_((long mResult,
+ int optionKeyPressed));
+/* Slot 19 is reserved */
+/* Slot 20 is reserved */
+/* 21 */
+EXTERN void TkMacOSXInvalidateWindow _ANSI_ARGS_((
+ MacDrawable * macWin, int flag));
+/* 22 */
+EXTERN int TkMacOSXIsCharacterMissing _ANSI_ARGS_((
+ Tk_Font tkfont, unsigned int searchChar));
+/* 23 */
+EXTERN void TkMacOSXMakeRealWindowExist _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 24 */
+EXTERN BitMapPtr TkMacOSXMakeStippleMap _ANSI_ARGS_((Drawable d1,
+ Drawable d2));
+/* 25 */
+EXTERN void TkMacOSXMenuClick _ANSI_ARGS_((void));
+/* 26 */
+EXTERN void TkMacOSXRegisterOffScreenWindow _ANSI_ARGS_((
+ Window window, GWorldPtr portPtr));
+/* 27 */
+EXTERN int TkMacOSXResizable _ANSI_ARGS_((TkWindow * winPtr));
+/* 28 */
+EXTERN void TkMacOSXSetHelpMenuItemCount _ANSI_ARGS_((void));
+/* 29 */
+EXTERN void TkMacOSXSetScrollbarGrow _ANSI_ARGS_((
+ TkWindow * winPtr, int flag));
+/* 30 */
+EXTERN void TkMacOSXSetUpClippingRgn _ANSI_ARGS_((
+ Drawable drawable));
+/* 31 */
+EXTERN void TkMacOSXSetUpGraphicsPort _ANSI_ARGS_((GC gc,
+ GWorldPtr destPort));
+/* 32 */
+EXTERN void TkMacOSXUpdateClipRgn _ANSI_ARGS_((TkWindow * winPtr));
+/* 33 */
+EXTERN void TkMacOSXUnregisterMacWindow _ANSI_ARGS_((
+ WindowRef portPtr));
+/* 34 */
+EXTERN int TkMacOSXUseMenuID _ANSI_ARGS_((short macID));
+/* 35 */
+EXTERN RgnHandle TkMacOSXVisableClipRgn _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 36 */
+EXTERN void TkMacOSXWinBounds _ANSI_ARGS_((TkWindow * winPtr,
+ Rect * geometry));
+/* 37 */
+EXTERN void TkMacOSXWindowOffset _ANSI_ARGS_((WindowRef wRef,
+ int * xOffset, int * yOffset));
+/* 38 */
+EXTERN int TkSetMacColor _ANSI_ARGS_((unsigned long pixel,
+ RGBColor * macColor));
+/* 39 */
+EXTERN void TkSetWMName _ANSI_ARGS_((TkWindow * winPtr,
+ Tk_Uid titleUid));
+/* 40 */
+EXTERN void TkSuspendClipboard _ANSI_ARGS_((void));
+/* 41 */
+EXTERN int TkMacOSXZoomToplevel _ANSI_ARGS_((
+ WindowPtr whichWindow, Point where,
+ short zoomPart));
+/* 42 */
+EXTERN Tk_Window Tk_TopCoordsToWindow _ANSI_ARGS_((Tk_Window tkwin,
+ int rootX, int rootY, int * newX, int * newY));
+/* 43 */
+EXTERN MacDrawable * TkMacOSXContainerId _ANSI_ARGS_((TkWindow * winPtr));
+/* 44 */
+EXTERN MacDrawable * TkMacOSXGetHostToplevel _ANSI_ARGS_((
+ TkWindow * winPtr));
+/* 45 */
+EXTERN void TkMacOSXPreprocessMenu _ANSI_ARGS_((void));
+/* 46 */
+EXTERN int TkpIsWindowFloating _ANSI_ARGS_((WindowRef window));
+/* 47 */
+EXTERN Tk_Window TkMacOSXGetCapture _ANSI_ARGS_((void));
+/* Slot 48 is reserved */
+/* 49 */
+EXTERN Window TkGetTransientMaster _ANSI_ARGS_((TkWindow * winPtr));
+/* 50 */
+EXTERN int TkGenerateButtonEvent _ANSI_ARGS_((int x, int y,
+ Window window, unsigned int state));
+/* 51 */
+EXTERN void TkGenWMDestroyEvent _ANSI_ARGS_((Tk_Window tkwin));
+/* Slot 52 is reserved */
+/* 53 */
+EXTERN unsigned long TkpGetMS _ANSI_ARGS_((void));
+#endif /* MAC_OSX_TK */
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
+/* 0 */
+EXTERN void TkCreateXEventSource _ANSI_ARGS_((void));
+/* 1 */
+EXTERN void TkFreeWindowId _ANSI_ARGS_((TkDisplay * dispPtr,
+ Window w));
+/* 2 */
+EXTERN void TkInitXId _ANSI_ARGS_((TkDisplay * dispPtr));
+/* 3 */
+EXTERN int TkpCmapStressed _ANSI_ARGS_((Tk_Window tkwin,
+ Colormap colormap));
+/* 4 */
+EXTERN void TkpSync _ANSI_ARGS_((Display * display));
+/* 5 */
+EXTERN Window TkUnixContainerId _ANSI_ARGS_((TkWindow * winPtr));
+/* 6 */
+EXTERN int TkUnixDoOneXEvent _ANSI_ARGS_((Tcl_Time * timePtr));
+/* 7 */
+EXTERN void TkUnixSetMenubar _ANSI_ARGS_((Tk_Window tkwin,
+ Tk_Window menubar));
+/* 8 */
+EXTERN int TkpScanWindowId _ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj *string, Window * idPtr));
+/* 9 */
+EXTERN void TkWmCleanup _ANSI_ARGS_((TkDisplay * dispPtr));
+/* 10 */
+EXTERN void TkSendCleanup _ANSI_ARGS_((TkDisplay * dispPtr));
+/* 11 */
+EXTERN void TkFreeXId _ANSI_ARGS_((TkDisplay * dispPtr));
+/* 12 */
+EXTERN int TkpWmSetState _ANSI_ARGS_((TkWindow * winPtr,
+ int state));
+#endif /* X11 */
+
+typedef struct TkIntPlatStubs {
+ int magic;
+ struct TkIntPlatStubHooks *hooks;
+
+#ifdef __WIN32__
+ char * (*tkAlignImageData) _ANSI_ARGS_((XImage * image, int alignment, int bitOrder)); /* 0 */
+ void *reserved1;
+ void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 2 */
+ unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 3 */
+ void (*tkPointerDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 4 */
+ void (*tkpPrintWindowId) _ANSI_ARGS_((char * buf, Window window)); /* 5 */
+ int (*tkpScanWindowId) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, Window * idPtr)); /* 6 */
+ void (*tkpSetCapture) _ANSI_ARGS_((TkWindow * winPtr)); /* 7 */
+ void (*tkpSetCursor) _ANSI_ARGS_((TkpCursor cursor)); /* 8 */
+ void (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 9 */
+ void (*tkSetPixmapColormap) _ANSI_ARGS_((Pixmap pixmap, Colormap colormap)); /* 10 */
+ void (*tkWinCancelMouseTimer) _ANSI_ARGS_((void)); /* 11 */
+ void (*tkWinClipboardRender) _ANSI_ARGS_((TkDisplay * dispPtr, UINT format)); /* 12 */
+ LRESULT (*tkWinEmbeddedEventProc) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)); /* 13 */
+ void (*tkWinFillRect) _ANSI_ARGS_((HDC dc, int x, int y, int width, int height, int pixel)); /* 14 */
+ COLORREF (*tkWinGetBorderPixels) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int which)); /* 15 */
+ HDC (*tkWinGetDrawableDC) _ANSI_ARGS_((Display * display, Drawable d, TkWinDCState* state)); /* 16 */
+ int (*tkWinGetModifierState) _ANSI_ARGS_((void)); /* 17 */
+ HPALETTE (*tkWinGetSystemPalette) _ANSI_ARGS_((void)); /* 18 */
+ HWND (*tkWinGetWrapperWindow) _ANSI_ARGS_((Tk_Window tkwin)); /* 19 */
+ int (*tkWinHandleMenuEvent) _ANSI_ARGS_((HWND * phwnd, UINT * pMessage, WPARAM * pwParam, LPARAM * plParam, LRESULT * plResult)); /* 20 */
+ int (*tkWinIndexOfColor) _ANSI_ARGS_((XColor * colorPtr)); /* 21 */
+ void (*tkWinReleaseDrawableDC) _ANSI_ARGS_((Drawable d, HDC hdc, TkWinDCState* state)); /* 22 */
+ LRESULT (*tkWinResendEvent) _ANSI_ARGS_((WNDPROC wndproc, HWND hwnd, XEvent * eventPtr)); /* 23 */
+ HPALETTE (*tkWinSelectPalette) _ANSI_ARGS_((HDC dc, Colormap colormap)); /* 24 */
+ void (*tkWinSetMenu) _ANSI_ARGS_((Tk_Window tkwin, HMENU hMenu)); /* 25 */
+ void (*tkWinSetWindowPos) _ANSI_ARGS_((HWND hwnd, HWND siblingHwnd, int pos)); /* 26 */
+ void (*tkWinWmCleanup) _ANSI_ARGS_((HINSTANCE hInstance)); /* 27 */
+ void (*tkWinXCleanup) _ANSI_ARGS_((HINSTANCE hInstance)); /* 28 */
+ void (*tkWinXInit) _ANSI_ARGS_((HINSTANCE hInstance)); /* 29 */
+ void (*tkWinSetForegroundWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 30 */
+ void (*tkWinDialogDebug) _ANSI_ARGS_((int debug)); /* 31 */
+ Tcl_Obj * (*tkWinGetMenuSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, CONST char * dbName, CONST char * className)); /* 32 */
+ int (*tkWinGetPlatformId) _ANSI_ARGS_((void)); /* 33 */
+ void (*tkWinSetHINSTANCE) _ANSI_ARGS_((HINSTANCE hInstance)); /* 34 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */
+ void *reserved1;
+ void *reserved2;
+ unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 3 */
+ void *reserved4;
+ void (*tkPointerDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 5 */
+ void (*tkpSetCapture) _ANSI_ARGS_((TkWindow * winPtr)); /* 6 */
+ void (*tkpSetCursor) _ANSI_ARGS_((TkpCursor cursor)); /* 7 */
+ void (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 8 */
+ void *reserved9;
+ void (*tkAboutDlg) _ANSI_ARGS_((void)); /* 10 */
+ void *reserved11;
+ void *reserved12;
+ Window (*tkGetTransientMaster) _ANSI_ARGS_((TkWindow * winPtr)); /* 13 */
+ int (*tkGenerateButtonEvent) _ANSI_ARGS_((int x, int y, Window window, unsigned int state)); /* 14 */
+ void *reserved15;
+ void (*tkGenWMDestroyEvent) _ANSI_ARGS_((Tk_Window tkwin)); /* 16 */
+ void *reserved17;
+ unsigned int (*tkMacButtonKeyState) _ANSI_ARGS_((void)); /* 18 */
+ void (*tkMacClearMenubarActive) _ANSI_ARGS_((void)); /* 19 */
+ void *reserved20;
+ int (*tkMacDispatchMenuEvent) _ANSI_ARGS_((int menuID, int index)); /* 21 */
+ void (*tkMacInstallCursor) _ANSI_ARGS_((int resizeOverride)); /* 22 */
+ void *reserved23;
+ void (*tkMacHandleTearoffMenu) _ANSI_ARGS_((void)); /* 24 */
+ void *reserved25;
+ void *reserved26;
+ void (*tkMacDoHLEvent) _ANSI_ARGS_((EventRecord * theEvent)); /* 27 */
+ void *reserved28;
+ Time (*tkMacGenerateTime) _ANSI_ARGS_((void)); /* 29 */
+ void *reserved30;
+ TkWindow * (*tkMacGetScrollbarGrowWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 31 */
+ Window (*tkMacGetXWindow) _ANSI_ARGS_((WindowRef macWinPtr)); /* 32 */
+ int (*tkMacGrowToplevel) _ANSI_ARGS_((WindowRef whichWindow, Point start)); /* 33 */
+ void (*tkMacHandleMenuSelect) _ANSI_ARGS_((long mResult, int optionKeyPressed)); /* 34 */
+ void *reserved35;
+ void *reserved36;
+ void *reserved37;
+ void (*tkMacInvalidateWindow) _ANSI_ARGS_((MacDrawable * macWin, int flag)); /* 38 */
+ int (*tkMacIsCharacterMissing) _ANSI_ARGS_((Tk_Font tkfont, unsigned int searchChar)); /* 39 */
+ void (*tkMacMakeRealWindowExist) _ANSI_ARGS_((TkWindow * winPtr)); /* 40 */
+ BitMapPtr (*tkMacMakeStippleMap) _ANSI_ARGS_((Drawable d1, Drawable d2)); /* 41 */
+ void (*tkMacMenuClick) _ANSI_ARGS_((void)); /* 42 */
+ void (*tkMacRegisterOffScreenWindow) _ANSI_ARGS_((Window window, GWorldPtr portPtr)); /* 43 */
+ int (*tkMacResizable) _ANSI_ARGS_((TkWindow * winPtr)); /* 44 */
+ void *reserved45;
+ void (*tkMacSetHelpMenuItemCount) _ANSI_ARGS_((void)); /* 46 */
+ void (*tkMacSetScrollbarGrow) _ANSI_ARGS_((TkWindow * winPtr, int flag)); /* 47 */
+ void (*tkMacSetUpClippingRgn) _ANSI_ARGS_((Drawable drawable)); /* 48 */
+ void (*tkMacSetUpGraphicsPort) _ANSI_ARGS_((GC gc)); /* 49 */
+ void (*tkMacUpdateClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 50 */
+ void (*tkMacUnregisterMacWindow) _ANSI_ARGS_((GWorldPtr portPtr)); /* 51 */
+ int (*tkMacUseMenuID) _ANSI_ARGS_((short macID)); /* 52 */
+ RgnHandle (*tkMacVisableClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 53 */
+ void (*tkMacWinBounds) _ANSI_ARGS_((TkWindow * winPtr, Rect * geometry)); /* 54 */
+ void (*tkMacWindowOffset) _ANSI_ARGS_((WindowRef wRef, int * xOffset, int * yOffset)); /* 55 */
+ void *reserved56;
+ int (*tkSetMacColor) _ANSI_ARGS_((unsigned long pixel, RGBColor * macColor)); /* 57 */
+ void (*tkSetWMName) _ANSI_ARGS_((TkWindow * winPtr, Tk_Uid titleUid)); /* 58 */
+ void (*tkSuspendClipboard) _ANSI_ARGS_((void)); /* 59 */
+ void *reserved60;
+ int (*tkMacZoomToplevel) _ANSI_ARGS_((WindowPtr whichWindow, Point where, short zoomPart)); /* 61 */
+ Tk_Window (*tk_TopCoordsToWindow) _ANSI_ARGS_((Tk_Window tkwin, int rootX, int rootY, int * newX, int * newY)); /* 62 */
+ MacDrawable * (*tkMacContainerId) _ANSI_ARGS_((TkWindow * winPtr)); /* 63 */
+ MacDrawable * (*tkMacGetHostToplevel) _ANSI_ARGS_((TkWindow * winPtr)); /* 64 */
+ void (*tkMacPreprocessMenu) _ANSI_ARGS_((void)); /* 65 */
+ int (*tkpIsWindowFloating) _ANSI_ARGS_((WindowRef window)); /* 66 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */
+ void *reserved1;
+ void *reserved2;
+ void (*tkPointerDeadWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 3 */
+ void (*tkpSetCapture) _ANSI_ARGS_((TkWindow * winPtr)); /* 4 */
+ void (*tkpSetCursor) _ANSI_ARGS_((TkpCursor cursor)); /* 5 */
+ void (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 6 */
+ void (*tkAboutDlg) _ANSI_ARGS_((void)); /* 7 */
+ unsigned int (*tkMacOSXButtonKeyState) _ANSI_ARGS_((void)); /* 8 */
+ void (*tkMacOSXClearMenubarActive) _ANSI_ARGS_((void)); /* 9 */
+ int (*tkMacOSXDispatchMenuEvent) _ANSI_ARGS_((int menuID, int index)); /* 10 */
+ void (*tkMacOSXInstallCursor) _ANSI_ARGS_((int resizeOverride)); /* 11 */
+ void (*tkMacOSXHandleTearoffMenu) _ANSI_ARGS_((void)); /* 12 */
+ void *reserved13;
+ int (*tkMacOSXDoHLEvent) _ANSI_ARGS_((EventRecord * theEvent)); /* 14 */
+ void *reserved15;
+ Window (*tkMacOSXGetXWindow) _ANSI_ARGS_((WindowRef macWinPtr)); /* 16 */
+ int (*tkMacOSXGrowToplevel) _ANSI_ARGS_((WindowRef whichWindow, Point start)); /* 17 */
+ void (*tkMacOSXHandleMenuSelect) _ANSI_ARGS_((long mResult, int optionKeyPressed)); /* 18 */
+ void *reserved19;
+ void *reserved20;
+ void (*tkMacOSXInvalidateWindow) _ANSI_ARGS_((MacDrawable * macWin, int flag)); /* 21 */
+ int (*tkMacOSXIsCharacterMissing) _ANSI_ARGS_((Tk_Font tkfont, unsigned int searchChar)); /* 22 */
+ void (*tkMacOSXMakeRealWindowExist) _ANSI_ARGS_((TkWindow * winPtr)); /* 23 */
+ BitMapPtr (*tkMacOSXMakeStippleMap) _ANSI_ARGS_((Drawable d1, Drawable d2)); /* 24 */
+ void (*tkMacOSXMenuClick) _ANSI_ARGS_((void)); /* 25 */
+ void (*tkMacOSXRegisterOffScreenWindow) _ANSI_ARGS_((Window window, GWorldPtr portPtr)); /* 26 */
+ int (*tkMacOSXResizable) _ANSI_ARGS_((TkWindow * winPtr)); /* 27 */
+ void (*tkMacOSXSetHelpMenuItemCount) _ANSI_ARGS_((void)); /* 28 */
+ void (*tkMacOSXSetScrollbarGrow) _ANSI_ARGS_((TkWindow * winPtr, int flag)); /* 29 */
+ void (*tkMacOSXSetUpClippingRgn) _ANSI_ARGS_((Drawable drawable)); /* 30 */
+ void (*tkMacOSXSetUpGraphicsPort) _ANSI_ARGS_((GC gc, GWorldPtr destPort)); /* 31 */
+ void (*tkMacOSXUpdateClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 32 */
+ void (*tkMacOSXUnregisterMacWindow) _ANSI_ARGS_((WindowRef portPtr)); /* 33 */
+ int (*tkMacOSXUseMenuID) _ANSI_ARGS_((short macID)); /* 34 */
+ RgnHandle (*tkMacOSXVisableClipRgn) _ANSI_ARGS_((TkWindow * winPtr)); /* 35 */
+ void (*tkMacOSXWinBounds) _ANSI_ARGS_((TkWindow * winPtr, Rect * geometry)); /* 36 */
+ void (*tkMacOSXWindowOffset) _ANSI_ARGS_((WindowRef wRef, int * xOffset, int * yOffset)); /* 37 */
+ int (*tkSetMacColor) _ANSI_ARGS_((unsigned long pixel, RGBColor * macColor)); /* 38 */
+ void (*tkSetWMName) _ANSI_ARGS_((TkWindow * winPtr, Tk_Uid titleUid)); /* 39 */
+ void (*tkSuspendClipboard) _ANSI_ARGS_((void)); /* 40 */
+ int (*tkMacOSXZoomToplevel) _ANSI_ARGS_((WindowPtr whichWindow, Point where, short zoomPart)); /* 41 */
+ Tk_Window (*tk_TopCoordsToWindow) _ANSI_ARGS_((Tk_Window tkwin, int rootX, int rootY, int * newX, int * newY)); /* 42 */
+ MacDrawable * (*tkMacOSXContainerId) _ANSI_ARGS_((TkWindow * winPtr)); /* 43 */
+ MacDrawable * (*tkMacOSXGetHostToplevel) _ANSI_ARGS_((TkWindow * winPtr)); /* 44 */
+ void (*tkMacOSXPreprocessMenu) _ANSI_ARGS_((void)); /* 45 */
+ int (*tkpIsWindowFloating) _ANSI_ARGS_((WindowRef window)); /* 46 */
+ Tk_Window (*tkMacOSXGetCapture) _ANSI_ARGS_((void)); /* 47 */
+ void *reserved48;
+ Window (*tkGetTransientMaster) _ANSI_ARGS_((TkWindow * winPtr)); /* 49 */
+ int (*tkGenerateButtonEvent) _ANSI_ARGS_((int x, int y, Window window, unsigned int state)); /* 50 */
+ void (*tkGenWMDestroyEvent) _ANSI_ARGS_((Tk_Window tkwin)); /* 51 */
+ void *reserved52;
+ unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 53 */
+#endif /* MAC_OSX_TK */
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
+ void (*tkCreateXEventSource) _ANSI_ARGS_((void)); /* 0 */
+ void (*tkFreeWindowId) _ANSI_ARGS_((TkDisplay * dispPtr, Window w)); /* 1 */
+ void (*tkInitXId) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 2 */
+ int (*tkpCmapStressed) _ANSI_ARGS_((Tk_Window tkwin, Colormap colormap)); /* 3 */
+ void (*tkpSync) _ANSI_ARGS_((Display * display)); /* 4 */
+ Window (*tkUnixContainerId) _ANSI_ARGS_((TkWindow * winPtr)); /* 5 */
+ int (*tkUnixDoOneXEvent) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 6 */
+ void (*tkUnixSetMenubar) _ANSI_ARGS_((Tk_Window tkwin, Tk_Window menubar)); /* 7 */
+ int (*tkpScanWindowId) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, Window * idPtr)); /* 8 */
+ void (*tkWmCleanup) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 9 */
+ void (*tkSendCleanup) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 10 */
+ void (*tkFreeXId) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 11 */
+ int (*tkpWmSetState) _ANSI_ARGS_((TkWindow * winPtr, int state)); /* 12 */
+#endif /* X11 */
+} TkIntPlatStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TkIntPlatStubs *tkIntPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifdef __WIN32__
+#ifndef TkAlignImageData
+#define TkAlignImageData \
+ (tkIntPlatStubsPtr->tkAlignImageData) /* 0 */
+#endif
+/* Slot 1 is reserved */
+#ifndef TkGenerateActivateEvents
+#define TkGenerateActivateEvents \
+ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */
+#endif
+#ifndef TkpGetMS
+#define TkpGetMS \
+ (tkIntPlatStubsPtr->tkpGetMS) /* 3 */
+#endif
+#ifndef TkPointerDeadWindow
+#define TkPointerDeadWindow \
+ (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 4 */
+#endif
+#ifndef TkpPrintWindowId
+#define TkpPrintWindowId \
+ (tkIntPlatStubsPtr->tkpPrintWindowId) /* 5 */
+#endif
+#ifndef TkpScanWindowId
+#define TkpScanWindowId \
+ (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */
+#endif
+#ifndef TkpSetCapture
+#define TkpSetCapture \
+ (tkIntPlatStubsPtr->tkpSetCapture) /* 7 */
+#endif
+#ifndef TkpSetCursor
+#define TkpSetCursor \
+ (tkIntPlatStubsPtr->tkpSetCursor) /* 8 */
+#endif
+#ifndef TkpWmSetState
+#define TkpWmSetState \
+ (tkIntPlatStubsPtr->tkpWmSetState) /* 9 */
+#endif
+#ifndef TkSetPixmapColormap
+#define TkSetPixmapColormap \
+ (tkIntPlatStubsPtr->tkSetPixmapColormap) /* 10 */
+#endif
+#ifndef TkWinCancelMouseTimer
+#define TkWinCancelMouseTimer \
+ (tkIntPlatStubsPtr->tkWinCancelMouseTimer) /* 11 */
+#endif
+#ifndef TkWinClipboardRender
+#define TkWinClipboardRender \
+ (tkIntPlatStubsPtr->tkWinClipboardRender) /* 12 */
+#endif
+#ifndef TkWinEmbeddedEventProc
+#define TkWinEmbeddedEventProc \
+ (tkIntPlatStubsPtr->tkWinEmbeddedEventProc) /* 13 */
+#endif
+#ifndef TkWinFillRect
+#define TkWinFillRect \
+ (tkIntPlatStubsPtr->tkWinFillRect) /* 14 */
+#endif
+#ifndef TkWinGetBorderPixels
+#define TkWinGetBorderPixels \
+ (tkIntPlatStubsPtr->tkWinGetBorderPixels) /* 15 */
+#endif
+#ifndef TkWinGetDrawableDC
+#define TkWinGetDrawableDC \
+ (tkIntPlatStubsPtr->tkWinGetDrawableDC) /* 16 */
+#endif
+#ifndef TkWinGetModifierState
+#define TkWinGetModifierState \
+ (tkIntPlatStubsPtr->tkWinGetModifierState) /* 17 */
+#endif
+#ifndef TkWinGetSystemPalette
+#define TkWinGetSystemPalette \
+ (tkIntPlatStubsPtr->tkWinGetSystemPalette) /* 18 */
+#endif
+#ifndef TkWinGetWrapperWindow
+#define TkWinGetWrapperWindow \
+ (tkIntPlatStubsPtr->tkWinGetWrapperWindow) /* 19 */
+#endif
+#ifndef TkWinHandleMenuEvent
+#define TkWinHandleMenuEvent \
+ (tkIntPlatStubsPtr->tkWinHandleMenuEvent) /* 20 */
+#endif
+#ifndef TkWinIndexOfColor
+#define TkWinIndexOfColor \
+ (tkIntPlatStubsPtr->tkWinIndexOfColor) /* 21 */
+#endif
+#ifndef TkWinReleaseDrawableDC
+#define TkWinReleaseDrawableDC \
+ (tkIntPlatStubsPtr->tkWinReleaseDrawableDC) /* 22 */
+#endif
+#ifndef TkWinResendEvent
+#define TkWinResendEvent \
+ (tkIntPlatStubsPtr->tkWinResendEvent) /* 23 */
+#endif
+#ifndef TkWinSelectPalette
+#define TkWinSelectPalette \
+ (tkIntPlatStubsPtr->tkWinSelectPalette) /* 24 */
+#endif
+#ifndef TkWinSetMenu
+#define TkWinSetMenu \
+ (tkIntPlatStubsPtr->tkWinSetMenu) /* 25 */
+#endif
+#ifndef TkWinSetWindowPos
+#define TkWinSetWindowPos \
+ (tkIntPlatStubsPtr->tkWinSetWindowPos) /* 26 */
+#endif
+#ifndef TkWinWmCleanup
+#define TkWinWmCleanup \
+ (tkIntPlatStubsPtr->tkWinWmCleanup) /* 27 */
+#endif
+#ifndef TkWinXCleanup
+#define TkWinXCleanup \
+ (tkIntPlatStubsPtr->tkWinXCleanup) /* 28 */
+#endif
+#ifndef TkWinXInit
+#define TkWinXInit \
+ (tkIntPlatStubsPtr->tkWinXInit) /* 29 */
+#endif
+#ifndef TkWinSetForegroundWindow
+#define TkWinSetForegroundWindow \
+ (tkIntPlatStubsPtr->tkWinSetForegroundWindow) /* 30 */
+#endif
+#ifndef TkWinDialogDebug
+#define TkWinDialogDebug \
+ (tkIntPlatStubsPtr->tkWinDialogDebug) /* 31 */
+#endif
+#ifndef TkWinGetMenuSystemDefault
+#define TkWinGetMenuSystemDefault \
+ (tkIntPlatStubsPtr->tkWinGetMenuSystemDefault) /* 32 */
+#endif
+#ifndef TkWinGetPlatformId
+#define TkWinGetPlatformId \
+ (tkIntPlatStubsPtr->tkWinGetPlatformId) /* 33 */
+#endif
+#ifndef TkWinSetHINSTANCE
+#define TkWinSetHINSTANCE \
+ (tkIntPlatStubsPtr->tkWinSetHINSTANCE) /* 34 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef TkGenerateActivateEvents
+#define TkGenerateActivateEvents \
+ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */
+#endif
+/* Slot 1 is reserved */
+/* Slot 2 is reserved */
+#ifndef TkpGetMS
+#define TkpGetMS \
+ (tkIntPlatStubsPtr->tkpGetMS) /* 3 */
+#endif
+/* Slot 4 is reserved */
+#ifndef TkPointerDeadWindow
+#define TkPointerDeadWindow \
+ (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 5 */
+#endif
+#ifndef TkpSetCapture
+#define TkpSetCapture \
+ (tkIntPlatStubsPtr->tkpSetCapture) /* 6 */
+#endif
+#ifndef TkpSetCursor
+#define TkpSetCursor \
+ (tkIntPlatStubsPtr->tkpSetCursor) /* 7 */
+#endif
+#ifndef TkpWmSetState
+#define TkpWmSetState \
+ (tkIntPlatStubsPtr->tkpWmSetState) /* 8 */
+#endif
+/* Slot 9 is reserved */
+#ifndef TkAboutDlg
+#define TkAboutDlg \
+ (tkIntPlatStubsPtr->tkAboutDlg) /* 10 */
+#endif
+/* Slot 11 is reserved */
+/* Slot 12 is reserved */
+#ifndef TkGetTransientMaster
+#define TkGetTransientMaster \
+ (tkIntPlatStubsPtr->tkGetTransientMaster) /* 13 */
+#endif
+#ifndef TkGenerateButtonEvent
+#define TkGenerateButtonEvent \
+ (tkIntPlatStubsPtr->tkGenerateButtonEvent) /* 14 */
+#endif
+/* Slot 15 is reserved */
+#ifndef TkGenWMDestroyEvent
+#define TkGenWMDestroyEvent \
+ (tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 16 */
+#endif
+/* Slot 17 is reserved */
+#ifndef TkMacButtonKeyState
+#define TkMacButtonKeyState \
+ (tkIntPlatStubsPtr->tkMacButtonKeyState) /* 18 */
+#endif
+#ifndef TkMacClearMenubarActive
+#define TkMacClearMenubarActive \
+ (tkIntPlatStubsPtr->tkMacClearMenubarActive) /* 19 */
+#endif
+/* Slot 20 is reserved */
+#ifndef TkMacDispatchMenuEvent
+#define TkMacDispatchMenuEvent \
+ (tkIntPlatStubsPtr->tkMacDispatchMenuEvent) /* 21 */
+#endif
+#ifndef TkMacInstallCursor
+#define TkMacInstallCursor \
+ (tkIntPlatStubsPtr->tkMacInstallCursor) /* 22 */
+#endif
+/* Slot 23 is reserved */
+#ifndef TkMacHandleTearoffMenu
+#define TkMacHandleTearoffMenu \
+ (tkIntPlatStubsPtr->tkMacHandleTearoffMenu) /* 24 */
+#endif
+/* Slot 25 is reserved */
+/* Slot 26 is reserved */
+#ifndef TkMacDoHLEvent
+#define TkMacDoHLEvent \
+ (tkIntPlatStubsPtr->tkMacDoHLEvent) /* 27 */
+#endif
+/* Slot 28 is reserved */
+#ifndef TkMacGenerateTime
+#define TkMacGenerateTime \
+ (tkIntPlatStubsPtr->tkMacGenerateTime) /* 29 */
+#endif
+/* Slot 30 is reserved */
+#ifndef TkMacGetScrollbarGrowWindow
+#define TkMacGetScrollbarGrowWindow \
+ (tkIntPlatStubsPtr->tkMacGetScrollbarGrowWindow) /* 31 */
+#endif
+#ifndef TkMacGetXWindow
+#define TkMacGetXWindow \
+ (tkIntPlatStubsPtr->tkMacGetXWindow) /* 32 */
+#endif
+#ifndef TkMacGrowToplevel
+#define TkMacGrowToplevel \
+ (tkIntPlatStubsPtr->tkMacGrowToplevel) /* 33 */
+#endif
+#ifndef TkMacHandleMenuSelect
+#define TkMacHandleMenuSelect \
+ (tkIntPlatStubsPtr->tkMacHandleMenuSelect) /* 34 */
+#endif
+/* Slot 35 is reserved */
+/* Slot 36 is reserved */
+/* Slot 37 is reserved */
+#ifndef TkMacInvalidateWindow
+#define TkMacInvalidateWindow \
+ (tkIntPlatStubsPtr->tkMacInvalidateWindow) /* 38 */
+#endif
+#ifndef TkMacIsCharacterMissing
+#define TkMacIsCharacterMissing \
+ (tkIntPlatStubsPtr->tkMacIsCharacterMissing) /* 39 */
+#endif
+#ifndef TkMacMakeRealWindowExist
+#define TkMacMakeRealWindowExist \
+ (tkIntPlatStubsPtr->tkMacMakeRealWindowExist) /* 40 */
+#endif
+#ifndef TkMacMakeStippleMap
+#define TkMacMakeStippleMap \
+ (tkIntPlatStubsPtr->tkMacMakeStippleMap) /* 41 */
+#endif
+#ifndef TkMacMenuClick
+#define TkMacMenuClick \
+ (tkIntPlatStubsPtr->tkMacMenuClick) /* 42 */
+#endif
+#ifndef TkMacRegisterOffScreenWindow
+#define TkMacRegisterOffScreenWindow \
+ (tkIntPlatStubsPtr->tkMacRegisterOffScreenWindow) /* 43 */
+#endif
+#ifndef TkMacResizable
+#define TkMacResizable \
+ (tkIntPlatStubsPtr->tkMacResizable) /* 44 */
+#endif
+/* Slot 45 is reserved */
+#ifndef TkMacSetHelpMenuItemCount
+#define TkMacSetHelpMenuItemCount \
+ (tkIntPlatStubsPtr->tkMacSetHelpMenuItemCount) /* 46 */
+#endif
+#ifndef TkMacSetScrollbarGrow
+#define TkMacSetScrollbarGrow \
+ (tkIntPlatStubsPtr->tkMacSetScrollbarGrow) /* 47 */
+#endif
+#ifndef TkMacSetUpClippingRgn
+#define TkMacSetUpClippingRgn \
+ (tkIntPlatStubsPtr->tkMacSetUpClippingRgn) /* 48 */
+#endif
+#ifndef TkMacSetUpGraphicsPort
+#define TkMacSetUpGraphicsPort \
+ (tkIntPlatStubsPtr->tkMacSetUpGraphicsPort) /* 49 */
+#endif
+#ifndef TkMacUpdateClipRgn
+#define TkMacUpdateClipRgn \
+ (tkIntPlatStubsPtr->tkMacUpdateClipRgn) /* 50 */
+#endif
+#ifndef TkMacUnregisterMacWindow
+#define TkMacUnregisterMacWindow \
+ (tkIntPlatStubsPtr->tkMacUnregisterMacWindow) /* 51 */
+#endif
+#ifndef TkMacUseMenuID
+#define TkMacUseMenuID \
+ (tkIntPlatStubsPtr->tkMacUseMenuID) /* 52 */
+#endif
+#ifndef TkMacVisableClipRgn
+#define TkMacVisableClipRgn \
+ (tkIntPlatStubsPtr->tkMacVisableClipRgn) /* 53 */
+#endif
+#ifndef TkMacWinBounds
+#define TkMacWinBounds \
+ (tkIntPlatStubsPtr->tkMacWinBounds) /* 54 */
+#endif
+#ifndef TkMacWindowOffset
+#define TkMacWindowOffset \
+ (tkIntPlatStubsPtr->tkMacWindowOffset) /* 55 */
+#endif
+/* Slot 56 is reserved */
+#ifndef TkSetMacColor
+#define TkSetMacColor \
+ (tkIntPlatStubsPtr->tkSetMacColor) /* 57 */
+#endif
+#ifndef TkSetWMName
+#define TkSetWMName \
+ (tkIntPlatStubsPtr->tkSetWMName) /* 58 */
+#endif
+#ifndef TkSuspendClipboard
+#define TkSuspendClipboard \
+ (tkIntPlatStubsPtr->tkSuspendClipboard) /* 59 */
+#endif
+/* Slot 60 is reserved */
+#ifndef TkMacZoomToplevel
+#define TkMacZoomToplevel \
+ (tkIntPlatStubsPtr->tkMacZoomToplevel) /* 61 */
+#endif
+#ifndef Tk_TopCoordsToWindow
+#define Tk_TopCoordsToWindow \
+ (tkIntPlatStubsPtr->tk_TopCoordsToWindow) /* 62 */
+#endif
+#ifndef TkMacContainerId
+#define TkMacContainerId \
+ (tkIntPlatStubsPtr->tkMacContainerId) /* 63 */
+#endif
+#ifndef TkMacGetHostToplevel
+#define TkMacGetHostToplevel \
+ (tkIntPlatStubsPtr->tkMacGetHostToplevel) /* 64 */
+#endif
+#ifndef TkMacPreprocessMenu
+#define TkMacPreprocessMenu \
+ (tkIntPlatStubsPtr->tkMacPreprocessMenu) /* 65 */
+#endif
+#ifndef TkpIsWindowFloating
+#define TkpIsWindowFloating \
+ (tkIntPlatStubsPtr->tkpIsWindowFloating) /* 66 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef TkGenerateActivateEvents
+#define TkGenerateActivateEvents \
+ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */
+#endif
+/* Slot 1 is reserved */
+/* Slot 2 is reserved */
+#ifndef TkPointerDeadWindow
+#define TkPointerDeadWindow \
+ (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 3 */
+#endif
+#ifndef TkpSetCapture
+#define TkpSetCapture \
+ (tkIntPlatStubsPtr->tkpSetCapture) /* 4 */
+#endif
+#ifndef TkpSetCursor
+#define TkpSetCursor \
+ (tkIntPlatStubsPtr->tkpSetCursor) /* 5 */
+#endif
+#ifndef TkpWmSetState
+#define TkpWmSetState \
+ (tkIntPlatStubsPtr->tkpWmSetState) /* 6 */
+#endif
+#ifndef TkAboutDlg
+#define TkAboutDlg \
+ (tkIntPlatStubsPtr->tkAboutDlg) /* 7 */
+#endif
+#ifndef TkMacOSXButtonKeyState
+#define TkMacOSXButtonKeyState \
+ (tkIntPlatStubsPtr->tkMacOSXButtonKeyState) /* 8 */
+#endif
+#ifndef TkMacOSXClearMenubarActive
+#define TkMacOSXClearMenubarActive \
+ (tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 9 */
+#endif
+#ifndef TkMacOSXDispatchMenuEvent
+#define TkMacOSXDispatchMenuEvent \
+ (tkIntPlatStubsPtr->tkMacOSXDispatchMenuEvent) /* 10 */
+#endif
+#ifndef TkMacOSXInstallCursor
+#define TkMacOSXInstallCursor \
+ (tkIntPlatStubsPtr->tkMacOSXInstallCursor) /* 11 */
+#endif
+#ifndef TkMacOSXHandleTearoffMenu
+#define TkMacOSXHandleTearoffMenu \
+ (tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */
+#endif
+/* Slot 13 is reserved */
+#ifndef TkMacOSXDoHLEvent
+#define TkMacOSXDoHLEvent \
+ (tkIntPlatStubsPtr->tkMacOSXDoHLEvent) /* 14 */
+#endif
+/* Slot 15 is reserved */
+#ifndef TkMacOSXGetXWindow
+#define TkMacOSXGetXWindow \
+ (tkIntPlatStubsPtr->tkMacOSXGetXWindow) /* 16 */
+#endif
+#ifndef TkMacOSXGrowToplevel
+#define TkMacOSXGrowToplevel \
+ (tkIntPlatStubsPtr->tkMacOSXGrowToplevel) /* 17 */
+#endif
+#ifndef TkMacOSXHandleMenuSelect
+#define TkMacOSXHandleMenuSelect \
+ (tkIntPlatStubsPtr->tkMacOSXHandleMenuSelect) /* 18 */
+#endif
+/* Slot 19 is reserved */
+/* Slot 20 is reserved */
+#ifndef TkMacOSXInvalidateWindow
+#define TkMacOSXInvalidateWindow \
+ (tkIntPlatStubsPtr->tkMacOSXInvalidateWindow) /* 21 */
+#endif
+#ifndef TkMacOSXIsCharacterMissing
+#define TkMacOSXIsCharacterMissing \
+ (tkIntPlatStubsPtr->tkMacOSXIsCharacterMissing) /* 22 */
+#endif
+#ifndef TkMacOSXMakeRealWindowExist
+#define TkMacOSXMakeRealWindowExist \
+ (tkIntPlatStubsPtr->tkMacOSXMakeRealWindowExist) /* 23 */
+#endif
+#ifndef TkMacOSXMakeStippleMap
+#define TkMacOSXMakeStippleMap \
+ (tkIntPlatStubsPtr->tkMacOSXMakeStippleMap) /* 24 */
+#endif
+#ifndef TkMacOSXMenuClick
+#define TkMacOSXMenuClick \
+ (tkIntPlatStubsPtr->tkMacOSXMenuClick) /* 25 */
+#endif
+#ifndef TkMacOSXRegisterOffScreenWindow
+#define TkMacOSXRegisterOffScreenWindow \
+ (tkIntPlatStubsPtr->tkMacOSXRegisterOffScreenWindow) /* 26 */
+#endif
+#ifndef TkMacOSXResizable
+#define TkMacOSXResizable \
+ (tkIntPlatStubsPtr->tkMacOSXResizable) /* 27 */
+#endif
+#ifndef TkMacOSXSetHelpMenuItemCount
+#define TkMacOSXSetHelpMenuItemCount \
+ (tkIntPlatStubsPtr->tkMacOSXSetHelpMenuItemCount) /* 28 */
+#endif
+#ifndef TkMacOSXSetScrollbarGrow
+#define TkMacOSXSetScrollbarGrow \
+ (tkIntPlatStubsPtr->tkMacOSXSetScrollbarGrow) /* 29 */
+#endif
+#ifndef TkMacOSXSetUpClippingRgn
+#define TkMacOSXSetUpClippingRgn \
+ (tkIntPlatStubsPtr->tkMacOSXSetUpClippingRgn) /* 30 */
+#endif
+#ifndef TkMacOSXSetUpGraphicsPort
+#define TkMacOSXSetUpGraphicsPort \
+ (tkIntPlatStubsPtr->tkMacOSXSetUpGraphicsPort) /* 31 */
+#endif
+#ifndef TkMacOSXUpdateClipRgn
+#define TkMacOSXUpdateClipRgn \
+ (tkIntPlatStubsPtr->tkMacOSXUpdateClipRgn) /* 32 */
+#endif
+#ifndef TkMacOSXUnregisterMacWindow
+#define TkMacOSXUnregisterMacWindow \
+ (tkIntPlatStubsPtr->tkMacOSXUnregisterMacWindow) /* 33 */
+#endif
+#ifndef TkMacOSXUseMenuID
+#define TkMacOSXUseMenuID \
+ (tkIntPlatStubsPtr->tkMacOSXUseMenuID) /* 34 */
+#endif
+#ifndef TkMacOSXVisableClipRgn
+#define TkMacOSXVisableClipRgn \
+ (tkIntPlatStubsPtr->tkMacOSXVisableClipRgn) /* 35 */
+#endif
+#ifndef TkMacOSXWinBounds
+#define TkMacOSXWinBounds \
+ (tkIntPlatStubsPtr->tkMacOSXWinBounds) /* 36 */
+#endif
+#ifndef TkMacOSXWindowOffset
+#define TkMacOSXWindowOffset \
+ (tkIntPlatStubsPtr->tkMacOSXWindowOffset) /* 37 */
+#endif
+#ifndef TkSetMacColor
+#define TkSetMacColor \
+ (tkIntPlatStubsPtr->tkSetMacColor) /* 38 */
+#endif
+#ifndef TkSetWMName
+#define TkSetWMName \
+ (tkIntPlatStubsPtr->tkSetWMName) /* 39 */
+#endif
+#ifndef TkSuspendClipboard
+#define TkSuspendClipboard \
+ (tkIntPlatStubsPtr->tkSuspendClipboard) /* 40 */
+#endif
+#ifndef TkMacOSXZoomToplevel
+#define TkMacOSXZoomToplevel \
+ (tkIntPlatStubsPtr->tkMacOSXZoomToplevel) /* 41 */
+#endif
+#ifndef Tk_TopCoordsToWindow
+#define Tk_TopCoordsToWindow \
+ (tkIntPlatStubsPtr->tk_TopCoordsToWindow) /* 42 */
+#endif
+#ifndef TkMacOSXContainerId
+#define TkMacOSXContainerId \
+ (tkIntPlatStubsPtr->tkMacOSXContainerId) /* 43 */
+#endif
+#ifndef TkMacOSXGetHostToplevel
+#define TkMacOSXGetHostToplevel \
+ (tkIntPlatStubsPtr->tkMacOSXGetHostToplevel) /* 44 */
+#endif
+#ifndef TkMacOSXPreprocessMenu
+#define TkMacOSXPreprocessMenu \
+ (tkIntPlatStubsPtr->tkMacOSXPreprocessMenu) /* 45 */
+#endif
+#ifndef TkpIsWindowFloating
+#define TkpIsWindowFloating \
+ (tkIntPlatStubsPtr->tkpIsWindowFloating) /* 46 */
+#endif
+#ifndef TkMacOSXGetCapture
+#define TkMacOSXGetCapture \
+ (tkIntPlatStubsPtr->tkMacOSXGetCapture) /* 47 */
+#endif
+/* Slot 48 is reserved */
+#ifndef TkGetTransientMaster
+#define TkGetTransientMaster \
+ (tkIntPlatStubsPtr->tkGetTransientMaster) /* 49 */
+#endif
+#ifndef TkGenerateButtonEvent
+#define TkGenerateButtonEvent \
+ (tkIntPlatStubsPtr->tkGenerateButtonEvent) /* 50 */
+#endif
+#ifndef TkGenWMDestroyEvent
+#define TkGenWMDestroyEvent \
+ (tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */
+#endif
+/* Slot 52 is reserved */
+#ifndef TkpGetMS
+#define TkpGetMS \
+ (tkIntPlatStubsPtr->tkpGetMS) /* 53 */
+#endif
+#endif /* MAC_OSX_TK */
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */
+#ifndef TkCreateXEventSource
+#define TkCreateXEventSource \
+ (tkIntPlatStubsPtr->tkCreateXEventSource) /* 0 */
+#endif
+#ifndef TkFreeWindowId
+#define TkFreeWindowId \
+ (tkIntPlatStubsPtr->tkFreeWindowId) /* 1 */
+#endif
+#ifndef TkInitXId
+#define TkInitXId \
+ (tkIntPlatStubsPtr->tkInitXId) /* 2 */
+#endif
+#ifndef TkpCmapStressed
+#define TkpCmapStressed \
+ (tkIntPlatStubsPtr->tkpCmapStressed) /* 3 */
+#endif
+#ifndef TkpSync
+#define TkpSync \
+ (tkIntPlatStubsPtr->tkpSync) /* 4 */
+#endif
+#ifndef TkUnixContainerId
+#define TkUnixContainerId \
+ (tkIntPlatStubsPtr->tkUnixContainerId) /* 5 */
+#endif
+#ifndef TkUnixDoOneXEvent
+#define TkUnixDoOneXEvent \
+ (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 6 */
+#endif
+#ifndef TkUnixSetMenubar
+#define TkUnixSetMenubar \
+ (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 7 */
+#endif
+#ifndef TkpScanWindowId
+#define TkpScanWindowId \
+ (tkIntPlatStubsPtr->tkpScanWindowId) /* 8 */
+#endif
+#ifndef TkWmCleanup
+#define TkWmCleanup \
+ (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */
+#endif
+#ifndef TkSendCleanup
+#define TkSendCleanup \
+ (tkIntPlatStubsPtr->tkSendCleanup) /* 10 */
+#endif
+#ifndef TkFreeXId
+#define TkFreeXId \
+ (tkIntPlatStubsPtr->tkFreeXId) /* 11 */
+#endif
+#ifndef TkpWmSetState
+#define TkpWmSetState \
+ (tkIntPlatStubsPtr->tkpWmSetState) /* 12 */
+#endif
+#endif /* X11 */
+
+#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKINTPLATDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.m
new file mode 100644
index 00000000000..203f4d83724
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.m
@@ -0,0 +1,474 @@
+#ifndef _TKINTPLATDECLS_VM
+#define _TKINTPLATDECLS_VM
+#include "tkIntPlatDecls_f.h"
+#ifndef NO_VTABLES
+#ifndef TkAboutDlg
+# define TkAboutDlg (*TkintplatdeclsVptr->V_TkAboutDlg)
+#endif
+
+#ifndef TkAlignImageData
+# define TkAlignImageData (*TkintplatdeclsVptr->V_TkAlignImageData)
+#endif
+
+#ifndef TkCreateXEventSource
+# define TkCreateXEventSource (*TkintplatdeclsVptr->V_TkCreateXEventSource)
+#endif
+
+#ifndef TkFreeWindowId
+# define TkFreeWindowId (*TkintplatdeclsVptr->V_TkFreeWindowId)
+#endif
+
+#ifndef TkFreeXId
+# define TkFreeXId (*TkintplatdeclsVptr->V_TkFreeXId)
+#endif
+
+#ifndef TkGenWMDestroyEvent
+# define TkGenWMDestroyEvent (*TkintplatdeclsVptr->V_TkGenWMDestroyEvent)
+#endif
+
+#ifndef TkGenerateActivateEvents
+# define TkGenerateActivateEvents (*TkintplatdeclsVptr->V_TkGenerateActivateEvents)
+#endif
+
+#ifndef TkGenerateButtonEvent
+# define TkGenerateButtonEvent (*TkintplatdeclsVptr->V_TkGenerateButtonEvent)
+#endif
+
+#ifndef TkGetTransientMaster
+# define TkGetTransientMaster (*TkintplatdeclsVptr->V_TkGetTransientMaster)
+#endif
+
+#ifndef TkInitXId
+# define TkInitXId (*TkintplatdeclsVptr->V_TkInitXId)
+#endif
+
+#ifndef TkMacButtonKeyState
+# define TkMacButtonKeyState (*TkintplatdeclsVptr->V_TkMacButtonKeyState)
+#endif
+
+#ifndef TkMacClearMenubarActive
+# define TkMacClearMenubarActive (*TkintplatdeclsVptr->V_TkMacClearMenubarActive)
+#endif
+
+#ifndef TkMacContainerId
+# define TkMacContainerId (*TkintplatdeclsVptr->V_TkMacContainerId)
+#endif
+
+#ifndef TkMacDispatchMenuEvent
+# define TkMacDispatchMenuEvent (*TkintplatdeclsVptr->V_TkMacDispatchMenuEvent)
+#endif
+
+#ifndef TkMacDoHLEvent
+# define TkMacDoHLEvent (*TkintplatdeclsVptr->V_TkMacDoHLEvent)
+#endif
+
+#ifndef TkMacGenerateTime
+# define TkMacGenerateTime (*TkintplatdeclsVptr->V_TkMacGenerateTime)
+#endif
+
+#ifndef TkMacGetHostToplevel
+# define TkMacGetHostToplevel (*TkintplatdeclsVptr->V_TkMacGetHostToplevel)
+#endif
+
+#ifndef TkMacGetScrollbarGrowWindow
+# define TkMacGetScrollbarGrowWindow (*TkintplatdeclsVptr->V_TkMacGetScrollbarGrowWindow)
+#endif
+
+#ifndef TkMacGetXWindow
+# define TkMacGetXWindow (*TkintplatdeclsVptr->V_TkMacGetXWindow)
+#endif
+
+#ifndef TkMacGrowToplevel
+# define TkMacGrowToplevel (*TkintplatdeclsVptr->V_TkMacGrowToplevel)
+#endif
+
+#ifndef TkMacHandleMenuSelect
+# define TkMacHandleMenuSelect (*TkintplatdeclsVptr->V_TkMacHandleMenuSelect)
+#endif
+
+#ifndef TkMacHandleTearoffMenu
+# define TkMacHandleTearoffMenu (*TkintplatdeclsVptr->V_TkMacHandleTearoffMenu)
+#endif
+
+#ifndef TkMacInstallCursor
+# define TkMacInstallCursor (*TkintplatdeclsVptr->V_TkMacInstallCursor)
+#endif
+
+#ifndef TkMacInvalidateWindow
+# define TkMacInvalidateWindow (*TkintplatdeclsVptr->V_TkMacInvalidateWindow)
+#endif
+
+#ifndef TkMacIsCharacterMissing
+# define TkMacIsCharacterMissing (*TkintplatdeclsVptr->V_TkMacIsCharacterMissing)
+#endif
+
+#ifndef TkMacMakeRealWindowExist
+# define TkMacMakeRealWindowExist (*TkintplatdeclsVptr->V_TkMacMakeRealWindowExist)
+#endif
+
+#ifndef TkMacMakeStippleMap
+# define TkMacMakeStippleMap (*TkintplatdeclsVptr->V_TkMacMakeStippleMap)
+#endif
+
+#ifndef TkMacMenuClick
+# define TkMacMenuClick (*TkintplatdeclsVptr->V_TkMacMenuClick)
+#endif
+
+#ifndef TkMacOSXButtonKeyState
+# define TkMacOSXButtonKeyState (*TkintplatdeclsVptr->V_TkMacOSXButtonKeyState)
+#endif
+
+#ifndef TkMacOSXClearMenubarActive
+# define TkMacOSXClearMenubarActive (*TkintplatdeclsVptr->V_TkMacOSXClearMenubarActive)
+#endif
+
+#ifndef TkMacOSXContainerId
+# define TkMacOSXContainerId (*TkintplatdeclsVptr->V_TkMacOSXContainerId)
+#endif
+
+#ifndef TkMacOSXDispatchMenuEvent
+# define TkMacOSXDispatchMenuEvent (*TkintplatdeclsVptr->V_TkMacOSXDispatchMenuEvent)
+#endif
+
+#ifndef TkMacOSXDoHLEvent
+# define TkMacOSXDoHLEvent (*TkintplatdeclsVptr->V_TkMacOSXDoHLEvent)
+#endif
+
+#ifndef TkMacOSXGetCapture
+# define TkMacOSXGetCapture (*TkintplatdeclsVptr->V_TkMacOSXGetCapture)
+#endif
+
+#ifndef TkMacOSXGetHostToplevel
+# define TkMacOSXGetHostToplevel (*TkintplatdeclsVptr->V_TkMacOSXGetHostToplevel)
+#endif
+
+#ifndef TkMacOSXGetXWindow
+# define TkMacOSXGetXWindow (*TkintplatdeclsVptr->V_TkMacOSXGetXWindow)
+#endif
+
+#ifndef TkMacOSXGrowToplevel
+# define TkMacOSXGrowToplevel (*TkintplatdeclsVptr->V_TkMacOSXGrowToplevel)
+#endif
+
+#ifndef TkMacOSXHandleMenuSelect
+# define TkMacOSXHandleMenuSelect (*TkintplatdeclsVptr->V_TkMacOSXHandleMenuSelect)
+#endif
+
+#ifndef TkMacOSXHandleTearoffMenu
+# define TkMacOSXHandleTearoffMenu (*TkintplatdeclsVptr->V_TkMacOSXHandleTearoffMenu)
+#endif
+
+#ifndef TkMacOSXInstallCursor
+# define TkMacOSXInstallCursor (*TkintplatdeclsVptr->V_TkMacOSXInstallCursor)
+#endif
+
+#ifndef TkMacOSXInvalidateWindow
+# define TkMacOSXInvalidateWindow (*TkintplatdeclsVptr->V_TkMacOSXInvalidateWindow)
+#endif
+
+#ifndef TkMacOSXIsCharacterMissing
+# define TkMacOSXIsCharacterMissing (*TkintplatdeclsVptr->V_TkMacOSXIsCharacterMissing)
+#endif
+
+#ifndef TkMacOSXMakeRealWindowExist
+# define TkMacOSXMakeRealWindowExist (*TkintplatdeclsVptr->V_TkMacOSXMakeRealWindowExist)
+#endif
+
+#ifndef TkMacOSXMakeStippleMap
+# define TkMacOSXMakeStippleMap (*TkintplatdeclsVptr->V_TkMacOSXMakeStippleMap)
+#endif
+
+#ifndef TkMacOSXMenuClick
+# define TkMacOSXMenuClick (*TkintplatdeclsVptr->V_TkMacOSXMenuClick)
+#endif
+
+#ifndef TkMacOSXPreprocessMenu
+# define TkMacOSXPreprocessMenu (*TkintplatdeclsVptr->V_TkMacOSXPreprocessMenu)
+#endif
+
+#ifndef TkMacOSXRegisterOffScreenWindow
+# define TkMacOSXRegisterOffScreenWindow (*TkintplatdeclsVptr->V_TkMacOSXRegisterOffScreenWindow)
+#endif
+
+#ifndef TkMacOSXResizable
+# define TkMacOSXResizable (*TkintplatdeclsVptr->V_TkMacOSXResizable)
+#endif
+
+#ifndef TkMacOSXSetHelpMenuItemCount
+# define TkMacOSXSetHelpMenuItemCount (*TkintplatdeclsVptr->V_TkMacOSXSetHelpMenuItemCount)
+#endif
+
+#ifndef TkMacOSXSetScrollbarGrow
+# define TkMacOSXSetScrollbarGrow (*TkintplatdeclsVptr->V_TkMacOSXSetScrollbarGrow)
+#endif
+
+#ifndef TkMacOSXSetUpClippingRgn
+# define TkMacOSXSetUpClippingRgn (*TkintplatdeclsVptr->V_TkMacOSXSetUpClippingRgn)
+#endif
+
+#ifndef TkMacOSXSetUpGraphicsPort
+# define TkMacOSXSetUpGraphicsPort (*TkintplatdeclsVptr->V_TkMacOSXSetUpGraphicsPort)
+#endif
+
+#ifndef TkMacOSXUnregisterMacWindow
+# define TkMacOSXUnregisterMacWindow (*TkintplatdeclsVptr->V_TkMacOSXUnregisterMacWindow)
+#endif
+
+#ifndef TkMacOSXUpdateClipRgn
+# define TkMacOSXUpdateClipRgn (*TkintplatdeclsVptr->V_TkMacOSXUpdateClipRgn)
+#endif
+
+#ifndef TkMacOSXUseMenuID
+# define TkMacOSXUseMenuID (*TkintplatdeclsVptr->V_TkMacOSXUseMenuID)
+#endif
+
+#ifndef TkMacOSXVisableClipRgn
+# define TkMacOSXVisableClipRgn (*TkintplatdeclsVptr->V_TkMacOSXVisableClipRgn)
+#endif
+
+#ifndef TkMacOSXWinBounds
+# define TkMacOSXWinBounds (*TkintplatdeclsVptr->V_TkMacOSXWinBounds)
+#endif
+
+#ifndef TkMacOSXWindowOffset
+# define TkMacOSXWindowOffset (*TkintplatdeclsVptr->V_TkMacOSXWindowOffset)
+#endif
+
+#ifndef TkMacOSXZoomToplevel
+# define TkMacOSXZoomToplevel (*TkintplatdeclsVptr->V_TkMacOSXZoomToplevel)
+#endif
+
+#ifndef TkMacPreprocessMenu
+# define TkMacPreprocessMenu (*TkintplatdeclsVptr->V_TkMacPreprocessMenu)
+#endif
+
+#ifndef TkMacRegisterOffScreenWindow
+# define TkMacRegisterOffScreenWindow (*TkintplatdeclsVptr->V_TkMacRegisterOffScreenWindow)
+#endif
+
+#ifndef TkMacResizable
+# define TkMacResizable (*TkintplatdeclsVptr->V_TkMacResizable)
+#endif
+
+#ifndef TkMacSetHelpMenuItemCount
+# define TkMacSetHelpMenuItemCount (*TkintplatdeclsVptr->V_TkMacSetHelpMenuItemCount)
+#endif
+
+#ifndef TkMacSetScrollbarGrow
+# define TkMacSetScrollbarGrow (*TkintplatdeclsVptr->V_TkMacSetScrollbarGrow)
+#endif
+
+#ifndef TkMacSetUpClippingRgn
+# define TkMacSetUpClippingRgn (*TkintplatdeclsVptr->V_TkMacSetUpClippingRgn)
+#endif
+
+#ifndef TkMacSetUpGraphicsPort
+# define TkMacSetUpGraphicsPort (*TkintplatdeclsVptr->V_TkMacSetUpGraphicsPort)
+#endif
+
+#ifndef TkMacUnregisterMacWindow
+# define TkMacUnregisterMacWindow (*TkintplatdeclsVptr->V_TkMacUnregisterMacWindow)
+#endif
+
+#ifndef TkMacUpdateClipRgn
+# define TkMacUpdateClipRgn (*TkintplatdeclsVptr->V_TkMacUpdateClipRgn)
+#endif
+
+#ifndef TkMacUseMenuID
+# define TkMacUseMenuID (*TkintplatdeclsVptr->V_TkMacUseMenuID)
+#endif
+
+#ifndef TkMacVisableClipRgn
+# define TkMacVisableClipRgn (*TkintplatdeclsVptr->V_TkMacVisableClipRgn)
+#endif
+
+#ifndef TkMacWinBounds
+# define TkMacWinBounds (*TkintplatdeclsVptr->V_TkMacWinBounds)
+#endif
+
+#ifndef TkMacWindowOffset
+# define TkMacWindowOffset (*TkintplatdeclsVptr->V_TkMacWindowOffset)
+#endif
+
+#ifndef TkMacZoomToplevel
+# define TkMacZoomToplevel (*TkintplatdeclsVptr->V_TkMacZoomToplevel)
+#endif
+
+#ifndef TkPointerDeadWindow
+# define TkPointerDeadWindow (*TkintplatdeclsVptr->V_TkPointerDeadWindow)
+#endif
+
+#ifndef TkSendCleanup
+# define TkSendCleanup (*TkintplatdeclsVptr->V_TkSendCleanup)
+#endif
+
+#ifndef TkSetMacColor
+# define TkSetMacColor (*TkintplatdeclsVptr->V_TkSetMacColor)
+#endif
+
+#ifndef TkSetPixmapColormap
+# define TkSetPixmapColormap (*TkintplatdeclsVptr->V_TkSetPixmapColormap)
+#endif
+
+#ifndef TkSetWMName
+# define TkSetWMName (*TkintplatdeclsVptr->V_TkSetWMName)
+#endif
+
+#ifndef TkSuspendClipboard
+# define TkSuspendClipboard (*TkintplatdeclsVptr->V_TkSuspendClipboard)
+#endif
+
+#ifndef TkUnixContainerId
+# define TkUnixContainerId (*TkintplatdeclsVptr->V_TkUnixContainerId)
+#endif
+
+#ifndef TkUnixDoOneXEvent
+# define TkUnixDoOneXEvent (*TkintplatdeclsVptr->V_TkUnixDoOneXEvent)
+#endif
+
+#ifndef TkUnixSetMenubar
+# define TkUnixSetMenubar (*TkintplatdeclsVptr->V_TkUnixSetMenubar)
+#endif
+
+#ifndef TkWinCancelMouseTimer
+# define TkWinCancelMouseTimer (*TkintplatdeclsVptr->V_TkWinCancelMouseTimer)
+#endif
+
+#ifndef TkWinClipboardRender
+# define TkWinClipboardRender (*TkintplatdeclsVptr->V_TkWinClipboardRender)
+#endif
+
+#ifndef TkWinDialogDebug
+# define TkWinDialogDebug (*TkintplatdeclsVptr->V_TkWinDialogDebug)
+#endif
+
+#ifndef TkWinEmbeddedEventProc
+# define TkWinEmbeddedEventProc (*TkintplatdeclsVptr->V_TkWinEmbeddedEventProc)
+#endif
+
+#ifndef TkWinFillRect
+# define TkWinFillRect (*TkintplatdeclsVptr->V_TkWinFillRect)
+#endif
+
+#ifndef TkWinGetBorderPixels
+# define TkWinGetBorderPixels (*TkintplatdeclsVptr->V_TkWinGetBorderPixels)
+#endif
+
+#ifndef TkWinGetDrawableDC
+# define TkWinGetDrawableDC (*TkintplatdeclsVptr->V_TkWinGetDrawableDC)
+#endif
+
+#ifndef TkWinGetMenuSystemDefault
+# define TkWinGetMenuSystemDefault (*TkintplatdeclsVptr->V_TkWinGetMenuSystemDefault)
+#endif
+
+#ifndef TkWinGetModifierState
+# define TkWinGetModifierState (*TkintplatdeclsVptr->V_TkWinGetModifierState)
+#endif
+
+#ifndef TkWinGetPlatformId
+# define TkWinGetPlatformId (*TkintplatdeclsVptr->V_TkWinGetPlatformId)
+#endif
+
+#ifndef TkWinGetSystemPalette
+# define TkWinGetSystemPalette (*TkintplatdeclsVptr->V_TkWinGetSystemPalette)
+#endif
+
+#ifndef TkWinGetWrapperWindow
+# define TkWinGetWrapperWindow (*TkintplatdeclsVptr->V_TkWinGetWrapperWindow)
+#endif
+
+#ifndef TkWinHandleMenuEvent
+# define TkWinHandleMenuEvent (*TkintplatdeclsVptr->V_TkWinHandleMenuEvent)
+#endif
+
+#ifndef TkWinIndexOfColor
+# define TkWinIndexOfColor (*TkintplatdeclsVptr->V_TkWinIndexOfColor)
+#endif
+
+#ifndef TkWinReleaseDrawableDC
+# define TkWinReleaseDrawableDC (*TkintplatdeclsVptr->V_TkWinReleaseDrawableDC)
+#endif
+
+#ifndef TkWinResendEvent
+# define TkWinResendEvent (*TkintplatdeclsVptr->V_TkWinResendEvent)
+#endif
+
+#ifndef TkWinSelectPalette
+# define TkWinSelectPalette (*TkintplatdeclsVptr->V_TkWinSelectPalette)
+#endif
+
+#ifndef TkWinSetForegroundWindow
+# define TkWinSetForegroundWindow (*TkintplatdeclsVptr->V_TkWinSetForegroundWindow)
+#endif
+
+#ifndef TkWinSetHINSTANCE
+# define TkWinSetHINSTANCE (*TkintplatdeclsVptr->V_TkWinSetHINSTANCE)
+#endif
+
+#ifndef TkWinSetMenu
+# define TkWinSetMenu (*TkintplatdeclsVptr->V_TkWinSetMenu)
+#endif
+
+#ifndef TkWinSetWindowPos
+# define TkWinSetWindowPos (*TkintplatdeclsVptr->V_TkWinSetWindowPos)
+#endif
+
+#ifndef TkWinWmCleanup
+# define TkWinWmCleanup (*TkintplatdeclsVptr->V_TkWinWmCleanup)
+#endif
+
+#ifndef TkWinXCleanup
+# define TkWinXCleanup (*TkintplatdeclsVptr->V_TkWinXCleanup)
+#endif
+
+#ifndef TkWinXInit
+# define TkWinXInit (*TkintplatdeclsVptr->V_TkWinXInit)
+#endif
+
+#ifndef TkWmCleanup
+# define TkWmCleanup (*TkintplatdeclsVptr->V_TkWmCleanup)
+#endif
+
+#ifndef Tk_TopCoordsToWindow
+# define Tk_TopCoordsToWindow (*TkintplatdeclsVptr->V_Tk_TopCoordsToWindow)
+#endif
+
+#ifndef TkpCmapStressed
+# define TkpCmapStressed (*TkintplatdeclsVptr->V_TkpCmapStressed)
+#endif
+
+#ifndef TkpGetMS
+# define TkpGetMS (*TkintplatdeclsVptr->V_TkpGetMS)
+#endif
+
+#ifndef TkpIsWindowFloating
+# define TkpIsWindowFloating (*TkintplatdeclsVptr->V_TkpIsWindowFloating)
+#endif
+
+#ifndef TkpPrintWindowId
+# define TkpPrintWindowId (*TkintplatdeclsVptr->V_TkpPrintWindowId)
+#endif
+
+#ifndef TkpScanWindowId
+# define TkpScanWindowId (*TkintplatdeclsVptr->V_TkpScanWindowId)
+#endif
+
+#ifndef TkpSetCapture
+# define TkpSetCapture (*TkintplatdeclsVptr->V_TkpSetCapture)
+#endif
+
+#ifndef TkpSetCursor
+# define TkpSetCursor (*TkintplatdeclsVptr->V_TkpSetCursor)
+#endif
+
+#ifndef TkpSync
+# define TkpSync (*TkintplatdeclsVptr->V_TkpSync)
+#endif
+
+#ifndef TkpWmSetState
+# define TkpWmSetState (*TkintplatdeclsVptr->V_TkpWmSetState)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKINTPLATDECLS_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.t
new file mode 100644
index 00000000000..72bcbc0977e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls.t
@@ -0,0 +1,845 @@
+#ifdef _TKINTPLATDECLS
+#ifndef TkAboutDlg
+#ifdef MAC_OSX_TK
+VFUNC(void,TkAboutDlg,V_TkAboutDlg,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkAboutDlg,V_TkAboutDlg,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkAboutDlg */
+
+#ifndef TkAlignImageData
+#ifdef __WIN32__
+VFUNC(char *,TkAlignImageData,V_TkAlignImageData,_ANSI_ARGS_((XImage * image,
+ int alignment, int bitOrder)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkAlignImageData */
+
+#ifndef TkCreateXEventSource
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkCreateXEventSource,V_TkCreateXEventSource,_ANSI_ARGS_((void)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkCreateXEventSource */
+
+#ifndef TkFreeWindowId
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkFreeWindowId,V_TkFreeWindowId,_ANSI_ARGS_((TkDisplay * dispPtr,
+ Window w)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkFreeWindowId */
+
+#ifndef TkFreeXId
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkFreeXId,V_TkFreeXId,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkFreeXId */
+
+#ifndef TkGenWMDestroyEvent
+#ifdef MAC_OSX_TK
+VFUNC(void,TkGenWMDestroyEvent,V_TkGenWMDestroyEvent,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkGenWMDestroyEvent,V_TkGenWMDestroyEvent,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkGenWMDestroyEvent */
+
+#ifndef TkGenerateActivateEvents
+#ifdef MAC_OSX_TK
+VFUNC(void,TkGenerateActivateEvents,V_TkGenerateActivateEvents,_ANSI_ARGS_((
+ TkWindow * winPtr, int active)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkGenerateActivateEvents,V_TkGenerateActivateEvents,_ANSI_ARGS_((
+ TkWindow * winPtr, int active)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkGenerateActivateEvents,V_TkGenerateActivateEvents,_ANSI_ARGS_((
+ TkWindow * winPtr, int active)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkGenerateActivateEvents */
+
+#ifndef TkGenerateButtonEvent
+#ifdef MAC_OSX_TK
+VFUNC(int,TkGenerateButtonEvent,V_TkGenerateButtonEvent,_ANSI_ARGS_((int x, int y,
+ Window window, unsigned int state)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,TkGenerateButtonEvent,V_TkGenerateButtonEvent,_ANSI_ARGS_((int x, int y,
+ Window window, unsigned int state)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkGenerateButtonEvent */
+
+#ifndef TkGetTransientMaster
+#ifdef MAC_OSX_TK
+VFUNC(Window,TkGetTransientMaster,V_TkGetTransientMaster,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Window,TkGetTransientMaster,V_TkGetTransientMaster,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkGetTransientMaster */
+
+#ifndef TkInitXId
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkInitXId,V_TkInitXId,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkInitXId */
+
+#ifndef TkMacButtonKeyState
+#ifdef MAC_TCL
+VFUNC(unsigned int,TkMacButtonKeyState,V_TkMacButtonKeyState,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacButtonKeyState */
+
+#ifndef TkMacClearMenubarActive
+#ifdef MAC_TCL
+VFUNC(void,TkMacClearMenubarActive,V_TkMacClearMenubarActive,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacClearMenubarActive */
+
+#ifndef TkMacContainerId
+#ifdef MAC_TCL
+VFUNC(MacDrawable *,TkMacContainerId,V_TkMacContainerId,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacContainerId */
+
+#ifndef TkMacDispatchMenuEvent
+#ifdef MAC_TCL
+VFUNC(int,TkMacDispatchMenuEvent,V_TkMacDispatchMenuEvent,_ANSI_ARGS_((int menuID,
+ int index)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacDispatchMenuEvent */
+
+#ifndef TkMacDoHLEvent
+#ifdef MAC_TCL
+VFUNC(void,TkMacDoHLEvent,V_TkMacDoHLEvent,_ANSI_ARGS_((EventRecord * theEvent)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacDoHLEvent */
+
+#ifndef TkMacGenerateTime
+#ifdef MAC_TCL
+VFUNC(Time,TkMacGenerateTime,V_TkMacGenerateTime,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacGenerateTime */
+
+#ifndef TkMacGetHostToplevel
+#ifdef MAC_TCL
+VFUNC(MacDrawable *,TkMacGetHostToplevel,V_TkMacGetHostToplevel,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacGetHostToplevel */
+
+#ifndef TkMacGetScrollbarGrowWindow
+#ifdef MAC_TCL
+VFUNC(TkWindow *,TkMacGetScrollbarGrowWindow,V_TkMacGetScrollbarGrowWindow,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacGetScrollbarGrowWindow */
+
+#ifndef TkMacGetXWindow
+#ifdef MAC_TCL
+VFUNC(Window,TkMacGetXWindow,V_TkMacGetXWindow,_ANSI_ARGS_((WindowRef macWinPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacGetXWindow */
+
+#ifndef TkMacGrowToplevel
+#ifdef MAC_TCL
+VFUNC(int,TkMacGrowToplevel,V_TkMacGrowToplevel,_ANSI_ARGS_((WindowRef whichWindow,
+ Point start)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacGrowToplevel */
+
+#ifndef TkMacHandleMenuSelect
+#ifdef MAC_TCL
+VFUNC(void,TkMacHandleMenuSelect,V_TkMacHandleMenuSelect,_ANSI_ARGS_((long mResult,
+ int optionKeyPressed)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacHandleMenuSelect */
+
+#ifndef TkMacHandleTearoffMenu
+#ifdef MAC_TCL
+VFUNC(void,TkMacHandleTearoffMenu,V_TkMacHandleTearoffMenu,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacHandleTearoffMenu */
+
+#ifndef TkMacInstallCursor
+#ifdef MAC_TCL
+VFUNC(void,TkMacInstallCursor,V_TkMacInstallCursor,_ANSI_ARGS_((int resizeOverride)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacInstallCursor */
+
+#ifndef TkMacInvalidateWindow
+#ifdef MAC_TCL
+VFUNC(void,TkMacInvalidateWindow,V_TkMacInvalidateWindow,_ANSI_ARGS_((
+ MacDrawable * macWin, int flag)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacInvalidateWindow */
+
+#ifndef TkMacIsCharacterMissing
+#ifdef MAC_TCL
+VFUNC(int,TkMacIsCharacterMissing,V_TkMacIsCharacterMissing,_ANSI_ARGS_((Tk_Font tkfont,
+ unsigned int searchChar)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacIsCharacterMissing */
+
+#ifndef TkMacMakeRealWindowExist
+#ifdef MAC_TCL
+VFUNC(void,TkMacMakeRealWindowExist,V_TkMacMakeRealWindowExist,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacMakeRealWindowExist */
+
+#ifndef TkMacMakeStippleMap
+#ifdef MAC_TCL
+VFUNC(BitMapPtr,TkMacMakeStippleMap,V_TkMacMakeStippleMap,_ANSI_ARGS_((Drawable d1,
+ Drawable d2)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacMakeStippleMap */
+
+#ifndef TkMacMenuClick
+#ifdef MAC_TCL
+VFUNC(void,TkMacMenuClick,V_TkMacMenuClick,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacMenuClick */
+
+#ifndef TkMacOSXButtonKeyState
+#ifdef MAC_OSX_TK
+VFUNC(unsigned int,TkMacOSXButtonKeyState,V_TkMacOSXButtonKeyState,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXButtonKeyState */
+
+#ifndef TkMacOSXClearMenubarActive
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXClearMenubarActive,V_TkMacOSXClearMenubarActive,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXClearMenubarActive */
+
+#ifndef TkMacOSXContainerId
+#ifdef MAC_OSX_TK
+VFUNC(MacDrawable *,TkMacOSXContainerId,V_TkMacOSXContainerId,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXContainerId */
+
+#ifndef TkMacOSXDispatchMenuEvent
+#ifdef MAC_OSX_TK
+VFUNC(int,TkMacOSXDispatchMenuEvent,V_TkMacOSXDispatchMenuEvent,_ANSI_ARGS_((int menuID,
+ int index)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXDispatchMenuEvent */
+
+#ifndef TkMacOSXDoHLEvent
+#ifdef MAC_OSX_TK
+VFUNC(int,TkMacOSXDoHLEvent,V_TkMacOSXDoHLEvent,_ANSI_ARGS_((
+ EventRecord * theEvent)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXDoHLEvent */
+
+#ifndef TkMacOSXGetCapture
+#ifdef MAC_OSX_TK
+VFUNC(Tk_Window,TkMacOSXGetCapture,V_TkMacOSXGetCapture,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXGetCapture */
+
+#ifndef TkMacOSXGetHostToplevel
+#ifdef MAC_OSX_TK
+VFUNC(MacDrawable *,TkMacOSXGetHostToplevel,V_TkMacOSXGetHostToplevel,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXGetHostToplevel */
+
+#ifndef TkMacOSXGetXWindow
+#ifdef MAC_OSX_TK
+VFUNC(Window,TkMacOSXGetXWindow,V_TkMacOSXGetXWindow,_ANSI_ARGS_((WindowRef macWinPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXGetXWindow */
+
+#ifndef TkMacOSXGrowToplevel
+#ifdef MAC_OSX_TK
+VFUNC(int,TkMacOSXGrowToplevel,V_TkMacOSXGrowToplevel,_ANSI_ARGS_((
+ WindowRef whichWindow, Point start)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXGrowToplevel */
+
+#ifndef TkMacOSXHandleMenuSelect
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXHandleMenuSelect,V_TkMacOSXHandleMenuSelect,_ANSI_ARGS_((long mResult,
+ int optionKeyPressed)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXHandleMenuSelect */
+
+#ifndef TkMacOSXHandleTearoffMenu
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXHandleTearoffMenu,V_TkMacOSXHandleTearoffMenu,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXHandleTearoffMenu */
+
+#ifndef TkMacOSXInstallCursor
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXInstallCursor,V_TkMacOSXInstallCursor,_ANSI_ARGS_((
+ int resizeOverride)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXInstallCursor */
+
+#ifndef TkMacOSXInvalidateWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXInvalidateWindow,V_TkMacOSXInvalidateWindow,_ANSI_ARGS_((
+ MacDrawable * macWin, int flag)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXInvalidateWindow */
+
+#ifndef TkMacOSXIsCharacterMissing
+#ifdef MAC_OSX_TK
+VFUNC(int,TkMacOSXIsCharacterMissing,V_TkMacOSXIsCharacterMissing,_ANSI_ARGS_((
+ Tk_Font tkfont, unsigned int searchChar)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXIsCharacterMissing */
+
+#ifndef TkMacOSXMakeRealWindowExist
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXMakeRealWindowExist,V_TkMacOSXMakeRealWindowExist,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXMakeRealWindowExist */
+
+#ifndef TkMacOSXMakeStippleMap
+#ifdef MAC_OSX_TK
+VFUNC(BitMapPtr,TkMacOSXMakeStippleMap,V_TkMacOSXMakeStippleMap,_ANSI_ARGS_((Drawable d1,
+ Drawable d2)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXMakeStippleMap */
+
+#ifndef TkMacOSXMenuClick
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXMenuClick,V_TkMacOSXMenuClick,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXMenuClick */
+
+#ifndef TkMacOSXPreprocessMenu
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXPreprocessMenu,V_TkMacOSXPreprocessMenu,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXPreprocessMenu */
+
+#ifndef TkMacOSXRegisterOffScreenWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXRegisterOffScreenWindow,V_TkMacOSXRegisterOffScreenWindow,_ANSI_ARGS_((
+ Window window, GWorldPtr portPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXRegisterOffScreenWindow */
+
+#ifndef TkMacOSXResizable
+#ifdef MAC_OSX_TK
+VFUNC(int,TkMacOSXResizable,V_TkMacOSXResizable,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXResizable */
+
+#ifndef TkMacOSXSetHelpMenuItemCount
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXSetHelpMenuItemCount,V_TkMacOSXSetHelpMenuItemCount,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXSetHelpMenuItemCount */
+
+#ifndef TkMacOSXSetScrollbarGrow
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXSetScrollbarGrow,V_TkMacOSXSetScrollbarGrow,_ANSI_ARGS_((
+ TkWindow * winPtr, int flag)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXSetScrollbarGrow */
+
+#ifndef TkMacOSXSetUpClippingRgn
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXSetUpClippingRgn,V_TkMacOSXSetUpClippingRgn,_ANSI_ARGS_((
+ Drawable drawable)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXSetUpClippingRgn */
+
+#ifndef TkMacOSXSetUpGraphicsPort
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXSetUpGraphicsPort,V_TkMacOSXSetUpGraphicsPort,_ANSI_ARGS_((GC gc,
+ GWorldPtr destPort)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXSetUpGraphicsPort */
+
+#ifndef TkMacOSXUnregisterMacWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXUnregisterMacWindow,V_TkMacOSXUnregisterMacWindow,_ANSI_ARGS_((
+ WindowRef portPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXUnregisterMacWindow */
+
+#ifndef TkMacOSXUpdateClipRgn
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXUpdateClipRgn,V_TkMacOSXUpdateClipRgn,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXUpdateClipRgn */
+
+#ifndef TkMacOSXUseMenuID
+#ifdef MAC_OSX_TK
+VFUNC(int,TkMacOSXUseMenuID,V_TkMacOSXUseMenuID,_ANSI_ARGS_((short macID)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXUseMenuID */
+
+#ifndef TkMacOSXVisableClipRgn
+#ifdef MAC_OSX_TK
+VFUNC(RgnHandle,TkMacOSXVisableClipRgn,V_TkMacOSXVisableClipRgn,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXVisableClipRgn */
+
+#ifndef TkMacOSXWinBounds
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXWinBounds,V_TkMacOSXWinBounds,_ANSI_ARGS_((TkWindow * winPtr,
+ Rect * geometry)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXWinBounds */
+
+#ifndef TkMacOSXWindowOffset
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXWindowOffset,V_TkMacOSXWindowOffset,_ANSI_ARGS_((WindowRef wRef,
+ int * xOffset, int * yOffset)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXWindowOffset */
+
+#ifndef TkMacOSXZoomToplevel
+#ifdef MAC_OSX_TK
+VFUNC(int,TkMacOSXZoomToplevel,V_TkMacOSXZoomToplevel,_ANSI_ARGS_((
+ WindowPtr whichWindow, Point where,
+ short zoomPart)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXZoomToplevel */
+
+#ifndef TkMacPreprocessMenu
+#ifdef MAC_TCL
+VFUNC(void,TkMacPreprocessMenu,V_TkMacPreprocessMenu,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacPreprocessMenu */
+
+#ifndef TkMacRegisterOffScreenWindow
+#ifdef MAC_TCL
+VFUNC(void,TkMacRegisterOffScreenWindow,V_TkMacRegisterOffScreenWindow,_ANSI_ARGS_((
+ Window window, GWorldPtr portPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacRegisterOffScreenWindow */
+
+#ifndef TkMacResizable
+#ifdef MAC_TCL
+VFUNC(int,TkMacResizable,V_TkMacResizable,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacResizable */
+
+#ifndef TkMacSetHelpMenuItemCount
+#ifdef MAC_TCL
+VFUNC(void,TkMacSetHelpMenuItemCount,V_TkMacSetHelpMenuItemCount,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacSetHelpMenuItemCount */
+
+#ifndef TkMacSetScrollbarGrow
+#ifdef MAC_TCL
+VFUNC(void,TkMacSetScrollbarGrow,V_TkMacSetScrollbarGrow,_ANSI_ARGS_((TkWindow * winPtr,
+ int flag)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacSetScrollbarGrow */
+
+#ifndef TkMacSetUpClippingRgn
+#ifdef MAC_TCL
+VFUNC(void,TkMacSetUpClippingRgn,V_TkMacSetUpClippingRgn,_ANSI_ARGS_((Drawable drawable)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacSetUpClippingRgn */
+
+#ifndef TkMacSetUpGraphicsPort
+#ifdef MAC_TCL
+VFUNC(void,TkMacSetUpGraphicsPort,V_TkMacSetUpGraphicsPort,_ANSI_ARGS_((GC gc)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacSetUpGraphicsPort */
+
+#ifndef TkMacUnregisterMacWindow
+#ifdef MAC_TCL
+VFUNC(void,TkMacUnregisterMacWindow,V_TkMacUnregisterMacWindow,_ANSI_ARGS_((
+ GWorldPtr portPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacUnregisterMacWindow */
+
+#ifndef TkMacUpdateClipRgn
+#ifdef MAC_TCL
+VFUNC(void,TkMacUpdateClipRgn,V_TkMacUpdateClipRgn,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacUpdateClipRgn */
+
+#ifndef TkMacUseMenuID
+#ifdef MAC_TCL
+VFUNC(int,TkMacUseMenuID,V_TkMacUseMenuID,_ANSI_ARGS_((short macID)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacUseMenuID */
+
+#ifndef TkMacVisableClipRgn
+#ifdef MAC_TCL
+VFUNC(RgnHandle,TkMacVisableClipRgn,V_TkMacVisableClipRgn,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacVisableClipRgn */
+
+#ifndef TkMacWinBounds
+#ifdef MAC_TCL
+VFUNC(void,TkMacWinBounds,V_TkMacWinBounds,_ANSI_ARGS_((TkWindow * winPtr,
+ Rect * geometry)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacWinBounds */
+
+#ifndef TkMacWindowOffset
+#ifdef MAC_TCL
+VFUNC(void,TkMacWindowOffset,V_TkMacWindowOffset,_ANSI_ARGS_((WindowRef wRef,
+ int * xOffset, int * yOffset)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacWindowOffset */
+
+#ifndef TkMacZoomToplevel
+#ifdef MAC_TCL
+VFUNC(int,TkMacZoomToplevel,V_TkMacZoomToplevel,_ANSI_ARGS_((WindowPtr whichWindow,
+ Point where, short zoomPart)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacZoomToplevel */
+
+#ifndef TkPointerDeadWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,TkPointerDeadWindow,V_TkPointerDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkPointerDeadWindow,V_TkPointerDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkPointerDeadWindow,V_TkPointerDeadWindow,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkPointerDeadWindow */
+
+#ifndef TkSendCleanup
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkSendCleanup,V_TkSendCleanup,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkSendCleanup */
+
+#ifndef TkSetMacColor
+#ifdef MAC_OSX_TK
+VFUNC(int,TkSetMacColor,V_TkSetMacColor,_ANSI_ARGS_((unsigned long pixel,
+ RGBColor * macColor)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,TkSetMacColor,V_TkSetMacColor,_ANSI_ARGS_((unsigned long pixel,
+ RGBColor * macColor)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkSetMacColor */
+
+#ifndef TkSetPixmapColormap
+#ifdef __WIN32__
+VFUNC(void,TkSetPixmapColormap,V_TkSetPixmapColormap,_ANSI_ARGS_((Pixmap pixmap,
+ Colormap colormap)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkSetPixmapColormap */
+
+#ifndef TkSetWMName
+#ifdef MAC_OSX_TK
+VFUNC(void,TkSetWMName,V_TkSetWMName,_ANSI_ARGS_((TkWindow * winPtr,
+ Tk_Uid titleUid)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkSetWMName,V_TkSetWMName,_ANSI_ARGS_((TkWindow * winPtr,
+ Tk_Uid titleUid)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkSetWMName */
+
+#ifndef TkSuspendClipboard
+#ifdef MAC_OSX_TK
+VFUNC(void,TkSuspendClipboard,V_TkSuspendClipboard,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkSuspendClipboard,V_TkSuspendClipboard,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkSuspendClipboard */
+
+#ifndef TkUnixContainerId
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(Window,TkUnixContainerId,V_TkUnixContainerId,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkUnixContainerId */
+
+#ifndef TkUnixDoOneXEvent
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(int,TkUnixDoOneXEvent,V_TkUnixDoOneXEvent,_ANSI_ARGS_((Tcl_Time * timePtr)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkUnixDoOneXEvent */
+
+#ifndef TkUnixSetMenubar
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkUnixSetMenubar,V_TkUnixSetMenubar,_ANSI_ARGS_((Tk_Window tkwin,
+ Tk_Window menubar)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkUnixSetMenubar */
+
+#ifndef TkWinCancelMouseTimer
+#ifdef __WIN32__
+VFUNC(void,TkWinCancelMouseTimer,V_TkWinCancelMouseTimer,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinCancelMouseTimer */
+
+#ifndef TkWinClipboardRender
+#ifdef __WIN32__
+VFUNC(void,TkWinClipboardRender,V_TkWinClipboardRender,_ANSI_ARGS_((
+ TkDisplay * dispPtr, UINT format)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinClipboardRender */
+
+#ifndef TkWinDialogDebug
+#ifdef __WIN32__
+VFUNC(void,TkWinDialogDebug,V_TkWinDialogDebug,_ANSI_ARGS_((int debug)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinDialogDebug */
+
+#ifndef TkWinEmbeddedEventProc
+#ifdef __WIN32__
+VFUNC(LRESULT,TkWinEmbeddedEventProc,V_TkWinEmbeddedEventProc,_ANSI_ARGS_((HWND hwnd,
+ UINT message, WPARAM wParam, LPARAM lParam)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinEmbeddedEventProc */
+
+#ifndef TkWinFillRect
+#ifdef __WIN32__
+VFUNC(void,TkWinFillRect,V_TkWinFillRect,_ANSI_ARGS_((HDC dc, int x, int y,
+ int width, int height, int pixel)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinFillRect */
+
+#ifndef TkWinGetBorderPixels
+#ifdef __WIN32__
+VFUNC(COLORREF,TkWinGetBorderPixels,V_TkWinGetBorderPixels,_ANSI_ARGS_((Tk_Window tkwin,
+ Tk_3DBorder border, int which)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinGetBorderPixels */
+
+#ifndef TkWinGetDrawableDC
+#ifdef __WIN32__
+VFUNC(HDC,TkWinGetDrawableDC,V_TkWinGetDrawableDC,_ANSI_ARGS_((Display * display,
+ Drawable d, TkWinDCState* state)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinGetDrawableDC */
+
+#ifndef TkWinGetMenuSystemDefault
+#ifdef __WIN32__
+VFUNC(Tcl_Obj *,TkWinGetMenuSystemDefault,V_TkWinGetMenuSystemDefault,_ANSI_ARGS_((
+ Tk_Window tkwin, CONST char * dbName,
+ CONST char * className)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinGetMenuSystemDefault */
+
+#ifndef TkWinGetModifierState
+#ifdef __WIN32__
+VFUNC(int,TkWinGetModifierState,V_TkWinGetModifierState,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinGetModifierState */
+
+#ifndef TkWinGetPlatformId
+#ifdef __WIN32__
+VFUNC(int,TkWinGetPlatformId,V_TkWinGetPlatformId,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinGetPlatformId */
+
+#ifndef TkWinGetSystemPalette
+#ifdef __WIN32__
+VFUNC(HPALETTE,TkWinGetSystemPalette,V_TkWinGetSystemPalette,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinGetSystemPalette */
+
+#ifndef TkWinGetWrapperWindow
+#ifdef __WIN32__
+VFUNC(HWND,TkWinGetWrapperWindow,V_TkWinGetWrapperWindow,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinGetWrapperWindow */
+
+#ifndef TkWinHandleMenuEvent
+#ifdef __WIN32__
+VFUNC(int,TkWinHandleMenuEvent,V_TkWinHandleMenuEvent,_ANSI_ARGS_((HWND * phwnd,
+ UINT * pMessage, WPARAM * pwParam,
+ LPARAM * plParam, LRESULT * plResult)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinHandleMenuEvent */
+
+#ifndef TkWinIndexOfColor
+#ifdef __WIN32__
+VFUNC(int,TkWinIndexOfColor,V_TkWinIndexOfColor,_ANSI_ARGS_((XColor * colorPtr)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinIndexOfColor */
+
+#ifndef TkWinReleaseDrawableDC
+#ifdef __WIN32__
+VFUNC(void,TkWinReleaseDrawableDC,V_TkWinReleaseDrawableDC,_ANSI_ARGS_((Drawable d,
+ HDC hdc, TkWinDCState* state)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinReleaseDrawableDC */
+
+#ifndef TkWinResendEvent
+#ifdef __WIN32__
+VFUNC(LRESULT,TkWinResendEvent,V_TkWinResendEvent,_ANSI_ARGS_((WNDPROC wndproc,
+ HWND hwnd, XEvent * eventPtr)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinResendEvent */
+
+#ifndef TkWinSelectPalette
+#ifdef __WIN32__
+VFUNC(HPALETTE,TkWinSelectPalette,V_TkWinSelectPalette,_ANSI_ARGS_((HDC dc,
+ Colormap colormap)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinSelectPalette */
+
+#ifndef TkWinSetForegroundWindow
+#ifdef __WIN32__
+VFUNC(void,TkWinSetForegroundWindow,V_TkWinSetForegroundWindow,_ANSI_ARGS_((
+ TkWindow * winPtr)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinSetForegroundWindow */
+
+#ifndef TkWinSetHINSTANCE
+#ifdef __WIN32__
+VFUNC(void,TkWinSetHINSTANCE,V_TkWinSetHINSTANCE,_ANSI_ARGS_((HINSTANCE hInstance)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinSetHINSTANCE */
+
+#ifndef TkWinSetMenu
+#ifdef __WIN32__
+VFUNC(void,TkWinSetMenu,V_TkWinSetMenu,_ANSI_ARGS_((Tk_Window tkwin,
+ HMENU hMenu)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinSetMenu */
+
+#ifndef TkWinSetWindowPos
+#ifdef __WIN32__
+VFUNC(void,TkWinSetWindowPos,V_TkWinSetWindowPos,_ANSI_ARGS_((HWND hwnd,
+ HWND siblingHwnd, int pos)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinSetWindowPos */
+
+#ifndef TkWinWmCleanup
+#ifdef __WIN32__
+VFUNC(void,TkWinWmCleanup,V_TkWinWmCleanup,_ANSI_ARGS_((HINSTANCE hInstance)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinWmCleanup */
+
+#ifndef TkWinXCleanup
+#ifdef __WIN32__
+VFUNC(void,TkWinXCleanup,V_TkWinXCleanup,_ANSI_ARGS_((HINSTANCE hInstance)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinXCleanup */
+
+#ifndef TkWinXInit
+#ifdef __WIN32__
+VFUNC(void,TkWinXInit,V_TkWinXInit,_ANSI_ARGS_((HINSTANCE hInstance)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkWinXInit */
+
+#ifndef TkWmCleanup
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkWmCleanup,V_TkWmCleanup,_ANSI_ARGS_((TkDisplay * dispPtr)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkWmCleanup */
+
+#ifndef Tk_TopCoordsToWindow
+#ifdef MAC_OSX_TK
+VFUNC(Tk_Window,Tk_TopCoordsToWindow,V_Tk_TopCoordsToWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ int rootX, int rootY, int * newX, int * newY)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Tk_Window,Tk_TopCoordsToWindow,V_Tk_TopCoordsToWindow,_ANSI_ARGS_((Tk_Window tkwin,
+ int rootX, int rootY, int * newX, int * newY)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef Tk_TopCoordsToWindow */
+
+#ifndef TkpCmapStressed
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(int,TkpCmapStressed,V_TkpCmapStressed,_ANSI_ARGS_((Tk_Window tkwin,
+ Colormap colormap)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkpCmapStressed */
+
+#ifndef TkpGetMS
+#ifdef MAC_OSX_TK
+VFUNC(unsigned long,TkpGetMS,V_TkpGetMS,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(unsigned long,TkpGetMS,V_TkpGetMS,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(unsigned long,TkpGetMS,V_TkpGetMS,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkpGetMS */
+
+#ifndef TkpIsWindowFloating
+#ifdef MAC_OSX_TK
+VFUNC(int,TkpIsWindowFloating,V_TkpIsWindowFloating,_ANSI_ARGS_((WindowRef window)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,TkpIsWindowFloating,V_TkpIsWindowFloating,_ANSI_ARGS_((WindowRef window)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkpIsWindowFloating */
+
+#ifndef TkpPrintWindowId
+#ifdef __WIN32__
+VFUNC(void,TkpPrintWindowId,V_TkpPrintWindowId,_ANSI_ARGS_((char * buf,
+ Window window)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkpPrintWindowId */
+
+#ifndef TkpScanWindowId
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(int,TkpScanWindowId,V_TkpScanWindowId,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj *string, Window * idPtr)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#ifdef __WIN32__
+VFUNC(int,TkpScanWindowId,V_TkpScanWindowId,_ANSI_ARGS_((Tcl_Interp * interp,
+ Tcl_Obj * string, Window * idPtr)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkpScanWindowId */
+
+#ifndef TkpSetCapture
+#ifdef MAC_OSX_TK
+VFUNC(void,TkpSetCapture,V_TkpSetCapture,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkpSetCapture,V_TkpSetCapture,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkpSetCapture,V_TkpSetCapture,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkpSetCapture */
+
+#ifndef TkpSetCursor
+#ifdef MAC_OSX_TK
+VFUNC(void,TkpSetCursor,V_TkpSetCursor,_ANSI_ARGS_((TkpCursor cursor)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkpSetCursor,V_TkpSetCursor,_ANSI_ARGS_((TkpCursor cursor)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkpSetCursor,V_TkpSetCursor,_ANSI_ARGS_((TkpCursor cursor)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkpSetCursor */
+
+#ifndef TkpSync
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(void,TkpSync,V_TkpSync,_ANSI_ARGS_((Display * display)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#endif /* #ifndef TkpSync */
+
+#ifndef TkpWmSetState
+#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK))
+VFUNC(int,TkpWmSetState,V_TkpWmSetState,_ANSI_ARGS_((TkWindow * winPtr,
+ int state)))
+#endif /* #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) */
+#ifdef MAC_OSX_TK
+VFUNC(void,TkpWmSetState,V_TkpWmSetState,_ANSI_ARGS_((TkWindow * winPtr,
+ int state)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkpWmSetState,V_TkpWmSetState,_ANSI_ARGS_((TkWindow * winPtr,
+ int state)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkpWmSetState,V_TkpWmSetState,_ANSI_ARGS_((TkWindow * winPtr,
+ int state)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkpWmSetState */
+
+#endif /* _TKINTPLATDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls_f.h
new file mode 100644
index 00000000000..8eef38bdcb1
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntPlatDecls_f.h
@@ -0,0 +1,14 @@
+#ifndef TKINTPLATDECLS_VT
+#define TKINTPLATDECLS_VT
+typedef struct TkintplatdeclsVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkIntPlatDecls.t"
+#undef VFUNC
+#undef VVAR
+} TkintplatdeclsVtab;
+extern TkintplatdeclsVtab *TkintplatdeclsVptr;
+extern TkintplatdeclsVtab *TkintplatdeclsVGet(void);
+#endif /* TKINTPLATDECLS_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.h
new file mode 100644
index 00000000000..052c5ba9737
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.h
@@ -0,0 +1,2436 @@
+/*
+ * tkIntXlibDecls.h --
+ *
+ * This file contains the declarations for all platform dependent
+ * unsupported functions that are exported by the Tk library. These
+ * interfaces are not guaranteed to remain the same between
+ * versions. Use at your own risk.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * All rights reserved.
+ *
+ * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.16 2002/10/09 11:56:33 das Exp $
+ */
+
+#ifndef _TKINTXLIBDECLS
+#define _TKINTXLIBDECLS
+
+#include <X11/Xlib.h>
+
+#ifdef MAC_TCL
+#include "Xutil.h"
+#else
+#include "X11/Xutil.h"
+#endif
+
+#include "Lang.h"
+
+#ifdef BUILD_tk
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tkInt.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+#ifdef __WIN32__
+/* 0 */
+EXTERN void XSetDashes _ANSI_ARGS_((Display* display, GC gc,
+ int dash_offset, _Xconst char* dash_list,
+ int n));
+/* 1 */
+EXTERN XModifierKeymap* XGetModifierMapping _ANSI_ARGS_((Display* d));
+/* 2 */
+EXTERN XImage * XCreateImage _ANSI_ARGS_((Display* d, Visual* v,
+ unsigned int ui1, int i1, int i2, char* cp,
+ unsigned int ui2, unsigned int ui3, int i3,
+ int i4));
+/* 3 */
+EXTERN XImage * XGetImage _ANSI_ARGS_((Display* d, Drawable dr,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, unsigned long ul, int i3));
+/* 4 */
+EXTERN char * XGetAtomName _ANSI_ARGS_((Display* d, Atom a));
+/* 5 */
+EXTERN char * XKeysymToString _ANSI_ARGS_((KeySym k));
+/* 6 */
+EXTERN Colormap XCreateColormap _ANSI_ARGS_((Display* d, Window w,
+ Visual* v, int i));
+/* 7 */
+EXTERN Cursor XCreatePixmapCursor _ANSI_ARGS_((Display* d,
+ Pixmap p1, Pixmap p2, XColor* x1, XColor* x2,
+ unsigned int ui1, unsigned int ui2));
+/* 8 */
+EXTERN Cursor XCreateGlyphCursor _ANSI_ARGS_((Display* d, Font f1,
+ Font f2, unsigned int ui1, unsigned int ui2,
+ XColor* x1, XColor* x2));
+/* 9 */
+EXTERN GContext XGContextFromGC _ANSI_ARGS_((GC g));
+/* 10 */
+EXTERN XHostAddress * XListHosts _ANSI_ARGS_((Display* d, int* i, Bool* b));
+/* 11 */
+EXTERN KeySym XKeycodeToKeysym _ANSI_ARGS_((Display* d,
+ unsigned int k, int i));
+/* 12 */
+EXTERN KeySym XStringToKeysym _ANSI_ARGS_((_Xconst char* c));
+/* 13 */
+EXTERN Window XRootWindow _ANSI_ARGS_((Display* d, int i));
+/* 14 */
+EXTERN XErrorHandler XSetErrorHandler _ANSI_ARGS_((XErrorHandler x));
+/* 15 */
+EXTERN Status XIconifyWindow _ANSI_ARGS_((Display* d, Window w,
+ int i));
+/* 16 */
+EXTERN Status XWithdrawWindow _ANSI_ARGS_((Display* d, Window w,
+ int i));
+/* 17 */
+EXTERN Status XGetWMColormapWindows _ANSI_ARGS_((Display* d,
+ Window w, Window** wpp, int* ip));
+/* 18 */
+EXTERN Status XAllocColor _ANSI_ARGS_((Display* d, Colormap c,
+ XColor* xp));
+/* 19 */
+EXTERN void XBell _ANSI_ARGS_((Display* d, int i));
+/* 20 */
+EXTERN void XChangeProperty _ANSI_ARGS_((Display* d, Window w,
+ Atom a1, Atom a2, int i1, int i2,
+ _Xconst unsigned char* c, int i3));
+/* 21 */
+EXTERN void XChangeWindowAttributes _ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul,
+ XSetWindowAttributes* x));
+/* 22 */
+EXTERN void XClearWindow _ANSI_ARGS_((Display* d, Window w));
+/* 23 */
+EXTERN void XConfigureWindow _ANSI_ARGS_((Display* d, Window w,
+ unsigned int i, XWindowChanges* x));
+/* 24 */
+EXTERN void XCopyArea _ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4));
+/* 25 */
+EXTERN void XCopyPlane _ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4, unsigned long ul));
+/* 26 */
+EXTERN Pixmap XCreateBitmapFromData _ANSI_ARGS_((Display* display,
+ Drawable d, _Xconst char* data,
+ unsigned int width, unsigned int height));
+/* 27 */
+EXTERN void XDefineCursor _ANSI_ARGS_((Display* d, Window w,
+ Cursor c));
+/* 28 */
+EXTERN void XDeleteProperty _ANSI_ARGS_((Display* d, Window w,
+ Atom a));
+/* 29 */
+EXTERN void XDestroyWindow _ANSI_ARGS_((Display* d, Window w));
+/* 30 */
+EXTERN void XDrawArc _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4));
+/* 31 */
+EXTERN void XDrawLines _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2));
+/* 32 */
+EXTERN void XDrawRectangle _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, int i1, int i2, unsigned int ui1,
+ unsigned int ui2));
+/* 33 */
+EXTERN void XFillArc _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4));
+/* 34 */
+EXTERN void XFillPolygon _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2, int i3));
+/* 35 */
+EXTERN void XFillRectangles _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XRectangle* x, int i));
+/* 36 */
+EXTERN void XForceScreenSaver _ANSI_ARGS_((Display* d, int i));
+/* 37 */
+EXTERN void XFreeColormap _ANSI_ARGS_((Display* d, Colormap c));
+/* 38 */
+EXTERN void XFreeColors _ANSI_ARGS_((Display* d, Colormap c,
+ unsigned long* ulp, int i, unsigned long ul));
+/* 39 */
+EXTERN void XFreeCursor _ANSI_ARGS_((Display* d, Cursor c));
+/* 40 */
+EXTERN void XFreeModifiermap _ANSI_ARGS_((XModifierKeymap* x));
+/* 41 */
+EXTERN Status XGetGeometry _ANSI_ARGS_((Display* d, Drawable dr,
+ Window* w, int* i1, int* i2,
+ unsigned int* ui1, unsigned int* ui2,
+ unsigned int* ui3, unsigned int* ui4));
+/* 42 */
+EXTERN void XGetInputFocus _ANSI_ARGS_((Display* d, Window* w,
+ int* i));
+/* 43 */
+EXTERN int XGetWindowProperty _ANSI_ARGS_((Display* d, Window w,
+ Atom a1, long l1, long l2, Bool b, Atom a2,
+ Atom* ap, int* ip, unsigned long* ulp1,
+ unsigned long* ulp2, unsigned char** cpp));
+/* 44 */
+EXTERN Status XGetWindowAttributes _ANSI_ARGS_((Display* d,
+ Window w, XWindowAttributes* x));
+/* 45 */
+EXTERN int XGrabKeyboard _ANSI_ARGS_((Display* d, Window w,
+ Bool b, int i1, int i2, Time t));
+/* 46 */
+EXTERN int XGrabPointer _ANSI_ARGS_((Display* d, Window w1,
+ Bool b, unsigned int ui, int i1, int i2,
+ Window w2, Cursor c, Time t));
+/* 47 */
+EXTERN KeyCode XKeysymToKeycode _ANSI_ARGS_((Display* d, KeySym k));
+/* 48 */
+EXTERN Status XLookupColor _ANSI_ARGS_((Display* d, Colormap c1,
+ _Xconst char* c2, XColor* x1, XColor* x2));
+/* 49 */
+EXTERN void XMapWindow _ANSI_ARGS_((Display* d, Window w));
+/* 50 */
+EXTERN void XMoveResizeWindow _ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2));
+/* 51 */
+EXTERN void XMoveWindow _ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2));
+/* 52 */
+EXTERN void XNextEvent _ANSI_ARGS_((Display* d, XEvent* x));
+/* 53 */
+EXTERN void XPutBackEvent _ANSI_ARGS_((Display* d, XEvent* x));
+/* 54 */
+EXTERN void XQueryColors _ANSI_ARGS_((Display* d, Colormap c,
+ XColor* x, int i));
+/* 55 */
+EXTERN Bool XQueryPointer _ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, int* i1, int* i2,
+ int* i3, int* i4, unsigned int* ui));
+/* 56 */
+EXTERN Status XQueryTree _ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, Window** w4,
+ unsigned int* ui));
+/* 57 */
+EXTERN void XRaiseWindow _ANSI_ARGS_((Display* d, Window w));
+/* 58 */
+EXTERN void XRefreshKeyboardMapping _ANSI_ARGS_((
+ XMappingEvent* x));
+/* 59 */
+EXTERN void XResizeWindow _ANSI_ARGS_((Display* d, Window w,
+ unsigned int ui1, unsigned int ui2));
+/* 60 */
+EXTERN void XSelectInput _ANSI_ARGS_((Display* d, Window w,
+ long l));
+/* 61 */
+EXTERN Status XSendEvent _ANSI_ARGS_((Display* d, Window w, Bool b,
+ long l, XEvent* x));
+/* 62 */
+EXTERN void XSetCommand _ANSI_ARGS_((Display* d, Window w,
+ CONST char** c, int i));
+/* 63 */
+EXTERN void XSetIconName _ANSI_ARGS_((Display* d, Window w,
+ _Xconst char* c));
+/* 64 */
+EXTERN void XSetInputFocus _ANSI_ARGS_((Display* d, Window w,
+ int i, Time t));
+/* 65 */
+EXTERN void XSetSelectionOwner _ANSI_ARGS_((Display* d, Atom a,
+ Window w, Time t));
+/* 66 */
+EXTERN void XSetWindowBackground _ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul));
+/* 67 */
+EXTERN void XSetWindowBackgroundPixmap _ANSI_ARGS_((Display* d,
+ Window w, Pixmap p));
+/* 68 */
+EXTERN void XSetWindowBorder _ANSI_ARGS_((Display* d, Window w,
+ unsigned long ul));
+/* 69 */
+EXTERN void XSetWindowBorderPixmap _ANSI_ARGS_((Display* d,
+ Window w, Pixmap p));
+/* 70 */
+EXTERN void XSetWindowBorderWidth _ANSI_ARGS_((Display* d,
+ Window w, unsigned int ui));
+/* 71 */
+EXTERN void XSetWindowColormap _ANSI_ARGS_((Display* d, Window w,
+ Colormap c));
+/* 72 */
+EXTERN Bool XTranslateCoordinates _ANSI_ARGS_((Display* d,
+ Window w1, Window w2, int i1, int i2,
+ int* i3, int* i4, Window* w3));
+/* 73 */
+EXTERN void XUngrabKeyboard _ANSI_ARGS_((Display* d, Time t));
+/* 74 */
+EXTERN void XUngrabPointer _ANSI_ARGS_((Display* d, Time t));
+/* 75 */
+EXTERN void XUnmapWindow _ANSI_ARGS_((Display* d, Window w));
+/* 76 */
+EXTERN void XWindowEvent _ANSI_ARGS_((Display* d, Window w,
+ long l, XEvent* x));
+/* 77 */
+EXTERN void XDestroyIC _ANSI_ARGS_((XIC x));
+/* 78 */
+EXTERN Bool XFilterEvent _ANSI_ARGS_((XEvent* x, Window w));
+/* 79 */
+EXTERN int XmbLookupString _ANSI_ARGS_((XIC xi,
+ XKeyPressedEvent* xk, char* c, int i,
+ KeySym* k, Status* s));
+/* 80 */
+EXTERN void TkPutImage _ANSI_ARGS_((unsigned long * colors,
+ int ncolors, Display* display, Drawable d,
+ GC gc, XImage* image, int src_x, int src_y,
+ int dest_x, int dest_y, unsigned int width,
+ unsigned int height));
+/* Slot 81 is reserved */
+/* 82 */
+EXTERN Status XParseColor _ANSI_ARGS_((Display * display,
+ Colormap map, _Xconst char* spec,
+ XColor * colorPtr));
+/* 83 */
+EXTERN GC XCreateGC _ANSI_ARGS_((Display* display, Drawable d,
+ unsigned long valuemask, XGCValues* values));
+/* 84 */
+EXTERN void XFreeGC _ANSI_ARGS_((Display* display, GC gc));
+/* 85 */
+EXTERN Atom XInternAtom _ANSI_ARGS_((Display* display,
+ _Xconst char* atom_name, Bool only_if_exists));
+/* 86 */
+EXTERN void XSetBackground _ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground));
+/* 87 */
+EXTERN void XSetForeground _ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground));
+/* 88 */
+EXTERN void XSetClipMask _ANSI_ARGS_((Display* display, GC gc,
+ Pixmap pixmap));
+/* 89 */
+EXTERN void XSetClipOrigin _ANSI_ARGS_((Display* display, GC gc,
+ int clip_x_origin, int clip_y_origin));
+/* 90 */
+EXTERN void XSetTSOrigin _ANSI_ARGS_((Display* display, GC gc,
+ int ts_x_origin, int ts_y_origin));
+/* 91 */
+EXTERN void XChangeGC _ANSI_ARGS_((Display * d, GC gc,
+ unsigned long mask, XGCValues * values));
+/* 92 */
+EXTERN void XSetFont _ANSI_ARGS_((Display * display, GC gc,
+ Font font));
+/* 93 */
+EXTERN void XSetArcMode _ANSI_ARGS_((Display * display, GC gc,
+ int arc_mode));
+/* 94 */
+EXTERN void XSetStipple _ANSI_ARGS_((Display * display, GC gc,
+ Pixmap stipple));
+/* 95 */
+EXTERN void XSetFillRule _ANSI_ARGS_((Display * display, GC gc,
+ int fill_rule));
+/* 96 */
+EXTERN void XSetFillStyle _ANSI_ARGS_((Display * display, GC gc,
+ int fill_style));
+/* 97 */
+EXTERN void XSetFunction _ANSI_ARGS_((Display * display, GC gc,
+ int function));
+/* 98 */
+EXTERN void XSetLineAttributes _ANSI_ARGS_((Display * display,
+ GC gc, unsigned int line_width,
+ int line_style, int cap_style,
+ int join_style));
+/* 99 */
+EXTERN int _XInitImageFuncPtrs _ANSI_ARGS_((XImage * image));
+/* 100 */
+EXTERN XIC XCreateIC _ANSI_ARGS_((void));
+/* 101 */
+EXTERN XVisualInfo * XGetVisualInfo _ANSI_ARGS_((Display* display,
+ long vinfo_mask, XVisualInfo* vinfo_template,
+ int* nitems_return));
+/* 102 */
+EXTERN void XSetWMClientMachine _ANSI_ARGS_((Display* display,
+ Window w, XTextProperty* text_prop));
+/* 103 */
+EXTERN Status XStringListToTextProperty _ANSI_ARGS_((char** list,
+ int count, XTextProperty* text_prop_return));
+/* 104 */
+EXTERN void XDrawLine _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int x1, int y1, int x2, int y2));
+/* 105 */
+EXTERN void XWarpPointer _ANSI_ARGS_((Display* d, Window s,
+ Window dw, int sx, int sy, unsigned int sw,
+ unsigned int sh, int dx, int dy));
+/* 106 */
+EXTERN void XFillRectangle _ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, int x, int y,
+ unsigned int width, unsigned int height));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 0 */
+EXTERN void XSetDashes _ANSI_ARGS_((Display* display, GC gc,
+ int dash_offset, _Xconst char* dash_list,
+ int n));
+/* 1 */
+EXTERN XModifierKeymap* XGetModifierMapping _ANSI_ARGS_((Display* d));
+/* 2 */
+EXTERN XImage * XCreateImage _ANSI_ARGS_((Display* d, Visual* v,
+ unsigned int ui1, int i1, int i2, char* cp,
+ unsigned int ui2, unsigned int ui3, int i3,
+ int i4));
+/* 3 */
+EXTERN XImage * XGetImage _ANSI_ARGS_((Display* d, Drawable dr,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, unsigned long ul, int i3));
+/* 4 */
+EXTERN char * XGetAtomName _ANSI_ARGS_((Display* d, Atom a));
+/* 5 */
+EXTERN char * XKeysymToString _ANSI_ARGS_((KeySym k));
+/* 6 */
+EXTERN Colormap XCreateColormap _ANSI_ARGS_((Display* d, Window w,
+ Visual* v, int i));
+/* 7 */
+EXTERN GContext XGContextFromGC _ANSI_ARGS_((GC g));
+/* 8 */
+EXTERN KeySym XKeycodeToKeysym _ANSI_ARGS_((Display* d, KeyCode k,
+ int i));
+/* 9 */
+EXTERN KeySym XStringToKeysym _ANSI_ARGS_((_Xconst char* c));
+/* 10 */
+EXTERN Window XRootWindow _ANSI_ARGS_((Display* d, int i));
+/* 11 */
+EXTERN XErrorHandler XSetErrorHandler _ANSI_ARGS_((XErrorHandler x));
+/* 12 */
+EXTERN Status XAllocColor _ANSI_ARGS_((Display* d, Colormap c,
+ XColor* xp));
+/* 13 */
+EXTERN void XBell _ANSI_ARGS_((Display* d, int i));
+/* 14 */
+EXTERN void XChangeProperty _ANSI_ARGS_((Display* d, Window w,
+ Atom a1, Atom a2, int i1, int i2,
+ _Xconst unsigned char* c, int i3));
+/* 15 */
+EXTERN void XChangeWindowAttributes _ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul,
+ XSetWindowAttributes* x));
+/* 16 */
+EXTERN void XConfigureWindow _ANSI_ARGS_((Display* d, Window w,
+ unsigned int i, XWindowChanges* x));
+/* 17 */
+EXTERN void XCopyArea _ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4));
+/* 18 */
+EXTERN void XCopyPlane _ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4, unsigned long ul));
+/* 19 */
+EXTERN Pixmap XCreateBitmapFromData _ANSI_ARGS_((Display* display,
+ Drawable d, _Xconst char* data,
+ unsigned int width, unsigned int height));
+/* 20 */
+EXTERN void XDefineCursor _ANSI_ARGS_((Display* d, Window w,
+ Cursor c));
+/* 21 */
+EXTERN void XDestroyWindow _ANSI_ARGS_((Display* d, Window w));
+/* 22 */
+EXTERN void XDrawArc _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4));
+/* 23 */
+EXTERN void XDrawLines _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2));
+/* 24 */
+EXTERN void XDrawRectangle _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, int i1, int i2, unsigned int ui1,
+ unsigned int ui2));
+/* 25 */
+EXTERN void XFillArc _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4));
+/* 26 */
+EXTERN void XFillPolygon _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2, int i3));
+/* 27 */
+EXTERN void XFillRectangles _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XRectangle* x, int i));
+/* 28 */
+EXTERN void XFreeColormap _ANSI_ARGS_((Display* d, Colormap c));
+/* 29 */
+EXTERN void XFreeColors _ANSI_ARGS_((Display* d, Colormap c,
+ unsigned long* ulp, int i, unsigned long ul));
+/* 30 */
+EXTERN void XFreeModifiermap _ANSI_ARGS_((XModifierKeymap* x));
+/* 31 */
+EXTERN Status XGetGeometry _ANSI_ARGS_((Display* d, Drawable dr,
+ Window* w, int* i1, int* i2,
+ unsigned int* ui1, unsigned int* ui2,
+ unsigned int* ui3, unsigned int* ui4));
+/* 32 */
+EXTERN int XGetWindowProperty _ANSI_ARGS_((Display* d, Window w,
+ Atom a1, long l1, long l2, Bool b, Atom a2,
+ Atom* ap, int* ip, unsigned long* ulp1,
+ unsigned long* ulp2, unsigned char** cpp));
+/* 33 */
+EXTERN int XGrabKeyboard _ANSI_ARGS_((Display* d, Window w,
+ Bool b, int i1, int i2, Time t));
+/* 34 */
+EXTERN int XGrabPointer _ANSI_ARGS_((Display* d, Window w1,
+ Bool b, unsigned int ui, int i1, int i2,
+ Window w2, Cursor c, Time t));
+/* 35 */
+EXTERN KeyCode XKeysymToKeycode _ANSI_ARGS_((Display* d, KeySym k));
+/* 36 */
+EXTERN void XMapWindow _ANSI_ARGS_((Display* d, Window w));
+/* 37 */
+EXTERN void XMoveResizeWindow _ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2));
+/* 38 */
+EXTERN void XMoveWindow _ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2));
+/* 39 */
+EXTERN Bool XQueryPointer _ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, int* i1, int* i2,
+ int* i3, int* i4, unsigned int* ui));
+/* 40 */
+EXTERN void XRaiseWindow _ANSI_ARGS_((Display* d, Window w));
+/* 41 */
+EXTERN void XRefreshKeyboardMapping _ANSI_ARGS_((
+ XMappingEvent* x));
+/* 42 */
+EXTERN void XResizeWindow _ANSI_ARGS_((Display* d, Window w,
+ unsigned int ui1, unsigned int ui2));
+/* 43 */
+EXTERN void XSelectInput _ANSI_ARGS_((Display* d, Window w,
+ long l));
+/* 44 */
+EXTERN Status XSendEvent _ANSI_ARGS_((Display* d, Window w, Bool b,
+ long l, XEvent* x));
+/* 45 */
+EXTERN void XSetIconName _ANSI_ARGS_((Display* d, Window w,
+ _Xconst char* c));
+/* 46 */
+EXTERN void XSetInputFocus _ANSI_ARGS_((Display* d, Window w,
+ int i, Time t));
+/* 47 */
+EXTERN void XSetSelectionOwner _ANSI_ARGS_((Display* d, Atom a,
+ Window w, Time t));
+/* 48 */
+EXTERN void XSetWindowBackground _ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul));
+/* 49 */
+EXTERN void XSetWindowBackgroundPixmap _ANSI_ARGS_((Display* d,
+ Window w, Pixmap p));
+/* 50 */
+EXTERN void XSetWindowBorder _ANSI_ARGS_((Display* d, Window w,
+ unsigned long ul));
+/* 51 */
+EXTERN void XSetWindowBorderPixmap _ANSI_ARGS_((Display* d,
+ Window w, Pixmap p));
+/* 52 */
+EXTERN void XSetWindowBorderWidth _ANSI_ARGS_((Display* d,
+ Window w, unsigned int ui));
+/* 53 */
+EXTERN void XSetWindowColormap _ANSI_ARGS_((Display* d, Window w,
+ Colormap c));
+/* 54 */
+EXTERN void XUngrabKeyboard _ANSI_ARGS_((Display* d, Time t));
+/* 55 */
+EXTERN void XUngrabPointer _ANSI_ARGS_((Display* d, Time t));
+/* 56 */
+EXTERN void XUnmapWindow _ANSI_ARGS_((Display* d, Window w));
+/* 57 */
+EXTERN void TkPutImage _ANSI_ARGS_((unsigned long * colors,
+ int ncolors, Display* display, Drawable d,
+ GC gc, XImage* image, int src_x, int src_y,
+ int dest_x, int dest_y, unsigned int width,
+ unsigned int height));
+/* 58 */
+EXTERN Status XParseColor _ANSI_ARGS_((Display * display,
+ Colormap map, _Xconst char* spec,
+ XColor * colorPtr));
+/* 59 */
+EXTERN GC XCreateGC _ANSI_ARGS_((Display* display, Drawable d,
+ unsigned long valuemask, XGCValues* values));
+/* 60 */
+EXTERN void XFreeGC _ANSI_ARGS_((Display* display, GC gc));
+/* 61 */
+EXTERN Atom XInternAtom _ANSI_ARGS_((Display* display,
+ _Xconst char* atom_name, Bool only_if_exists));
+/* 62 */
+EXTERN void XSetBackground _ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground));
+/* 63 */
+EXTERN void XSetForeground _ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground));
+/* 64 */
+EXTERN void XSetClipMask _ANSI_ARGS_((Display* display, GC gc,
+ Pixmap pixmap));
+/* 65 */
+EXTERN void XSetClipOrigin _ANSI_ARGS_((Display* display, GC gc,
+ int clip_x_origin, int clip_y_origin));
+/* 66 */
+EXTERN void XSetTSOrigin _ANSI_ARGS_((Display* display, GC gc,
+ int ts_x_origin, int ts_y_origin));
+/* 67 */
+EXTERN void XChangeGC _ANSI_ARGS_((Display * d, GC gc,
+ unsigned long mask, XGCValues * values));
+/* 68 */
+EXTERN void XSetFont _ANSI_ARGS_((Display * display, GC gc,
+ Font font));
+/* 69 */
+EXTERN void XSetArcMode _ANSI_ARGS_((Display * display, GC gc,
+ int arc_mode));
+/* 70 */
+EXTERN void XSetStipple _ANSI_ARGS_((Display * display, GC gc,
+ Pixmap stipple));
+/* 71 */
+EXTERN void XSetFillRule _ANSI_ARGS_((Display * display, GC gc,
+ int fill_rule));
+/* 72 */
+EXTERN void XSetFillStyle _ANSI_ARGS_((Display * display, GC gc,
+ int fill_style));
+/* 73 */
+EXTERN void XSetFunction _ANSI_ARGS_((Display * display, GC gc,
+ int function));
+/* 74 */
+EXTERN void XSetLineAttributes _ANSI_ARGS_((Display * display,
+ GC gc, unsigned int line_width,
+ int line_style, int cap_style,
+ int join_style));
+/* 75 */
+EXTERN int _XInitImageFuncPtrs _ANSI_ARGS_((XImage * image));
+/* 76 */
+EXTERN XIC XCreateIC _ANSI_ARGS_((void));
+/* 77 */
+EXTERN XVisualInfo * XGetVisualInfo _ANSI_ARGS_((Display* display,
+ long vinfo_mask, XVisualInfo* vinfo_template,
+ int* nitems_return));
+/* 78 */
+EXTERN void XSetWMClientMachine _ANSI_ARGS_((Display* display,
+ Window w, XTextProperty* text_prop));
+/* 79 */
+EXTERN Status XStringListToTextProperty _ANSI_ARGS_((char** list,
+ int count, XTextProperty* text_prop_return));
+/* 80 */
+EXTERN void XDrawSegments _ANSI_ARGS_((Display * display,
+ Drawable d, GC gc, XSegment * segments,
+ int nsegments));
+/* 81 */
+EXTERN void XForceScreenSaver _ANSI_ARGS_((Display* display,
+ int mode));
+/* 82 */
+EXTERN void XDrawLine _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int x1, int y1, int x2, int y2));
+/* 83 */
+EXTERN void XFillRectangle _ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, int x, int y,
+ unsigned int width, unsigned int height));
+/* 84 */
+EXTERN void XClearWindow _ANSI_ARGS_((Display* d, Window w));
+/* 85 */
+EXTERN void XDrawPoint _ANSI_ARGS_((Display* display, Drawable d,
+ GC gc, int x, int y));
+/* 86 */
+EXTERN void XDrawPoints _ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, XPoint * points,
+ int npoints, int mode));
+/* 87 */
+EXTERN void XWarpPointer _ANSI_ARGS_((Display* display,
+ Window src_w, Window dest_w, int src_x,
+ int src_y, unsigned int src_width,
+ unsigned int src_height, int dest_x,
+ int dest_y));
+/* 88 */
+EXTERN void XQueryColor _ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * def_in_out));
+/* 89 */
+EXTERN void XQueryColors _ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * defs_in_out,
+ int ncolors));
+/* 90 */
+EXTERN Status XQueryTree _ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, Window** w4,
+ unsigned int* ui));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 0 */
+EXTERN void XSetDashes _ANSI_ARGS_((Display* display, GC gc,
+ int dash_offset, _Xconst char* dash_list,
+ int n));
+/* 1 */
+EXTERN XModifierKeymap* XGetModifierMapping _ANSI_ARGS_((Display* d));
+/* 2 */
+EXTERN XImage * XCreateImage _ANSI_ARGS_((Display* d, Visual* v,
+ unsigned int ui1, int i1, int i2, char* cp,
+ unsigned int ui2, unsigned int ui3, int i3,
+ int i4));
+/* 3 */
+EXTERN XImage * XGetImage _ANSI_ARGS_((Display* d, Drawable dr,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, unsigned long ul, int i3));
+/* 4 */
+EXTERN char * XGetAtomName _ANSI_ARGS_((Display* d, Atom a));
+/* 5 */
+EXTERN char * XKeysymToString _ANSI_ARGS_((KeySym k));
+/* 6 */
+EXTERN Colormap XCreateColormap _ANSI_ARGS_((Display* d, Window w,
+ Visual* v, int i));
+/* 7 */
+EXTERN GContext XGContextFromGC _ANSI_ARGS_((GC g));
+/* 8 */
+EXTERN KeySym XKeycodeToKeysym _ANSI_ARGS_((Display* d, KeyCode k,
+ int i));
+/* 9 */
+EXTERN KeySym XStringToKeysym _ANSI_ARGS_((_Xconst char* c));
+/* 10 */
+EXTERN Window XRootWindow _ANSI_ARGS_((Display* d, int i));
+/* 11 */
+EXTERN XErrorHandler XSetErrorHandler _ANSI_ARGS_((XErrorHandler x));
+/* 12 */
+EXTERN Status XAllocColor _ANSI_ARGS_((Display* d, Colormap c,
+ XColor* xp));
+/* 13 */
+EXTERN void XBell _ANSI_ARGS_((Display* d, int i));
+/* 14 */
+EXTERN void XChangeProperty _ANSI_ARGS_((Display* d, Window w,
+ Atom a1, Atom a2, int i1, int i2,
+ _Xconst unsigned char* c, int i3));
+/* 15 */
+EXTERN void XChangeWindowAttributes _ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul,
+ XSetWindowAttributes* x));
+/* 16 */
+EXTERN void XConfigureWindow _ANSI_ARGS_((Display* d, Window w,
+ unsigned int i, XWindowChanges* x));
+/* 17 */
+EXTERN void XCopyArea _ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4));
+/* 18 */
+EXTERN void XCopyPlane _ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4, unsigned long ul));
+/* 19 */
+EXTERN Pixmap XCreateBitmapFromData _ANSI_ARGS_((Display* display,
+ Drawable d, _Xconst char* data,
+ unsigned int width, unsigned int height));
+/* 20 */
+EXTERN void XDefineCursor _ANSI_ARGS_((Display* d, Window w,
+ Cursor c));
+/* 21 */
+EXTERN void XDestroyWindow _ANSI_ARGS_((Display* d, Window w));
+/* 22 */
+EXTERN void XDrawArc _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4));
+/* 23 */
+EXTERN void XDrawLines _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2));
+/* 24 */
+EXTERN void XDrawRectangle _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, int i1, int i2, unsigned int ui1,
+ unsigned int ui2));
+/* 25 */
+EXTERN void XFillArc _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4));
+/* 26 */
+EXTERN void XFillPolygon _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2, int i3));
+/* 27 */
+EXTERN void XFillRectangles _ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XRectangle* x, int i));
+/* 28 */
+EXTERN void XFreeColormap _ANSI_ARGS_((Display* d, Colormap c));
+/* 29 */
+EXTERN void XFreeColors _ANSI_ARGS_((Display* d, Colormap c,
+ unsigned long* ulp, int i, unsigned long ul));
+/* 30 */
+EXTERN void XFreeModifiermap _ANSI_ARGS_((XModifierKeymap* x));
+/* 31 */
+EXTERN Status XGetGeometry _ANSI_ARGS_((Display* d, Drawable dr,
+ Window* w, int* i1, int* i2,
+ unsigned int* ui1, unsigned int* ui2,
+ unsigned int* ui3, unsigned int* ui4));
+/* 32 */
+EXTERN int XGetWindowProperty _ANSI_ARGS_((Display* d, Window w,
+ Atom a1, long l1, long l2, Bool b, Atom a2,
+ Atom* ap, int* ip, unsigned long* ulp1,
+ unsigned long* ulp2, unsigned char** cpp));
+/* 33 */
+EXTERN int XGrabKeyboard _ANSI_ARGS_((Display* d, Window w,
+ Bool b, int i1, int i2, Time t));
+/* 34 */
+EXTERN int XGrabPointer _ANSI_ARGS_((Display* d, Window w1,
+ Bool b, unsigned int ui, int i1, int i2,
+ Window w2, Cursor c, Time t));
+/* 35 */
+EXTERN KeyCode XKeysymToKeycode _ANSI_ARGS_((Display* d, KeySym k));
+/* 36 */
+EXTERN void XMapWindow _ANSI_ARGS_((Display* d, Window w));
+/* 37 */
+EXTERN void XMoveResizeWindow _ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2));
+/* 38 */
+EXTERN void XMoveWindow _ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2));
+/* 39 */
+EXTERN Bool XQueryPointer _ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, int* i1, int* i2,
+ int* i3, int* i4, unsigned int* ui));
+/* 40 */
+EXTERN void XRaiseWindow _ANSI_ARGS_((Display* d, Window w));
+/* 41 */
+EXTERN void XRefreshKeyboardMapping _ANSI_ARGS_((
+ XMappingEvent* x));
+/* 42 */
+EXTERN void XResizeWindow _ANSI_ARGS_((Display* d, Window w,
+ unsigned int ui1, unsigned int ui2));
+/* 43 */
+EXTERN void XSelectInput _ANSI_ARGS_((Display* d, Window w,
+ long l));
+/* 44 */
+EXTERN Status XSendEvent _ANSI_ARGS_((Display* d, Window w, Bool b,
+ long l, XEvent* x));
+/* 45 */
+EXTERN void XSetIconName _ANSI_ARGS_((Display* d, Window w,
+ _Xconst char* c));
+/* 46 */
+EXTERN void XSetInputFocus _ANSI_ARGS_((Display* d, Window w,
+ int i, Time t));
+/* 47 */
+EXTERN void XSetSelectionOwner _ANSI_ARGS_((Display* d, Atom a,
+ Window w, Time t));
+/* 48 */
+EXTERN void XSetWindowBackground _ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul));
+/* 49 */
+EXTERN void XSetWindowBackgroundPixmap _ANSI_ARGS_((Display* d,
+ Window w, Pixmap p));
+/* 50 */
+EXTERN void XSetWindowBorder _ANSI_ARGS_((Display* d, Window w,
+ unsigned long ul));
+/* 51 */
+EXTERN void XSetWindowBorderPixmap _ANSI_ARGS_((Display* d,
+ Window w, Pixmap p));
+/* 52 */
+EXTERN void XSetWindowBorderWidth _ANSI_ARGS_((Display* d,
+ Window w, unsigned int ui));
+/* 53 */
+EXTERN void XSetWindowColormap _ANSI_ARGS_((Display* d, Window w,
+ Colormap c));
+/* 54 */
+EXTERN void XUngrabKeyboard _ANSI_ARGS_((Display* d, Time t));
+/* 55 */
+EXTERN void XUngrabPointer _ANSI_ARGS_((Display* d, Time t));
+/* 56 */
+EXTERN void XUnmapWindow _ANSI_ARGS_((Display* d, Window w));
+/* 57 */
+EXTERN void TkPutImage _ANSI_ARGS_((unsigned long * colors,
+ int ncolors, Display* display, Drawable d,
+ GC gc, XImage* image, int src_x, int src_y,
+ int dest_x, int dest_y, unsigned int width,
+ unsigned int height));
+/* 58 */
+EXTERN Status XParseColor _ANSI_ARGS_((Display * display,
+ Colormap map, _Xconst char* spec,
+ XColor * colorPtr));
+/* 59 */
+EXTERN GC XCreateGC _ANSI_ARGS_((Display* display, Drawable d,
+ unsigned long valuemask, XGCValues* values));
+/* 60 */
+EXTERN void XFreeGC _ANSI_ARGS_((Display* display, GC gc));
+/* 61 */
+EXTERN Atom XInternAtom _ANSI_ARGS_((Display* display,
+ _Xconst char* atom_name, Bool only_if_exists));
+/* 62 */
+EXTERN void XSetBackground _ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground));
+/* 63 */
+EXTERN void XSetForeground _ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground));
+/* 64 */
+EXTERN void XSetClipMask _ANSI_ARGS_((Display* display, GC gc,
+ Pixmap pixmap));
+/* 65 */
+EXTERN void XSetClipOrigin _ANSI_ARGS_((Display* display, GC gc,
+ int clip_x_origin, int clip_y_origin));
+/* 66 */
+EXTERN void XSetTSOrigin _ANSI_ARGS_((Display* display, GC gc,
+ int ts_x_origin, int ts_y_origin));
+/* 67 */
+EXTERN void XChangeGC _ANSI_ARGS_((Display * d, GC gc,
+ unsigned long mask, XGCValues * values));
+/* 68 */
+EXTERN void XSetFont _ANSI_ARGS_((Display * display, GC gc,
+ Font font));
+/* 69 */
+EXTERN void XSetArcMode _ANSI_ARGS_((Display * display, GC gc,
+ int arc_mode));
+/* 70 */
+EXTERN void XSetStipple _ANSI_ARGS_((Display * display, GC gc,
+ Pixmap stipple));
+/* 71 */
+EXTERN void XSetFillRule _ANSI_ARGS_((Display * display, GC gc,
+ int fill_rule));
+/* 72 */
+EXTERN void XSetFillStyle _ANSI_ARGS_((Display * display, GC gc,
+ int fill_style));
+/* 73 */
+EXTERN void XSetFunction _ANSI_ARGS_((Display * display, GC gc,
+ int function));
+/* 74 */
+EXTERN void XSetLineAttributes _ANSI_ARGS_((Display * display,
+ GC gc, unsigned int line_width,
+ int line_style, int cap_style,
+ int join_style));
+/* 75 */
+EXTERN int _XInitImageFuncPtrs _ANSI_ARGS_((XImage * image));
+/* 76 */
+EXTERN XIC XCreateIC _ANSI_ARGS_((void));
+/* 77 */
+EXTERN XVisualInfo * XGetVisualInfo _ANSI_ARGS_((Display* display,
+ long vinfo_mask, XVisualInfo* vinfo_template,
+ int* nitems_return));
+/* 78 */
+EXTERN void XSetWMClientMachine _ANSI_ARGS_((Display* display,
+ Window w, XTextProperty* text_prop));
+/* 79 */
+EXTERN Status XStringListToTextProperty _ANSI_ARGS_((char** list,
+ int count, XTextProperty* text_prop_return));
+/* 80 */
+EXTERN void XDrawSegments _ANSI_ARGS_((Display * display,
+ Drawable d, GC gc, XSegment * segments,
+ int nsegments));
+/* 81 */
+EXTERN void XForceScreenSaver _ANSI_ARGS_((Display* display,
+ int mode));
+/* 82 */
+EXTERN void XDrawLine _ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int x1, int y1, int x2, int y2));
+/* 83 */
+EXTERN void XFillRectangle _ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, int x, int y,
+ unsigned int width, unsigned int height));
+/* 84 */
+EXTERN void XClearWindow _ANSI_ARGS_((Display* d, Window w));
+/* 85 */
+EXTERN void XDrawPoint _ANSI_ARGS_((Display* display, Drawable d,
+ GC gc, int x, int y));
+/* 86 */
+EXTERN void XDrawPoints _ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, XPoint * points,
+ int npoints, int mode));
+/* 87 */
+EXTERN void XWarpPointer _ANSI_ARGS_((Display* display,
+ Window src_w, Window dest_w, int src_x,
+ int src_y, unsigned int src_width,
+ unsigned int src_height, int dest_x,
+ int dest_y));
+/* 88 */
+EXTERN void XQueryColor _ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * def_in_out));
+/* 89 */
+EXTERN void XQueryColors _ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * defs_in_out,
+ int ncolors));
+/* 90 */
+EXTERN Status XQueryTree _ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, Window** w4,
+ unsigned int* ui));
+#endif /* MAC_OSX_TK */
+
+typedef struct TkIntXlibStubs {
+ int magic;
+ struct TkIntXlibStubHooks *hooks;
+
+#ifdef __WIN32__
+ void (*xSetDashes) _ANSI_ARGS_((Display* display, GC gc, int dash_offset, _Xconst char* dash_list, int n)); /* 0 */
+ XModifierKeymap* (*xGetModifierMapping) _ANSI_ARGS_((Display* d)); /* 1 */
+ XImage * (*xCreateImage) _ANSI_ARGS_((Display* d, Visual* v, unsigned int ui1, int i1, int i2, char* cp, unsigned int ui2, unsigned int ui3, int i3, int i4)); /* 2 */
+ XImage * (*xGetImage) _ANSI_ARGS_((Display* d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3)); /* 3 */
+ char * (*xGetAtomName) _ANSI_ARGS_((Display* d, Atom a)); /* 4 */
+ char * (*xKeysymToString) _ANSI_ARGS_((KeySym k)); /* 5 */
+ Colormap (*xCreateColormap) _ANSI_ARGS_((Display* d, Window w, Visual* v, int i)); /* 6 */
+ Cursor (*xCreatePixmapCursor) _ANSI_ARGS_((Display* d, Pixmap p1, Pixmap p2, XColor* x1, XColor* x2, unsigned int ui1, unsigned int ui2)); /* 7 */
+ Cursor (*xCreateGlyphCursor) _ANSI_ARGS_((Display* d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor* x1, XColor* x2)); /* 8 */
+ GContext (*xGContextFromGC) _ANSI_ARGS_((GC g)); /* 9 */
+ XHostAddress * (*xListHosts) _ANSI_ARGS_((Display* d, int* i, Bool* b)); /* 10 */
+ KeySym (*xKeycodeToKeysym) _ANSI_ARGS_((Display* d, unsigned int k, int i)); /* 11 */
+ KeySym (*xStringToKeysym) _ANSI_ARGS_((_Xconst char* c)); /* 12 */
+ Window (*xRootWindow) _ANSI_ARGS_((Display* d, int i)); /* 13 */
+ XErrorHandler (*xSetErrorHandler) _ANSI_ARGS_((XErrorHandler x)); /* 14 */
+ Status (*xIconifyWindow) _ANSI_ARGS_((Display* d, Window w, int i)); /* 15 */
+ Status (*xWithdrawWindow) _ANSI_ARGS_((Display* d, Window w, int i)); /* 16 */
+ Status (*xGetWMColormapWindows) _ANSI_ARGS_((Display* d, Window w, Window** wpp, int* ip)); /* 17 */
+ Status (*xAllocColor) _ANSI_ARGS_((Display* d, Colormap c, XColor* xp)); /* 18 */
+ void (*xBell) _ANSI_ARGS_((Display* d, int i)); /* 19 */
+ void (*xChangeProperty) _ANSI_ARGS_((Display* d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char* c, int i3)); /* 20 */
+ void (*xChangeWindowAttributes) _ANSI_ARGS_((Display* d, Window w, unsigned long ul, XSetWindowAttributes* x)); /* 21 */
+ void (*xClearWindow) _ANSI_ARGS_((Display* d, Window w)); /* 22 */
+ void (*xConfigureWindow) _ANSI_ARGS_((Display* d, Window w, unsigned int i, XWindowChanges* x)); /* 23 */
+ void (*xCopyArea) _ANSI_ARGS_((Display* d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 24 */
+ void (*xCopyPlane) _ANSI_ARGS_((Display* d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul)); /* 25 */
+ Pixmap (*xCreateBitmapFromData) _ANSI_ARGS_((Display* display, Drawable d, _Xconst char* data, unsigned int width, unsigned int height)); /* 26 */
+ void (*xDefineCursor) _ANSI_ARGS_((Display* d, Window w, Cursor c)); /* 27 */
+ void (*xDeleteProperty) _ANSI_ARGS_((Display* d, Window w, Atom a)); /* 28 */
+ void (*xDestroyWindow) _ANSI_ARGS_((Display* d, Window w)); /* 29 */
+ void (*xDrawArc) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 30 */
+ void (*xDrawLines) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XPoint* x, int i1, int i2)); /* 31 */
+ void (*xDrawRectangle) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2)); /* 32 */
+ void (*xFillArc) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 33 */
+ void (*xFillPolygon) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XPoint* x, int i1, int i2, int i3)); /* 34 */
+ void (*xFillRectangles) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XRectangle* x, int i)); /* 35 */
+ void (*xForceScreenSaver) _ANSI_ARGS_((Display* d, int i)); /* 36 */
+ void (*xFreeColormap) _ANSI_ARGS_((Display* d, Colormap c)); /* 37 */
+ void (*xFreeColors) _ANSI_ARGS_((Display* d, Colormap c, unsigned long* ulp, int i, unsigned long ul)); /* 38 */
+ void (*xFreeCursor) _ANSI_ARGS_((Display* d, Cursor c)); /* 39 */
+ void (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap* x)); /* 40 */
+ Status (*xGetGeometry) _ANSI_ARGS_((Display* d, Drawable dr, Window* w, int* i1, int* i2, unsigned int* ui1, unsigned int* ui2, unsigned int* ui3, unsigned int* ui4)); /* 41 */
+ void (*xGetInputFocus) _ANSI_ARGS_((Display* d, Window* w, int* i)); /* 42 */
+ int (*xGetWindowProperty) _ANSI_ARGS_((Display* d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom* ap, int* ip, unsigned long* ulp1, unsigned long* ulp2, unsigned char** cpp)); /* 43 */
+ Status (*xGetWindowAttributes) _ANSI_ARGS_((Display* d, Window w, XWindowAttributes* x)); /* 44 */
+ int (*xGrabKeyboard) _ANSI_ARGS_((Display* d, Window w, Bool b, int i1, int i2, Time t)); /* 45 */
+ int (*xGrabPointer) _ANSI_ARGS_((Display* d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t)); /* 46 */
+ KeyCode (*xKeysymToKeycode) _ANSI_ARGS_((Display* d, KeySym k)); /* 47 */
+ Status (*xLookupColor) _ANSI_ARGS_((Display* d, Colormap c1, _Xconst char* c2, XColor* x1, XColor* x2)); /* 48 */
+ void (*xMapWindow) _ANSI_ARGS_((Display* d, Window w)); /* 49 */
+ void (*xMoveResizeWindow) _ANSI_ARGS_((Display* d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2)); /* 50 */
+ void (*xMoveWindow) _ANSI_ARGS_((Display* d, Window w, int i1, int i2)); /* 51 */
+ void (*xNextEvent) _ANSI_ARGS_((Display* d, XEvent* x)); /* 52 */
+ void (*xPutBackEvent) _ANSI_ARGS_((Display* d, XEvent* x)); /* 53 */
+ void (*xQueryColors) _ANSI_ARGS_((Display* d, Colormap c, XColor* x, int i)); /* 54 */
+ Bool (*xQueryPointer) _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, int* i1, int* i2, int* i3, int* i4, unsigned int* ui)); /* 55 */
+ Status (*xQueryTree) _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, Window** w4, unsigned int* ui)); /* 56 */
+ void (*xRaiseWindow) _ANSI_ARGS_((Display* d, Window w)); /* 57 */
+ void (*xRefreshKeyboardMapping) _ANSI_ARGS_((XMappingEvent* x)); /* 58 */
+ void (*xResizeWindow) _ANSI_ARGS_((Display* d, Window w, unsigned int ui1, unsigned int ui2)); /* 59 */
+ void (*xSelectInput) _ANSI_ARGS_((Display* d, Window w, long l)); /* 60 */
+ Status (*xSendEvent) _ANSI_ARGS_((Display* d, Window w, Bool b, long l, XEvent* x)); /* 61 */
+ void (*xSetCommand) _ANSI_ARGS_((Display* d, Window w, CONST char** c, int i)); /* 62 */
+ void (*xSetIconName) _ANSI_ARGS_((Display* d, Window w, _Xconst char* c)); /* 63 */
+ void (*xSetInputFocus) _ANSI_ARGS_((Display* d, Window w, int i, Time t)); /* 64 */
+ void (*xSetSelectionOwner) _ANSI_ARGS_((Display* d, Atom a, Window w, Time t)); /* 65 */
+ void (*xSetWindowBackground) _ANSI_ARGS_((Display* d, Window w, unsigned long ul)); /* 66 */
+ void (*xSetWindowBackgroundPixmap) _ANSI_ARGS_((Display* d, Window w, Pixmap p)); /* 67 */
+ void (*xSetWindowBorder) _ANSI_ARGS_((Display* d, Window w, unsigned long ul)); /* 68 */
+ void (*xSetWindowBorderPixmap) _ANSI_ARGS_((Display* d, Window w, Pixmap p)); /* 69 */
+ void (*xSetWindowBorderWidth) _ANSI_ARGS_((Display* d, Window w, unsigned int ui)); /* 70 */
+ void (*xSetWindowColormap) _ANSI_ARGS_((Display* d, Window w, Colormap c)); /* 71 */
+ Bool (*xTranslateCoordinates) _ANSI_ARGS_((Display* d, Window w1, Window w2, int i1, int i2, int* i3, int* i4, Window* w3)); /* 72 */
+ void (*xUngrabKeyboard) _ANSI_ARGS_((Display* d, Time t)); /* 73 */
+ void (*xUngrabPointer) _ANSI_ARGS_((Display* d, Time t)); /* 74 */
+ void (*xUnmapWindow) _ANSI_ARGS_((Display* d, Window w)); /* 75 */
+ void (*xWindowEvent) _ANSI_ARGS_((Display* d, Window w, long l, XEvent* x)); /* 76 */
+ void (*xDestroyIC) _ANSI_ARGS_((XIC x)); /* 77 */
+ Bool (*xFilterEvent) _ANSI_ARGS_((XEvent* x, Window w)); /* 78 */
+ int (*xmbLookupString) _ANSI_ARGS_((XIC xi, XKeyPressedEvent* xk, char* c, int i, KeySym* k, Status* s)); /* 79 */
+ void (*tkPutImage) _ANSI_ARGS_((unsigned long * colors, int ncolors, Display* display, Drawable d, GC gc, XImage* image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 80 */
+ void *reserved81;
+ Status (*xParseColor) _ANSI_ARGS_((Display * display, Colormap map, _Xconst char* spec, XColor * colorPtr)); /* 82 */
+ GC (*xCreateGC) _ANSI_ARGS_((Display* display, Drawable d, unsigned long valuemask, XGCValues* values)); /* 83 */
+ void (*xFreeGC) _ANSI_ARGS_((Display* display, GC gc)); /* 84 */
+ Atom (*xInternAtom) _ANSI_ARGS_((Display* display, _Xconst char* atom_name, Bool only_if_exists)); /* 85 */
+ void (*xSetBackground) _ANSI_ARGS_((Display* display, GC gc, unsigned long foreground)); /* 86 */
+ void (*xSetForeground) _ANSI_ARGS_((Display* display, GC gc, unsigned long foreground)); /* 87 */
+ void (*xSetClipMask) _ANSI_ARGS_((Display* display, GC gc, Pixmap pixmap)); /* 88 */
+ void (*xSetClipOrigin) _ANSI_ARGS_((Display* display, GC gc, int clip_x_origin, int clip_y_origin)); /* 89 */
+ void (*xSetTSOrigin) _ANSI_ARGS_((Display* display, GC gc, int ts_x_origin, int ts_y_origin)); /* 90 */
+ void (*xChangeGC) _ANSI_ARGS_((Display * d, GC gc, unsigned long mask, XGCValues * values)); /* 91 */
+ void (*xSetFont) _ANSI_ARGS_((Display * display, GC gc, Font font)); /* 92 */
+ void (*xSetArcMode) _ANSI_ARGS_((Display * display, GC gc, int arc_mode)); /* 93 */
+ void (*xSetStipple) _ANSI_ARGS_((Display * display, GC gc, Pixmap stipple)); /* 94 */
+ void (*xSetFillRule) _ANSI_ARGS_((Display * display, GC gc, int fill_rule)); /* 95 */
+ void (*xSetFillStyle) _ANSI_ARGS_((Display * display, GC gc, int fill_style)); /* 96 */
+ void (*xSetFunction) _ANSI_ARGS_((Display * display, GC gc, int function)); /* 97 */
+ void (*xSetLineAttributes) _ANSI_ARGS_((Display * display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style)); /* 98 */
+ int (*_XInitImageFuncPtrs) _ANSI_ARGS_((XImage * image)); /* 99 */
+ XIC (*xCreateIC) _ANSI_ARGS_((void)); /* 100 */
+ XVisualInfo * (*xGetVisualInfo) _ANSI_ARGS_((Display* display, long vinfo_mask, XVisualInfo* vinfo_template, int* nitems_return)); /* 101 */
+ void (*xSetWMClientMachine) _ANSI_ARGS_((Display* display, Window w, XTextProperty* text_prop)); /* 102 */
+ Status (*xStringListToTextProperty) _ANSI_ARGS_((char** list, int count, XTextProperty* text_prop_return)); /* 103 */
+ void (*xDrawLine) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 104 */
+ void (*xWarpPointer) _ANSI_ARGS_((Display* d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy)); /* 105 */
+ void (*xFillRectangle) _ANSI_ARGS_((Display* display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); /* 106 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*xSetDashes) _ANSI_ARGS_((Display* display, GC gc, int dash_offset, _Xconst char* dash_list, int n)); /* 0 */
+ XModifierKeymap* (*xGetModifierMapping) _ANSI_ARGS_((Display* d)); /* 1 */
+ XImage * (*xCreateImage) _ANSI_ARGS_((Display* d, Visual* v, unsigned int ui1, int i1, int i2, char* cp, unsigned int ui2, unsigned int ui3, int i3, int i4)); /* 2 */
+ XImage * (*xGetImage) _ANSI_ARGS_((Display* d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3)); /* 3 */
+ char * (*xGetAtomName) _ANSI_ARGS_((Display* d, Atom a)); /* 4 */
+ char * (*xKeysymToString) _ANSI_ARGS_((KeySym k)); /* 5 */
+ Colormap (*xCreateColormap) _ANSI_ARGS_((Display* d, Window w, Visual* v, int i)); /* 6 */
+ GContext (*xGContextFromGC) _ANSI_ARGS_((GC g)); /* 7 */
+ KeySym (*xKeycodeToKeysym) _ANSI_ARGS_((Display* d, KeyCode k, int i)); /* 8 */
+ KeySym (*xStringToKeysym) _ANSI_ARGS_((_Xconst char* c)); /* 9 */
+ Window (*xRootWindow) _ANSI_ARGS_((Display* d, int i)); /* 10 */
+ XErrorHandler (*xSetErrorHandler) _ANSI_ARGS_((XErrorHandler x)); /* 11 */
+ Status (*xAllocColor) _ANSI_ARGS_((Display* d, Colormap c, XColor* xp)); /* 12 */
+ void (*xBell) _ANSI_ARGS_((Display* d, int i)); /* 13 */
+ void (*xChangeProperty) _ANSI_ARGS_((Display* d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char* c, int i3)); /* 14 */
+ void (*xChangeWindowAttributes) _ANSI_ARGS_((Display* d, Window w, unsigned long ul, XSetWindowAttributes* x)); /* 15 */
+ void (*xConfigureWindow) _ANSI_ARGS_((Display* d, Window w, unsigned int i, XWindowChanges* x)); /* 16 */
+ void (*xCopyArea) _ANSI_ARGS_((Display* d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 17 */
+ void (*xCopyPlane) _ANSI_ARGS_((Display* d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul)); /* 18 */
+ Pixmap (*xCreateBitmapFromData) _ANSI_ARGS_((Display* display, Drawable d, _Xconst char* data, unsigned int width, unsigned int height)); /* 19 */
+ void (*xDefineCursor) _ANSI_ARGS_((Display* d, Window w, Cursor c)); /* 20 */
+ void (*xDestroyWindow) _ANSI_ARGS_((Display* d, Window w)); /* 21 */
+ void (*xDrawArc) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 22 */
+ void (*xDrawLines) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XPoint* x, int i1, int i2)); /* 23 */
+ void (*xDrawRectangle) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2)); /* 24 */
+ void (*xFillArc) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 25 */
+ void (*xFillPolygon) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XPoint* x, int i1, int i2, int i3)); /* 26 */
+ void (*xFillRectangles) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XRectangle* x, int i)); /* 27 */
+ void (*xFreeColormap) _ANSI_ARGS_((Display* d, Colormap c)); /* 28 */
+ void (*xFreeColors) _ANSI_ARGS_((Display* d, Colormap c, unsigned long* ulp, int i, unsigned long ul)); /* 29 */
+ void (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap* x)); /* 30 */
+ Status (*xGetGeometry) _ANSI_ARGS_((Display* d, Drawable dr, Window* w, int* i1, int* i2, unsigned int* ui1, unsigned int* ui2, unsigned int* ui3, unsigned int* ui4)); /* 31 */
+ int (*xGetWindowProperty) _ANSI_ARGS_((Display* d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom* ap, int* ip, unsigned long* ulp1, unsigned long* ulp2, unsigned char** cpp)); /* 32 */
+ int (*xGrabKeyboard) _ANSI_ARGS_((Display* d, Window w, Bool b, int i1, int i2, Time t)); /* 33 */
+ int (*xGrabPointer) _ANSI_ARGS_((Display* d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t)); /* 34 */
+ KeyCode (*xKeysymToKeycode) _ANSI_ARGS_((Display* d, KeySym k)); /* 35 */
+ void (*xMapWindow) _ANSI_ARGS_((Display* d, Window w)); /* 36 */
+ void (*xMoveResizeWindow) _ANSI_ARGS_((Display* d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2)); /* 37 */
+ void (*xMoveWindow) _ANSI_ARGS_((Display* d, Window w, int i1, int i2)); /* 38 */
+ Bool (*xQueryPointer) _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, int* i1, int* i2, int* i3, int* i4, unsigned int* ui)); /* 39 */
+ void (*xRaiseWindow) _ANSI_ARGS_((Display* d, Window w)); /* 40 */
+ void (*xRefreshKeyboardMapping) _ANSI_ARGS_((XMappingEvent* x)); /* 41 */
+ void (*xResizeWindow) _ANSI_ARGS_((Display* d, Window w, unsigned int ui1, unsigned int ui2)); /* 42 */
+ void (*xSelectInput) _ANSI_ARGS_((Display* d, Window w, long l)); /* 43 */
+ Status (*xSendEvent) _ANSI_ARGS_((Display* d, Window w, Bool b, long l, XEvent* x)); /* 44 */
+ void (*xSetIconName) _ANSI_ARGS_((Display* d, Window w, _Xconst char* c)); /* 45 */
+ void (*xSetInputFocus) _ANSI_ARGS_((Display* d, Window w, int i, Time t)); /* 46 */
+ void (*xSetSelectionOwner) _ANSI_ARGS_((Display* d, Atom a, Window w, Time t)); /* 47 */
+ void (*xSetWindowBackground) _ANSI_ARGS_((Display* d, Window w, unsigned long ul)); /* 48 */
+ void (*xSetWindowBackgroundPixmap) _ANSI_ARGS_((Display* d, Window w, Pixmap p)); /* 49 */
+ void (*xSetWindowBorder) _ANSI_ARGS_((Display* d, Window w, unsigned long ul)); /* 50 */
+ void (*xSetWindowBorderPixmap) _ANSI_ARGS_((Display* d, Window w, Pixmap p)); /* 51 */
+ void (*xSetWindowBorderWidth) _ANSI_ARGS_((Display* d, Window w, unsigned int ui)); /* 52 */
+ void (*xSetWindowColormap) _ANSI_ARGS_((Display* d, Window w, Colormap c)); /* 53 */
+ void (*xUngrabKeyboard) _ANSI_ARGS_((Display* d, Time t)); /* 54 */
+ void (*xUngrabPointer) _ANSI_ARGS_((Display* d, Time t)); /* 55 */
+ void (*xUnmapWindow) _ANSI_ARGS_((Display* d, Window w)); /* 56 */
+ void (*tkPutImage) _ANSI_ARGS_((unsigned long * colors, int ncolors, Display* display, Drawable d, GC gc, XImage* image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 57 */
+ Status (*xParseColor) _ANSI_ARGS_((Display * display, Colormap map, _Xconst char* spec, XColor * colorPtr)); /* 58 */
+ GC (*xCreateGC) _ANSI_ARGS_((Display* display, Drawable d, unsigned long valuemask, XGCValues* values)); /* 59 */
+ void (*xFreeGC) _ANSI_ARGS_((Display* display, GC gc)); /* 60 */
+ Atom (*xInternAtom) _ANSI_ARGS_((Display* display, _Xconst char* atom_name, Bool only_if_exists)); /* 61 */
+ void (*xSetBackground) _ANSI_ARGS_((Display* display, GC gc, unsigned long foreground)); /* 62 */
+ void (*xSetForeground) _ANSI_ARGS_((Display* display, GC gc, unsigned long foreground)); /* 63 */
+ void (*xSetClipMask) _ANSI_ARGS_((Display* display, GC gc, Pixmap pixmap)); /* 64 */
+ void (*xSetClipOrigin) _ANSI_ARGS_((Display* display, GC gc, int clip_x_origin, int clip_y_origin)); /* 65 */
+ void (*xSetTSOrigin) _ANSI_ARGS_((Display* display, GC gc, int ts_x_origin, int ts_y_origin)); /* 66 */
+ void (*xChangeGC) _ANSI_ARGS_((Display * d, GC gc, unsigned long mask, XGCValues * values)); /* 67 */
+ void (*xSetFont) _ANSI_ARGS_((Display * display, GC gc, Font font)); /* 68 */
+ void (*xSetArcMode) _ANSI_ARGS_((Display * display, GC gc, int arc_mode)); /* 69 */
+ void (*xSetStipple) _ANSI_ARGS_((Display * display, GC gc, Pixmap stipple)); /* 70 */
+ void (*xSetFillRule) _ANSI_ARGS_((Display * display, GC gc, int fill_rule)); /* 71 */
+ void (*xSetFillStyle) _ANSI_ARGS_((Display * display, GC gc, int fill_style)); /* 72 */
+ void (*xSetFunction) _ANSI_ARGS_((Display * display, GC gc, int function)); /* 73 */
+ void (*xSetLineAttributes) _ANSI_ARGS_((Display * display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style)); /* 74 */
+ int (*_XInitImageFuncPtrs) _ANSI_ARGS_((XImage * image)); /* 75 */
+ XIC (*xCreateIC) _ANSI_ARGS_((void)); /* 76 */
+ XVisualInfo * (*xGetVisualInfo) _ANSI_ARGS_((Display* display, long vinfo_mask, XVisualInfo* vinfo_template, int* nitems_return)); /* 77 */
+ void (*xSetWMClientMachine) _ANSI_ARGS_((Display* display, Window w, XTextProperty* text_prop)); /* 78 */
+ Status (*xStringListToTextProperty) _ANSI_ARGS_((char** list, int count, XTextProperty* text_prop_return)); /* 79 */
+ void (*xDrawSegments) _ANSI_ARGS_((Display * display, Drawable d, GC gc, XSegment * segments, int nsegments)); /* 80 */
+ void (*xForceScreenSaver) _ANSI_ARGS_((Display* display, int mode)); /* 81 */
+ void (*xDrawLine) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 82 */
+ void (*xFillRectangle) _ANSI_ARGS_((Display* display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); /* 83 */
+ void (*xClearWindow) _ANSI_ARGS_((Display* d, Window w)); /* 84 */
+ void (*xDrawPoint) _ANSI_ARGS_((Display* display, Drawable d, GC gc, int x, int y)); /* 85 */
+ void (*xDrawPoints) _ANSI_ARGS_((Display* display, Drawable d, GC gc, XPoint * points, int npoints, int mode)); /* 86 */
+ void (*xWarpPointer) _ANSI_ARGS_((Display* display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y)); /* 87 */
+ void (*xQueryColor) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * def_in_out)); /* 88 */
+ void (*xQueryColors) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * defs_in_out, int ncolors)); /* 89 */
+ Status (*xQueryTree) _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, Window** w4, unsigned int* ui)); /* 90 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*xSetDashes) _ANSI_ARGS_((Display* display, GC gc, int dash_offset, _Xconst char* dash_list, int n)); /* 0 */
+ XModifierKeymap* (*xGetModifierMapping) _ANSI_ARGS_((Display* d)); /* 1 */
+ XImage * (*xCreateImage) _ANSI_ARGS_((Display* d, Visual* v, unsigned int ui1, int i1, int i2, char* cp, unsigned int ui2, unsigned int ui3, int i3, int i4)); /* 2 */
+ XImage * (*xGetImage) _ANSI_ARGS_((Display* d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3)); /* 3 */
+ char * (*xGetAtomName) _ANSI_ARGS_((Display* d, Atom a)); /* 4 */
+ char * (*xKeysymToString) _ANSI_ARGS_((KeySym k)); /* 5 */
+ Colormap (*xCreateColormap) _ANSI_ARGS_((Display* d, Window w, Visual* v, int i)); /* 6 */
+ GContext (*xGContextFromGC) _ANSI_ARGS_((GC g)); /* 7 */
+ KeySym (*xKeycodeToKeysym) _ANSI_ARGS_((Display* d, KeyCode k, int i)); /* 8 */
+ KeySym (*xStringToKeysym) _ANSI_ARGS_((_Xconst char* c)); /* 9 */
+ Window (*xRootWindow) _ANSI_ARGS_((Display* d, int i)); /* 10 */
+ XErrorHandler (*xSetErrorHandler) _ANSI_ARGS_((XErrorHandler x)); /* 11 */
+ Status (*xAllocColor) _ANSI_ARGS_((Display* d, Colormap c, XColor* xp)); /* 12 */
+ void (*xBell) _ANSI_ARGS_((Display* d, int i)); /* 13 */
+ void (*xChangeProperty) _ANSI_ARGS_((Display* d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char* c, int i3)); /* 14 */
+ void (*xChangeWindowAttributes) _ANSI_ARGS_((Display* d, Window w, unsigned long ul, XSetWindowAttributes* x)); /* 15 */
+ void (*xConfigureWindow) _ANSI_ARGS_((Display* d, Window w, unsigned int i, XWindowChanges* x)); /* 16 */
+ void (*xCopyArea) _ANSI_ARGS_((Display* d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 17 */
+ void (*xCopyPlane) _ANSI_ARGS_((Display* d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul)); /* 18 */
+ Pixmap (*xCreateBitmapFromData) _ANSI_ARGS_((Display* display, Drawable d, _Xconst char* data, unsigned int width, unsigned int height)); /* 19 */
+ void (*xDefineCursor) _ANSI_ARGS_((Display* d, Window w, Cursor c)); /* 20 */
+ void (*xDestroyWindow) _ANSI_ARGS_((Display* d, Window w)); /* 21 */
+ void (*xDrawArc) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 22 */
+ void (*xDrawLines) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XPoint* x, int i1, int i2)); /* 23 */
+ void (*xDrawRectangle) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2)); /* 24 */
+ void (*xFillArc) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 25 */
+ void (*xFillPolygon) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XPoint* x, int i1, int i2, int i3)); /* 26 */
+ void (*xFillRectangles) _ANSI_ARGS_((Display* d, Drawable dr, GC g, XRectangle* x, int i)); /* 27 */
+ void (*xFreeColormap) _ANSI_ARGS_((Display* d, Colormap c)); /* 28 */
+ void (*xFreeColors) _ANSI_ARGS_((Display* d, Colormap c, unsigned long* ulp, int i, unsigned long ul)); /* 29 */
+ void (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap* x)); /* 30 */
+ Status (*xGetGeometry) _ANSI_ARGS_((Display* d, Drawable dr, Window* w, int* i1, int* i2, unsigned int* ui1, unsigned int* ui2, unsigned int* ui3, unsigned int* ui4)); /* 31 */
+ int (*xGetWindowProperty) _ANSI_ARGS_((Display* d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom* ap, int* ip, unsigned long* ulp1, unsigned long* ulp2, unsigned char** cpp)); /* 32 */
+ int (*xGrabKeyboard) _ANSI_ARGS_((Display* d, Window w, Bool b, int i1, int i2, Time t)); /* 33 */
+ int (*xGrabPointer) _ANSI_ARGS_((Display* d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t)); /* 34 */
+ KeyCode (*xKeysymToKeycode) _ANSI_ARGS_((Display* d, KeySym k)); /* 35 */
+ void (*xMapWindow) _ANSI_ARGS_((Display* d, Window w)); /* 36 */
+ void (*xMoveResizeWindow) _ANSI_ARGS_((Display* d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2)); /* 37 */
+ void (*xMoveWindow) _ANSI_ARGS_((Display* d, Window w, int i1, int i2)); /* 38 */
+ Bool (*xQueryPointer) _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, int* i1, int* i2, int* i3, int* i4, unsigned int* ui)); /* 39 */
+ void (*xRaiseWindow) _ANSI_ARGS_((Display* d, Window w)); /* 40 */
+ void (*xRefreshKeyboardMapping) _ANSI_ARGS_((XMappingEvent* x)); /* 41 */
+ void (*xResizeWindow) _ANSI_ARGS_((Display* d, Window w, unsigned int ui1, unsigned int ui2)); /* 42 */
+ void (*xSelectInput) _ANSI_ARGS_((Display* d, Window w, long l)); /* 43 */
+ Status (*xSendEvent) _ANSI_ARGS_((Display* d, Window w, Bool b, long l, XEvent* x)); /* 44 */
+ void (*xSetIconName) _ANSI_ARGS_((Display* d, Window w, _Xconst char* c)); /* 45 */
+ void (*xSetInputFocus) _ANSI_ARGS_((Display* d, Window w, int i, Time t)); /* 46 */
+ void (*xSetSelectionOwner) _ANSI_ARGS_((Display* d, Atom a, Window w, Time t)); /* 47 */
+ void (*xSetWindowBackground) _ANSI_ARGS_((Display* d, Window w, unsigned long ul)); /* 48 */
+ void (*xSetWindowBackgroundPixmap) _ANSI_ARGS_((Display* d, Window w, Pixmap p)); /* 49 */
+ void (*xSetWindowBorder) _ANSI_ARGS_((Display* d, Window w, unsigned long ul)); /* 50 */
+ void (*xSetWindowBorderPixmap) _ANSI_ARGS_((Display* d, Window w, Pixmap p)); /* 51 */
+ void (*xSetWindowBorderWidth) _ANSI_ARGS_((Display* d, Window w, unsigned int ui)); /* 52 */
+ void (*xSetWindowColormap) _ANSI_ARGS_((Display* d, Window w, Colormap c)); /* 53 */
+ void (*xUngrabKeyboard) _ANSI_ARGS_((Display* d, Time t)); /* 54 */
+ void (*xUngrabPointer) _ANSI_ARGS_((Display* d, Time t)); /* 55 */
+ void (*xUnmapWindow) _ANSI_ARGS_((Display* d, Window w)); /* 56 */
+ void (*tkPutImage) _ANSI_ARGS_((unsigned long * colors, int ncolors, Display* display, Drawable d, GC gc, XImage* image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 57 */
+ Status (*xParseColor) _ANSI_ARGS_((Display * display, Colormap map, _Xconst char* spec, XColor * colorPtr)); /* 58 */
+ GC (*xCreateGC) _ANSI_ARGS_((Display* display, Drawable d, unsigned long valuemask, XGCValues* values)); /* 59 */
+ void (*xFreeGC) _ANSI_ARGS_((Display* display, GC gc)); /* 60 */
+ Atom (*xInternAtom) _ANSI_ARGS_((Display* display, _Xconst char* atom_name, Bool only_if_exists)); /* 61 */
+ void (*xSetBackground) _ANSI_ARGS_((Display* display, GC gc, unsigned long foreground)); /* 62 */
+ void (*xSetForeground) _ANSI_ARGS_((Display* display, GC gc, unsigned long foreground)); /* 63 */
+ void (*xSetClipMask) _ANSI_ARGS_((Display* display, GC gc, Pixmap pixmap)); /* 64 */
+ void (*xSetClipOrigin) _ANSI_ARGS_((Display* display, GC gc, int clip_x_origin, int clip_y_origin)); /* 65 */
+ void (*xSetTSOrigin) _ANSI_ARGS_((Display* display, GC gc, int ts_x_origin, int ts_y_origin)); /* 66 */
+ void (*xChangeGC) _ANSI_ARGS_((Display * d, GC gc, unsigned long mask, XGCValues * values)); /* 67 */
+ void (*xSetFont) _ANSI_ARGS_((Display * display, GC gc, Font font)); /* 68 */
+ void (*xSetArcMode) _ANSI_ARGS_((Display * display, GC gc, int arc_mode)); /* 69 */
+ void (*xSetStipple) _ANSI_ARGS_((Display * display, GC gc, Pixmap stipple)); /* 70 */
+ void (*xSetFillRule) _ANSI_ARGS_((Display * display, GC gc, int fill_rule)); /* 71 */
+ void (*xSetFillStyle) _ANSI_ARGS_((Display * display, GC gc, int fill_style)); /* 72 */
+ void (*xSetFunction) _ANSI_ARGS_((Display * display, GC gc, int function)); /* 73 */
+ void (*xSetLineAttributes) _ANSI_ARGS_((Display * display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style)); /* 74 */
+ int (*_XInitImageFuncPtrs) _ANSI_ARGS_((XImage * image)); /* 75 */
+ XIC (*xCreateIC) _ANSI_ARGS_((void)); /* 76 */
+ XVisualInfo * (*xGetVisualInfo) _ANSI_ARGS_((Display* display, long vinfo_mask, XVisualInfo* vinfo_template, int* nitems_return)); /* 77 */
+ void (*xSetWMClientMachine) _ANSI_ARGS_((Display* display, Window w, XTextProperty* text_prop)); /* 78 */
+ Status (*xStringListToTextProperty) _ANSI_ARGS_((char** list, int count, XTextProperty* text_prop_return)); /* 79 */
+ void (*xDrawSegments) _ANSI_ARGS_((Display * display, Drawable d, GC gc, XSegment * segments, int nsegments)); /* 80 */
+ void (*xForceScreenSaver) _ANSI_ARGS_((Display* display, int mode)); /* 81 */
+ void (*xDrawLine) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 82 */
+ void (*xFillRectangle) _ANSI_ARGS_((Display* display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); /* 83 */
+ void (*xClearWindow) _ANSI_ARGS_((Display* d, Window w)); /* 84 */
+ void (*xDrawPoint) _ANSI_ARGS_((Display* display, Drawable d, GC gc, int x, int y)); /* 85 */
+ void (*xDrawPoints) _ANSI_ARGS_((Display* display, Drawable d, GC gc, XPoint * points, int npoints, int mode)); /* 86 */
+ void (*xWarpPointer) _ANSI_ARGS_((Display* display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y)); /* 87 */
+ void (*xQueryColor) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * def_in_out)); /* 88 */
+ void (*xQueryColors) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * defs_in_out, int ncolors)); /* 89 */
+ Status (*xQueryTree) _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, Window** w4, unsigned int* ui)); /* 90 */
+#endif /* MAC_OSX_TK */
+} TkIntXlibStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TkIntXlibStubs *tkIntXlibStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifdef __WIN32__
+#ifndef XSetDashes
+#define XSetDashes \
+ (tkIntXlibStubsPtr->xSetDashes) /* 0 */
+#endif
+#ifndef XGetModifierMapping
+#define XGetModifierMapping \
+ (tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */
+#endif
+#ifndef XCreateImage
+#define XCreateImage \
+ (tkIntXlibStubsPtr->xCreateImage) /* 2 */
+#endif
+#ifndef XGetImage
+#define XGetImage \
+ (tkIntXlibStubsPtr->xGetImage) /* 3 */
+#endif
+#ifndef XGetAtomName
+#define XGetAtomName \
+ (tkIntXlibStubsPtr->xGetAtomName) /* 4 */
+#endif
+#ifndef XKeysymToString
+#define XKeysymToString \
+ (tkIntXlibStubsPtr->xKeysymToString) /* 5 */
+#endif
+#ifndef XCreateColormap
+#define XCreateColormap \
+ (tkIntXlibStubsPtr->xCreateColormap) /* 6 */
+#endif
+#ifndef XCreatePixmapCursor
+#define XCreatePixmapCursor \
+ (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 7 */
+#endif
+#ifndef XCreateGlyphCursor
+#define XCreateGlyphCursor \
+ (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 8 */
+#endif
+#ifndef XGContextFromGC
+#define XGContextFromGC \
+ (tkIntXlibStubsPtr->xGContextFromGC) /* 9 */
+#endif
+#ifndef XListHosts
+#define XListHosts \
+ (tkIntXlibStubsPtr->xListHosts) /* 10 */
+#endif
+#ifndef XKeycodeToKeysym
+#define XKeycodeToKeysym \
+ (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 11 */
+#endif
+#ifndef XStringToKeysym
+#define XStringToKeysym \
+ (tkIntXlibStubsPtr->xStringToKeysym) /* 12 */
+#endif
+#ifndef XRootWindow
+#define XRootWindow \
+ (tkIntXlibStubsPtr->xRootWindow) /* 13 */
+#endif
+#ifndef XSetErrorHandler
+#define XSetErrorHandler \
+ (tkIntXlibStubsPtr->xSetErrorHandler) /* 14 */
+#endif
+#ifndef XIconifyWindow
+#define XIconifyWindow \
+ (tkIntXlibStubsPtr->xIconifyWindow) /* 15 */
+#endif
+#ifndef XWithdrawWindow
+#define XWithdrawWindow \
+ (tkIntXlibStubsPtr->xWithdrawWindow) /* 16 */
+#endif
+#ifndef XGetWMColormapWindows
+#define XGetWMColormapWindows \
+ (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 17 */
+#endif
+#ifndef XAllocColor
+#define XAllocColor \
+ (tkIntXlibStubsPtr->xAllocColor) /* 18 */
+#endif
+#ifndef XBell
+#define XBell \
+ (tkIntXlibStubsPtr->xBell) /* 19 */
+#endif
+#ifndef XChangeProperty
+#define XChangeProperty \
+ (tkIntXlibStubsPtr->xChangeProperty) /* 20 */
+#endif
+#ifndef XChangeWindowAttributes
+#define XChangeWindowAttributes \
+ (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 21 */
+#endif
+#ifndef XClearWindow
+#define XClearWindow \
+ (tkIntXlibStubsPtr->xClearWindow) /* 22 */
+#endif
+#ifndef XConfigureWindow
+#define XConfigureWindow \
+ (tkIntXlibStubsPtr->xConfigureWindow) /* 23 */
+#endif
+#ifndef XCopyArea
+#define XCopyArea \
+ (tkIntXlibStubsPtr->xCopyArea) /* 24 */
+#endif
+#ifndef XCopyPlane
+#define XCopyPlane \
+ (tkIntXlibStubsPtr->xCopyPlane) /* 25 */
+#endif
+#ifndef XCreateBitmapFromData
+#define XCreateBitmapFromData \
+ (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 26 */
+#endif
+#ifndef XDefineCursor
+#define XDefineCursor \
+ (tkIntXlibStubsPtr->xDefineCursor) /* 27 */
+#endif
+#ifndef XDeleteProperty
+#define XDeleteProperty \
+ (tkIntXlibStubsPtr->xDeleteProperty) /* 28 */
+#endif
+#ifndef XDestroyWindow
+#define XDestroyWindow \
+ (tkIntXlibStubsPtr->xDestroyWindow) /* 29 */
+#endif
+#ifndef XDrawArc
+#define XDrawArc \
+ (tkIntXlibStubsPtr->xDrawArc) /* 30 */
+#endif
+#ifndef XDrawLines
+#define XDrawLines \
+ (tkIntXlibStubsPtr->xDrawLines) /* 31 */
+#endif
+#ifndef XDrawRectangle
+#define XDrawRectangle \
+ (tkIntXlibStubsPtr->xDrawRectangle) /* 32 */
+#endif
+#ifndef XFillArc
+#define XFillArc \
+ (tkIntXlibStubsPtr->xFillArc) /* 33 */
+#endif
+#ifndef XFillPolygon
+#define XFillPolygon \
+ (tkIntXlibStubsPtr->xFillPolygon) /* 34 */
+#endif
+#ifndef XFillRectangles
+#define XFillRectangles \
+ (tkIntXlibStubsPtr->xFillRectangles) /* 35 */
+#endif
+#ifndef XForceScreenSaver
+#define XForceScreenSaver \
+ (tkIntXlibStubsPtr->xForceScreenSaver) /* 36 */
+#endif
+#ifndef XFreeColormap
+#define XFreeColormap \
+ (tkIntXlibStubsPtr->xFreeColormap) /* 37 */
+#endif
+#ifndef XFreeColors
+#define XFreeColors \
+ (tkIntXlibStubsPtr->xFreeColors) /* 38 */
+#endif
+#ifndef XFreeCursor
+#define XFreeCursor \
+ (tkIntXlibStubsPtr->xFreeCursor) /* 39 */
+#endif
+#ifndef XFreeModifiermap
+#define XFreeModifiermap \
+ (tkIntXlibStubsPtr->xFreeModifiermap) /* 40 */
+#endif
+#ifndef XGetGeometry
+#define XGetGeometry \
+ (tkIntXlibStubsPtr->xGetGeometry) /* 41 */
+#endif
+#ifndef XGetInputFocus
+#define XGetInputFocus \
+ (tkIntXlibStubsPtr->xGetInputFocus) /* 42 */
+#endif
+#ifndef XGetWindowProperty
+#define XGetWindowProperty \
+ (tkIntXlibStubsPtr->xGetWindowProperty) /* 43 */
+#endif
+#ifndef XGetWindowAttributes
+#define XGetWindowAttributes \
+ (tkIntXlibStubsPtr->xGetWindowAttributes) /* 44 */
+#endif
+#ifndef XGrabKeyboard
+#define XGrabKeyboard \
+ (tkIntXlibStubsPtr->xGrabKeyboard) /* 45 */
+#endif
+#ifndef XGrabPointer
+#define XGrabPointer \
+ (tkIntXlibStubsPtr->xGrabPointer) /* 46 */
+#endif
+#ifndef XKeysymToKeycode
+#define XKeysymToKeycode \
+ (tkIntXlibStubsPtr->xKeysymToKeycode) /* 47 */
+#endif
+#ifndef XLookupColor
+#define XLookupColor \
+ (tkIntXlibStubsPtr->xLookupColor) /* 48 */
+#endif
+#ifndef XMapWindow
+#define XMapWindow \
+ (tkIntXlibStubsPtr->xMapWindow) /* 49 */
+#endif
+#ifndef XMoveResizeWindow
+#define XMoveResizeWindow \
+ (tkIntXlibStubsPtr->xMoveResizeWindow) /* 50 */
+#endif
+#ifndef XMoveWindow
+#define XMoveWindow \
+ (tkIntXlibStubsPtr->xMoveWindow) /* 51 */
+#endif
+#ifndef XNextEvent
+#define XNextEvent \
+ (tkIntXlibStubsPtr->xNextEvent) /* 52 */
+#endif
+#ifndef XPutBackEvent
+#define XPutBackEvent \
+ (tkIntXlibStubsPtr->xPutBackEvent) /* 53 */
+#endif
+#ifndef XQueryColors
+#define XQueryColors \
+ (tkIntXlibStubsPtr->xQueryColors) /* 54 */
+#endif
+#ifndef XQueryPointer
+#define XQueryPointer \
+ (tkIntXlibStubsPtr->xQueryPointer) /* 55 */
+#endif
+#ifndef XQueryTree
+#define XQueryTree \
+ (tkIntXlibStubsPtr->xQueryTree) /* 56 */
+#endif
+#ifndef XRaiseWindow
+#define XRaiseWindow \
+ (tkIntXlibStubsPtr->xRaiseWindow) /* 57 */
+#endif
+#ifndef XRefreshKeyboardMapping
+#define XRefreshKeyboardMapping \
+ (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 58 */
+#endif
+#ifndef XResizeWindow
+#define XResizeWindow \
+ (tkIntXlibStubsPtr->xResizeWindow) /* 59 */
+#endif
+#ifndef XSelectInput
+#define XSelectInput \
+ (tkIntXlibStubsPtr->xSelectInput) /* 60 */
+#endif
+#ifndef XSendEvent
+#define XSendEvent \
+ (tkIntXlibStubsPtr->xSendEvent) /* 61 */
+#endif
+#ifndef XSetCommand
+#define XSetCommand \
+ (tkIntXlibStubsPtr->xSetCommand) /* 62 */
+#endif
+#ifndef XSetIconName
+#define XSetIconName \
+ (tkIntXlibStubsPtr->xSetIconName) /* 63 */
+#endif
+#ifndef XSetInputFocus
+#define XSetInputFocus \
+ (tkIntXlibStubsPtr->xSetInputFocus) /* 64 */
+#endif
+#ifndef XSetSelectionOwner
+#define XSetSelectionOwner \
+ (tkIntXlibStubsPtr->xSetSelectionOwner) /* 65 */
+#endif
+#ifndef XSetWindowBackground
+#define XSetWindowBackground \
+ (tkIntXlibStubsPtr->xSetWindowBackground) /* 66 */
+#endif
+#ifndef XSetWindowBackgroundPixmap
+#define XSetWindowBackgroundPixmap \
+ (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 67 */
+#endif
+#ifndef XSetWindowBorder
+#define XSetWindowBorder \
+ (tkIntXlibStubsPtr->xSetWindowBorder) /* 68 */
+#endif
+#ifndef XSetWindowBorderPixmap
+#define XSetWindowBorderPixmap \
+ (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 69 */
+#endif
+#ifndef XSetWindowBorderWidth
+#define XSetWindowBorderWidth \
+ (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 70 */
+#endif
+#ifndef XSetWindowColormap
+#define XSetWindowColormap \
+ (tkIntXlibStubsPtr->xSetWindowColormap) /* 71 */
+#endif
+#ifndef XTranslateCoordinates
+#define XTranslateCoordinates \
+ (tkIntXlibStubsPtr->xTranslateCoordinates) /* 72 */
+#endif
+#ifndef XUngrabKeyboard
+#define XUngrabKeyboard \
+ (tkIntXlibStubsPtr->xUngrabKeyboard) /* 73 */
+#endif
+#ifndef XUngrabPointer
+#define XUngrabPointer \
+ (tkIntXlibStubsPtr->xUngrabPointer) /* 74 */
+#endif
+#ifndef XUnmapWindow
+#define XUnmapWindow \
+ (tkIntXlibStubsPtr->xUnmapWindow) /* 75 */
+#endif
+#ifndef XWindowEvent
+#define XWindowEvent \
+ (tkIntXlibStubsPtr->xWindowEvent) /* 76 */
+#endif
+#ifndef XDestroyIC
+#define XDestroyIC \
+ (tkIntXlibStubsPtr->xDestroyIC) /* 77 */
+#endif
+#ifndef XFilterEvent
+#define XFilterEvent \
+ (tkIntXlibStubsPtr->xFilterEvent) /* 78 */
+#endif
+#ifndef XmbLookupString
+#define XmbLookupString \
+ (tkIntXlibStubsPtr->xmbLookupString) /* 79 */
+#endif
+#ifndef TkPutImage
+#define TkPutImage \
+ (tkIntXlibStubsPtr->tkPutImage) /* 80 */
+#endif
+/* Slot 81 is reserved */
+#ifndef XParseColor
+#define XParseColor \
+ (tkIntXlibStubsPtr->xParseColor) /* 82 */
+#endif
+#ifndef XCreateGC
+#define XCreateGC \
+ (tkIntXlibStubsPtr->xCreateGC) /* 83 */
+#endif
+#ifndef XFreeGC
+#define XFreeGC \
+ (tkIntXlibStubsPtr->xFreeGC) /* 84 */
+#endif
+#ifndef XInternAtom
+#define XInternAtom \
+ (tkIntXlibStubsPtr->xInternAtom) /* 85 */
+#endif
+#ifndef XSetBackground
+#define XSetBackground \
+ (tkIntXlibStubsPtr->xSetBackground) /* 86 */
+#endif
+#ifndef XSetForeground
+#define XSetForeground \
+ (tkIntXlibStubsPtr->xSetForeground) /* 87 */
+#endif
+#ifndef XSetClipMask
+#define XSetClipMask \
+ (tkIntXlibStubsPtr->xSetClipMask) /* 88 */
+#endif
+#ifndef XSetClipOrigin
+#define XSetClipOrigin \
+ (tkIntXlibStubsPtr->xSetClipOrigin) /* 89 */
+#endif
+#ifndef XSetTSOrigin
+#define XSetTSOrigin \
+ (tkIntXlibStubsPtr->xSetTSOrigin) /* 90 */
+#endif
+#ifndef XChangeGC
+#define XChangeGC \
+ (tkIntXlibStubsPtr->xChangeGC) /* 91 */
+#endif
+#ifndef XSetFont
+#define XSetFont \
+ (tkIntXlibStubsPtr->xSetFont) /* 92 */
+#endif
+#ifndef XSetArcMode
+#define XSetArcMode \
+ (tkIntXlibStubsPtr->xSetArcMode) /* 93 */
+#endif
+#ifndef XSetStipple
+#define XSetStipple \
+ (tkIntXlibStubsPtr->xSetStipple) /* 94 */
+#endif
+#ifndef XSetFillRule
+#define XSetFillRule \
+ (tkIntXlibStubsPtr->xSetFillRule) /* 95 */
+#endif
+#ifndef XSetFillStyle
+#define XSetFillStyle \
+ (tkIntXlibStubsPtr->xSetFillStyle) /* 96 */
+#endif
+#ifndef XSetFunction
+#define XSetFunction \
+ (tkIntXlibStubsPtr->xSetFunction) /* 97 */
+#endif
+#ifndef XSetLineAttributes
+#define XSetLineAttributes \
+ (tkIntXlibStubsPtr->xSetLineAttributes) /* 98 */
+#endif
+#ifndef _XInitImageFuncPtrs
+#define _XInitImageFuncPtrs \
+ (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 99 */
+#endif
+#ifndef XCreateIC
+#define XCreateIC \
+ (tkIntXlibStubsPtr->xCreateIC) /* 100 */
+#endif
+#ifndef XGetVisualInfo
+#define XGetVisualInfo \
+ (tkIntXlibStubsPtr->xGetVisualInfo) /* 101 */
+#endif
+#ifndef XSetWMClientMachine
+#define XSetWMClientMachine \
+ (tkIntXlibStubsPtr->xSetWMClientMachine) /* 102 */
+#endif
+#ifndef XStringListToTextProperty
+#define XStringListToTextProperty \
+ (tkIntXlibStubsPtr->xStringListToTextProperty) /* 103 */
+#endif
+#ifndef XDrawLine
+#define XDrawLine \
+ (tkIntXlibStubsPtr->xDrawLine) /* 104 */
+#endif
+#ifndef XWarpPointer
+#define XWarpPointer \
+ (tkIntXlibStubsPtr->xWarpPointer) /* 105 */
+#endif
+#ifndef XFillRectangle
+#define XFillRectangle \
+ (tkIntXlibStubsPtr->xFillRectangle) /* 106 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef XSetDashes
+#define XSetDashes \
+ (tkIntXlibStubsPtr->xSetDashes) /* 0 */
+#endif
+#ifndef XGetModifierMapping
+#define XGetModifierMapping \
+ (tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */
+#endif
+#ifndef XCreateImage
+#define XCreateImage \
+ (tkIntXlibStubsPtr->xCreateImage) /* 2 */
+#endif
+#ifndef XGetImage
+#define XGetImage \
+ (tkIntXlibStubsPtr->xGetImage) /* 3 */
+#endif
+#ifndef XGetAtomName
+#define XGetAtomName \
+ (tkIntXlibStubsPtr->xGetAtomName) /* 4 */
+#endif
+#ifndef XKeysymToString
+#define XKeysymToString \
+ (tkIntXlibStubsPtr->xKeysymToString) /* 5 */
+#endif
+#ifndef XCreateColormap
+#define XCreateColormap \
+ (tkIntXlibStubsPtr->xCreateColormap) /* 6 */
+#endif
+#ifndef XGContextFromGC
+#define XGContextFromGC \
+ (tkIntXlibStubsPtr->xGContextFromGC) /* 7 */
+#endif
+#ifndef XKeycodeToKeysym
+#define XKeycodeToKeysym \
+ (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 8 */
+#endif
+#ifndef XStringToKeysym
+#define XStringToKeysym \
+ (tkIntXlibStubsPtr->xStringToKeysym) /* 9 */
+#endif
+#ifndef XRootWindow
+#define XRootWindow \
+ (tkIntXlibStubsPtr->xRootWindow) /* 10 */
+#endif
+#ifndef XSetErrorHandler
+#define XSetErrorHandler \
+ (tkIntXlibStubsPtr->xSetErrorHandler) /* 11 */
+#endif
+#ifndef XAllocColor
+#define XAllocColor \
+ (tkIntXlibStubsPtr->xAllocColor) /* 12 */
+#endif
+#ifndef XBell
+#define XBell \
+ (tkIntXlibStubsPtr->xBell) /* 13 */
+#endif
+#ifndef XChangeProperty
+#define XChangeProperty \
+ (tkIntXlibStubsPtr->xChangeProperty) /* 14 */
+#endif
+#ifndef XChangeWindowAttributes
+#define XChangeWindowAttributes \
+ (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 15 */
+#endif
+#ifndef XConfigureWindow
+#define XConfigureWindow \
+ (tkIntXlibStubsPtr->xConfigureWindow) /* 16 */
+#endif
+#ifndef XCopyArea
+#define XCopyArea \
+ (tkIntXlibStubsPtr->xCopyArea) /* 17 */
+#endif
+#ifndef XCopyPlane
+#define XCopyPlane \
+ (tkIntXlibStubsPtr->xCopyPlane) /* 18 */
+#endif
+#ifndef XCreateBitmapFromData
+#define XCreateBitmapFromData \
+ (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 19 */
+#endif
+#ifndef XDefineCursor
+#define XDefineCursor \
+ (tkIntXlibStubsPtr->xDefineCursor) /* 20 */
+#endif
+#ifndef XDestroyWindow
+#define XDestroyWindow \
+ (tkIntXlibStubsPtr->xDestroyWindow) /* 21 */
+#endif
+#ifndef XDrawArc
+#define XDrawArc \
+ (tkIntXlibStubsPtr->xDrawArc) /* 22 */
+#endif
+#ifndef XDrawLines
+#define XDrawLines \
+ (tkIntXlibStubsPtr->xDrawLines) /* 23 */
+#endif
+#ifndef XDrawRectangle
+#define XDrawRectangle \
+ (tkIntXlibStubsPtr->xDrawRectangle) /* 24 */
+#endif
+#ifndef XFillArc
+#define XFillArc \
+ (tkIntXlibStubsPtr->xFillArc) /* 25 */
+#endif
+#ifndef XFillPolygon
+#define XFillPolygon \
+ (tkIntXlibStubsPtr->xFillPolygon) /* 26 */
+#endif
+#ifndef XFillRectangles
+#define XFillRectangles \
+ (tkIntXlibStubsPtr->xFillRectangles) /* 27 */
+#endif
+#ifndef XFreeColormap
+#define XFreeColormap \
+ (tkIntXlibStubsPtr->xFreeColormap) /* 28 */
+#endif
+#ifndef XFreeColors
+#define XFreeColors \
+ (tkIntXlibStubsPtr->xFreeColors) /* 29 */
+#endif
+#ifndef XFreeModifiermap
+#define XFreeModifiermap \
+ (tkIntXlibStubsPtr->xFreeModifiermap) /* 30 */
+#endif
+#ifndef XGetGeometry
+#define XGetGeometry \
+ (tkIntXlibStubsPtr->xGetGeometry) /* 31 */
+#endif
+#ifndef XGetWindowProperty
+#define XGetWindowProperty \
+ (tkIntXlibStubsPtr->xGetWindowProperty) /* 32 */
+#endif
+#ifndef XGrabKeyboard
+#define XGrabKeyboard \
+ (tkIntXlibStubsPtr->xGrabKeyboard) /* 33 */
+#endif
+#ifndef XGrabPointer
+#define XGrabPointer \
+ (tkIntXlibStubsPtr->xGrabPointer) /* 34 */
+#endif
+#ifndef XKeysymToKeycode
+#define XKeysymToKeycode \
+ (tkIntXlibStubsPtr->xKeysymToKeycode) /* 35 */
+#endif
+#ifndef XMapWindow
+#define XMapWindow \
+ (tkIntXlibStubsPtr->xMapWindow) /* 36 */
+#endif
+#ifndef XMoveResizeWindow
+#define XMoveResizeWindow \
+ (tkIntXlibStubsPtr->xMoveResizeWindow) /* 37 */
+#endif
+#ifndef XMoveWindow
+#define XMoveWindow \
+ (tkIntXlibStubsPtr->xMoveWindow) /* 38 */
+#endif
+#ifndef XQueryPointer
+#define XQueryPointer \
+ (tkIntXlibStubsPtr->xQueryPointer) /* 39 */
+#endif
+#ifndef XRaiseWindow
+#define XRaiseWindow \
+ (tkIntXlibStubsPtr->xRaiseWindow) /* 40 */
+#endif
+#ifndef XRefreshKeyboardMapping
+#define XRefreshKeyboardMapping \
+ (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 41 */
+#endif
+#ifndef XResizeWindow
+#define XResizeWindow \
+ (tkIntXlibStubsPtr->xResizeWindow) /* 42 */
+#endif
+#ifndef XSelectInput
+#define XSelectInput \
+ (tkIntXlibStubsPtr->xSelectInput) /* 43 */
+#endif
+#ifndef XSendEvent
+#define XSendEvent \
+ (tkIntXlibStubsPtr->xSendEvent) /* 44 */
+#endif
+#ifndef XSetIconName
+#define XSetIconName \
+ (tkIntXlibStubsPtr->xSetIconName) /* 45 */
+#endif
+#ifndef XSetInputFocus
+#define XSetInputFocus \
+ (tkIntXlibStubsPtr->xSetInputFocus) /* 46 */
+#endif
+#ifndef XSetSelectionOwner
+#define XSetSelectionOwner \
+ (tkIntXlibStubsPtr->xSetSelectionOwner) /* 47 */
+#endif
+#ifndef XSetWindowBackground
+#define XSetWindowBackground \
+ (tkIntXlibStubsPtr->xSetWindowBackground) /* 48 */
+#endif
+#ifndef XSetWindowBackgroundPixmap
+#define XSetWindowBackgroundPixmap \
+ (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 49 */
+#endif
+#ifndef XSetWindowBorder
+#define XSetWindowBorder \
+ (tkIntXlibStubsPtr->xSetWindowBorder) /* 50 */
+#endif
+#ifndef XSetWindowBorderPixmap
+#define XSetWindowBorderPixmap \
+ (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 51 */
+#endif
+#ifndef XSetWindowBorderWidth
+#define XSetWindowBorderWidth \
+ (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 52 */
+#endif
+#ifndef XSetWindowColormap
+#define XSetWindowColormap \
+ (tkIntXlibStubsPtr->xSetWindowColormap) /* 53 */
+#endif
+#ifndef XUngrabKeyboard
+#define XUngrabKeyboard \
+ (tkIntXlibStubsPtr->xUngrabKeyboard) /* 54 */
+#endif
+#ifndef XUngrabPointer
+#define XUngrabPointer \
+ (tkIntXlibStubsPtr->xUngrabPointer) /* 55 */
+#endif
+#ifndef XUnmapWindow
+#define XUnmapWindow \
+ (tkIntXlibStubsPtr->xUnmapWindow) /* 56 */
+#endif
+#ifndef TkPutImage
+#define TkPutImage \
+ (tkIntXlibStubsPtr->tkPutImage) /* 57 */
+#endif
+#ifndef XParseColor
+#define XParseColor \
+ (tkIntXlibStubsPtr->xParseColor) /* 58 */
+#endif
+#ifndef XCreateGC
+#define XCreateGC \
+ (tkIntXlibStubsPtr->xCreateGC) /* 59 */
+#endif
+#ifndef XFreeGC
+#define XFreeGC \
+ (tkIntXlibStubsPtr->xFreeGC) /* 60 */
+#endif
+#ifndef XInternAtom
+#define XInternAtom \
+ (tkIntXlibStubsPtr->xInternAtom) /* 61 */
+#endif
+#ifndef XSetBackground
+#define XSetBackground \
+ (tkIntXlibStubsPtr->xSetBackground) /* 62 */
+#endif
+#ifndef XSetForeground
+#define XSetForeground \
+ (tkIntXlibStubsPtr->xSetForeground) /* 63 */
+#endif
+#ifndef XSetClipMask
+#define XSetClipMask \
+ (tkIntXlibStubsPtr->xSetClipMask) /* 64 */
+#endif
+#ifndef XSetClipOrigin
+#define XSetClipOrigin \
+ (tkIntXlibStubsPtr->xSetClipOrigin) /* 65 */
+#endif
+#ifndef XSetTSOrigin
+#define XSetTSOrigin \
+ (tkIntXlibStubsPtr->xSetTSOrigin) /* 66 */
+#endif
+#ifndef XChangeGC
+#define XChangeGC \
+ (tkIntXlibStubsPtr->xChangeGC) /* 67 */
+#endif
+#ifndef XSetFont
+#define XSetFont \
+ (tkIntXlibStubsPtr->xSetFont) /* 68 */
+#endif
+#ifndef XSetArcMode
+#define XSetArcMode \
+ (tkIntXlibStubsPtr->xSetArcMode) /* 69 */
+#endif
+#ifndef XSetStipple
+#define XSetStipple \
+ (tkIntXlibStubsPtr->xSetStipple) /* 70 */
+#endif
+#ifndef XSetFillRule
+#define XSetFillRule \
+ (tkIntXlibStubsPtr->xSetFillRule) /* 71 */
+#endif
+#ifndef XSetFillStyle
+#define XSetFillStyle \
+ (tkIntXlibStubsPtr->xSetFillStyle) /* 72 */
+#endif
+#ifndef XSetFunction
+#define XSetFunction \
+ (tkIntXlibStubsPtr->xSetFunction) /* 73 */
+#endif
+#ifndef XSetLineAttributes
+#define XSetLineAttributes \
+ (tkIntXlibStubsPtr->xSetLineAttributes) /* 74 */
+#endif
+#ifndef _XInitImageFuncPtrs
+#define _XInitImageFuncPtrs \
+ (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 75 */
+#endif
+#ifndef XCreateIC
+#define XCreateIC \
+ (tkIntXlibStubsPtr->xCreateIC) /* 76 */
+#endif
+#ifndef XGetVisualInfo
+#define XGetVisualInfo \
+ (tkIntXlibStubsPtr->xGetVisualInfo) /* 77 */
+#endif
+#ifndef XSetWMClientMachine
+#define XSetWMClientMachine \
+ (tkIntXlibStubsPtr->xSetWMClientMachine) /* 78 */
+#endif
+#ifndef XStringListToTextProperty
+#define XStringListToTextProperty \
+ (tkIntXlibStubsPtr->xStringListToTextProperty) /* 79 */
+#endif
+#ifndef XDrawSegments
+#define XDrawSegments \
+ (tkIntXlibStubsPtr->xDrawSegments) /* 80 */
+#endif
+#ifndef XForceScreenSaver
+#define XForceScreenSaver \
+ (tkIntXlibStubsPtr->xForceScreenSaver) /* 81 */
+#endif
+#ifndef XDrawLine
+#define XDrawLine \
+ (tkIntXlibStubsPtr->xDrawLine) /* 82 */
+#endif
+#ifndef XFillRectangle
+#define XFillRectangle \
+ (tkIntXlibStubsPtr->xFillRectangle) /* 83 */
+#endif
+#ifndef XClearWindow
+#define XClearWindow \
+ (tkIntXlibStubsPtr->xClearWindow) /* 84 */
+#endif
+#ifndef XDrawPoint
+#define XDrawPoint \
+ (tkIntXlibStubsPtr->xDrawPoint) /* 85 */
+#endif
+#ifndef XDrawPoints
+#define XDrawPoints \
+ (tkIntXlibStubsPtr->xDrawPoints) /* 86 */
+#endif
+#ifndef XWarpPointer
+#define XWarpPointer \
+ (tkIntXlibStubsPtr->xWarpPointer) /* 87 */
+#endif
+#ifndef XQueryColor
+#define XQueryColor \
+ (tkIntXlibStubsPtr->xQueryColor) /* 88 */
+#endif
+#ifndef XQueryColors
+#define XQueryColors \
+ (tkIntXlibStubsPtr->xQueryColors) /* 89 */
+#endif
+#ifndef XQueryTree
+#define XQueryTree \
+ (tkIntXlibStubsPtr->xQueryTree) /* 90 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef XSetDashes
+#define XSetDashes \
+ (tkIntXlibStubsPtr->xSetDashes) /* 0 */
+#endif
+#ifndef XGetModifierMapping
+#define XGetModifierMapping \
+ (tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */
+#endif
+#ifndef XCreateImage
+#define XCreateImage \
+ (tkIntXlibStubsPtr->xCreateImage) /* 2 */
+#endif
+#ifndef XGetImage
+#define XGetImage \
+ (tkIntXlibStubsPtr->xGetImage) /* 3 */
+#endif
+#ifndef XGetAtomName
+#define XGetAtomName \
+ (tkIntXlibStubsPtr->xGetAtomName) /* 4 */
+#endif
+#ifndef XKeysymToString
+#define XKeysymToString \
+ (tkIntXlibStubsPtr->xKeysymToString) /* 5 */
+#endif
+#ifndef XCreateColormap
+#define XCreateColormap \
+ (tkIntXlibStubsPtr->xCreateColormap) /* 6 */
+#endif
+#ifndef XGContextFromGC
+#define XGContextFromGC \
+ (tkIntXlibStubsPtr->xGContextFromGC) /* 7 */
+#endif
+#ifndef XKeycodeToKeysym
+#define XKeycodeToKeysym \
+ (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 8 */
+#endif
+#ifndef XStringToKeysym
+#define XStringToKeysym \
+ (tkIntXlibStubsPtr->xStringToKeysym) /* 9 */
+#endif
+#ifndef XRootWindow
+#define XRootWindow \
+ (tkIntXlibStubsPtr->xRootWindow) /* 10 */
+#endif
+#ifndef XSetErrorHandler
+#define XSetErrorHandler \
+ (tkIntXlibStubsPtr->xSetErrorHandler) /* 11 */
+#endif
+#ifndef XAllocColor
+#define XAllocColor \
+ (tkIntXlibStubsPtr->xAllocColor) /* 12 */
+#endif
+#ifndef XBell
+#define XBell \
+ (tkIntXlibStubsPtr->xBell) /* 13 */
+#endif
+#ifndef XChangeProperty
+#define XChangeProperty \
+ (tkIntXlibStubsPtr->xChangeProperty) /* 14 */
+#endif
+#ifndef XChangeWindowAttributes
+#define XChangeWindowAttributes \
+ (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 15 */
+#endif
+#ifndef XConfigureWindow
+#define XConfigureWindow \
+ (tkIntXlibStubsPtr->xConfigureWindow) /* 16 */
+#endif
+#ifndef XCopyArea
+#define XCopyArea \
+ (tkIntXlibStubsPtr->xCopyArea) /* 17 */
+#endif
+#ifndef XCopyPlane
+#define XCopyPlane \
+ (tkIntXlibStubsPtr->xCopyPlane) /* 18 */
+#endif
+#ifndef XCreateBitmapFromData
+#define XCreateBitmapFromData \
+ (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 19 */
+#endif
+#ifndef XDefineCursor
+#define XDefineCursor \
+ (tkIntXlibStubsPtr->xDefineCursor) /* 20 */
+#endif
+#ifndef XDestroyWindow
+#define XDestroyWindow \
+ (tkIntXlibStubsPtr->xDestroyWindow) /* 21 */
+#endif
+#ifndef XDrawArc
+#define XDrawArc \
+ (tkIntXlibStubsPtr->xDrawArc) /* 22 */
+#endif
+#ifndef XDrawLines
+#define XDrawLines \
+ (tkIntXlibStubsPtr->xDrawLines) /* 23 */
+#endif
+#ifndef XDrawRectangle
+#define XDrawRectangle \
+ (tkIntXlibStubsPtr->xDrawRectangle) /* 24 */
+#endif
+#ifndef XFillArc
+#define XFillArc \
+ (tkIntXlibStubsPtr->xFillArc) /* 25 */
+#endif
+#ifndef XFillPolygon
+#define XFillPolygon \
+ (tkIntXlibStubsPtr->xFillPolygon) /* 26 */
+#endif
+#ifndef XFillRectangles
+#define XFillRectangles \
+ (tkIntXlibStubsPtr->xFillRectangles) /* 27 */
+#endif
+#ifndef XFreeColormap
+#define XFreeColormap \
+ (tkIntXlibStubsPtr->xFreeColormap) /* 28 */
+#endif
+#ifndef XFreeColors
+#define XFreeColors \
+ (tkIntXlibStubsPtr->xFreeColors) /* 29 */
+#endif
+#ifndef XFreeModifiermap
+#define XFreeModifiermap \
+ (tkIntXlibStubsPtr->xFreeModifiermap) /* 30 */
+#endif
+#ifndef XGetGeometry
+#define XGetGeometry \
+ (tkIntXlibStubsPtr->xGetGeometry) /* 31 */
+#endif
+#ifndef XGetWindowProperty
+#define XGetWindowProperty \
+ (tkIntXlibStubsPtr->xGetWindowProperty) /* 32 */
+#endif
+#ifndef XGrabKeyboard
+#define XGrabKeyboard \
+ (tkIntXlibStubsPtr->xGrabKeyboard) /* 33 */
+#endif
+#ifndef XGrabPointer
+#define XGrabPointer \
+ (tkIntXlibStubsPtr->xGrabPointer) /* 34 */
+#endif
+#ifndef XKeysymToKeycode
+#define XKeysymToKeycode \
+ (tkIntXlibStubsPtr->xKeysymToKeycode) /* 35 */
+#endif
+#ifndef XMapWindow
+#define XMapWindow \
+ (tkIntXlibStubsPtr->xMapWindow) /* 36 */
+#endif
+#ifndef XMoveResizeWindow
+#define XMoveResizeWindow \
+ (tkIntXlibStubsPtr->xMoveResizeWindow) /* 37 */
+#endif
+#ifndef XMoveWindow
+#define XMoveWindow \
+ (tkIntXlibStubsPtr->xMoveWindow) /* 38 */
+#endif
+#ifndef XQueryPointer
+#define XQueryPointer \
+ (tkIntXlibStubsPtr->xQueryPointer) /* 39 */
+#endif
+#ifndef XRaiseWindow
+#define XRaiseWindow \
+ (tkIntXlibStubsPtr->xRaiseWindow) /* 40 */
+#endif
+#ifndef XRefreshKeyboardMapping
+#define XRefreshKeyboardMapping \
+ (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 41 */
+#endif
+#ifndef XResizeWindow
+#define XResizeWindow \
+ (tkIntXlibStubsPtr->xResizeWindow) /* 42 */
+#endif
+#ifndef XSelectInput
+#define XSelectInput \
+ (tkIntXlibStubsPtr->xSelectInput) /* 43 */
+#endif
+#ifndef XSendEvent
+#define XSendEvent \
+ (tkIntXlibStubsPtr->xSendEvent) /* 44 */
+#endif
+#ifndef XSetIconName
+#define XSetIconName \
+ (tkIntXlibStubsPtr->xSetIconName) /* 45 */
+#endif
+#ifndef XSetInputFocus
+#define XSetInputFocus \
+ (tkIntXlibStubsPtr->xSetInputFocus) /* 46 */
+#endif
+#ifndef XSetSelectionOwner
+#define XSetSelectionOwner \
+ (tkIntXlibStubsPtr->xSetSelectionOwner) /* 47 */
+#endif
+#ifndef XSetWindowBackground
+#define XSetWindowBackground \
+ (tkIntXlibStubsPtr->xSetWindowBackground) /* 48 */
+#endif
+#ifndef XSetWindowBackgroundPixmap
+#define XSetWindowBackgroundPixmap \
+ (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 49 */
+#endif
+#ifndef XSetWindowBorder
+#define XSetWindowBorder \
+ (tkIntXlibStubsPtr->xSetWindowBorder) /* 50 */
+#endif
+#ifndef XSetWindowBorderPixmap
+#define XSetWindowBorderPixmap \
+ (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 51 */
+#endif
+#ifndef XSetWindowBorderWidth
+#define XSetWindowBorderWidth \
+ (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 52 */
+#endif
+#ifndef XSetWindowColormap
+#define XSetWindowColormap \
+ (tkIntXlibStubsPtr->xSetWindowColormap) /* 53 */
+#endif
+#ifndef XUngrabKeyboard
+#define XUngrabKeyboard \
+ (tkIntXlibStubsPtr->xUngrabKeyboard) /* 54 */
+#endif
+#ifndef XUngrabPointer
+#define XUngrabPointer \
+ (tkIntXlibStubsPtr->xUngrabPointer) /* 55 */
+#endif
+#ifndef XUnmapWindow
+#define XUnmapWindow \
+ (tkIntXlibStubsPtr->xUnmapWindow) /* 56 */
+#endif
+#ifndef TkPutImage
+#define TkPutImage \
+ (tkIntXlibStubsPtr->tkPutImage) /* 57 */
+#endif
+#ifndef XParseColor
+#define XParseColor \
+ (tkIntXlibStubsPtr->xParseColor) /* 58 */
+#endif
+#ifndef XCreateGC
+#define XCreateGC \
+ (tkIntXlibStubsPtr->xCreateGC) /* 59 */
+#endif
+#ifndef XFreeGC
+#define XFreeGC \
+ (tkIntXlibStubsPtr->xFreeGC) /* 60 */
+#endif
+#ifndef XInternAtom
+#define XInternAtom \
+ (tkIntXlibStubsPtr->xInternAtom) /* 61 */
+#endif
+#ifndef XSetBackground
+#define XSetBackground \
+ (tkIntXlibStubsPtr->xSetBackground) /* 62 */
+#endif
+#ifndef XSetForeground
+#define XSetForeground \
+ (tkIntXlibStubsPtr->xSetForeground) /* 63 */
+#endif
+#ifndef XSetClipMask
+#define XSetClipMask \
+ (tkIntXlibStubsPtr->xSetClipMask) /* 64 */
+#endif
+#ifndef XSetClipOrigin
+#define XSetClipOrigin \
+ (tkIntXlibStubsPtr->xSetClipOrigin) /* 65 */
+#endif
+#ifndef XSetTSOrigin
+#define XSetTSOrigin \
+ (tkIntXlibStubsPtr->xSetTSOrigin) /* 66 */
+#endif
+#ifndef XChangeGC
+#define XChangeGC \
+ (tkIntXlibStubsPtr->xChangeGC) /* 67 */
+#endif
+#ifndef XSetFont
+#define XSetFont \
+ (tkIntXlibStubsPtr->xSetFont) /* 68 */
+#endif
+#ifndef XSetArcMode
+#define XSetArcMode \
+ (tkIntXlibStubsPtr->xSetArcMode) /* 69 */
+#endif
+#ifndef XSetStipple
+#define XSetStipple \
+ (tkIntXlibStubsPtr->xSetStipple) /* 70 */
+#endif
+#ifndef XSetFillRule
+#define XSetFillRule \
+ (tkIntXlibStubsPtr->xSetFillRule) /* 71 */
+#endif
+#ifndef XSetFillStyle
+#define XSetFillStyle \
+ (tkIntXlibStubsPtr->xSetFillStyle) /* 72 */
+#endif
+#ifndef XSetFunction
+#define XSetFunction \
+ (tkIntXlibStubsPtr->xSetFunction) /* 73 */
+#endif
+#ifndef XSetLineAttributes
+#define XSetLineAttributes \
+ (tkIntXlibStubsPtr->xSetLineAttributes) /* 74 */
+#endif
+#ifndef _XInitImageFuncPtrs
+#define _XInitImageFuncPtrs \
+ (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 75 */
+#endif
+#ifndef XCreateIC
+#define XCreateIC \
+ (tkIntXlibStubsPtr->xCreateIC) /* 76 */
+#endif
+#ifndef XGetVisualInfo
+#define XGetVisualInfo \
+ (tkIntXlibStubsPtr->xGetVisualInfo) /* 77 */
+#endif
+#ifndef XSetWMClientMachine
+#define XSetWMClientMachine \
+ (tkIntXlibStubsPtr->xSetWMClientMachine) /* 78 */
+#endif
+#ifndef XStringListToTextProperty
+#define XStringListToTextProperty \
+ (tkIntXlibStubsPtr->xStringListToTextProperty) /* 79 */
+#endif
+#ifndef XDrawSegments
+#define XDrawSegments \
+ (tkIntXlibStubsPtr->xDrawSegments) /* 80 */
+#endif
+#ifndef XForceScreenSaver
+#define XForceScreenSaver \
+ (tkIntXlibStubsPtr->xForceScreenSaver) /* 81 */
+#endif
+#ifndef XDrawLine
+#define XDrawLine \
+ (tkIntXlibStubsPtr->xDrawLine) /* 82 */
+#endif
+#ifndef XFillRectangle
+#define XFillRectangle \
+ (tkIntXlibStubsPtr->xFillRectangle) /* 83 */
+#endif
+#ifndef XClearWindow
+#define XClearWindow \
+ (tkIntXlibStubsPtr->xClearWindow) /* 84 */
+#endif
+#ifndef XDrawPoint
+#define XDrawPoint \
+ (tkIntXlibStubsPtr->xDrawPoint) /* 85 */
+#endif
+#ifndef XDrawPoints
+#define XDrawPoints \
+ (tkIntXlibStubsPtr->xDrawPoints) /* 86 */
+#endif
+#ifndef XWarpPointer
+#define XWarpPointer \
+ (tkIntXlibStubsPtr->xWarpPointer) /* 87 */
+#endif
+#ifndef XQueryColor
+#define XQueryColor \
+ (tkIntXlibStubsPtr->xQueryColor) /* 88 */
+#endif
+#ifndef XQueryColors
+#define XQueryColors \
+ (tkIntXlibStubsPtr->xQueryColors) /* 89 */
+#endif
+#ifndef XQueryTree
+#define XQueryTree \
+ (tkIntXlibStubsPtr->xQueryTree) /* 90 */
+#endif
+#endif /* MAC_OSX_TK */
+
+#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKINTXLIBDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.m
new file mode 100644
index 00000000000..8671ce54721
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.m
@@ -0,0 +1,446 @@
+#ifndef _TKINTXLIBDECLS_VM
+#define _TKINTXLIBDECLS_VM
+#include "tkIntXlibDecls_f.h"
+#ifndef NO_VTABLES
+#ifndef TkPutImage
+# define TkPutImage (*TkintxlibdeclsVptr->V_TkPutImage)
+#endif
+
+#ifndef XAllocColor
+# define XAllocColor (*TkintxlibdeclsVptr->V_XAllocColor)
+#endif
+
+#ifndef XBell
+# define XBell (*TkintxlibdeclsVptr->V_XBell)
+#endif
+
+#ifndef XChangeGC
+# define XChangeGC (*TkintxlibdeclsVptr->V_XChangeGC)
+#endif
+
+#ifndef XChangeProperty
+# define XChangeProperty (*TkintxlibdeclsVptr->V_XChangeProperty)
+#endif
+
+#ifndef XChangeWindowAttributes
+# define XChangeWindowAttributes (*TkintxlibdeclsVptr->V_XChangeWindowAttributes)
+#endif
+
+#ifndef XClearWindow
+# define XClearWindow (*TkintxlibdeclsVptr->V_XClearWindow)
+#endif
+
+#ifndef XConfigureWindow
+# define XConfigureWindow (*TkintxlibdeclsVptr->V_XConfigureWindow)
+#endif
+
+#ifndef XCopyArea
+# define XCopyArea (*TkintxlibdeclsVptr->V_XCopyArea)
+#endif
+
+#ifndef XCopyPlane
+# define XCopyPlane (*TkintxlibdeclsVptr->V_XCopyPlane)
+#endif
+
+#ifndef XCreateBitmapFromData
+# define XCreateBitmapFromData (*TkintxlibdeclsVptr->V_XCreateBitmapFromData)
+#endif
+
+#ifndef XCreateColormap
+# define XCreateColormap (*TkintxlibdeclsVptr->V_XCreateColormap)
+#endif
+
+#ifndef XCreateGC
+# define XCreateGC (*TkintxlibdeclsVptr->V_XCreateGC)
+#endif
+
+#ifndef XCreateGlyphCursor
+# define XCreateGlyphCursor (*TkintxlibdeclsVptr->V_XCreateGlyphCursor)
+#endif
+
+#ifndef XCreateIC
+# define XCreateIC (*TkintxlibdeclsVptr->V_XCreateIC)
+#endif
+
+#ifndef XCreateImage
+# define XCreateImage (*TkintxlibdeclsVptr->V_XCreateImage)
+#endif
+
+#ifndef XCreatePixmapCursor
+# define XCreatePixmapCursor (*TkintxlibdeclsVptr->V_XCreatePixmapCursor)
+#endif
+
+#ifndef XDefineCursor
+# define XDefineCursor (*TkintxlibdeclsVptr->V_XDefineCursor)
+#endif
+
+#ifndef XDeleteProperty
+# define XDeleteProperty (*TkintxlibdeclsVptr->V_XDeleteProperty)
+#endif
+
+#ifndef XDestroyIC
+# define XDestroyIC (*TkintxlibdeclsVptr->V_XDestroyIC)
+#endif
+
+#ifndef XDestroyWindow
+# define XDestroyWindow (*TkintxlibdeclsVptr->V_XDestroyWindow)
+#endif
+
+#ifndef XDrawArc
+# define XDrawArc (*TkintxlibdeclsVptr->V_XDrawArc)
+#endif
+
+#ifndef XDrawLine
+# define XDrawLine (*TkintxlibdeclsVptr->V_XDrawLine)
+#endif
+
+#ifndef XDrawLines
+# define XDrawLines (*TkintxlibdeclsVptr->V_XDrawLines)
+#endif
+
+#ifndef XDrawPoint
+# define XDrawPoint (*TkintxlibdeclsVptr->V_XDrawPoint)
+#endif
+
+#ifndef XDrawPoints
+# define XDrawPoints (*TkintxlibdeclsVptr->V_XDrawPoints)
+#endif
+
+#ifndef XDrawRectangle
+# define XDrawRectangle (*TkintxlibdeclsVptr->V_XDrawRectangle)
+#endif
+
+#ifndef XDrawSegments
+# define XDrawSegments (*TkintxlibdeclsVptr->V_XDrawSegments)
+#endif
+
+#ifndef XFillArc
+# define XFillArc (*TkintxlibdeclsVptr->V_XFillArc)
+#endif
+
+#ifndef XFillPolygon
+# define XFillPolygon (*TkintxlibdeclsVptr->V_XFillPolygon)
+#endif
+
+#ifndef XFillRectangle
+# define XFillRectangle (*TkintxlibdeclsVptr->V_XFillRectangle)
+#endif
+
+#ifndef XFillRectangles
+# define XFillRectangles (*TkintxlibdeclsVptr->V_XFillRectangles)
+#endif
+
+#ifndef XFilterEvent
+# define XFilterEvent (*TkintxlibdeclsVptr->V_XFilterEvent)
+#endif
+
+#ifndef XForceScreenSaver
+# define XForceScreenSaver (*TkintxlibdeclsVptr->V_XForceScreenSaver)
+#endif
+
+#ifndef XFreeColormap
+# define XFreeColormap (*TkintxlibdeclsVptr->V_XFreeColormap)
+#endif
+
+#ifndef XFreeColors
+# define XFreeColors (*TkintxlibdeclsVptr->V_XFreeColors)
+#endif
+
+#ifndef XFreeCursor
+# define XFreeCursor (*TkintxlibdeclsVptr->V_XFreeCursor)
+#endif
+
+#ifndef XFreeGC
+# define XFreeGC (*TkintxlibdeclsVptr->V_XFreeGC)
+#endif
+
+#ifndef XFreeModifiermap
+# define XFreeModifiermap (*TkintxlibdeclsVptr->V_XFreeModifiermap)
+#endif
+
+#ifndef XGContextFromGC
+# define XGContextFromGC (*TkintxlibdeclsVptr->V_XGContextFromGC)
+#endif
+
+#ifndef XGetAtomName
+# define XGetAtomName (*TkintxlibdeclsVptr->V_XGetAtomName)
+#endif
+
+#ifndef XGetGeometry
+# define XGetGeometry (*TkintxlibdeclsVptr->V_XGetGeometry)
+#endif
+
+#ifndef XGetImage
+# define XGetImage (*TkintxlibdeclsVptr->V_XGetImage)
+#endif
+
+#ifndef XGetInputFocus
+# define XGetInputFocus (*TkintxlibdeclsVptr->V_XGetInputFocus)
+#endif
+
+#ifndef XGetModifierMapping
+# define XGetModifierMapping (*TkintxlibdeclsVptr->V_XGetModifierMapping)
+#endif
+
+#ifndef XGetVisualInfo
+# define XGetVisualInfo (*TkintxlibdeclsVptr->V_XGetVisualInfo)
+#endif
+
+#ifndef XGetWMColormapWindows
+# define XGetWMColormapWindows (*TkintxlibdeclsVptr->V_XGetWMColormapWindows)
+#endif
+
+#ifndef XGetWindowAttributes
+# define XGetWindowAttributes (*TkintxlibdeclsVptr->V_XGetWindowAttributes)
+#endif
+
+#ifndef XGetWindowProperty
+# define XGetWindowProperty (*TkintxlibdeclsVptr->V_XGetWindowProperty)
+#endif
+
+#ifndef XGrabKeyboard
+# define XGrabKeyboard (*TkintxlibdeclsVptr->V_XGrabKeyboard)
+#endif
+
+#ifndef XGrabPointer
+# define XGrabPointer (*TkintxlibdeclsVptr->V_XGrabPointer)
+#endif
+
+#ifndef XIconifyWindow
+# define XIconifyWindow (*TkintxlibdeclsVptr->V_XIconifyWindow)
+#endif
+
+#ifndef XInternAtom
+# define XInternAtom (*TkintxlibdeclsVptr->V_XInternAtom)
+#endif
+
+#ifndef XKeycodeToKeysym
+# define XKeycodeToKeysym (*TkintxlibdeclsVptr->V_XKeycodeToKeysym)
+#endif
+
+#ifndef XKeysymToKeycode
+# define XKeysymToKeycode (*TkintxlibdeclsVptr->V_XKeysymToKeycode)
+#endif
+
+#ifndef XKeysymToString
+# define XKeysymToString (*TkintxlibdeclsVptr->V_XKeysymToString)
+#endif
+
+#ifndef XListHosts
+# define XListHosts (*TkintxlibdeclsVptr->V_XListHosts)
+#endif
+
+#ifndef XLookupColor
+# define XLookupColor (*TkintxlibdeclsVptr->V_XLookupColor)
+#endif
+
+#ifndef XMapWindow
+# define XMapWindow (*TkintxlibdeclsVptr->V_XMapWindow)
+#endif
+
+#ifndef XMoveResizeWindow
+# define XMoveResizeWindow (*TkintxlibdeclsVptr->V_XMoveResizeWindow)
+#endif
+
+#ifndef XMoveWindow
+# define XMoveWindow (*TkintxlibdeclsVptr->V_XMoveWindow)
+#endif
+
+#ifndef XNextEvent
+# define XNextEvent (*TkintxlibdeclsVptr->V_XNextEvent)
+#endif
+
+#ifndef XParseColor
+# define XParseColor (*TkintxlibdeclsVptr->V_XParseColor)
+#endif
+
+#ifndef XPutBackEvent
+# define XPutBackEvent (*TkintxlibdeclsVptr->V_XPutBackEvent)
+#endif
+
+#ifndef XQueryColor
+# define XQueryColor (*TkintxlibdeclsVptr->V_XQueryColor)
+#endif
+
+#ifndef XQueryColors
+# define XQueryColors (*TkintxlibdeclsVptr->V_XQueryColors)
+#endif
+
+#ifndef XQueryPointer
+# define XQueryPointer (*TkintxlibdeclsVptr->V_XQueryPointer)
+#endif
+
+#ifndef XQueryTree
+# define XQueryTree (*TkintxlibdeclsVptr->V_XQueryTree)
+#endif
+
+#ifndef XRaiseWindow
+# define XRaiseWindow (*TkintxlibdeclsVptr->V_XRaiseWindow)
+#endif
+
+#ifndef XRefreshKeyboardMapping
+# define XRefreshKeyboardMapping (*TkintxlibdeclsVptr->V_XRefreshKeyboardMapping)
+#endif
+
+#ifndef XResizeWindow
+# define XResizeWindow (*TkintxlibdeclsVptr->V_XResizeWindow)
+#endif
+
+#ifndef XRootWindow
+# define XRootWindow (*TkintxlibdeclsVptr->V_XRootWindow)
+#endif
+
+#ifndef XSelectInput
+# define XSelectInput (*TkintxlibdeclsVptr->V_XSelectInput)
+#endif
+
+#ifndef XSendEvent
+# define XSendEvent (*TkintxlibdeclsVptr->V_XSendEvent)
+#endif
+
+#ifndef XSetArcMode
+# define XSetArcMode (*TkintxlibdeclsVptr->V_XSetArcMode)
+#endif
+
+#ifndef XSetBackground
+# define XSetBackground (*TkintxlibdeclsVptr->V_XSetBackground)
+#endif
+
+#ifndef XSetClipMask
+# define XSetClipMask (*TkintxlibdeclsVptr->V_XSetClipMask)
+#endif
+
+#ifndef XSetClipOrigin
+# define XSetClipOrigin (*TkintxlibdeclsVptr->V_XSetClipOrigin)
+#endif
+
+#ifndef XSetCommand
+# define XSetCommand (*TkintxlibdeclsVptr->V_XSetCommand)
+#endif
+
+#ifndef XSetDashes
+# define XSetDashes (*TkintxlibdeclsVptr->V_XSetDashes)
+#endif
+
+#ifndef XSetErrorHandler
+# define XSetErrorHandler (*TkintxlibdeclsVptr->V_XSetErrorHandler)
+#endif
+
+#ifndef XSetFillRule
+# define XSetFillRule (*TkintxlibdeclsVptr->V_XSetFillRule)
+#endif
+
+#ifndef XSetFillStyle
+# define XSetFillStyle (*TkintxlibdeclsVptr->V_XSetFillStyle)
+#endif
+
+#ifndef XSetFont
+# define XSetFont (*TkintxlibdeclsVptr->V_XSetFont)
+#endif
+
+#ifndef XSetForeground
+# define XSetForeground (*TkintxlibdeclsVptr->V_XSetForeground)
+#endif
+
+#ifndef XSetFunction
+# define XSetFunction (*TkintxlibdeclsVptr->V_XSetFunction)
+#endif
+
+#ifndef XSetIconName
+# define XSetIconName (*TkintxlibdeclsVptr->V_XSetIconName)
+#endif
+
+#ifndef XSetInputFocus
+# define XSetInputFocus (*TkintxlibdeclsVptr->V_XSetInputFocus)
+#endif
+
+#ifndef XSetLineAttributes
+# define XSetLineAttributes (*TkintxlibdeclsVptr->V_XSetLineAttributes)
+#endif
+
+#ifndef XSetSelectionOwner
+# define XSetSelectionOwner (*TkintxlibdeclsVptr->V_XSetSelectionOwner)
+#endif
+
+#ifndef XSetStipple
+# define XSetStipple (*TkintxlibdeclsVptr->V_XSetStipple)
+#endif
+
+#ifndef XSetTSOrigin
+# define XSetTSOrigin (*TkintxlibdeclsVptr->V_XSetTSOrigin)
+#endif
+
+#ifndef XSetWMClientMachine
+# define XSetWMClientMachine (*TkintxlibdeclsVptr->V_XSetWMClientMachine)
+#endif
+
+#ifndef XSetWindowBackground
+# define XSetWindowBackground (*TkintxlibdeclsVptr->V_XSetWindowBackground)
+#endif
+
+#ifndef XSetWindowBackgroundPixmap
+# define XSetWindowBackgroundPixmap (*TkintxlibdeclsVptr->V_XSetWindowBackgroundPixmap)
+#endif
+
+#ifndef XSetWindowBorder
+# define XSetWindowBorder (*TkintxlibdeclsVptr->V_XSetWindowBorder)
+#endif
+
+#ifndef XSetWindowBorderPixmap
+# define XSetWindowBorderPixmap (*TkintxlibdeclsVptr->V_XSetWindowBorderPixmap)
+#endif
+
+#ifndef XSetWindowBorderWidth
+# define XSetWindowBorderWidth (*TkintxlibdeclsVptr->V_XSetWindowBorderWidth)
+#endif
+
+#ifndef XSetWindowColormap
+# define XSetWindowColormap (*TkintxlibdeclsVptr->V_XSetWindowColormap)
+#endif
+
+#ifndef XStringListToTextProperty
+# define XStringListToTextProperty (*TkintxlibdeclsVptr->V_XStringListToTextProperty)
+#endif
+
+#ifndef XStringToKeysym
+# define XStringToKeysym (*TkintxlibdeclsVptr->V_XStringToKeysym)
+#endif
+
+#ifndef XTranslateCoordinates
+# define XTranslateCoordinates (*TkintxlibdeclsVptr->V_XTranslateCoordinates)
+#endif
+
+#ifndef XUngrabKeyboard
+# define XUngrabKeyboard (*TkintxlibdeclsVptr->V_XUngrabKeyboard)
+#endif
+
+#ifndef XUngrabPointer
+# define XUngrabPointer (*TkintxlibdeclsVptr->V_XUngrabPointer)
+#endif
+
+#ifndef XUnmapWindow
+# define XUnmapWindow (*TkintxlibdeclsVptr->V_XUnmapWindow)
+#endif
+
+#ifndef XWarpPointer
+# define XWarpPointer (*TkintxlibdeclsVptr->V_XWarpPointer)
+#endif
+
+#ifndef XWindowEvent
+# define XWindowEvent (*TkintxlibdeclsVptr->V_XWindowEvent)
+#endif
+
+#ifndef XWithdrawWindow
+# define XWithdrawWindow (*TkintxlibdeclsVptr->V_XWithdrawWindow)
+#endif
+
+#ifndef XmbLookupString
+# define XmbLookupString (*TkintxlibdeclsVptr->V_XmbLookupString)
+#endif
+
+#ifndef _XInitImageFuncPtrs
+# define _XInitImageFuncPtrs (*TkintxlibdeclsVptr->V__XInitImageFuncPtrs)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKINTXLIBDECLS_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.t
new file mode 100644
index 00000000000..fe7722315d0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls.t
@@ -0,0 +1,1521 @@
+#ifdef _TKINTXLIBDECLS
+#ifndef TkPutImage
+#ifdef MAC_OSX_TK
+VFUNC(void,TkPutImage,V_TkPutImage,_ANSI_ARGS_((unsigned long * colors,
+ int ncolors, Display* display, Drawable d,
+ GC gc, XImage* image, int src_x, int src_y,
+ int dest_x, int dest_y, unsigned int width,
+ unsigned int height)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkPutImage,V_TkPutImage,_ANSI_ARGS_((unsigned long * colors,
+ int ncolors, Display* display, Drawable d,
+ GC gc, XImage* image, int src_x, int src_y,
+ int dest_x, int dest_y, unsigned int width,
+ unsigned int height)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,TkPutImage,V_TkPutImage,_ANSI_ARGS_((unsigned long * colors,
+ int ncolors, Display* display, Drawable d,
+ GC gc, XImage* image, int src_x, int src_y,
+ int dest_x, int dest_y, unsigned int width,
+ unsigned int height)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef TkPutImage */
+
+#ifndef XAllocColor
+#ifdef MAC_OSX_TK
+VFUNC(Status,XAllocColor,V_XAllocColor,_ANSI_ARGS_((Display* d, Colormap c,
+ XColor* xp)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Status,XAllocColor,V_XAllocColor,_ANSI_ARGS_((Display* d, Colormap c,
+ XColor* xp)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Status,XAllocColor,V_XAllocColor,_ANSI_ARGS_((Display* d, Colormap c,
+ XColor* xp)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XAllocColor */
+
+#ifndef XBell
+#ifdef MAC_OSX_TK
+VFUNC(void,XBell,V_XBell,_ANSI_ARGS_((Display* d, int i)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XBell,V_XBell,_ANSI_ARGS_((Display* d, int i)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XBell,V_XBell,_ANSI_ARGS_((Display* d, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XBell */
+
+#ifndef XChangeGC
+#ifdef MAC_OSX_TK
+VFUNC(void,XChangeGC,V_XChangeGC,_ANSI_ARGS_((Display * d, GC gc,
+ unsigned long mask, XGCValues * values)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XChangeGC,V_XChangeGC,_ANSI_ARGS_((Display * d, GC gc,
+ unsigned long mask, XGCValues * values)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XChangeGC,V_XChangeGC,_ANSI_ARGS_((Display * d, GC gc,
+ unsigned long mask, XGCValues * values)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XChangeGC */
+
+#ifndef XChangeProperty
+#ifdef MAC_OSX_TK
+VFUNC(void,XChangeProperty,V_XChangeProperty,_ANSI_ARGS_((Display* d, Window w,
+ Atom a1, Atom a2, int i1, int i2,
+ _Xconst unsigned char* c, int i3)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XChangeProperty,V_XChangeProperty,_ANSI_ARGS_((Display* d, Window w,
+ Atom a1, Atom a2, int i1, int i2,
+ _Xconst unsigned char* c, int i3)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XChangeProperty,V_XChangeProperty,_ANSI_ARGS_((Display* d, Window w,
+ Atom a1, Atom a2, int i1, int i2,
+ _Xconst unsigned char* c, int i3)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XChangeProperty */
+
+#ifndef XChangeWindowAttributes
+#ifdef MAC_OSX_TK
+VFUNC(void,XChangeWindowAttributes,V_XChangeWindowAttributes,_ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul,
+ XSetWindowAttributes* x)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XChangeWindowAttributes,V_XChangeWindowAttributes,_ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul,
+ XSetWindowAttributes* x)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XChangeWindowAttributes,V_XChangeWindowAttributes,_ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul,
+ XSetWindowAttributes* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XChangeWindowAttributes */
+
+#ifndef XClearWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XClearWindow,V_XClearWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XClearWindow,V_XClearWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XClearWindow,V_XClearWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XClearWindow */
+
+#ifndef XConfigureWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XConfigureWindow,V_XConfigureWindow,_ANSI_ARGS_((Display* d, Window w,
+ unsigned int i, XWindowChanges* x)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XConfigureWindow,V_XConfigureWindow,_ANSI_ARGS_((Display* d, Window w,
+ unsigned int i, XWindowChanges* x)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XConfigureWindow,V_XConfigureWindow,_ANSI_ARGS_((Display* d, Window w,
+ unsigned int i, XWindowChanges* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XConfigureWindow */
+
+#ifndef XCopyArea
+#ifdef MAC_OSX_TK
+VFUNC(void,XCopyArea,V_XCopyArea,_ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XCopyArea,V_XCopyArea,_ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XCopyArea,V_XCopyArea,_ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCopyArea */
+
+#ifndef XCopyPlane
+#ifdef MAC_OSX_TK
+VFUNC(void,XCopyPlane,V_XCopyPlane,_ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4, unsigned long ul)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XCopyPlane,V_XCopyPlane,_ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4, unsigned long ul)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XCopyPlane,V_XCopyPlane,_ANSI_ARGS_((Display* d, Drawable dr1,
+ Drawable dr2, GC g, int i1, int i2,
+ unsigned int ui1, unsigned int ui2, int i3,
+ int i4, unsigned long ul)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCopyPlane */
+
+#ifndef XCreateBitmapFromData
+#ifdef MAC_OSX_TK
+VFUNC(Pixmap,XCreateBitmapFromData,V_XCreateBitmapFromData,_ANSI_ARGS_((Display* display,
+ Drawable d, _Xconst char* data,
+ unsigned int width, unsigned int height)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Pixmap,XCreateBitmapFromData,V_XCreateBitmapFromData,_ANSI_ARGS_((Display* display,
+ Drawable d, _Xconst char* data,
+ unsigned int width, unsigned int height)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Pixmap,XCreateBitmapFromData,V_XCreateBitmapFromData,_ANSI_ARGS_((Display* display,
+ Drawable d, _Xconst char* data,
+ unsigned int width, unsigned int height)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCreateBitmapFromData */
+
+#ifndef XCreateColormap
+#ifdef MAC_OSX_TK
+VFUNC(Colormap,XCreateColormap,V_XCreateColormap,_ANSI_ARGS_((Display* d, Window w,
+ Visual* v, int i)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Colormap,XCreateColormap,V_XCreateColormap,_ANSI_ARGS_((Display* d, Window w,
+ Visual* v, int i)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Colormap,XCreateColormap,V_XCreateColormap,_ANSI_ARGS_((Display* d, Window w,
+ Visual* v, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCreateColormap */
+
+#ifndef XCreateGC
+#ifdef MAC_OSX_TK
+VFUNC(GC,XCreateGC,V_XCreateGC,_ANSI_ARGS_((Display* display, Drawable d,
+ unsigned long valuemask, XGCValues* values)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(GC,XCreateGC,V_XCreateGC,_ANSI_ARGS_((Display* display, Drawable d,
+ unsigned long valuemask, XGCValues* values)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(GC,XCreateGC,V_XCreateGC,_ANSI_ARGS_((Display* display, Drawable d,
+ unsigned long valuemask, XGCValues* values)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCreateGC */
+
+#ifndef XCreateGlyphCursor
+#ifdef __WIN32__
+VFUNC(Cursor,XCreateGlyphCursor,V_XCreateGlyphCursor,_ANSI_ARGS_((Display* d, Font f1,
+ Font f2, unsigned int ui1, unsigned int ui2,
+ XColor* x1, XColor* x2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCreateGlyphCursor */
+
+#ifndef XCreateIC
+#ifdef MAC_OSX_TK
+VFUNC(XIC,XCreateIC,V_XCreateIC,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(XIC,XCreateIC,V_XCreateIC,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(XIC,XCreateIC,V_XCreateIC,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCreateIC */
+
+#ifndef XCreateImage
+#ifdef MAC_OSX_TK
+VFUNC(XImage *,XCreateImage,V_XCreateImage,_ANSI_ARGS_((Display* d, Visual* v,
+ unsigned int ui1, int i1, int i2, char* cp,
+ unsigned int ui2, unsigned int ui3, int i3,
+ int i4)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(XImage *,XCreateImage,V_XCreateImage,_ANSI_ARGS_((Display* d, Visual* v,
+ unsigned int ui1, int i1, int i2, char* cp,
+ unsigned int ui2, unsigned int ui3, int i3,
+ int i4)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(XImage *,XCreateImage,V_XCreateImage,_ANSI_ARGS_((Display* d, Visual* v,
+ unsigned int ui1, int i1, int i2, char* cp,
+ unsigned int ui2, unsigned int ui3, int i3,
+ int i4)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCreateImage */
+
+#ifndef XCreatePixmapCursor
+#ifdef __WIN32__
+VFUNC(Cursor,XCreatePixmapCursor,V_XCreatePixmapCursor,_ANSI_ARGS_((Display* d,
+ Pixmap p1, Pixmap p2, XColor* x1, XColor* x2,
+ unsigned int ui1, unsigned int ui2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XCreatePixmapCursor */
+
+#ifndef XDefineCursor
+#ifdef MAC_OSX_TK
+VFUNC(void,XDefineCursor,V_XDefineCursor,_ANSI_ARGS_((Display* d, Window w,
+ Cursor c)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDefineCursor,V_XDefineCursor,_ANSI_ARGS_((Display* d, Window w,
+ Cursor c)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XDefineCursor,V_XDefineCursor,_ANSI_ARGS_((Display* d, Window w,
+ Cursor c)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDefineCursor */
+
+#ifndef XDeleteProperty
+#ifdef __WIN32__
+VFUNC(void,XDeleteProperty,V_XDeleteProperty,_ANSI_ARGS_((Display* d, Window w,
+ Atom a)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDeleteProperty */
+
+#ifndef XDestroyIC
+#ifdef __WIN32__
+VFUNC(void,XDestroyIC,V_XDestroyIC,_ANSI_ARGS_((XIC x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDestroyIC */
+
+#ifndef XDestroyWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XDestroyWindow,V_XDestroyWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDestroyWindow,V_XDestroyWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XDestroyWindow,V_XDestroyWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDestroyWindow */
+
+#ifndef XDrawArc
+#ifdef MAC_OSX_TK
+VFUNC(void,XDrawArc,V_XDrawArc,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDrawArc,V_XDrawArc,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XDrawArc,V_XDrawArc,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDrawArc */
+
+#ifndef XDrawLine
+#ifdef MAC_OSX_TK
+VFUNC(void,XDrawLine,V_XDrawLine,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int x1, int y1, int x2, int y2)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDrawLine,V_XDrawLine,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int x1, int y1, int x2, int y2)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XDrawLine,V_XDrawLine,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int x1, int y1, int x2, int y2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDrawLine */
+
+#ifndef XDrawLines
+#ifdef MAC_OSX_TK
+VFUNC(void,XDrawLines,V_XDrawLines,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDrawLines,V_XDrawLines,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XDrawLines,V_XDrawLines,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDrawLines */
+
+#ifndef XDrawPoint
+#ifdef MAC_OSX_TK
+VFUNC(void,XDrawPoint,V_XDrawPoint,_ANSI_ARGS_((Display* display, Drawable d,
+ GC gc, int x, int y)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDrawPoint,V_XDrawPoint,_ANSI_ARGS_((Display* display, Drawable d,
+ GC gc, int x, int y)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef XDrawPoint */
+
+#ifndef XDrawPoints
+#ifdef MAC_OSX_TK
+VFUNC(void,XDrawPoints,V_XDrawPoints,_ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, XPoint * points,
+ int npoints, int mode)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDrawPoints,V_XDrawPoints,_ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, XPoint * points,
+ int npoints, int mode)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef XDrawPoints */
+
+#ifndef XDrawRectangle
+#ifdef MAC_OSX_TK
+VFUNC(void,XDrawRectangle,V_XDrawRectangle,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, int i1, int i2, unsigned int ui1,
+ unsigned int ui2)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDrawRectangle,V_XDrawRectangle,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, int i1, int i2, unsigned int ui1,
+ unsigned int ui2)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XDrawRectangle,V_XDrawRectangle,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, int i1, int i2, unsigned int ui1,
+ unsigned int ui2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XDrawRectangle */
+
+#ifndef XDrawSegments
+#ifdef MAC_OSX_TK
+VFUNC(void,XDrawSegments,V_XDrawSegments,_ANSI_ARGS_((Display * display,
+ Drawable d, GC gc, XSegment * segments,
+ int nsegments)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XDrawSegments,V_XDrawSegments,_ANSI_ARGS_((Display * display,
+ Drawable d, GC gc, XSegment * segments,
+ int nsegments)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef XDrawSegments */
+
+#ifndef XFillArc
+#ifdef MAC_OSX_TK
+VFUNC(void,XFillArc,V_XFillArc,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFillArc,V_XFillArc,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFillArc,V_XFillArc,_ANSI_ARGS_((Display* d, Drawable dr, GC g,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, int i3, int i4)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFillArc */
+
+#ifndef XFillPolygon
+#ifdef MAC_OSX_TK
+VFUNC(void,XFillPolygon,V_XFillPolygon,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2, int i3)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFillPolygon,V_XFillPolygon,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2, int i3)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFillPolygon,V_XFillPolygon,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XPoint* x, int i1, int i2, int i3)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFillPolygon */
+
+#ifndef XFillRectangle
+#ifdef MAC_OSX_TK
+VFUNC(void,XFillRectangle,V_XFillRectangle,_ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, int x, int y,
+ unsigned int width, unsigned int height)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFillRectangle,V_XFillRectangle,_ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, int x, int y,
+ unsigned int width, unsigned int height)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFillRectangle,V_XFillRectangle,_ANSI_ARGS_((Display* display,
+ Drawable d, GC gc, int x, int y,
+ unsigned int width, unsigned int height)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFillRectangle */
+
+#ifndef XFillRectangles
+#ifdef MAC_OSX_TK
+VFUNC(void,XFillRectangles,V_XFillRectangles,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XRectangle* x, int i)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFillRectangles,V_XFillRectangles,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XRectangle* x, int i)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFillRectangles,V_XFillRectangles,_ANSI_ARGS_((Display* d, Drawable dr,
+ GC g, XRectangle* x, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFillRectangles */
+
+#ifndef XFilterEvent
+#ifdef __WIN32__
+VFUNC(Bool,XFilterEvent,V_XFilterEvent,_ANSI_ARGS_((XEvent* x, Window w)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFilterEvent */
+
+#ifndef XForceScreenSaver
+#ifdef MAC_OSX_TK
+VFUNC(void,XForceScreenSaver,V_XForceScreenSaver,_ANSI_ARGS_((Display* display,
+ int mode)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XForceScreenSaver,V_XForceScreenSaver,_ANSI_ARGS_((Display* display,
+ int mode)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XForceScreenSaver,V_XForceScreenSaver,_ANSI_ARGS_((Display* d, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XForceScreenSaver */
+
+#ifndef XFreeColormap
+#ifdef MAC_OSX_TK
+VFUNC(void,XFreeColormap,V_XFreeColormap,_ANSI_ARGS_((Display* d, Colormap c)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFreeColormap,V_XFreeColormap,_ANSI_ARGS_((Display* d, Colormap c)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFreeColormap,V_XFreeColormap,_ANSI_ARGS_((Display* d, Colormap c)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFreeColormap */
+
+#ifndef XFreeColors
+#ifdef MAC_OSX_TK
+VFUNC(void,XFreeColors,V_XFreeColors,_ANSI_ARGS_((Display* d, Colormap c,
+ unsigned long* ulp, int i, unsigned long ul)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFreeColors,V_XFreeColors,_ANSI_ARGS_((Display* d, Colormap c,
+ unsigned long* ulp, int i, unsigned long ul)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFreeColors,V_XFreeColors,_ANSI_ARGS_((Display* d, Colormap c,
+ unsigned long* ulp, int i, unsigned long ul)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFreeColors */
+
+#ifndef XFreeCursor
+#ifdef __WIN32__
+VFUNC(void,XFreeCursor,V_XFreeCursor,_ANSI_ARGS_((Display* d, Cursor c)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFreeCursor */
+
+#ifndef XFreeGC
+#ifdef MAC_OSX_TK
+VFUNC(void,XFreeGC,V_XFreeGC,_ANSI_ARGS_((Display* display, GC gc)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFreeGC,V_XFreeGC,_ANSI_ARGS_((Display* display, GC gc)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFreeGC,V_XFreeGC,_ANSI_ARGS_((Display* display, GC gc)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFreeGC */
+
+#ifndef XFreeModifiermap
+#ifdef MAC_OSX_TK
+VFUNC(void,XFreeModifiermap,V_XFreeModifiermap,_ANSI_ARGS_((XModifierKeymap* x)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XFreeModifiermap,V_XFreeModifiermap,_ANSI_ARGS_((XModifierKeymap* x)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XFreeModifiermap,V_XFreeModifiermap,_ANSI_ARGS_((XModifierKeymap* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XFreeModifiermap */
+
+#ifndef XGContextFromGC
+#ifdef MAC_OSX_TK
+VFUNC(GContext,XGContextFromGC,V_XGContextFromGC,_ANSI_ARGS_((GC g)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(GContext,XGContextFromGC,V_XGContextFromGC,_ANSI_ARGS_((GC g)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(GContext,XGContextFromGC,V_XGContextFromGC,_ANSI_ARGS_((GC g)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGContextFromGC */
+
+#ifndef XGetAtomName
+#ifdef MAC_OSX_TK
+VFUNC(char *,XGetAtomName,V_XGetAtomName,_ANSI_ARGS_((Display* d, Atom a)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(char *,XGetAtomName,V_XGetAtomName,_ANSI_ARGS_((Display* d, Atom a)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(char *,XGetAtomName,V_XGetAtomName,_ANSI_ARGS_((Display* d, Atom a)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetAtomName */
+
+#ifndef XGetGeometry
+#ifdef MAC_OSX_TK
+VFUNC(Status,XGetGeometry,V_XGetGeometry,_ANSI_ARGS_((Display* d, Drawable dr,
+ Window* w, int* i1, int* i2,
+ unsigned int* ui1, unsigned int* ui2,
+ unsigned int* ui3, unsigned int* ui4)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Status,XGetGeometry,V_XGetGeometry,_ANSI_ARGS_((Display* d, Drawable dr,
+ Window* w, int* i1, int* i2,
+ unsigned int* ui1, unsigned int* ui2,
+ unsigned int* ui3, unsigned int* ui4)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Status,XGetGeometry,V_XGetGeometry,_ANSI_ARGS_((Display* d, Drawable dr,
+ Window* w, int* i1, int* i2,
+ unsigned int* ui1, unsigned int* ui2,
+ unsigned int* ui3, unsigned int* ui4)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetGeometry */
+
+#ifndef XGetImage
+#ifdef MAC_OSX_TK
+VFUNC(XImage *,XGetImage,V_XGetImage,_ANSI_ARGS_((Display* d, Drawable dr,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, unsigned long ul, int i3)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(XImage *,XGetImage,V_XGetImage,_ANSI_ARGS_((Display* d, Drawable dr,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, unsigned long ul, int i3)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(XImage *,XGetImage,V_XGetImage,_ANSI_ARGS_((Display* d, Drawable dr,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2, unsigned long ul, int i3)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetImage */
+
+#ifndef XGetInputFocus
+#ifdef __WIN32__
+VFUNC(void,XGetInputFocus,V_XGetInputFocus,_ANSI_ARGS_((Display* d, Window* w,
+ int* i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetInputFocus */
+
+#ifndef XGetModifierMapping
+#ifdef MAC_OSX_TK
+VFUNC(XModifierKeymap*,XGetModifierMapping,V_XGetModifierMapping,_ANSI_ARGS_((Display* d)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(XModifierKeymap*,XGetModifierMapping,V_XGetModifierMapping,_ANSI_ARGS_((Display* d)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(XModifierKeymap*,XGetModifierMapping,V_XGetModifierMapping,_ANSI_ARGS_((Display* d)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetModifierMapping */
+
+#ifndef XGetVisualInfo
+#ifdef MAC_OSX_TK
+VFUNC(XVisualInfo *,XGetVisualInfo,V_XGetVisualInfo,_ANSI_ARGS_((Display* display,
+ long vinfo_mask, XVisualInfo* vinfo_template,
+ int* nitems_return)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(XVisualInfo *,XGetVisualInfo,V_XGetVisualInfo,_ANSI_ARGS_((Display* display,
+ long vinfo_mask, XVisualInfo* vinfo_template,
+ int* nitems_return)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(XVisualInfo *,XGetVisualInfo,V_XGetVisualInfo,_ANSI_ARGS_((Display* display,
+ long vinfo_mask, XVisualInfo* vinfo_template,
+ int* nitems_return)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetVisualInfo */
+
+#ifndef XGetWMColormapWindows
+#ifdef __WIN32__
+VFUNC(Status,XGetWMColormapWindows,V_XGetWMColormapWindows,_ANSI_ARGS_((Display* d,
+ Window w, Window** wpp, int* ip)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetWMColormapWindows */
+
+#ifndef XGetWindowAttributes
+#ifdef __WIN32__
+VFUNC(Status,XGetWindowAttributes,V_XGetWindowAttributes,_ANSI_ARGS_((Display* d,
+ Window w, XWindowAttributes* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetWindowAttributes */
+
+#ifndef XGetWindowProperty
+#ifdef MAC_OSX_TK
+VFUNC(int,XGetWindowProperty,V_XGetWindowProperty,_ANSI_ARGS_((Display* d, Window w,
+ Atom a1, long l1, long l2, Bool b, Atom a2,
+ Atom* ap, int* ip, unsigned long* ulp1,
+ unsigned long* ulp2, unsigned char** cpp)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,XGetWindowProperty,V_XGetWindowProperty,_ANSI_ARGS_((Display* d, Window w,
+ Atom a1, long l1, long l2, Bool b, Atom a2,
+ Atom* ap, int* ip, unsigned long* ulp1,
+ unsigned long* ulp2, unsigned char** cpp)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(int,XGetWindowProperty,V_XGetWindowProperty,_ANSI_ARGS_((Display* d, Window w,
+ Atom a1, long l1, long l2, Bool b, Atom a2,
+ Atom* ap, int* ip, unsigned long* ulp1,
+ unsigned long* ulp2, unsigned char** cpp)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGetWindowProperty */
+
+#ifndef XGrabKeyboard
+#ifdef MAC_OSX_TK
+VFUNC(int,XGrabKeyboard,V_XGrabKeyboard,_ANSI_ARGS_((Display* d, Window w,
+ Bool b, int i1, int i2, Time t)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,XGrabKeyboard,V_XGrabKeyboard,_ANSI_ARGS_((Display* d, Window w,
+ Bool b, int i1, int i2, Time t)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(int,XGrabKeyboard,V_XGrabKeyboard,_ANSI_ARGS_((Display* d, Window w,
+ Bool b, int i1, int i2, Time t)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGrabKeyboard */
+
+#ifndef XGrabPointer
+#ifdef MAC_OSX_TK
+VFUNC(int,XGrabPointer,V_XGrabPointer,_ANSI_ARGS_((Display* d, Window w1,
+ Bool b, unsigned int ui, int i1, int i2,
+ Window w2, Cursor c, Time t)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,XGrabPointer,V_XGrabPointer,_ANSI_ARGS_((Display* d, Window w1,
+ Bool b, unsigned int ui, int i1, int i2,
+ Window w2, Cursor c, Time t)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(int,XGrabPointer,V_XGrabPointer,_ANSI_ARGS_((Display* d, Window w1,
+ Bool b, unsigned int ui, int i1, int i2,
+ Window w2, Cursor c, Time t)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XGrabPointer */
+
+#ifndef XIconifyWindow
+#ifdef __WIN32__
+VFUNC(Status,XIconifyWindow,V_XIconifyWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XIconifyWindow */
+
+#ifndef XInternAtom
+#ifdef MAC_OSX_TK
+VFUNC(Atom,XInternAtom,V_XInternAtom,_ANSI_ARGS_((Display* display,
+ _Xconst char* atom_name, Bool only_if_exists)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Atom,XInternAtom,V_XInternAtom,_ANSI_ARGS_((Display* display,
+ _Xconst char* atom_name, Bool only_if_exists)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Atom,XInternAtom,V_XInternAtom,_ANSI_ARGS_((Display* display,
+ _Xconst char* atom_name, Bool only_if_exists)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XInternAtom */
+
+#ifndef XKeycodeToKeysym
+#ifdef MAC_OSX_TK
+VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display* d, KeyCode k,
+ int i)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display* d, KeyCode k,
+ int i)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display* d,
+ unsigned int k, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XKeycodeToKeysym */
+
+#ifndef XKeysymToKeycode
+#ifdef MAC_OSX_TK
+VFUNC(KeyCode,XKeysymToKeycode,V_XKeysymToKeycode,_ANSI_ARGS_((Display* d, KeySym k)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(KeyCode,XKeysymToKeycode,V_XKeysymToKeycode,_ANSI_ARGS_((Display* d, KeySym k)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(KeyCode,XKeysymToKeycode,V_XKeysymToKeycode,_ANSI_ARGS_((Display* d, KeySym k)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XKeysymToKeycode */
+
+#ifndef XKeysymToString
+#ifdef MAC_OSX_TK
+VFUNC(char *,XKeysymToString,V_XKeysymToString,_ANSI_ARGS_((KeySym k)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(char *,XKeysymToString,V_XKeysymToString,_ANSI_ARGS_((KeySym k)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(char *,XKeysymToString,V_XKeysymToString,_ANSI_ARGS_((KeySym k)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XKeysymToString */
+
+#ifndef XListHosts
+#ifdef __WIN32__
+VFUNC(XHostAddress *,XListHosts,V_XListHosts,_ANSI_ARGS_((Display* d, int* i, Bool* b)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XListHosts */
+
+#ifndef XLookupColor
+#ifdef __WIN32__
+VFUNC(Status,XLookupColor,V_XLookupColor,_ANSI_ARGS_((Display* d, Colormap c1,
+ _Xconst char* c2, XColor* x1, XColor* x2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XLookupColor */
+
+#ifndef XMapWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XMapWindow,V_XMapWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XMapWindow,V_XMapWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XMapWindow,V_XMapWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XMapWindow */
+
+#ifndef XMoveResizeWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XMoveResizeWindow,V_XMoveResizeWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XMoveResizeWindow,V_XMoveResizeWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XMoveResizeWindow,V_XMoveResizeWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2, unsigned int ui1,
+ unsigned int ui2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XMoveResizeWindow */
+
+#ifndef XMoveWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XMoveWindow,V_XMoveWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XMoveWindow,V_XMoveWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XMoveWindow,V_XMoveWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i1, int i2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XMoveWindow */
+
+#ifndef XNextEvent
+#ifdef __WIN32__
+VFUNC(void,XNextEvent,V_XNextEvent,_ANSI_ARGS_((Display* d, XEvent* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XNextEvent */
+
+#ifndef XParseColor
+#ifdef MAC_OSX_TK
+VFUNC(Status,XParseColor,V_XParseColor,_ANSI_ARGS_((Display * display,
+ Colormap map, _Xconst char* spec,
+ XColor * colorPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Status,XParseColor,V_XParseColor,_ANSI_ARGS_((Display * display,
+ Colormap map, _Xconst char* spec,
+ XColor * colorPtr)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Status,XParseColor,V_XParseColor,_ANSI_ARGS_((Display * display,
+ Colormap map, _Xconst char* spec,
+ XColor * colorPtr)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XParseColor */
+
+#ifndef XPutBackEvent
+#ifdef __WIN32__
+VFUNC(void,XPutBackEvent,V_XPutBackEvent,_ANSI_ARGS_((Display* d, XEvent* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XPutBackEvent */
+
+#ifndef XQueryColor
+#ifdef MAC_OSX_TK
+VFUNC(void,XQueryColor,V_XQueryColor,_ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * def_in_out)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XQueryColor,V_XQueryColor,_ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * def_in_out)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef XQueryColor */
+
+#ifndef XQueryColors
+#ifdef MAC_OSX_TK
+VFUNC(void,XQueryColors,V_XQueryColors,_ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * defs_in_out,
+ int ncolors)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XQueryColors,V_XQueryColors,_ANSI_ARGS_((Display * display,
+ Colormap colormap, XColor * defs_in_out,
+ int ncolors)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XQueryColors,V_XQueryColors,_ANSI_ARGS_((Display* d, Colormap c,
+ XColor* x, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XQueryColors */
+
+#ifndef XQueryPointer
+#ifdef MAC_OSX_TK
+VFUNC(Bool,XQueryPointer,V_XQueryPointer,_ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, int* i1, int* i2,
+ int* i3, int* i4, unsigned int* ui)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Bool,XQueryPointer,V_XQueryPointer,_ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, int* i1, int* i2,
+ int* i3, int* i4, unsigned int* ui)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Bool,XQueryPointer,V_XQueryPointer,_ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, int* i1, int* i2,
+ int* i3, int* i4, unsigned int* ui)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XQueryPointer */
+
+#ifndef XQueryTree
+#ifdef MAC_OSX_TK
+VFUNC(Status,XQueryTree,V_XQueryTree,_ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, Window** w4,
+ unsigned int* ui)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Status,XQueryTree,V_XQueryTree,_ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, Window** w4,
+ unsigned int* ui)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Status,XQueryTree,V_XQueryTree,_ANSI_ARGS_((Display* d, Window w1,
+ Window* w2, Window* w3, Window** w4,
+ unsigned int* ui)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XQueryTree */
+
+#ifndef XRaiseWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XRaiseWindow,V_XRaiseWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XRaiseWindow,V_XRaiseWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XRaiseWindow,V_XRaiseWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XRaiseWindow */
+
+#ifndef XRefreshKeyboardMapping
+#ifdef MAC_OSX_TK
+VFUNC(void,XRefreshKeyboardMapping,V_XRefreshKeyboardMapping,_ANSI_ARGS_((
+ XMappingEvent* x)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XRefreshKeyboardMapping,V_XRefreshKeyboardMapping,_ANSI_ARGS_((
+ XMappingEvent* x)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XRefreshKeyboardMapping,V_XRefreshKeyboardMapping,_ANSI_ARGS_((
+ XMappingEvent* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XRefreshKeyboardMapping */
+
+#ifndef XResizeWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XResizeWindow,V_XResizeWindow,_ANSI_ARGS_((Display* d, Window w,
+ unsigned int ui1, unsigned int ui2)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XResizeWindow,V_XResizeWindow,_ANSI_ARGS_((Display* d, Window w,
+ unsigned int ui1, unsigned int ui2)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XResizeWindow,V_XResizeWindow,_ANSI_ARGS_((Display* d, Window w,
+ unsigned int ui1, unsigned int ui2)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XResizeWindow */
+
+#ifndef XRootWindow
+#ifdef MAC_OSX_TK
+VFUNC(Window,XRootWindow,V_XRootWindow,_ANSI_ARGS_((Display* d, int i)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Window,XRootWindow,V_XRootWindow,_ANSI_ARGS_((Display* d, int i)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Window,XRootWindow,V_XRootWindow,_ANSI_ARGS_((Display* d, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XRootWindow */
+
+#ifndef XSelectInput
+#ifdef MAC_OSX_TK
+VFUNC(void,XSelectInput,V_XSelectInput,_ANSI_ARGS_((Display* d, Window w,
+ long l)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSelectInput,V_XSelectInput,_ANSI_ARGS_((Display* d, Window w,
+ long l)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSelectInput,V_XSelectInput,_ANSI_ARGS_((Display* d, Window w,
+ long l)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSelectInput */
+
+#ifndef XSendEvent
+#ifdef MAC_OSX_TK
+VFUNC(Status,XSendEvent,V_XSendEvent,_ANSI_ARGS_((Display* d, Window w, Bool b,
+ long l, XEvent* x)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Status,XSendEvent,V_XSendEvent,_ANSI_ARGS_((Display* d, Window w, Bool b,
+ long l, XEvent* x)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Status,XSendEvent,V_XSendEvent,_ANSI_ARGS_((Display* d, Window w, Bool b,
+ long l, XEvent* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSendEvent */
+
+#ifndef XSetArcMode
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetArcMode,V_XSetArcMode,_ANSI_ARGS_((Display * display, GC gc,
+ int arc_mode)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetArcMode,V_XSetArcMode,_ANSI_ARGS_((Display * display, GC gc,
+ int arc_mode)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetArcMode,V_XSetArcMode,_ANSI_ARGS_((Display * display, GC gc,
+ int arc_mode)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetArcMode */
+
+#ifndef XSetBackground
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetBackground,V_XSetBackground,_ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetBackground,V_XSetBackground,_ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetBackground,V_XSetBackground,_ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetBackground */
+
+#ifndef XSetClipMask
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetClipMask,V_XSetClipMask,_ANSI_ARGS_((Display* display, GC gc,
+ Pixmap pixmap)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetClipMask,V_XSetClipMask,_ANSI_ARGS_((Display* display, GC gc,
+ Pixmap pixmap)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetClipMask,V_XSetClipMask,_ANSI_ARGS_((Display* display, GC gc,
+ Pixmap pixmap)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetClipMask */
+
+#ifndef XSetClipOrigin
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetClipOrigin,V_XSetClipOrigin,_ANSI_ARGS_((Display* display, GC gc,
+ int clip_x_origin, int clip_y_origin)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetClipOrigin,V_XSetClipOrigin,_ANSI_ARGS_((Display* display, GC gc,
+ int clip_x_origin, int clip_y_origin)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetClipOrigin,V_XSetClipOrigin,_ANSI_ARGS_((Display* display, GC gc,
+ int clip_x_origin, int clip_y_origin)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetClipOrigin */
+
+#ifndef XSetCommand
+#ifdef __WIN32__
+VFUNC(void,XSetCommand,V_XSetCommand,_ANSI_ARGS_((Display* d, Window w,
+ CONST char** c, int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetCommand */
+
+#ifndef XSetDashes
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetDashes,V_XSetDashes,_ANSI_ARGS_((Display* display, GC gc,
+ int dash_offset, _Xconst char* dash_list,
+ int n)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetDashes,V_XSetDashes,_ANSI_ARGS_((Display* display, GC gc,
+ int dash_offset, _Xconst char* dash_list,
+ int n)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetDashes,V_XSetDashes,_ANSI_ARGS_((Display* display, GC gc,
+ int dash_offset, _Xconst char* dash_list,
+ int n)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetDashes */
+
+#ifndef XSetErrorHandler
+#ifdef MAC_OSX_TK
+VFUNC(XErrorHandler,XSetErrorHandler,V_XSetErrorHandler,_ANSI_ARGS_((XErrorHandler x)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(XErrorHandler,XSetErrorHandler,V_XSetErrorHandler,_ANSI_ARGS_((XErrorHandler x)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(XErrorHandler,XSetErrorHandler,V_XSetErrorHandler,_ANSI_ARGS_((XErrorHandler x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetErrorHandler */
+
+#ifndef XSetFillRule
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetFillRule,V_XSetFillRule,_ANSI_ARGS_((Display * display, GC gc,
+ int fill_rule)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetFillRule,V_XSetFillRule,_ANSI_ARGS_((Display * display, GC gc,
+ int fill_rule)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetFillRule,V_XSetFillRule,_ANSI_ARGS_((Display * display, GC gc,
+ int fill_rule)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetFillRule */
+
+#ifndef XSetFillStyle
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetFillStyle,V_XSetFillStyle,_ANSI_ARGS_((Display * display, GC gc,
+ int fill_style)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetFillStyle,V_XSetFillStyle,_ANSI_ARGS_((Display * display, GC gc,
+ int fill_style)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetFillStyle,V_XSetFillStyle,_ANSI_ARGS_((Display * display, GC gc,
+ int fill_style)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetFillStyle */
+
+#ifndef XSetFont
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetFont,V_XSetFont,_ANSI_ARGS_((Display * display, GC gc,
+ Font font)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetFont,V_XSetFont,_ANSI_ARGS_((Display * display, GC gc,
+ Font font)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetFont,V_XSetFont,_ANSI_ARGS_((Display * display, GC gc,
+ Font font)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetFont */
+
+#ifndef XSetForeground
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetForeground,V_XSetForeground,_ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetForeground,V_XSetForeground,_ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetForeground,V_XSetForeground,_ANSI_ARGS_((Display* display, GC gc,
+ unsigned long foreground)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetForeground */
+
+#ifndef XSetFunction
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetFunction,V_XSetFunction,_ANSI_ARGS_((Display * display, GC gc,
+ int function)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetFunction,V_XSetFunction,_ANSI_ARGS_((Display * display, GC gc,
+ int function)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetFunction,V_XSetFunction,_ANSI_ARGS_((Display * display, GC gc,
+ int function)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetFunction */
+
+#ifndef XSetIconName
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetIconName,V_XSetIconName,_ANSI_ARGS_((Display* d, Window w,
+ _Xconst char* c)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetIconName,V_XSetIconName,_ANSI_ARGS_((Display* d, Window w,
+ _Xconst char* c)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetIconName,V_XSetIconName,_ANSI_ARGS_((Display* d, Window w,
+ _Xconst char* c)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetIconName */
+
+#ifndef XSetInputFocus
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetInputFocus,V_XSetInputFocus,_ANSI_ARGS_((Display* d, Window w,
+ int i, Time t)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetInputFocus,V_XSetInputFocus,_ANSI_ARGS_((Display* d, Window w,
+ int i, Time t)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetInputFocus,V_XSetInputFocus,_ANSI_ARGS_((Display* d, Window w,
+ int i, Time t)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetInputFocus */
+
+#ifndef XSetLineAttributes
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetLineAttributes,V_XSetLineAttributes,_ANSI_ARGS_((Display * display,
+ GC gc, unsigned int line_width,
+ int line_style, int cap_style,
+ int join_style)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetLineAttributes,V_XSetLineAttributes,_ANSI_ARGS_((Display * display,
+ GC gc, unsigned int line_width,
+ int line_style, int cap_style,
+ int join_style)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetLineAttributes,V_XSetLineAttributes,_ANSI_ARGS_((Display * display,
+ GC gc, unsigned int line_width,
+ int line_style, int cap_style,
+ int join_style)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetLineAttributes */
+
+#ifndef XSetSelectionOwner
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetSelectionOwner,V_XSetSelectionOwner,_ANSI_ARGS_((Display* d, Atom a,
+ Window w, Time t)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetSelectionOwner,V_XSetSelectionOwner,_ANSI_ARGS_((Display* d, Atom a,
+ Window w, Time t)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetSelectionOwner,V_XSetSelectionOwner,_ANSI_ARGS_((Display* d, Atom a,
+ Window w, Time t)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetSelectionOwner */
+
+#ifndef XSetStipple
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetStipple,V_XSetStipple,_ANSI_ARGS_((Display * display, GC gc,
+ Pixmap stipple)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetStipple,V_XSetStipple,_ANSI_ARGS_((Display * display, GC gc,
+ Pixmap stipple)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetStipple,V_XSetStipple,_ANSI_ARGS_((Display * display, GC gc,
+ Pixmap stipple)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetStipple */
+
+#ifndef XSetTSOrigin
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetTSOrigin,V_XSetTSOrigin,_ANSI_ARGS_((Display* display, GC gc,
+ int ts_x_origin, int ts_y_origin)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetTSOrigin,V_XSetTSOrigin,_ANSI_ARGS_((Display* display, GC gc,
+ int ts_x_origin, int ts_y_origin)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetTSOrigin,V_XSetTSOrigin,_ANSI_ARGS_((Display* display, GC gc,
+ int ts_x_origin, int ts_y_origin)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetTSOrigin */
+
+#ifndef XSetWMClientMachine
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetWMClientMachine,V_XSetWMClientMachine,_ANSI_ARGS_((Display* display,
+ Window w, XTextProperty* text_prop)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetWMClientMachine,V_XSetWMClientMachine,_ANSI_ARGS_((Display* display,
+ Window w, XTextProperty* text_prop)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetWMClientMachine,V_XSetWMClientMachine,_ANSI_ARGS_((Display* display,
+ Window w, XTextProperty* text_prop)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetWMClientMachine */
+
+#ifndef XSetWindowBackground
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetWindowBackground,V_XSetWindowBackground,_ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetWindowBackground,V_XSetWindowBackground,_ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetWindowBackground,V_XSetWindowBackground,_ANSI_ARGS_((Display* d,
+ Window w, unsigned long ul)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetWindowBackground */
+
+#ifndef XSetWindowBackgroundPixmap
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetWindowBackgroundPixmap,V_XSetWindowBackgroundPixmap,_ANSI_ARGS_((Display* d,
+ Window w, Pixmap p)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetWindowBackgroundPixmap,V_XSetWindowBackgroundPixmap,_ANSI_ARGS_((Display* d,
+ Window w, Pixmap p)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetWindowBackgroundPixmap,V_XSetWindowBackgroundPixmap,_ANSI_ARGS_((Display* d,
+ Window w, Pixmap p)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetWindowBackgroundPixmap */
+
+#ifndef XSetWindowBorder
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetWindowBorder,V_XSetWindowBorder,_ANSI_ARGS_((Display* d, Window w,
+ unsigned long ul)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetWindowBorder,V_XSetWindowBorder,_ANSI_ARGS_((Display* d, Window w,
+ unsigned long ul)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetWindowBorder,V_XSetWindowBorder,_ANSI_ARGS_((Display* d, Window w,
+ unsigned long ul)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetWindowBorder */
+
+#ifndef XSetWindowBorderPixmap
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetWindowBorderPixmap,V_XSetWindowBorderPixmap,_ANSI_ARGS_((Display* d,
+ Window w, Pixmap p)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetWindowBorderPixmap,V_XSetWindowBorderPixmap,_ANSI_ARGS_((Display* d,
+ Window w, Pixmap p)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetWindowBorderPixmap,V_XSetWindowBorderPixmap,_ANSI_ARGS_((Display* d,
+ Window w, Pixmap p)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetWindowBorderPixmap */
+
+#ifndef XSetWindowBorderWidth
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetWindowBorderWidth,V_XSetWindowBorderWidth,_ANSI_ARGS_((Display* d,
+ Window w, unsigned int ui)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetWindowBorderWidth,V_XSetWindowBorderWidth,_ANSI_ARGS_((Display* d,
+ Window w, unsigned int ui)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetWindowBorderWidth,V_XSetWindowBorderWidth,_ANSI_ARGS_((Display* d,
+ Window w, unsigned int ui)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetWindowBorderWidth */
+
+#ifndef XSetWindowColormap
+#ifdef MAC_OSX_TK
+VFUNC(void,XSetWindowColormap,V_XSetWindowColormap,_ANSI_ARGS_((Display* d, Window w,
+ Colormap c)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XSetWindowColormap,V_XSetWindowColormap,_ANSI_ARGS_((Display* d, Window w,
+ Colormap c)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XSetWindowColormap,V_XSetWindowColormap,_ANSI_ARGS_((Display* d, Window w,
+ Colormap c)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XSetWindowColormap */
+
+#ifndef XStringListToTextProperty
+#ifdef MAC_OSX_TK
+VFUNC(Status,XStringListToTextProperty,V_XStringListToTextProperty,_ANSI_ARGS_((char** list,
+ int count, XTextProperty* text_prop_return)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(Status,XStringListToTextProperty,V_XStringListToTextProperty,_ANSI_ARGS_((char** list,
+ int count, XTextProperty* text_prop_return)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(Status,XStringListToTextProperty,V_XStringListToTextProperty,_ANSI_ARGS_((char** list,
+ int count, XTextProperty* text_prop_return)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XStringListToTextProperty */
+
+#ifndef XStringToKeysym
+#ifdef MAC_OSX_TK
+VFUNC(KeySym,XStringToKeysym,V_XStringToKeysym,_ANSI_ARGS_((_Xconst char* c)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(KeySym,XStringToKeysym,V_XStringToKeysym,_ANSI_ARGS_((_Xconst char* c)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(KeySym,XStringToKeysym,V_XStringToKeysym,_ANSI_ARGS_((_Xconst char* c)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XStringToKeysym */
+
+#ifndef XTranslateCoordinates
+#ifdef __WIN32__
+VFUNC(Bool,XTranslateCoordinates,V_XTranslateCoordinates,_ANSI_ARGS_((Display* d,
+ Window w1, Window w2, int i1, int i2,
+ int* i3, int* i4, Window* w3)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XTranslateCoordinates */
+
+#ifndef XUngrabKeyboard
+#ifdef MAC_OSX_TK
+VFUNC(void,XUngrabKeyboard,V_XUngrabKeyboard,_ANSI_ARGS_((Display* d, Time t)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XUngrabKeyboard,V_XUngrabKeyboard,_ANSI_ARGS_((Display* d, Time t)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XUngrabKeyboard,V_XUngrabKeyboard,_ANSI_ARGS_((Display* d, Time t)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XUngrabKeyboard */
+
+#ifndef XUngrabPointer
+#ifdef MAC_OSX_TK
+VFUNC(void,XUngrabPointer,V_XUngrabPointer,_ANSI_ARGS_((Display* d, Time t)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XUngrabPointer,V_XUngrabPointer,_ANSI_ARGS_((Display* d, Time t)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XUngrabPointer,V_XUngrabPointer,_ANSI_ARGS_((Display* d, Time t)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XUngrabPointer */
+
+#ifndef XUnmapWindow
+#ifdef MAC_OSX_TK
+VFUNC(void,XUnmapWindow,V_XUnmapWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XUnmapWindow,V_XUnmapWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XUnmapWindow,V_XUnmapWindow,_ANSI_ARGS_((Display* d, Window w)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XUnmapWindow */
+
+#ifndef XWarpPointer
+#ifdef MAC_OSX_TK
+VFUNC(void,XWarpPointer,V_XWarpPointer,_ANSI_ARGS_((Display* display,
+ Window src_w, Window dest_w, int src_x,
+ int src_y, unsigned int src_width,
+ unsigned int src_height, int dest_x,
+ int dest_y)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,XWarpPointer,V_XWarpPointer,_ANSI_ARGS_((Display* display,
+ Window src_w, Window dest_w, int src_x,
+ int src_y, unsigned int src_width,
+ unsigned int src_height, int dest_x,
+ int dest_y)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(void,XWarpPointer,V_XWarpPointer,_ANSI_ARGS_((Display* d, Window s,
+ Window dw, int sx, int sy, unsigned int sw,
+ unsigned int sh, int dx, int dy)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XWarpPointer */
+
+#ifndef XWindowEvent
+#ifdef __WIN32__
+VFUNC(void,XWindowEvent,V_XWindowEvent,_ANSI_ARGS_((Display* d, Window w,
+ long l, XEvent* x)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XWindowEvent */
+
+#ifndef XWithdrawWindow
+#ifdef __WIN32__
+VFUNC(Status,XWithdrawWindow,V_XWithdrawWindow,_ANSI_ARGS_((Display* d, Window w,
+ int i)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XWithdrawWindow */
+
+#ifndef XmbLookupString
+#ifdef __WIN32__
+VFUNC(int,XmbLookupString,V_XmbLookupString,_ANSI_ARGS_((XIC xi,
+ XKeyPressedEvent* xk, char* c, int i,
+ KeySym* k, Status* s)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef XmbLookupString */
+
+#ifndef _XInitImageFuncPtrs
+#ifdef MAC_OSX_TK
+VFUNC(int,_XInitImageFuncPtrs,V__XInitImageFuncPtrs,_ANSI_ARGS_((XImage * image)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(int,_XInitImageFuncPtrs,V__XInitImageFuncPtrs,_ANSI_ARGS_((XImage * image)))
+#endif /* #ifdef MAC_TCL */
+#ifdef __WIN32__
+VFUNC(int,_XInitImageFuncPtrs,V__XInitImageFuncPtrs,_ANSI_ARGS_((XImage * image)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef _XInitImageFuncPtrs */
+
+#endif /* _TKINTXLIBDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls_f.h
new file mode 100644
index 00000000000..cf6fe23a3eb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkIntXlibDecls_f.h
@@ -0,0 +1,14 @@
+#ifndef TKINTXLIBDECLS_VT
+#define TKINTXLIBDECLS_VT
+typedef struct TkintxlibdeclsVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkIntXlibDecls.t"
+#undef VFUNC
+#undef VVAR
+} TkintxlibdeclsVtab;
+extern TkintxlibdeclsVtab *TkintxlibdeclsVptr;
+extern TkintxlibdeclsVtab *TkintxlibdeclsVGet(void);
+#endif /* TKINTXLIBDECLS_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt_f.h
new file mode 100644
index 00000000000..b8da3f6470e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkInt_f.h
@@ -0,0 +1,14 @@
+#ifndef TKINT_VT
+#define TKINT_VT
+typedef struct TkintVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkInt.t"
+#undef VFUNC
+#undef VVAR
+} TkintVtab;
+extern TkintVtab *TkintVptr;
+extern TkintVtab *TkintVGet(void);
+#endif /* TKINT_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkMenu.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkMenu.h
new file mode 100644
index 00000000000..0b341acd87b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkMenu.h
@@ -0,0 +1,588 @@
+/*
+ * tkMenu.h --
+ *
+ * Declarations shared among all of the files that implement menu widgets.
+ *
+ * Copyright (c) 1996-1998 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkMenu.h,v 1.6.4.1 2003/07/15 13:59:06 vincentdarley Exp $
+ */
+
+#ifndef _TKMENU
+#define _TKMENU
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+#ifndef _TKINT
+#include "tkInt.h"
+#endif
+
+#ifndef _DEFAULT
+#include "default.h"
+#endif
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Dummy types used by the platform menu code.
+ */
+
+typedef struct TkMenuPlatformData_ *TkMenuPlatformData;
+typedef struct TkMenuPlatformEntryData_ *TkMenuPlatformEntryData;
+
+/*
+ * Legal values for the "compound" field of TkMenuEntry and TkMenuButton records.
+ */
+
+enum compound {
+ COMPOUND_BOTTOM, COMPOUND_CENTER, COMPOUND_LEFT, COMPOUND_NONE,
+ COMPOUND_RIGHT, COMPOUND_TOP
+};
+
+/*
+ * One of the following data structures is kept for each entry of each
+ * menu managed by this file:
+ */
+
+typedef struct TkMenuEntry {
+ int type; /* Type of menu entry; see below for
+ * valid types. */
+ struct TkMenu *menuPtr; /* Menu with which this entry is associated. */
+ Tk_OptionTable optionTable; /* Option table for this menu entry. */
+ Tcl_Obj *labelPtr; /* Main text label displayed in entry (NULL
+ * if no label). */
+ int labelLength; /* Number of non-NULL characters in label. */
+ int state; /* State of button for display purposes:
+ * normal, active, or disabled. */
+ int underline; /* Value of -underline option: specifies index
+ * of character to underline (<0 means don't
+ * underline anything). */
+ Tcl_Obj *underlinePtr; /* Index of character to underline. */
+ Tcl_Obj *bitmapPtr; /* Bitmap to display in menu entry, or None.
+ * If not None then label is ignored. */
+ Tcl_Obj *imagePtr; /* Name of image to display, or
+ * NULL. If non-NULL, bitmap, text, and
+ * textVarName are ignored. */
+ Tk_Image image; /* Image to display in menu entry, or NULL if
+ * none. */
+ Tcl_Obj *selectImagePtr; /* Name of image to display when selected, or
+ * NULL. */
+ Tk_Image selectImage; /* Image to display in entry when selected,
+ * or NULL if none. Ignored if image is
+ * NULL. */
+ Tcl_Obj *accelPtr; /* Accelerator string displayed at right
+ * of menu entry. NULL means no such
+ * accelerator. Malloc'ed. */
+ int accelLength; /* Number of non-NULL characters in
+ * accelerator. */
+ int indicatorOn; /* True means draw indicator, false means
+ * don't draw it. This field is ignored unless
+ * the entry is a radio or check button. */
+ /*
+ * Display attributes
+ */
+
+ Tcl_Obj *borderPtr; /* Structure used to draw background for
+ * entry. NULL means use overall border
+ * for menu. */
+ Tcl_Obj *fgPtr; /* Foreground color to use for entry. NULL
+ * means use foreground color from menu. */
+ Tcl_Obj *activeBorderPtr; /* Used to draw background and border when
+ * element is active. NULL means use
+ * activeBorder from menu. */
+ Tcl_Obj *activeFgPtr; /* Foreground color to use when entry is
+ * active. NULL means use active foreground
+ * from menu. */
+ Tcl_Obj *indicatorFgPtr; /* Color for indicators in radio and check
+ * button entries. NULL means use indicatorFg
+ * GC from menu. */
+ Tcl_Obj *fontPtr; /* Text font for menu entries. NULL means
+ * use overall font for menu. */
+ int columnBreak; /* If this is 0, this item appears below
+ * the item in front of it. If this is
+ * 1, this item starts a new column. This
+ * field is always 0 for tearoff and separator
+ * entries. */
+ int hideMargin; /* If this is 0, then the item has enough
+ * margin to accomodate a standard check mark
+ * and a default right margin. If this is 1,
+ * then the item has no such margins. and
+ * checkbuttons and radiobuttons with this set
+ * will have a rectangle drawn in the indicator
+ * around the item if the item is checked. This
+ * is useful for palette menus. This field is
+ * ignored for separators and tearoffs. */
+ int indicatorSpace; /* The width of the indicator space for this
+ * entry. */
+ int labelWidth; /* Number of pixels to allow for displaying
+ * labels in menu entries. */
+ int compound; /* Value of -compound option; specifies whether
+ * the entry should show both an image and
+ * text, and, if so, how. */
+
+ /*
+ * Information used to implement this entry's action:
+ */
+
+ Tcl_Obj *commandPtr; /* Command to invoke when entry is invoked.
+ * Malloc'ed. */
+ Tcl_Obj *namePtr; /* Name of variable (for check buttons and
+ * radio buttons) or menu (for cascade
+ * entries). Malloc'ed.*/
+ Tcl_Obj *onValuePtr; /* Value to store in variable when selected
+ * (only for radio and check buttons).
+ * Malloc'ed. */
+ Tcl_Obj *offValuePtr; /* Value to store in variable when not
+ * selected (only for check buttons).
+ * Malloc'ed. */
+
+ /*
+ * Information used for drawing this menu entry.
+ */
+
+ int width; /* Number of pixels occupied by entry in
+ * horizontal dimension. Not used except
+ * in menubars. The width of norma menus
+ * is dependent on the rest of the menu. */
+ int x; /* X-coordinate of leftmost pixel in entry */
+ int height; /* Number of pixels occupied by entry in
+ * vertical dimension, including raised
+ * border drawn around entry when active. */
+ int y; /* Y-coordinate of topmost pixel in entry. */
+ GC textGC; /* GC for drawing text in entry. NULL means
+ * use overall textGC for menu. */
+ GC activeGC; /* GC for drawing text in entry when active.
+ * NULL means use overall activeGC for
+ * menu. */
+ GC disabledGC; /* Used to produce disabled effect for entry.
+ * NULL means use overall disabledGC from
+ * menu structure. See comments for
+ * disabledFg in menu structure for more
+ * information. */
+ GC indicatorGC; /* For drawing indicators. None means use
+ * GC from menu. */
+
+ /*
+ * Miscellaneous fields.
+ */
+
+ int entryFlags; /* Various flags. See below for
+ definitions. */
+ int index; /* Need to know which index we are. This
+ * is zero-based. This is the top-left entry
+ * of the menu. */
+
+ /*
+ * Bookeeping for master menus and cascade menus.
+ */
+
+ struct TkMenuReferences *childMenuRefPtr;
+ /* A pointer to the hash table entry for
+ * the child menu. Stored here when the menu
+ * entry is configured so that a hash lookup
+ * is not necessary later.*/
+ struct TkMenuEntry *nextCascadePtr;
+ /* The next cascade entry that is a parent of
+ * this entry's child cascade menu. NULL
+ * end of list, this is not a cascade entry,
+ * or the menu that this entry point to
+ * does not yet exist. */
+ TkMenuPlatformEntryData platformEntryData;
+ /* The data for the specific type of menu.
+ * Depends on platform and menu type what
+ * kind of options are in this structure.
+ */
+} TkMenuEntry;
+
+/*
+ * Flag values defined for menu entries:
+ *
+ * ENTRY_SELECTED: Non-zero means this is a radio or check
+ * button and that it should be drawn in
+ * the "selected" state.
+ * ENTRY_NEEDS_REDISPLAY: Non-zero means the entry should be redisplayed.
+ * ENTRY_LAST_COLUMN: Used by the drawing code. If the entry is in
+ * the last column, the space to its right needs
+ * to be filled.
+ * ENTRY_PLATFORM_FLAG1 - 4 These flags are reserved for use by the
+ * platform-dependent implementation of menus
+ * and should not be used by anything else.
+ */
+
+#define ENTRY_SELECTED 1
+#define ENTRY_NEEDS_REDISPLAY 2
+#define ENTRY_LAST_COLUMN 4
+#define ENTRY_PLATFORM_FLAG1 (1 << 30)
+#define ENTRY_PLATFORM_FLAG2 (1 << 29)
+#define ENTRY_PLATFORM_FLAG3 (1 << 28)
+#define ENTRY_PLATFORM_FLAG4 (1 << 27)
+
+/*
+ * Types defined for MenuEntries:
+ */
+
+#define CASCADE_ENTRY 0
+#define CHECK_BUTTON_ENTRY 1
+#define COMMAND_ENTRY 2
+#define RADIO_BUTTON_ENTRY 3
+#define SEPARATOR_ENTRY 4
+#define TEAROFF_ENTRY 5
+
+/*
+ * Menu states
+ */
+
+EXTERN char *tkMenuStateStrings[];
+
+#define ENTRY_ACTIVE 0
+#define ENTRY_NORMAL 1
+#define ENTRY_DISABLED 2
+
+/*
+ * A data structure of the following type is kept for each
+ * menu widget:
+ */
+
+typedef struct TkMenu {
+ Tk_Window tkwin; /* Window that embodies the pane. NULL
+ * means that the window has been destroyed
+ * but the data structures haven't yet been
+ * cleaned up.*/
+ Display *display; /* Display containing widget. Needed, among
+ * other things, so that resources can be
+ * freed up even after tkwin has gone away. */
+ Tcl_Interp *interp; /* Interpreter associated with menu. */
+ Tcl_Command widgetCmd; /* Token for menu's widget command. */
+ TkMenuEntry **entries; /* Array of pointers to all the entries
+ * in the menu. NULL means no entries. */
+ int numEntries; /* Number of elements in entries. */
+ int active; /* Index of active entry. -1 means
+ * nothing active. */
+ int menuType; /* MASTER_MENU, TEAROFF_MENU, or MENUBAR.
+ * See below for definitions. */
+ Tcl_Obj *menuTypePtr; /* Used to control whether created tkwin
+ * is a toplevel or not. "normal", "menubar",
+ * or "toplevel" */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ Tcl_Obj *borderPtr; /* Structure used to draw 3-D
+ * border and background for menu. */
+ Tcl_Obj *borderWidthPtr; /* Width of border around whole menu. */
+ Tcl_Obj *activeBorderPtr; /* Used to draw background and border for
+ * active element (if any). */
+ Tcl_Obj *activeBorderWidthPtr;
+ /* Width of border around active element. */
+ Tcl_Obj *reliefPtr; /* 3-d effect: TK_RELIEF_RAISED, etc. */
+ Tcl_Obj *fontPtr; /* Text font for menu entries. */
+ Tcl_Obj *fgPtr; /* Foreground color for entries. */
+ Tcl_Obj *disabledFgPtr; /* Foreground color when disabled. NULL
+ * means use normalFg with a 50% stipple
+ * instead. */
+ Tcl_Obj *activeFgPtr; /* Foreground color for active entry. */
+ Tcl_Obj *indicatorFgPtr; /* Color for indicators in radio and check
+ * button entries. */
+ Pixmap gray; /* Bitmap for drawing disabled entries in
+ * a stippled fashion. None means not
+ * allocated yet. */
+ GC textGC; /* GC for drawing text and other features
+ * of menu entries. */
+ GC disabledGC; /* Used to produce disabled effect. If
+ * disabledFg isn't NULL, this GC is used to
+ * draw text and icons for disabled entries.
+ * Otherwise text and icons are drawn with
+ * normalGC and this GC is used to stipple
+ * background across them. */
+ GC activeGC; /* GC for drawing active entry. */
+ GC indicatorGC; /* For drawing indicators. */
+ GC disabledImageGC; /* Used for drawing disabled images. They
+ * have to be stippled. This is created
+ * when the image is about to be drawn the
+ * first time. */
+
+ /*
+ * Information about geometry of menu.
+ */
+
+ int totalWidth; /* Width of entire menu */
+ int totalHeight; /* Height of entire menu */
+
+ /*
+ * Miscellaneous information:
+ */
+
+ int tearoff; /* 1 means this menu can be torn off. On some
+ * platforms, the user can drag an outline
+ * of the menu by just dragging outside of
+ * the menu, and the tearoff is created where
+ * the mouse is released. On others, an
+ * indicator (such as a dashed stripe) is
+ * drawn, and when the menu is selected, the
+ * tearoff is created. */
+ Tcl_Obj *titlePtr; /* The title to use when this menu is torn
+ * off. If this is NULL, a default scheme
+ * will be used to generate a title for
+ * tearoff. */
+ Tcl_Obj *tearoffCommandPtr; /* If non-NULL, points to a command to
+ * run whenever the menu is torn-off. */
+ Tcl_Obj *takeFocusPtr; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+ Tcl_Obj *cursorPtr; /* Current cursor for window, or None. */
+ Tcl_Obj *postCommandPtr; /* Used to detect cycles in cascade hierarchy
+ * trees when preprocessing postcommands
+ * on some platforms. See PostMenu for
+ * more details. */
+ int postCommandGeneration; /* Need to do pre-invocation post command
+ * traversal */
+ int menuFlags; /* Flags for use by X; see below for
+ definition */
+ TkMenuEntry *postedCascade; /* Points to menu entry for cascaded submenu
+ * that is currently posted or NULL if no
+ * submenu posted. */
+ struct TkMenu *nextInstancePtr;
+ /* The next instance of this menu in the
+ * chain. */
+ struct TkMenu *masterMenuPtr;
+ /* A pointer to the original menu for this
+ * clone chain. Points back to this structure
+ * if this menu is a master menu. */
+ struct TkMenuOptionTables *optionTablesPtr;
+ /* A pointer to the collection of option tables
+ * that work with menus and menu entries. */
+ Tk_Window parentTopLevelPtr;/* If this menu is a menubar, this is the
+ * toplevel that owns the menu. Only applicable
+ * for menubar clones.
+ */
+ struct TkMenuReferences *menuRefPtr;
+ /* Each menu is hashed into a table with the
+ * name of the menu's window as the key.
+ * The information in this hash table includes
+ * a pointer to the menu (so that cascades
+ * can find this menu), a pointer to the
+ * list of toplevel widgets that have this
+ * menu as its menubar, and a list of menu
+ * entries that have this menu specified
+ * as a cascade. */
+ TkMenuPlatformData platformData;
+ /* The data for the specific type of menu.
+ * Depends on platform and menu type what
+ * kind of options are in this structure.
+ */
+ Tk_OptionSpec *extensionPtr;
+ /* Needed by the configuration package for
+ * this widget to be extended. */
+ Tk_SavedOptions *errorStructPtr;
+ /* We actually have to allocate these because
+ * multiple menus get changed during one
+ * ConfigureMenu call. */
+} TkMenu;
+
+/*
+ * When the toplevel configure -menu command is executed, the menu may not
+ * exist yet. We need to keep a linked list of windows that reference
+ * a particular menu.
+ */
+
+typedef struct TkMenuTopLevelList {
+ struct TkMenuTopLevelList *nextPtr;
+ /* The next window in the list */
+ Tk_Window tkwin; /* The window that has this menu as its
+ * menubar. */
+} TkMenuTopLevelList;
+
+/*
+ * The following structure is used to keep track of things which
+ * reference a menu. It is created when:
+ * - a menu is created.
+ * - a cascade entry is added to a menu with a non-null name
+ * - the "-menu" configuration option is used on a toplevel widget
+ * with a non-null parameter.
+ *
+ * One of these three fields must be non-NULL, but any of the fields may
+ * be NULL. This structure makes it easy to determine whether or not
+ * anything like recalculating platform data or geometry is necessary
+ * when one of the three actions above is performed.
+ */
+
+typedef struct TkMenuReferences {
+ struct TkMenu *menuPtr; /* The menu data structure. This is NULL
+ * if the menu does not exist. */
+ TkMenuTopLevelList *topLevelListPtr;
+ /* First in the list of all toplevels that
+ * have this menu as its menubar. NULL if no
+ * toplevel widgets have this menu as its
+ * menubar. */
+ TkMenuEntry *parentEntryPtr;/* First in the list of all cascade menu
+ * entries that have this menu as their child.
+ * NULL means no cascade entries. */
+ Tcl_HashEntry *hashEntryPtr;/* This is needed because the pathname of the
+ * window (which is what we hash on) may not
+ * be around when we are deleting.
+ */
+} TkMenuReferences;
+
+/*
+ * This structure contains all of the option tables that are needed
+ * by menus.
+ */
+
+typedef struct TkMenuOptionTables {
+ Tk_OptionTable menuOptionTable; /* The option table for menus. */
+ Tk_OptionTable entryOptionTables[6];/* The tables for menu entries. */
+} TkMenuOptionTables;
+
+/*
+ * Flag bits for menus:
+ *
+ * REDRAW_PENDING: Non-zero means a DoWhenIdle handler
+ * has already been queued to redraw
+ * this window.
+ * RESIZE_PENDING: Non-zero means a call to ComputeMenuGeometry
+ * has already been scheduled.
+ * MENU_DELETION_PENDING Non-zero means that we are currently destroying
+ * this menu's internal structures. This is useful
+ * when we are in the middle of cleaning
+ * this master menu's chain of menus up when
+ * TkDestroyMenu was called again on this
+ * menu (via a destroy binding or somesuch).
+ * MENU_WIN_DESTRUCTION_PENDING Non-zero means we are in the middle of
+ * destroying this menu's Tk_Window.
+ * MENU_PLATFORM_FLAG1... Reserved for use by the platform-specific menu
+ * code.
+ */
+
+#define REDRAW_PENDING 1
+#define RESIZE_PENDING 2
+#define MENU_DELETION_PENDING 4
+#define MENU_WIN_DESTRUCTION_PENDING 8
+#define MENU_PLATFORM_FLAG1 (1 << 30)
+#define MENU_PLATFORM_FLAG2 (1 << 29)
+#define MENU_PLATFORM_FLAG3 (1 << 28)
+
+/*
+ * Each menu created by the user is a MASTER_MENU. When a menu is torn off,
+ * a TEAROFF_MENU instance is created. When a menu is assigned to a toplevel
+ * as a menu bar, a MENUBAR instance is created. All instances have the same
+ * configuration information. If the master instance is deleted, all instances
+ * are deleted. If one of the other instances is deleted, only that instance
+ * is deleted.
+ */
+
+#define UNKNOWN_TYPE -1
+#define MASTER_MENU 0
+#define TEAROFF_MENU 1
+#define MENUBAR 2
+
+/*
+ * Various geometry definitions:
+ */
+
+#define CASCADE_ARROW_HEIGHT 10
+#define CASCADE_ARROW_WIDTH 8
+#define DECORATION_BORDER_WIDTH 2
+
+/*
+ * Menu-related procedures that are shared among Tk modules but not exported
+ * to the outside world:
+ */
+
+EXTERN int TkActivateMenuEntry _ANSI_ARGS_((TkMenu *menuPtr,
+ int index));
+EXTERN void TkBindMenu _ANSI_ARGS_((
+ Tk_Window tkwin, TkMenu *menuPtr));
+EXTERN TkMenuReferences *
+ TkCreateMenuReferences _ANSI_ARGS_((Tcl_Interp *interp,
+ char *name));
+EXTERN void TkDestroyMenu _ANSI_ARGS_((TkMenu *menuPtr));
+EXTERN void TkEventuallyRecomputeMenu _ANSI_ARGS_((
+ TkMenu *menuPtr));
+EXTERN void TkEventuallyRedrawMenu _ANSI_ARGS_((
+ TkMenu *menuPtr, TkMenuEntry *mePtr));
+EXTERN TkMenuReferences *
+ TkFindMenuReferences _ANSI_ARGS_((Tcl_Interp *interp,
+ char *name));
+EXTERN TkMenuReferences *
+ TkFindMenuReferencesObj _ANSI_ARGS_((
+ Tcl_Interp *interp, Tcl_Obj *namePtr));
+EXTERN int TkFreeMenuReferences _ANSI_ARGS_((
+ TkMenuReferences *menuRefPtr));
+EXTERN Tcl_HashTable * TkGetMenuHashTable _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN int TkGetMenuIndex _ANSI_ARGS_((Tcl_Interp *interp,
+ TkMenu *menuPtr, Tcl_Obj *objPtr, int lastOK,
+ int *indexPtr));
+EXTERN void TkMenuInitializeDrawingFields _ANSI_ARGS_((
+ TkMenu *menuPtr));
+EXTERN void TkMenuInitializeEntryDrawingFields _ANSI_ARGS_((
+ TkMenuEntry *mePtr));
+EXTERN int TkInvokeMenu _ANSI_ARGS_((Tcl_Interp *interp,
+ TkMenu *menuPtr, int index));
+EXTERN void TkMenuConfigureDrawOptions _ANSI_ARGS_((
+ TkMenu *menuPtr));
+EXTERN int TkMenuConfigureEntryDrawOptions _ANSI_ARGS_((
+ TkMenuEntry *mePtr, int index));
+EXTERN void TkMenuFreeDrawOptions _ANSI_ARGS_((TkMenu *menuPtr));
+EXTERN void TkMenuEntryFreeDrawOptions _ANSI_ARGS_((
+ TkMenuEntry *mePtr));
+EXTERN void TkMenuEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+EXTERN void TkMenuImageProc _ANSI_ARGS_((
+ ClientData clientData, int x, int y, int width,
+ int height, int imgWidth, int imgHeight));
+EXTERN void TkMenuInit _ANSI_ARGS_((void));
+EXTERN void TkMenuSelectImageProc _ANSI_ARGS_
+ ((ClientData clientData, int x, int y,
+ int width, int height, int imgWidth,
+ int imgHeight));
+EXTERN Tcl_Obj * TkNewMenuName _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *parentNamePtr, TkMenu *menuPtr));
+EXTERN int TkPostCommand _ANSI_ARGS_((TkMenu *menuPtr));
+EXTERN int TkPostSubmenu _ANSI_ARGS_((Tcl_Interp *interp,
+ TkMenu *menuPtr, TkMenuEntry *mePtr));
+EXTERN int TkPostTearoffMenu _ANSI_ARGS_((Tcl_Interp *interp,
+ TkMenu *menuPtr, int x, int y));
+EXTERN int TkPreprocessMenu _ANSI_ARGS_((TkMenu *menuPtr));
+EXTERN void TkRecomputeMenu _ANSI_ARGS_((TkMenu *menuPtr));
+
+/*
+ * These routines are the platform-dependent routines called by the
+ * common code.
+ */
+
+EXTERN void TkpComputeMenubarGeometry _ANSI_ARGS_((
+ TkMenu *menuPtr));
+EXTERN void TkpComputeStandardMenuGeometry _ANSI_ARGS_
+ ((TkMenu *menuPtr));
+EXTERN int TkpConfigureMenuEntry
+ _ANSI_ARGS_((TkMenuEntry *mePtr));
+EXTERN void TkpDestroyMenu _ANSI_ARGS_((TkMenu *menuPtr));
+EXTERN void TkpDestroyMenuEntry
+ _ANSI_ARGS_((TkMenuEntry *mEntryPtr));
+EXTERN void TkpDrawMenuEntry _ANSI_ARGS_((TkMenuEntry *mePtr,
+ Drawable d, Tk_Font tkfont,
+ CONST Tk_FontMetrics *menuMetricsPtr, int x,
+ int y, int width, int height, int strictMotif,
+ int drawArrow));
+EXTERN void TkpMenuInit _ANSI_ARGS_((void));
+EXTERN int TkpMenuNewEntry _ANSI_ARGS_((TkMenuEntry *mePtr));
+EXTERN int TkpNewMenu _ANSI_ARGS_((TkMenu *menuPtr));
+EXTERN int TkpPostMenu _ANSI_ARGS_((Tcl_Interp *interp,
+ TkMenu *menuPtr, int x, int y));
+EXTERN void TkpSetWindowMenuBar _ANSI_ARGS_((Tk_Window tkwin,
+ TkMenu *menuPtr));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKMENU */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkMenubutton.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkMenubutton.h
new file mode 100644
index 00000000000..30ae1beba58
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkMenubutton.h
@@ -0,0 +1,240 @@
+/*
+ * tkMenubutton.h --
+ *
+ * Declarations of types and functions used to implement
+ * the menubutton widget.
+ *
+ * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkMenubutton.h,v 1.8.4.1 2003/11/17 23:29:36 hobbs Exp $
+ */
+
+#ifndef _TKMENUBUTTON
+#define _TKMENUBUTTON
+
+#ifndef _TKINT
+#include "tkInt.h"
+#endif
+#include "tkVMacro.h"
+
+#ifndef _TKMENU
+#include "tkMenu.h"
+#endif
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Legal values for the "orient" field of TkMenubutton records.
+ */
+
+enum direction {
+ DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH,
+ DIRECTION_LEFT, DIRECTION_RIGHT
+};
+
+/*
+ * Legal values for the "state" field of TkMenubutton records.
+ */
+
+enum state {
+ STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
+};
+
+/*
+ * A data structure of the following type is kept for each
+ * widget managed by this file:
+ */
+
+typedef struct {
+ Tk_Window tkwin; /* Window that embodies the widget. NULL
+ * means that the window has been destroyed
+ * but the data structures haven't yet been
+ * cleaned up.*/
+ Display *display; /* Display containing widget. Needed, among
+ * other things, so that resources can bee
+ * freed up even after tkwin has gone away. */
+ Tcl_Interp *interp; /* Interpreter associated with menubutton. */
+ Tcl_Command widgetCmd; /* Token for menubutton's widget command. */
+ Tk_OptionTable optionTable; /* Table that defines configuration options
+ * available for this widget. */
+ Tk_Window menuName; /* Name of menu associated with widget.
+ * Malloc-ed. */
+
+ /*
+ * Information about what's displayed in the menu button:
+ */
+
+ char *text; /* Text to display in button (malloc'ed)
+ * or NULL. */
+ int underline; /* Index of character to underline. */
+ Tcl_Obj *textVarName; /* Name of variable (malloc'ed) or NULL.
+ * If non-NULL, button displays the contents
+ * of this variable. */
+ Pixmap bitmap; /* Bitmap to display or None. If not None
+ * then text and textVar and underline
+ * are ignored. */
+ char *imageString; /* Name of image to display (malloc'ed), or
+ * NULL. If non-NULL, bitmap, text, and
+ * textVarName are ignored. */
+ Tk_Image image; /* Image to display in window, or NULL if
+ * none. */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ enum state state; /* State of button for display purposes:
+ * normal, active, or disabled. */
+ Tk_3DBorder normalBorder; /* Structure used to draw 3-D
+ * border and background when window
+ * isn't active. NULL means no such
+ * border exists. */
+ Tk_3DBorder activeBorder; /* Structure used to draw 3-D
+ * border and background when window
+ * is active. NULL means no such
+ * border exists. */
+ int borderWidth; /* Width of border. */
+ int relief; /* 3-d effect: TK_RELIEF_RAISED, etc. */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ XColor *highlightBgColorPtr;
+ /* Color for drawing traversal highlight
+ * area when highlight is off. */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ int inset; /* Total width of all borders, including
+ * traversal highlight and 3-D border.
+ * Indicates how much interior stuff must
+ * be offset from outside edges to leave
+ * room for borders. */
+ Tk_Font tkfont; /* Information about text font, or NULL. */
+ XColor *normalFg; /* Foreground color in normal mode. */
+ XColor *activeFg; /* Foreground color in active mode. NULL
+ * means use normalFg instead. */
+ XColor *disabledFg; /* Foreground color when disabled. NULL
+ * means use normalFg with a 50% stipple
+ * instead. */
+ GC normalTextGC; /* GC for drawing text in normal mode. */
+ GC activeTextGC; /* GC for drawing text in active mode (NULL
+ * means use normalTextGC). */
+ Pixmap gray; /* Pixmap for displaying disabled text/icon if
+ * disabledFg is NULL. */
+ GC disabledGC; /* Used to produce disabled effect for text. */
+ GC stippleGC; /* Used to produce disabled stipple effect
+ * for images when disabled. */
+ int leftBearing; /* Distance from text origin to leftmost drawn
+ * pixel (positive means to right). */
+ int rightBearing; /* Amount text sticks right from its origin. */
+ Tcl_Obj *widthString; /* Value of -width option. Malloc'ed. */
+ Tcl_Obj *heightString; /* Value of -height option. Malloc'ed. */
+ int width, height; /* If > 0, these specify dimensions to request
+ * for window, in characters for text and in
+ * pixels for bitmaps. In this case the actual
+ * size of the text string or bitmap is
+ * ignored in computing desired window size. */
+ int wrapLength; /* Line length (in pixels) at which to wrap
+ * onto next line. <= 0 means don't wrap
+ * except at newlines. */
+ int padX, padY; /* Extra space around text or bitmap (pixels
+ * on each side). */
+ Tk_Anchor anchor; /* Where text/bitmap should be displayed
+ * inside window region. */
+ Tk_Justify justify; /* Justification to use for multi-line text. */
+ int textWidth; /* Width needed to display text as requested,
+ * in pixels. */
+ int textHeight; /* Height needed to display text as requested,
+ * in pixels. */
+ Tk_TextLayout textLayout; /* Saved text layout information. */
+ int indicatorOn; /* Non-zero means display indicator; 0 means
+ * don't display. */
+ int indicatorHeight; /* Height of indicator in pixels. This same
+ * amount of extra space is also left on each
+ * side of the indicator. 0 if no indicator. */
+ int indicatorWidth; /* Width of indicator in pixels, including
+ * indicatorHeight in padding on each side.
+ * 0 if no indicator. */
+
+ /*
+ * Miscellaneous information:
+ */
+
+ int compound; /* Value of -compound option; specifies whether
+ * the menubutton should show both an image and
+ * text, and, if so, how. */
+
+ enum direction direction; /* Direction for where to pop the menu.
+ * Valid directions are "above", "below",
+ * "left", "right", and "flush". "flush"
+ * means that the upper left corner of the
+ * menubutton is where the menu pops up.
+ * "above" and "below" will attempt to pop
+ * the menu compleletly above or below
+ * the menu respectively.
+ * "left" and "right" will pop the menu
+ * left or right, and the active item
+ * will be next to the button. */
+ Tk_Cursor cursor; /* Current cursor for window, or None. */
+ char *takeFocus; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+ int flags; /* Various flags; see below for
+ * definitions. */
+} TkMenuButton;
+
+/*
+ * Flag bits for buttons:
+ *
+ * REDRAW_PENDING: Non-zero means a DoWhenIdle handler
+ * has already been queued to redraw
+ * this window.
+ * POSTED: Non-zero means that the menu associated
+ * with this button has been posted (typically
+ * because of an active button press).
+ * GOT_FOCUS: Non-zero means this button currently
+ * has the input focus.
+ */
+
+#define REDRAW_PENDING 1
+#define POSTED 2
+#define GOT_FOCUS 4
+
+/*
+ * The following constants define the dimensions of the cascade indicator,
+ * which is displayed if the "-indicatoron" option is true. The units for
+ * these options are 1/10 millimeters.
+ */
+
+#define INDICATOR_WIDTH 40
+#define INDICATOR_HEIGHT 17
+
+/*
+ * Declaration of variables shared between the files in the button module.
+ */
+
+extern Tk_ClassProcs tkpMenubuttonClass;
+
+/*
+ * Declaration of procedures used in the implementation of the button
+ * widget.
+ */
+
+EXTERN void TkpComputeMenuButtonGeometry _ANSI_ARGS_((
+ TkMenuButton *mbPtr));
+EXTERN TkMenuButton * TkpCreateMenuButton _ANSI_ARGS_((Tk_Window tkwin));
+EXTERN void TkpDisplayMenuButton _ANSI_ARGS_((
+ ClientData clientData));
+EXTERN void TkpDestroyMenuButton _ANSI_ARGS_((
+ TkMenuButton *mbPtr));
+EXTERN void TkMenuButtonWorldChanged _ANSI_ARGS_((
+ ClientData instanceData));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKMENUBUTTON */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.h
new file mode 100644
index 00000000000..db21505cf68
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.h
@@ -0,0 +1,17 @@
+#ifndef _TKOPTION
+#define _TKOPTION
+EXTERN void Tk_AddOption _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name, CONST char * value,
+ int priority));
+EXTERN Tk_Uid Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin, CONST char *name,
+ CONST char *className));
+EXTERN int Tk_OptionObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *args));
+#ifndef _TKINT
+struct TkWindow;
+#endif
+EXTERN void TkOptionClassChanged _ANSI_ARGS_((struct TkWindow *winPtr));
+EXTERN void TkOptionDeadWindow _ANSI_ARGS_((struct TkWindow *winPtr));
+#endif /* _TKOPTION */
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.m
new file mode 100644
index 00000000000..9486a5da573
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.m
@@ -0,0 +1,26 @@
+#ifndef _TKOPTION_VM
+#define _TKOPTION_VM
+#include "tkOption_f.h"
+#ifndef NO_VTABLES
+#ifndef TkOptionClassChanged
+# define TkOptionClassChanged (*TkoptionVptr->V_TkOptionClassChanged)
+#endif
+
+#ifndef TkOptionDeadWindow
+# define TkOptionDeadWindow (*TkoptionVptr->V_TkOptionDeadWindow)
+#endif
+
+#ifndef Tk_AddOption
+# define Tk_AddOption (*TkoptionVptr->V_Tk_AddOption)
+#endif
+
+#ifndef Tk_GetOption
+# define Tk_GetOption (*TkoptionVptr->V_Tk_GetOption)
+#endif
+
+#ifndef Tk_OptionObjCmd
+# define Tk_OptionObjCmd (*TkoptionVptr->V_Tk_OptionObjCmd)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKOPTION_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.t
new file mode 100644
index 00000000000..c782fae5cf4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption.t
@@ -0,0 +1,26 @@
+#ifdef _TKOPTION
+#ifndef TkOptionClassChanged
+VFUNC(void,TkOptionClassChanged,V_TkOptionClassChanged,_ANSI_ARGS_((struct TkWindow *winPtr)))
+#endif /* #ifndef TkOptionClassChanged */
+
+#ifndef TkOptionDeadWindow
+VFUNC(void,TkOptionDeadWindow,V_TkOptionDeadWindow,_ANSI_ARGS_((struct TkWindow *winPtr)))
+#endif /* #ifndef TkOptionDeadWindow */
+
+#ifndef Tk_AddOption
+VFUNC(void,Tk_AddOption,V_Tk_AddOption,_ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name, CONST char * value,
+ int priority)))
+#endif /* #ifndef Tk_AddOption */
+
+#ifndef Tk_GetOption
+VFUNC(Tk_Uid,Tk_GetOption,V_Tk_GetOption,_ANSI_ARGS_((Tk_Window tkwin, CONST char *name,
+ CONST char *className)))
+#endif /* #ifndef Tk_GetOption */
+
+#ifndef Tk_OptionObjCmd
+VFUNC(int,Tk_OptionObjCmd,V_Tk_OptionObjCmd,_ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *args)))
+#endif /* #ifndef Tk_OptionObjCmd */
+
+#endif /* _TKOPTION */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption_f.h
new file mode 100644
index 00000000000..9a3f10cd919
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkOption_f.h
@@ -0,0 +1,14 @@
+#ifndef TKOPTION_VT
+#define TKOPTION_VT
+typedef struct TkoptionVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkOption.t"
+#undef VFUNC
+#undef VVAR
+} TkoptionVtab;
+extern TkoptionVtab *TkoptionVptr;
+extern TkoptionVtab *TkoptionVGet(void);
+#endif /* TKOPTION_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.h
new file mode 100644
index 00000000000..1ac6485307b
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.h
@@ -0,0 +1,300 @@
+/*
+ * tkPlatDecls.h --
+ *
+ * Declarations of functions in the platform-specific public Tcl API.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkPlatDecls.h,v 1.7 2002/08/31 06:12:23 das Exp $
+ */
+
+#ifndef _TKPLATDECLS
+#define _TKPLATDECLS
+
+#ifdef BUILD_tk
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tk.decls script.
+ */
+
+/* !BEGIN!: Do not edit below this line. */
+
+/*
+ * Exported function declarations:
+ */
+
+#ifdef __WIN32__
+/* 0 */
+EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin,
+ HWND hwnd));
+/* 1 */
+EXTERN HINSTANCE Tk_GetHINSTANCE _ANSI_ARGS_((void));
+/* 2 */
+EXTERN HWND Tk_GetHWND _ANSI_ARGS_((Window window));
+/* 3 */
+EXTERN Tk_Window Tk_HWNDToWindow _ANSI_ARGS_((HWND hwnd));
+/* 4 */
+EXTERN void Tk_PointerEvent _ANSI_ARGS_((HWND hwnd, int x, int y));
+/* 5 */
+EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd,
+ UINT message, WPARAM wParam, LPARAM lParam,
+ LRESULT * result));
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+/* 0 */
+EXTERN void Tk_MacSetEmbedHandler _ANSI_ARGS_((
+ Tk_MacEmbedRegisterWinProc * registerWinProcPtr,
+ Tk_MacEmbedGetGrafPortProc * getPortProcPtr,
+ Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr,
+ Tk_MacEmbedGetClipProc * getClipProc,
+ Tk_MacEmbedGetOffsetInParentProc * getOffsetProc));
+/* 1 */
+EXTERN void Tk_MacTurnOffMenus _ANSI_ARGS_((void));
+/* 2 */
+EXTERN void Tk_MacTkOwnsCursor _ANSI_ARGS_((int tkOwnsIt));
+/* 3 */
+EXTERN void TkMacInitMenus _ANSI_ARGS_((Tcl_Interp * interp));
+/* 4 */
+EXTERN void TkMacInitAppleEvents _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 5 */
+EXTERN int TkMacConvertEvent _ANSI_ARGS_((
+ EventRecord * eventPtr));
+/* 6 */
+EXTERN int TkMacConvertTkEvent _ANSI_ARGS_((
+ EventRecord * eventPtr, Window window));
+/* 7 */
+EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y, int width, int height,
+ int flags));
+/* 8 */
+EXTERN void TkMacInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr));
+/* 9 */
+EXTERN int TkMacHaveAppearance _ANSI_ARGS_((void));
+/* 10 */
+EXTERN GWorldPtr TkMacGetDrawablePort _ANSI_ARGS_((Drawable drawable));
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+/* 0 */
+EXTERN void Tk_MacOSXSetEmbedHandler _ANSI_ARGS_((
+ Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr,
+ Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr,
+ Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr,
+ Tk_MacOSXEmbedGetClipProc * getClipProc,
+ Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc));
+/* 1 */
+EXTERN void Tk_MacOSXTurnOffMenus _ANSI_ARGS_((void));
+/* 2 */
+EXTERN void Tk_MacOSXTkOwnsCursor _ANSI_ARGS_((int tkOwnsIt));
+/* 3 */
+EXTERN void TkMacOSXInitMenus _ANSI_ARGS_((Tcl_Interp * interp));
+/* 4 */
+EXTERN void TkMacOSXInitAppleEvents _ANSI_ARGS_((
+ Tcl_Interp * interp));
+/* 5 */
+EXTERN void TkGenWMConfigureEvent _ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y, int width, int height,
+ int flags));
+/* 6 */
+EXTERN void TkMacOSXInvalClipRgns _ANSI_ARGS_((TkWindow * winPtr));
+/* 7 */
+EXTERN GWorldPtr TkMacOSXGetDrawablePort _ANSI_ARGS_((
+ Drawable drawable));
+/* 8 */
+EXTERN ControlRef TkMacOSXGetRootControl _ANSI_ARGS_((
+ Drawable drawable));
+/* 9 */
+EXTERN void Tk_MacOSXSetupTkNotifier _ANSI_ARGS_((void));
+/* 10 */
+EXTERN int Tk_MacOSXIsAppInFront _ANSI_ARGS_((void));
+#endif /* MAC_OSX_TK */
+
+typedef struct TkPlatStubs {
+ int magic;
+ struct TkPlatStubHooks *hooks;
+
+#ifdef __WIN32__
+ Window (*tk_AttachHWND) _ANSI_ARGS_((Tk_Window tkwin, HWND hwnd)); /* 0 */
+ HINSTANCE (*tk_GetHINSTANCE) _ANSI_ARGS_((void)); /* 1 */
+ HWND (*tk_GetHWND) _ANSI_ARGS_((Window window)); /* 2 */
+ Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((HWND hwnd)); /* 3 */
+ void (*tk_PointerEvent) _ANSI_ARGS_((HWND hwnd, int x, int y)); /* 4 */
+ int (*tk_TranslateWinEvent) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result)); /* 5 */
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+ void (*tk_MacSetEmbedHandler) _ANSI_ARGS_((Tk_MacEmbedRegisterWinProc * registerWinProcPtr, Tk_MacEmbedGetGrafPortProc * getPortProcPtr, Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacEmbedGetClipProc * getClipProc, Tk_MacEmbedGetOffsetInParentProc * getOffsetProc)); /* 0 */
+ void (*tk_MacTurnOffMenus) _ANSI_ARGS_((void)); /* 1 */
+ void (*tk_MacTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt)); /* 2 */
+ void (*tkMacInitMenus) _ANSI_ARGS_((Tcl_Interp * interp)); /* 3 */
+ void (*tkMacInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp)); /* 4 */
+ int (*tkMacConvertEvent) _ANSI_ARGS_((EventRecord * eventPtr)); /* 5 */
+ int (*tkMacConvertTkEvent) _ANSI_ARGS_((EventRecord * eventPtr, Window window)); /* 6 */
+ void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags)); /* 7 */
+ void (*tkMacInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr)); /* 8 */
+ int (*tkMacHaveAppearance) _ANSI_ARGS_((void)); /* 9 */
+ GWorldPtr (*tkMacGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); /* 10 */
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+ void (*tk_MacOSXSetEmbedHandler) _ANSI_ARGS_((Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacOSXEmbedGetClipProc * getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc)); /* 0 */
+ void (*tk_MacOSXTurnOffMenus) _ANSI_ARGS_((void)); /* 1 */
+ void (*tk_MacOSXTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt)); /* 2 */
+ void (*tkMacOSXInitMenus) _ANSI_ARGS_((Tcl_Interp * interp)); /* 3 */
+ void (*tkMacOSXInitAppleEvents) _ANSI_ARGS_((Tcl_Interp * interp)); /* 4 */
+ void (*tkGenWMConfigureEvent) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height, int flags)); /* 5 */
+ void (*tkMacOSXInvalClipRgns) _ANSI_ARGS_((TkWindow * winPtr)); /* 6 */
+ GWorldPtr (*tkMacOSXGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); /* 7 */
+ ControlRef (*tkMacOSXGetRootControl) _ANSI_ARGS_((Drawable drawable)); /* 8 */
+ void (*tk_MacOSXSetupTkNotifier) _ANSI_ARGS_((void)); /* 9 */
+ int (*tk_MacOSXIsAppInFront) _ANSI_ARGS_((void)); /* 10 */
+#endif /* MAC_OSX_TK */
+} TkPlatStubs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern TkPlatStubs *tkPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+
+#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
+
+/*
+ * Inline function declarations:
+ */
+
+#ifdef __WIN32__
+#ifndef Tk_AttachHWND
+#define Tk_AttachHWND \
+ (tkPlatStubsPtr->tk_AttachHWND) /* 0 */
+#endif
+#ifndef Tk_GetHINSTANCE
+#define Tk_GetHINSTANCE \
+ (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */
+#endif
+#ifndef Tk_GetHWND
+#define Tk_GetHWND \
+ (tkPlatStubsPtr->tk_GetHWND) /* 2 */
+#endif
+#ifndef Tk_HWNDToWindow
+#define Tk_HWNDToWindow \
+ (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */
+#endif
+#ifndef Tk_PointerEvent
+#define Tk_PointerEvent \
+ (tkPlatStubsPtr->tk_PointerEvent) /* 4 */
+#endif
+#ifndef Tk_TranslateWinEvent
+#define Tk_TranslateWinEvent \
+ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */
+#endif
+#endif /* __WIN32__ */
+#ifdef MAC_TCL
+#ifndef Tk_MacSetEmbedHandler
+#define Tk_MacSetEmbedHandler \
+ (tkPlatStubsPtr->tk_MacSetEmbedHandler) /* 0 */
+#endif
+#ifndef Tk_MacTurnOffMenus
+#define Tk_MacTurnOffMenus \
+ (tkPlatStubsPtr->tk_MacTurnOffMenus) /* 1 */
+#endif
+#ifndef Tk_MacTkOwnsCursor
+#define Tk_MacTkOwnsCursor \
+ (tkPlatStubsPtr->tk_MacTkOwnsCursor) /* 2 */
+#endif
+#ifndef TkMacInitMenus
+#define TkMacInitMenus \
+ (tkPlatStubsPtr->tkMacInitMenus) /* 3 */
+#endif
+#ifndef TkMacInitAppleEvents
+#define TkMacInitAppleEvents \
+ (tkPlatStubsPtr->tkMacInitAppleEvents) /* 4 */
+#endif
+#ifndef TkMacConvertEvent
+#define TkMacConvertEvent \
+ (tkPlatStubsPtr->tkMacConvertEvent) /* 5 */
+#endif
+#ifndef TkMacConvertTkEvent
+#define TkMacConvertTkEvent \
+ (tkPlatStubsPtr->tkMacConvertTkEvent) /* 6 */
+#endif
+#ifndef TkGenWMConfigureEvent
+#define TkGenWMConfigureEvent \
+ (tkPlatStubsPtr->tkGenWMConfigureEvent) /* 7 */
+#endif
+#ifndef TkMacInvalClipRgns
+#define TkMacInvalClipRgns \
+ (tkPlatStubsPtr->tkMacInvalClipRgns) /* 8 */
+#endif
+#ifndef TkMacHaveAppearance
+#define TkMacHaveAppearance \
+ (tkPlatStubsPtr->tkMacHaveAppearance) /* 9 */
+#endif
+#ifndef TkMacGetDrawablePort
+#define TkMacGetDrawablePort \
+ (tkPlatStubsPtr->tkMacGetDrawablePort) /* 10 */
+#endif
+#endif /* MAC_TCL */
+#ifdef MAC_OSX_TK
+#ifndef Tk_MacOSXSetEmbedHandler
+#define Tk_MacOSXSetEmbedHandler \
+ (tkPlatStubsPtr->tk_MacOSXSetEmbedHandler) /* 0 */
+#endif
+#ifndef Tk_MacOSXTurnOffMenus
+#define Tk_MacOSXTurnOffMenus \
+ (tkPlatStubsPtr->tk_MacOSXTurnOffMenus) /* 1 */
+#endif
+#ifndef Tk_MacOSXTkOwnsCursor
+#define Tk_MacOSXTkOwnsCursor \
+ (tkPlatStubsPtr->tk_MacOSXTkOwnsCursor) /* 2 */
+#endif
+#ifndef TkMacOSXInitMenus
+#define TkMacOSXInitMenus \
+ (tkPlatStubsPtr->tkMacOSXInitMenus) /* 3 */
+#endif
+#ifndef TkMacOSXInitAppleEvents
+#define TkMacOSXInitAppleEvents \
+ (tkPlatStubsPtr->tkMacOSXInitAppleEvents) /* 4 */
+#endif
+#ifndef TkGenWMConfigureEvent
+#define TkGenWMConfigureEvent \
+ (tkPlatStubsPtr->tkGenWMConfigureEvent) /* 5 */
+#endif
+#ifndef TkMacOSXInvalClipRgns
+#define TkMacOSXInvalClipRgns \
+ (tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */
+#endif
+#ifndef TkMacOSXGetDrawablePort
+#define TkMacOSXGetDrawablePort \
+ (tkPlatStubsPtr->tkMacOSXGetDrawablePort) /* 7 */
+#endif
+#ifndef TkMacOSXGetRootControl
+#define TkMacOSXGetRootControl \
+ (tkPlatStubsPtr->tkMacOSXGetRootControl) /* 8 */
+#endif
+#ifndef Tk_MacOSXSetupTkNotifier
+#define Tk_MacOSXSetupTkNotifier \
+ (tkPlatStubsPtr->tk_MacOSXSetupTkNotifier) /* 9 */
+#endif
+#ifndef Tk_MacOSXIsAppInFront
+#define Tk_MacOSXIsAppInFront \
+ (tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */
+#endif
+#endif /* MAC_OSX_TK */
+
+#endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */
+
+/* !END!: Do not edit above this line. */
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKPLATDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.m b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.m
new file mode 100644
index 00000000000..41dfafb4998
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.m
@@ -0,0 +1,114 @@
+#ifndef _TKPLATDECLS_VM
+#define _TKPLATDECLS_VM
+#include "tkPlatDecls_f.h"
+#ifndef NO_VTABLES
+#ifndef TkGenWMConfigureEvent
+# define TkGenWMConfigureEvent (*TkplatdeclsVptr->V_TkGenWMConfigureEvent)
+#endif
+
+#ifndef TkMacConvertEvent
+# define TkMacConvertEvent (*TkplatdeclsVptr->V_TkMacConvertEvent)
+#endif
+
+#ifndef TkMacConvertTkEvent
+# define TkMacConvertTkEvent (*TkplatdeclsVptr->V_TkMacConvertTkEvent)
+#endif
+
+#ifndef TkMacGetDrawablePort
+# define TkMacGetDrawablePort (*TkplatdeclsVptr->V_TkMacGetDrawablePort)
+#endif
+
+#ifndef TkMacHaveAppearance
+# define TkMacHaveAppearance (*TkplatdeclsVptr->V_TkMacHaveAppearance)
+#endif
+
+#ifndef TkMacInitAppleEvents
+# define TkMacInitAppleEvents (*TkplatdeclsVptr->V_TkMacInitAppleEvents)
+#endif
+
+#ifndef TkMacInitMenus
+# define TkMacInitMenus (*TkplatdeclsVptr->V_TkMacInitMenus)
+#endif
+
+#ifndef TkMacInvalClipRgns
+# define TkMacInvalClipRgns (*TkplatdeclsVptr->V_TkMacInvalClipRgns)
+#endif
+
+#ifndef TkMacOSXGetDrawablePort
+# define TkMacOSXGetDrawablePort (*TkplatdeclsVptr->V_TkMacOSXGetDrawablePort)
+#endif
+
+#ifndef TkMacOSXGetRootControl
+# define TkMacOSXGetRootControl (*TkplatdeclsVptr->V_TkMacOSXGetRootControl)
+#endif
+
+#ifndef TkMacOSXInitAppleEvents
+# define TkMacOSXInitAppleEvents (*TkplatdeclsVptr->V_TkMacOSXInitAppleEvents)
+#endif
+
+#ifndef TkMacOSXInitMenus
+# define TkMacOSXInitMenus (*TkplatdeclsVptr->V_TkMacOSXInitMenus)
+#endif
+
+#ifndef TkMacOSXInvalClipRgns
+# define TkMacOSXInvalClipRgns (*TkplatdeclsVptr->V_TkMacOSXInvalClipRgns)
+#endif
+
+#ifndef Tk_AttachHWND
+# define Tk_AttachHWND (*TkplatdeclsVptr->V_Tk_AttachHWND)
+#endif
+
+#ifndef Tk_GetHINSTANCE
+# define Tk_GetHINSTANCE (*TkplatdeclsVptr->V_Tk_GetHINSTANCE)
+#endif
+
+#ifndef Tk_GetHWND
+# define Tk_GetHWND (*TkplatdeclsVptr->V_Tk_GetHWND)
+#endif
+
+#ifndef Tk_HWNDToWindow
+# define Tk_HWNDToWindow (*TkplatdeclsVptr->V_Tk_HWNDToWindow)
+#endif
+
+#ifndef Tk_MacOSXIsAppInFront
+# define Tk_MacOSXIsAppInFront (*TkplatdeclsVptr->V_Tk_MacOSXIsAppInFront)
+#endif
+
+#ifndef Tk_MacOSXSetEmbedHandler
+# define Tk_MacOSXSetEmbedHandler (*TkplatdeclsVptr->V_Tk_MacOSXSetEmbedHandler)
+#endif
+
+#ifndef Tk_MacOSXSetupTkNotifier
+# define Tk_MacOSXSetupTkNotifier (*TkplatdeclsVptr->V_Tk_MacOSXSetupTkNotifier)
+#endif
+
+#ifndef Tk_MacOSXTkOwnsCursor
+# define Tk_MacOSXTkOwnsCursor (*TkplatdeclsVptr->V_Tk_MacOSXTkOwnsCursor)
+#endif
+
+#ifndef Tk_MacOSXTurnOffMenus
+# define Tk_MacOSXTurnOffMenus (*TkplatdeclsVptr->V_Tk_MacOSXTurnOffMenus)
+#endif
+
+#ifndef Tk_MacSetEmbedHandler
+# define Tk_MacSetEmbedHandler (*TkplatdeclsVptr->V_Tk_MacSetEmbedHandler)
+#endif
+
+#ifndef Tk_MacTkOwnsCursor
+# define Tk_MacTkOwnsCursor (*TkplatdeclsVptr->V_Tk_MacTkOwnsCursor)
+#endif
+
+#ifndef Tk_MacTurnOffMenus
+# define Tk_MacTurnOffMenus (*TkplatdeclsVptr->V_Tk_MacTurnOffMenus)
+#endif
+
+#ifndef Tk_PointerEvent
+# define Tk_PointerEvent (*TkplatdeclsVptr->V_Tk_PointerEvent)
+#endif
+
+#ifndef Tk_TranslateWinEvent
+# define Tk_TranslateWinEvent (*TkplatdeclsVptr->V_Tk_TranslateWinEvent)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKPLATDECLS_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.t b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.t
new file mode 100644
index 00000000000..162ddc59545
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls.t
@@ -0,0 +1,190 @@
+#ifdef _TKPLATDECLS
+#ifndef TkGenWMConfigureEvent
+#ifdef MAC_OSX_TK
+VFUNC(void,TkGenWMConfigureEvent,V_TkGenWMConfigureEvent,_ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y, int width, int height,
+ int flags)))
+#endif /* #ifdef MAC_OSX_TK */
+#ifdef MAC_TCL
+VFUNC(void,TkGenWMConfigureEvent,V_TkGenWMConfigureEvent,_ANSI_ARGS_((Tk_Window tkwin,
+ int x, int y, int width, int height,
+ int flags)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkGenWMConfigureEvent */
+
+#ifndef TkMacConvertEvent
+#ifdef MAC_TCL
+VFUNC(int,TkMacConvertEvent,V_TkMacConvertEvent,_ANSI_ARGS_((
+ EventRecord * eventPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacConvertEvent */
+
+#ifndef TkMacConvertTkEvent
+#ifdef MAC_TCL
+VFUNC(int,TkMacConvertTkEvent,V_TkMacConvertTkEvent,_ANSI_ARGS_((
+ EventRecord * eventPtr, Window window)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacConvertTkEvent */
+
+#ifndef TkMacGetDrawablePort
+#ifdef MAC_TCL
+VFUNC(GWorldPtr,TkMacGetDrawablePort,V_TkMacGetDrawablePort,_ANSI_ARGS_((Drawable drawable)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacGetDrawablePort */
+
+#ifndef TkMacHaveAppearance
+#ifdef MAC_TCL
+VFUNC(int,TkMacHaveAppearance,V_TkMacHaveAppearance,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacHaveAppearance */
+
+#ifndef TkMacInitAppleEvents
+#ifdef MAC_TCL
+VFUNC(void,TkMacInitAppleEvents,V_TkMacInitAppleEvents,_ANSI_ARGS_((
+ Tcl_Interp * interp)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacInitAppleEvents */
+
+#ifndef TkMacInitMenus
+#ifdef MAC_TCL
+VFUNC(void,TkMacInitMenus,V_TkMacInitMenus,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacInitMenus */
+
+#ifndef TkMacInvalClipRgns
+#ifdef MAC_TCL
+VFUNC(void,TkMacInvalClipRgns,V_TkMacInvalClipRgns,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef TkMacInvalClipRgns */
+
+#ifndef TkMacOSXGetDrawablePort
+#ifdef MAC_OSX_TK
+VFUNC(GWorldPtr,TkMacOSXGetDrawablePort,V_TkMacOSXGetDrawablePort,_ANSI_ARGS_((
+ Drawable drawable)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXGetDrawablePort */
+
+#ifndef TkMacOSXGetRootControl
+#ifdef MAC_OSX_TK
+VFUNC(ControlRef,TkMacOSXGetRootControl,V_TkMacOSXGetRootControl,_ANSI_ARGS_((
+ Drawable drawable)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXGetRootControl */
+
+#ifndef TkMacOSXInitAppleEvents
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXInitAppleEvents,V_TkMacOSXInitAppleEvents,_ANSI_ARGS_((
+ Tcl_Interp * interp)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXInitAppleEvents */
+
+#ifndef TkMacOSXInitMenus
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXInitMenus,V_TkMacOSXInitMenus,_ANSI_ARGS_((Tcl_Interp * interp)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXInitMenus */
+
+#ifndef TkMacOSXInvalClipRgns
+#ifdef MAC_OSX_TK
+VFUNC(void,TkMacOSXInvalClipRgns,V_TkMacOSXInvalClipRgns,_ANSI_ARGS_((TkWindow * winPtr)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef TkMacOSXInvalClipRgns */
+
+#ifndef Tk_AttachHWND
+#ifdef __WIN32__
+VFUNC(Window,Tk_AttachHWND,V_Tk_AttachHWND,_ANSI_ARGS_((Tk_Window tkwin,
+ HWND hwnd)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef Tk_AttachHWND */
+
+#ifndef Tk_GetHINSTANCE
+#ifdef __WIN32__
+VFUNC(HINSTANCE,Tk_GetHINSTANCE,V_Tk_GetHINSTANCE,_ANSI_ARGS_((void)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef Tk_GetHINSTANCE */
+
+#ifndef Tk_GetHWND
+#ifdef __WIN32__
+VFUNC(HWND,Tk_GetHWND,V_Tk_GetHWND,_ANSI_ARGS_((Window window)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef Tk_GetHWND */
+
+#ifndef Tk_HWNDToWindow
+#ifdef __WIN32__
+VFUNC(Tk_Window,Tk_HWNDToWindow,V_Tk_HWNDToWindow,_ANSI_ARGS_((HWND hwnd)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef Tk_HWNDToWindow */
+
+#ifndef Tk_MacOSXIsAppInFront
+#ifdef MAC_OSX_TK
+VFUNC(int,Tk_MacOSXIsAppInFront,V_Tk_MacOSXIsAppInFront,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef Tk_MacOSXIsAppInFront */
+
+#ifndef Tk_MacOSXSetEmbedHandler
+#ifdef MAC_OSX_TK
+VFUNC(void,Tk_MacOSXSetEmbedHandler,V_Tk_MacOSXSetEmbedHandler,_ANSI_ARGS_((
+ Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr,
+ Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr,
+ Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr,
+ Tk_MacOSXEmbedGetClipProc * getClipProc,
+ Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef Tk_MacOSXSetEmbedHandler */
+
+#ifndef Tk_MacOSXSetupTkNotifier
+#ifdef MAC_OSX_TK
+VFUNC(void,Tk_MacOSXSetupTkNotifier,V_Tk_MacOSXSetupTkNotifier,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef Tk_MacOSXSetupTkNotifier */
+
+#ifndef Tk_MacOSXTkOwnsCursor
+#ifdef MAC_OSX_TK
+VFUNC(void,Tk_MacOSXTkOwnsCursor,V_Tk_MacOSXTkOwnsCursor,_ANSI_ARGS_((int tkOwnsIt)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef Tk_MacOSXTkOwnsCursor */
+
+#ifndef Tk_MacOSXTurnOffMenus
+#ifdef MAC_OSX_TK
+VFUNC(void,Tk_MacOSXTurnOffMenus,V_Tk_MacOSXTurnOffMenus,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_OSX_TK */
+#endif /* #ifndef Tk_MacOSXTurnOffMenus */
+
+#ifndef Tk_MacSetEmbedHandler
+#ifdef MAC_TCL
+VFUNC(void,Tk_MacSetEmbedHandler,V_Tk_MacSetEmbedHandler,_ANSI_ARGS_((
+ Tk_MacEmbedRegisterWinProc * registerWinProcPtr,
+ Tk_MacEmbedGetGrafPortProc * getPortProcPtr,
+ Tk_MacEmbedMakeContainerExistProc * containerExistProcPtr,
+ Tk_MacEmbedGetClipProc * getClipProc,
+ Tk_MacEmbedGetOffsetInParentProc * getOffsetProc)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef Tk_MacSetEmbedHandler */
+
+#ifndef Tk_MacTkOwnsCursor
+#ifdef MAC_TCL
+VFUNC(void,Tk_MacTkOwnsCursor,V_Tk_MacTkOwnsCursor,_ANSI_ARGS_((int tkOwnsIt)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef Tk_MacTkOwnsCursor */
+
+#ifndef Tk_MacTurnOffMenus
+#ifdef MAC_TCL
+VFUNC(void,Tk_MacTurnOffMenus,V_Tk_MacTurnOffMenus,_ANSI_ARGS_((void)))
+#endif /* #ifdef MAC_TCL */
+#endif /* #ifndef Tk_MacTurnOffMenus */
+
+#ifndef Tk_PointerEvent
+#ifdef __WIN32__
+VFUNC(void,Tk_PointerEvent,V_Tk_PointerEvent,_ANSI_ARGS_((HWND hwnd, int x, int y)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef Tk_PointerEvent */
+
+#ifndef Tk_TranslateWinEvent
+#ifdef __WIN32__
+VFUNC(int,Tk_TranslateWinEvent,V_Tk_TranslateWinEvent,_ANSI_ARGS_((HWND hwnd,
+ UINT message, WPARAM wParam, LPARAM lParam,
+ LRESULT * result)))
+#endif /* #ifdef __WIN32__ */
+#endif /* #ifndef Tk_TranslateWinEvent */
+
+#endif /* _TKPLATDECLS */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls_f.h
new file mode 100644
index 00000000000..8608bfb276f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPlatDecls_f.h
@@ -0,0 +1,15 @@
+#ifndef TKPLATDECLS_VT
+#define TKPLATDECLS_VT
+#include "tkPlatDecls.h"
+typedef struct TkplatdeclsVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkPlatDecls.t"
+#undef VFUNC
+#undef VVAR
+} TkplatdeclsVtab;
+extern TkplatdeclsVtab *TkplatdeclsVptr;
+extern TkplatdeclsVtab *TkplatdeclsVGet(void);
+#endif /* TKPLATDECLS_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkPort.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPort.h
new file mode 100644
index 00000000000..acaf7703740
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkPort.h
@@ -0,0 +1,53 @@
+/*
+ * tkPort.h --
+ *
+ * This header file handles porting issues that occur because of
+ * differences between systems. It reads in platform specific
+ * portability files.
+ *
+ * Copyright (c) 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkPort.h,v 1.3 2002/08/31 06:12:26 das Exp $
+ */
+
+#ifndef _TKPORT
+#define _TKPORT
+
+#if defined(__WIN32__) || defined(_WIN32)
+#define NEED_REAL_STDIO
+#endif
+
+#ifndef _Lang
+#include "Lang.h"
+#endif
+
+#if defined(__WIN32__) && !defined(WIN32)
+#define WIN32
+#endif
+
+#if defined(__WIN32__) || defined(_WIN32)
+# include "tkWinPort.h"
+# ifndef strcasecmp
+# define strcasecmp(a,b) stricmp(a,b)
+# endif
+# ifdef __CYGWIN__
+# undef strcasecmp
+# endif
+#else
+# if defined(MAC_TCL)
+# include "tkMacPort.h"
+# elif defined(MAC_OSX_TK)
+# include "../macosx/tkMacOSXPort.h"
+# else
+# ifdef __PM__
+# include "tkOS2Port.h"
+# else
+# include "tkUnixPort.h"
+# endif
+# endif
+#endif
+
+#endif /* _TKPORT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkScale.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkScale.h
new file mode 100644
index 00000000000..7936adfb18c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkScale.h
@@ -0,0 +1,257 @@
+/*
+ * tkScale.h --
+ *
+ * Declarations of types and functions used to implement
+ * the scale widget.
+ *
+ * Copyright (c) 1996 by Sun Microsystems, Inc.
+ * Copyright (c) 1999-2000 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkScale.h,v 1.8 2000/04/14 08:33:16 hobbs Exp $
+ */
+
+#ifndef _TKSCALE
+#define _TKSCALE
+
+#ifndef _TK
+#include "tk.h"
+#endif
+#include "tkVMacro.h"
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Legal values for the "orient" field of TkScale records.
+ */
+
+enum orient {
+ ORIENT_HORIZONTAL, ORIENT_VERTICAL
+};
+
+/*
+ * Legal values for the "state" field of TkScale records.
+ */
+
+enum state {
+ STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
+};
+
+/*
+ * A data structure of the following type is kept for each scale
+ * widget managed by this file:
+ */
+
+typedef struct TkScale {
+ Tk_Window tkwin; /* Window that embodies the scale. NULL
+ * means that the window has been destroyed
+ * but the data structures haven't yet been
+ * cleaned up.*/
+ Display *display; /* Display containing widget. Used, among
+ * other things, so that resources can be
+ * freed even after tkwin has gone away. */
+ Tcl_Interp *interp; /* Interpreter associated with scale. */
+ Tcl_Command widgetCmd; /* Token for scale's widget command. */
+ Tk_OptionTable optionTable; /* Table that defines configuration options
+ * available for this widget. */
+ enum orient orient; /* Orientation for window (vertical or
+ * horizontal). */
+ int width; /* Desired narrow dimension of scale,
+ * in pixels. */
+ int length; /* Desired long dimension of scale,
+ * in pixels. */
+ double value; /* Current value of scale. */
+ Tcl_Obj *varNamePtr; /* Name of variable or NULL.
+ * If non-NULL, scale's value tracks
+ * the contents of this variable and
+ * vice versa. */
+ double fromValue; /* Value corresponding to left or top of
+ * scale. */
+ double toValue; /* Value corresponding to right or bottom
+ * of scale. */
+ double tickInterval; /* Distance between tick marks;
+ * 0 means don't display any tick marks. */
+ double resolution; /* If > 0, all values are rounded to an
+ * even multiple of this value. */
+ int digits; /* Number of significant digits to print
+ * in values. 0 means we get to choose the
+ * number based on resolution and/or the
+ * range of the scale. */
+ char format[10]; /* Sprintf conversion specifier computed from
+ * digits and other information. */
+ double bigIncrement; /* Amount to use for large increments to
+ * scale value. (0 means we pick a value). */
+ Tcl_Obj *command; /* Command prefix to use when invoking Tcl
+ * commands because the scale value changed.
+ * NULL means don't invoke commands. */
+ int repeatDelay; /* How long to wait before auto-repeating
+ * on scrolling actions (in ms). */
+ int repeatInterval; /* Interval between autorepeats (in ms). */
+ char *label; /* Label to display above or to right of
+ * scale; NULL means don't display a label. */
+ int labelLength; /* Number of non-NULL chars. in label. */
+ enum state state; /* Values are active, normal, or disabled.
+ * Value of scale cannot be changed when
+ * disabled. */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ int borderWidth; /* Width of 3-D border around window. */
+ Tk_3DBorder bgBorder; /* Used for drawing slider and other
+ * background areas. */
+ Tk_3DBorder activeBorder; /* For drawing the slider when active. */
+ int sliderRelief; /* Is slider to be drawn raised, sunken,
+ * etc. */
+ XColor *troughColorPtr; /* Color for drawing trough. */
+ GC troughGC; /* For drawing trough. */
+ GC copyGC; /* Used for copying from pixmap onto screen. */
+ Tk_Font tkfont; /* Information about text font, or NULL. */
+ XColor *textColorPtr; /* Color for drawing text. */
+ GC textGC; /* GC for drawing text in normal mode. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ Tk_3DBorder highlightBorder;/* Value of -highlightbackground option:
+ * specifies background with which to draw 3-D
+ * default ring and focus highlight area when
+ * highlight is off. */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ int inset; /* Total width of all borders, including
+ * traversal highlight and 3-D border.
+ * Indicates how much interior stuff must
+ * be offset from outside edges to leave
+ * room for borders. */
+ int sliderLength; /* Length of slider, measured in pixels along
+ * long dimension of scale. */
+ int showValue; /* Non-zero means to display the scale value
+ * below or to the left of the slider; zero
+ * means don't display the value. */
+
+ /*
+ * Layout information for horizontal scales, assuming that window
+ * gets the size it requested:
+ */
+
+ int horizLabelY; /* Y-coord at which to draw label. */
+ int horizValueY; /* Y-coord at which to draw value text. */
+ int horizTroughY; /* Y-coord of top of slider trough. */
+ int horizTickY; /* Y-coord at which to draw tick text. */
+ /*
+ * Layout information for vertical scales, assuming that window
+ * gets the size it requested:
+ */
+
+ int vertTickRightX; /* X-location of right side of tick-marks. */
+ int vertValueRightX; /* X-location of right side of value string. */
+ int vertTroughX; /* X-location of scale's slider trough. */
+ int vertLabelX; /* X-location of origin of label. */
+
+ /*
+ * Miscellaneous information:
+ */
+
+ int fontHeight; /* Height of scale font. */
+ Tk_Cursor cursor; /* Current cursor for window, or None. */
+ Tcl_Obj *takeFocusPtr; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. May be NULL. */
+ int flags; /* Various flags; see below for
+ * definitions. */
+} TkScale;
+
+/*
+ * Flag bits for scales:
+ *
+ * REDRAW_SLIDER - 1 means slider (and numerical readout) need
+ * to be redrawn.
+ * REDRAW_OTHER - 1 means other stuff besides slider and value
+ * need to be redrawn.
+ * REDRAW_ALL - 1 means the entire widget needs to be redrawn.
+ * REDRAW_PENDING - 1 means any sort of redraw is pending
+ * ACTIVE - 1 means the widget is active (the mouse is
+ * in its window).
+ * INVOKE_COMMAND - 1 means the scale's command needs to be
+ * invoked during the next redisplay (the
+ * value of the scale has changed since the
+ * last time the command was invoked).
+ * SETTING_VAR - 1 means that the associated variable is
+ * being set by us, so there's no need for
+ * ScaleVarProc to do anything.
+ * NEVER_SET - 1 means that the scale's value has never
+ * been set before (so must invoke -command and
+ * set associated variable even if the value
+ * doesn't appear to have changed).
+ * GOT_FOCUS - 1 means that the focus is currently in
+ * this widget.
+ * SCALE_DELETED - 1 means the scale widget is being deleted
+ */
+
+#define REDRAW_SLIDER (1<<0)
+#define REDRAW_OTHER (1<<1)
+#define REDRAW_ALL (REDRAW_OTHER|REDRAW_SLIDER)
+#define REDRAW_PENDING (1<<2)
+#define ACTIVE (1<<3)
+#define INVOKE_COMMAND (1<<4)
+#define SETTING_VAR (1<<5)
+#define NEVER_SET (1<<6)
+#define GOT_FOCUS (1<<7)
+#define SCALE_DELETED (1<<8)
+
+/*
+ * Symbolic values for the active parts of a slider. These are
+ * the values that may be returned by the ScaleElement procedure.
+ */
+
+#define OTHER 0
+#define TROUGH1 1
+#define SLIDER 2
+#define TROUGH2 3
+
+/*
+ * Space to leave between scale area and text, and between text and
+ * edge of window.
+ */
+
+#define SPACING 2
+
+/*
+ * How many characters of space to provide when formatting the
+ * scale's value:
+ */
+
+#define PRINT_CHARS 150
+
+/*
+ * Declaration of procedures used in the implementation of the scale
+ * widget.
+ */
+
+EXTERN void TkEventuallyRedrawScale _ANSI_ARGS_((TkScale *scalePtr,
+ int what));
+EXTERN double TkRoundToResolution _ANSI_ARGS_((TkScale *scalePtr,
+ double value));
+EXTERN TkScale * TkpCreateScale _ANSI_ARGS_((Tk_Window tkwin));
+EXTERN void TkpDestroyScale _ANSI_ARGS_((TkScale *scalePtr));
+EXTERN void TkpDisplayScale _ANSI_ARGS_((ClientData clientData));
+EXTERN int TkpScaleElement _ANSI_ARGS_((TkScale *scalePtr,
+ int x, int y));
+EXTERN void TkScaleSetValue _ANSI_ARGS_((TkScale *scalePtr,
+ double value, int setVar, int invokeCommand));
+EXTERN double TkScalePixelToValue _ANSI_ARGS_((TkScale *scalePtr,
+ int x, int y));
+EXTERN int TkScaleValueToPixel _ANSI_ARGS_((TkScale *scalePtr,
+ double value));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKSCALE */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkScrollbar.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkScrollbar.h
new file mode 100644
index 00000000000..bf2472fad06
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkScrollbar.h
@@ -0,0 +1,209 @@
+/*
+ * tkScrollbar.h --
+ *
+ * Declarations of types and functions used to implement
+ * the scrollbar widget.
+ *
+ * Copyright (c) 1996 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkScrollbar.h,v 1.6 2000/11/22 01:49:38 ericm Exp $
+ */
+
+#ifndef _TKSCROLLBAR
+#define _TKSCROLLBAR
+
+#ifndef _TKINT
+#include "tkInt.h"
+#endif
+#include "tkVMacro.h"
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * A data structure of the following type is kept for each scrollbar
+ * widget.
+ */
+
+typedef struct TkScrollbar {
+ Tk_Window tkwin; /* Window that embodies the scrollbar. NULL
+ * means that the window has been destroyed
+ * but the data structures haven't yet been
+ * cleaned up.*/
+ Display *display; /* Display containing widget. Used, among
+ * other things, so that resources can be
+ * freed even after tkwin has gone away. */
+ Tcl_Interp *interp; /* Interpreter associated with scrollbar. */
+ Tcl_Command widgetCmd; /* Token for scrollbar's widget command. */
+ int vertical; /* Non-zero means vertical orientation
+ * requested, zero means horizontal. */
+ int width; /* Desired narrow dimension of scrollbar,
+ * in pixels. */
+ LangCallback *command; /* Command prefix to use when invoking
+ * scrolling commands. NULL means don't
+ * invoke commands. Malloc'ed. */
+#if 0
+ int commandSize; /* Number of non-NULL bytes in command. */
+#endif
+ int repeatDelay; /* How long to wait before auto-repeating
+ * on scrolling actions (in ms). */
+ int repeatInterval; /* Interval between autorepeats (in ms). */
+ int jump; /* Value of -jump option. */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ int borderWidth; /* Width of 3-D borders. */
+ Tk_3DBorder bgBorder; /* Used for drawing background (all flat
+ * surfaces except for trough). */
+ Tk_3DBorder activeBorder; /* For drawing backgrounds when active (i.e.
+ * when mouse is positioned over element). */
+ XColor *troughColorPtr; /* Color for drawing trough. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ XColor *highlightBgColorPtr;
+ /* Color for drawing traversal highlight
+ * area when highlight is off. */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ int inset; /* Total width of all borders, including
+ * traversal highlight and 3-D border.
+ * Indicates how much interior stuff must
+ * be offset from outside edges to leave
+ * room for borders. */
+ int elementBorderWidth; /* Width of border to draw around elements
+ * inside scrollbar (arrows and slider).
+ * -1 means use borderWidth. */
+ int arrowLength; /* Length of arrows along long dimension of
+ * scrollbar, including space for a small gap
+ * between the arrow and the slider.
+ * Recomputed on window size changes. */
+ int sliderFirst; /* Pixel coordinate of top or left edge
+ * of slider area, including border. */
+ int sliderLast; /* Coordinate of pixel just after bottom
+ * or right edge of slider area, including
+ * border. */
+ int activeField; /* Names field to be displayed in active
+ * colors, such as TOP_ARROW, or 0 for
+ * no field. */
+ int activeRelief; /* Value of -activeRelief option: relief
+ * to use for active element. */
+
+ /*
+ * Information describing the application related to the scrollbar.
+ * This information is provided by the application by invoking the
+ * "set" widget command. This information can now be provided in
+ * two ways: the "old" form (totalUnits, windowUnits, firstUnit,
+ * and lastUnit), or the "new" form (firstFraction and lastFraction).
+ * FirstFraction and lastFraction will always be valid, but
+ * the old-style information is only valid if the NEW_STYLE_COMMANDS
+ * flag is 0.
+ */
+
+ int totalUnits; /* Total dimension of application, in
+ * units. Valid only if the NEW_STYLE_COMMANDS
+ * flag isn't set. */
+ int windowUnits; /* Maximum number of units that can be
+ * displayed in the window at once. Valid
+ * only if the NEW_STYLE_COMMANDS flag isn't
+ * set. */
+ int firstUnit; /* Number of last unit visible in
+ * application's window. Valid only if the
+ * NEW_STYLE_COMMANDS flag isn't set. */
+ int lastUnit; /* Index of last unit visible in window.
+ * Valid only if the NEW_STYLE_COMMANDS
+ * flag isn't set. */
+ double firstFraction; /* Position of first visible thing in window,
+ * specified as a fraction between 0 and
+ * 1.0. */
+ double lastFraction; /* Position of last visible thing in window,
+ * specified as a fraction between 0 and
+ * 1.0. */
+
+ /*
+ * Miscellaneous information:
+ */
+
+ Tk_Cursor cursor; /* Current cursor for window, or None. */
+ char *takeFocus; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+ int flags; /* Various flags; see below for
+ * definitions. */
+} TkScrollbar;
+
+/*
+ * Legal values for "activeField" field of Scrollbar structures. These
+ * are also the return values from the ScrollbarPosition procedure.
+ */
+
+#define OUTSIDE 0
+#define TOP_ARROW 1
+#define TOP_GAP 2
+#define SLIDER 3
+#define BOTTOM_GAP 4
+#define BOTTOM_ARROW 5
+
+/*
+ * Flag bits for scrollbars:
+ *
+ * REDRAW_PENDING: Non-zero means a DoWhenIdle handler
+ * has already been queued to redraw
+ * this window.
+ * NEW_STYLE_COMMANDS: Non-zero means the new style of commands
+ * should be used to communicate with the
+ * widget: ".t yview scroll 2 lines", instead
+ * of ".t yview 40", for example.
+ * GOT_FOCUS: Non-zero means this window has the input
+ * focus.
+ */
+
+#define REDRAW_PENDING 1
+#define NEW_STYLE_COMMANDS 2
+#define GOT_FOCUS 4
+
+/*
+ * Declaration of scrollbar class procedures structure.
+ */
+
+extern Tk_ClassProcs tkpScrollbarProcs;
+
+/*
+ * Declaration of scrollbar configuration options.
+ */
+
+extern Tk_ConfigSpec tkpScrollbarConfigSpecs[];
+
+/*
+ * Declaration of procedures used in the implementation of the scrollbar
+ * widget.
+ */
+
+EXTERN void TkScrollbarEventProc _ANSI_ARGS_((
+ ClientData clientData, XEvent *eventPtr));
+EXTERN void TkScrollbarEventuallyRedraw _ANSI_ARGS_((
+ TkScrollbar *scrollPtr));
+EXTERN void TkpComputeScrollbarGeometry _ANSI_ARGS_((
+ TkScrollbar *scrollPtr));
+EXTERN TkScrollbar * TkpCreateScrollbar _ANSI_ARGS_((Tk_Window tkwin));
+EXTERN void TkpDestroyScrollbar _ANSI_ARGS_((
+ TkScrollbar *scrollPtr));
+EXTERN void TkpDisplayScrollbar _ANSI_ARGS_((
+ ClientData clientData));
+EXTERN void TkpConfigureScrollbar _ANSI_ARGS_((
+ TkScrollbar *scrollPtr));
+EXTERN int TkpScrollbarPosition _ANSI_ARGS_((
+ TkScrollbar *scrollPtr, int x, int y));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKSCROLLBAR */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkSelect.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkSelect.h
new file mode 100644
index 00000000000..7ea06bb84bb
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkSelect.h
@@ -0,0 +1,187 @@
+/*
+ * tkSelect.h --
+ *
+ * Declarations of types shared among the files that implement
+ * selection support.
+ *
+ * Copyright (c) 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkSelect.h,v 1.4 1999/05/25 20:40:54 stanton Exp $
+ */
+
+#ifndef _TKSELECT
+#define _TKSELECT
+
+/*
+ * When a selection is owned by a window on a given display, one of the
+ * following structures is present on a list of current selections in the
+ * display structure. The structure is used to record the current owner of
+ * a selection for use in later retrieval requests. There is a list of
+ * such structures because a display can have multiple different selections
+ * active at the same time.
+ */
+
+typedef struct TkSelectionInfo {
+ Atom selection; /* Selection name, e.g. XA_PRIMARY. */
+ Tk_Window owner; /* Current owner of this selection. */
+ int serial; /* Serial number of last XSelectionSetOwner
+ * request made to server for this
+ * selection (used to filter out redundant
+ * SelectionClear events). */
+ Time time; /* Timestamp used to acquire selection. */
+ Tk_LostSelProc *clearProc; /* Procedure to call when owner loses
+ * selection. */
+ ClientData clearData; /* Info to pass to clearProc. */
+ struct TkSelectionInfo *nextPtr;
+ /* Next in list of current selections on
+ * this display. NULL means end of list */
+} TkSelectionInfo;
+
+/*
+ * One of the following structures exists for each selection handler
+ * created for a window by calling Tk_CreateSelHandler. The handlers
+ * are linked in a list rooted in the TkWindow structure.
+ */
+
+typedef struct TkSelHandler {
+ Atom selection; /* Selection name, e.g. XA_PRIMARY */
+ Atom target; /* Target type for selection
+ * conversion, such as TARGETS or
+ * STRING. */
+ Atom format; /* Format in which selection
+ * info will be returned, such
+ * as STRING or ATOM. */
+ Tk_XSelectionProc *proc; /* Procedure to generate selection
+ * in this format. */
+ ClientData clientData; /* Argument to pass to proc. */
+ int size; /* Size of units returned by proc
+ * (8 for STRING, 32 for almost
+ * anything else). */
+ struct TkSelHandler *nextPtr;
+ /* Next selection handler associated
+ * with same window (NULL for end of
+ * list). */
+} TkSelHandler;
+
+/*
+ * When the selection is being retrieved, one of the following
+ * structures is present on a list of pending selection retrievals.
+ * The structure is used to communicate between the background
+ * procedure that requests the selection and the foreground
+ * event handler that processes the events in which the selection
+ * is returned. There is a list of such structures so that there
+ * can be multiple simultaneous selection retrievals (e.g. on
+ * different displays).
+ */
+
+typedef struct TkSelRetrievalInfo {
+ Tcl_Interp *interp; /* Interpreter for error reporting. */
+ TkWindow *winPtr; /* Window used as requestor for
+ * selection. */
+ Atom selection; /* Selection being requested. */
+ Atom property; /* Property where selection will appear. */
+ Atom target; /* Desired form for selection. */
+ Tk_GetXSelProc *proc; /* Procedure to call to handle pieces
+ * of selection. */
+ ClientData clientData; /* Argument for proc. */
+ int result; /* Initially -1. Set to a Tcl
+ * return value once the selection
+ * has been retrieved. */
+ Tcl_TimerToken timeout; /* Token for current timeout procedure. */
+ int idleTime; /* Number of seconds that have gone by
+ * without hearing anything from the
+ * selection owner. */
+ Tcl_EncodingState encState; /* Holds intermediate state during translations
+ * of data that cross buffer boundaries. */
+ int encFlags; /* Encoding translation state flags. */
+ Tcl_DString buf; /* Buffer to hold translation data. */
+ struct TkSelRetrievalInfo *nextPtr;
+ /* Next in list of all pending
+ * selection retrievals. NULL means
+ * end of list. */
+} TkSelRetrievalInfo;
+
+/*
+ * The clipboard contains a list of buffers of various types and formats.
+ * All of the buffers of a given type will be returned in sequence when the
+ * CLIPBOARD selection is retrieved. All buffers of a given type on the
+ * same clipboard must have the same format. The TkClipboardTarget structure
+ * is used to record the information about a chain of buffers of the same
+ * type.
+ */
+
+typedef struct TkClipboardBuffer {
+ char *buffer; /* Null terminated data buffer. */
+ long length; /* Length of string in buffer. */
+ struct TkClipboardBuffer *nextPtr; /* Next in list of buffers. NULL
+ * means end of list . */
+} TkClipboardBuffer;
+
+typedef struct TkClipboardTarget {
+ Atom type; /* Type conversion supported. */
+ Atom format; /* Representation used for data. */
+ TkClipboardBuffer *firstBufferPtr; /* First in list of data buffers. */
+ TkClipboardBuffer *lastBufferPtr; /* Last in list of clipboard buffers.
+ * Used to speed up appends. */
+ struct TkClipboardTarget *nextPtr; /* Next in list of targets on
+ * clipboard. NULL means end of
+ * list. */
+} TkClipboardTarget;
+
+/*
+ * It is possible for a Tk_SelectionProc to delete the handler that it
+ * represents. If this happens, the code that is retrieving the selection
+ * needs to know about it so it doesn't use the now-defunct handler
+ * structure. One structure of the following form is created for each
+ * retrieval in progress, so that the retriever can find out if its
+ * handler is deleted. All of the pending retrievals (if there are more
+ * than one) are linked into a list.
+ */
+
+typedef struct TkSelInProgress {
+ TkSelHandler *selPtr; /* Handler being executed. If this handler
+ * is deleted, the field is set to NULL. */
+ struct TkSelInProgress *nextPtr;
+ /* Next higher nested search. */
+} TkSelInProgress;
+
+/*
+ * Chunk size for retrieving selection. It's defined both in
+ * words and in bytes; the word size is used to allocate
+ * buffer space that's guaranteed to be word-aligned and that
+ * has an extra character for the terminating NULL.
+ */
+
+#define TK_SEL_BYTES_AT_ONCE 4000
+#define TK_SEL_WORDS_AT_ONCE 1001
+
+/*
+ * Declarations for procedures that are used by the selection-related files
+ * but shouldn't be used anywhere else in Tk (or by Tk clients):
+ */
+
+extern TkSelInProgress *
+ TkSelGetInProgress _ANSI_ARGS_((void));
+extern void TkSelSetInProgress _ANSI_ARGS_((
+ TkSelInProgress *pendingPtr));
+
+extern void TkSelClearSelection _ANSI_ARGS_((Tk_Window tkwin,
+ XEvent *eventPtr));
+extern int TkSelDefaultSelection _ANSI_ARGS_((
+ TkSelectionInfo *infoPtr, Atom target,
+ long *lbuffer, int maxBytes, Atom *typePtr, int *formatPtr));
+extern int TkSelGetSelection _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, Atom selection, Atom target,
+ Tk_GetXSelProc *proc, ClientData clientData));
+char * TkSelCvtFromX _ANSI_ARGS_((long *propPtr, int numValues,
+ Atom type, Tk_Window tkwin));
+int TkSelCvtToX _ANSI_ARGS_((long *buffer, char *string, Atom type,
+ Tk_Window tkwin, int maxBytes));
+#ifndef TkSelUpdateClipboard
+extern void TkSelUpdateClipboard _ANSI_ARGS_((TkWindow *winPtr,
+ TkClipboardTarget *targetPtr));
+#endif
+#endif /* _TKSELECT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkText.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkText.h
new file mode 100644
index 00000000000..0c715b6986e
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkText.h
@@ -0,0 +1,927 @@
+/*
+ * tkText.h --
+ *
+ * Declarations shared among the files that implement text
+ * widgets.
+ *
+ * Copyright (c) 1992-1994 The Regents of the University of California.
+ * Copyright (c) 1994-1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkText.h,v 1.13 2002/12/27 23:43:38 davygrvy Exp $
+ */
+
+#ifndef _TKTEXT
+#define _TKTEXT
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+#ifndef _TKUNDO
+#include "tkUndo.h"
+#endif
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * Opaque types for structures whose guts are only needed by a single
+ * file:
+ */
+
+typedef struct TkTextBTree_ *TkTextBTree;
+
+/*
+ * The data structure below defines a single line of text (from newline
+ * to newline, not necessarily what appears on one line of the screen).
+ */
+
+typedef struct TkTextLine {
+ struct Node *parentPtr; /* Pointer to parent node containing
+ * line. */
+ struct TkTextLine *nextPtr; /* Next in linked list of lines with
+ * same parent node in B-tree. NULL
+ * means end of list. */
+ struct TkTextSegment *segPtr; /* First in ordered list of segments
+ * that make up the line. */
+} TkTextLine;
+
+/*
+ * -----------------------------------------------------------------------
+ * Segments: each line is divided into one or more segments, where each
+ * segment is one of several things, such as a group of characters, a
+ * tag toggle, a mark, or an embedded widget. Each segment starts with
+ * a standard header followed by a body that varies from type to type.
+ * -----------------------------------------------------------------------
+ */
+
+/*
+ * The data structure below defines the body of a segment that represents
+ * a tag toggle. There is one of these structures at both the beginning
+ * and end of each tagged range.
+ */
+
+typedef struct TkTextToggle {
+ struct TkTextTag *tagPtr; /* Tag that starts or ends here. */
+ int inNodeCounts; /* 1 means this toggle has been
+ * accounted for in node toggle
+ * counts; 0 means it hasn't, yet. */
+} TkTextToggle;
+
+/*
+ * The data structure below defines line segments that represent
+ * marks. There is one of these for each mark in the text.
+ */
+
+typedef struct TkTextMark {
+ struct TkText *textPtr; /* Overall information about text
+ * widget. */
+ TkTextLine *linePtr; /* Line structure that contains the
+ * segment. */
+ Tcl_HashEntry *hPtr; /* Pointer to hash table entry for mark
+ * (in textPtr->markTable). */
+} TkTextMark;
+
+/*
+ * A structure of the following type holds information for each window
+ * embedded in a text widget. This information is only used by the
+ * file tkTextWind.c
+ */
+
+typedef struct TkTextEmbWindow {
+ struct TkText *textPtr; /* Information about the overall text
+ * widget. */
+ TkTextLine *linePtr; /* Line structure that contains this
+ * window. */
+ Tk_Window tkwin; /* Window for this segment. NULL
+ * means that the window hasn't
+ * been created yet. */
+ LangCallback *create; /* Script to create window on-demand.
+ * NULL means no such script.
+ * Malloc-ed. */
+ int align; /* How to align window in vertical
+ * space. See definitions in
+ * tkTextWind.c. */
+ int padX, padY; /* Padding to leave around each side
+ * of window, in pixels. */
+ int stretch; /* Should window stretch to fill
+ * vertical space of line (except for
+ * pady)? 0 or 1. */
+ int chunkCount; /* Number of display chunks that
+ * refer to this window. */
+ int displayed; /* Non-zero means that the window
+ * has been displayed on the screen
+ * recently. */
+} TkTextEmbWindow;
+
+/*
+ * A structure of the following type holds information for each image
+ * embedded in a text widget. This information is only used by the
+ * file tkTextImage.c
+ */
+
+typedef struct TkTextEmbImage {
+ struct TkText *textPtr; /* Information about the overall text
+ * widget. */
+ TkTextLine *linePtr; /* Line structure that contains this
+ * image. */
+ char *imageString; /* Name of the image for this segment */
+ char *imageName; /* Name used by text widget to identify
+ * this image. May be unique-ified */
+ char *name; /* Name used in the hash table.
+ * used by "image names" to identify
+ * this instance of the image */
+ Tk_Image image; /* Image for this segment. NULL
+ * means that the image hasn't
+ * been created yet. */
+ int align; /* How to align image in vertical
+ * space. See definitions in
+ * tkTextImage.c. */
+ int padX, padY; /* Padding to leave around each side
+ * of image, in pixels. */
+ int chunkCount; /* Number of display chunks that
+ * refer to this image. */
+} TkTextEmbImage;
+
+/*
+ * The data structure below defines line segments.
+ */
+
+typedef struct TkTextSegment {
+ struct Tk_SegType *typePtr; /* Pointer to record describing
+ * segment's type. */
+ struct TkTextSegment *nextPtr; /* Next in list of segments for this
+ * line, or NULL for end of list. */
+ int size; /* Size of this segment (# of bytes
+ * of index space it occupies). */
+ union {
+ char chars[4]; /* Characters that make up character
+ * info. Actual length varies to
+ * hold as many characters as needed.*/
+ TkTextToggle toggle; /* Information about tag toggle. */
+ TkTextMark mark; /* Information about mark. */
+ TkTextEmbWindow ew; /* Information about embedded
+ * window. */
+ TkTextEmbImage ei; /* Information about embedded
+ * image. */
+ } body;
+} TkTextSegment;
+
+/*
+ * Data structures of the type defined below are used during the
+ * execution of Tcl commands to keep track of various interesting
+ * places in a text. An index is only valid up until the next
+ * modification to the character structure of the b-tree so they
+ * can't be retained across Tcl commands. However, mods to marks
+ * or tags don't invalidate indices.
+ */
+
+typedef struct TkTextIndex {
+ TkTextBTree tree; /* Tree containing desired position. */
+ TkTextLine *linePtr; /* Pointer to line containing position
+ * of interest. */
+ int byteIndex; /* Index within line of desired
+ * character (0 means first one). */
+} TkTextIndex;
+
+/*
+ * Types for procedure pointers stored in TkTextDispChunk strutures:
+ */
+
+typedef struct TkTextDispChunk TkTextDispChunk;
+
+typedef void Tk_ChunkDisplayProc _ANSI_ARGS_((
+ TkTextDispChunk *chunkPtr, int x, int y,
+ int height, int baseline, Display *display,
+ Drawable dst, int screenY));
+typedef void Tk_ChunkUndisplayProc _ANSI_ARGS_((
+ struct TkText *textPtr,
+ TkTextDispChunk *chunkPtr));
+typedef int Tk_ChunkMeasureProc _ANSI_ARGS_((
+ TkTextDispChunk *chunkPtr, int x));
+typedef void Tk_ChunkBboxProc _ANSI_ARGS_((
+ TkTextDispChunk *chunkPtr, int index, int y,
+ int lineHeight, int baseline, int *xPtr,
+ int *yPtr, int *widthPtr, int *heightPtr));
+
+/*
+ * The structure below represents a chunk of stuff that is displayed
+ * together on the screen. This structure is allocated and freed by
+ * generic display code but most of its fields are filled in by
+ * segment-type-specific code.
+ */
+
+struct TkTextDispChunk {
+ /*
+ * The fields below are set by the type-independent code before
+ * calling the segment-type-specific layoutProc. They should not
+ * be modified by segment-type-specific code.
+ */
+
+ int x; /* X position of chunk, in pixels.
+ * This position is measured from the
+ * left edge of the logical line,
+ * not from the left edge of the
+ * window (i.e. it doesn't change
+ * under horizontal scrolling). */
+ struct TkTextDispChunk *nextPtr; /* Next chunk in the display line
+ * or NULL for the end of the list. */
+ struct TextStyle *stylePtr; /* Display information, known only
+ * to tkTextDisp.c. */
+
+ /*
+ * The fields below are set by the layoutProc that creates the
+ * chunk.
+ */
+
+ Tk_ChunkDisplayProc *displayProc; /* Procedure to invoke to draw this
+ * chunk on the display or an
+ * off-screen pixmap. */
+ Tk_ChunkUndisplayProc *undisplayProc;
+ /* Procedure to invoke when segment
+ * ceases to be displayed on screen
+ * anymore. */
+ Tk_ChunkMeasureProc *measureProc; /* Procedure to find character under
+ * a given x-location. */
+ Tk_ChunkBboxProc *bboxProc; /* Procedure to find bounding box
+ * of character in chunk. */
+ int numBytes; /* Number of bytes that will be
+ * displayed in the chunk. */
+ int minAscent; /* Minimum space above the baseline
+ * needed by this chunk. */
+ int minDescent; /* Minimum space below the baseline
+ * needed by this chunk. */
+ int minHeight; /* Minimum total line height needed
+ * by this chunk. */
+ int width; /* Width of this chunk, in pixels.
+ * Initially set by chunk-specific
+ * code, but may be increased to
+ * include tab or extra space at end
+ * of line. */
+ int breakIndex; /* Index within chunk of last
+ * acceptable position for a line
+ * (break just before this byte index).
+ * <= 0 means don't break during or
+ * immediately after this chunk. */
+ ClientData clientData; /* Additional information for use
+ * of displayProc and undisplayProc. */
+};
+
+/*
+ * One data structure of the following type is used for each tag in a
+ * text widget. These structures are kept in textPtr->tagTable and
+ * referred to in other structures.
+ */
+
+typedef enum { TEXT_WRAPMODE_NULL, TEXT_WRAPMODE_NONE,
+ TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_WORD
+} TkWrapMode;
+
+EXTERN Tk_CustomOption textWrapModeOption;
+
+typedef struct TkTextTag {
+ char *name; /* Name of this tag. This field is actually
+ * a pointer to the key from the entry in
+ * textPtr->tagTable, so it needn't be freed
+ * explicitly. */
+ int priority; /* Priority of this tag within widget. 0
+ * means lowest priority. Exactly one tag
+ * has each integer value between 0 and
+ * numTags-1. */
+ struct Node *tagRootPtr; /* Pointer into the B-Tree at the lowest
+ * node that completely dominates the ranges
+ * of text occupied by the tag. At this
+ * node there is no information about the
+ * tag. One or more children of the node
+ * do contain information about the tag. */
+ int toggleCount; /* Total number of tag toggles */
+
+ /*
+ * Information for displaying text with this tag. The information
+ * belows acts as an override on information specified by lower-priority
+ * tags. If no value is specified, then the next-lower-priority tag
+ * on the text determins the value. The text widget itself provides
+ * defaults if no tag specifies an override.
+ */
+
+ Tk_3DBorder border; /* Used for drawing background. NULL means
+ * no value specified here. */
+ char *bdString; /* -borderwidth option string (malloc-ed).
+ * NULL means option not specified. */
+ int borderWidth; /* Width of 3-D border for background. */
+ char *reliefString; /* -relief option string (malloc-ed).
+ * NULL means option not specified. */
+ int relief; /* 3-D relief for background. */
+ Pixmap bgStipple; /* Stipple bitmap for background. None
+ * means no value specified here. */
+ XColor *fgColor; /* Foreground color for text. NULL means
+ * no value specified here. */
+ Tk_Font tkfont; /* Font for displaying text. NULL means
+ * no value specified here. */
+ Pixmap fgStipple; /* Stipple bitmap for text and other
+ * foreground stuff. None means no value
+ * specified here.*/
+ char *justifyString; /* -justify option string (malloc-ed).
+ * NULL means option not specified. */
+ Tk_Justify justify; /* How to justify text: TK_JUSTIFY_LEFT,
+ * TK_JUSTIFY_RIGHT, or TK_JUSTIFY_CENTER.
+ * Only valid if justifyString is non-NULL. */
+ char *lMargin1String; /* -lmargin1 option string (malloc-ed).
+ * NULL means option not specified. */
+ int lMargin1; /* Left margin for first display line of
+ * each text line, in pixels. Only valid
+ * if lMargin1String is non-NULL. */
+ char *lMargin2String; /* -lmargin2 option string (malloc-ed).
+ * NULL means option not specified. */
+ int lMargin2; /* Left margin for second and later display
+ * lines of each text line, in pixels. Only
+ * valid if lMargin2String is non-NULL. */
+ char *offsetString; /* -offset option string (malloc-ed).
+ * NULL means option not specified. */
+ int offset; /* Vertical offset of text's baseline from
+ * baseline of line. Used for superscripts
+ * and subscripts. Only valid if
+ * offsetString is non-NULL. */
+ Tcl_Obj * overstrikeString; /* -overstrike option string (malloc-ed).
+ * NULL means option not specified. */
+ int overstrike; /* Non-zero means draw horizontal line through
+ * middle of text. Only valid if
+ * overstrikeString is non-NULL. */
+ char *rMarginString; /* -rmargin option string (malloc-ed).
+ * NULL means option not specified. */
+ int rMargin; /* Right margin for text, in pixels. Only
+ * valid if rMarginString is non-NULL. */
+ char *spacing1String; /* -spacing1 option string (malloc-ed).
+ * NULL means option not specified. */
+ int spacing1; /* Extra spacing above first display
+ * line for text line. Only valid if
+ * spacing1String is non-NULL. */
+ char *spacing2String; /* -spacing2 option string (malloc-ed).
+ * NULL means option not specified. */
+ int spacing2; /* Extra spacing between display
+ * lines for the same text line. Only valid
+ * if spacing2String is non-NULL. */
+ char *spacing3String; /* -spacing2 option string (malloc-ed).
+ * NULL means option not specified. */
+ int spacing3; /* Extra spacing below last display
+ * line for text line. Only valid if
+ * spacing3String is non-NULL. */
+ Tcl_Obj * tabString; /* -tabs option string (malloc-ed).
+ * NULL means option not specified. */
+ struct TkTextTabArray *tabArrayPtr;
+ /* Info about tabs for tag (malloc-ed)
+ * or NULL. Corresponds to tabString. */
+ Tcl_Obj * underlineString; /* -underline option string (malloc-ed).
+ * NULL means option not specified. */
+ int underline; /* Non-zero means draw underline underneath
+ * text. Only valid if underlineString is
+ * non-NULL. */
+ TkWrapMode wrapMode; /* How to handle wrap-around for this tag.
+ * Must be TEXT_WRAPMODE_CHAR,
+ * TEXT_WRAPMODE_NONE, TEXT_WRAPMODE_WORD,
+ * or TEXT_WRAPMODE_NULL to use wrapmode for
+ * whole widget. */
+ Tcl_Obj * elideString; /* -elide option string (malloc-ed).
+ * NULL means option not specified. */
+ int elide; /* Non-zero means that data under this tag
+ * should not be displayed. */
+ int affectsDisplay; /* Non-zero means that this tag affects the
+ * way information is displayed on the screen
+ * (so need to redisplay if tag changes). */
+ Tcl_Obj * userData; /* arbitary user data */
+} TkTextTag;
+
+#define TK_TAG_AFFECTS_DISPLAY 0x1
+#define TK_TAG_UNDERLINE 0x2
+#define TK_TAG_JUSTIFY 0x4
+#define TK_TAG_OFFSET 0x10
+
+/*
+ * The data structure below is used for searching a B-tree for transitions
+ * on a single tag (or for all tag transitions). No code outside of
+ * tkTextBTree.c should ever modify any of the fields in these structures,
+ * but it's OK to use them for read-only information.
+ */
+
+typedef struct TkTextSearch {
+ TkTextIndex curIndex; /* Position of last tag transition
+ * returned by TkBTreeNextTag, or
+ * index of start of segment
+ * containing starting position for
+ * search if TkBTreeNextTag hasn't
+ * been called yet, or same as
+ * stopIndex if search is over. */
+ TkTextSegment *segPtr; /* Actual tag segment returned by last
+ * call to TkBTreeNextTag, or NULL if
+ * TkBTreeNextTag hasn't returned
+ * anything yet. */
+ TkTextSegment *nextPtr; /* Where to resume search in next
+ * call to TkBTreeNextTag. */
+ TkTextSegment *lastPtr; /* Stop search before just before
+ * considering this segment. */
+ TkTextTag *tagPtr; /* Tag to search for (or tag found, if
+ * allTags is non-zero). */
+ int linesLeft; /* Lines left to search (including
+ * curIndex and stopIndex). When
+ * this becomes <= 0 the search is
+ * over. */
+ int allTags; /* Non-zero means ignore tag check:
+ * search for transitions on all
+ * tags. */
+} TkTextSearch;
+
+/*
+ * The following data structure describes a single tab stop.
+ */
+
+typedef enum {LEFT, RIGHT, CENTER, NUMERIC} TkTextTabAlign;
+
+typedef struct TkTextTab {
+ int location; /* Offset in pixels of this tab stop
+ * from the left margin (lmargin2) of
+ * the text. */
+ TkTextTabAlign alignment; /* Where the tab stop appears relative
+ * to the text. */
+} TkTextTab;
+
+typedef struct TkTextTabArray {
+ int numTabs; /* Number of tab stops. */
+ TkTextTab tabs[1]; /* Array of tabs. The actual size
+ * will be numTabs. THIS FIELD MUST
+ * BE THE LAST IN THE STRUCTURE. */
+} TkTextTabArray;
+
+/* enum definining the edit modes of */
+
+typedef enum {
+ TK_TEXT_EDIT_INSERT, /* insert mode */
+ TK_TEXT_EDIT_DELETE, /* delete mode */
+ TK_TEXT_EDIT_OTHER /* none of the above */
+} TkTextEditMode;
+
+/*
+ * A data structure of the following type is kept for each text widget that
+ * currently exists for this process:
+ */
+
+typedef struct TkText {
+ Tk_Window tkwin; /* Window that embodies the text. NULL
+ * means that the window has been destroyed
+ * but the data structures haven't yet been
+ * cleaned up.*/
+ Display *display; /* Display for widget. Needed, among other
+ * things, to allow resources to be freed
+ * even after tkwin has gone away. */
+ Tcl_Interp *interp; /* Interpreter associated with widget. Used
+ * to delete widget command. */
+ Tcl_Command widgetCmd; /* Token for text's widget command. */
+ TkTextBTree tree; /* B-tree representation of text and tags for
+ * widget. */
+ Tcl_HashTable tagTable; /* Hash table that maps from tag names to
+ * pointers to TkTextTag structures. */
+ int numTags; /* Number of tags currently defined for
+ * widget; needed to keep track of
+ * priorities. */
+ Tcl_HashTable markTable; /* Hash table that maps from mark names to
+ * pointers to mark segments. */
+ Tcl_HashTable windowTable; /* Hash table that maps from window names
+ * to pointers to window segments. If a
+ * window segment doesn't yet have an
+ * associated window, there is no entry for
+ * it here. */
+ Tcl_HashTable imageTable; /* Hash table that maps from image names
+ * to pointers to image segments. If an
+ * image segment doesn't yet have an
+ * associated image, there is no entry for
+ * it here. */
+ int state; /* Either STATE_NORMAL or STATE_DISABLED. A
+ * text widget is read-only when disabled. */
+
+ /*
+ * Default information for displaying (may be overridden by tags
+ * applied to ranges of characters).
+ */
+
+ Tk_3DBorder border; /* Structure used to draw 3-D border and
+ * default background. */
+ int borderWidth; /* Width of 3-D border to draw around entire
+ * widget. */
+ int padX, padY; /* Padding between text and window border. */
+ int relief; /* 3-d effect for border around entire
+ * widget: TK_RELIEF_RAISED etc. */
+ int highlightWidth; /* Width in pixels of highlight to draw
+ * around widget when it has the focus.
+ * <= 0 means don't draw a highlight. */
+ XColor *highlightBgColorPtr;
+ /* Color for drawing traversal highlight
+ * area when highlight is off. */
+ XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
+ Tk_Cursor cursor; /* Current cursor for window, or None. */
+ XColor *fgColor; /* Default foreground color for text. */
+ Tk_Font tkfont; /* Default font for displaying text. */
+ int charWidth; /* Width of average character in default
+ * font. */
+ int spacing1; /* Default extra spacing above first display
+ * line for each text line. */
+ int spacing2; /* Default extra spacing between display lines
+ * for the same text line. */
+ int spacing3; /* Default extra spacing below last display
+ * line for each text line. */
+ Tcl_Obj * tabOptionString; /* Value of -tabs option string (malloc'ed). */
+ TkTextTabArray *tabArrayPtr;
+ /* Information about tab stops (malloc'ed).
+ * NULL means perform default tabbing
+ * behavior. */
+
+ /*
+ * Additional information used for displaying:
+ */
+
+ TkWrapMode wrapMode; /* How to handle wrap-around. Must be
+ * TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_NONE, or
+ * TEXT_WRAPMODE_WORD. */
+ int width, height; /* Desired dimensions for window, measured
+ * in characters. */
+ int setGrid; /* Non-zero means pass gridding information
+ * to window manager. */
+ int prevWidth, prevHeight; /* Last known dimensions of window; used to
+ * detect changes in size. */
+ TkTextIndex topIndex; /* Identifies first character in top display
+ * line of window. */
+ struct TextDInfo *dInfoPtr; /* Information maintained by tkTextDisp.c. */
+
+ /*
+ * Information related to selection.
+ */
+
+ TkTextTag *selTagPtr; /* Pointer to "sel" tag. Used to tell when
+ * a new selection has been made. */
+ Tk_3DBorder selBorder; /* Border and background for selected
+ * characters. This is a copy of information
+ * in *cursorTagPtr, so it shouldn't be
+ * explicitly freed. */
+ char *selBdString; /* Value of -selectborderwidth option, or NULL
+ * if not specified (malloc'ed). */
+ XColor *selFgColorPtr; /* Foreground color for selected text.
+ * This is a copy of information in
+ * *cursorTagPtr, so it shouldn't be
+ * explicitly freed. */
+ int exportSelection; /* Non-zero means tie "sel" tag to X
+ * selection. */
+ TkTextIndex selIndex; /* Used during multi-pass selection retrievals.
+ * This index identifies the next character
+ * to be returned from the selection. */
+ int abortSelections; /* Set to 1 whenever the text is modified
+ * in a way that interferes with selection
+ * retrieval: used to abort incremental
+ * selection retrievals. */
+ int selOffset; /* Offset in selection corresponding to
+ * selLine and selCh. -1 means neither
+ * this information nor selIndex is of any
+ * use. */
+
+ /*
+ * Information related to insertion cursor:
+ */
+
+ TkTextSegment *insertMarkPtr;
+ /* Points to segment for "insert" mark. */
+ Tk_3DBorder insertBorder; /* Used to draw vertical bar for insertion
+ * cursor. */
+ int insertWidth; /* Total width of insert cursor. */
+ int insertBorderWidth; /* Width of 3-D border around insert cursor. */
+ int insertOnTime; /* Number of milliseconds cursor should spend
+ * in "on" state for each blink. */
+ int insertOffTime; /* Number of milliseconds cursor should spend
+ * in "off" state for each blink. */
+ Tcl_TimerToken insertBlinkHandler;
+ /* Timer handler used to blink cursor on and
+ * off. */
+
+ /*
+ * Information used for event bindings associated with tags:
+ */
+
+ Tk_BindingTable bindingTable;
+ /* Table of all bindings currently defined
+ * for this widget. NULL means that no
+ * bindings exist, so the table hasn't been
+ * created. Each "object" used for this
+ * table is the address of a tag. */
+ TkTextSegment *currentMarkPtr;
+ /* Pointer to segment for "current" mark,
+ * or NULL if none. */
+ XEvent pickEvent; /* The event from which the current character
+ * was chosen. Must be saved so that we
+ * can repick after modifications to the
+ * text. */
+ int numCurTags; /* Number of tags associated with character
+ * at current mark. */
+ TkTextTag **curTagArrayPtr; /* Pointer to array of tags for current
+ * mark, or NULL if none. */
+
+ /*
+ * Miscellaneous additional information:
+ */
+
+ char *takeFocus; /* Value of -takeFocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+ LangCallback *xScrollCmd; /* Prefix of command to issue to update
+ * horizontal scrollbar when view changes. */
+ LangCallback *yScrollCmd; /* Prefix of command to issue to update
+ * vertical scrollbar when view changes. */
+ int flags; /* Miscellaneous flags; see below for
+ * definitions. */
+
+ /*
+ * Information related to the undo/redo functonality
+ */
+
+ TkUndoRedoStack * undoStack; /* The undo/redo stack */
+
+ int undo; /* non zero means the undo/redo behaviour is
+ * enabled */
+
+ int maxUndo; /* The maximum depth of the undo stack expressed
+ * as the maximum number of compound statements */
+
+ int autoSeparators; /* non zero means the separatorss will be
+ * inserted automatically */
+
+ int modifiedSet; /* Flag indicating that the 'dirtynesss' of
+ * the text widget has been expplicitly set.
+ */
+
+ int isDirty; /* Flag indicating the 'dirtynesss' of the text
+ * widget. If the flag is not zero, unsaved
+ * modifications have been applied to the
+ * text widget */
+
+ int isDirtyIncrement; /* Amount with which the isDirty flag is
+ * incremented every edit action
+ */
+
+ TkTextEditMode lastEditMode; /* Keeps track of what the last edit mode was
+ */
+
+} TkText;
+
+/*
+ * Flag values for TkText records:
+ *
+ * GOT_SELECTION: Non-zero means we've already claimed the
+ * selection.
+ * INSERT_ON: Non-zero means insertion cursor should be
+ * displayed on screen.
+ * GOT_FOCUS: Non-zero means this window has the input
+ * focus.
+ * BUTTON_DOWN: 1 means that a mouse button is currently
+ * down; this is used to implement grabs
+ * for the duration of button presses.
+ * UPDATE_SCROLLBARS: Non-zero means scrollbar(s) should be updated
+ * during next redisplay operation.
+ */
+
+#define GOT_SELECTION 1
+#define INSERT_ON 2
+#define GOT_FOCUS 4
+#define BUTTON_DOWN 8
+#define UPDATE_SCROLLBARS 0x10
+#define NEED_REPICK 0x20
+
+/*
+ * Records of the following type define segment types in terms of
+ * a collection of procedures that may be called to manipulate
+ * segments of that type.
+ */
+
+typedef TkTextSegment * Tk_SegSplitProc _ANSI_ARGS_((
+ struct TkTextSegment *segPtr, int index));
+typedef int Tk_SegDeleteProc _ANSI_ARGS_((
+ struct TkTextSegment *segPtr,
+ TkTextLine *linePtr, int treeGone));
+typedef TkTextSegment * Tk_SegCleanupProc _ANSI_ARGS_((
+ struct TkTextSegment *segPtr, TkTextLine *linePtr));
+typedef void Tk_SegLineChangeProc _ANSI_ARGS_((
+ struct TkTextSegment *segPtr, TkTextLine *linePtr));
+typedef int Tk_SegLayoutProc _ANSI_ARGS_((struct TkText *textPtr,
+ struct TkTextIndex *indexPtr, TkTextSegment *segPtr,
+ int offset, int maxX, int maxChars,
+ int noCharsYet, TkWrapMode wrapMode,
+ struct TkTextDispChunk *chunkPtr));
+typedef void Tk_SegCheckProc _ANSI_ARGS_((TkTextSegment *segPtr,
+ TkTextLine *linePtr));
+
+typedef struct Tk_SegType {
+ char *name; /* Name of this kind of segment. */
+ int leftGravity; /* If a segment has zero size (e.g. a
+ * mark or tag toggle), does it
+ * attach to character to its left
+ * or right? 1 means left, 0 means
+ * right. */
+ Tk_SegSplitProc *splitProc; /* Procedure to split large segment
+ * into two smaller ones. */
+ Tk_SegDeleteProc *deleteProc; /* Procedure to call to delete
+ * segment. */
+ Tk_SegCleanupProc *cleanupProc; /* After any change to a line, this
+ * procedure is invoked for all
+ * segments left in the line to
+ * perform any cleanup they wish
+ * (e.g. joining neighboring
+ * segments). */
+ Tk_SegLineChangeProc *lineChangeProc;
+ /* Invoked when a segment is about
+ * to be moved from its current line
+ * to an earlier line because of
+ * a deletion. The linePtr is that
+ * for the segment's old line.
+ * CleanupProc will be invoked after
+ * the deletion is finished. */
+ Tk_SegLayoutProc *layoutProc; /* Returns size information when
+ * figuring out what to display in
+ * window. */
+ Tk_SegCheckProc *checkProc; /* Called during consistency checks
+ * to check internal consistency of
+ * segment. */
+} Tk_SegType;
+
+/*
+ * The constant below is used to specify a line when what is really
+ * wanted is the entire text. For now, just use a very big number.
+ */
+
+#define TK_END_OF_TEXT 1000000
+
+/*
+ * The following definition specifies the maximum number of characters
+ * needed in a string to hold a position specifier.
+ */
+
+#define TK_POS_CHARS 30
+
+/*
+ * Declarations for variables shared among the text-related files:
+ */
+
+EXTERN int tkBTreeDebug;
+EXTERN int tkTextDebug;
+EXTERN Tk_SegType tkTextCharType;
+EXTERN Tk_SegType tkTextLeftMarkType;
+EXTERN Tk_SegType tkTextRightMarkType;
+EXTERN Tk_SegType tkTextToggleOnType;
+EXTERN Tk_SegType tkTextToggleOffType;
+
+/*
+ * Declarations for procedures that are used by the text-related files
+ * but shouldn't be used anywhere else in Tk (or by Tk clients):
+ */
+
+EXTERN int TkBTreeCharTagged _ANSI_ARGS_((TkTextIndex *indexPtr,
+ TkTextTag *tagPtr));
+EXTERN void TkBTreeCheck _ANSI_ARGS_((TkTextBTree tree));
+EXTERN int TkBTreeCharsInLine _ANSI_ARGS_((TkTextLine *linePtr));
+EXTERN int TkBTreeBytesInLine _ANSI_ARGS_((TkTextLine *linePtr));
+EXTERN TkTextBTree TkBTreeCreate _ANSI_ARGS_((TkText *textPtr));
+EXTERN void TkBTreeDestroy _ANSI_ARGS_((TkTextBTree tree));
+EXTERN void TkBTreeDeleteChars _ANSI_ARGS_((TkTextIndex *index1Ptr,
+ TkTextIndex *index2Ptr));
+EXTERN TkTextLine * TkBTreeFindLine _ANSI_ARGS_((TkTextBTree tree,
+ int line));
+EXTERN TkTextTag ** TkBTreeGetTags _ANSI_ARGS_((TkTextIndex *indexPtr,
+ int *numTagsPtr));
+EXTERN void TkBTreeInsertChars _ANSI_ARGS_((TkTextIndex *indexPtr,
+ CONST char *string));
+EXTERN int TkBTreeLineIndex _ANSI_ARGS_((TkTextLine *linePtr));
+EXTERN void TkBTreeLinkSegment _ANSI_ARGS_((TkTextSegment *segPtr,
+ TkTextIndex *indexPtr));
+EXTERN TkTextLine * TkBTreeNextLine _ANSI_ARGS_((TkTextLine *linePtr));
+EXTERN int TkBTreeNextTag _ANSI_ARGS_((TkTextSearch *searchPtr));
+EXTERN int TkBTreeNumLines _ANSI_ARGS_((TkTextBTree tree));
+EXTERN TkTextLine * TkBTreePreviousLine _ANSI_ARGS_((TkTextLine *linePtr));
+EXTERN int TkBTreePrevTag _ANSI_ARGS_((TkTextSearch *searchPtr));
+EXTERN void TkBTreeStartSearch _ANSI_ARGS_((TkTextIndex *index1Ptr,
+ TkTextIndex *index2Ptr, TkTextTag *tagPtr,
+ TkTextSearch *searchPtr));
+EXTERN void TkBTreeStartSearchBack _ANSI_ARGS_((TkTextIndex *index1Ptr,
+ TkTextIndex *index2Ptr, TkTextTag *tagPtr,
+ TkTextSearch *searchPtr));
+EXTERN void TkBTreeTag _ANSI_ARGS_((TkTextIndex *index1Ptr,
+ TkTextIndex *index2Ptr, TkTextTag *tagPtr,
+ int add));
+EXTERN void TkBTreeUnlinkSegment _ANSI_ARGS_((TkTextBTree tree,
+ TkTextSegment *segPtr, TkTextLine *linePtr));
+EXTERN void TkTextBindProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+EXTERN void TkTextChanged _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *index1Ptr, TkTextIndex *index2Ptr));
+EXTERN int TkTextCharBbox _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *indexPtr, int *xPtr, int *yPtr,
+ int *widthPtr, int *heightPtr));
+EXTERN int TkTextCharLayoutProc _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *indexPtr, TkTextSegment *segPtr,
+ int offset, int maxX, int maxChars, int noBreakYet,
+ TkWrapMode wrapMode, TkTextDispChunk *chunkPtr));
+EXTERN void TkTextCreateDInfo _ANSI_ARGS_((TkText *textPtr));
+EXTERN int TkTextDLineInfo _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *indexPtr, int *xPtr, int *yPtr,
+ int *widthPtr, int *heightPtr, int *basePtr));
+EXTERN TkTextTag * TkTextCreateTag _ANSI_ARGS_((TkText *textPtr,
+ CONST char *tagName));
+EXTERN void TkTextFreeDInfo _ANSI_ARGS_((TkText *textPtr));
+EXTERN void TkTextFreeTag _ANSI_ARGS_((TkText *textPtr,
+ TkTextTag *tagPtr));
+EXTERN int TkTextGetIndex _ANSI_ARGS_((Tcl_Interp *interp,
+ TkText *textPtr, CONST char *string,
+ TkTextIndex *indexPtr));
+EXTERN TkTextTabArray * TkTextGetTabs _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin, Tcl_Obj *string));
+EXTERN void TkTextIndexBackBytes _ANSI_ARGS_((
+ CONST TkTextIndex *srcPtr, int count,
+ TkTextIndex *dstPtr));
+EXTERN void TkTextIndexBackChars _ANSI_ARGS_((
+ CONST TkTextIndex *srcPtr, int count,
+ TkTextIndex *dstPtr));
+EXTERN int TkTextIndexCmp _ANSI_ARGS_((
+ CONST TkTextIndex *index1Ptr,
+ CONST TkTextIndex *index2Ptr));
+EXTERN void TkTextIndexForwBytes _ANSI_ARGS_((
+ CONST TkTextIndex *srcPtr, int count,
+ TkTextIndex *dstPtr));
+EXTERN void TkTextIndexForwChars _ANSI_ARGS_((
+ CONST TkTextIndex *srcPtr, int count,
+ TkTextIndex *dstPtr));
+EXTERN TkTextSegment * TkTextIndexToSeg _ANSI_ARGS_((
+ CONST TkTextIndex *indexPtr, int *offsetPtr));
+EXTERN void TkTextInsertDisplayProc _ANSI_ARGS_((
+ TkTextDispChunk *chunkPtr, int x, int y, int height,
+ int baseline, Display *display, Drawable dst,
+ int screenY));
+EXTERN void TkTextLostSelection _ANSI_ARGS_((
+ ClientData clientData));
+EXTERN TkTextIndex * TkTextMakeCharIndex _ANSI_ARGS_((TkTextBTree tree,
+ int lineIndex, int charIndex,
+ TkTextIndex *indexPtr));
+EXTERN int TkTextIsElided _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *indexPtr));
+EXTERN TkTextIndex * TkTextMakeByteIndex _ANSI_ARGS_((TkTextBTree tree,
+ int lineIndex, int byteIndex,
+ TkTextIndex *indexPtr));
+EXTERN int TkTextMarkCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkTextMarkNameToIndex _ANSI_ARGS_((TkText *textPtr,
+ CONST char *name, TkTextIndex *indexPtr));
+EXTERN void TkTextMarkSegToIndex _ANSI_ARGS_((TkText *textPtr,
+ TkTextSegment *markPtr, TkTextIndex *indexPtr));
+EXTERN void TkTextEventuallyRepick _ANSI_ARGS_((TkText *textPtr));
+EXTERN void TkTextPickCurrent _ANSI_ARGS_((TkText *textPtr,
+ XEvent *eventPtr));
+EXTERN void TkTextPixelIndex _ANSI_ARGS_((TkText *textPtr,
+ int x, int y, TkTextIndex *indexPtr));
+EXTERN void TkTextPrintIndex _ANSI_ARGS_((
+ CONST TkTextIndex *indexPtr, char *string));
+EXTERN void TkTextRedrawRegion _ANSI_ARGS_((TkText *textPtr,
+ int x, int y, int width, int height));
+EXTERN void TkTextRedrawTag _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *index1Ptr, TkTextIndex *index2Ptr,
+ TkTextTag *tagPtr, int withTag));
+EXTERN void TkTextRelayoutWindow _ANSI_ARGS_((TkText *textPtr));
+EXTERN int TkTextScanCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkTextSeeCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkTextSegToOffset _ANSI_ARGS_((
+ CONST TkTextSegment *segPtr,
+ CONST TkTextLine *linePtr));
+EXTERN TkTextSegment * TkTextSetMark _ANSI_ARGS_((TkText *textPtr,
+ CONST char *name, TkTextIndex *indexPtr));
+EXTERN void TkTextSetYView _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *indexPtr, int pickPlace));
+EXTERN int TkTextTagCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkTextImageCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkTextImageIndex _ANSI_ARGS_((TkText *textPtr,
+ CONST char *name, TkTextIndex *indexPtr));
+EXTERN int TkTextWindowCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkTextWindowIndex _ANSI_ARGS_((TkText *textPtr,
+ CONST char *name, TkTextIndex *indexPtr));
+EXTERN int TkTextXviewCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+EXTERN int TkTextYviewCmd _ANSI_ARGS_((TkText *textPtr,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST *objv));
+
+#include "tkPort.h"
+#include "tkVMacro.h"
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKTEXT */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkUndo.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkUndo.h
new file mode 100644
index 00000000000..96a0c5bace8
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkUndo.h
@@ -0,0 +1,90 @@
+/*
+ * tkUndo.h --
+ *
+ * Declarations shared among the files that implement an undo
+ * stack.
+ *
+ * Copyright (c) 2002 Ludwig Callewaert.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkUndo.h,v 1.1 2002/06/21 23:09:55 hobbs Exp $
+ */
+
+#ifndef _TKUNDO
+#define _TKUNDO
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/* enum definining the types used in an undo stack */
+
+typedef enum {
+ TK_UNDO_SEPARATOR, /* Marker */
+ TK_UNDO_ACTION /* Command */
+} TkUndoAtomType;
+
+/* struct defining the basic undo/redo stack element */
+
+typedef struct TkUndoAtom {
+ TkUndoAtomType type; /* The type that will trigger the
+ * required action*/
+ Tcl_Obj * apply; /* Command to apply the action that was taken */
+ Tcl_Obj * revert; /* The command to undo the action */
+ struct TkUndoAtom * next; /* Pointer to the next element in the
+ * stack */
+} TkUndoAtom;
+
+/* struct defining the basic undo/redo stack element */
+
+typedef struct TkUndoRedoStack {
+ TkUndoAtom * undoStack; /* The undo stack */
+ TkUndoAtom * redoStack; /* The redo stack */
+ Tcl_Interp * interp ; /* The interpreter in which to execute the revert and apply scripts */
+ int maxdepth;
+ int depth;
+} TkUndoRedoStack;
+
+/* basic functions */
+
+EXTERN void TkUndoPushStack _ANSI_ARGS_((TkUndoAtom ** stack,
+ TkUndoAtom * elem));
+
+EXTERN TkUndoAtom * TkUndoPopStack _ANSI_ARGS_((TkUndoAtom ** stack));
+
+EXTERN int TkUndoInsertSeparator _ANSI_ARGS_((TkUndoAtom ** stack));
+
+EXTERN void TkUndoClearStack _ANSI_ARGS_((TkUndoAtom ** stack));
+
+/* functions working on an undo/redo stack */
+
+EXTERN TkUndoRedoStack * TkUndoInitStack _ANSI_ARGS_((Tcl_Interp * interp,
+ int maxdepth));
+
+EXTERN void TkUndoSetDepth _ANSI_ARGS_((TkUndoRedoStack * stack,
+ int maxdepth));
+
+EXTERN void TkUndoClearStacks _ANSI_ARGS_((TkUndoRedoStack * stack));
+
+EXTERN void TkUndoFreeStack _ANSI_ARGS_((TkUndoRedoStack * stack));
+
+EXTERN void TkUndoInsertUndoSeparator _ANSI_ARGS_((TkUndoRedoStack * stack));
+
+EXTERN void TkUndoPushAction _ANSI_ARGS_((TkUndoRedoStack * stack,
+ Tcl_DString * actionScript, Tcl_DString * revertScript));
+
+EXTERN int TkUndoRevert _ANSI_ARGS_((TkUndoRedoStack * stack));
+
+EXTERN int TkUndoApply _ANSI_ARGS_((TkUndoRedoStack * stack));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKUNDO */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkVMacro.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkVMacro.h
new file mode 100644
index 00000000000..7ba57d8154a
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkVMacro.h
@@ -0,0 +1,69 @@
+#ifdef _LANG
+#include "Lang.m"
+#endif
+
+#if defined(_TK)
+#include "tk.m"
+#endif
+
+#if defined(_TK) || defined(_XLIB_H_)
+# if !defined(_XLIB) && !defined(_XLIB_H_)
+# include <X11/Xlib.h>
+# endif
+# ifdef _TKINTXLIBDECLS
+# include "tkIntXlibDecls.m"
+# else
+# if defined(_XLIB_H) && !defined(_XLIB)
+# define _XLIB
+# endif
+# include "Xlib.m"
+# endif
+#endif
+
+#ifdef _TKINT
+#include "tkInt.m"
+#endif
+#ifdef _TKIMGPHOTO
+#include "tkImgPhoto.m"
+#endif
+#ifdef _TIX
+#include "tix.m"
+#endif
+#ifdef _TIXINT
+#include "tixInt.m"
+#endif
+#ifdef _TKOPTION
+#include "tkOption.m"
+#endif
+#ifdef _TIXIMGXPM
+#include "tixImgXpm.m"
+#endif
+#ifdef _IMGINT
+#include "imgInt.m"
+#endif
+
+#ifdef _TCLDECLS
+#include "tclDecls.m"
+#endif
+
+#ifdef _TKDECLS
+#include "tkDecls.m"
+#endif
+
+#ifdef _TKPLATDECLS
+#include "tkPlatDecls.m"
+#endif
+
+#ifdef _TKINTDECLS
+#include "tkIntDecls.m"
+#endif
+
+#ifdef _TKINTPLATDECLS
+#include "tkIntPlatDecls.m"
+#endif
+
+#ifdef _TKEVENT
+#include "tkEvent.m"
+#endif
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkWin.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWin.h
new file mode 100644
index 00000000000..ab1046deb33
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWin.h
@@ -0,0 +1,60 @@
+/*
+ * tkWin.h --
+ *
+ * Declarations of public types and interfaces that are only
+ * available under Windows.
+ *
+ * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkWin.h,v 1.6 1999/04/16 01:51:48 stanton Exp $
+ */
+
+#ifndef _TKWIN
+#define _TKWIN
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+#ifdef BUILD_tk
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+/*
+ * The following messages are use to communicate between a Tk toplevel
+ * and its container window.
+ */
+
+#define TK_CLAIMFOCUS (WM_USER)
+#define TK_GEOMETRYREQ (WM_USER+1)
+#define TK_ATTACHWINDOW (WM_USER+2)
+#define TK_DETACHWINDOW (WM_USER+3)
+
+
+typedef void Tcl_HandleProc (ClientData, HANDLE);
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Exported procedures defined for the Windows platform only.
+ *
+ *--------------------------------------------------------------
+ */
+
+#include "tkPlatDecls.h"
+
+extern HINSTANCE TclWinGetTclInstance _ANSI_ARGS_((void));
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+
+#endif /* _TKWIN */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinDefault.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinDefault.h
new file mode 100644
index 00000000000..c66a8525ed2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinDefault.h
@@ -0,0 +1,525 @@
+/*
+ * tkWinDefault.h --
+ *
+ * This file defines the defaults for all options for all of
+ * the Tk widgets.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkWinDefault.h,v 1.16 2002/06/21 23:09:54 hobbs Exp $
+ */
+
+#ifndef _TKWINDEFAULT
+#define _TKWINDEFAULT
+
+/*
+ * The definitions below provide symbolic names for the default colors.
+ * NORMAL_BG - Normal background color.
+ * ACTIVE_BG - Background color when widget is active.
+ * SELECT_BG - Background color for selected text.
+ * TROUGH - Background color for troughs in scales and scrollbars.
+ * INDICATOR - Color for indicator when button is selected.
+ * DISABLED - Foreground color when widget is disabled.
+ */
+
+#define BLACK "Black"
+#define WHITE "White"
+
+#define CTL_FONT "{MS Sans Serif} 8"
+#define FIXED_FONT "{Courier New} 8"
+#define NORMAL_BG "SystemButtonFace"
+#define NORMAL_FG "SystemButtonText"
+#define ACTIVE_BG NORMAL_BG
+#define TEXT_FG "SystemWindowText"
+#define SELECT_BG "SystemHighlight"
+#define SELECT_FG "SystemHighlightText"
+#define TROUGH "SystemScrollbar"
+#define INDICATOR "SystemWindow"
+#define DISABLED "SystemDisabledText"
+#define MENU_BG "SystemMenu"
+#define MENU_FG "SystemMenuText"
+#define HIGHLIGHT "SystemWindowFrame"
+
+/*
+ * Defaults for labels, buttons, checkbuttons, and radiobuttons:
+ */
+
+#define DEF_BUTTON_ANCHOR "center"
+#define DEF_BUTTON_ACTIVE_BG_COLOR NORMAL_BG
+#define DEF_BUTTON_ACTIVE_BG_MONO BLACK
+#define DEF_BUTTON_ACTIVE_FG_COLOR NORMAL_FG
+#define DEF_CHKRAD_ACTIVE_FG_COLOR TEXT_FG
+#define DEF_BUTTON_ACTIVE_FG_MONO WHITE
+#define DEF_BUTTON_BG_COLOR NORMAL_BG
+#define DEF_BUTTON_BG_MONO WHITE
+#define DEF_BUTTON_BITMAP ""
+#define DEF_BUTTON_BORDER_WIDTH "2"
+#define DEF_BUTTON_CURSOR ""
+#define DEF_BUTTON_COMMAND ""
+#define DEF_BUTTON_COMPOUND "none"
+#define DEF_BUTTON_DEFAULT "disabled"
+#define DEF_BUTTON_DISABLED_FG_COLOR DISABLED
+#define DEF_BUTTON_DISABLED_FG_MONO ""
+#define DEF_BUTTON_FG NORMAL_FG
+#define DEF_CHKRAD_FG TEXT_FG
+#define DEF_BUTTON_FONT CTL_FONT
+#define DEF_BUTTON_HEIGHT "0"
+#define DEF_BUTTON_HIGHLIGHT_BG_COLOR DEF_BUTTON_BG_COLOR
+#define DEF_BUTTON_HIGHLIGHT_BG_MONO DEF_BUTTON_BG_MONO
+#define DEF_BUTTON_HIGHLIGHT HIGHLIGHT
+#define DEF_LABEL_HIGHLIGHT_WIDTH "0"
+#define DEF_BUTTON_HIGHLIGHT_WIDTH "1"
+#define DEF_BUTTON_IMAGE NULL
+#define DEF_BUTTON_INDICATOR "1"
+#define DEF_BUTTON_JUSTIFY "center"
+#define DEF_BUTTON_OFF_VALUE "0"
+#define DEF_BUTTON_ON_VALUE "1"
+#define DEF_BUTTON_OVER_RELIEF ""
+#define DEF_BUTTON_PADX "1"
+#define DEF_LABCHKRAD_PADX "1"
+#define DEF_BUTTON_PADY "1"
+#define DEF_LABCHKRAD_PADY "1"
+#define DEF_BUTTON_RELIEF "raised"
+#define DEF_LABCHKRAD_RELIEF "flat"
+#define DEF_BUTTON_REPEAT_DELAY "0"
+#define DEF_BUTTON_REPEAT_INTERVAL "0"
+#define DEF_BUTTON_SELECT_COLOR INDICATOR
+#define DEF_BUTTON_SELECT_MONO BLACK
+#define DEF_BUTTON_SELECT_IMAGE NULL
+#define DEF_BUTTON_STATE "normal"
+#define DEF_LABEL_TAKE_FOCUS "0"
+#define DEF_BUTTON_TAKE_FOCUS NULL
+#define DEF_BUTTON_TEXT ""
+#define DEF_BUTTON_TEXT_VARIABLE ""
+#define DEF_BUTTON_UNDERLINE "-1"
+#define DEF_BUTTON_VALUE ""
+#define DEF_BUTTON_WIDTH "0"
+#define DEF_BUTTON_WRAP_LENGTH "0"
+#define DEF_RADIOBUTTON_VARIABLE "selectedButton"
+#define DEF_CHECKBUTTON_VARIABLE ""
+
+/*
+ * Defaults for canvases:
+ */
+
+#define DEF_CANVAS_BG_COLOR NORMAL_BG
+#define DEF_CANVAS_BG_MONO WHITE
+#define DEF_CANVAS_BORDER_WIDTH "0"
+#define DEF_CANVAS_CLOSE_ENOUGH "1"
+#define DEF_CANVAS_CONFINE "1"
+#define DEF_CANVAS_CURSOR ""
+#define DEF_CANVAS_HEIGHT "7c"
+#define DEF_CANVAS_HIGHLIGHT_BG NORMAL_BG
+#define DEF_CANVAS_HIGHLIGHT HIGHLIGHT
+#define DEF_CANVAS_HIGHLIGHT_WIDTH "2"
+#define DEF_CANVAS_INSERT_BG NORMAL_FG
+#define DEF_CANVAS_INSERT_BD_COLOR "0"
+#define DEF_CANVAS_INSERT_BD_MONO "0"
+#define DEF_CANVAS_INSERT_OFF_TIME "300"
+#define DEF_CANVAS_INSERT_ON_TIME "600"
+#define DEF_CANVAS_INSERT_WIDTH "2"
+#define DEF_CANVAS_RELIEF "flat"
+#define DEF_CANVAS_SCROLL_REGION ""
+#define DEF_CANVAS_SELECT_COLOR SELECT_BG
+#define DEF_CANVAS_SELECT_MONO BLACK
+#define DEF_CANVAS_SELECT_BD_COLOR "1"
+#define DEF_CANVAS_SELECT_BD_MONO "0"
+#define DEF_CANVAS_SELECT_FG_COLOR SELECT_FG
+#define DEF_CANVAS_SELECT_FG_MONO WHITE
+#define DEF_CANVAS_TAKE_FOCUS NULL
+#define DEF_CANVAS_WIDTH "10c"
+#define DEF_CANVAS_X_SCROLL_CMD ""
+#define DEF_CANVAS_X_SCROLL_INCREMENT "0"
+#define DEF_CANVAS_Y_SCROLL_CMD ""
+#define DEF_CANVAS_Y_SCROLL_INCREMENT "0"
+
+/*
+ * Defaults for entries:
+ */
+
+#define DEF_ENTRY_BG_COLOR "SystemWindow"
+#define DEF_ENTRY_BG_MONO WHITE
+#define DEF_ENTRY_BORDER_WIDTH "2"
+#define DEF_ENTRY_CURSOR "xterm"
+#define DEF_ENTRY_DISABLED_BG_COLOR "SystemButtonFace"
+#define DEF_ENTRY_DISABLED_BG_MONO WHITE
+#define DEF_ENTRY_DISABLED_FG DISABLED
+#define DEF_ENTRY_EXPORT_SELECTION "1"
+#define DEF_ENTRY_FONT CTL_FONT
+#define DEF_ENTRY_FG TEXT_FG
+#define DEF_ENTRY_HIGHLIGHT_BG NORMAL_BG
+#define DEF_ENTRY_HIGHLIGHT HIGHLIGHT
+#define DEF_ENTRY_HIGHLIGHT_WIDTH "0"
+#define DEF_ENTRY_INSERT_BG TEXT_FG
+#define DEF_ENTRY_INSERT_BD_COLOR "0"
+#define DEF_ENTRY_INSERT_BD_MONO "0"
+#define DEF_ENTRY_INSERT_OFF_TIME "300"
+#define DEF_ENTRY_INSERT_ON_TIME "600"
+#define DEF_ENTRY_INSERT_WIDTH "2"
+#define DEF_ENTRY_JUSTIFY "left"
+#define DEF_ENTRY_READONLY_BG_COLOR "SystemButtonFace"
+#define DEF_ENTRY_READONLY_BG_MONO WHITE
+#define DEF_ENTRY_RELIEF "sunken"
+#define DEF_ENTRY_SCROLL_COMMAND ""
+#define DEF_ENTRY_SELECT_COLOR SELECT_BG
+#define DEF_ENTRY_SELECT_MONO BLACK
+#define DEF_ENTRY_SELECT_BD_COLOR "0"
+#define DEF_ENTRY_SELECT_BD_MONO "0"
+#define DEF_ENTRY_SELECT_FG_COLOR SELECT_FG
+#define DEF_ENTRY_SELECT_FG_MONO WHITE
+#define DEF_ENTRY_SHOW NULL
+#define DEF_ENTRY_STATE "normal"
+#define DEF_ENTRY_TAKE_FOCUS NULL
+#define DEF_ENTRY_TEXT_VARIABLE ""
+#define DEF_ENTRY_WIDTH "20"
+
+/*
+ * Defaults for frames:
+ */
+
+#define DEF_FRAME_BG_COLOR NORMAL_BG
+#define DEF_FRAME_BG_MONO WHITE
+#define DEF_FRAME_BORDER_WIDTH "0"
+#define DEF_FRAME_CLASS "Frame"
+#define DEF_FRAME_COLORMAP ""
+#define DEF_FRAME_CONTAINER "0"
+#define DEF_FRAME_CURSOR ""
+#define DEF_FRAME_HEIGHT "0"
+#define DEF_FRAME_HIGHLIGHT_BG NORMAL_BG
+#define DEF_FRAME_HIGHLIGHT HIGHLIGHT
+#define DEF_FRAME_HIGHLIGHT_WIDTH "0"
+#define DEF_FRAME_PADX "0"
+#define DEF_FRAME_PADY "0"
+#define DEF_FRAME_RELIEF "flat"
+#define DEF_FRAME_TAKE_FOCUS "0"
+#define DEF_FRAME_VISUAL ""
+#define DEF_FRAME_WIDTH "0"
+
+/*
+ * Defaults for labelframes:
+ */
+
+#define DEF_LABELFRAME_BORDER_WIDTH "2"
+#define DEF_LABELFRAME_CLASS "Labelframe"
+#define DEF_LABELFRAME_RELIEF "groove"
+#define DEF_LABELFRAME_FG NORMAL_FG
+#define DEF_LABELFRAME_FONT CTL_FONT
+#define DEF_LABELFRAME_TEXT ""
+#define DEF_LABELFRAME_LABELANCHOR "nw"
+
+/*
+ * Defaults for listboxes:
+ */
+
+#define DEF_LISTBOX_ACTIVE_STYLE "underline"
+#define DEF_LISTBOX_BG_COLOR "SystemWindow"
+#define DEF_LISTBOX_BG_MONO WHITE
+#define DEF_LISTBOX_BORDER_WIDTH "2"
+#define DEF_LISTBOX_CURSOR ""
+#define DEF_LISTBOX_DISABLED_FG DISABLED
+#define DEF_LISTBOX_EXPORT_SELECTION "1"
+#define DEF_LISTBOX_FONT CTL_FONT
+#define DEF_LISTBOX_FG NORMAL_FG
+#define DEF_LISTBOX_HEIGHT "10"
+#define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG
+#define DEF_LISTBOX_HIGHLIGHT HIGHLIGHT
+#define DEF_LISTBOX_HIGHLIGHT_WIDTH "1"
+#define DEF_LISTBOX_RELIEF "sunken"
+#define DEF_LISTBOX_SCROLL_COMMAND ""
+#define DEF_LISTBOX_LIST_VARIABLE ""
+#define DEF_LISTBOX_SELECT_COLOR SELECT_BG
+#define DEF_LISTBOX_SELECT_MONO BLACK
+#define DEF_LISTBOX_SELECT_BD "0"
+#define DEF_LISTBOX_SELECT_FG_COLOR SELECT_FG
+#define DEF_LISTBOX_SELECT_FG_MONO WHITE
+#define DEF_LISTBOX_SELECT_MODE "browse"
+#define DEF_LISTBOX_SET_GRID "0"
+#define DEF_LISTBOX_STATE "normal"
+#define DEF_LISTBOX_TAKE_FOCUS NULL
+#define DEF_LISTBOX_WIDTH "20"
+
+/*
+ * Defaults for individual entries of menus:
+ */
+
+#define DEF_MENU_ENTRY_ACTIVE_BG NULL
+#define DEF_MENU_ENTRY_ACTIVE_FG NULL
+#define DEF_MENU_ENTRY_ACCELERATOR NULL
+#define DEF_MENU_ENTRY_BG NULL
+#define DEF_MENU_ENTRY_BITMAP None
+#define DEF_MENU_ENTRY_COLUMN_BREAK "0"
+#define DEF_MENU_ENTRY_COMMAND NULL
+#define DEF_MENU_ENTRY_COMPOUND "none"
+#define DEF_MENU_ENTRY_FG NULL
+#define DEF_MENU_ENTRY_FONT NULL
+#define DEF_MENU_ENTRY_HIDE_MARGIN "0"
+#define DEF_MENU_ENTRY_IMAGE NULL
+#define DEF_MENU_ENTRY_INDICATOR "1"
+#define DEF_MENU_ENTRY_LABEL NULL
+#define DEF_MENU_ENTRY_MENU NULL
+#define DEF_MENU_ENTRY_OFF_VALUE "0"
+#define DEF_MENU_ENTRY_ON_VALUE "1"
+#define DEF_MENU_ENTRY_SELECT_IMAGE NULL
+#define DEF_MENU_ENTRY_STATE "normal"
+#define DEF_MENU_ENTRY_VALUE NULL
+#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
+#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
+#define DEF_MENU_ENTRY_SELECT NULL
+#define DEF_MENU_ENTRY_UNDERLINE "-1"
+
+/*
+ * Defaults for menus overall:
+ */
+
+#define DEF_MENU_ACTIVE_BG_COLOR SELECT_BG
+#define DEF_MENU_ACTIVE_BG_MONO BLACK
+#define DEF_MENU_ACTIVE_BORDER_WIDTH "0"
+#define DEF_MENU_ACTIVE_FG_COLOR SELECT_FG
+#define DEF_MENU_ACTIVE_FG_MONO WHITE
+#define DEF_MENU_BG_COLOR MENU_BG
+#define DEF_MENU_BG_MONO WHITE
+#define DEF_MENU_BORDER_WIDTH "0"
+#define DEF_MENU_CURSOR "arrow"
+#define DEF_MENU_DISABLED_FG_COLOR DISABLED
+#define DEF_MENU_DISABLED_FG_MONO ""
+#define DEF_MENU_FONT CTL_FONT
+#define DEF_MENU_FG MENU_FG
+#define DEF_MENU_POST_COMMAND ""
+#define DEF_MENU_RELIEF "flat"
+#define DEF_MENU_SELECT_COLOR MENU_FG
+#define DEF_MENU_SELECT_MONO BLACK
+#define DEF_MENU_TAKE_FOCUS "0"
+#define DEF_MENU_TEAROFF "1"
+#define DEF_MENU_TEAROFF_CMD NULL
+#define DEF_MENU_TITLE ""
+#define DEF_MENU_TYPE "normal"
+
+/*
+ * Defaults for menubuttons:
+ */
+
+#define DEF_MENUBUTTON_ANCHOR "center"
+#define DEF_MENUBUTTON_ACTIVE_BG_COLOR ACTIVE_BG
+#define DEF_MENUBUTTON_ACTIVE_BG_MONO BLACK
+#define DEF_MENUBUTTON_ACTIVE_FG_COLOR NORMAL_FG
+#define DEF_MENUBUTTON_ACTIVE_FG_MONO WHITE
+#define DEF_MENUBUTTON_BG_COLOR NORMAL_BG
+#define DEF_MENUBUTTON_BG_MONO WHITE
+#define DEF_MENUBUTTON_BITMAP ""
+#define DEF_MENUBUTTON_BORDER_WIDTH "2"
+#define DEF_MENUBUTTON_CURSOR ""
+#define DEF_MENUBUTTON_DIRECTION "below"
+#define DEF_MENUBUTTON_DISABLED_FG_COLOR DISABLED
+#define DEF_MENUBUTTON_DISABLED_FG_MONO ""
+#define DEF_MENUBUTTON_FONT CTL_FONT
+#define DEF_MENUBUTTON_FG NORMAL_FG
+#define DEF_MENUBUTTON_HEIGHT "0"
+#define DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR DEF_MENUBUTTON_BG_COLOR
+#define DEF_MENUBUTTON_HIGHLIGHT_BG_MONO DEF_MENUBUTTON_BG_MONO
+#define DEF_MENUBUTTON_HIGHLIGHT HIGHLIGHT
+#define DEF_MENUBUTTON_HIGHLIGHT_WIDTH "0"
+#define DEF_MENUBUTTON_IMAGE NULL
+#define DEF_MENUBUTTON_INDICATOR "0"
+#define DEF_MENUBUTTON_JUSTIFY "center"
+#define DEF_MENUBUTTON_MENU ""
+#define DEF_MENUBUTTON_PADX "4p"
+#define DEF_MENUBUTTON_PADY "3p"
+#define DEF_MENUBUTTON_RELIEF "flat"
+#define DEF_MENUBUTTON_STATE "normal"
+#define DEF_MENUBUTTON_TAKE_FOCUS "0"
+#define DEF_MENUBUTTON_TEXT ""
+#define DEF_MENUBUTTON_TEXT_VARIABLE ""
+#define DEF_MENUBUTTON_UNDERLINE "-1"
+#define DEF_MENUBUTTON_WIDTH "0"
+#define DEF_MENUBUTTON_WRAP_LENGTH "0"
+
+/*
+ * Defaults for messages:
+ */
+
+#define DEF_MESSAGE_ANCHOR "center"
+#define DEF_MESSAGE_ASPECT "150"
+#define DEF_MESSAGE_BG_COLOR NORMAL_BG
+#define DEF_MESSAGE_BG_MONO WHITE
+#define DEF_MESSAGE_BORDER_WIDTH "2"
+#define DEF_MESSAGE_CURSOR ""
+#define DEF_MESSAGE_FG NORMAL_FG
+#define DEF_MESSAGE_FONT CTL_FONT
+#define DEF_MESSAGE_HIGHLIGHT_BG NORMAL_BG
+#define DEF_MESSAGE_HIGHLIGHT HIGHLIGHT
+#define DEF_MESSAGE_HIGHLIGHT_WIDTH "0"
+#define DEF_MESSAGE_JUSTIFY "left"
+#define DEF_MESSAGE_PADX "-1"
+#define DEF_MESSAGE_PADY "-1"
+#define DEF_MESSAGE_RELIEF "flat"
+#define DEF_MESSAGE_TAKE_FOCUS "0"
+#define DEF_MESSAGE_TEXT ""
+#define DEF_MESSAGE_TEXT_VARIABLE ""
+#define DEF_MESSAGE_WIDTH "0"
+
+/*
+ * Defaults for panedwindows
+ */
+
+#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG
+#define DEF_PANEDWINDOW_BG_MONO WHITE
+#define DEF_PANEDWINDOW_BORDERWIDTH "2"
+#define DEF_PANEDWINDOW_CURSOR ""
+#define DEF_PANEDWINDOW_HANDLEPAD "8"
+#define DEF_PANEDWINDOW_HANDLESIZE "8"
+#define DEF_PANEDWINDOW_HEIGHT ""
+#define DEF_PANEDWINDOW_OPAQUERESIZE "0"
+#define DEF_PANEDWINDOW_ORIENT "horizontal"
+#define DEF_PANEDWINDOW_RELIEF "flat"
+#define DEF_PANEDWINDOW_SASHCURSOR ""
+#define DEF_PANEDWINDOW_SASHPAD "2"
+#define DEF_PANEDWINDOW_SASHRELIEF "raised"
+#define DEF_PANEDWINDOW_SASHWIDTH "2"
+#define DEF_PANEDWINDOW_SHOWHANDLE "0"
+#define DEF_PANEDWINDOW_WIDTH ""
+
+/*
+ * Defaults for panedwindow panes
+ */
+
+#define DEF_PANEDWINDOW_PANE_AFTER ""
+#define DEF_PANEDWINDOW_PANE_BEFORE ""
+#define DEF_PANEDWINDOW_PANE_HEIGHT ""
+#define DEF_PANEDWINDOW_PANE_MINSIZE "0"
+#define DEF_PANEDWINDOW_PANE_PADX "0"
+#define DEF_PANEDWINDOW_PANE_PADY "0"
+#define DEF_PANEDWINDOW_PANE_STICKY "nsew"
+#define DEF_PANEDWINDOW_PANE_WIDTH ""
+
+/*
+ * Defaults for scales:
+ */
+
+#define DEF_SCALE_ACTIVE_BG_COLOR ACTIVE_BG
+#define DEF_SCALE_ACTIVE_BG_MONO BLACK
+#define DEF_SCALE_BG_COLOR NORMAL_BG
+#define DEF_SCALE_BG_MONO WHITE
+#define DEF_SCALE_BIG_INCREMENT "0"
+#define DEF_SCALE_BORDER_WIDTH "2"
+#define DEF_SCALE_COMMAND ""
+#define DEF_SCALE_CURSOR ""
+#define DEF_SCALE_DIGITS "0"
+#define DEF_SCALE_FONT CTL_FONT
+#define DEF_SCALE_FG_COLOR NORMAL_FG
+#define DEF_SCALE_FG_MONO BLACK
+#define DEF_SCALE_FROM "0"
+#define DEF_SCALE_HIGHLIGHT_BG_COLOR DEF_SCALE_BG_COLOR
+#define DEF_SCALE_HIGHLIGHT_BG_MONO DEF_SCALE_BG_MONO
+#define DEF_SCALE_HIGHLIGHT HIGHLIGHT
+#define DEF_SCALE_HIGHLIGHT_WIDTH "2"
+#define DEF_SCALE_LABEL ""
+#define DEF_SCALE_LENGTH "100"
+#define DEF_SCALE_ORIENT "vertical"
+#define DEF_SCALE_RELIEF "flat"
+#define DEF_SCALE_REPEAT_DELAY "300"
+#define DEF_SCALE_REPEAT_INTERVAL "100"
+#define DEF_SCALE_RESOLUTION "1"
+#define DEF_SCALE_TROUGH_COLOR TROUGH
+#define DEF_SCALE_TROUGH_MONO WHITE
+#define DEF_SCALE_SHOW_VALUE "1"
+#define DEF_SCALE_SLIDER_LENGTH "10m"
+#define DEF_SCALE_SLIDER_RELIEF "raised"
+#define DEF_SCALE_STATE "normal"
+#define DEF_SCALE_TAKE_FOCUS NULL
+#define DEF_SCALE_TICK_INTERVAL "0"
+#define DEF_SCALE_TO "100"
+#define DEF_SCALE_VARIABLE ""
+#define DEF_SCALE_WIDTH "5m"
+
+/*
+ * Defaults for scrollbars:
+ */
+
+#define DEF_SCROLLBAR_ACTIVE_BG_COLOR ACTIVE_BG
+#define DEF_SCROLLBAR_ACTIVE_BG_MONO BLACK
+#define DEF_SCROLLBAR_ACTIVE_RELIEF "raised"
+#define DEF_SCROLLBAR_BG_COLOR NORMAL_BG
+#define DEF_SCROLLBAR_BG_MONO WHITE
+#define DEF_SCROLLBAR_BORDER_WIDTH "0"
+#define DEF_SCROLLBAR_COMMAND ""
+#define DEF_SCROLLBAR_CURSOR ""
+#define DEF_SCROLLBAR_EL_BORDER_WIDTH "-1"
+#define DEF_SCROLLBAR_HIGHLIGHT_BG NORMAL_BG
+#define DEF_SCROLLBAR_HIGHLIGHT HIGHLIGHT
+#define DEF_SCROLLBAR_HIGHLIGHT_WIDTH "0"
+#define DEF_SCROLLBAR_JUMP "0"
+#define DEF_SCROLLBAR_ORIENT "vertical"
+#define DEF_SCROLLBAR_RELIEF "sunken"
+#define DEF_SCROLLBAR_REPEAT_DELAY "300"
+#define DEF_SCROLLBAR_REPEAT_INTERVAL "100"
+#define DEF_SCROLLBAR_TAKE_FOCUS NULL
+#define DEF_SCROLLBAR_TROUGH_COLOR TROUGH
+#define DEF_SCROLLBAR_TROUGH_MONO WHITE
+#define DEF_SCROLLBAR_WIDTH "4m"
+
+/*
+ * Defaults for texts:
+ */
+
+#define DEF_TEXT_AUTO_SEPARATORS "1"
+#define DEF_TEXT_BG_COLOR "SystemWindow"
+#define DEF_TEXT_BG_MONO WHITE
+#define DEF_TEXT_BORDER_WIDTH "2"
+#define DEF_TEXT_CURSOR "xterm"
+#define DEF_TEXT_FG TEXT_FG
+#define DEF_TEXT_EXPORT_SELECTION "1"
+#define DEF_TEXT_FONT FIXED_FONT
+#define DEF_TEXT_HEIGHT "24"
+#define DEF_TEXT_HIGHLIGHT_BG NORMAL_BG
+#define DEF_TEXT_HIGHLIGHT HIGHLIGHT
+#define DEF_TEXT_HIGHLIGHT_WIDTH "0"
+#define DEF_TEXT_INSERT_BG TEXT_FG
+#define DEF_TEXT_INSERT_BD_COLOR "0"
+#define DEF_TEXT_INSERT_BD_MONO "0"
+#define DEF_TEXT_INSERT_OFF_TIME "300"
+#define DEF_TEXT_INSERT_ON_TIME "600"
+#define DEF_TEXT_INSERT_WIDTH "2"
+#define DEF_TEXT_MAX_UNDO "0"
+#define DEF_TEXT_PADX "1"
+#define DEF_TEXT_PADY "1"
+#define DEF_TEXT_RELIEF "sunken"
+#define DEF_TEXT_SELECT_COLOR SELECT_BG
+#define DEF_TEXT_SELECT_MONO BLACK
+#define DEF_TEXT_SELECT_BD_COLOR "0"
+#define DEF_TEXT_SELECT_BD_MONO "0"
+#define DEF_TEXT_SELECT_FG_COLOR SELECT_FG
+#define DEF_TEXT_SELECT_FG_MONO WHITE
+#define DEF_TEXT_SELECT_RELIEF "flat"
+#define DEF_TEXT_SET_GRID "0"
+#define DEF_TEXT_SPACING1 "0"
+#define DEF_TEXT_SPACING2 "0"
+#define DEF_TEXT_SPACING3 "0"
+#define DEF_TEXT_STATE "normal"
+#define DEF_TEXT_TABS ""
+#define DEF_TEXT_TAKE_FOCUS NULL
+#define DEF_TEXT_UNDO "0"
+#define DEF_TEXT_WIDTH "80"
+#define DEF_TEXT_WRAP "char"
+#define DEF_TEXT_XSCROLL_COMMAND ""
+#define DEF_TEXT_YSCROLL_COMMAND ""
+
+/*
+ * Defaults for canvas text:
+ */
+
+#define DEF_CANVTEXT_FONT CTL_FONT
+
+/*
+ * Defaults for toplevels (most of the defaults for frames also apply
+ * to toplevels):
+ */
+
+#define DEF_TOPLEVEL_CLASS "Toplevel"
+#define DEF_TOPLEVEL_MENU ""
+#define DEF_TOPLEVEL_SCREEN ""
+#define DEF_TOPLEVEL_USE ""
+
+#endif /* _TKWINDEFAULT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinInt.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinInt.h
new file mode 100644
index 00000000000..267cb69f6d4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinInt.h
@@ -0,0 +1,211 @@
+/*
+ * tkWinInt.h --
+ *
+ * This file contains declarations that are shared among the
+ * Windows-specific parts of Tk, but aren't used by the rest of
+ * Tk.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright (c) 1998-2000 by Scriptics Corporation.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkWinInt.h,v 1.14 2003/02/26 02:47:05 hobbs Exp $
+ */
+
+#ifndef _TKWININT
+#define _TKWININT
+
+/*
+ * Include platform specific public interfaces.
+ */
+
+#ifndef _TKINT
+#include "tkInt.h"
+#endif
+
+#ifndef _TKWIN
+#include "tkWin.h"
+#endif
+
+#ifndef _TKPORT
+#include "tkPort.h"
+#endif
+
+
+/*
+ * Define constants missing from older Win32 SDK header files.
+ */
+
+#ifndef WS_EX_TOOLWINDOW
+#define WS_EX_TOOLWINDOW 0x00000080L
+#endif
+
+/*
+ * The TkWinDCState is used to save the state of a device context
+ * so that it can be restored later.
+ */
+
+typedef struct TkWinDCState {
+ HPALETTE palette;
+ int bkmode;
+} TkWinDCState;
+
+/*
+ * The TkWinDrawable is the internal implementation of an X Drawable (either
+ * a Window or a Pixmap). The following constants define the valid Drawable
+ * types.
+ */
+
+#define TWD_BITMAP 1
+#define TWD_WINDOW 2
+#define TWD_WINDC 3
+
+typedef struct {
+ int type;
+ HWND handle;
+ TkWindow *winPtr;
+} TkWinWindow;
+
+typedef struct {
+ int type;
+ HBITMAP handle;
+ Colormap colormap;
+ int depth;
+} TkWinBitmap;
+
+typedef struct {
+ int type;
+ HDC hdc;
+}TkWinDC;
+
+typedef union {
+ int type;
+ TkWinWindow window;
+ TkWinBitmap bitmap;
+ TkWinDC winDC;
+} TkWinDrawable;
+
+/*
+ * The following macros are used to retrieve internal values from a Drawable.
+ */
+
+#define TkWinGetHWND(w) (((TkWinDrawable *) w)->window.handle)
+#define TkWinGetWinPtr(w) (((TkWinDrawable *) w)->window.winPtr)
+#define TkWinGetHBITMAP(w) (((TkWinDrawable *) w)->bitmap.handle)
+#define TkWinGetColormap(w) (((TkWinDrawable *) w)->bitmap.colormap)
+#define TkWinGetHDC(w) (((TkWinDrawable *) w)->winDC.hdc)
+
+/*
+ * The following structure is used to encapsulate palette information.
+ */
+
+typedef struct {
+ HPALETTE palette; /* Palette handle used when drawing. */
+ UINT size; /* Number of entries in the palette. */
+ int stale; /* 1 if palette needs to be realized,
+ * otherwise 0. If the palette is stale,
+ * then an idle handler is scheduled to
+ * realize the palette. */
+ Tcl_HashTable refCounts; /* Hash table of palette entry reference counts
+ * indexed by pixel value. */
+} TkWinColormap;
+
+/*
+ * The following macro retrieves the Win32 palette from a colormap.
+ */
+
+#define TkWinGetPalette(colormap) (((TkWinColormap *) colormap)->palette)
+
+/*
+ * The following macros define the class names for Tk Window types.
+ */
+
+#define TK_WIN_TOPLEVEL_CLASS_NAME "TkTopLevel"
+#define TK_WIN_CHILD_CLASS_NAME "TkChild"
+#define TK_WIN_OWNDC_CLASS_NAME "TkOwnDC"
+
+/*
+ * The following variable is a translation table between X gc functions and
+ * Win32 raster and BitBlt op modes.
+ */
+
+extern int tkpWinRopModes[];
+extern int tkpWinBltModes[];
+
+/*
+ * The following defines are used with TkWinGetBorderPixels to get the
+ * extra 2 border colors from a Tk_3DBorder.
+ */
+
+#define TK_3D_LIGHT2 TK_3D_DARK_GC+1
+#define TK_3D_DARK2 TK_3D_DARK_GC+2
+
+/*
+ * Internal procedures used by more than one source file.
+ */
+
+#include "tkIntPlatDecls.h"
+
+/*
+ * We need to specially add the TkWinChildProc because of the special
+ * prototype it has (doesn't fit into stubs schema)
+ */
+#ifdef BUILD_tk
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
+EXTERN LRESULT CALLBACK TkWinChildProc _ANSI_ARGS_((HWND hwnd, UINT message,
+ WPARAM wParam, LPARAM lParam));
+
+/*
+ * Special proc needed as tsd accessor function between
+ * tkWinX.c:GenerateXEvent and tkWinClipboard.c:UpdateClipboard
+ */
+EXTERN void TkWinUpdatingClipboard(int mode);
+
+/*
+ * The following structure keeps track of whether we are using the
+ * multi-byte or the wide-character interfaces to the operating system.
+ * System calls should be made through the following function table.
+ *
+ * While some system calls need to use this A/W jump-table, it is not
+ * necessary for all calls to do it, which is why you won't see this
+ * used throughout the Tk code, but only in key areas. -- hobbs
+ */
+
+typedef struct TkWinProcs {
+ int useWide;
+ LRESULT (WINAPI *callWindowProc)(WNDPROC lpPrevWndFunc, HWND hWnd,
+ UINT Msg, WPARAM wParam, LPARAM lParam);
+ LRESULT (WINAPI *defWindowProc)(HWND hWnd, UINT Msg, WPARAM wParam,
+ LPARAM lParam);
+ ATOM (WINAPI *registerClass)(CONST WNDCLASS *lpWndClass);
+ BOOL (WINAPI *setWindowText)(HWND hWnd, LPCTSTR lpString);
+ HWND (WINAPI *createWindowEx)(DWORD dwExStyle, LPCTSTR lpClassName,
+ LPCTSTR lpWindowName, DWORD dwStyle, int x, int y,
+ int nWidth, int nHeight, HWND hWndParent, HMENU hMenu,
+ HINSTANCE hInstance, LPVOID lpParam);
+ BOOL (WINAPI *insertMenu)(HMENU hMenu, UINT uPosition, UINT uFlags,
+ UINT uIDNewItem, LPCTSTR lpNewItem);
+} TkWinProcs;
+
+EXTERN TkWinProcs *tkWinProcs;
+
+#undef TCL_STORAGE_CLASS
+#define TCL_STORAGE_CLASS DLLIMPORT
+
+/*
+ * The following allows us to cache these encoding for multiple functions.
+ */
+
+
+extern Tcl_Encoding TkWinGetKeyInputEncoding _ANSI_ARGS_((void));
+extern Tcl_Encoding TkWinGetUnicodeEncoding _ANSI_ARGS_((void));
+
+extern void LangNoteDC _ANSI_ARGS_((HDC dc,int inc));
+
+#endif /* _TKWININT */
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinPort.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinPort.h
new file mode 100644
index 00000000000..3c95b5d5d10
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkWinPort.h
@@ -0,0 +1,156 @@
+/*
+ * tkWinPort.h --
+ *
+ * This header file handles porting issues that occur because of
+ * differences between Windows and Unix. It should be the only
+ * file that contains #ifdefs to handle different flavors of OS.
+ *
+ * Copyright (c) 1995-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkWinPort.h,v 1.9 2002/10/19 02:10:20 hobbs Exp $
+ */
+
+#ifndef _WINPORT
+#define _WINPORT
+#define NEED_REAL_STDIO
+#include <X11/Xlib.h>
+#include <X11/cursorfont.h>
+#include <X11/keysym.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+
+#include <errno.h>
+#include <ctype.h>
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <fcntl.h>
+#include <io.h>
+#ifdef __EMX__
+# include <sys/types.h>
+#endif
+
+/*
+ * Need to block out this include for building extensions with MetroWerks
+ * compiler for Win32.
+ */
+
+#ifndef __MWERKS__
+#include <sys/stat.h>
+#endif
+
+#include <time.h>
+#ifdef __CYGWIN__
+# define _T(x) L##x
+#else
+# include <tchar.h>
+#endif
+
+#ifdef _MSC_VER
+# define hypot _hypot
+#else /* _MSC_VER */
+# ifdef __EMX__
+# define strncasecmp strnicmp
+# endif
+#endif /* _MSC_VER */
+
+#ifndef __GNUC__
+# define strncasecmp strnicmp
+# define strcasecmp stricmp
+#endif
+
+#define NBBY 8
+
+#ifndef OPEN_MAX
+#define OPEN_MAX 32
+#endif
+
+/*
+ * The following define causes Tk to use its internal keysym hash table
+ */
+
+#define REDO_KEYSYM_LOOKUP
+
+/*
+ * The following macro checks to see whether there is buffered
+ * input data available for a stdio FILE.
+ */
+
+#ifdef _MSC_VER
+# define TK_READ_DATA_PENDING(f) ((f)->_cnt > 0)
+#else /* _MSC_VER */
+# define TK_READ_DATA_PENDING(f) ((f)->level > 0)
+#endif /* _MSC_VER */
+
+/*
+ * The following stubs implement various calls that don't do anything
+ * under Windows.
+ */
+
+#define TkFreeWindowId(dispPtr,w)
+#define TkInitXId(dispPtr)
+#define TkpCmapStressed(tkwin,colormap) (0)
+#define XFlush(display)
+#define XGrabServer(display)
+#define XUngrabServer(display)
+#define TkpSync(display)
+
+/*
+ * The following functions are implemented as macros under Windows.
+ */
+
+#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));}
+#define XNoOp(display) {display->request++;}
+#define XSynchronize(display, bool) {display->request++;}
+#define XSync(display, bool) {display->request++;}
+#define XVisualIDFromVisual(visual) (visual->visualid)
+
+/* Additional translations needed for Tk extensions (Pixmap). */
+
+#define XPutImage(display, dr, gc, i, a, b, c, d, e, f) \
+ TkPutImage(NULL, 0, display, dr, gc, i, a, b, c, d, e, f)
+#define XDefaultVisual(display, screen) ((screen)->root_visual)
+#define XDefaultScreen(display) ((display)->screens)
+#define XDefaultColormap(display, screen) ((screen)->cmap)
+#define XDefaultDepth(display, screen) ((screen)->root_depth)
+
+/*
+ * The following Tk functions are implemented as macros under Windows.
+ */
+
+#define TkpGetPixel(p) (((((p)->red >> 8) & 0xff) \
+ | ((p)->green & 0xff00) | (((p)->blue << 8) & 0xff0000)) | 0x20000000)
+
+/*
+ * These calls implement native bitmaps which are not currently
+ * supported under Windows. The macros eliminate the calls.
+ */
+
+#define TkpDefineNativeBitmaps()
+#define TkpCreateNativeBitmap(display, source) None
+#define TkpGetNativeAppBitmap(display, name, w, h) None
+
+/*
+ * Define timezone for gettimeofday.
+ */
+#if 0
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+#else
+#undef timezone
+struct timezone;
+struct timeval;
+#endif
+
+#ifndef _TCLINT
+#include <tclInt.h>
+#endif
+
+
+#endif /* _WINPORT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tkXrm.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tkXrm.h
new file mode 100644
index 00000000000..041d67b400d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tkXrm.h
@@ -0,0 +1,12 @@
+EXTERN void Xrm_AddOption _ANSI_ARGS_((Tk_Window tkwin, CONST char *name,
+ CONST char *value, int priority));
+EXTERN Tk_Uid Xrm_GetOption _ANSI_ARGS_((Tk_Window tkwin, CONST char *name,
+ CONST char *className));
+EXTERN int Xrm_OptionCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, Tcl_Obj *CONST args[]));
+EXTERN void XrmOptionClassChanged _ANSI_ARGS_((TkWindow *winPtr));
+EXTERN void XrmOptionDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
+EXTERN void Xrm_import _ANSI_ARGS_((char *class));
+
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/tk_f.h b/Master/tlpkg/tlperl/lib/Tk/pTk/tk_f.h
new file mode 100644
index 00000000000..603919b64f9
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/tk_f.h
@@ -0,0 +1,14 @@
+#ifndef TK_VT
+#define TK_VT
+typedef struct TkVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tk.t"
+#undef VFUNC
+#undef VVAR
+} TkVtab;
+extern TkVtab *TkVptr;
+extern TkVtab *TkVGet(void);
+#endif /* TK_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pTk/xbytes.h b/Master/tlpkg/tlperl/lib/Tk/pTk/xbytes.h
new file mode 100644
index 00000000000..46be124d92d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pTk/xbytes.h
@@ -0,0 +1,58 @@
+/*
+ * xbytes.h --
+ *
+ * Declaration of table to reverse bit order of bytes.
+ *
+ * Copyright (c) 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: xbytes.h,v 1.2 1998/09/14 18:24:02 stanton Exp $
+ */
+
+#ifndef _XBYTES
+#define _XBYTES
+
+/*
+ * The bits in a byte can be reversed so the least significant becomes
+ * the most significant by indexing xBitReverseTable with the byte
+ * to be reversed.
+ */
+
+static unsigned char xBitReverseTable[256] = {
+ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+ 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+ 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+ 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+ 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+ 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+ 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+ 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+ 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+ 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+ 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+ 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+ 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+ 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+ 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+ 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+ 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+ 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+ 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+ 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+ 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+ 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+ 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+ 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+ 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+ 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+ 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+ 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
+};
+
+#endif /* _XBYTES */
diff --git a/Master/tlpkg/tlperl/lib/Tk/pack.pod b/Master/tlpkg/tlperl/lib/Tk/pack.pod
new file mode 100644
index 00000000000..0449556265c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/pack.pod
@@ -0,0 +1,324 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::pack - Geometry manager that packs around edges of cavity
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<pack>?(I<args>)?
+
+S< >I<$widget>-E<gt>B<pack>I<Option>?(I<args>)?
+
+=head1 DESCRIPTION
+
+The B<pack> method is used to communicate with the packer,
+a geometry manager that arranges the children of a parent by
+packing them in order around the edges of the parent.
+
+In this B<perl> port of Tk it is normal to pack widgets one-at-a-time
+using the widget object to be packed to invoke a method call.
+This is a slight distortion of underlying Tk interface (which
+can handle lists of windows to one pack method call) but has proven
+effective in practice.
+
+The B<pack> method can have any of several forms, depending
+on I<Option>:
+
+=over 4
+
+=item I<$slave>-E<gt>B<pack>?(I<options>)?
+
+The options consist of pairs of arguments that specify how
+to manage the slave.
+See L<"THE PACKER ALGORITHM"> below for details on how the options
+are used by the packer.
+The following options are supported:
+
+=over 8
+
+=item B<-after> =E<gt> I<$other>
+
+I<$other> must be another window.
+Use its master as the master for the slave, and insert
+the slave just after I<$other> in the packing order.
+
+=item B<-anchor> =E<gt> I<anchor>
+
+I<Anchor> must be a valid anchor position such as B<n>
+or B<sw>; it specifies where to position each slave in its
+parcel.
+Defaults to B<center>.
+
+=item B<-before> =E<gt> I<$other>
+
+I<$other> must be another window.
+Use its master as the master for the slave, and insert
+the slave just before I<$other> in the packing order.
+
+=item B<-expand> =E<gt> I<boolean>
+
+Specifies whether the slave should be expanded to consume
+extra space in their master.
+I<Boolean> may have any proper boolean value, such as B<1>
+or B<no>.
+Defaults to 0.
+
+=item B<-fill> =E<gt> I<style>
+
+If a slave's parcel is larger than its requested dimensions, this
+option may be used to stretch the slave.
+I<Style> must have one of the following values:
+
+=over 12
+
+=item B<none>
+
+Give the slave its requested dimensions plus any internal padding
+requested with B<-ipadx> or B<-ipady>. This is the default.
+
+=item B<x>
+
+Stretch the slave horizontally to fill the entire width of its
+parcel (except leave external padding as specified by B<-padx>).
+
+=item B<y>
+
+Stretch the slave vertically to fill the entire height of its
+parcel (except leave external padding as specified by B<-pady>).
+
+=item B<both>
+
+Stretch the slave both horizontally and vertically.
+
+=back
+
+=item B<-in> =E<gt> I<$master>
+
+Insert the slave(s) at the end of the packing order for the master
+window given by I<$master>.
+
+=item B<-ipadx> =E<gt> I<amount>
+
+I<Amount> specifies how much horizontal internal padding to
+leave on each side of the slave(s).
+I<Amount> must be a valid screen distance, such as B<2> or B<.5c>.
+It defaults to 0.
+
+=item B<-ipady> =E<gt> I<amount>
+
+I<Amount> specifies how much vertical internal padding to
+leave on each side of the slave(s).
+I<Amount> defaults to 0.
+
+=item B<-padx> =E<gt> I<amount>
+
+I<Amount> specifies how much horizontal external padding to
+leave on each side of the slave(s).
+I<Amount> defaults to 0.
+
+=item B<-pady> =E<gt> I<amount>
+
+I<Amount> specifies how much vertical external padding to
+leave on each side of the slave(s).
+I<Amount> defaults to 0.
+
+=item B<-side> =E<gt> I<side>
+
+Specifies which side of the master the slave(s) will be packed against.
+Must be B<left>, B<right>, B<top>, or B<bottom>.
+Defaults to B<top>.
+
+=back
+
+=back
+
+If no B<-in>, B<-after> or B<-before> option is specified
+then slave will be inserted at the end of the packing list
+for its parent unless it is already managed by the packer (in which
+case it will be left where it is).
+If one of these options is specified then slave will be
+inserted at the specified point.
+If the slave are already managed by the geometry manager
+then any unspecified options for them retain their previous values rather
+than receiving default values.
+
+=over 4
+
+=item I<$slave>-E<gt>B<packConfigure>?(I<options>)?
+
+Same as B<pack>.
+
+=item I<$slave>-E<gt>B<packForget>
+
+Removes I<slave> from the packing order for its
+master and unmaps its window.
+The slave will no longer be managed by the packer.
+
+=item I<$slave>-E<gt>B<packInfo>
+
+Returns a list whose elements are the current configuration state of
+the slave given by I<$slave> in the same option-value form that
+might be specified to B<packConfigure>.
+The first two elements of the list are ``B<-in>=E<gt>I<$master>'' where
+I<$master> is the slave's master.
+
+=item I<$master>-E<gt>B<packPropagate>?(I<boolean>)?
+
+If I<boolean> has a true boolean value such as B<1> or B<on>
+then propagation is enabled for I<$master>,
+(see L<"GEOMETRY PROPAGATION"> below).
+If I<boolean> has a false boolean value then propagation is
+disabled for I<$master>.
+In either of these cases an empty string is returned.
+If I<boolean> is omitted then the method returns B<0> or
+B<1> to indicate whether propagation is currently enabled
+for I<$master>.
+Propagation is enabled by default.
+
+=item I<$master>-E<gt>B<packSlaves>
+
+Returns a list of all of the slaves in the packing order for I<$master>.
+The order of the slaves in the list is the same as their order in
+the packing order.
+If I<$master> has no slaves then an empty list/string is returned in
+array/scalar context, respectively
+
+=back
+
+=head1 THE PACKER ALGORITHM
+
+For each master the packer maintains an ordered list of slaves
+called the I<packing list>.
+The B<-in>, B<-after>, and B<-before> configuration
+options are used to specify the master for each slave and the slave's
+position in the packing list.
+If none of these options is given for a slave then the slave
+is added to the end of the packing list for its parent.
+
+The packer arranges the slaves for a master by scanning the
+packing list in order.
+At the time it processes each slave, a rectangular area within
+the master is still unallocated.
+This area is called the I<cavity>; for the first slave it
+is the entire area of the master.
+
+For each slave the packer carries out the following steps:
+
+=over 4
+
+=item [1]
+
+The packer allocates a rectangular I<parcel> for the slave
+along the side of the cavity given by the slave's B<-side> option.
+If the side is top or bottom then the width of the parcel is
+the width of the cavity and its height is the requested height
+of the slave plus the B<-ipady> and B<-pady> options.
+For the left or right side the height of the parcel is
+the height of the cavity and the width is the requested width
+of the slave plus the B<-ipadx> and B<-padx> options.
+The parcel may be enlarged further because of the B<-expand>
+option (see L<"EXPANSION"> below)
+
+=item [2]
+
+The packer chooses the dimensions of the slave.
+The width will normally be the slave's requested width plus
+twice its B<-ipadx> option and the height will normally be
+the slave's requested height plus twice its B<-ipady>
+option.
+However, if the B<-fill> option is B<x> or B<both>
+then the width of the slave is expanded to fill the width of the parcel,
+minus twice the B<-padx> option.
+If the B<-fill> option is B<y> or B<both>
+then the height of the slave is expanded to fill the width of the parcel,
+minus twice the B<-pady> option.
+
+=item [3]
+
+The packer positions the slave over its parcel.
+If the slave is smaller than the parcel then the B<-anchor>
+option determines where in the parcel the slave will be placed.
+If B<-padx> or B<-pady> is non-zero, then the given
+amount of external padding will always be left between the
+slave and the edges of the parcel.
+
+Once a given slave has been packed, the area of its parcel
+is subtracted from the cavity, leaving a smaller rectangular
+cavity for the next slave.
+If a slave doesn't use all of its parcel, the unused space
+in the parcel will not be used by subsequent slaves.
+If the cavity should become too small to meet the needs of
+a slave then the slave will be given whatever space is
+left in the cavity.
+If the cavity shrinks to zero size, then all remaining slaves
+on the packing list will be unmapped from the screen until
+the master window becomes large enough to hold them again.
+
+=back
+
+=head1 EXPANSION
+
+If a master window is so large that there will be extra space
+left over after all of its slaves have been packed, then the
+extra space is distributed uniformly among all of the slaves
+for which the B<-expand> option is set.
+Extra horizontal space is distributed among the expandable
+slaves whose B<-side> is B<left> or B<right>,
+and extra vertical space is distributed among the expandable
+slaves whose B<-side> is B<top> or B<bottom>.
+
+=head1 GEOMETRY PROPAGATION
+
+The packer normally computes how large a master must be to
+just exactly meet the needs of its slaves, and it sets the
+requested width and height of the master to these dimensions.
+This causes geometry information to propagate up through a
+window hierarchy to a top-level window so that the entire
+sub-tree sizes itself to fit the needs of the leaf windows.
+However, the B<packPropagate> method may be used to
+turn off propagation for one or more masters.
+If propagation is disabled then the packer will not set
+the requested width and height of the packer.
+This may be useful if, for example, you wish for a master
+window to have a fixed size that you specify.
+
+=head1 RESTRICTIONS ON MASTER WINDOWS
+
+The master for each slave must either be the slave's parent
+(the default) or a descendant of the slave's parent.
+This restriction is necessary to guarantee that the
+slave can be placed over any part of its master that is
+visible without danger of the slave being clipped by its parent.
+
+=head1 PACKING ORDER
+
+If the master for a slave is not its parent then you must make sure
+that the slave is higher in the stacking order than the master.
+Otherwise the master will obscure the slave and it will appear as
+if the slave hasn't been packed correctly.
+The easiest way to make sure the slave is higher than the master is
+to create the master window first: the most recently created window
+will be highest in the stacking order.
+Or, you can use the B<raise> and B<lower> methods to change
+the stacking order of either the master or the slave.
+
+=head1 SEE ALSO
+
+L<Tk::form|Tk::form>
+L<Tk::grid|Tk::grid>
+L<Tk::place|Tk::place>
+
+=head1 KEYWORDS
+
+geometry manager, location, packer, parcel, propagation, size
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/palette.pod b/Master/tlpkg/tlperl/lib/Tk/palette.pod
new file mode 100644
index 00000000000..40a6914fd5c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/palette.pod
@@ -0,0 +1,89 @@
+# Copyright (c) 1995-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+setPalette, bisque - Modify the Tk color palette
+
+=for category Creating and Configuring Widgets
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<setPalette>(I<background>)
+
+I<$widget>-E<gt>B<setPalette(>I<name>=E<gt>I<value>?,I<name>=E<gt>I<value ...>?)
+
+I<$widget>-E<gt>B<bisque>
+
+=head1 DESCRIPTION
+
+The B<setPalette> method changes the color scheme for Tk.
+It does this by modifying the colors of existing widgets and by changing
+the option database so that future widgets will use the new color scheme.
+If B<setPalette> is invoked with a single argument, the
+argument is the name of a color to use as the normal background
+color; B<setPalette> will compute a complete color palette
+from this background color.
+Alternatively, the arguments to B<setPalette> may consist of any number
+of I<name>-I<value> pairs, where the first argument of the pair
+is the name of an option in the Tk option database and the second
+argument is the new value to use for that option. The following
+database names are currently supported:
+
+ activeBackground foreground selectColor
+ activeForeground highlightBackground selectBackground
+ background highlightColor selectForeground
+ disabledForeground insertBackground troughColor
+
+B<setPalette> tries to compute reasonable defaults for any
+options that you don't specify. You can specify options other
+than the above ones and Tk will change those options on widgets as
+well. This feature may be useful if you are using custom widgets with
+additional color options.
+
+Once it has computed the new value to use for each of the color options,
+B<setPalette> scans the widget hierarchy to modify the options
+of all existing widgets. For each widget, it checks to see if any
+of the above options is defined for the widget. If so, and if the
+option's current value is the default, then the value is changed; if
+the option has a value other than the default, B<setPalette>
+will not change it. The default for an option is the one provided by
+the widget (B<($w-E<gt>configure('option'))[3]>) unless
+B<setPalette> has been run previously, in which case it is the
+value specified in the previous invocation of B<setPalette>.
+
+After modifying all the widgets in the application, B<setPalette>
+adds options to the option database to change the defaults for
+widgets created in the future. The new options are added at
+priority B<widgetDefault>, so they will be overridden by options
+from the .Xdefaults file or options specified on the command-line
+that creates a widget.
+
+The method B<bisque> is provided for backward compatibility:
+it restores the application's colors to the light brown (``bisque'')
+color scheme used in Tk 3.6 and earlier versions.
+
+=head1 BUGS
+
+The use of option database names rather than the configure names is
+understandable given the mechanism (copied from Tcl/Tk), but
+is potentially confusing.
+
+The interpolation of different 'shades' of color used for 3D effects
+in 'RGB' space can lead to undesirable changes in 'hue'.
+Interpolation in 'HSV' (as used in B<Tk::ColorEditor>) would be more
+robust and X11R5's color support probably even more so.
+
+=head1 SEE ALSO
+
+L<Tk::options|Tk::options>
+
+=head1 KEYWORDS
+
+bisque, color, palette
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/place.pod b/Master/tlpkg/tlperl/lib/Tk/place.pod
new file mode 100644
index 00000000000..9f7e74f210f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/place.pod
@@ -0,0 +1,283 @@
+# Copyright (c) 1992 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::place - Geometry manager for fixed or rubber-sheet placement
+
+=for category Tk Geometry Management
+
+=head1 SYNOPSIS
+
+S< >I<$widget>->B<place>?(I<-option>=>I<value>?, I<-option>=>I<value>, ...)?
+
+S< >I<$widget>->B<placeForget>
+
+S< >I<$widget>->B<placeInfo>
+
+S< >I<$master>->B<placeSlaves>
+
+=head1 DESCRIPTION
+
+The placer is a geometry manager for Tk.
+It provides simple fixed placement of windows, where you specify
+the exact size and location of one window, called the I<slave>,
+within another window, called the I<master>.
+The placer also provides rubber-sheet placement, where you specify the
+size and location of the slave in terms of the dimensions of
+the master, so that the slave changes size and location
+in response to changes in the size of the master.
+Lastly, the placer allows you to mix these styles of placement so
+that, for example, the slave has a fixed width and height but is
+centered inside the master.
+
+=over 4
+
+=item I<$slave>->B<place>?(I<-option>=>I<value>?, I<-option>=>I<value>, ...?)?
+
+The B<place> method arranges for the placer
+to manage the geometry of I<$slave>.
+The remaining arguments consist of one or more I<-option>=>I<value>
+pairs that specify the way in which I<$slave>'s
+geometry is managed. I<-option> may have any of the values accepted
+by the L<< placeConfigure|/$slave->placeConfigure >> method.
+
+The B<place> method returns I<$slave>.
+
+=item I<$slave>->B<placeConfigure>?(I<-option>=>I<value>?, I<-option>=>I<value>, ...?)?
+
+Query or modify the geometry options of the I<$slave>. If no option is
+specified, this method returns a list describing the available
+options (see Tk_ConfigureInfo for information on the format of this
+list). If option is specified with no value, then the command returns
+a list describing the one named option (this list will be identical to
+the corresponding sublist of the value returned if no option is
+specified). If one or more option-value pairs are specified, then the
+method modifies the given option(s) to have the given value(s); in
+this case the command returns C<undef>.
+
+The following I<-option>=>I<value> pairs are supported:
+
+=over 8
+
+=item B<-anchor> => I<where>
+
+I<Where> specifies which point of I<$slave> is to be positioned
+at the (x,y) location selected by the B<-x>, B<-y>,
+B<-relx>, and B<-rely> options.
+The anchor point is in terms of the outer area of I<$slave>
+including its border, if any.
+Thus if I<where> is B<se> then the lower-right corner of
+I<$slave>'s border will appear at the given (x,y) location
+in the master.
+The anchor position defaults to B<nw>.
+
+=item B<-bordermode> => I<mode>
+
+I<Mode> determines the degree to which borders within the
+master are used in determining the placement of the slave.
+The default and most common value is B<inside>.
+In this case the placer considers the area of the master to
+be the innermost area of the master, inside any border:
+an option of B<-x>=>B<0> corresponds to an x-coordinate just
+inside the border and an option of B<-relwidth>=>1.0
+means I<$slave> will fill the area inside the master's
+border.
+If I<mode> is B<outside> then the placer considers
+the area of the master to include its border;
+this mode is typically used when placing I<$slave>
+outside its master, as with the options
+B<-x>=>B<0>, B<-y>=>B<0>, B<-anchor>=>B<ne>.
+Lastly, I<mode> may be specified as B<ignore>, in which
+case borders are ignored: the area of the master is considered
+to be its official X area, which includes any internal border but
+no external border. A bordermode of B<ignore> is probably
+not very useful.
+
+=item B<-height> => I<size>
+
+I<Size> specifies the height for I<$slave> in screen units
+(i.e. any of the forms accepted by B<Tk_GetPixels>).
+The height will be the outer dimension of I<$slave> including its
+border, if any.
+If I<size> is an empty string, or if no B<-height> or
+B<-relheight> option is specified, then the height requested
+internally by the window will be used.
+
+=item B<-in> => I<$master>
+
+I<$master> is the reference to the window relative
+to which I<$slave> is to be placed.
+I<$master> must either be I<$slave>'s parent or a descendant
+of I<$slave>'s parent.
+In addition, I<$master> and I<$slave> must both be descendants
+of the same top-level window.
+These restrictions are necessary to guarantee
+that I<$slave> is visible whenever I<$master> is visible.
+If this option isn't specified then the master defaults to
+I<$slave>'s parent.
+
+=item B<-relheight> => I<size>
+
+I<Size> specifies the height for I<$slave>.
+In this case the height is specified as a floating-point number
+relative to the height of the master: 0.5 means I<$slave> will
+be half as high as the master, 1.0 means I<$slave> will have
+the same height as the master, and so on.
+If both B<-height> and B<-relheight> are specified for a slave,
+their values are summed. For example, B<-relheight>=>1.0, B<-height>=>-2
+makes the slave 2 pixels shorter than the master.
+
+=item B<-relwidth> => I<size>
+
+I<Size> specifies the width for I<$slave>.
+In this case the width is specified as a floating-point number
+relative to the width of the master: 0.5 means I<$slave> will
+be half as wide as the master, 1.0 means I<$slave> will have
+the same width as the master, and so on.
+If both B<-width> and B<-relwidth> are specified for a slave,
+their values are summed. For example, B<-relwidth>=>1.0, B<-width>=>5
+makes the slave 5 pixels wider than the master.
+
+=item B<-relx> => I<location>
+
+I<Location> specifies the x-coordinate within the master window
+of the anchor point for I<$slave> widget.
+In this case the location is specified in a relative fashion
+as a floating-point number: 0.0 corresponds to the left edge
+of the master and 1.0 corresponds to the right edge of the master.
+I<Location> need not be in the range 0.0-1.0.
+If both B<-x> and B<-relx> are specified for a slave
+then their values are summed. For example, "B<-relx>=>0.5, B<-x>=-2"
+positions the left edge of the slave 2 pixels to the left of the
+center of its master.
+
+=item B<-rely> => I<location>
+
+I<Location> specifies the y-coordinate within the master window
+of the anchor point for I<$slave> widget.
+In this case the value is specified in a relative fashion
+as a floating-point number: 0.0 corresponds to the top edge
+of the master and 1.0 corresponds to the bottom edge of the master.
+I<Location> need not be in the range 0.0-1.0.
+If both B<-y> and B<-rely> are specified for a slave
+then their values are summed. For example, B<-rely>=>0.5, B<-x>=>3
+positions the top edge of the slave 3 pixels below the
+center of its master.
+
+=item B<-width> => I<size>
+
+I<Size> specifies the width for I<$slave> in screen units
+(i.e. any of the forms accepted by B<Tk_GetPixels>).
+The width will be the outer width of I<$slave> including its
+border, if any.
+If I<size> is an empty string, or if no B<-width>
+or B<-relwidth> option is specified, then the width requested
+internally by the window will be used.
+
+=item B<-x> => I<location>
+
+I<Location> specifies the x-coordinate within the master window
+of the anchor point for I<$slave> widget.
+The location is specified in screen units (i.e. any of the forms
+accepted by B<Tk_GetPixels>) and need not lie within the bounds
+of the master window.
+
+=item B<-y> => I<location>
+
+I<Location> specifies the y-coordinate within the master window
+of the anchor point for I<$slave> widget.
+The location is specified in screen units (i.e. any of the forms
+accepted by B<Tk_GetPixels>) and need not lie within the bounds
+of the master window.
+
+=back
+
+If the same value is specified separately with
+two different options, such as B<-x> and B<-relx>, then
+the most recent option is used and the older one is ignored.
+
+=item I<$slave>->B<placeForget>
+
+The B<placeForget> method causes the placer to stop managing
+the geometry of I<$slave>. As a side effect of this method call
+I<$slave> will be unmapped so that it doesn't appear on the
+screen.
+If I<$slave> isn't currently managed by the placer then the
+method call has no effect.
+B<placeForget> returns an empty string as result.
+
+=item I<$slave>->B<placeInfo>
+
+The B<placeInfo> method returns a list giving the current
+configuration of I<$slave>.
+The list consists of I<-option>=>I<value> pairs in exactly the
+same form as might be specified to the B<place>
+method.
+
+=item I<$slave>->B<placeSlaves>
+
+The B<placeSlaves> method returns a list of all the slave
+windows for which I<$master> is the master.
+If there are no slaves for I<$master> then an empty list is
+returned.
+
+=back
+
+If the configuration of a window has been retrieved with
+B<placeInfo>, that configuration can be restored later by
+first using B<placeForget> to erase any existing information
+for the window and then invoking B<place> with
+the saved information.
+
+=head1 FINE POINTS
+
+It is not necessary for the master window to be the parent
+of the slave window.
+This feature is useful in at least two situations.
+First, for complex window layouts it means you can create a
+hierarchy of subwindows whose only purpose
+is to assist in the layout of the parent.
+The ``I<real children>'' of the parent (i.e. the windows that
+are significant for the application's user interface) can be
+children of the parent yet be placed inside the windows
+of the geometry-management hierarchy.
+This means that the path names of the ``I<real children>''
+don't reflect the geometry-management hierarchy and users
+can specify options for the real children
+without being aware of the structure of the geometry-management
+hierarchy.
+
+A second reason for having a master different than the slave's
+parent is to tie two siblings together.
+For example, the placer can be used to force a window always to
+be positioned centered just below one of its
+siblings by specifying the configuration
+
+S< >B<-in>=>I<$sibling>, B<-relx>=>0.5, B<-rely>=>1.0,
+B<-anchor>=>'n', B<-bordermode>=>'outside'
+
+Whenever the I<$sibling> widget is repositioned in the future, the slave
+will be repositioned as well.
+
+Unlike many other geometry managers (such as the packer)
+the placer does not make any attempt to manipulate the geometry of
+the master windows or the parents of slave windows (i.e. it doesn't
+set their requested sizes).
+To control the sizes of these windows, make them windows like
+frames and canvases that provide configuration options for this purpose.
+
+=head1 SEE ALSO
+
+L<Tk::form>, L<Tk::grid>, L<Tk::pack>
+
+=head1 KEYWORDS
+
+geometry manager, height, location, master, place, rubber sheet, slave, width
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/prolog.ps b/Master/tlpkg/tlperl/lib/Tk/prolog.ps
new file mode 100644
index 00000000000..409e06a65a0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/prolog.ps
@@ -0,0 +1,284 @@
+%%BeginProlog
+50 dict begin
+
+% This is a standard prolog for Postscript generated by Tk's canvas
+% widget.
+% SCCS: @(#) prolog.ps 1.5 96/02/17 17:45:11
+
+% The definitions below just define all of the variables used in
+% any of the procedures here. This is needed for obscure reasons
+% explained on p. 716 of the Postscript manual (Section H.2.7,
+% "Initializing Variables," in the section on Encapsulated Postscript).
+
+/baseline 0 def
+/stipimage 0 def
+/height 0 def
+/justify 0 def
+/lineLength 0 def
+/spacing 0 def
+/stipple 0 def
+/strings 0 def
+/xoffset 0 def
+/yoffset 0 def
+/tmpstip null def
+
+% Define the array ISOLatin1Encoding (which specifies how characters are
+% encoded for ISO-8859-1 fonts), if it isn't already present (Postscript
+% level 2 is supposed to define it, but level 1 doesn't).
+
+systemdict /ISOLatin1Encoding known not {
+ /ISOLatin1Encoding [
+ /space /space /space /space /space /space /space /space
+ /space /space /space /space /space /space /space /space
+ /space /space /space /space /space /space /space /space
+ /space /space /space /space /space /space /space /space
+ /space /exclam /quotedbl /numbersign /dollar /percent /ampersand
+ /quoteright
+ /parenleft /parenright /asterisk /plus /comma /minus /period /slash
+ /zero /one /two /three /four /five /six /seven
+ /eight /nine /colon /semicolon /less /equal /greater /question
+ /at /A /B /C /D /E /F /G
+ /H /I /J /K /L /M /N /O
+ /P /Q /R /S /T /U /V /W
+ /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+ /quoteleft /a /b /c /d /e /f /g
+ /h /i /j /k /l /m /n /o
+ /p /q /r /s /t /u /v /w
+ /x /y /z /braceleft /bar /braceright /asciitilde /space
+ /space /space /space /space /space /space /space /space
+ /space /space /space /space /space /space /space /space
+ /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+ /dieresis /space /ring /cedilla /space /hungarumlaut /ogonek /caron
+ /space /exclamdown /cent /sterling /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen
+ /registered /macron
+ /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph
+ /periodcentered
+ /cedillar /onesuperior /ordmasculine /guillemotright /onequarter
+ /onehalf /threequarters /questiondown
+ /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex
+ /Idieresis
+ /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
+ /germandbls
+ /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex
+ /idieresis
+ /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn
+ /ydieresis
+ ] def
+} if
+
+% font ISOEncode font
+% This procedure changes the encoding of a font from the default
+% Postscript encoding to ISOLatin1. It's typically invoked just
+% before invoking "setfont". The body of this procedure comes from
+% Section 5.6.1 of the Postscript book.
+
+/ISOEncode {
+ dup length dict begin
+ {1 index /FID ne {def} {pop pop} ifelse} forall
+ /Encoding ISOLatin1Encoding def
+ currentdict
+ end
+
+ % I'm not sure why it's necessary to use "definefont" on this new
+ % font, but it seems to be important; just use the name "Temporary"
+ % for the font.
+
+ /Temporary exch definefont
+} bind def
+
+% StrokeClip
+%
+% This procedure converts the current path into a clip area under
+% the assumption of stroking. It's a bit tricky because some Postscript
+% interpreters get errors during strokepath for dashed lines. If
+% this happens then turn off dashes and try again.
+
+/StrokeClip {
+ {strokepath} stopped {
+ (This Postscript printer gets limitcheck overflows when) =
+ (stippling dashed lines; lines will be printed solid instead.) =
+ [] 0 setdash strokepath} if
+ clip
+} bind def
+
+% desiredSize EvenPixels closestSize
+%
+% The procedure below is used for stippling. Given the optimal size
+% of a dot in a stipple pattern in the current user coordinate system,
+% compute the closest size that is an exact multiple of the device's
+% pixel size. This allows stipple patterns to be displayed without
+% aliasing effects.
+
+/EvenPixels {
+ % Compute exact number of device pixels per stipple dot.
+ dup 0 matrix currentmatrix dtransform
+ dup mul exch dup mul add sqrt
+
+ % Round to an integer, make sure the number is at least 1, and compute
+ % user coord distance corresponding to this.
+ dup round dup 1 lt {pop 1} if
+ exch div mul
+} bind def
+
+% width height string StippleFill --
+%
+% Given a path already set up and a clipping region generated from
+% it, this procedure will fill the clipping region with a stipple
+% pattern. "String" contains a proper image description of the
+% stipple pattern and "width" and "height" give its dimensions. Each
+% stipple dot is assumed to be about one unit across in the current
+% user coordinate system. This procedure trashes the graphics state.
+
+/StippleFill {
+ % The following code is needed to work around a NeWSprint bug.
+
+ /tmpstip 1 index def
+
+ % Change the scaling so that one user unit in user coordinates
+ % corresponds to the size of one stipple dot.
+ 1 EvenPixels dup scale
+
+ % Compute the bounding box occupied by the path (which is now
+ % the clipping region), and round the lower coordinates down
+ % to the nearest starting point for the stipple pattern. Be
+ % careful about negative numbers, since the rounding works
+ % differently on them.
+
+ pathbbox
+ 4 2 roll
+ 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll
+ 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll
+
+ % Stack now: width height string y1 y2 x1 x2
+ % Below is a doubly-nested for loop to iterate across this area
+ % in units of the stipple pattern size, going up columns then
+ % across rows, blasting out a stipple-pattern-sized rectangle at
+ % each position
+
+ 6 index exch {
+ 2 index 5 index 3 index {
+ % Stack now: width height string y1 y2 x y
+
+ gsave
+ 1 index exch translate
+ 5 index 5 index true matrix tmpstip imagemask
+ grestore
+ } for
+ pop
+ } for
+ pop pop pop pop pop
+} bind def
+
+% -- AdjustColor --
+% Given a color value already set for output by the caller, adjusts
+% that value to a grayscale or mono value if requested by the CL
+% variable.
+
+/AdjustColor {
+ CL 2 lt {
+ currentgray
+ CL 0 eq {
+ .5 lt {0} {1} ifelse
+ } if
+ setgray
+ } if
+} bind def
+
+% x y strings spacing xoffset yoffset justify stipple DrawText --
+% This procedure does all of the real work of drawing text. The
+% color and font must already have been set by the caller, and the
+% following arguments must be on the stack:
+%
+% x, y - Coordinates at which to draw text.
+% strings - An array of strings, one for each line of the text item,
+% in order from top to bottom.
+% spacing - Spacing between lines.
+% xoffset - Horizontal offset for text bbox relative to x and y: 0 for
+% nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se.
+% yoffset - Vertical offset for text bbox relative to x and y: 0 for
+% nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se.
+% justify - 0 for left justification, 0.5 for center, 1 for right justify.
+% stipple - Boolean value indicating whether or not text is to be
+% drawn in stippled fashion. If text is stippled,
+% procedure StippleText must have been defined to call
+% StippleFill in the right way.
+%
+% Also, when this procedure is invoked, the color and font must already
+% have been set for the text.
+
+/DrawText {
+ /stipple exch def
+ /justify exch def
+ /yoffset exch def
+ /xoffset exch def
+ /spacing exch def
+ /strings exch def
+
+ % First scan through all of the text to find the widest line.
+
+ /lineLength 0 def
+ strings {
+ stringwidth pop
+ dup lineLength gt {/lineLength exch def} {pop} ifelse
+ newpath
+ } forall
+
+ % Compute the baseline offset and the actual font height.
+
+ 0 0 moveto (TXygqPZ) false charpath
+ pathbbox dup /baseline exch def
+ exch pop exch sub /height exch def pop
+ newpath
+
+ % Translate coordinates first so that the origin is at the upper-left
+ % corner of the text's bounding box. Remember that x and y for
+ % positioning are still on the stack.
+
+ translate
+ lineLength xoffset mul
+ strings length 1 sub spacing mul height add yoffset mul translate
+
+ % Now use the baseline and justification information to translate so
+ % that the origin is at the baseline and positioning point for the
+ % first line of text.
+
+ justify lineLength mul baseline neg translate
+
+ % Iterate over each of the lines to output it. For each line,
+ % compute its width again so it can be properly justified, then
+ % display it.
+
+ strings {
+ dup stringwidth pop
+ justify neg mul 0 moveto
+ stipple {
+
+ % The text is stippled, so turn it into a path and print
+ % by calling StippledText, which in turn calls StippleFill.
+ % Unfortunately, many Postscript interpreters will get
+ % overflow errors if we try to do the whole string at
+ % once, so do it a character at a time.
+
+ gsave
+ /char (X) def
+ {
+ char 0 3 -1 roll put
+ currentpoint
+ gsave
+ char true charpath clip StippleText
+ grestore
+ char stringwidth translate
+ moveto
+ } forall
+ grestore
+ } {show} ifelse
+ 0 spacing neg translate
+ } forall
+} bind def
+
+%%EndProlog
diff --git a/Master/tlpkg/tlperl/lib/Tk/selection.pod b/Master/tlpkg/tlperl/lib/Tk/selection.pod
new file mode 100644
index 00000000000..f8a3ce54856
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/selection.pod
@@ -0,0 +1,159 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+Tk::Selection - Manipulate the X selection
+
+=for category User Interaction
+
+=head1 SYNOPSIS
+
+I<$widget>-E<gt>B<Selection>I<Option>?(I<args>)?
+
+=head1 DESCRIPTION
+
+This command provides an interface to the X selection mechanism and
+implements the full selection functionality described in the
+X Inter-Client Communication Conventions Manual (ICCCM).
+
+The widget object used to invoke the methods below determines which
+display is used to access the selection.
+In order to avoid conflicts with B<selection> methods of widget classes
+(e.g. B<Text>) this set of methods uses the prefix B<Selection>.
+The following methods are currently supported:
+
+=over 4
+
+=item I<$widget>-E<gt>B<SelectionClear>?(B<-selection>=E<gt>I<selection>)?
+
+If I<selection> exists anywhere on I<$widget>'s display, clear it
+so that no window owns the selection anymore. I<Selection>
+specifies the X selection that should be cleared, and should be an
+atom name such as PRIMARY or CLIPBOARD; see the Inter-Client
+Communication Conventions Manual for complete details.
+I<Selection> defaults to PRIMARY.
+Returns an empty string.
+
+=item I<$widget>-E<gt>B<SelectionGet>?(?B<-selection>=E<gt>I<selection>?,?B<-type>=E<gt>I<type>?)?
+
+Retrieves the value of I<selection> from I<$widget>'s display and
+returns it as a result. I<Selection> defaults to PRIMARY.
+
+I<Type> specifies the form in which the selection is to be returned
+(the desired ``target'' for conversion, in ICCCM terminology), and
+should be an atom name such as STRING or FILE_NAME; see the
+Inter-Client Communication Conventions Manual for complete details.
+I<Type> defaults to STRING. The selection owner may choose to
+return the selection in any of several different representation
+formats, such as STRING, ATOM, INTEGER, etc. (this format is different
+than the selection type; see the ICCCM for all the confusing details).
+
+If I<format> is not STRING then things get messy, the following
+description is from the Tcl/Tk man page as yet incompetely translated for
+the perl version - it is misleading at best.
+
+If the selection is returned in a non-string format, such as INTEGER
+or ATOM, the B<SelectionGet> converts it to a list of perl
+values: atoms are converted to their
+textual names, and anything else is converted integers.
+
+A goal of the perl port is to provide better handling of different
+formats than Tcl/Tk does, which should be possible given perl's
+wider range of ``types''. Although some thought went into this
+in very early days of perl/Tk what exactly happens is still
+"not quite right" and subject to change.
+
+=item I<$widget>-E<gt>B<SelectionHandle>(?B<-selection>=E<gt>I<selection>?,?B<-type>=E<gt>I<type>?,?B<-format>=E<gt>I<format>? I<callback>)
+
+Creates a handler for selection requests, such that I<callback> will
+be executed whenever I<selection> is owned by I<$widget> and
+someone attempts to retrieve it in the form given by I<type>
+(e.g. I<type> is specified in the B<selection get> command).
+I<Selection> defaults to PRIMARY, I<type> defaults to STRING, and
+I<format> defaults to STRING. If I<callback> is an empty string
+then any existing handler for I<$widget>, I<type>, and
+I<selection> is removed.
+
+When I<selection> is requested, I<$widget> is the selection owner,
+and I<type> is the requested type, I<callback> will be executed
+with two additional arguments.
+The two additional arguments
+are I<offset> and I<maxBytes>: I<offset> specifies a starting
+character position in the selection and I<maxBytes> gives the maximum
+number of bytes to retrieve. The command should return a value consisting
+of at most I<maxBytes> of the selection, starting at position
+I<offset>. For very large selections (larger than I<maxBytes>)
+the selection will be retrieved using several invocations of I<callback>
+with increasing I<offset> values. If I<callback> returns a string
+whose length is less than I<maxBytes>, the return value is assumed to
+include all of the remainder of the selection; if the length of
+I<callback>'s result is equal to I<maxBytes> then
+I<callback> will be invoked again, until it eventually
+returns a result shorter than I<maxBytes>. The value of I<maxBytes>
+will always be relatively large (thousands of bytes).
+
+If I<callback> returns an error (e.g. via B<die>)
+then the selection retrieval is rejected
+just as if the selection didn't exist at all.
+
+The I<format> argument specifies the representation that should be
+used to transmit the selection to the requester (the second column of
+Table 2 of the ICCCM), and defaults to STRING. If I<format> is
+STRING, the selection is transmitted as 8-bit ASCII characters (i.e.
+just in the form returned by I<command>).
+
+If I<format> is not STRING then things get messy, the following
+description is from the Tcl/Tk man page as yet untranslated for
+the perl version - it is misleading at best.
+
+If I<format> is
+ATOM, then the return value from I<command> is divided into fields
+separated by white space; each field is converted to its atom value,
+and the 32-bit atom value is transmitted instead of the atom name.
+For any other I<format>, the return value from I<command> is
+divided into fields separated by white space and each field is
+converted to a 32-bit integer; an array of integers is transmitted
+to the selection requester.
+
+The I<format> argument is needed only for compatibility with
+many selection requesters, except Tcl/Tk. If Tcl/Tk is being
+used to retrieve the selection then the value is converted back to
+a string at the requesting end, so I<format> is
+irrelevant.
+
+A goal of the perl port is to provide better handling of different
+formats than Tcl/Tk does, which should be possible given perl's
+wider range of ``types''. Although some thought went into this
+in very early days of perl/Tk what exactly happens is still
+"not quite right" and subject to change.
+
+=item I<$widget>-E<gt>B<SelectionOwner>?(B<-selection>=E<gt>I<selection>)?
+
+B<SelectionOwner> returns the
+window in this application that owns I<selection> on the display
+containing I<$widget>, or an empty string if no window in this
+application owns the selection. I<Selection> defaults to PRIMARY.
+
+=item I<$widget>-E<gt>B<SelectionOwn>?(?B<-command>=E<gt>I<callback>?,?B<-selection>=E<gt>I<selection>?)?
+
+B<SelectionOwn> causes I<$widget> to become
+the new owner of I<selection> on I<$widget>'s display, returning
+an empty string as result. The existing owner, if any, is notified
+that it has lost the selection.
+If I<callback> is specified, it will be executed when
+some other window claims ownership of the selection away from
+I<$widget>. I<Selection> defaults to PRIMARY.
+
+=back
+
+=head1 KEYWORDS
+
+clear, format, handler, ICCCM, own, selection, target, type
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/send.pod b/Master/tlpkg/tlperl/lib/Tk/send.pod
new file mode 100644
index 00000000000..40382f2422d
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/send.pod
@@ -0,0 +1,118 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+send - Execute a command in a different application
+
+=for category Tk Generic Methods
+
+=head1 SYNOPSIS
+
+S< >I<$result> = I<$widget>-E<gt>B<send>(?I<options>,?I<app>=E<gt>I<cmd>?I<arg arg ...>?)
+
+=head1 DESCRIPTION
+
+This method arranges for I<cmd> (and I<arg>s) to be 'sent' to the
+application named by I<app>. It returns the result or
+an error (hence above should probably be 'wrapped' in B<eval{}> and $@ tested).
+I<App> may be the name of any application whose main window is
+on the display containing the sender's main window; it need not
+be within the same process.
+If no I<arg> arguments are present, then the string to be sent
+is contained entirely within the I<cmd> argument. If one or
+more I<arg>s are present, they are concatenated separated by white space to
+form the string to be sent.
+
+If the initial arguments of the call begin with ``-''
+they are treated as options. The following options are
+currently defined:
+
+=over 4
+
+=item B<-async>
+
+Requests asynchronous invocation. In this case the B<send>
+command will complete immediately without waiting for I<cmd>
+to complete in the target application; no result will be available
+and errors in the sent command will be ignored.
+If the target application is in the same process as the sending
+application then the B<-async> option is ignored.
+
+=item B<-->
+
+Serves no purpose except to terminate the list of options. This
+option is needed only if I<app> could contain a leading ``-''
+character.
+
+=back
+
+=head1 APPLICATION NAMES
+
+The name of an application is set initially from the name of the
+program or script that created the application.
+You can query and change the name of an application with the
+B<appname> method.
+
+=head1 WHAT IS A SEND
+
+The B<send> mechanism was designed to allow Tcl/Tk applications
+to send Tcl Scripts to each other. This does not map very well onto perl/Tk.
+Perl/Tk "sends" a string to I<app>, what happens as a result of this
+depends on the receiving application. If the other application is a Tcl/Tk4.*
+application it will be treated as a Tcl Script. If the "other" application is
+perl/Tk application (including sends to self) then the string is
+passed as an argument to a method call of the following form:
+
+I<$mainwindow>-E<gt>B<Receive(>I<string>);
+
+There is a default (AutoLoaded) B<Tk::Receive> which returns an error to the
+sending application. A particular application may define its own
+B<Receive> method in any class in B<MainWindow>'s inheritance tree
+to do whatever it sees fit. For example it could B<eval> the string,
+possibly in a B<Safe> "compartment".
+
+If a Tcl/Tk application "sends" anything to a perl/Tk application
+then the perl/Tk application would have to attempt to interpret the
+incoming string as a Tcl Script. Simple cases are should not be too hard to
+emulate (split on white space and treat first element as "command" and other
+elements as arguments).
+
+=head1 SECURITY
+
+The B<send> command is potentially a serious security loophole,
+since any application that can connect to your X server can send
+scripts to your applications. Hence the default behaviour outlined above.
+(With the availability of B<Safe> it may make sense to relax default behaviour
+a little.)
+
+Unmonitored B<eval>'ing of these incoming "scripts" can cause perl to
+read and write files and invoke subprocesses under your name.
+Host-based access control such as that provided by B<xhost>
+is particularly insecure, since it allows anyone with an account
+on particular hosts to connect to your server, and if disabled it
+allows anyone anywhere to connect to your server.
+In order to provide at least a small amount of
+security, core Tk checks the access control being used by the server
+and rejects incoming sends unless (a) B<xhost>-style access control
+is enabled (i.e. only certain hosts can establish connections) and (b) the
+list of enabled hosts is empty.
+This means that applications cannot connect to your server unless
+they use some other form of authorization
+such as that provide by B<xauth>.
+
+=head1 SEE ALSO
+
+L<perlfunc/eval>, L<Safe>,
+system's administrator/corporate security guidelines etc.
+
+=head1 KEYWORDS
+
+application, name, remote execution, security, send
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/srcfile.xpm b/Master/tlpkg/tlperl/lib/Tk/srcfile.xpm
new file mode 100644
index 00000000000..06a40a96c84
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/srcfile.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+static char * srcfile_xpm[] = {
+"12 12 3 1",
+" s None c None",
+". c #000000000000",
+"X c gray91",
+" ........ ",
+" .XXXXXX. ",
+" .XXXXXX... ",
+" .XXXXXXXX. ",
+" .XX...XXX. ",
+" .X.XXX.XX. ",
+" .X.XXXXXX. ",
+" .X.XXXXXX. ",
+" .XX....XX. ",
+" .XXXXXXXX. ",
+" .XXXXXXXX. ",
+" .......... "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/textfile.xpm b/Master/tlpkg/tlperl/lib/Tk/textfile.xpm
new file mode 100644
index 00000000000..8fa8d2f9032
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/textfile.xpm
@@ -0,0 +1,18 @@
+/* XPM */
+static char * textfile_xpm[] = {
+"12 12 3 1",
+" s None c None",
+". c #000000000000",
+"X c #E0E0FFFFE0E0",
+" ........ ",
+" .XXXXXX. ",
+" .XXXXXX... ",
+" .X....XXX. ",
+" .XXXXXXXX. ",
+" .X...XXXX. ",
+" .XXXXXXXX. ",
+" .X.....XX. ",
+" .XXXXXXXX. ",
+" .X.....XX. ",
+" .XXXXXXXX. ",
+" .......... "};
diff --git a/Master/tlpkg/tlperl/lib/Tk/tixWm.pod b/Master/tlpkg/tlperl/lib/Tk/tixWm.pod
new file mode 100644
index 00000000000..9bdd02d461c
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tixWm.pod
@@ -0,0 +1,73 @@
+
+
+=head1 NAME
+
+Tk::tixWm - Tix's addition to the standard TK wm command.
+
+=for category Tix Extensions
+
+=head1 SYNOPSIS
+
+S< >I<$widget>-E<gt>B<wmCapture>
+
+S< >I<$widget>-E<gt>B<wmRelease>
+
+=head1 DESCRIPTION
+
+The B<wmCapture> and the B<wmRelease> methods change the
+toplevel attribute of Tk widgets.
+
+=head1 METHODS
+
+=over 4
+
+=item I<$widget>-E<gt>B<wmCapture>
+
+Converts the toplevel window specified by I<$widget> into a non-toplevel
+widget. Normally this command is called to convert a L<Toplevel|Tk::Toplevel> widget
+into a L<Frame|Tk::Frame> widget. The newly-converted frame widget is
+un-mapped from the screen. To make it appear inside its parent, you
+must call a geometry manager (e.g. grid or pack) explictly.
+
+=item I<$widget>-E<gt>B<wmRelease>
+
+Makes the non-toplevel window specified by I<$widget> into a toplevel
+widget. Normally this command is called to convert a L<Frame|Tk::Frame> widget
+into a L<Toplevel|Tk::Toplevel> widget, but it can also be used on any
+non-toplevel widget (e.g, label). The newly-converted toplevel window
+is in a B<withdrawn> state. To make it appear on the screen, you must call
+B<deiconify> after calling B<wmRelease>.
+
+Any data associated with I<$widget> via B<wm> methods (icon, protocol,
+command etc.) are released, and must be re-established if window is later
+re-captured.
+
+=back
+
+=head1 BUGS
+
+B<wmCapture> does not exist in the Win32 window manager code.
+
+How these methods interact with perl/Tk's class hierarchy is not yet clear.
+In particular a B<wmRelease>d window will not automatically ``I<inherit>''
+the B<Tk::Wm> methods, however a B<wmCapture>d window still will.
+(A B<release>d B<Label> might make a good candidate for an B<Icon>.)
+
+=head1 AUTHORS
+
+Ioi Kim Lam - ioi@graphics.cis.upenn.edu wrote original Tix version.
+Updated for tk8.0, Win32 and perl by Nick Ing-Simmons.
+
+=head1 SEE ALSO
+
+L<Tk::Wm|Tk::Wm>
+L<Tk::Mwm|Tk::Mwm>
+L<Tk::Frame|Tk::Frame>
+L<Tk::Toplevel|Tk::Toplevel>
+
+=head1 KEYWORDS
+
+window manager, wm, TIX
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/tkGlue.def b/Master/tlpkg/tlperl/lib/Tk/tkGlue.def
new file mode 100644
index 00000000000..2f1662c71c2
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tkGlue.def
@@ -0,0 +1,130 @@
+#ifdef CAN_PROTOTYPE
+#define XSdec(x) XS(x)
+#else
+#define XSdec(x) void x()
+#endif
+
+#define TKXSRETURN(off) \
+ STMT_START { \
+ IV ptkAdj = (off); \
+ XSRETURN(ptkAdj); \
+ } STMT_END
+
+#ifndef PATCHLEVEL
+#include <patchlevel.h>
+#endif
+
+#if defined(PATCHLEVEL) && (PATCHLEVEL < 5)
+#define PL_sv_undef sv_undef
+#define PL_tainting tainting
+#define PL_tainted tainted
+#define PL_stack_base stack_base
+#define PL_stack_sp stack_sp
+#define PL_curcop curcop
+#endif
+
+#ifndef CopSTASH
+#define CopSTASH(c) c->cop_stash
+#define CopSTASH_set(c,h) (CopSTASH(c) = h)
+#endif
+
+#ifndef dTHX
+#define dTHR int maybeTHR
+#endif
+
+#ifndef dTHXs
+#ifdef PERL_IMPLICIT_SYS
+#define dTHXs dTHX
+#else
+#define dTHR int maybeTHR
+#endif
+#endif
+
+#ifndef ERRSV
+#define ERRSV GvSV(errgv)
+#endif
+
+#ifndef aTHX_
+#define aTHX_
+#endif
+
+#ifndef pTHX_
+#define pTHX_
+#endif
+
+#ifdef dirty
+#undef dirty
+#endif
+#ifdef bufptr
+#undef bufptr
+#endif
+#ifdef colors
+#undef colors
+#endif
+#ifdef JOIN
+#undef JOIN
+#endif
+
+#ifdef na
+#if PATCHLEVEL >= 5
+#undef na
+#endif
+#endif
+
+
+#define Tcl_Interp HV
+#define LangCallback SV
+#define Var SV *
+#define LangResultSave AV
+struct Lang_CmdInfo;
+#define Tcl_Command struct Lang_CmdInfo *
+struct WrappedRegExp;
+#define Tcl_RegExp struct WrappedRegExp *
+#define Tcl_Obj SV
+#define Tcl_DString SV *
+
+#ifndef PerlIO
+#define PerlIO FILE
+#define PerlIO_stderr() stderr
+#define PerlIO_printf fprintf
+#define PerlIO_flush(f) Fflush(f)
+#define PerlIO_vprintf(f,fmt,a) vfprintf(f,fmt,a)
+#define PerlIO_putc(f,c) fputc(c,f)
+#define PerlIO_fileno(f) fileno(f)
+
+/* Now our interface to Configure's FILE_xxx macros */
+
+#ifdef USE_STDIO_PTR
+#define PerlIO_has_cntptr(f) 1
+#define PerlIO_get_ptr(f) FILE_ptr(f)
+#define PerlIO_get_cnt(f) FILE_cnt(f)
+
+#ifdef FILE_CNT_LVALUE
+#define PerlIO_canset_cnt(f) 1
+#ifdef FILE_PTR_LVALUE
+#define PerlIO_fast_gets(f) 1
+#endif
+#define PerlIO_set_cnt(f,c) (FILE_cnt(f) = (c))
+#else
+#define PerlIO_canset_cnt(f) 0
+#define PerlIO_set_cnt(f,c) abort()
+#endif
+
+#ifdef FILE_PTR_LVALUE
+#define PerlIO_set_ptrcnt(f,p,c) (FILE_ptr(f) = (p), PerlIO_set_cnt(f,c))
+#else
+#define PerlIO_set_ptrcnt(f,p,c) abort()
+#endif
+
+#else /* USE_STDIO_PTR */
+
+#define PerlIO_has_cntptr(f) 0
+#define PerlIO_get_cnt(f) (abort(),0)
+#define PerlIO_get_ptr(f) (abort(),0)
+#define PerlIO_set_cnt(f,c) abort()
+#define PerlIO_set_ptrcnt(f,p,c) abort()
+
+#endif /* USE_STDIO_PTR */
+
+#endif
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/tkGlue.h b/Master/tlpkg/tlperl/lib/Tk/tkGlue.h
new file mode 100644
index 00000000000..806b3901902
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tkGlue.h
@@ -0,0 +1,79 @@
+#ifndef _TKGLUE
+#define _TKGLUE
+
+#ifndef BASEEXT
+#define BASEEXT "Tk"
+#endif
+
+#ifndef _TKOPTION
+#include "pTk/tkOption.h"
+#include "pTk/tkOption_f.h"
+#endif
+
+typedef struct EventAndKeySym
+ {XEvent event;
+ KeySym keySym;
+ Tcl_Interp *interp;
+ Tk_Window tkwin;
+ SV *window;
+ } EventAndKeySym;
+
+typedef struct Lang_CmdInfo
+ {Tcl_CmdInfo Tk;
+ Tcl_Interp *interp;
+ Tk_Window tkwin;
+ SV *image;
+ Tk_Font tkfont;
+ } Lang_CmdInfo;
+
+#include "vtab.def"
+
+
+#define VTABLE_INIT() IMPORT_VTABLES
+
+extern Lang_CmdInfo *WindowCommand _ANSI_ARGS_((SV *win,HV **hptr, int moan));
+extern Tk_Window SVtoWindow _ANSI_ARGS_((SV *win));
+extern Tk_Font SVtoFont _ANSI_ARGS_((SV *win));
+extern int Call_Tk _ANSI_ARGS_((Lang_CmdInfo *info,int argc, SV **args));
+extern HV *InterpHv _ANSI_ARGS_((Tcl_Interp *interp,int fatal));
+extern SV *WidgetRef _ANSI_ARGS_((Tcl_Interp *interp, char *path));
+extern SV *ObjectRef _ANSI_ARGS_((Tcl_Interp *interp, char *path));
+extern SV *TkToWidget _ANSI_ARGS_((Tk_Window tkwin,Tcl_Interp **pinterp));
+extern SV *FindTkVarName _ANSI_ARGS_((CONST char *varName,int flags));
+extern void EnterWidgetMethods _ANSI_ARGS_((char *package, ...));
+extern SV *MakeReference _ANSI_ARGS_((SV * sv));
+extern Tk_Window TkToMainWindow _ANSI_ARGS_((Tk_Window tkwin));
+extern void Lang_TkSubCommand _ANSI_ARGS_ ((char *name, Tcl_ObjCmdProc *proc));
+extern void Lang_TkCommand _ANSI_ARGS_ ((char *name, Tcl_ObjCmdProc *proc));
+extern SV *XEvent_Info _((EventAndKeySym *obj,char *s));
+extern EventAndKeySym *SVtoEventAndKeySym _((SV *arg));
+extern int XSTkCommand _ANSI_ARGS_((CV *cv, int mwcd, Tcl_ObjCmdProc *proc, int items, SV **args));
+
+extern XS(XStoWidget);
+
+EXTERN void ClearErrorInfo _ANSI_ARGS_((SV *interp));
+EXTERN Tk_Window mainWindow;
+EXTERN void DumpStack _ANSI_ARGS_((CONST char *who));
+EXTERN void Boot_Glue (pTHX);
+EXTERN void Boot_Tix (pTHX);
+EXTERN void install_vtab _ANSI_ARGS_((char *name, void *table, size_t size));
+extern SV *TagIt _((SV *sv, char *type));
+extern void Font_DESTROY _((SV *sv));
+struct pTkCheckChain;
+extern void Tk_CheckHash _((SV *sv,struct pTkCheckChain *chain));
+
+extern int has_highbit(CONST char *s,int l);
+extern SV * sv_maybe_utf8(SV *sv);
+extern SV * Lang_SystemEncoding(void);
+
+#ifdef WIN32
+#include "pTk/tkWinInt.h"
+#endif
+
+#ifndef WIN32
+#define HWND void *
+#endif
+EXTERN HWND SVtoHWND _ANSI_ARGS_((SV *win));
+
+#endif
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/tkGlue.m b/Master/tlpkg/tlperl/lib/Tk/tkGlue.m
new file mode 100644
index 00000000000..922d1426a55
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tkGlue.m
@@ -0,0 +1,74 @@
+#ifndef _TKGLUE_VM
+#define _TKGLUE_VM
+#include "tkGlue_f.h"
+#ifndef NO_VTABLES
+#ifndef Call_Tk
+# define Call_Tk (*TkglueVptr->V_Call_Tk)
+#endif
+
+#ifndef EnterWidgetMethods
+# define EnterWidgetMethods (*TkglueVptr->V_EnterWidgetMethods)
+#endif
+
+#ifndef FindTkVarName
+# define FindTkVarName (*TkglueVptr->V_FindTkVarName)
+#endif
+
+#ifndef InterpHv
+# define InterpHv (*TkglueVptr->V_InterpHv)
+#endif
+
+#ifndef Lang_TkCommand
+# define Lang_TkCommand (*TkglueVptr->V_Lang_TkCommand)
+#endif
+
+#ifndef Lang_TkSubCommand
+# define Lang_TkSubCommand (*TkglueVptr->V_Lang_TkSubCommand)
+#endif
+
+#ifndef MakeReference
+# define MakeReference (*TkglueVptr->V_MakeReference)
+#endif
+
+#ifndef ObjectRef
+# define ObjectRef (*TkglueVptr->V_ObjectRef)
+#endif
+
+#ifndef SVtoFont
+# define SVtoFont (*TkglueVptr->V_SVtoFont)
+#endif
+
+#ifndef SVtoHWND
+# define SVtoHWND (*TkglueVptr->V_SVtoHWND)
+#endif
+
+#ifndef SVtoWindow
+# define SVtoWindow (*TkglueVptr->V_SVtoWindow)
+#endif
+
+#ifndef TkToMainWindow
+# define TkToMainWindow (*TkglueVptr->V_TkToMainWindow)
+#endif
+
+#ifndef TkToWidget
+# define TkToWidget (*TkglueVptr->V_TkToWidget)
+#endif
+
+#ifndef WidgetRef
+# define WidgetRef (*TkglueVptr->V_WidgetRef)
+#endif
+
+#ifndef WindowCommand
+# define WindowCommand (*TkglueVptr->V_WindowCommand)
+#endif
+
+#ifndef XSTkCommand
+# define XSTkCommand (*TkglueVptr->V_XSTkCommand)
+#endif
+
+#ifndef install_vtab
+# define install_vtab (*TkglueVptr->V_install_vtab)
+#endif
+
+#endif /* NO_VTABLES */
+#endif /* _TKGLUE_VM */
diff --git a/Master/tlpkg/tlperl/lib/Tk/tkGlue.t b/Master/tlpkg/tlperl/lib/Tk/tkGlue.t
new file mode 100644
index 00000000000..e59d658287f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tkGlue.t
@@ -0,0 +1,70 @@
+#ifdef _TKGLUE
+#ifndef Call_Tk
+VFUNC(int,Call_Tk,V_Call_Tk,_ANSI_ARGS_((Lang_CmdInfo *info,int argc, SV **args)))
+#endif /* #ifndef Call_Tk */
+
+#ifndef EnterWidgetMethods
+VFUNC(void,EnterWidgetMethods,V_EnterWidgetMethods,_ANSI_ARGS_((char *package, ...)))
+#endif /* #ifndef EnterWidgetMethods */
+
+#ifndef FindTkVarName
+VFUNC(SV *,FindTkVarName,V_FindTkVarName,_ANSI_ARGS_((CONST char *varName,int flags)))
+#endif /* #ifndef FindTkVarName */
+
+#ifndef InterpHv
+VFUNC(HV *,InterpHv,V_InterpHv,_ANSI_ARGS_((Tcl_Interp *interp,int fatal)))
+#endif /* #ifndef InterpHv */
+
+#ifndef Lang_TkCommand
+VFUNC(void,Lang_TkCommand,V_Lang_TkCommand,_ANSI_ARGS_((char *name, Tcl_ObjCmdProc *proc)))
+#endif /* #ifndef Lang_TkCommand */
+
+#ifndef Lang_TkSubCommand
+VFUNC(void,Lang_TkSubCommand,V_Lang_TkSubCommand,_ANSI_ARGS_((char *name, Tcl_ObjCmdProc *proc)))
+#endif /* #ifndef Lang_TkSubCommand */
+
+#ifndef MakeReference
+VFUNC(SV *,MakeReference,V_MakeReference,_ANSI_ARGS_((SV * sv)))
+#endif /* #ifndef MakeReference */
+
+#ifndef ObjectRef
+VFUNC(SV *,ObjectRef,V_ObjectRef,_ANSI_ARGS_((Tcl_Interp *interp, char *path)))
+#endif /* #ifndef ObjectRef */
+
+#ifndef SVtoFont
+VFUNC(Tk_Font,SVtoFont,V_SVtoFont,_ANSI_ARGS_((SV *win)))
+#endif /* #ifndef SVtoFont */
+
+#ifndef SVtoHWND
+VFUNC(HWND,SVtoHWND,V_SVtoHWND,_ANSI_ARGS_((SV *win)))
+#endif /* #ifndef SVtoHWND */
+
+#ifndef SVtoWindow
+VFUNC(Tk_Window,SVtoWindow,V_SVtoWindow,_ANSI_ARGS_((SV *win)))
+#endif /* #ifndef SVtoWindow */
+
+#ifndef TkToMainWindow
+VFUNC(Tk_Window,TkToMainWindow,V_TkToMainWindow,_ANSI_ARGS_((Tk_Window tkwin)))
+#endif /* #ifndef TkToMainWindow */
+
+#ifndef TkToWidget
+VFUNC(SV *,TkToWidget,V_TkToWidget,_ANSI_ARGS_((Tk_Window tkwin,Tcl_Interp **pinterp)))
+#endif /* #ifndef TkToWidget */
+
+#ifndef WidgetRef
+VFUNC(SV *,WidgetRef,V_WidgetRef,_ANSI_ARGS_((Tcl_Interp *interp, char *path)))
+#endif /* #ifndef WidgetRef */
+
+#ifndef WindowCommand
+VFUNC(Lang_CmdInfo *,WindowCommand,V_WindowCommand,_ANSI_ARGS_((SV *win,HV **hptr, int moan)))
+#endif /* #ifndef WindowCommand */
+
+#ifndef XSTkCommand
+VFUNC(int,XSTkCommand,V_XSTkCommand,_ANSI_ARGS_((CV *cv, int mwcd, Tcl_ObjCmdProc *proc, int items, SV **args)))
+#endif /* #ifndef XSTkCommand */
+
+#ifndef install_vtab
+VFUNC(void,install_vtab,V_install_vtab,_ANSI_ARGS_((char *name, void *table, size_t size)))
+#endif /* #ifndef install_vtab */
+
+#endif /* _TKGLUE */
diff --git a/Master/tlpkg/tlperl/lib/Tk/tkGlue_f.h b/Master/tlpkg/tlperl/lib/Tk/tkGlue_f.h
new file mode 100644
index 00000000000..8255c08dc3f
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tkGlue_f.h
@@ -0,0 +1,14 @@
+#ifndef TKGLUE_VT
+#define TKGLUE_VT
+typedef struct TkglueVtab
+{
+ unsigned (*tabSize)(void);
+#define VFUNC(type,name,mem,args) type (*mem) args;
+#define VVAR(type,name,mem) type (*mem);
+#include "tkGlue.t"
+#undef VFUNC
+#undef VVAR
+} TkglueVtab;
+extern TkglueVtab *TkglueVptr;
+extern TkglueVtab *TkglueVGet(void);
+#endif /* TKGLUE_VT */
diff --git a/Master/tlpkg/tlperl/lib/Tk/tkvars.pod b/Master/tlpkg/tlperl/lib/Tk/tkvars.pod
new file mode 100644
index 00000000000..5ae8ac477ef
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tkvars.pod
@@ -0,0 +1,107 @@
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+=head1 NAME
+
+tkvars - Variables used or set by Tk
+
+=for category Tk Generic Methods
+
+=head1 DESCRIPTION
+
+The following perl variables are either set or used by Tk at various times
+in its execution. (For a list of variables used by perl see L<perlvar>.)
+
+=over 4
+
+=item B<$Tk::library>
+
+This variable holds the file name for a directory containing the modules
+related to Tk. These modules include an initialization
+file that is normally processed whenever a Tk application starts up,
+plus other files containing procedures that implement default behaviors
+for widgets.
+The initial value of B<$Tk::library> is set when Tk is added to
+an interpreter; this is done by searching searching for a directory
+named Tk in the directory where the file F<Tk.pm>, or the first
+directory F<Tk> in C<@INC>.
+
+The B<TK_LIBRARY> environment variable used by Tcl/Tk is not
+supported by perl/Tk. Please use L<@INC|perlvar/@INC> to change where modules
+are searched.
+
+B<Note:> This is Tcl remnant. With perl it makes more sense to
+use C<@INC> and C<%INC>).
+
+=item B<$Tk::patchLevel>
+
+Contains a decimal integer giving the current patch level for Tk.
+The patch level is incremented for each new release or patch, and
+it uniquely identifies an official version of Tk.
+
+B<Note:> this is Tcl remnant. With perl it makes more sense to
+use B<$Tk::VERSION> described below.
+
+=item B<$Tk::strictMotif>
+
+This variable is set to zero by default.
+If an application sets it to one, then Tk attempts to adhere as
+closely as possible to Motif look-and-feel standards.
+For example, active elements such as buttons and scrollbar
+sliders will not change color when the pointer passes over them.
+
+=item B<$Tk::VERSION>
+
+The variable holds the current version number of the perl/Tk
+release in the form I<major>.I<minor>. I<Major> and
+I<minor> are integers.
+
+The I<major> version number shows on which
+Tcl/Tk release perl/Tk is based. E.g., B<402> means based on
+Tcls Tk 4.2. (Patchlevel of Tcls Tk are not incorporated because
+perl/Tk tended to be ``I<ahead>'' of them on some fixes and behind on
+others. The first digest of the major version number increases in
+any Tk release that includes changes that are not backward compatible
+(i.e. whenever existing perl/Tk applications and scripts may have to change to
+work with the new release).
+
+The I<minor> version depends on perl/Tk only. It uses the
+'even'='stable', 'odd'='experimental' scheme that linux uses:
+
+ .0xx - inherently 'alpha'
+ .1xx - experimental 'beta'
+ .2xx - stable
+ .3xx - experimental
+ .4xx - stable
+ ...
+
+The minor version number increases with
+each new release of Tk, except that it resets to zero whenever the
+major version number changes.
+
+=item B<$Tk::version>
+
+The variable holds the current version number of the Tk
+library in the form I<major>.I<minor>. I<Major> and
+I<minor> are integers. The major version number increases in
+any Tk release that includes changes that are not backward compatible
+(i.e. whenever existing Tk applications and scripts may have to change to
+work with the new release). The minor version number increases with
+each new release of Tk, except that it resets to zero whenever the
+major version number changes.
+
+B<Note:> this is Tcl remnant. With perl it makes more sense to
+use B<$Tk::VERSION> described above.
+
+=back
+
+=head1 KEYWORDS
+
+variables, version
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/tranicon.gif b/Master/tlpkg/tlperl/lib/Tk/tranicon.gif
new file mode 100644
index 00000000000..dc7d494c572
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/tranicon.gif
Binary files differ
diff --git a/Master/tlpkg/tlperl/lib/Tk/typemap b/Master/tlpkg/tlperl/lib/Tk/typemap
new file mode 100644
index 00000000000..29138850ab3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/typemap
@@ -0,0 +1,96 @@
+TYPEMAP
+Tk_Window T_TK_WINDOW
+Tk_Image T_TK_IMAGE
+TkWindow * T_TKWINDOW
+Display * T_IVOBJ
+Screen * T_IVOBJ
+Visual * T_IVOBJ
+Window T_IVOBJ
+Colormap T_IVOBJ
+GC T_IVOBJ
+Font T_IVOBJ
+Atom T_IV
+HANDLE T_IV
+BOOL T_IV
+HWND T_TK_HWND
+FILE * T_NIO
+hash_ptr * T_PTR
+Tk_3DBorder T_IVOBJ
+Tk_Uid T_TK_UID
+Tcl_Interp * T_TK_INTERP
+Tk_Font T_TK_FONT
+EventAndKeySym * T_TK_XEVENT
+LangCallback * T_TK_CALLBACK
+LangFontInfo * T_PVOBJ
+const char * T_PV
+
+INPUT
+T_PVOBJ
+ if (sv_isobject($arg)) {
+ STRLEN sz;
+ $var = ($type) SvPV((SV*)SvRV($arg),sz);
+ if (sz != sizeof(*$var))
+ croak(\"$arg too small (%d) for $var $type (%d)\",sz,sizeof(*$var));
+ }
+ else
+ croak(\"$var is not an object\")
+
+T_TK_WINDOW
+ $var = SVtoWindow($arg)
+
+T_TK_CALLBACK
+ $var = LangMakeCallback($arg)
+
+
+T_TK_HWND
+ $var = SVtoHWND($arg)
+
+T_TK_XEVENT
+ $var = SVtoEventAndKeySym($arg)
+
+T_TK_FONT
+ $var = SVtoFont($arg)
+
+T_TK_IMAGE
+ $var = SVtoImage($arg)
+
+T_TKWINDOW
+ $var = (TkWindow *) SVtoWindow($arg)
+
+T_TK_INTERP
+ $var = WindowCommand($arg,NULL,1)->interp
+
+T_TK_UID
+ $var = Tk_GetUid(SvPV($arg,na))
+
+T_IVOBJ
+ if (sv_isa($arg, \"${ntype}\")) {
+ $var = INT2PTR($type, SvIV(SvRV($arg)));
+ }
+ else {
+ $var = ($type) NULL;
+ croak(\"$var is not of type ${ntype}\");
+ }
+
+T_NIO
+ if (sv_isa($arg, \"${Package}\")) {
+ $var = IoIFP(sv_2io(SvRV($arg)));
+ }
+ else
+ croak(\"$var is not of type ${Package}\")
+
+
+OUTPUT
+T_IVOBJ
+ sv_setref_iv($arg, \"${ntype}\", PTR2IV($var));
+
+T_TK_UID
+ sv_setpv($arg,$var);
+
+T_TK_WINDOW
+ SvSetMagicSV($arg,TkToWidget($var,NULL));
+
+T_TKWINDOW
+ SvSetMagicSV($arg,TkToWidget((Tk_Window) $var,NULL));
+
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/vtab.def b/Master/tlpkg/tlperl/lib/Tk/vtab.def
new file mode 100644
index 00000000000..7663df7d6f4
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/vtab.def
@@ -0,0 +1,90 @@
+#define IMPORT_VTABLE(ptr,type,name) do { \
+ ptr = INT2PTR(type *,SvIV(get_sv(name,GV_ADDWARN|GV_ADD))); \
+ if ((*ptr->tabSize)() != sizeof(type)) { \
+ Perl_warn(aTHX_ "%s wrong size for %s",name,#type); \
+ } \
+ } while (0)
+
+#ifdef WIN32
+#define DECLARE_VTABLES \
+LangVtab *LangVptr; \
+TcldeclsVtab *TcldeclsVptr; \
+TkVtab *TkVptr; \
+TkdeclsVtab *TkdeclsVptr; \
+TkeventVtab *TkeventVptr; \
+TkglueVtab *TkglueVptr; \
+TkintVtab *TkintVptr; \
+TkintdeclsVtab *TkintdeclsVptr; \
+TkintplatdeclsVtab *TkintplatdeclsVptr;\
+TkintxlibdeclsVtab *TkintxlibdeclsVptr;\
+TkoptionVtab *TkoptionVptr; \
+TkplatdeclsVtab *TkplatdeclsVptr
+
+#define IMPORT_VTABLES do { \
+IMPORT_VTABLE(LangVptr , LangVtab,"Tk::LangVtab"); \
+IMPORT_VTABLE(TcldeclsVptr , TcldeclsVtab,"Tk::TcldeclsVtab"); \
+IMPORT_VTABLE(TkVptr , TkVtab,"Tk::TkVtab"); \
+IMPORT_VTABLE(TkdeclsVptr , TkdeclsVtab,"Tk::TkdeclsVtab"); \
+IMPORT_VTABLE(TkeventVptr , TkeventVtab,"Tk::TkeventVtab"); \
+IMPORT_VTABLE(TkglueVptr , TkglueVtab,"Tk::TkglueVtab"); \
+IMPORT_VTABLE(TkintVptr , TkintVtab,"Tk::TkintVtab"); \
+IMPORT_VTABLE(TkintdeclsVptr , TkintdeclsVtab,"Tk::TkintdeclsVtab"); \
+IMPORT_VTABLE(TkintplatdeclsVptr,TkintplatdeclsVtab,"Tk::TkintplatdeclsVtab"); \
+IMPORT_VTABLE(TkintxlibdeclsVptr,TkintxlibdeclsVtab,"Tk::TkintxlibdeclsVtab"); \
+IMPORT_VTABLE(TkoptionVptr , TkoptionVtab,"Tk::TkoptionVtab"); \
+IMPORT_VTABLE(TkplatdeclsVptr , TkplatdeclsVtab,"Tk::TkplatdeclsVtab"); \
+} while (0)
+#else
+#define DECLARE_VTABLES \
+LangVtab *LangVptr; \
+TcldeclsVtab *TcldeclsVptr; \
+TkVtab *TkVptr; \
+TkdeclsVtab *TkdeclsVptr; \
+TkeventVtab *TkeventVptr; \
+TkglueVtab *TkglueVptr; \
+TkintVtab *TkintVptr; \
+TkintdeclsVtab *TkintdeclsVptr; \
+TkoptionVtab *TkoptionVptr; \
+XlibVtab *XlibVptr
+
+#define IMPORT_VTABLES do { \
+IMPORT_VTABLE(LangVptr , LangVtab,"Tk::LangVtab"); \
+IMPORT_VTABLE(TcldeclsVptr , TcldeclsVtab,"Tk::TcldeclsVtab"); \
+IMPORT_VTABLE(TkVptr , TkVtab,"Tk::TkVtab"); \
+IMPORT_VTABLE(TkdeclsVptr , TkdeclsVtab,"Tk::TkdeclsVtab"); \
+IMPORT_VTABLE(TkeventVptr , TkeventVtab,"Tk::TkeventVtab"); \
+IMPORT_VTABLE(TkglueVptr , TkglueVtab,"Tk::TkglueVtab"); \
+IMPORT_VTABLE(TkintVptr , TkintVtab,"Tk::TkintVtab"); \
+IMPORT_VTABLE(TkintdeclsVptr , TkintdeclsVtab,"Tk::TkintdeclsVtab"); \
+IMPORT_VTABLE(TkoptionVptr , TkoptionVtab,"Tk::TkoptionVtab"); \
+IMPORT_VTABLE(XlibVptr , XlibVtab,"Tk::XlibVtab"); \
+} while (0)
+#endif
+#define DECLARE_TIX \
+TixVtab *TixVptr; \
+TixintVtab *TixintVptr
+
+#define IMPORT_TIX do { \
+IMPORT_VTABLE(TixVptr , TixVtab,"Tk::TixVtab"); \
+IMPORT_VTABLE(TixintVptr , TixintVtab,"Tk::TixintVtab"); \
+} while (0)
+#define DECLARE_PHOTO \
+ImgintVtab *ImgintVptr; \
+TkimgphotoVtab *TkimgphotoVptr
+
+#define IMPORT_PHOTO do { \
+IMPORT_VTABLE(ImgintVptr , ImgintVtab,"Tk::ImgintVtab"); \
+IMPORT_VTABLE(TkimgphotoVptr , TkimgphotoVtab,"Tk::TkimgphotoVtab"); \
+} while (0)
+#define DECLARE_EVENT \
+TkeventVtab *TkeventVptr
+
+#define IMPORT_EVENT do { \
+IMPORT_VTABLE(TkeventVptr , TkeventVtab,"Tk::TkeventVtab"); \
+} while (0)
+#define DECLARE_TIXXPM \
+TiximgxpmVtab *TiximgxpmVptr
+
+#define IMPORT_TIXXPM do { \
+IMPORT_VTABLE(TiximgxpmVptr , TiximgxpmVtab,"Tk::TiximgxpmVtab"); \
+} while (0)
diff --git a/Master/tlpkg/tlperl/lib/Tk/widgets.pm b/Master/tlpkg/tlperl/lib/Tk/widgets.pm
new file mode 100644
index 00000000000..fe1deea12ef
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/widgets.pm
@@ -0,0 +1,20 @@
+package Tk::widgets;
+use Carp;
+
+use vars qw($VERSION);
+$VERSION = '4.005'; # $Id: //depot/Tkutf8/Tk/widgets.pm#4 $
+
+sub import
+{
+ my $class = shift;
+ foreach (@_)
+ {
+ local $SIG{__DIE__} = \&Carp::croak;
+ # carp "$_ already loaded" if (exists $INC{"Tk/$_.pm"});
+ require "Tk/$_.pm";
+ }
+}
+
+1;
+__END__
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/widgets.pod b/Master/tlpkg/tlperl/lib/Tk/widgets.pod
new file mode 100644
index 00000000000..114f52505d7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/widgets.pod
@@ -0,0 +1,20 @@
+
+=head1 NAME
+
+Tk::widgets - preload widget classes
+
+=for pm Tk/widgets.pm
+
+=for category Implementation
+
+=head1 SYNOPSIS
+
+ use Tk::widgets qw(Button Label Frame);
+
+=head1 DESCRIPTION
+
+Does a 'require Tk::Foo' for each 'Foo' in the list.
+May speed startup by avoiding AUTOLOADs.
+
+=cut
+
diff --git a/Master/tlpkg/tlperl/lib/Tk/win.xbm b/Master/tlpkg/tlperl/lib/Tk/win.xbm
new file mode 100644
index 00000000000..13c05e8c2d7
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/win.xbm
@@ -0,0 +1,6 @@
+#define win.xbm_width 16
+#define win.xbm_height 16
+static char win.xbm_bits[] = {
+ 0xff, 0xff, 0x0d, 0xb0, 0xff, 0xff, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,
+ 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,
+ 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0xff, 0xff};
diff --git a/Master/tlpkg/tlperl/lib/Tk/winfolder.xpm b/Master/tlpkg/tlperl/lib/Tk/winfolder.xpm
new file mode 100644
index 00000000000..73fe734c6d0
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/winfolder.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static char *winfolder[] = {
+/* width height num_colors chars_per_pixel */
+" 17 15 17 1",
+/* colors */
+" c none",
+". c #000000",
+"# c #808080",
+"a c #800000",
+"b c #808000",
+"c c #008000",
+"d c #008080",
+"e c #000080",
+"f c #800080",
+"g c #ffffff",
+"h c #c0c0c0",
+"i c #ff0000",
+"j c #ffff00",
+"k c #00ff00",
+"l c #00ffff",
+"m c #0000ff",
+"n c #ff00ff",
+/* pixels */
+" ",
+" ##### ",
+" #hjhjh# ",
+" #hjhjhjh###### ",
+" #gggggggggggg#. ",
+" #gjhjhjhjhjhj#. ",
+" #ghjhjhjhjhjh#. ",
+" #gjhjhjhjhjhj#. ",
+" #ghjhjhjhjhjh#. ",
+" #gjhjhjhjhjhj#. ",
+" #ghjhjhjhjhjh#. ",
+" #gjhjhjhjhjhj#. ",
+" ##############. ",
+" .............. ",
+" ",
+};
diff --git a/Master/tlpkg/tlperl/lib/Tk/wintext.xpm b/Master/tlpkg/tlperl/lib/Tk/wintext.xpm
new file mode 100644
index 00000000000..50b2d5587dd
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/wintext.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char *wintext[] = {
+/* width height num_colors chars_per_pixel */
+" 15 18 17 1",
+/* colors */
+" c None",
+". c #000000",
+"# c #808080",
+"a c #800000",
+"b c #808000",
+"c c #008000",
+"d c #008080",
+"e c #000080",
+"f c #800080",
+"g c #ffffff",
+"h c #c0c0c0",
+"i c #ff0000",
+"j c #ffff00",
+"k c #00ff00",
+"l c #00ffff",
+"m c #0000ff",
+"n c #ff00ff",
+/* pixels */
+" ",
+" . . . . . ",
+" .g#g#g#g#g. ",
+" #g.g.g.g.g.g. ",
+" #ggggggggggh. ",
+" #ggggggggggh. ",
+" #gg...g..ggh. ",
+" #ggggggggggh. ",
+" #gg......ggh. ",
+" #ggggggggggh. ",
+" #gg......ggh. ",
+" #ggggggggggh. ",
+" #gg......ggh. ",
+" #ggggggggggh. ",
+" #ggggggggggh. ",
+" #hhhhhhhhhhh. ",
+" ........... ",
+" "
+};